Compare commits

..

497 Commits

Author SHA1 Message Date
InsanityAutomation 01479cab84 Final binaries 2023-03-02 20:48:41 -05:00
InsanityAutomation 401f5cf1ca Tenlog Shipped Envs 2023-02-28 18:18:00 -05:00
InsanityAutomation ab427804ac Add debug message, reduce ram usage to avoid comm corruption from stack 2023-02-26 15:22:37 -05:00
InsanityAutomation 3a4d705308 Update Configuration.h 2023-02-25 13:31:13 -05:00
InsanityAutomation 56ee00f354 Minor tweak, fix fan speed input 2023-02-24 15:34:06 -05:00
InsanityAutomation f434f368ac Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2023-02-22 19:13:58 -05:00
InsanityAutomation 1d9cf20d4b Merge pull request #295 from bob-anthony/DGUS_DISPLAY_FIXES
Fix compiling errors for DGUS displays
2023-02-22 19:13:58 -05:00
Tom Brazier 313014515c MIN_ISR_LOOP_CYCLES already includes ISR_[XY]_STEPPER_CYCLES and more, it should not be counted 2023-02-22 19:13:58 -05:00
Tom Brazier 11d9bb4a66 Don't include MIN_ISR_LOOP_CYCLES in calculation for ISR_SHAPING_LOOP_CYCLES if input shaping is disabled 2023-02-22 19:13:58 -05:00
Tom Brazier 7591c8661f Also implement 2 cycle saving in MultiU24X32toH16() 2023-02-22 19:13:58 -05:00
Tom Brazier 456b0a4011 Fixed rounding of fractional part of multiplication results (a bug inherited from Sprinter). Cleaned up comments and function naming. Minor optimisation of MultiU8X16toH16(). 2023-02-22 19:13:58 -05:00
InsanityAutomation 67d6f2f877 circle around as upstream never merged 2023-02-19 17:53:32 -05:00
InsanityAutomation 5e10f6d8d1 Slightly more robust pause resume and faster serial event handling 2023-02-19 15:23:27 -05:00
InsanityAutomation 8a30019a18 Update README.md 2023-02-17 17:25:17 -05:00
InsanityAutomation 686fe6fe74 Patch version string 2023-02-15 19:17:03 -05:00
InsanityAutomation 8ece5bcbee Update Version.h 2023-02-14 23:29:30 -05:00
InsanityAutomation ae9fe880f8 Recompress ScreenICL 2023-02-14 23:21:29 -05:00
InsanityAutomation 9c48d93a36 Binaries now identify machine and options in version info 2023-02-13 10:29:11 -05:00
InsanityAutomation fad005fdc2 Readme and Version info 2023-02-12 12:56:09 -05:00
InsanityAutomation 0cf916ce13 Updated binaries 2023-02-11 13:35:20 -05:00
InsanityAutomation 0a54b35981 Updated screen configs, added low res/high res envs 2023-02-11 12:45:28 -05:00
InsanityAutomation 47c0dc631c Make high res screen default, add high res dwin fileset 2023-02-05 13:39:17 -05:00
InsanityAutomation 5c39469b94 Config tweaks and updated TFT files for low res screens 2023-02-04 11:57:05 -05:00
InsanityAutomation 8ea02e3ede add casting for handler 2023-02-03 17:40:47 -05:00
InsanityAutomation a33f7ddc8c Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2023-02-03 15:35:23 -05:00
InsanityAutomation 462b586c76 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2023-02-03 15:31:34 -05:00
InsanityAutomation 1bab76a98a Revert "Fix for Nema23 CNC driver on D6"
This reverts commit c43d064122.
2023-02-03 15:20:11 -05:00
InsanityAutomation 25de1facb5 more work on dint type for offsets 2023-02-03 15:20:03 -05:00
InsanityAutomation c43d064122 Fix for Nema23 CNC driver on D6 2023-02-03 15:19:40 -05:00
InsanityAutomation 5a9736bfa3 add endian swap 2023-02-03 15:19:40 -05:00
InsanityAutomation 359258701f Move writevariables to class with other serial sends 2023-02-03 15:19:40 -05:00
InsanityAutomation 04f5a42c60 Idex offsets to uint32 4 byte 2023-02-03 15:19:40 -05:00
InsanityAutomation 6dc27f6fc0 more work on dint type for offsets 2023-02-03 15:19:08 -05:00
InsanityAutomation b010d0782f Fix for Nema23 CNC driver on D6 2023-02-03 15:18:42 -05:00
InsanityAutomation 6fd0c3f6a8 add endian swap 2023-01-24 20:38:53 -05:00
InsanityAutomation 8f7735655e Move writevariables to class with other serial sends 2023-01-24 20:28:35 -05:00
InsanityAutomation 5f431c140f Idex offsets to uint32 4 byte 2023-01-24 20:21:08 -05:00
InsanityAutomation 23f580bd03 Idex offsets to uint32 4 byte 2023-01-24 20:20:31 -05:00
InsanityAutomation 2752234e14 large rom enable IS 2022-12-04 14:21:12 -05:00
ellensp c87943cff1 better 2022-12-04 12:24:05 -05:00
ellensp 661abff6e6 use uint32_t not int
fixes issue https://github.com/MarlinFirmware/Marlin/issues/25018
2022-12-04 12:24:05 -05:00
kisslorand 7e0478c97d Fix commit 3ba9387 2022-12-04 12:23:04 -05:00
Tom Brazier a0ed4d51bc Input shaping buffer size metaprogramming for disctict E axes 2022-12-04 12:22:35 -05:00
Tom Brazier 005019b82d Better error message 2022-12-04 12:22:35 -05:00
Tom Brazier 55d943e9d2 Make it possible to override the shaping buffer size calculations in confg.
Also potential SRAM reduction when not using ADAPTIVE_STEP_SMOOTHING on 32 bit MCUs.
2022-12-04 12:22:35 -05:00
InsanityAutomation f3e8919552 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-12-04 11:46:46 -05:00
InsanityAutomation 2bd9bcf61b Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-11-28 15:01:14 -05:00
InsanityAutomation 3ec124f417 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-29 19:42:55 -04:00
InsanityAutomation c5263830d8 Update planner.cpp 2022-10-18 16:51:02 -04:00
InsanityAutomation 050e0db3a3 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-18 16:42:19 -04:00
InsanityAutomation f8f918590c Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-10-16 15:05:28 -04:00
InsanityAutomation 5d56a71423 Update Creality_DWIN.cpp 2022-10-10 14:38:29 -04:00
InsanityAutomation 93b664182e Final tweaks and add binaries 2022-09-17 16:10:08 -04:00
InsanityAutomation e0990f1b65 Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2022-09-17 12:12:13 -04:00
InsanityAutomation 0a55425552 Revert "️ Minor planner optimization (#24737)"
This reverts commit d5cf0b3348.
2022-09-17 12:03:16 -04:00
InsanityAutomation 47c0c7072a Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-09-15 11:21:48 -04:00
InsanityAutomation beb163a183 Update stm32f1-maple.ini 2022-09-15 10:40:31 -04:00
InsanityAutomation cd67b87f22 Update Configuration_adv.h 2022-09-01 14:35:45 -04:00
InsanityAutomation e5f087bd98 adjust envs 2022-08-23 19:29:00 -04:00
InsanityAutomation 1fcad0b87c platform tweaking 2022-08-23 19:28:48 -04:00
InsanityAutomation bf698efc93 Remove no longer needed silent builds 2022-08-20 15:18:03 -04:00
InsanityAutomation f0e950db72 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-08-20 15:17:46 -04:00
InsanityAutomation 200a3957d9 idex updates 2022-07-29 09:33:17 -04:00
InsanityAutomation b243c67de2 Update Configuration.h 2022-07-23 17:19:51 -04:00
InsanityAutomation 20d107adf2 Update Creality_DWIN.cpp 2022-07-23 17:19:48 -04:00
InsanityAutomation 5e3c15bd39 Update Creality_DWIN.h 2022-07-19 22:32:04 -04:00
InsanityAutomation 05cbeef2c6 Update pins_TENLOG_D3_HERO.h 2022-07-19 13:49:17 -04:00
InsanityAutomation 2ab4b9bd13 Update Creality_DWIN.cpp 2022-07-19 13:49:10 -04:00
InsanityAutomation 1cc33f318c Delete binaries 2022-07-19 13:48:59 -04:00
InsanityAutomation 78e3a829ba Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN 2022-07-18 18:55:53 -04:00
InsanityAutomation 60dc55c3bf Use raw positions for G34 probing to honor M206 offsets 2022-07-17 21:02:39 -04:00
thisiskeithb ef12aa5a6c Fix ProUI with Leveling 2022-07-17 21:01:31 -04:00
Tom Brazier b8f90b2d71 Give correct hints to the planner when drawing arcs 2022-07-17 21:01:01 -04:00
Tom Brazier ee91c915ee Return FLOOR() on the offchance that a float rounding error results in a slightly negative decelerate_steps_float 2022-07-17 21:01:01 -04:00
InsanityAutomation e7fac26f2b Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-07-17 20:58:41 -04:00
InsanityAutomation e66a2fdbf4 Update Configuration.h 2022-07-17 20:43:31 -04:00
InsanityAutomation f96a4a53ef IDEX Support initial commit 2022-07-17 20:43:12 -04:00
InsanityAutomation 096c146f16 Start adding more SKR boards, starting with SKRMiniV3 2022-07-17 20:42:52 -04:00
InsanityAutomation 5111e8d3a3 Update rev number and upstream merge revisions 2022-07-17 20:40:27 -04:00
InsanityAutomation 775850a245 Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding 2022-07-15 10:37:36 -04:00
InsanityAutomation 8401c6d267 Allow Portrait display with no leveling 2022-06-02 09:17:06 -04:00
InsanityAutomation bdeceae5b4 Update temp calls to honor active tool 2022-05-21 13:37:51 -04:00
InsanityAutomation c6ace0d4a5 tweaks 2022-05-21 13:19:16 -04:00
InsanityAutomation e9c9f07b8b Initial config import from luxuri and first pass sweep for issues 2022-05-21 12:55:02 -04:00
InsanityAutomation 8386ae0f4d generalize, and prep 2022-05-17 21:13:04 -04:00
InsanityAutomation 1c194d4e16 Update CR6E3 Touchscreen 2022-05-16 17:41:37 -04:00
InsanityAutomation fb5ee94263 New bins 2022-05-15 19:35:20 -04:00
InsanityAutomation 7bfcba1cf7 Update Configuration.h 2022-05-15 11:00:11 -04:00
InsanityAutomation 147cda7c1d Add E3S1_F4 2022-05-14 20:10:09 -04:00
InsanityAutomation 6016ef7ba1 Update Configuration_adv.h 2022-05-13 20:52:28 -04:00
InsanityAutomation a82e3147fd Adjust startup delay for fast machines with higher res displays 2022-05-13 19:54:23 -04:00
Scott Lahteine fa73edd76a Add BOARD_CREALITY_V24S1_301F4
Co-Authored-By: Miguel Risco-Castillo <mriscoc@users.noreply.github.com>
2022-05-13 11:11:41 -04:00
InsanityAutomation 591a42cdd0 Update G29.cpp 2022-05-08 18:01:38 -04:00
InsanityAutomation 6b74e0f142 Update pins_CREALITY_V25S1.h 2022-05-08 18:01:34 -04:00
InsanityAutomation 4cdec14648 Update Configuration_adv.h 2022-05-08 18:01:23 -04:00
InsanityAutomation e4e9f01bf0 More smart pro tweaks 2022-05-08 17:33:13 -04:00
InsanityAutomation 01ef9afdd0 CR10Smart Pro Configs 2022-05-08 14:41:54 -04:00
InsanityAutomation 21f8741982 Add Creality CR10SmartPro Support 2022-05-08 14:41:27 -04:00
InsanityAutomation fa80adf92c Update cr10 max builds to 470mm 2022-05-07 11:45:43 -04:00
InsanityAutomation 9e4cce23d4 Update Configuration.h 2022-05-04 15:07:04 -04:00
InsanityAutomation 868967d08c Updated bins compressed 2022-05-01 14:53:00 -04:00
InsanityAutomation 48dc25407e Update Creality_DWIN.cpp 2022-05-01 12:35:05 -04:00
InsanityAutomation b88833a1cd More pause tweaks 2022-04-30 21:29:39 -04:00
InsanityAutomation 391a07b2bf Pause improvements 2022-04-30 16:33:19 -04:00
InsanityAutomation c8faaca998 Update Creality_DWIN.cpp 2022-04-30 12:02:26 -04:00
InsanityAutomation 01ab324a12 advanced pause improvements 2022-04-30 10:22:52 -04:00
InsanityAutomation 00152be921 bin revision 2022-04-28 08:14:04 -04:00
InsanityAutomation be5078f8ab Update Configuration.h 2022-04-26 23:49:21 -04:00
InsanityAutomation cacdb2d818 update startup logo 2022-04-26 23:26:51 -04:00
InsanityAutomation 3553ef4c00 Set default runout mode to lerge and sprite to dd retraction 2022-04-26 23:24:16 -04:00
InsanityAutomation 64cf8316e1 Update dgus_creality_lcd.cpp 2022-04-26 22:58:30 -04:00
InsanityAutomation b6ad2db3a9 Add binary relocate function to avoid random pio purging 2022-04-26 14:18:13 -04:00
InsanityAutomation 47222bcdde Update platformio.ini 2022-04-25 11:10:49 -04:00
InsanityAutomation 22f2a8baa7 Add updated binaries 2022-04-25 11:07:52 -04:00
InsanityAutomation 08b92c3d1c Bump version, tweak accels 2022-04-23 10:48:43 -04:00
InsanityAutomation 474111f1c9 Minor touchups from last rebase 2022-04-22 09:11:22 -04:00
InsanityAutomation b35125e1a2 Update Configuration_adv.h 2022-04-20 17:33:48 -04:00
InsanityAutomation 3a1646b2e8 Update Configuration_adv.h 2022-04-18 14:50:05 -04:00
InsanityAutomation b99b6250ee Update Configuration.h 2022-04-18 14:48:31 -04:00
InsanityAutomation 947ee4560e E2Pro no runout stock 2022-04-15 16:09:23 -04:00
InsanityAutomation 11a0186b35 Update for extui recent changes 2022-04-15 16:08:29 -04:00
InsanityAutomation db74ac3ce1 Disable 100x multiplier for dwin marlinui 2022-04-15 13:13:46 -04:00
InsanityAutomation 2b46761060 minor tweaks 2022-04-15 13:03:32 -04:00
InsanityAutomation 97e1768ffe Remove extra screen refreshes and obsolete box 2022-04-09 17:16:56 -04:00
InsanityAutomation 8e83784656 Update dwin.cpp 2022-04-08 20:05:10 -04:00
InsanityAutomation 73b0c506e4 Update Configuration.h 2022-04-06 12:48:03 -04:00
InsanityAutomation 4678bb49b9 Update Creality_DWIN.cpp 2022-04-03 14:54:03 -04:00
InsanityAutomation f581502cc4 M591Fixes 2022-04-03 14:53:59 -04:00
InsanityAutomation dfc3007326 Merge branch 'Implement-M591-Configurable-Runout-Sensors' into CrealityDwin2.0_Bleeding 2022-04-03 13:24:30 -04:00
InsanityAutomation 7f691fc5c1 Bump version 2022-04-03 11:33:31 -04:00
InsanityAutomation 01e7a5cb76 Add Ender 2 Pro 2022-04-03 11:28:20 -04:00
InsanityAutomation fa72415812 Add CR10SmartPro First draft
Guess on BLTouch pins as HW not available atm
2022-04-03 10:57:55 -04:00
InsanityAutomation adabc63617 V2 tweaks 2022-03-26 20:08:37 -04:00
InsanityAutomation d8508c5110 Update Configuration.h 2022-03-26 19:46:50 -04:00
InsanityAutomation dae60f4b29 V2 S1 UI Change 2022-03-26 19:46:26 -04:00
InsanityAutomation e16655a011 Fix char overlap V2S1 2022-03-26 19:46:14 -04:00
InsanityAutomation 0d576bb529 Fix marlinui status scroll 2022-03-25 21:53:36 -04:00
InsanityAutomation 61c3d122c9 Fix marlinUI V2 display bootscreen reloading cached BG 2022-03-25 16:39:46 -04:00
InsanityAutomation 123086d14c Fix non probe z offset adjustment 2022-03-25 14:05:55 -04:00
InsanityAutomation 10fd6df83d Update Configuration.h 2022-03-23 09:48:01 -04:00
InsanityAutomation d40750cde8 Non-BLT CR5 2022-03-19 11:49:40 -04:00
InsanityAutomation e1c5f8418d Update Configuration.h 2022-03-06 18:12:11 -05:00
InsanityAutomation 4a0769ec1b allows z offset to work for babystep total on machines without probe 2022-03-06 18:11:43 -05:00
InsanityAutomation 991f21c74c Faster lcd buffer processing 2022-03-04 21:40:55 -05:00
InsanityAutomation 9ebf358b8a Default livemove to true 2022-03-04 21:40:38 -05:00
InsanityAutomation 70c26fd4ca S1 and E3 Touch Updates 2022-03-02 12:37:18 -05:00
InsanityAutomation 9e66a87122 Update .gitignore 2022-02-28 08:49:44 -05:00
InsanityAutomation f177bd32eb Variant and Version Info 2022-02-27 21:07:56 -05:00
InsanityAutomation 8df38008ef Add S1 screen support 2022-02-27 21:02:21 -05:00
InsanityAutomation ec5d623c93 Update README.md 2022-02-27 21:00:27 -05:00
InsanityAutomation aca3184ce4 Add S1 Support 2022-02-27 21:00:23 -05:00
InsanityAutomation 7cda9dbf84 Add Blank BG screen to E3V2 for S1 screen compat 2022-02-27 21:00:04 -05:00
InsanityAutomation 24e8499ef6 Create firmware_Ender7_BLT_DW7.4.5.bin.zip 2022-02-26 18:43:32 -05:00
InsanityAutomation 2abf5f0ad8 Add CR5Pro 2022-02-26 16:00:13 -05:00
InsanityAutomation f6a48f82aa Update README.md 2022-02-25 10:30:31 -05:00
InsanityAutomation c0f0964329 Update README.md 2022-02-25 10:17:42 -05:00
InsanityAutomation 0322dfd76e Update README.md 2022-02-25 10:08:34 -05:00
InsanityAutomation bd967ba7a2 Add smart binary 2022-02-23 11:21:57 -05:00
InsanityAutomation cc1a4f5f70 Update binaries 2022-02-19 19:15:25 -05:00
InsanityAutomation d43c557404 Readme and DWIN updates 2022-02-19 12:23:30 -05:00
InsanityAutomation c4ba4600dc Update Configuration_adv.h 2022-02-18 15:13:37 -05:00
InsanityAutomation 0bbc122475 Trim out processing page to save space 2022-02-15 09:51:13 -05:00
InsanityAutomation 1868db82aa Cleanup 2022-02-13 14:57:45 -05:00
InsanityAutomation 23091e566b fix overlapping platforms 2022-02-12 13:37:07 -05:00
InsanityAutomation 0ac94f6a2f Platform tweaks 2022-02-11 22:11:56 -05:00
InsanityAutomation 3d804bd314 Block LCD Reinit for ExtUI 2022-02-11 22:11:31 -05:00
InsanityAutomation e0de16f3a8 UpdateVersion 2022-02-06 12:01:38 -05:00
InsanityAutomation 7421731eed ReviseENVsToRC 2022-02-06 12:01:28 -05:00
InsanityAutomation 43bc8c3865 AddToggles 2022-02-06 12:01:08 -05:00
InsanityAutomation c13d290934 FixMapleHalCompileErrors 2022-02-06 12:00:42 -05:00
InsanityAutomation 49eb72816e AddGenericMapleRC_ENV 2022-02-06 12:00:17 -05:00
InsanityAutomation ec0c72e2f0 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2022-02-05 11:04:35 -05:00
InsanityAutomation ff221cdacd Update Creality_DWIN.h 2022-02-05 10:25:04 -05:00
InsanityAutomation af177e719e Add PLR to ext_ui 2022-01-13 17:53:02 -05:00
InsanityAutomation c713b14143 CR30 and Smart improvements 2022-01-13 08:34:53 -05:00
InsanityAutomation 44c21f477e Update Creality_DWIN.cpp 2022-01-08 16:32:53 -05:00
InsanityAutomation 9f2e0238df Add ENV 2022-01-08 16:32:53 -05:00
InsanityAutomation fd72d771e6 Update Configuration.h 2022-01-08 16:32:53 -05:00
InsanityAutomation dc1a4080db Update Creality_DWIN.cpp 2022-01-03 11:40:33 -05:00
InsanityAutomation 1e3cd5ca8b Add ENV 2022-01-03 11:05:57 -05:00
InsanityAutomation 09f1c97c6e move to maple again 2022-01-03 10:50:14 -05:00
InsanityAutomation 13b16b4062 Add CR10Smart, CR6 fix 2022-01-03 10:47:11 -05:00
InsanityAutomation 92a7943d4e Update README.md 2021-11-26 13:27:30 -05:00
InsanityAutomation 448abd5de2 Fix stale screen build 2021-11-22 11:22:43 -05:00
InsanityAutomation 37f4924ac1 Fixed binaries 2021-11-21 15:31:30 -05:00
InsanityAutomation 1c269eda1e Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-11-21 15:28:50 -05:00
InsanityAutomation d8573b97eb Update Creality_DWIN.cpp 2021-11-21 15:27:08 -05:00
InsanityAutomation 5a94a8e1c0 Update Configuration.h 2021-11-20 12:55:37 -05:00
InsanityAutomation e067dc4713 Updated binaries 2021-11-17 16:41:08 -05:00
InsanityAutomation 1f6da0c1b4 Add ender 5 32b envs 2021-11-17 09:04:14 -05:00
InsanityAutomation 8bb4484af5 clear old binaries, add 32 bit filament runout envs 2021-11-17 08:59:33 -05:00
InsanityAutomation 6cc524dd50 Update Ender3V2_Dwin_TM3DV2.7z 2021-11-14 14:20:50 -05:00
InsanityAutomation 728539bb23 Revert "Revert "v2 jyers update""
This reverts commit a67b346523.
2021-11-14 14:11:29 -05:00
InsanityAutomation a67b346523 Revert "v2 jyers update"
This reverts commit a3e960c251.
2021-11-14 12:15:11 -05:00
InsanityAutomation 4b767d7623 bump version 2021-11-14 12:15:02 -05:00
InsanityAutomation 7e149b2532 Build script indentation fixes 2021-11-13 09:45:02 -05:00
InsanityAutomation 3b7b4b48d8 tm3d progress bar location 2021-11-13 09:44:49 -05:00
InsanityAutomation 49fd9bdb77 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-11-11 21:23:58 -05:00
InsanityAutomation 5bcf64f17c Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-11-11 21:17:23 -05:00
InsanityAutomation a3e960c251 v2 jyers update 2021-11-11 21:17:16 -05:00
InsanityAutomation a7696f32fd Tweak accel multipliers, move to stm32 common lib 2021-11-07 10:29:11 -05:00
tome9111991 b4d3f03a26 🐛 Fix SHOW_REMAINING_TIME option for JyersUI (#22999) 2021-11-04 17:28:53 -04:00
ellensp 42c6324f68 🐛 Fix E3V2 width/height defines (#22994) 2021-11-04 17:28:04 -04:00
Dennis 4d15eb94e4 🐛 Fix JyersUI current positions (scaling) (#23005) 2021-11-04 17:27:16 -04:00
InsanityAutomation 3d688fc324 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-11-04 17:25:43 -04:00
InsanityAutomation 58e54f6746 Ender 7 tuning, sermoon fixes, jyersui fixes, finish jerk/accel dwin 2021-11-04 17:25:36 -04:00
InsanityAutomation bf7a48ed31 Update Creality_DWIN.cpp 2021-10-30 10:40:52 -04:00
InsanityAutomation dc52c64424 Update Configuration.h 2021-10-30 10:40:49 -04:00
InsanityAutomation 0e29cd8cc5 Update Configuration.h 2021-10-26 18:38:35 -04:00
InsanityAutomation 844fe9b24d Start jerk/accel/travel support 2021-10-25 19:21:18 -04:00
Keith Bennett 2b19dc3232 Octopus Pro V1.0 with STM32F429ZGT6 (#23008) 2021-10-25 01:14:02 -05:00
ellensp f41c78d178 🐛 Fix børken E_DUAL_STEPPER_DRIVERS (#23017) 2021-10-25 01:12:07 -05:00
Miguel Risco-Castillo 6270df927e 🐛 Fix Emder-3 V2 Enhanced SetFlow (#23016) 2021-10-25 01:08:15 -05:00
InsanityAutomation cbcc1bc084 DWINos4 changes 2021-10-23 17:43:40 -04:00
InsanityAutomation ab1d124bf9 Ender 7 preliminary support 2021-10-23 17:43:12 -04:00
InsanityAutomation 5b7215df43 Ender 7 Mainboard Support 2021-10-23 17:42:12 -04:00
InsanityAutomation 44aaa4f042 Update README.md 2021-10-23 08:53:36 -04:00
InsanityAutomation afef0b9dec Update Configuration.h 2021-10-20 10:04:58 -04:00
InsanityAutomation f7767be8a5 Updated binaries 2021-10-18 18:11:03 -04:00
InsanityAutomation 2f5e28dd66 Update Configuration.h 2021-10-18 09:14:29 -04:00
InsanityAutomation 0397d384d2 Fix JyersUI ZOffset Multiplication 2021-10-17 20:02:13 -04:00
InsanityAutomation 212dfb4050 Update platformio.ini 2021-10-17 18:38:11 -04:00
InsanityAutomation 59ff070dba V2 Display Standalone 2021-10-16 19:44:55 -04:00
InsanityAutomation c7af93b39f Update Configuration.h 2021-10-16 18:30:28 -04:00
InsanityAutomation 794ea13ae8 Update Configuration_adv.h 2021-10-16 18:29:14 -04:00
InsanityAutomation 227f014fb5 Update PageHandlers.cpp 2021-10-16 18:29:11 -04:00
InsanityAutomation e22408f3f9 Update DGUSScreenHandler.cpp 2021-10-16 18:29:09 -04:00
InsanityAutomation 9e8e1c1113 CR30 Tweaks 2021-10-16 15:38:32 -04:00
InsanityAutomation 1427290e84 Message fixes, V2 UI Positioning 2021-10-16 12:00:30 -04:00
InsanityAutomation 1c7b232d05 Fix Tool Change Park 2021-10-16 10:44:59 -04:00
InsanityAutomation 005dad193a Updated screen archives 2021-10-15 11:24:18 -04:00
InsanityAutomation 88f502cac5 Bump revision, Add CR30 2021-10-15 10:53:09 -04:00
InsanityAutomation 0cc286757b Update Configuration.h 2021-10-15 09:48:58 -04:00
InsanityAutomation d843e2be2b Merge branch 'BLTouch-HS-Mode-EEPROM' into CrealityDwin2.0_Bleeding 2021-10-15 08:58:45 -04:00
Scott Lahteine cede5b22c9 Use BLTOUCH_HS_MODE for default + editable 2021-10-14 20:35:36 -05:00
Scott Lahteine 43f996d68a Rename bltouch_last_written_mode 2021-10-14 20:04:42 -05:00
Scott Lahteine bd426d40cd Tweak M401 2021-10-14 19:28:39 -05:00
Scott Lahteine 099c329238 Fix LEVEL_CORNERS_USE_PROBE 2021-10-14 19:28:39 -05:00
Scott Lahteine 3db4452d28 settings tweak 2021-10-14 19:28:00 -05:00
InsanityAutomation 385bab2f36 Update settings.cpp 2021-10-14 18:49:12 -04:00
InsanityAutomation 1fab2ef94f Update menu_tramming.cpp 2021-10-14 14:01:42 -04:00
InsanityAutomation 102c43dcd5 Update G35.cpp 2021-10-14 13:50:56 -04:00
InsanityAutomation 5284f45c62 Update menu_tramming.cpp 2021-10-14 13:41:31 -04:00
InsanityAutomation 9aaa7b1100 Add missing include 2021-10-14 13:34:31 -04:00
InsanityAutomation ef661cd295 Update Creality_DWIN.cpp 2021-10-14 13:24:08 -04:00
InsanityAutomation d068769f2c Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-10-13 17:47:30 -04:00
Scott Lahteine a6c4c5a3f7 Update motion.cpp 2021-10-12 22:22:15 -05:00
Scott Lahteine 78c57f2847 Update menu_tramming.cpp 2021-10-12 22:21:43 -05:00
Scott Lahteine 90b0be5e12 Merge 'upstream/bugfix-2.0.x' into pr/22916 2021-10-12 21:45:54 -05:00
Scott Lahteine c24456353f Merge 'upstream/bugfix-2.0.x' into pr/22916 2021-10-12 20:20:28 -05:00
Scott Lahteine ec7a4eb69e clean up and fix 2021-10-09 18:57:38 -05:00
InsanityAutomation 4f62ae9764 Return on mode change without deploying 2021-10-09 14:07:11 -04:00
InsanityAutomation 0cc6955ab7 BLTouch High Speed EEPROM Control 2021-10-09 13:58:25 -04:00
InsanityAutomation 86d2d5d0a8 Update dwin.cpp 2021-10-09 13:09:28 -04:00
InsanityAutomation 5a994f0c9a Update dwin.cpp 2021-10-09 12:15:10 -04:00
InsanityAutomation 39ee694856 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-10-09 12:13:17 -04:00
InsanityAutomation 10a16c8c75 Sermoon updates 2021-10-08 14:06:57 -04:00
InsanityAutomation aa2763442e Fix E3V2 M600 resume 2021-09-28 09:25:29 -04:00
InsanityAutomation f44a11f5ff Add SermoonD1 preliminary 2021-09-22 17:02:47 -04:00
InsanityAutomation 7748fa84dd Catchup debug messages 2021-09-15 22:44:33 -04:00
InsanityAutomation cb506ec639 Update Configuration.h 2021-09-15 08:08:15 -04:00
InsanityAutomation 5e4f7516c1 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-09-14 10:25:27 -04:00
InsanityAutomation 6443790c6f Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-09-10 10:41:08 -04:00
InsanityAutomation 9a238fa7f9 Add e3 options for CR6 touch 2021-08-22 19:37:55 -04:00
InsanityAutomation 723fc88e78 Updates to support ExtUI advanced pause messaging 2021-08-21 14:17:34 -04:00
InsanityAutomation 4b4a4ba163 AdvancedPauseExtUIMessaging 2021-08-21 14:17:19 -04:00
InsanityAutomation 57250c8340 Updates for CR6 Screen resume function 2021-08-13 13:32:46 -04:00
InsanityAutomation 6bf069d1ab Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-07-21 18:39:25 -04:00
InsanityAutomation 1921015d1f Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-21 18:30:14 -04:00
InsanityAutomation 24f3400c46 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-19 15:35:57 -04:00
InsanityAutomation b8c9e823ca Update Configuration.h 2021-07-19 12:18:10 -04:00
InsanityAutomation 6f4b2ce4a2 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-13 17:01:45 -04:00
InsanityAutomation ef85eeed2a Minor tweaks 2021-07-13 16:50:08 -04:00
Katelyn Schiesser cd98d0cf5c 🐛 Followup to TEMP_SENSOR_BOARD (#22344)
Followup to #22279
2021-07-12 22:57:01 -05:00
InsanityAutomation 6f57a7311c Update marlinui.cpp 2021-07-08 09:57:59 -04:00
InsanityAutomation dc19c60a0e Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-07-07 17:50:24 -04:00
InsanityAutomation 38c79a4585 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-07 10:15:40 -04:00
InsanityAutomation 541e074f97 Merge branch 'CrealityDwin_2.0' into CrealityDwin2.0_Bleeding 2021-07-07 10:12:11 -04:00
InsanityAutomation 2a01b8ea62 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-07-05 13:06:44 -04:00
InsanityAutomation 38fd3782f9 Ender6 BLT Fix 2021-07-03 14:43:04 -04:00
InsanityAutomation f5cfc65c1d Ender6 BLTouch Fix 2021-07-03 12:51:14 -04:00
InsanityAutomation 00f3397cad Create Creality_CR6DWIN_DW74.7z 2021-07-01 11:15:20 -04:00
InsanityAutomation 8e6f5f90c5 Update TM3D_DWINCombinedScreens_V4.7z 2021-06-30 09:54:46 -04:00
InsanityAutomation db0b14d97e fix 2021-06-28 18:45:23 -04:00
Katelyn Schiesser 84158b912b 🐛 Use setTargetHotend in menus (#22247) 2021-06-28 00:30:11 -05:00
InsanityAutomation 21f8c8d7f8 Fix precompiled bins 2021-06-27 22:56:19 -04:00
InsanityAutomation e2363dc64c Update hex files for screen rotate 2021-06-25 19:06:23 -04:00
InsanityAutomation 1f439cd89a Update Configuration.h 2021-06-25 12:04:47 -04:00
InsanityAutomation f3ddc1f8b6 Add screen rotate PB 2021-06-25 12:03:59 -04:00
InsanityAutomation 223971c47f Update Configuration.h 2021-06-25 12:03:40 -04:00
InsanityAutomation c2eeda01de Add screen rotate PB 2021-06-25 11:49:28 -04:00
InsanityAutomation 5ea4241ea3 Simplify conditions and reorder 2021-06-23 20:22:25 -04:00
InsanityAutomation 04845c80e9 Simplify conditions and reorder 2021-06-23 20:22:17 -04:00
InsanityAutomation 8194b7f5fc Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-06-23 19:20:14 -04:00
InsanityAutomation e735948969 Update TM3D_DWINCombinedScreens_V4.7z 2021-06-23 19:09:59 -04:00
InsanityAutomation 634ddeef7e Update 32 bit bins 2021-06-21 17:08:49 -04:00
Scott Lahteine ea78c6bf61 🐛 Fix compact sensitive pins array (#22184) 2021-06-21 16:11:51 -04:00
InsanityAutomation b52168e37c Binaries, Readme 2021-06-21 16:10:42 -04:00
InsanityAutomation ba7368ce3a Repack screen files, update readme 2021-06-20 22:20:28 -04:00
InsanityAutomation 69d06dd872 Update README.md 2021-06-20 20:12:22 -04:00
InsanityAutomation a92b627d00 remove stale files 2021-06-20 18:17:36 -04:00
InsanityAutomation b9aa338c19 Update platformio.ini 2021-06-20 17:43:09 -04:00
InsanityAutomation 27e105b890 Add toggle option for probe pin on 422/427 2021-06-20 17:27:15 -04:00
InsanityAutomation 494a9a90bb Cleanup and limit adjustment 2021-06-20 17:15:33 -04:00
InsanityAutomation d876e6b80a Add combined screen files 2021-06-20 10:46:59 -04:00
InsanityAutomation 97da6e97b9 add zig to mesh update 2021-06-19 15:02:20 -04:00
InsanityAutomation 671ab75bce Updates for mesh edit 2021-06-19 14:04:42 -04:00
InsanityAutomation 6a98f4e1be Add CR10V3 description, eliminate crx display, minor additions 2021-06-19 10:32:54 -04:00
InsanityAutomation dd86d60a32 Catchup to head 2021-06-18 19:15:34 -04:00
InsanityAutomation 706260d39f Update pause.cpp 2021-06-18 00:12:37 -04:00
InsanityAutomation bae9d18ee9 Update Creality_DWIN.cpp 2021-06-18 00:10:59 -04:00
InsanityAutomation df31aa486e Add Pause State to ExtUI 2021-06-18 00:10:55 -04:00
InsanityAutomation 9a4d0fec6c Fixes from last rebase 2021-06-17 22:13:41 -04:00
InsanityAutomation b1f96cf4f7 Rebase fixes 2021-06-17 00:19:22 -04:00
InsanityAutomation 916aaa4881 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-16 17:04:50 -04:00
InsanityAutomation 4a4820d84f Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-16 17:00:36 -04:00
InsanityAutomation 8eeea354cd Update Configuration.h 2021-06-16 17:00:23 -04:00
InsanityAutomation b26e53156f Update Configuration.h 2021-06-16 16:17:40 -04:00
InsanityAutomation ce46fafd92 Update serial.h 2021-06-15 22:14:10 -04:00
InsanityAutomation 7d9ee39285 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-15 01:21:18 -04:00
InsanityAutomation bf8074c108 definerename 2021-06-14 23:46:40 -04:00
Marcio T dd82d2d217 🐛 Fix FTDI Eve Touch UI, add screens (#22132) 2021-06-14 02:46:50 -05:00
Scott Lahteine 1ee599a2ba 🚨 Suppress pin sign-change warning 2021-06-14 02:43:24 -05:00
InsanityAutomation 8adb58c266 Finish screen config controls 2021-06-14 01:21:19 -04:00
InsanityAutomation 173b0f8bd1 EEPROM settings for volume and brightness 2021-06-13 16:46:37 -04:00
InsanityAutomation e77f6d855b Update EXTUI on MBL 2021-06-12 15:41:43 -04:00
InsanityAutomation 23ce68436a Last bit of Ender 6 manual mesh debug 2021-06-12 15:41:33 -04:00
InsanityAutomation 6e15859ce2 Misc fixes 2021-06-12 14:56:43 -04:00
InsanityAutomation e76f769690 Minor debugging and platform changes 2021-06-12 10:21:41 -04:00
InsanityAutomation 0a2ba2fadf Add EXTUi Click function 2021-06-12 08:54:39 -04:00
InsanityAutomation 37d5f55396 Add cr6 screen files 2021-06-12 08:54:23 -04:00
InsanityAutomation eca2080a3f Add manual mesh to leveling screens 2021-06-12 08:21:17 -04:00
InsanityAutomation d2fc1daf50 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-11 15:42:13 -04:00
InsanityAutomation 782fe78ea0 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-11 15:40:38 -04:00
InsanityAutomation 084c45a6ee Update Configuration.h 2021-06-11 11:04:07 -04:00
InsanityAutomation 94d8fc8e8a CR6Max 2021-06-11 11:02:13 -04:00
InsanityAutomation 491d82f93e Add CR6 definitions 2021-06-11 10:55:43 -04:00
InsanityAutomation 49fd0950ee Update Configuration_adv.h 2021-06-11 09:14:32 -04:00
InsanityAutomation 06425bf4b7 Ender6 First Pass 2021-06-07 09:54:54 -04:00
InsanityAutomation e9660aeed7 Rebase fixes 2021-06-06 13:20:25 -04:00
InsanityAutomation 6480f0939d Add Ender3 Max 2021-06-06 12:27:14 -04:00
InsanityAutomation d0e9c21aff Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-06-06 12:03:26 -04:00
InsanityAutomation 63d1ae1021 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-06 11:53:30 -04:00
InsanityAutomation 5a4b2ba5c5 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-06-05 16:51:34 -04:00
InsanityAutomation a80c371340 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-25 09:22:13 -04:00
InsanityAutomation 6d39a6fc55 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-23 15:06:33 -04:00
InsanityAutomation 02fe3a6818 Update Ender3V2_Dwin_TM3D.7z 2021-05-16 15:58:17 -04:00
InsanityAutomation be44105ae9 Update Ender3V2_Dwin_TM3D.7z 2021-05-16 15:57:41 -04:00
InsanityAutomation 10e5d92dec Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-16 14:18:43 -04:00
InsanityAutomation 2e11485da4 Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-06 11:55:25 -04:00
InsanityAutomation d305f0a14b Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-05-05 09:46:59 -04:00
Scott Lahteine 5f30e9fe1c Add MKS_LCD12864B 2021-05-05 08:04:04 -05:00
Scott Lahteine 80c8218d94 Add MKS_LCD12864B 2021-05-05 07:23:52 -05:00
Scott Lahteine bed2bfdc24 Misc comments 2021-05-05 07:18:05 -05:00
Scott Lahteine 6f2967a8dc Cleanup, hex formatting 2021-05-05 06:34:02 -05:00
InsanityAutomation 6496cedc17 Update README.md 2021-05-04 14:42:49 -04:00
InsanityAutomation 7b01993bbc Fix link 2021-05-04 14:42:33 -04:00
InsanityAutomation 07a1b00a25 Version bump for rebase to head 2021-05-04 11:56:18 -04:00
InsanityAutomation 7325d66de5 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-05-04 11:08:03 -04:00
InsanityAutomation 865737345f Update Configuration.h 2021-05-04 10:58:53 -04:00
InsanityAutomation dfa6c2f4f1 Update Configuration.h 2021-04-30 21:20:51 -04:00
InsanityAutomation 0a2f0cca93 Thermistor priority issue 2021-04-30 21:20:07 -04:00
InsanityAutomation dbbdf11d75 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-30 14:06:57 -04:00
InsanityAutomation 6430489e21 zip er up 2021-04-30 12:25:48 -04:00
InsanityAutomation 04d4fca75d Next batch 2021-04-30 09:02:05 -04:00
InsanityAutomation 486cf92c5c Set3 2021-04-30 00:39:59 -04:00
InsanityAutomation 820aff4e7c Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-04-29 23:16:15 -04:00
InsanityAutomation 120da68133 Batch 2 hex files 2021-04-29 23:11:16 -04:00
InsanityAutomation 747e21ee3e First batch 731 hex files 2021-04-29 23:10:41 -04:00
InsanityAutomation 53e8c005b7 Update Configuration_adv.h 2021-04-29 10:02:01 -04:00
InsanityAutomation ef01aecd47 Update screen file 2021-04-28 19:40:11 -04:00
InsanityAutomation 6ff92f3215 dw7.3.1 changes 2021-04-28 19:25:30 -04:00
InsanityAutomation ba5bab1a3a Update README.md 2021-04-28 10:53:41 -04:00
InsanityAutomation af0b39982b resolve bad merge 2021-04-28 10:39:32 -04:00
InsanityAutomation 680135583a Update ui_api.cpp 2021-04-28 10:36:40 -04:00
InsanityAutomation bdc256c048 Merge pull request #180 from oliof/patch-1
Update README.md
2021-04-26 23:32:24 -04:00
InsanityAutomation 0948c589d6 Merge branch 'CrealityDwin_2.0' into patch-1 2021-04-26 23:32:07 -04:00
InsanityAutomation fbf069ebe0 Remove leftover stale files 2021-04-26 10:34:33 -04:00
InsanityAutomation 160f8ef0bc Update platformio.ini 2021-04-26 08:25:12 -04:00
InsanityAutomation 93ecbfa88c Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-26 08:24:22 -04:00
InsanityAutomation 19d004b342 Update README.md 2021-04-25 12:44:58 -04:00
InsanityAutomation 8b67e72afc Update README.md 2021-04-25 12:20:41 -04:00
InsanityAutomation 9c863b1c67 Update README.md 2021-04-25 12:12:24 -04:00
InsanityAutomation e4c4acbcc5 Add hex Remainder 2021-04-25 00:23:56 -04:00
InsanityAutomation 7dd2fe3f6c Add first bundle HEX 2021-04-24 19:29:09 -04:00
InsanityAutomation a399028c77 Update platformio.ini 2021-04-24 17:36:29 -04:00
InsanityAutomation 840beb78be Update README.md 2021-04-24 12:37:43 -04:00
InsanityAutomation 1181724b2b Update screen archives and remove stale hexs 2021-04-24 12:27:09 -04:00
InsanityAutomation 227aac34a2 Update Creality_DWIN.cpp 2021-04-22 16:49:31 -04:00
InsanityAutomation ecb6e215c5 Update Creality_DWIN.cpp 2021-04-22 16:07:32 -04:00
InsanityAutomation 8f09db27bd file browse page display 2021-04-22 14:49:26 -04:00
InsanityAutomation 39e4ae2d7a Working 2021-04-21 19:08:16 -04:00
InsanityAutomation 8c181685d2 First sweep 2021-04-20 11:23:25 -04:00
InsanityAutomation 4f2730b6f8 Update Creality_DWIN.h 2021-04-19 22:52:18 -04:00
InsanityAutomation bc12ada74d 422 and 427 adjustments 2021-04-19 17:50:31 -04:00
InsanityAutomation 7e97639e38 Update Version.h 2021-04-18 17:00:19 -04:00
InsanityAutomation c217fd3e66 Update Creality_DWIN.cpp 2021-04-18 16:16:30 -04:00
InsanityAutomation 6f69a30435 Reduce ram usage, convert to PSTRs, move serial to LCDSERIAL base 2021-04-18 13:15:00 -04:00
InsanityAutomation 96d880e745 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-18 12:06:36 -04:00
InsanityAutomation d768f875ac Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x 2021-04-18 12:06:26 -04:00
InsanityAutomation 02d54b9ce7 Update Configuration.h 2021-04-18 12:05:26 -04:00
Scott Lahteine 7070628ef9 Misc. formatting, serial out 2021-04-13 21:34:21 -05:00
InsanityAutomation 1a89a43532 Update platformio.ini 2021-04-12 21:04:46 -04:00
InsanityAutomation 25faa304ee fix ret6 builds 2021-04-11 19:36:37 -04:00
InsanityAutomation 18a0f68ac0 Add hex files 2021-04-09 12:13:42 -04:00
InsanityAutomation 7262ad3fc4 Add CRXPro autobuilds 2021-04-09 12:06:38 -04:00
InsanityAutomation b456959b97 Add CRXPro autobuilds 2021-04-09 10:47:54 -04:00
InsanityAutomation d20182aa91 Some catch up and a look at SKRe3T E3V2 support 2021-04-08 10:50:06 -04:00
InsanityAutomation dc86dd9fae Update platformio.ini 2021-04-07 11:56:28 -04:00
InsanityAutomation e887033c0d Per AJ/Chris add home and Z0 post G29 measuring button 2021-04-07 11:26:38 -04:00
Scott Lahteine d786ba1773 Reimplement reverted PR from testing 2021-04-07 11:18:37 -04:00
InsanityAutomation 3f0a4cfe25 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-07 11:12:35 -04:00
InsanityAutomation 442327d92e Leftovers 2021-04-03 15:01:38 -04:00
InsanityAutomation 345ac6e8fe Revert "Optimized string-to-number functions (#21484)"
This reverts commit 20d2061f22.
2021-04-03 13:53:44 -04:00
InsanityAutomation 1b47fe8c64 Fix extui build issues, block hotend idle while paused for user, revert type change 2021-04-03 13:35:43 -04:00
InsanityAutomation 67e9ee7bf2 Fix extui build issues, block hotend idle while paused for user, revert type change 2021-04-03 13:35:07 -04:00
InsanityAutomation 7aecff2ba6 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-04-03 12:43:14 -04:00
InsanityAutomation 2e6d7308f6 Add SKRE3Turbo 2021-04-03 12:33:42 -04:00
InsanityAutomation 9c5ee355e8 Merge branch 'CrealityDwin2.0_Bleeding' into CrealityDwin_2.0 2021-04-03 11:11:01 -04:00
InsanityAutomation 656946a0ff Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2021-02-24 09:09:47 -05:00
InsanityAutomation 48e02a3210 Update Creality_DWIN.h 2021-02-24 09:09:13 -05:00
InsanityAutomation 6891ef5d00 Update Configuration.h 2021-02-23 18:41:46 -05:00
InsanityAutomation c392e6bf07 Minor tweaks 2021-02-23 14:28:20 -05:00
InsanityAutomation de564f9b0a add 7.2 hex files 2021-02-19 23:11:46 -05:00
InsanityAutomation c9aab13192 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-02-19 10:17:09 -05:00
Harald Wagener 9ba9f654c4 Update README.md
Add explanation for LR configuration.
2021-02-17 11:29:44 +01:00
InsanityAutomation a13ebba41a Merge pull request #168 from DrDMoney/patch-1
Update Configuration.h
2021-02-11 15:51:21 -05:00
InsanityAutomation b1153cff1e Merge pull request #176 from x13-me/CrealityDwin_2.0
Added Ender 3 to Readme.md
2021-02-11 15:48:59 -05:00
InsanityAutomation 9aa0004de6 Disable broken feature until I can trace it down 2021-02-10 07:39:53 -05:00
InsanityAutomation 3a9f043c58 Update temperature.cpp 2021-02-10 07:26:20 -05:00
InsanityAutomation 80123bfdf2 fix platform 2021-02-10 07:24:51 -05:00
InsanityAutomation 923ce8e1d8 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-02-10 07:09:49 -05:00
InsanityAutomation c72fc3eaec Update platformio.ini 2021-02-06 11:04:09 -05:00
InsanityAutomation 3aa0763f26 Update Creality_DWIN.cpp 2021-02-02 11:17:12 -05:00
InsanityAutomation 96bee60be9 Update dwin.cpp 2021-02-02 09:33:22 -05:00
InsanityAutomation b5df47bdf7 Add missing extui functions 2021-01-31 17:18:06 -05:00
InsanityAutomation c27474f396 Update Version.h 2021-01-31 15:37:45 -05:00
InsanityAutomation 6af2c36c50 Add E3V2 427 Env 2021-01-31 15:31:38 -05:00
InsanityAutomation 577ebc6ba4 Reimplement live move 2021-01-31 15:27:46 -05:00
InsanityAutomation 4b0135c022 Merge branch 'bugfix-2.0.x' into CrealityDwin2.0_Bleeding 2021-01-31 13:27:55 -05:00
x13.me 27e95f2aab Added Ender 3 to Readme.md 2021-01-25 02:18:13 +00:00
InsanityAutomation 247385e94e Update platformio.ini 2021-01-06 19:05:44 -05:00
Daniel Mooney aafa3af088 Update Configuration.h
PSU_ACTIVE_HIGH should be PSU_ACTIVE_STATE

PSU_ACTIVE_STATE set from false to low.
2020-12-12 14:23:00 -06:00
InsanityAutomation 12e230ca30 Update Configuration.h 2020-12-08 21:29:09 -05:00
InsanityAutomation 225a89004b Poweroff kit 2020-12-05 19:36:09 -05:00
InsanityAutomation 0b6aa3cb2d Update Creality_DWIN.cpp 2020-11-10 09:04:21 -05:00
InsanityAutomation e7d3e67dc4 Merge branch 'CrealityDwin2.0_Bleeding' of https://github.com/InsanityAutomation/Marlin into CrealityDwin2.0_Bleeding 2020-11-08 14:14:53 -05:00
InsanityAutomation 8fd37402a3 Bump rev, invert flag 2020-11-08 14:14:07 -05:00
InsanityAutomation 7cf72d5867 Rebase and catchup
add 2130 option for SKR

Update platformio.ini

Add SKRMini and DDX

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Minor adjustments following github issues

Update Creality_DWIN.cpp

Update Configuration_adv.h

Update platformio.ini

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Add SKRMini and DDX

Rebase and catchup

add 2130 option for SKR

Update platformio.ini

Minor adjustments following github issues

Update Creality_DWIN.cpp

Update Configuration_adv.h

Clean up rebase

Update platformio.ini

Update platformio.ini

Add Ender3V2

Update Configuration.h

tweaks for e3v2

Fixes

Add 32 bit Ender3's

eparser and display fixes

MachineEnder3Pro420 -> MachineEnder3Pro422

force silent board for all v4 pcb's

Update Configuration.h

Implement fix from https://github.com/cosmoderp/Marlin/commit/5c8e1e7d4af37e25fb9040dcbf690bbb089948e6

Live axis move and z offset

Update dwin.cpp

Fix info menu screens

borders etc e3v2

Ender 5 SKRMini Tweaks

Update Version.h

Add layer shift rapid correction logic and creality stm32f01 environments for E3V2

changes for melzi to fit

Update Configuration.h

Add DW7 Hex Files

Support 10SPro display on Ender3 422 and 427 boards

Update dwin.cpp

Update Configuration_adv.h

Update Configuration.h
2020-11-08 13:47:02 -05:00
InsanityAutomation 6f5430f00a Update Configuration.h 2020-10-26 10:44:44 -04:00
InsanityAutomation 63821d87f9 Update Configuration_adv.h 2020-10-23 14:57:19 -04:00
InsanityAutomation 50f10fc57f Update dwin.cpp 2020-10-08 15:56:54 -04:00
InsanityAutomation 12180f20e5 Support 10SPro display on Ender3 422 and 427 boards 2020-10-01 21:20:50 -04:00
InsanityAutomation f5dc8d73ee Add DW7 Hex Files 2020-09-26 10:51:50 -04:00
InsanityAutomation 00e3806613 Update Configuration.h 2020-09-24 12:54:05 -04:00
InsanityAutomation 7296538849 changes for melzi to fit 2020-09-24 09:53:13 -04:00
InsanityAutomation 6c4e3e9215 Add layer shift rapid correction logic and creality stm32f01 environments for E3V2 2020-09-21 10:13:07 -04:00
InsanityAutomation 4f050e8dc9 Update Version.h 2020-09-15 16:53:04 -04:00
InsanityAutomation e50e446676 Ender 5 SKRMini Tweaks 2020-09-14 21:38:07 -04:00
InsanityAutomation b795860c5a borders etc e3v2 2020-09-13 22:35:56 -04:00
InsanityAutomation b97b2b9df8 Fix info menu screens 2020-09-13 11:20:52 -04:00
InsanityAutomation c6bdb2cd95 Update dwin.cpp 2020-09-08 07:48:53 -04:00
InsanityAutomation f409cf8c87 Live axis move and z offset 2020-09-07 19:20:22 -04:00
InsanityAutomation fbb75f41c2 Implement fix from https://github.com/cosmoderp/Marlin/commit/5c8e1e7d4af37e25fb9040dcbf690bbb089948e6 2020-09-05 15:13:10 -04:00
InsanityAutomation d560a493b2 Update Configuration.h 2020-09-03 13:31:32 -04:00
InsanityAutomation 0395b7563e force silent board for all v4 pcb's 2020-09-03 13:19:53 -04:00
InsanityAutomation ebd414b3d5 MachineEnder3Pro420 -> MachineEnder3Pro422 2020-09-03 12:37:58 -04:00
InsanityAutomation 0c8bafba38 eparser and display fixes 2020-09-03 12:33:39 -04:00
InsanityAutomation 65d5c57957 Add 32 bit Ender3's 2020-09-03 12:30:06 -04:00
InsanityAutomation b1d667c04a Fixes 2020-09-03 12:03:20 -04:00
InsanityAutomation ee8ea7a0b5 tweaks for e3v2 2020-09-03 12:03:20 -04:00
InsanityAutomation 89ac692bcc Update Configuration.h 2020-09-03 12:03:20 -04:00
InsanityAutomation 88410b3cfe Add Ender3V2 2020-09-03 12:03:20 -04:00
InsanityAutomation 60eb467bfe Update platformio.ini 2020-09-03 12:03:03 -04:00
InsanityAutomation 1c3407ed62 Update platformio.ini 2020-09-03 12:03:03 -04:00
InsanityAutomation 82064d2341 Clean up rebase 2020-09-03 12:03:03 -04:00
InsanityAutomation 16b7cffe0f Update Configuration_adv.h 2020-09-03 12:03:03 -04:00
InsanityAutomation 638bac84cf Update Creality_DWIN.cpp 2020-09-03 12:03:03 -04:00
InsanityAutomation 9d3ad76d50 Minor adjustments following github issues 2020-09-03 12:03:03 -04:00
InsanityAutomation 6edb31f58c Update platformio.ini 2020-09-03 12:02:49 -04:00
InsanityAutomation 01297cab24 add 2130 option for SKR 2020-09-03 12:02:49 -04:00
InsanityAutomation 80fa195db3 Rebase and catchup 2020-09-03 12:02:49 -04:00
InsanityAutomation 052b4387d3 Add SKRMini and DDX 2020-09-03 12:02:34 -04:00
InsanityAutomation dd5481b001 Update platformio.ini 2020-09-03 12:02:14 -04:00
InsanityAutomation 59e1371f89 add 2130 option for SKR 2020-09-03 12:02:13 -04:00
InsanityAutomation 4fdcae6677 Rebase and catchup 2020-09-03 12:02:13 -04:00
InsanityAutomation 1c3dcae659 Update platformio.ini 2020-09-03 12:01:58 -04:00
InsanityAutomation ec425de694 Update Configuration_adv.h 2020-09-03 12:01:58 -04:00
InsanityAutomation 29899e6fe8 Update Creality_DWIN.cpp 2020-09-03 12:01:58 -04:00
InsanityAutomation f7eaa32bc9 Minor adjustments following github issues 2020-09-03 12:01:58 -04:00
InsanityAutomation 508dc26394 Update platformio.ini 2020-09-03 12:01:33 -04:00
InsanityAutomation 600d5922da add 2130 option for SKR 2020-09-03 12:01:33 -04:00
InsanityAutomation a2efee8b7b Rebase and catchup 2020-09-03 12:01:32 -04:00
InsanityAutomation 239e4737a8 Add SKRMini and DDX 2020-09-03 12:01:00 -04:00
InsanityAutomation c8577bc673 Update platformio.ini 2020-09-03 12:00:22 -04:00
InsanityAutomation 3bd2ed7310 add 2130 option for SKR 2020-09-03 12:00:22 -04:00
InsanityAutomation 79414a1398 Rebase and catchup 2020-09-03 12:00:22 -04:00
529 changed files with 14432 additions and 10006 deletions
-29
View File
@@ -1,29 +0,0 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3/.devcontainer/base.Dockerfile
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3.9.0-buster"
FROM python:${VARIANT}
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
RUN pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
RUN platformio update
# To get the test platforms
RUN pip install PyYaml
#ENV PATH /code/buildroot/bin/:/code/buildroot/tests/:${PATH}
-51
View File
@@ -1,51 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3.9.0-buster",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"platformio.platformio-ide",
"marlinfirmware.auto-build",
"editorconfig.editorconfig"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
+3 -3
View File
@@ -21,8 +21,7 @@
# Generated files
_Version.h
bdf2u8g.exe
genpages.exe
bdf2u8g
marlin_config.json
mczip.h
*.gen
@@ -112,7 +111,7 @@ tags
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
@@ -171,3 +170,4 @@ __pycache__
# IOLogger logs
*_log.csv
.vscode/extensions.json
Binary file not shown.
Binary file not shown.
+280 -506
View File
File diff suppressed because it is too large Load Diff
+206 -223
View File
@@ -300,12 +300,12 @@
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 30 // Seconds
#define THERMAL_PROTECTION_PERIOD 20 // Seconds
#define THERMAL_PROTECTION_HYSTERESIS 15 // Degrees Celsius
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP)
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
#if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP)
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T
#endif
/**
@@ -320,7 +320,7 @@
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
* below 2.
*/
#define WATCH_TEMP_PERIOD 210 // Seconds
#define WATCH_TEMP_PERIOD 30 // Seconds
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
#endif
@@ -328,28 +328,37 @@
* Thermal Protection parameters for the bed are just as above for hotends.
*/
#if ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 300 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
#if ENABLED(MachineTLD6)
#define THERMAL_PROTECTION_BED_PERIOD 60 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
#else
#define THERMAL_PROTECTION_BED_PERIOD 40 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
#endif
/**
* As described above, except for the bed (M140/M190/M303).
*/
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
#if ENABLED(MachineTLD6)
#define WATCH_BED_TEMP_PERIOD 240 // Seconds
#else
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
#endif
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
#endif
/**
* Thermal Protection parameters for the heated chamber.
*/
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
/**
* Heated chamber watch settings (M141/M191).
*/
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
#endif
/**
@@ -517,8 +526,8 @@
*/
#define HOTEND_IDLE_TIMEOUT
#if ENABLED(HOTEND_IDLE_TIMEOUT)
#define HOTEND_IDLE_TIMEOUT_SEC (60*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
#define HOTEND_IDLE_TIMEOUT_SEC (20*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 140 // (°C) Minimum temperature to enable hotend protection
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
#endif
@@ -539,9 +548,11 @@
* The fan turns on automatically whenever any driver is enabled and turns
* off (or reduces to idle speed) shortly after drivers are turned off.
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(BTTSKRPRO)
#define USE_CONTROLLER_FAN
#endif
#if ENABLED(USE_CONTROLLER_FAN)
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
#define CONTROLLER_FAN_PIN FAN3_PIN // Set a custom pin for the controller fan
//#define CONTROLLER_FAN2_PIN -1 // Set a custom pin for second 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.
@@ -553,7 +564,7 @@
// 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
#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
@@ -643,14 +654,13 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#if ENABLED(Trex3Board) && DISABLED(RaptorFanPins)
#define E0_AUTO_FAN_PIN 6
#elif ENABLED(RAPTOR2) && DISABLED(SKRBoard)
#define E0_AUTO_FAN_PIN 9
#if ENABLED(OCTOPUS)
#define E0_AUTO_FAN_PIN PA8
#define E1_AUTO_FAN_PIN PE5
#else
#define E0_AUTO_FAN_PIN -1
#define E0_AUTO_FAN_PIN FAN2_PIN
#define E1_AUTO_FAN_PIN FAN2_PIN
#endif
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
@@ -708,24 +718,28 @@
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
*/
#define FANMUX0_PIN -1
#define FANMUX1_PIN -1
#define FANMUX2_PIN -1
#if ENABLED(OCTOPUS)
#define FANMUX0_PIN PD12
#define FANMUX1_PIN PD13
#define FANMUX2_PIN -1
#else
#define FANMUX0_PIN -1
#define FANMUX1_PIN -1
#define FANMUX2_PIN -1
#endif
/**
* M355 Case Light on-off / brightness
*/
#if DISABLED(SKRBoard)
#define CASE_LIGHT_ENABLE
#endif
//#define CASE_LIGHT_ENABLE
#if ENABLED(CASE_LIGHT_ENABLE)
#define CASE_LIGHT_PIN 5 // Override the default pin if needed
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
#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 205 // Set default power-up brightness (0-255, requires PWM pin)
#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
//#define CASE_LIGHT_MAX_PWM 128 // Limit PWM duty cycle (0-255)
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
//#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
@@ -782,13 +796,32 @@
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
* follow with M605 S3 to initiate mirrored movement.
*/
//#define DUAL_X_CARRIAGE
#define DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
#define X1_MIN_POS -50 // Set to X_MIN_POS
#define X1_MAX_POS X_BED_SIZE // A max coordinate so the X1 carriage can't hit the parked X2 carriage
#define X2_MIN_POS 80 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
#define X2_MAX_POS 353 // The max position of the X2 carriage, typically also the home position
#define X2_HOME_DIR 1 // Set to 1. The X2 carriage always homes to the max endstop position
#define X2_MIN_POS 15 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
#if ANY(TitanExtruder, H2Extruder)
#define X2_OFFSET 12
#elif ANY(BMGExtruderV2, BMGExtruderV3)
#define X2_OFFSET 0
#else
#define X2_OFFSET -3
#endif
#if ENABLED(MachineTLD3P)
#define X2_MAX_POS 359 + X2_OFFSET - VULCAN_OFFSET // The max position of the X2 carriage, typically also the home position
#elif ENABLED(MachineTLD4)
#define X2_MAX_POS 454 + X2_OFFSET - VULCAN_OFFSET
#elif ENABLED(MachineTLD5)
#define X2_MAX_POS 554 + X2_OFFSET - VULCAN_OFFSET
#elif ENABLED(MachineTLD6)
#define X2_MAX_POS 654 + X2_OFFSET - VULCAN_OFFSET
#elif ENABLED(MachineTLD2P)
#define X2_MAX_POS 264 + X2_OFFSET - VULCAN_OFFSET
#elif ENABLED(MachineTLH2P)
#define X2_MAX_POS 279 + X2_OFFSET - VULCAN_OFFSET
#endif
#define X2_HOME_DIR 1 // Set to 1. The X2 carriage always homes to the max endstop position
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
// NOTE: For Dual X Carriage use M218 T1 Xn to override the X2_HOME_POS.
// This allows recalibration of endstops distance without a rebuild.
@@ -798,7 +831,7 @@
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
#define DEFAULT_DUPLICATION_X_OFFSET X_CENTER
// Default action to execute following M605 mode change commands. Typically G28X to apply new mode.
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
@@ -828,7 +861,7 @@
//#define INVERT_X2_VS_X_DIR // X2 direction signal is the opposite of X
//#define X_DUAL_ENDSTOPS // X2 has its own endstop
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
//#define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
#define X2_ENDSTOP_ADJUSTMENT 0 // X2 offset relative to X endstop
#endif
#endif
@@ -848,9 +881,11 @@
#ifdef Z2_DRIVER_TYPE
//#define INVERT_Z2_VS_Z_DIR // Z2 direction signal is the opposite of Z
//#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#if DISABLED(BLTOUCH)
#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#endif
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _XMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
#define Z2_USE_ENDSTOP _ZMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
#define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop
#endif
#ifdef Z3_DRIVER_TYPE
@@ -892,7 +927,7 @@
#define HOMING_BUMP_MM { 5, 5, 2 } // (linear=mm, rotational=°) Backoff from endstops after first bump
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
//#define HOMING_BACKOFF_POST_MM { 8, 8, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
//#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa
#define QUICK_HOME // If G28 contains XY do a diagonal move first
@@ -977,7 +1012,7 @@
* Z Steppers Auto-Alignment
* Add the G34 command to align multiple Z steppers using a bed probe.
*/
#if ANY(SKRBoard, Trex3Board) && ENABLED(DualZ)
#if ENABLED(BL_Touch)
#define Z_STEPPER_AUTO_ALIGN
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
@@ -1025,13 +1060,13 @@
#ifndef Z_STEPPER_ALIGN_STEPPER_XY
// Amplification factor. Used to scale the correction step up or down in case
// the stepper (spindle) position is farther out than the test point.
#define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability!
#define Z_STEPPER_ALIGN_AMP 0.5 // Use a value > 1.0 NOTE: This may cause instability!
#endif
// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
#define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
#define Z_STEPPER_ALIGN_ITERATIONS 9 // Number of iterations to apply during alignment
#define Z_STEPPER_ALIGN_ACC 0.01 // Stop iterating early if the accuracy is better than this
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
// After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
// Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
@@ -1044,7 +1079,7 @@
//#define ASSISTED_TRAMMING
#if ENABLED(ASSISTED_TRAMMING)
// Define from 3 to 9 points to probe.
// Define positions for probe points.
#define TRAMMING_POINT_XY { { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } }
// Define position names for probe points.
@@ -1093,8 +1128,10 @@
* X<1> Set the given parameters only for the X axis.
* Y<1> Set the given parameters only for the Y axis.
*/
//#define INPUT_SHAPING_X
//#define INPUT_SHAPING_Y
#if ENABLED(MachineLargeROM)
#define INPUT_SHAPING_X
#define INPUT_SHAPING_Y
#endif
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#if ENABLED(INPUT_SHAPING_X)
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
@@ -1114,37 +1151,38 @@
// Add a Duplicate option for well-separated conjoined nozzles
//#define MULTI_NOZZLE_DUPLICATION
// By default stepper drivers require an active-HIGH signal but some high-power drivers require an active-LOW signal to step.
#define STEP_STATE_X HIGH
#define STEP_STATE_Y HIGH
#define STEP_STATE_Z HIGH
#define STEP_STATE_I HIGH
#define STEP_STATE_J HIGH
#define STEP_STATE_K HIGH
#define STEP_STATE_U HIGH
#define STEP_STATE_V HIGH
#define STEP_STATE_W HIGH
#define STEP_STATE_E HIGH
// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#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_U_STEP_PIN false
#define INVERT_V_STEP_PIN false
#define INVERT_W_STEP_PIN false
#define INVERT_E_STEP_PIN false
/**
* Idle Stepper Shutdown
* Enable DISABLE_INACTIVE_* to shut down axis steppers after an idle period.
* Set DISABLE_INACTIVE_? 'true' to shut down axis steppers after an idle period.
* The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
*/
#define DEFAULT_STEPPER_DEACTIVE_TIME 120
#define DISABLE_INACTIVE_X
#define DISABLE_INACTIVE_Y
#define DISABLE_INACTIVE_Z // Disable if the nozzle could fall onto your printed part!
//#define DISABLE_INACTIVE_I
//#define DISABLE_INACTIVE_J
//#define DISABLE_INACTIVE_K
//#define DISABLE_INACTIVE_U
//#define DISABLE_INACTIVE_V
//#define DISABLE_INACTIVE_W
#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_U true
#define DISABLE_INACTIVE_V true
#define DISABLE_INACTIVE_W true
#define DISABLE_INACTIVE_E true
// Default Minimum Feedrates for printing and travel moves
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S.
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum travel feedrate. Set with M205 T.
#define DEFAULT_MINTRAVELFEEDRATE 10.0 // (mm/s. °/s for rotational-only moves) Minimum travel feedrate. Set with M205 T.
// Minimum time that a segment needs to take as the buffer gets emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.
@@ -1176,13 +1214,12 @@
// Backlash Compensation
// Adds extra movement to axes on direction-changes to account for backlash.
//
#define BACKLASH_COMPENSATION
//#define BACKLASH_COMPENSATION
#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 } // (linear=mm, rotational=°) One value for each linear axis
#define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
#define BACKLASH_CORRECTION 0.3 // 0.0 = no correction; 1.0 = full correction
// Add steps for motor direction changes on CORE kinematics
//#define CORE_BACKLASH
@@ -1196,7 +1233,7 @@
#if ENABLED(BACKLASH_GCODE)
// Measure the Z backlash when probing (G29) and set with "M425 Z"
#define MEASURE_BACKLASH_WHEN_PROBING
//#define MEASURE_BACKLASH_WHEN_PROBING
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
// When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
@@ -1284,9 +1321,7 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
#if ENABLED(SKRBoard)
#define ADAPTIVE_STEP_SMOOTHING
#endif
//#define ADAPTIVE_STEP_SMOOTHING
/**
* Custom Microstepping
@@ -1446,7 +1481,7 @@
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state
// The timeout to return to the status screen from sub-menus
#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
//#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
@@ -1456,7 +1491,7 @@
#endif
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
//#define STATUS_MESSAGE_SCROLLING
// Apply a timeout to low-priority status messages
//#define STATUS_MESSAGE_TIMEOUT_SEC 30 // (seconds)
@@ -1467,9 +1502,6 @@
// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
// Display a negative temperature instead of "err"
//#define SHOW_TEMPERATURE_BELOW_ZERO
/**
* LED Control Menu
* Add LED Control to the LCD menu
@@ -1484,7 +1516,7 @@
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
#endif
#if ENABLED(NEO2_COLOR_PRESETS)
#define NEO2_USER_PRESET_RED 255 // User defined RED value
@@ -1514,7 +1546,7 @@
#if HAS_DISPLAY && EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
#define SHOW_PROGRESS_PERCENT // Show print progress percentage (doesn't affect progress bar)
#define SHOW_ELAPSED_TIME // Display elapsed printing time (prefix 'E')
//#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R')
#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R')
#if ENABLED(SET_INTERACTION_TIME)
#define SHOW_INTERACTION_TIME // Display time until next user interaction ('C' = filament change)
#endif
@@ -1571,7 +1603,7 @@
//#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")
#define EVENT_GCODE_SD_ABORT "G91\nG1Z5\nG90\nM84\nM104S0\nM140S0" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
#if ENABLED(PRINTER_EVENT_LEDS)
#define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
@@ -1590,10 +1622,8 @@
#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_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
#if ENABLED(SKRBoard)
#define POWER_LOSS_PIN -1 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
#define POWER_LOSS_STATE LOW // State of pin indicating power loss
#endif
#define POWER_LOSS_PIN 32 // 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
//#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor
//#define POWER_LOSS_PULLDOWN
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
@@ -1656,7 +1686,7 @@
//#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol
//#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands
#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu
//#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu
//#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!)
@@ -1801,7 +1831,7 @@
// A bigger font is available for edit items. Costs 3120 bytes of flash.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
#define USE_BIG_EDIT_FONT
//#define USE_BIG_EDIT_FONT
// A smaller font may be used on the Info Screen. Costs 2434 bytes of flash.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
@@ -1859,14 +1889,12 @@
//#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
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash.
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
// Frivolous Game Options
#if ENABLED(SKRBoard)
#define MARLIN_BRICKOUT
#define MARLIN_INVADERS
#define MARLIN_SNAKE
#endif
//#define MARLIN_BRICKOUT
//#define MARLIN_INVADERS
//#define MARLIN_SNAKE
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
#endif // HAS_MARLINUI_U8GLIB
@@ -1879,7 +1907,10 @@
//
// Additional options for DGUS / DWIN displays
//
#define DGUS_RX_BUFFER_SIZE 128
#define DGUS_TX_BUFFER_SIZE 48
#if HAS_DGUS_LCD
#define LCD_SERIAL_PORT 3
#define LCD_BAUDRATE 115200
#define DGUS_RX_BUFFER_SIZE 128
@@ -2084,16 +2115,16 @@
*/
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
//#define BABYSTEP_WITHOUT_HOMING
#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement).
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
//#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
#define BABYSTEP_MULTIPLICATOR_Z (Z_STEPSMM / 40) // (steps or mm) Steps or millimeter distance for each Z babystep
#define BABYSTEP_MULTIPLICATOR_Z 40 // (steps or mm) Steps or millimeter distance for each Z babystep
#define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
//#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
// Note: Extra time may be added to mitigate controller latency.
@@ -2103,12 +2134,14 @@
#endif
#endif
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if DISABLED(BL_Touch)
#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
#else
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
//#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#endif
#endif
@@ -2129,7 +2162,6 @@
*
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
*/
#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
#if ENABLED(DISTINCT_E_FACTORS)
@@ -2362,8 +2394,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
#define MINIMUM_STEPPER_POST_DIR_DELAY 250
#define MINIMUM_STEPPER_PRE_DIR_DELAY 250
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
/**
* Minimum stepper driver pulse width (in µs)
@@ -2376,8 +2408,9 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_PULSE 2
#if ENABLED(MachineTLD6)
#define MINIMUM_STEPPER_PULSE 5
#endif
/**
* Maximum stepping rate (in Hz) the stepper driver allows
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
@@ -2407,21 +2440,17 @@
// 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(SKRBoard)
#define BLOCK_BUFFER_SIZE 32
#elif ENABLED(SDSUPPORT)
#define BLOCK_BUFFER_SIZE 16
#else
#define BLOCK_BUFFER_SIZE 8
#define BLOCK_BUFFER_SIZE 16
#endif
// @section serial
// The ASCII buffer for serial input
#define MAX_CMD_SIZE 96
#if ENABLED(SKRBoard)
#define BUFSIZE 16
#else
#define BUFSIZE 8
#endif
#define BUFSIZE 4
// Transmission to Host Buffer Size
// To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
@@ -2430,11 +2459,8 @@
// For debug-echo: 128 bytes for the optimal speed.
// Other output doesn't need to be that speedy.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#if ENABLED(SKRBoard)
#define TX_BUFFER_SIZE 32
#else
#define TX_BUFFER_SIZE 0
#endif
#define TX_BUFFER_SIZE 64
// Host Receive Buffer Size
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
// To use flow control, set this buffer size to at least 1024 bytes.
@@ -2543,9 +2569,7 @@
*
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*/
#if DISABLED(UBL) || ENABLED(SKRBoard)
#define FWRETRACT
#endif
//#define FWRETRACT
#if ENABLED(FWRETRACT)
#define FWRETRACT_AUTORETRACT // Override slicer retractions
#if ENABLED(FWRETRACT_AUTORETRACT)
@@ -2573,26 +2597,18 @@
// Z raise distance for tool-change, as needed for some extruders
#define TOOLCHANGE_ZRAISE 2 // (mm)
//#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT // Apply raise before swap retraction (if enabled)
//#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
#if ENABLED(TOOLCHANGE_NO_RETURN)
//#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
#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 (e.g., I axis 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!
/**
* Consider coordinates for EVENT_GCODE_TOOLCHANGE_Tx as relative to T0
* so that moves in the specified axes are the same for all tools.
*/
//#define TC_GCODE_USE_GLOBAL_X // Use X position relative to Tool 0
//#define TC_GCODE_USE_GLOBAL_Y // Use Y position relative to Tool 0
//#define TC_GCODE_USE_GLOBAL_Z // Use Z position relative to Tool 0
//#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.
@@ -2604,12 +2620,12 @@
* Retract and prime filament on tool-change to reduce
* ooze and stringing and to get cleaner transitions.
*/
//#define TOOLCHANGE_FILAMENT_SWAP
#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
// Load / Unload
#define TOOLCHANGE_FS_LENGTH 12 // (mm) Load / Unload length
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 0 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
#define TOOLCHANGE_FS_RETRACT_SPEED (50*60) // (mm/min) (Unloading)
#define TOOLCHANGE_FS_LENGTH 6 // (mm) Load / Unload length
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 1 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
#define TOOLCHANGE_FS_RETRACT_SPEED (25*60) // (mm/min) (Unloading)
#define TOOLCHANGE_FS_UNRETRACT_SPEED (25*60) // (mm/min) (On SINGLENOZZLE or Bowden loading must be slowed down)
// Longer prime to clean out a SINGLENOZZLE
@@ -2688,9 +2704,9 @@
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 2 // (mm) Load length of filament, from extruder gear to nozzle.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 75 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
@@ -2699,8 +2715,8 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
#define ADVANCED_PAUSE_RESUME_PRIME 2 // (mm) Extra distance to prime nozzle after returning from park.
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
#define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
//#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
@@ -2715,7 +2731,7 @@
//#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 // Ensure homing has been completed prior to parking for filament change
#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
@@ -3022,28 +3038,9 @@
* Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers
* on the same serial port, either here or in your board's pins file.
*/
#if ENABLED(SKRBoard)
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#else
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 2
#define Z_SLAVE_ADDRESS 1
#define E0_SLAVE_ADDRESS 3
#define X_SERIAL_TX_PIN 58
#define X_SERIAL_RX_PIN 12
#define Y_SERIAL_TX_PIN 58
#define Y_SERIAL_RX_PIN 12
#define Z_SERIAL_TX_PIN 58
#define Z_SERIAL_RX_PIN 12
#define E0_SERIAL_TX_PIN 58
#define E0_SERIAL_RX_PIN 12
#endif
//#define X_SLAVE_ADDRESS 0
//#define Y_SLAVE_ADDRESS 0
//#define Z_SLAVE_ADDRESS 0
//#define X2_SLAVE_ADDRESS 0
//#define Y2_SLAVE_ADDRESS 0
//#define Z2_SLAVE_ADDRESS 0
@@ -3145,9 +3142,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
#if ENABLED(SKRBoard)
#define MONITOR_DRIVER_STATUS
#endif
#define MONITOR_DRIVER_STATUS
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
@@ -3169,9 +3164,9 @@
#define X_HYBRID_THRESHOLD 70 // [mm/s]
#define X2_HYBRID_THRESHOLD 70
#define Y_HYBRID_THRESHOLD 50
#define Y2_HYBRID_THRESHOLD 50
#define Z_HYBRID_THRESHOLD 3
#define Z2_HYBRID_THRESHOLD 3
#define Y2_HYBRID_THRESHOLD 100
#define Z_HYBRID_THRESHOLD 8
#define Z2_HYBRID_THRESHOLD 8
#define Z3_HYBRID_THRESHOLD 3
#define Z4_HYBRID_THRESHOLD 3
#define I_HYBRID_THRESHOLD 3 // [linear=mm/s, rotational=°/s]
@@ -3261,7 +3256,7 @@
* Enable M122 debugging command for TMC stepper drivers.
* M122 S0/1 will enable continuous reporting.
*/
//#define TMC_DEBUG
#define TMC_DEBUG
/**
* You can set your own advanced settings by filling in predefined functions.
@@ -3380,13 +3375,11 @@
* See https://marlinfw.org/docs/configuration/2.0.9/laser_spindle.html for more config details.
*/
//#define SPINDLE_FEATURE
#if ENABLED(RAPTOR2) && DISABLED(SKRBoard)
//#define LASER_FEATURE
#endif
//#define LASER_FEATURE
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
#define SPINDLE_LASER_ACTIVE_STATE HIGH // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH
#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
#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, ESP32, and LPC)
@@ -3437,8 +3430,8 @@
#define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
#define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
#define SPINDLE_LASER_POWERUP_DELAY 1 // (ms) Delay to allow the spindle/laser to come up to speed/power
#define SPINDLE_LASER_POWERDOWN_DELAY 1 // (ms) Delay to allow the spindle to stop
#define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop
/**
* M3/M4 Power Equation
@@ -3554,7 +3547,6 @@
*/
//#define LASER_SYNCHRONOUS_M106_M107
/**
* Coolant Control
*
@@ -3797,50 +3789,41 @@
* Up to 25 may be defined, but the actual number is LCD-dependent.
*/
// @section custom main menu
// Custom Menu: Main Menu
#define CUSTOM_MENU_MAIN
#if ENABLED(BLTOUCH)
#define DualZComm "\nG34I8"
#else
#define DualZComm ""
#endif
#define MAIN_MENU_ITEM_1_GCODE "M190S55\nG28" DualZComm "\nG29\nM400\nM104S215\nG28\nM109S215\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
//#define CUSTOM_MENU_MAIN
#if ENABLED(CUSTOM_MENU_MAIN)
#define CUSTOM_MENU_MAIN_TITLE "Leveling Tools"
//#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
//#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_SCRIPT_RETURN // Return to status screen after a script
#define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle
#if ENABLED(DualZ)
#define DZ_Script "G34I8\n"
#else
#define DZ_Script
#endif
#define MAIN_MENU_ITEM_1_DESC "Setup"
#if ENABLED(UBL)
#define MAIN_MENU_ITEM_1_GCODE "M190S75\nG28\n" DZ_Script "G29P1\nG29P3\nM109S215\nG29S1\nG29S0\nG29F0.0\nG29A\nG28\nG1X150Y150F5000\nG1Z0\nM500\nM400\nM117 Set Z Offset"
#else
#define MAIN_MENU_ITEM_1_GCODE "M190S75\nG28\n" DZ_Script "G29\nM400\nM109S215\nG28\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
#endif
#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
#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 "PID Hotend"
#define MAIN_MENU_ITEM_2_GCODE "G28\nG1X200Y200Z5\nM106S128\nM303C8S215E0U\nM500\nM117 PID Tune Done"
#define MAIN_MENU_ITEM_2_CONFIRM
#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 "PID Bed"
#define MAIN_MENU_ITEM_3_GCODE "M303C4S75E-1U\nM500\nM117 PID Tune Done"
#define MAIN_MENU_ITEM_3_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 "Prep for Z Adjust"
#define MAIN_MENU_ITEM_4_GCODE "M190S75\nM104S215\nG28\nG29L1\nG1 X100Y100F5000\nG1Z0"
#define MAIN_MENU_ITEM_4_CONFIRM
#define MAIN_MENU_ITEM_5_DESC "Store Settings"
#define MAIN_MENU_ITEM_5_GCODE "M500\nM117 Settings Stored"
#define MAIN_MENU_ITEM_5_CONFIRM
#define MAIN_MENU_ITEM_6_DESC "Run Mesh Validation"
#define MAIN_MENU_ITEM_6_GCODE "G26"
#define MAIN_MENU_ITEM_6_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
// @section custom config menu
@@ -3931,7 +3914,7 @@
#if ENABLED(HOST_PROMPT_SUPPORT)
#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
#endif
#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
//#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
#endif
+59 -11
View File
@@ -1,6 +1,6 @@
/**
* 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
@@ -16,7 +16,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
@@ -28,25 +28,73 @@
/**
* Marlin release version identifier
*/
#define SHORT_BUILD_VERSION "bugfix-2.1.x_R01"
#define SHORT_BUILD_VERSION "2.1.2_Beta1"
/**
* Verbose version identifier which should contain a reference to the location
* from where the binary was downloaded or the source code was compiled.
*/
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
#if(ENABLED(DriverA4988))
#define VerChar1 "A"
#elif(ENABLED(Driver2209))
#define VerChar1 "T"
#endif
#if(ENABLED(BL_Touch))
#define VerChar2 "B"
#else
#define VerChar2 "E"
#endif
#if(ENABLED(LOWRES_DWIN))
#define VerChar3 "L"
#else
#define VerChar3 "H"
#endif
#if(ENABLED(ACBed))
#define VerChar4 "A"
#else
#define VerChar4 "D"
#endif
#if(ENABLED(OpticalY))
#define VerChar5 "O"
#else
#define VerChar5 "M"
#endif
#if(ENABLED(TitanExtruder))
#define VerChar6 "T"
#elif ANY(BMGExtruderV2, BMGExtruderV3)
#define VerChar6 "B"
#elif ENABLED(BondtechLGX)
#define VerChar6 "L"
#else
#define VerChar6 "S"
#endif
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION "_" VerChar1 VerChar2 VerChar3 VerChar4 VerChar5 VerChar6
/**
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2023-03-10"
#define STRING_DISTRIBUTION_DATE "2023-02-03"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
#define MACHINE_NAME "TM3D Raptor"
#if(ENABLED(MachineTLD3P))
#define CUSTOM_MACHINE_NAME "TL D3P"
#elif(ENABLED(MachineTLD5))
#define CUSTOM_MACHINE_NAME "TL D5"
#elif(ENABLED(MachineTLD6))
#define CUSTOM_MACHINE_NAME "TL D6"
#endif
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
@@ -54,7 +102,7 @@
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Raptor_2.0.X"
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Tenlog_DWIN"
/**
* Default generic printer UUID.
@@ -65,12 +113,12 @@
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release.
*/
#define WEBSITE_URL "tinymachines3d.com"
#define WEBSITE_URL "http://www.lnl3d.com "
/**
* Set the vendor info the serial USB interface, if changable
* Currently only supported by DUE platform
*/
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
+56 -68
View File
@@ -32,74 +32,62 @@
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
#define CUSTOM_BOOTSCREEN_INVERTED
const unsigned char custom_start_bmp[] PROGMEM = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFD, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFC, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFC, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF,
0xFE, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF,
0xFC, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
0xFC, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFE, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
0xFC, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x00, 0x01, 0xF0, 0x3F,
0xFE, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x00, 0x02, 0x08, 0x1F,
0xFC, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x00, 0x05, 0x04, 0x3F,
0xFE, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x00, 0x0A, 0x02, 0x1F,
0xFC, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x00, 0x15, 0x01, 0x3F,
0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
0xFC, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x00, 0x14, 0x01, 0x3F,
0xFE, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
0xFC, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x15, 0x01, 0x3F,
0xFE, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2A, 0x0A, 0x02, 0x1F,
0xFC, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x51, 0x05, 0x04, 0x3F,
0xFE, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x61, 0x02, 0x88, 0x1F,
0xFC, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x51, 0x01, 0xF0, 0x3F,
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x1F,
0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x3F,
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
0xFC, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xE0, 0x2E, 0xFB, 0x7D, 0xFB, 0xFB, 0xCF, 0xC1, 0xDF, 0xBB, 0x3E, 0xC0, 0xE1, 0xFE, 0x3C, 0x1F,
0xFD, 0xEE, 0x7B, 0x39, 0xF9, 0xF3, 0xCF, 0x9E, 0xDF, 0xBB, 0x3E, 0xDF, 0xDE, 0xFC, 0xDD, 0xE7,
0xFD, 0xEE, 0x3B, 0xBB, 0xF9, 0xEB, 0xD7, 0xBF, 0x5F, 0xBB, 0x5E, 0xDF, 0xDE, 0xFD, 0xED, 0xF7,
0xFD, 0xEE, 0xBB, 0xD3, 0xFA, 0xEB, 0xB7, 0x3F, 0xDF, 0xBB, 0x4E, 0xDF, 0xDF, 0xFF, 0xCD, 0xF3,
0xFD, 0xEE, 0xDB, 0xC7, 0xFA, 0xEB, 0xBB, 0x7F, 0xC0, 0x3B, 0x6E, 0xC0, 0xE3, 0xFF, 0x1D, 0xF3,
0xFD, 0xEE, 0xCB, 0xEF, 0xFA, 0xDB, 0xBB, 0x7F, 0xDF, 0xBB, 0x66, 0xDF, 0xF8, 0xFF, 0xCD, 0xF3,
0xFD, 0xEE, 0xEB, 0xEF, 0xFB, 0x5B, 0x03, 0x3F, 0x5F, 0xBB, 0x76, 0xDF, 0xFE, 0x7F, 0xED, 0xF3,
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0x5B, 0x79, 0xBE, 0xDF, 0xBB, 0x7A, 0xDF, 0xDE, 0x7D, 0xED, 0xF7,
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0xBA, 0xFD, 0x9E, 0xDF, 0xBB, 0x7C, 0xDF, 0xDE, 0xFD, 0xCD, 0xE7,
0xFD, 0xEE, 0xFB, 0xEF, 0xFB, 0xBA, 0xFD, 0xC1, 0xDF, 0xBB, 0x7E, 0xC0, 0xE0, 0xFE, 0x1C, 0x1F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,
B11111110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,
B11111100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000000,B00000001,B11110000,B00111111,
B11111110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000000,B00000010,B00001000,B00011111,
B11111100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000000,B00000101,B00000100,B00111111,
B11111110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000000,B00001010,B00000010,B00011111,
B11111100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000000,B00010101,B00000001,B00111111,
B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000000,B00010100,B00000001,B00111111,
B11111110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B00010101,B00000001,B00111111,
B11111110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101010,B00001010,B00000010,B00011111,
B11111100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010001,B00000101,B00000100,B00111111,
B11111110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100001,B00000010,B10001000,B00011111,
B11111100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010001,B00000001,B11110000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101010,B00000000,B00000000,B00011111,
B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00000000,B00000000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11100000,B00101110,B11111011,B01111101,B11111011,B11111011,B11001111,B11000001,B11011111,B10111011,B00111110,B11000000,B11100001,B11111110,B00111100,B00011111,
B11111101,B11101110,B01111011,B00111001,B11111001,B11110011,B11001111,B10011110,B11011111,B10111011,B00111110,B11011111,B11011110,B11111100,B11011101,B11100111,
B11111101,B11101110,B00111011,B10111011,B11111001,B11101011,B11010111,B10111111,B01011111,B10111011,B01011110,B11011111,B11011110,B11111101,B11101101,B11110111,
B11111101,B11101110,B10111011,B11010011,B11111010,B11101011,B10110111,B00111111,B11011111,B10111011,B01001110,B11011111,B11011111,B11111111,B11001101,B11110011,
B11111101,B11101110,B11011011,B11000111,B11111010,B11101011,B10111011,B01111111,B11000000,B00111011,B01101110,B11000000,B11100011,B11111111,B00011101,B11110011,
B11111101,B11101110,B11001011,B11101111,B11111010,B11011011,B10111011,B01111111,B11011111,B10111011,B01100110,B11011111,B11111000,B11111111,B11001101,B11110011,
B11111101,B11101110,B11101011,B11101111,B11111011,B01011011,B00000011,B00111111,B01011111,B10111011,B01110110,B11011111,B11111110,B01111111,B11101101,B11110011,
B11111101,B11101110,B11110011,B11101111,B11111011,B01011011,B01111001,B10111110,B11011111,B10111011,B01111010,B11011111,B11011110,B01111101,B11101101,B11110111,
B11111101,B11101110,B11110011,B11101111,B11111011,B10111010,B11111101,B10011110,B11011111,B10111011,B01111100,B11011111,B11011110,B11111101,B11001101,B11100111,
B11111101,B11101110,B11111011,B11101111,B11111011,B10111010,B11111101,B11000001,B11011111,B10111011,B01111110,B11000000,B11100000,B11111110,B00011100,B00011111
};
+5 -5
View File
@@ -95,10 +95,10 @@ invert_y_dir = true
invert_z_dir = false
invert_e0_dir = false
step_state_e = HIGH
step_state_x = HIGH
step_state_y = HIGH
step_state_z = HIGH
invert_e_step_pin = false
invert_x_step_pin = false
invert_y_step_pin = false
invert_z_step_pin = false
disable_x = false
disable_y = false
@@ -178,7 +178,7 @@ autotemp_oldweight = 0.98
bed_check_interval = 5000
default_stepper_deactive_time = 120
default_volumetric_extruder_limit = 0.00
disable_inactive_extruder = true
disable_inactive_e = true
disable_inactive_x = true
disable_inactive_y = true
disable_inactive_z = true
+1 -1
View File
@@ -139,7 +139,7 @@ typedef Servo hal_servo_t;
#error "LCD_SERIAL_PORT must be from 0 to 3."
#endif
#define LCD_SERIAL lcdSerial
#if HAS_DGUS_LCD
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#endif
#endif
+1 -1
View File
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
#if HAS_DGUS_LCD
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
+6 -3
View File
@@ -34,7 +34,6 @@
#include <WString.h>
#include "../../inc/MarlinConfigPre.h"
#include "../../core/types.h"
#include "../../core/serial_hook.h"
#ifndef SERIAL_PORT
@@ -139,6 +138,10 @@
#define BYTE 0
// Templated type selector
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
template<typename Cfg>
class MarlinSerial {
protected:
@@ -161,7 +164,7 @@
static constexpr B_U2Xx<Cfg::PORT> B_U2X = 0;
// Base size of type on buffer size
typedef uvalue_t(Cfg::RX_SIZE - 1) ring_buffer_pos_t;
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
struct ring_buffer_r {
volatile ring_buffer_pos_t head, tail;
@@ -209,7 +212,7 @@
static ring_buffer_pos_t available();
static void write(const uint8_t c);
static void flushTX();
#if HAS_DGUS_LCD
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
static ring_buffer_pos_t get_tx_buffer_free();
#endif
+5 -22
View File
@@ -23,10 +23,6 @@
#include "../../inc/MarlinConfig.h"
//#define DEBUG_AVR_FAST_PWM
#define DEBUG_OUT ENABLED(DEBUG_AVR_FAST_PWM)
#include "../../core/debug_out.h"
struct Timer {
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
@@ -112,15 +108,12 @@ const Timer get_pwm_timer(const pin_t pin) {
}
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
DEBUG_ECHOLNPGM("set_pwm_frequency(pin=", pin, ", freq=", f_desired, ")");
const Timer timer = get_pwm_timer(pin);
if (timer.isProtected || !timer.isPWM) return; // Don't proceed if protected timer or not recognized
const bool is_timer2 = timer.n == 2;
const uint16_t maxtop = is_timer2 ? 0xFF : 0xFFFF;
DEBUG_ECHOLNPGM("maxtop=", maxtop);
uint16_t res = 0xFF; // resolution (TOP value)
uint8_t j = CS_NONE; // prescaler index
uint8_t wgm = WGM_PWM_PC_8; // waveform generation mode
@@ -128,29 +121,23 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
// Calculating the prescaler and resolution to use to achieve closest frequency
if (f_desired != 0) {
constexpr uint16_t prescaler[] = { 1, 8, (32), 64, (128), 256, 1024 }; // (*) are Timer 2 only
uint16_t f = (F_CPU) / (uint32_t(maxtop) << 11) + 1; // Start with the lowest non-zero frequency achievable (for 16MHz, 1 or 31)
uint16_t f = (F_CPU) / (2 * 1024 * maxtop) + 1; // Start with the lowest non-zero frequency achievable (1 or 31)
DEBUG_ECHOLNPGM("f=", f);
DEBUG_ECHOLNPGM("(prescaler loop)");
LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values
const uint32_t p = prescaler[i]; // Extend to 32 bits for calculations
DEBUG_ECHOLNPGM("prescaler[", i, "]=", p);
const uint16_t p = prescaler[i];
uint16_t res_fast_temp, res_pc_temp;
if (is_timer2) {
#if ENABLED(USE_OCR2A_AS_TOP) // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
const uint16_t rft = (F_CPU) / (p * f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", res_fast_temp, " res_pc_temp=", res_pc_temp);
#else
res_fast_temp = res_pc_temp = maxtop;
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", maxtop, " res_pc_temp=", maxtop);
#endif
}
else {
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
const uint16_t rft = (F_CPU) / (p * f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
}
@@ -160,27 +147,23 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
// Calculate frequencies of test prescaler and resolution values
const uint16_t f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
f_pc_temp = (F_CPU) / ((p * res_pc_temp) << 1),
f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
f_pc_temp = (F_CPU) / (2 * p * res_pc_temp);
const int f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired),
f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired);
DEBUG_ECHOLNPGM("f_fast_temp=", f_fast_temp, " f_pc_temp=", f_pc_temp, " f_diff=", f_diff, " f_fast_diff=", f_fast_diff, " f_pc_diff=", f_pc_diff);
if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f
// Set the Wave Generation Mode to FAST PWM
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM)) : uint8_t(WGM_FAST_PWM_ICRn);
// Remember this combination
f = f_fast_temp; res = res_fast_temp; j = i + 1;
DEBUG_ECHOLNPGM("(FAST) updated f=", f);
}
else if (f_pc_diff < f_diff) { // PHASE CORRECT values are closes to desired f
// Set the Wave Generation Mode to PWM PHASE CORRECT
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_PWM_PC)) : uint8_t(WGM_PWM_PC_ICRn);
f = f_pc_temp; res = res_pc_temp; j = i + 1;
DEBUG_ECHOLNPGM("(PHASE) updated f=", f);
}
} // prescaler loop
}
}
_SET_WGMnQ(timer, wgm);
+5 -2
View File
@@ -30,7 +30,6 @@
#include <WString.h>
#include "../../inc/MarlinConfigPre.h"
#include "../../core/types.h"
#include "../../core/serial_hook.h"
// Define constants and variables for buffering incoming serial data. We're
@@ -53,6 +52,10 @@
// #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
//#endif
// Templated type selector
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
// Templated structure wrapper
template<typename S, unsigned int addr> struct StructWrapper {
constexpr StructWrapper(int) {}
@@ -73,7 +76,7 @@ protected:
static constexpr int HWUART_IRQ_ID = IRQ_IDS[Cfg::PORT];
// Base size of type on buffer size
typedef uvalue_t(Cfg::RX_SIZE - 1) ring_buffer_pos_t;
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
struct ring_buffer_r {
volatile ring_buffer_pos_t head, tail;
+18 -16
View File
@@ -342,16 +342,16 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
}
else
pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle
return;
}
else
#endif
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
if (cid >= 0) {
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
ledcWrite(cid, duty);
}
{
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
if (cid >= 0) {
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
ledcWrite(cid, duty);
}
}
}
int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
@@ -360,15 +360,17 @@ int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle
return 0;
}
else
#endif
const int8_t cid = channel_for_pin(pin);
if (cid >= 0) {
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
ledcDetachPin(chan_pin[cid]);
chan_pin[cid] = 0; // remove old freq channel
}
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
{
const int8_t cid = channel_for_pin(pin);
if (cid >= 0) {
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
ledcDetachPin(chan_pin[cid]);
chan_pin[cid] = 0; // remove old freq channel
}
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
}
}
// use hardware PWM if avail, if not then ISR
+1 -1
View File
@@ -112,7 +112,7 @@
#else
#error "LCD_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
#endif
#if HAS_DGUS_LCD
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
#endif
#endif
+2 -2
View File
@@ -48,7 +48,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
bool PersistentStore::access_start() {
if (!card.isMounted()) return false;
MediaFile file, root = card.getroot();
SdFile file, root = card.getroot();
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
return true;
@@ -63,7 +63,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::access_finish() {
if (!card.isMounted()) return false;
MediaFile file, root = card.getroot();
SdFile file, root = card.getroot();
int bytes_written = 0;
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
+1 -1
View File
@@ -139,7 +139,7 @@
#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
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
#endif
#endif
+2 -2
View File
@@ -47,7 +47,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
bool PersistentStore::access_start() {
if (!card.isMounted()) return false;
MediaFile file, root = card.getroot();
SdFile file, root = card.getroot();
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
return true; // false aborts the save
@@ -62,7 +62,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::access_finish() {
if (!card.isMounted()) return false;
MediaFile file, root = card.getroot();
SdFile file, root = card.getroot();
int bytes_written = 0;
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
+2 -2
View File
@@ -39,7 +39,7 @@ inline uint8_t timer_and_index_for_pin(const pin_t pin, timer_dev **timer_ptr) {
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
const uint16_t duty = invert ? v_size - v : v;
if (PWM_PIN(pin)) {
timer_dev *timer;
timer_dev *timer; UNUSED(timer);
if (timer_freq[timer_and_index_for_pin(pin, &timer)] == 0)
set_pwm_frequency(pin, PWM_FREQUENCY);
const uint8_t channel = PIN_MAP[pin].timer_channel;
@@ -55,7 +55,7 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
timer_dev *timer;
timer_dev *timer; UNUSED(timer);
timer_freq[timer_and_index_for_pin(pin, &timer)] = f_desired;
// Protect used timers
+6 -6
View File
@@ -448,7 +448,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
TERN_(DISABLE_INACTIVE_U, stepper.disable_axis(U_AXIS));
TERN_(DISABLE_INACTIVE_V, stepper.disable_axis(V_AXIS));
TERN_(DISABLE_INACTIVE_W, stepper.disable_axis(W_AXIS));
TERN_(DISABLE_INACTIVE_EXTRUDER, stepper.disable_e_steppers());
TERN_(DISABLE_INACTIVE_E, stepper.disable_e_steppers());
TERN_(AUTO_BED_LEVELING_UBL, bedlevel.steppers_were_disabled());
}
@@ -669,7 +669,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
&& ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
&& !planner.has_blocks_queued()
) {
#if HAS_SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
bool oldstatus;
switch (active_extruder) {
default: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 0); stepper.ENABLE_EXTRUDER(0); break;
@@ -683,7 +683,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
#endif // E_STEPPERS > 2
#endif // E_STEPPERS > 1
}
#else // !HAS_SWITCHING_EXTRUDER
#else // !SWITCHING_EXTRUDER
bool oldstatus;
switch (active_extruder) {
default:
@@ -699,7 +699,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
planner.set_e_position_mm(olde);
planner.synchronize();
#if HAS_SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
switch (active_extruder) {
default: if (oldstatus) stepper.ENABLE_EXTRUDER(0); else stepper.DISABLE_EXTRUDER(0); break;
#if E_STEPPERS > 1
@@ -709,12 +709,12 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
#endif // E_STEPPERS > 2
#endif // E_STEPPERS > 1
}
#else // !HAS_SWITCHING_EXTRUDER
#else // !SWITCHING_EXTRUDER
switch (active_extruder) {
#define _CASE_RESTORE(N) case N: if (oldstatus) stepper.ENABLE_EXTRUDER(N); else stepper.DISABLE_EXTRUDER(N); break;
REPEAT(E_STEPPERS, _CASE_RESTORE);
}
#endif // !HAS_SWITCHING_EXTRUDER
#endif // !SWITCHING_EXTRUDER
gcode.reset_stepper_timeout(ms);
}
+146 -156
View File
@@ -221,7 +221,7 @@
#define BOARD_5DPRINT 1707 // 5DPrint D8 Driver Board
//
// LPC1768 ARM Cortex-M3
// LPC1768 ARM Cortex M3
//
#define BOARD_RAMPS_14_RE_ARM_EFB 2000 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
@@ -242,7 +242,7 @@
#define BOARD_EMOTRONIC 2015 // eMotion-Tech eMotronic
//
// LPC1769 ARM Cortex-M3
// LPC1769 ARM Cortex M3
//
#define BOARD_MKS_SGEN 2500 // MKS-SGen
@@ -259,7 +259,7 @@
#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY
//
// SAM3X8E ARM Cortex-M3
// SAM3X8E ARM Cortex M3
//
#define BOARD_DUE3DOM 3000 // DUE3DOM for Arduino DUE
@@ -292,195 +292,185 @@
#define BOARD_KRATOS32 3027 // K.3D Kratos32 (Arduino Due Shield)
//
// SAM3X8C ARM Cortex-M3
// SAM3X8C ARM Cortex M3
//
#define BOARD_PRINTRBOARD_G2 3100 // Printrboard G2
#define BOARD_ADSK 3101 // Arduino DUE Shield Kit (ADSK)
//
// STM32 ARM Cortex-M0+
//
#define BOARD_BTT_EBB42_V1_1 4000 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
#define BOARD_BTT_SKR_MINI_E3_V3_0 4001 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
#define BOARD_BTT_MANTA_E3_EZ_V1_0 4002 // BigTreeTech Manta E3 EZ V1.0 (STM32G0B1RE)
#define BOARD_BTT_MANTA_M4P_V1_0 4003 // BigTreeTech Manta M4P V1.0 (STM32G0B1RE)
#define BOARD_BTT_MANTA_M5P_V1_0 4004 // BigTreeTech Manta M5P V1.0 (STM32G0B1RE)
#define BOARD_BTT_MANTA_M8P_V1_0 4005 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
#define BOARD_BTT_MANTA_M8P_V1_1 4006 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
//
// STM32 ARM Cortex-M3
//
#define BOARD_MALYAN_M200_V2 5000 // STM32F070CB controller
#define BOARD_MALYAN_M300 5001 // STM32F070-based delta
#define BOARD_STM32F103RE 5002 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_MALYAN_M200 5003 // STM32C8 Libmaple-based STM32F1 controller
#define BOARD_STM3R_MINI 5004 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_GTM32_PRO_VB 5005 // STM32F103VE controller
#define BOARD_GTM32_MINI 5006 // STM32F103VE controller
#define BOARD_GTM32_MINI_A30 5007 // STM32F103VE controller
#define BOARD_GTM32_REV_B 5008 // STM32F103VE controller
#define BOARD_MORPHEUS 5009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
#define BOARD_CHITU3D 5010 // Chitu3D (STM32F103RE)
#define BOARD_MKS_ROBIN 5011 // MKS Robin (STM32F103ZE)
#define BOARD_MKS_ROBIN_MINI 5012 // MKS Robin Mini (STM32F103VE)
#define BOARD_MKS_ROBIN_NANO 5013 // MKS Robin Nano (STM32F103VE)
#define BOARD_MKS_ROBIN_NANO_V2 5014 // MKS Robin Nano V2 (STM32F103VE)
#define BOARD_MKS_ROBIN_LITE 5015 // MKS Robin Lite/Lite2 (STM32F103RC)
#define BOARD_MKS_ROBIN_LITE3 5016 // MKS Robin Lite3 (STM32F103RC)
#define BOARD_MKS_ROBIN_PRO 5017 // MKS Robin Pro (STM32F103ZE)
#define BOARD_MKS_ROBIN_E3 5018 // MKS Robin E3 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3_V1_1 5019 // MKS Robin E3 V1.1 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3D 5020 // MKS Robin E3D (STM32F103RC)
#define BOARD_MKS_ROBIN_E3D_V1_1 5021 // MKS Robin E3D V1.1 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3P 5022 // MKS Robin E3P (STM32F103VE)
#define BOARD_BTT_SKR_MINI_V1_1 5023 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_0 5024 // BigTreeTech SKR Mini E3 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_2 5025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 5026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_MINI_MZ_V1_0 5027 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 5028 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_CR6 5029 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 5030 // JGAurora A5S A1 (STM32F103ZE)
#define BOARD_FYSETC_AIO_II 5031 // FYSETC AIO_II (STM32F103RC)
#define BOARD_FYSETC_CHEETAH 5032 // FYSETC Cheetah (STM32F103RC)
#define BOARD_FYSETC_CHEETAH_V12 5033 // FYSETC Cheetah V1.2 (STM32F103RC)
#define BOARD_LONGER3D_LK 5034 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
#define BOARD_CCROBOT_MEEB_3DP 5035 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 5036 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
#define BOARD_CHITU3D_V6 5037 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
#define BOARD_CHITU3D_V9 5038 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
#define BOARD_CREALITY_V4 5039 // Creality v4.x (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V422 5040 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V423 5041 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V425 5042 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V427 5043 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V4210 5044 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
#define BOARD_CREALITY_V431 5045 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_A 5046 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_B 5047 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_C 5048 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_D 5049 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V452 5050 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V453 5051 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V521 5052 // Creality v5.2.1 (STM32F103VE) as found in the SV04
#define BOARD_CREALITY_V24S1 5053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
#define BOARD_TRIGORILLA_PRO 5056 // Trigorilla Pro (STM32F103ZE)
#define BOARD_FLY_MINI 5057 // FLYmaker FLY MINI (STM32F103RC)
#define BOARD_FLSUN_HISPEED 5058 // FLSUN HiSpeedV1 (STM32F103VE)
#define BOARD_BEAST 5059 // STM32F103RE Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 5060 // STM32F103ZE Mingda MD-16
#define BOARD_GTM32_PRO_VD 5061 // STM32F103VE controller
#define BOARD_ZONESTAR_ZM3E2 5062 // Zonestar ZM3E2 (STM32F103RC)
#define BOARD_ZONESTAR_ZM3E4 5063 // Zonestar ZM3E4 V1 (STM32F103VC)
#define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
#define BOARD_MALYAN_M200_V2 4000 // STM32F070CB controller
#define BOARD_MALYAN_M300 4001 // STM32F070-based delta
#define BOARD_STM32F103RE 4002 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_MALYAN_M200 4003 // STM32C8 Libmaple-based STM32F1 controller
#define BOARD_STM3R_MINI 4004 // STM32F103RE Libmaple-based STM32F1 controller
#define BOARD_GTM32_PRO_VB 4005 // STM32F103VE controller
#define BOARD_GTM32_MINI 4006 // STM32F103VE controller
#define BOARD_GTM32_MINI_A30 4007 // STM32F103VE controller
#define BOARD_GTM32_REV_B 4008 // STM32F103VE controller
#define BOARD_MORPHEUS 4009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
#define BOARD_CHITU3D 4010 // Chitu3D (STM32F103RE)
#define BOARD_MKS_ROBIN 4011 // MKS Robin (STM32F103ZE)
#define BOARD_MKS_ROBIN_MINI 4012 // MKS Robin Mini (STM32F103VE)
#define BOARD_MKS_ROBIN_NANO 4013 // MKS Robin Nano (STM32F103VE)
#define BOARD_MKS_ROBIN_NANO_V2 4014 // MKS Robin Nano V2 (STM32F103VE)
#define BOARD_MKS_ROBIN_LITE 4015 // MKS Robin Lite/Lite2 (STM32F103RC)
#define BOARD_MKS_ROBIN_LITE3 4016 // MKS Robin Lite3 (STM32F103RC)
#define BOARD_MKS_ROBIN_PRO 4017 // MKS Robin Pro (STM32F103ZE)
#define BOARD_MKS_ROBIN_E3 4018 // MKS Robin E3 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3_V1_1 4019 // MKS Robin E3 V1.1 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3D 4020 // MKS Robin E3D (STM32F103RC)
#define BOARD_MKS_ROBIN_E3D_V1_1 4021 // MKS Robin E3D V1.1 (STM32F103RC)
#define BOARD_MKS_ROBIN_E3P 4022 // MKS Robin E3p (STM32F103VE)
#define BOARD_BTT_EBB42_V1_1 4023 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
#define BOARD_BTT_SKR_MINI_V1_1 4024 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_0 4025 // BigTreeTech SKR Mini E3 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_2 4026 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 4027 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_MINI_E3_V3_0 4028 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 4029 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4030 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4031 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_CR6 4032 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4033 // JGAurora A5S A1 (STM32F103ZE)
#define BOARD_FYSETC_AIO_II 4034 // FYSETC AIO_II (STM32F103RC)
#define BOARD_FYSETC_CHEETAH 4035 // FYSETC Cheetah (STM32F103RC)
#define BOARD_FYSETC_CHEETAH_V12 4036 // FYSETC Cheetah V1.2 (STM32F103RC)
#define BOARD_LONGER3D_LK 4037 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
#define BOARD_CCROBOT_MEEB_3DP 4038 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4039 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
#define BOARD_CHITU3D_V6 4040 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
#define BOARD_CHITU3D_V9 4041 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
#define BOARD_CREALITY_V4 4042 // Creality v4.x (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V422 4043 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V423 4044 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V425 4045 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V427 4046 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V4210 4047 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
#define BOARD_CREALITY_V431 4048 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_A 4049 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_B 4050 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_C 4051 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_D 4052 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V452 4053 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V453 4054 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V521 4055 // Creality v5.2.1 (STM32F103VE) as found in the SV04
#define BOARD_CREALITY_V24S1 4056 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 4057 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 4058 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
#define BOARD_TRIGORILLA_PRO 4059 // Trigorilla Pro (STM32F103ZE)
#define BOARD_FLY_MINI 4060 // FLYmaker FLY MINI (STM32F103RC)
#define BOARD_FLSUN_HISPEED 4061 // FLSUN HiSpeedV1 (STM32F103VE)
#define BOARD_BEAST 4062 // STM32F103RE Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4063 // STM32F103ZE Mingda MD-16
#define BOARD_GTM32_PRO_VD 4064 // STM32F103VE controller
#define BOARD_ZONESTAR_ZM3E2 4065 // Zonestar ZM3E2 (STM32F103RC)
#define BOARD_ZONESTAR_ZM3E4 4066 // Zonestar ZM3E4 V1 (STM32F103VC)
#define BOARD_ZONESTAR_ZM3E4V2 4067 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 4068 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 4069 // Panda Pi V2.9 - Standalone (STM32F103RC)
//
// ARM Cortex-M4F
//
#define BOARD_TEENSY31_32 5100 // Teensy3.1 and Teensy3.2
#define BOARD_TEENSY35_36 5101 // Teensy3.5 and Teensy3.6
#define BOARD_TEENSY31_32 4100 // Teensy3.1 and Teensy3.2
#define BOARD_TEENSY35_36 4101 // Teensy3.5 and Teensy3.6
//
// STM32 ARM Cortex-M4F
//
#define BOARD_ARMED 5200 // Arm'ed STM32F4-based controller
#define BOARD_RUMBA32_V1_0 5201 // RUMBA32 STM32F446VE based controller from Aus3D
#define BOARD_RUMBA32_V1_1 5202 // RUMBA32 STM32F446VE based controller from Aus3D
#define BOARD_RUMBA32_MKS 5203 // RUMBA32 STM32F446VE based controller from Makerbase
#define BOARD_RUMBA32_BTT 5204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
#define BOARD_BLACK_STM32F407VE 5205 // BLACK_STM32F407VE
#define BOARD_BLACK_STM32F407ZE 5206 // BLACK_STM32F407ZE
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 5207 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
#define BOARD_BTT_SKR_PRO_V1_1 5208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
#define BOARD_BTT_SKR_PRO_V1_2 5209 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
#define BOARD_BTT_BTT002_V1_0 5210 // BigTreeTech BTT002 v1.0 (STM32F407VG)
#define BOARD_BTT_E3_RRF 5211 // BigTreeTech E3 RRF (STM32F407VG)
#define BOARD_BTT_SKR_V2_0_REV_A 5212 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
#define BOARD_BTT_SKR_V2_0_REV_B 5213 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
#define BOARD_BTT_GTR_V1_0 5214 // BigTreeTech GTR v1.0 (STM32F407IGT)
#define BOARD_BTT_OCTOPUS_V1_0 5215 // BigTreeTech Octopus v1.0 (STM32F446ZE)
#define BOARD_BTT_OCTOPUS_V1_1 5216 // BigTreeTech Octopus v1.1 (STM32F446ZE)
#define BOARD_BTT_OCTOPUS_PRO_V1_0 5217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
#define BOARD_LERDGE_K 5218 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_S 5219 // Lerdge S (STM32F407VE)
#define BOARD_LERDGE_X 5220 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 5221 // VAkE 403D (STM32F446VE)
#define BOARD_FYSETC_S6 5222 // FYSETC S6 (STM32F446VE)
#define BOARD_FYSETC_S6_V2_0 5223 // FYSETC S6 v2.0 (STM32F446VE)
#define BOARD_FYSETC_SPIDER 5224 // FYSETC Spider (STM32F446VE)
#define BOARD_FLYF407ZG 5225 // FLYmaker FLYF407ZG (STM32F407ZG)
#define BOARD_MKS_ROBIN2 5226 // MKS_ROBIN2 (STM32F407ZE)
#define BOARD_MKS_ROBIN_PRO_V2 5227 // MKS Robin Pro V2 (STM32F407VE)
#define BOARD_MKS_ROBIN_NANO_V3 5228 // MKS Robin Nano V3 (STM32F407VG)
#define BOARD_MKS_ROBIN_NANO_V3_1 5229 // MKS Robin Nano V3.1 (STM32F407VE)
#define BOARD_MKS_MONSTER8_V1 5230 // MKS Monster8 V1 (STM32F407VE)
#define BOARD_MKS_MONSTER8_V2 5231 // MKS Monster8 V2 (STM32F407VE)
#define BOARD_ANET_ET4 5232 // ANET ET4 V1.x (STM32F407VG)
#define BOARD_ANET_ET4P 5233 // ANET ET4P V1.x (STM32F407VG)
#define BOARD_FYSETC_CHEETAH_V20 5234 // FYSETC Cheetah V2.0 (STM32F401RC)
#define BOARD_TH3D_EZBOARD_V2 5235 // TH3D EZBoard v2.0 (STM32F405RG)
#define BOARD_OPULO_LUMEN_REV3 5236 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5237 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
#define BOARD_MKS_EAGLE 5238 // MKS Eagle (STM32F407VE)
#define BOARD_ARTILLERY_RUBY 5239 // Artillery Ruby (STM32F401RC)
#define BOARD_FYSETC_SPIDER_V2_2 5240 // FYSETC Spider V2.2 (STM32F446VE)
#define BOARD_CREALITY_V24S1_301F4 5241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
#define BOARD_ARMED 4200 // Arm'ed STM32F4-based controller
#define BOARD_RUMBA32_V1_0 4201 // RUMBA32 STM32F446VE based controller from Aus3D
#define BOARD_RUMBA32_V1_1 4202 // RUMBA32 STM32F446VE based controller from Aus3D
#define BOARD_RUMBA32_MKS 4203 // RUMBA32 STM32F446VE based controller from Makerbase
#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE
#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE
#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_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VG)
#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT)
#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZE)
#define BOARD_BTT_OCTOPUS_V1_1 4215 // BigTreeTech Octopus v1.1 (STM32F446ZE)
#define BOARD_BTT_OCTOPUS_PRO_V1_0 4216 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE)
#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VE)
#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VE)
#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VE)
#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VE)
#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG)
#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE)
#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE)
#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG)
#define BOARD_MKS_ROBIN_NANO_V3_1 4228 // MKS Robin Nano V3.1 (STM32F407VE)
#define BOARD_MKS_MONSTER8_V1 4229 // MKS Monster8 V1 (STM32F407VE)
#define BOARD_MKS_MONSTER8_V2 4230 // MKS Monster8 V2 (STM32F407VE)
#define BOARD_ANET_ET4 4231 // ANET ET4 V1.x (STM32F407VG)
#define BOARD_ANET_ET4P 4232 // ANET ET4P V1.x (STM32F407VG)
#define BOARD_FYSETC_CHEETAH_V20 4233 // FYSETC Cheetah V2.0 (STM32F401RC)
#define BOARD_TH3D_EZBOARD_V2 4234 // TH3D EZBoard v2.0 (STM32F405RG)
#define BOARD_OPULO_LUMEN_REV3 4235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
#define BOARD_MKS_EAGLE 4237 // MKS Eagle (STM32F407VE)
#define BOARD_ARTILLERY_RUBY 4238 // Artillery Ruby (STM32F401RC)
#define BOARD_FYSETC_SPIDER_V2_2 4239 // FYSETC Spider V2.2 (STM32F446VE)
#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
#define BOARD_MKS_SKIPR_V1 4243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
#define BOARD_TRONXY_V10 4244 // TRONXY V10 (STM32F446ZE)
//
// ARM Cortex-M7
// ARM Cortex M7
//
#define BOARD_REMRAM_V1 6000 // RemRam v1
#define BOARD_TEENSY41 6001 // Teensy 4.1
#define BOARD_T41U5XBB 6002 // T41U5XBB Teensy 4.1 breakout board
#define BOARD_NUCLEO_F767ZI 6003 // ST NUCLEO-F767ZI Dev Board
#define BOARD_BTT_SKR_SE_BX_V2 6004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
#define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
#define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VG)
#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
#define BOARD_REMRAM_V1 5000 // RemRam v1
#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_V2 5004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
#define BOARD_BTT_SKR_SE_BX_V3 5005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
#define BOARD_BTT_SKR_V3_0 5006 // BigTreeTech SKR V3.0 (STM32H743VG)
#define BOARD_BTT_SKR_V3_0_EZ 5007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
//
// Espressif ESP32 WiFi
//
#define BOARD_ESPRESSIF_ESP32 7000 // Generic ESP32
#define BOARD_MRR_ESPA 7001 // MRR ESPA based on ESP32 (native pins only)
#define BOARD_MRR_ESPE 7002 // MRR ESPE based on ESP32 (with I2S stepper stream)
#define BOARD_E4D_BOX 7003 // E4d@BOX
#define BOARD_RESP32_CUSTOM 7004 // Rutilea ESP32 custom board
#define BOARD_FYSETC_E4 7005 // FYSETC E4
#define BOARD_PANDA_ZHU 7006 // Panda_ZHU
#define BOARD_PANDA_M4 7007 // Panda_M4
#define BOARD_MKS_TINYBEE 7008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
#define BOARD_ENWI_ESPNP 7009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
#define BOARD_ESPRESSIF_ESP32 6000 // Generic ESP32
#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_RESP32_CUSTOM 6004 // Rutilea ESP32 custom board
#define BOARD_FYSETC_E4 6005 // FYSETC E4
#define BOARD_PANDA_ZHU 6006 // Panda_ZHU
#define BOARD_PANDA_M4 6007 // Panda_M4
#define BOARD_MKS_TINYBEE 6008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
#define BOARD_ENWI_ESPNP 6009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
//
// SAMD51 ARM Cortex-M4
// SAMD51 ARM Cortex M4
//
#define BOARD_AGCM4_RAMPS_144 7100 // RAMPS 1.4.4
#define BOARD_BRICOLEMON_V1_0 7101 // Bricolemon
#define BOARD_BRICOLEMON_LITE_V1_0 7102 // Bricolemon Lite
#define BOARD_AGCM4_RAMPS_144 6100 // RAMPS 1.4.4
#define BOARD_BRICOLEMON_V1_0 6101 // Bricolemon
#define BOARD_BRICOLEMON_LITE_V1_0 6102 // Bricolemon Lite
//
// SAMD21 ARM Cortex-M4
// SAMD21 ARM Cortex M4
//
#define BOARD_MINITRONICS20 7103 // Minitronics v2.0
#define BOARD_MINITRONICS20 6103 // Minitronics v2.0
//
// Custom board
-1
View File
@@ -55,7 +55,6 @@
// eu Basque-Euskera
// fi Finnish
// fr French
// fr_na French without accents (DWIN T5UID1 touchscreen)
// gl Galician
// hr Croatian
// hu Hungarian
+5 -21
View File
@@ -634,9 +634,7 @@
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
// Force define expansion
#define EVAL EVAL16
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
#define EVAL(V...) EVAL16(V)
#define EVAL1024(V...) EVAL512(EVAL512(V))
#define EVAL512(V...) EVAL256(EVAL256(V))
#define EVAL256(V...) EVAL128(EVAL128(V))
@@ -714,24 +712,10 @@
( DEFER2(__RREPEAT2)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP,V) ) \
( /* Do nothing */ )
#define __RREPEAT2() _RREPEAT2
#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
#define RREPEAT_1(N,OP) RREPEAT_S(1,INCREMENT(N),OP)
#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
// Emit a list of N OP(I) items with ascending counter.
#define _REPLIST(_RPT_I,_RPT_N,_RPT_OP) \
_RPT_OP(_RPT_I) \
IF_ELSE(SUB1(_RPT_N)) \
( , DEFER2(__REPLIST)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP) ) \
( /* Do nothing */ )
#define __REPLIST() _REPLIST
// Repeat a macro, comma-separated, passing S...N-1.
#define REPLIST_S(S,N,OP) EVAL(_REPLIST(S,SUB##S(N),OP))
#define REPLIST(N,OP) REPLIST_S(0,N,OP)
#define REPLIST_1(N,OP) REPLIST_S(1,INCREMENT(N),OP)
#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
// Call OP(A) with each item as an argument
#define _MAP(_MAP_OP,A,V...) \
+29 -34
View File
@@ -31,8 +31,10 @@
//
// typename IF<(MYOPT==12), int, float>::type myvar;
//
template <bool, class L, class R> struct IF { typedef R type; };
template <class L, class R> struct IF<true, L, R> { typedef L type; };
template <bool, class L, class R>
struct IF { typedef R type; };
template <class L, class R>
struct IF<true, L, R> { typedef L type; };
#define ALL_AXIS_NAMES X, X2, Y, Y2, Z, Z2, Z3, Z4, I, J, K, U, V, W, E0, E1, E2, E3, E4, E5, E6, E7
@@ -42,7 +44,7 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
#define NUM_AXIS_LIST_1(V) LIST_N_1(NUM_AXES, V)
#define NUM_AXIS_ARRAY(V...) { NUM_AXIS_LIST(V) }
#define NUM_AXIS_ARRAY_1(V) { NUM_AXIS_LIST_1(V) }
#define NUM_AXIS_ARGS(T) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define NUM_AXIS_ARGS(T...) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define NUM_AXIS_ELEM(O) NUM_AXIS_LIST(O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
#define NUM_AXIS_DEFS(T,V) NUM_AXIS_LIST(T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
#define MAIN_AXIS_NAMES NUM_AXIS_LIST(X, Y, Z, I, J, K, U, V, W)
@@ -55,7 +57,7 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
#define LOGICAL_AXIS_LIST_1(V) NUM_AXIS_LIST_1(V) LIST_ITEM_E(V)
#define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) }
#define LOGICAL_AXIS_ARRAY_1(V) { LOGICAL_AXIS_LIST_1(V) }
#define LOGICAL_AXIS_ARGS(T) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define LOGICAL_AXIS_ARGS(T...) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
#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, T u=V, T v=V, T w=V)
#define LOGICAL_AXIS_NAMES LOGICAL_AXIS_LIST(E, X, Y, Z, I, J, K, U, V, W)
@@ -84,31 +86,24 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
#define AXIS_COLLISION(L) (AXIS4_NAME == L || AXIS5_NAME == L || AXIS6_NAME == L || AXIS7_NAME == L || AXIS8_NAME == L || AXIS9_NAME == L)
// Define types based on largest bit width stored value required
#define bits_t(W) typename IF<((W)> 16), uint32_t, typename IF<((W)> 8), uint16_t, uint8_t>::type>::type
#define uvalue_t(V) typename IF<((V)>65535), uint32_t, typename IF<((V)>255), uint16_t, uint8_t>::type>::type
#define value_t(V) typename IF<((V)>32767), int32_t, typename IF<((V)>127), int16_t, int8_t>::type>::type
// General Flags for some number of states
template<size_t N>
struct Flags {
typedef value_t(N) flagbits_t;
typedef typename IF<(N>8), uint16_t, uint8_t>::type bits_t;
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1; } N8;
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1; } N16;
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1,
b16:1, b17:1, b18:1, b19:1, b20:1, b21:1, b22:1, b23:1, b24:1, b25:1, b26:1, b27:1, b28:1, b29:1, b30:1, b31:1; } N32;
union {
flagbits_t b;
typename IF<(N>16), N32, typename IF<(N>8), N16, N8>::type>::type flag;
bits_t b;
typename IF<(N>8), N16, N8>::type flag;
};
void reset() { b = 0; }
void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
void set(const int n) { b |= (flagbits_t)_BV(n); }
void clear(const int n) { b &= ~(flagbits_t)_BV(n); }
bool test(const int n) const { return TEST(b, n); }
bool operator[](const int n) { return test(n); }
bool operator[](const int n) const { return test(n); }
int size() const { return sizeof(b); }
void reset() { b = 0; }
void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
void set(const int n) { b |= (bits_t)_BV(n); }
void clear(const int n) { b &= ~(bits_t)_BV(n); }
bool test(const int n) const { return TEST(b, n); }
bool operator[](const int n) { return test(n); }
bool operator[](const int n) const { return test(n); }
int size() const { return sizeof(b); }
};
// Specialization for a single bool flag
@@ -134,14 +129,14 @@ typedef struct AxisFlags {
struct Flags<LOGICAL_AXES> flags;
struct { bool LOGICAL_AXIS_LIST(e:1, x:1, y:1, z:1, i:1, j:1, k:1, u:1, v:1, w:1); };
};
void reset() { flags.reset(); }
void set(const int n) { flags.set(n); }
void set(const int n, const bool onoff) { flags.set(n, onoff); }
void clear(const int n) { flags.clear(n); }
bool test(const int n) const { return flags.test(n); }
bool operator[](const int n) { return flags[n]; }
bool operator[](const int n) const { return flags[n]; }
int size() const { return sizeof(flags); }
void reset() { flags.reset(); }
void set(const int n) { flags.set(n); }
void set(const int n, const bool onoff) { flags.set(n, onoff); }
void clear(const int n) { flags.clear(n); }
bool test(const int n) const { return flags.test(n); }
bool operator[](const int n) { return flags[n]; }
bool operator[](const int n) const { return flags[n]; }
int size() const { return sizeof(flags); }
} axis_flags_t;
//
@@ -187,15 +182,15 @@ enum AxisEnum : uint8_t {
, ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
};
typedef bits_t(NUM_AXIS_ENUMS) axis_bits_t;
typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
//
// Loop over axes
//
#define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, 0, NUM_AXES)
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, 0, LOGICAL_AXES)
#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, 0, DISTINCT_AXES)
#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, NUM_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)
#define LOOP_DISTINCT_E(VAR) LOOP_L_N(VAR, DISTINCT_E)
//
+6 -6
View File
@@ -38,12 +38,12 @@ void safe_delay(millis_t ms); // Delay ensuring that temperatures are
// 16x16 bit arrays
template <int W, int H>
struct FlagBits {
bits_t(W) flags[H];
void fill() { memset(flags, 0xFF, sizeof(flags)); }
void reset() { memset(flags, 0x00, sizeof(flags)); }
void unmark(const uint8_t x, const uint8_t y) { CBI(flags[y], x); }
void mark(const uint8_t x, const uint8_t y) { SBI(flags[y], x); }
bool marked(const uint8_t x, const uint8_t y) { return TEST(flags[y], x); }
typename IF<(W>8), uint16_t, uint8_t>::type bits[H];
void fill() { memset(bits, 0xFF, sizeof(bits)); }
void reset() { memset(bits, 0x00, sizeof(bits)); }
void unmark(const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
void mark(const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
bool marked(const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
inline void unmark(const xy_int8_t &xy) { unmark(xy.x, xy.y); }
inline void mark(const xy_int8_t &xy) { mark(xy.x, xy.y); }
inline bool marked(const xy_int8_t &xy) { return marked(xy.x, xy.y); }
+1 -1
View File
@@ -153,7 +153,7 @@ void LevelingBilinear::extrapolate_unprobed_bed_level() {
}
}
void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr*/) {
void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values /*= NULL*/) {
// print internal grid(s) or just the one passed as a parameter
SERIAL_ECHOLNPGM("Bilinear Leveling Grid:");
print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 3, _z_values ? *_z_values[0] : z_values[0]);
+1 -1
View File
@@ -53,7 +53,7 @@ public:
static void reset();
static void set_grid(const xy_pos_t& _grid_spacing, const xy_pos_t& _grid_start);
static void extrapolate_unprobed_bed_level();
static void print_leveling_grid(const bed_mesh_t *_z_values=nullptr);
static void print_leveling_grid(const bed_mesh_t* _z_values = NULL);
static void refresh_bed_level();
static bool has_mesh() { return !!grid_spacing.x; }
static bool mesh_is_valid() { return has_mesh(); }
@@ -32,8 +32,8 @@ enum MeshLevelingState : char {
MeshReset // G29 S5
};
#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 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))
class mesh_bed_leveling {
public:
+5 -5
View File
@@ -38,8 +38,8 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST };
struct mesh_index_pair;
#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 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];
@@ -264,9 +264,9 @@ public:
return UBL_Z_RAISE_WHEN_OFF_MESH;
#endif
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1;
const float x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1),
z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1,
x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1);
const float z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
z2 = calc_z0(rx0, x0, z_values[cx][my], x1, z_values[mx][my]);
float z0 = calc_z0(ry0, get_mesh_y(cy), z1, get_mesh_y(cy + 1), z2);
+20 -44
View File
@@ -318,7 +318,9 @@ void unified_bed_leveling::G29() {
TERN_(HAS_MULTI_HOTEND, if (active_extruder != 0) tool_change(0, true));
// Position bed horizontally and Z probe vertically.
#if HAS_SAFE_BED_LEVELING
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -349,7 +351,7 @@ void unified_bed_leveling::G29() {
#endif
do_blocking_move_to(safe_position);
#endif // HAS_SAFE_BED_LEVELING
#endif
}
// Invalidate one or more nearby mesh points, possibly all.
@@ -885,32 +887,8 @@ void set_message_with_feedback(FSTR_P const fstr) {
ui.capture();
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
do_blocking_move_to(
NUM_AXIS_LIST(
0.5f * ((MESH_MAX_X) - (MESH_MIN_X)),
0.5f * ((MESH_MAX_Y) - (MESH_MIN_Y)),
MANUAL_PROBE_START_Z
#ifdef SAFE_BED_LEVELING_START_I
, SAFE_BED_LEVELING_START_I
#endif
#ifdef SAFE_BED_LEVELING_START_J
, SAFE_BED_LEVELING_START_J
#endif
#ifdef SAFE_BED_LEVELING_START_K
, SAFE_BED_LEVELING_START_K
#endif
#ifdef SAFE_BED_LEVELING_START_U
, SAFE_BED_LEVELING_START_U
#endif
#ifdef SAFE_BED_LEVELING_START_V
, SAFE_BED_LEVELING_START_V
#endif
#ifdef SAFE_BED_LEVELING_START_W
, SAFE_BED_LEVELING_START_W
#endif
)
//, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f
);
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");
@@ -1478,17 +1456,9 @@ void unified_bed_leveling::smart_fill_mesh() {
#include "../../../libs/vector_3.h"
void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) {
#ifdef G29J_MESH_TILT_MARGIN
const float x_min = _MAX(probe.min_x() + (G29J_MESH_TILT_MARGIN), X_MIN_POS),
x_max = _MIN(probe.max_x() - (G29J_MESH_TILT_MARGIN), X_MAX_POS),
y_min = _MAX(probe.min_y() + (G29J_MESH_TILT_MARGIN), Y_MIN_POS),
y_max = _MIN(probe.max_y() - (G29J_MESH_TILT_MARGIN), Y_MAX_POS);
#else
const float x_min = probe.min_x(), x_max = probe.max_x(),
y_min = probe.min_y(), y_max = probe.max_y();
#endif
const float dx = (x_max - x_min) / (param.J_grid_size - 1),
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];
@@ -1497,7 +1467,7 @@ void unified_bed_leveling::smart_fill_mesh() {
float measured_z;
bool abort_flag = false;
#if ENABLED(VALIDATE_MESH_TILT)
#ifdef VALIDATE_MESH_TILT
float z1, z2, z3; // Needed for algorithm validation below
#endif
@@ -1513,7 +1483,9 @@ void unified_bed_leveling::smart_fill_mesh() {
abort_flag = true;
else {
measured_z -= get_z_correction(points[0]);
TERN_(VALIDATE_MESH_TILT, z1 = measured_z);
#ifdef VALIDATE_MESH_TILT
z1 = measured_z;
#endif
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
@@ -1526,7 +1498,9 @@ void unified_bed_leveling::smart_fill_mesh() {
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity);
TERN_(VALIDATE_MESH_TILT, z2 = measured_z);
#ifdef VALIDATE_MESH_TILT
z2 = measured_z;
#endif
if (isnan(measured_z))
abort_flag = true;
else {
@@ -1544,7 +1518,9 @@ void unified_bed_leveling::smart_fill_mesh() {
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity);
TERN_(VALIDATE_MESH_TILT, z3 = measured_z);
#ifdef VALIDATE_MESH_TILT
z3 = measured_z;
#endif
if (isnan(measured_z))
abort_flag = true;
else {
@@ -1691,7 +1667,7 @@ void unified_bed_leveling::smart_fill_mesh() {
* The Z error between the probed point locations and the get_z_correction()
* numbers for those locations should be 0.
*/
#if ENABLED(VALIDATE_MESH_TILT)
#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;
+5 -2
View File
@@ -80,6 +80,9 @@ namespace DirectStepping {
static void set_page_state(const page_idx_t page_idx, const PageState page_state);
};
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
template <int num_pages, int num_axes, int bits_segment, bool dir, int segments>
struct config_t {
static constexpr char CONTROL_CHAR = '!';
@@ -95,8 +98,8 @@ namespace DirectStepping {
static constexpr int TOTAL_STEPS = SEGMENT_STEPS * SEGMENTS;
static constexpr int PAGE_SIZE = (AXIS_COUNT * BITS_SEGMENT * SEGMENTS) / 8;
typedef uvalue_t(PAGE_SIZE - 1) write_byte_idx_t;
typedef uvalue_t(PAGE_COUNT - 1) page_idx_t;
typedef typename TypeSelector<(PAGE_SIZE>256), uint16_t, uint8_t>::type write_byte_idx_t;
typedef typename TypeSelector<(PAGE_COUNT>256), uint16_t, uint8_t>::type page_idx_t;
};
template <uint8_t num_pages>
+1 -9
View File
@@ -54,15 +54,7 @@ Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIX
set_background_color(background_color);
}
void Marlin_NeoPixel::set_background_off() {
#ifndef NEOPIXEL_BKGD_TIMEOUT_COLOR
#define NEOPIXEL_BKGD_TIMEOUT_COLOR { 0, 0, 0, 0 }
#endif
constexpr uint8_t background_color_off[4] = NEOPIXEL_BKGD_TIMEOUT_COLOR;
set_background_color(background_color_off);
}
#endif // NEOPIXEL_BKGD_INDEX_FIRST
#endif
void Marlin_NeoPixel::set_color(const uint32_t color) {
if (neoindex >= 0) {
+1 -2
View File
@@ -66,7 +66,7 @@
// Types
// ------------------------
typedef value_t(TERN0(NEOPIXEL_LED, NEOPIXEL_PIXELS)) pixel_index_t;
typedef IF<(TERN0(NEOPIXEL_LED, NEOPIXEL_PIXELS > 127)), int16_t, int8_t>::type pixel_index_t;
// ------------------------
// Classes
@@ -91,7 +91,6 @@ public:
static void set_background_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w);
static void set_background_color(const uint8_t (&rgbw)[4]) { set_background_color(rgbw[0], rgbw[1], rgbw[2], rgbw[3]); }
static void reset_background_color();
static void set_background_off();
#endif
static void begin() {
+1 -1
View File
@@ -471,7 +471,7 @@ void Max7219::register_setup() {
constexpr millis_t pattern_delay = 4;
int8_t spiralx, spiraly, spiral_dir;
uvalue_t(MAX7219_LEDS) spiral_count;
IF<(MAX7219_LEDS > 255), uint16_t, uint8_t>::type spiral_count;
void Max7219::test_pattern() {
constexpr int8_t way[][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } };
+3 -3
View File
@@ -293,7 +293,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
// Show "Purge More" / "Resume" menu and wait for reply
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = false;
#if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
#else
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
@@ -679,7 +679,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
#endif
// If resume_position is negative
if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
//if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
#ifdef ADVANCED_PAUSE_RESUME_PRIME
if (ADVANCED_PAUSE_RESUME_PRIME != 0)
unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
@@ -688,7 +688,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
// Now all extrusion positions are resumed and ready to be confirmed
// Set extruder to saved position
planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
sync_plan_position_e();
ui.pause_show_message(PAUSE_MESSAGE_STATUS);
#ifdef ACTION_ON_RESUMED
+39 -57
View File
@@ -31,13 +31,9 @@
#include "powerloss.h"
#include "../core/macros.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
#endif
bool PrintJobRecovery::enabled; // Initialized by settings.load()
MediaFile PrintJobRecovery::file;
SdFile PrintJobRecovery::file;
job_recovery_info_t PrintJobRecovery::info;
const char PrintJobRecovery::filename[5] = "/PLR";
uint8_t PrintJobRecovery::queue_index_r;
@@ -82,14 +78,6 @@ PrintJobRecovery recovery;
#define POWER_LOSS_RETRACT_LEN 0
#endif
// Allow power-loss recovery to be aborted
#define PLR_CAN_ABORT
#if ENABLED(PLR_CAN_ABORT)
#define PROCESS_SUBCOMMANDS_NOW(cmd) do { if (card.flag.abort_sd_printing) return; gcode.process_subcommands_now(cmd); }while(0)
#else
#define PROCESS_SUBCOMMANDS_NOW(cmd) gcode.process_subcommands_now(cmd)
#endif
/**
* Clear the recovery info
*/
@@ -317,9 +305,6 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW
// and a flag whether the raise was already done here.
if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY));
// Tell the LCD about the outage, even though it is about to die
TERN_(EXTENSIBLE_UI, ExtUI::onPowerLoss());
// Disable all heaters to reduce power loss
thermalManager.disable_all_heaters();
@@ -367,23 +352,12 @@ void PrintJobRecovery::resume() {
// Apply the dry-run flag if enabled
if (info.flag.dryrun) marlin_debug_flags |= MARLIN_DEBUG_DRYRUN;
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
struct OnExit {
uint8_t old_flags;
OnExit() {
old_flags = marlin_debug_flags;
marlin_debug_flags |= MARLIN_DEBUG_ECHO;
}
~OnExit() { marlin_debug_flags = old_flags; }
} on_exit;
#endif
// Restore cold extrusion permission
TERN_(PREVENT_COLD_EXTRUSION, thermalManager.allow_cold_extrude = info.flag.allow_cold_extrusion);
#if HAS_LEVELING
// Make sure leveling is off before any G92 and G28
PROCESS_SUBCOMMANDS_NOW(F("M420S0"));
gcode.process_subcommands_now(F("M420 S0 Z0"));
#endif
#if HAS_HEATED_BED
@@ -391,7 +365,7 @@ void PrintJobRecovery::resume() {
if (bt) {
// Restore the bed temperature
sprintf_P(cmd, PSTR("M190S%i"), bt);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
#endif
@@ -402,10 +376,10 @@ void PrintJobRecovery::resume() {
if (et) {
#if HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%iS"), e);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
sprintf_P(cmd, PSTR("M109S%i"), et);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
}
#endif
@@ -419,7 +393,7 @@ void PrintJobRecovery::resume() {
// establish the current position as best we can.
//
PROCESS_SUBCOMMANDS_NOW(F("G92.9E0")); // Reset E to 0
gcode.process_subcommands_now(F("G92.9E0")); // Reset E to 0
#if Z_HOME_TO_MAX
@@ -430,7 +404,7 @@ void PrintJobRecovery::resume() {
"G28R0\n" // Home all axes (no raise)
"G1Z%sF1200" // Move Z down to (raised) height
), dtostrf(z_now, 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#elif DISABLED(BELTPRINTER)
@@ -443,18 +417,18 @@ void PrintJobRecovery::resume() {
#if !HOMING_Z_DOWN
// Set Z to the real position
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
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));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
// Home XY with no Z raise
PROCESS_SUBCOMMANDS_NOW(F("G28R0XY")); // No raise during G28
gcode.process_subcommands_now(F("G28R0XY")); // No raise during G28
#endif
@@ -462,7 +436,7 @@ void PrintJobRecovery::resume() {
// Move to a safe XY position and home Z while avoiding the print.
const xy_pos_t p = xy_pos_t(POWER_LOSS_ZHOME_POS) TERN_(HOMING_Z_WITH_PROBE, - probe.offset_xy);
sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28HZ"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
// Mark all axes as having been homed (no effect on current_position)
@@ -473,12 +447,12 @@ void PrintJobRecovery::resume() {
// 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));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#if !HOMING_Z_DOWN
// 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));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
#endif
@@ -486,7 +460,7 @@ void PrintJobRecovery::resume() {
// 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));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
// Recover volumetric extrusion state
@@ -494,16 +468,16 @@ void PrintJobRecovery::resume() {
#if HAS_MULTI_EXTRUDER
EXTRUDER_LOOP() {
sprintf_P(cmd, PSTR("M200T%iD%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
if (!info.flag.volumetric_enabled) {
sprintf_P(cmd, PSTR("M200T%iD0"), info.active_extruder);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
#else
if (info.flag.volumetric_enabled) {
sprintf_P(cmd, PSTR("M200D%s"), dtostrf(info.filament_size[0], 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
#endif
#endif
@@ -515,10 +489,10 @@ void PrintJobRecovery::resume() {
if (et) {
#if HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%iS"), e);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
sprintf_P(cmd, PSTR("M109S%i"), et);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
}
#endif
@@ -526,7 +500,7 @@ void PrintJobRecovery::resume() {
// 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);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
// Restore print cooling fan speeds
@@ -535,7 +509,7 @@ void PrintJobRecovery::resume() {
const int f = info.fan_speed[i];
if (f) {
sprintf_P(cmd, PSTR("M106P%iS%i"), i, f);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
}
}
#endif
@@ -557,17 +531,17 @@ void PrintJobRecovery::resume() {
// Un-retract if there was a retract at outage
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
PROCESS_SUBCOMMANDS_NOW(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
gcode.process_subcommands_now(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
#endif
// Additional purge on resume if configured
#if POWER_LOSS_PURGE_LEN
sprintf_P(cmd, PSTR("G1F3000E%d"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
#endif
#if ENABLED(NOZZLE_CLEAN_FEATURE)
PROCESS_SUBCOMMANDS_NOW(F("G12"));
gcode.process_subcommands_now(F("G12"));
#endif
// Move back over to the saved XY
@@ -575,19 +549,19 @@ void PrintJobRecovery::resume() {
dtostrf(info.current_position.x, 1, 3, str_1),
dtostrf(info.current_position.y, 1, 3, str_2)
);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
// Move back down to the saved Z for printing
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
// Restore the feedrate
sprintf_P(cmd, PSTR("G1F%d"), info.feedrate);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
// Restore E position with G92.9
sprintf_P(cmd, PSTR("G92.9E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat);
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
@@ -599,14 +573,22 @@ void PrintJobRecovery::resume() {
// Relative axis modes
gcode.axis_relative = info.axis_relative;
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
const uint8_t old_flags = marlin_debug_flags;
marlin_debug_flags |= MARLIN_DEBUG_ECHO;
#endif
// Continue to apply PLR when a file is resumed!
enable(true);
// Resume the SD file from the last position
sprintf_P(cmd, M23_STR, &info.sd_filename[0]);
PROCESS_SUBCOMMANDS_NOW(cmd);
char *fn = info.sd_filename;
sprintf_P(cmd, M23_STR, fn);
gcode.process_subcommands_now(cmd);
sprintf_P(cmd, PSTR("M24S%ldT%ld"), resume_sdpos, info.print_job_elapsed);
PROCESS_SUBCOMMANDS_NOW(cmd);
gcode.process_subcommands_now(cmd);
TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags);
}
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+1 -1
View File
@@ -138,7 +138,7 @@ class PrintJobRecovery {
public:
static const char filename[5];
static MediaFile file;
static SdFile file;
static job_recovery_info_t info;
static uint8_t queue_index_r; //!< Queue index of the active command
+1 -1
View File
@@ -141,7 +141,7 @@ void SpindleLaser::apply_power(const uint8_t opwr) {
else
ocr_off();
#elif ENABLED(SPINDLE_SERVO)
servo[SPINDLE_SERVO_NR].move(opwr);
MOVE_SERVO(SPINDLE_SERVO_NR, power);
#else
WRITE(SPINDLE_LASER_ENA_PIN, enabled() ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE);
isReadyForUI = true;
+1 -1
View File
@@ -57,7 +57,7 @@
#endif
#endif
typedef uvalue_t(SPEED_POWER_MAX) cutter_cpower_t;
typedef IF<(SPEED_POWER_MAX > 255), uint16_t, uint8_t>::type cutter_cpower_t;
#if CUTTER_UNIT_IS(RPM) && SPEED_POWER_MAX > 255
typedef uint16_t cutter_power_t;
+24 -4
View File
@@ -29,11 +29,31 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../core/debug_out.h"
#define _TRAM_NAME_DEF(N) PGMSTR(point_name_##N, TRAMMING_POINT_NAME_##N);
#define _TRAM_NAME_ITEM(N) point_name_##N
REPEAT_1(_NR_TRAM_NAMES, _TRAM_NAME_DEF)
PGMSTR(point_name_1, TRAMMING_POINT_NAME_1);
PGMSTR(point_name_2, TRAMMING_POINT_NAME_2);
PGMSTR(point_name_3, TRAMMING_POINT_NAME_3);
#ifdef TRAMMING_POINT_NAME_4
PGMSTR(point_name_4, TRAMMING_POINT_NAME_4);
#ifdef TRAMMING_POINT_NAME_5
PGMSTR(point_name_5, TRAMMING_POINT_NAME_5);
#ifdef TRAMMING_POINT_NAME_6
PGMSTR(point_name_6, TRAMMING_POINT_NAME_6);
#endif
#endif
#endif
PGM_P const tramming_point_name[] PROGMEM = { REPLIST_1(_NR_TRAM_NAMES, _TRAM_NAME_ITEM) };
PGM_P const tramming_point_name[] PROGMEM = {
point_name_1, point_name_2, point_name_3
#ifdef TRAMMING_POINT_NAME_4
, point_name_4
#ifdef TRAMMING_POINT_NAME_5
, point_name_5
#ifdef TRAMMING_POINT_NAME_6
, point_name_6
#endif
#endif
#endif
};
#ifdef ASSISTED_TRAMMING_WAIT_POSITION
+33 -24
View File
@@ -31,34 +31,43 @@
constexpr xy_pos_t tramming_points[] = TRAMMING_POINT_XY;
#define G35_PROBE_COUNT COUNT(tramming_points)
static_assert(WITHIN(G35_PROBE_COUNT, 3, 9), "TRAMMING_POINT_XY requires between 3 and 9 XY positions.");
static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions.");
#ifdef TRAMMING_POINT_NAME_9
#define _NR_TRAM_NAMES 9
#elif defined(TRAMMING_POINT_NAME_8)
#define _NR_TRAM_NAMES 8
#elif defined(TRAMMING_POINT_NAME_7)
#define _NR_TRAM_NAMES 7
#elif defined(TRAMMING_POINT_NAME_6)
#define _NR_TRAM_NAMES 6
#elif defined(TRAMMING_POINT_NAME_5)
#define _NR_TRAM_NAMES 5
#elif defined(TRAMMING_POINT_NAME_4)
#define _NR_TRAM_NAMES 4
#elif defined(TRAMMING_POINT_NAME_3)
#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);
extern const char point_name_1[], point_name_2[], point_name_3[]
#ifdef TRAMMING_POINT_NAME_4
, point_name_4[]
#ifdef TRAMMING_POINT_NAME_5
, point_name_5[]
#ifdef TRAMMING_POINT_NAME_6
, point_name_6[]
#endif
#endif
#endif
;
#define _NR_TRAM_NAMES 2
#ifdef TRAMMING_POINT_NAME_3
#undef _NR_TRAM_NAMES
#define _NR_TRAM_NAMES 3
#else
#define _NR_TRAM_NAMES 0
#ifdef TRAMMING_POINT_NAME_4
#undef _NR_TRAM_NAMES
#define _NR_TRAM_NAMES 4
#ifdef TRAMMING_POINT_NAME_5
#undef _NR_TRAM_NAMES
#define _NR_TRAM_NAMES 5
#ifdef TRAMMING_POINT_NAME_6
#undef _NR_TRAM_NAMES
#define _NR_TRAM_NAMES 6
#endif
#endif
#endif
#endif
static_assert(_NR_TRAM_NAMES >= G35_PROBE_COUNT, "Define enough TRAMMING_POINT_NAME_s for all TRAMMING_POINT_XY entries.");
#define _TRAM_NAME_PTR(N) point_name_##N[]
extern const char REPLIST_1(_NR_TRAM_NAMES, _TRAM_NAME_PTR);
#define _CHECK_TRAM_POINT(N) static_assert(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.");
REPEAT(_NR_TRAM_NAMES, _CHECK_TRAM_POINT)
#undef _CHECK_TRAM_POINT
#undef _NR_TRAM_NAMES
extern PGM_P const tramming_point_name[];
+7 -3
View File
@@ -453,7 +453,9 @@ G29_TYPE GcodeSuite::G29() {
}
// Position bed horizontally and Z probe vertically.
#if HAS_SAFE_BED_LEVELING
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -484,14 +486,14 @@ G29_TYPE GcodeSuite::G29() {
#endif
do_blocking_move_to(safe_position);
#endif // HAS_SAFE_BED_LEVELING
#endif
// Disable auto bed leveling during G29.
// Be formal so G29 can be done successively without G28.
if (!no_action) set_bed_leveling_enabled(false);
// Deploy certain probes before starting probing
#if ENABLED(BLTOUCH) || BOTH(HAS_Z_SERVO_PROBE, Z_SERVO_INTERMEDIATE_STOW)
#if ENABLED(BLTOUCH)
do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE);
#elif HAS_BED_PROBE
if (probe.deploy()) { // (returns true on deploy failure)
@@ -947,6 +949,8 @@ G29_TYPE GcodeSuite::G29() {
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
#endif
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));
report_current_position();
+4 -2
View File
@@ -108,7 +108,9 @@ void GcodeSuite::G29() {
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
// Position bed horizontally and Z probe vertically.
#if HAS_SAFE_BED_LEVELING
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -139,7 +141,7 @@ void GcodeSuite::G29() {
#endif
do_blocking_move_to(safe_position);
#endif // HAS_SAFE_BED_LEVELING
#endif
return;
}
+2 -2
View File
@@ -86,7 +86,7 @@
NUM_AXIS_LIST(
TERN0(X_SENSORLESS, tmc_enable_stallguard(stepperX)),
TERN0(Y_SENSORLESS, tmc_enable_stallguard(stepperY)),
false, false, false, false, false, false, false
false, false, false, false
)
, TERN0(X2_SENSORLESS, tmc_enable_stallguard(stepperX2))
, TERN0(Y2_SENSORLESS, tmc_enable_stallguard(stepperY2))
@@ -124,7 +124,7 @@
* (Z is already at the right height)
*/
constexpr xy_float_t safe_homing_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT };
#if HAS_HOME_OFFSET && DISABLED(Z_SAFE_HOMING_POINT_ABSOLUTE)
#if HAS_HOME_OFFSET
xy_float_t okay_homing_xy = safe_homing_xy;
okay_homing_xy -= home_offset;
#else
+1 -1
View File
@@ -58,7 +58,7 @@ void GcodeSuite::G34() {
// Move XY to safe position
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Parking XY");
const xy_pos_t safe_pos = GANTRY_CALIBRATION_SAFE_POSITION;
do_blocking_move_to_xy(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
do_blocking_move_to(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
#endif
const float move_distance = parser.intval('Z', GANTRY_CALIBRATION_EXTRA_HEIGHT),
+16 -29
View File
@@ -221,9 +221,9 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
/**
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
*
* P<accel> Printing moves
* R<accel> Retract only (no X, Y, Z) moves
* T<accel> Travel (non printing) moves
* P = Printing moves
* R = Retract only (no X, Y, Z) moves
* T = Travel (non printing) moves
*/
void GcodeSuite::M204() {
if (!parser.seen("PRST"))
@@ -247,37 +247,24 @@ void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
);
}
#if AXIS_COLLISION('B')
#define M205_MIN_SEG_TIME_PARAM 'D'
#define M205_MIN_SEG_TIME_STR "D"
#warning "Use 'M205 D' for Minimum Segment Time."
#else
#define M205_MIN_SEG_TIME_PARAM 'B'
#define M205_MIN_SEG_TIME_STR "B"
#endif
/**
* M205: Set Advanced Settings
*
* B<µs> : Min Segment Time
* S<units/s> : Min Feed Rate
* T<units/s> : Min Travel Feed Rate
*
* With CLASSIC_JERK:
* X<units/sec^2> : Max X Jerk
* Y<units/sec^2> : Max Y Jerk
* Z<units/sec^2> : Max Z Jerk
* ... : etc
* E<units/sec^2> : Max E Jerk
*
* Without CLASSIC_JERK:
* J(mm) : Junction Deviation
* B = Min Segment Time (µs)
* S = Min Feed Rate (units/s)
* T = Min Travel Feed Rate (units/s)
* X = Max X Jerk (units/sec^2)
* Y = Max Y Jerk (units/sec^2)
* Z = Max Z Jerk (units/sec^2)
* E = Max E Jerk (units/sec^2)
* J = Junction Deviation (mm) (If not using CLASSIC_JERK)
*/
void GcodeSuite::M205() {
if (!parser.seen_any()) return M205_report();
if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE")))
return M205_report();
//planner.synchronize();
if (parser.seenval(M205_MIN_SEG_TIME_PARAM)) planner.settings.min_segment_time_us = parser.value_ulong();
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
@@ -317,7 +304,7 @@ void GcodeSuite::M205() {
void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F(
"Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
"Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
#if HAS_CLASSIC_JERK
NUM_AXIS_GANG(
@@ -330,7 +317,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
")"
));
SERIAL_ECHOLNPGM_P(
PSTR(" M205 " M205_MIN_SEG_TIME_STR), LINEAR_UNIT(planner.settings.min_segment_time_us)
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
+3
View File
@@ -29,6 +29,9 @@
#if NUM_AXES == XYZ && EXTRUDERS >= 1
#define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup.
#if AXIS_COLLISION('B')
#error "M350 parameter 'B' collision with axis name."
#endif
#endif
/**
+4 -6
View File
@@ -128,13 +128,11 @@ void GcodeSuite::M240() {
if (homing_needed_error()) return;
const xyz_pos_t old_pos = NUM_AXIS_ARRAY(
const xyz_pos_t old_pos = {
current_position.x + parser.linearval('A'),
current_position.y + parser.linearval('B'),
current_position.z,
current_position.i, current_position.j, current_position.k,
current_position.u, current_position.v, current_position.w
);
current_position.z
};
#ifdef PHOTO_RETRACT_MM
const float rval = parser.linearval('R', _PHOTO_RETRACT_MM);
@@ -142,7 +140,7 @@ void GcodeSuite::M240() {
e_move_m240(-rval, sval);
#endif
feedRate_t fr_mm_s = parser.feedrateval('F');
feedRate_t fr_mm_s = MMM_TO_MMS(parser.linearval('F'));
if (fr_mm_s) NOLESS(fr_mm_s, 10.0f);
constexpr xyz_pos_t photo_position = PHOTO_POSITION;
+10 -14
View File
@@ -63,26 +63,22 @@ void GcodeSuite::M591() {
}
}
else {
#if DISABLED(SLIM_LCD_MENUS)
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Filament runout ");
serialprint_onoff(runout.enabled[active_extruder]);
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(active_extruder), "mm");
SERIAL_ECHOPGM(" ; Mode ", runout.mode[active_extruder]);
#if ENABLED(HOST_ACTION_COMMANDS)
SERIAL_ECHOPGM(" ; Host handling ");
serialprint_onoff(runout.host_handling);
#endif
SERIAL_EOL();
#else
M591_report(false);
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Filament runout ");
serialprint_onoff(runout.enabled[active_extruder]);
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(active_extruder), "mm");
SERIAL_ECHOPGM(" ; Mode ", runout.mode[active_extruder]);
#if ENABLED(HOST_ACTION_COMMANDS)
SERIAL_ECHOPGM(" ; Host handling ");
serialprint_onoff(runout.host_handling);
#endif
SERIAL_EOL();
}
}
void GcodeSuite::M591_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
LOOP_S_L_N(e, 1, NUM_RUNOUT_SENSORS)
LOOP_S_L_N(e, 0, NUM_RUNOUT_SENSORS)
SERIAL_ECHOLNPGM(
" M591"
#if MULTI_FILAMENT_SENSOR
+3 -2
View File
@@ -931,8 +931,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if HAS_FILAMENT_SENSOR
case 412: M412(); break; // Alias to M591
case 591: M591(); break;
#endif // M591 Configure filament runout detection
case 591: M591(); break; // M591 Configure filament runout detection
#endif
#if HAS_SHAPING
case 593: M593(); break; // M593: Set Input Shaping parameters
#endif
-3
View File
@@ -476,9 +476,6 @@ public:
private:
friend class MarlinSettings;
#if ENABLED(ARC_SUPPORT)
friend void plan_arc(const xyze_pos_t&, const ab_float_t&, const bool, const uint8_t);
#endif
#if ENABLED(MARLIN_DEV_MODE)
static void D(const int16_t dcode);
+3 -1
View File
@@ -33,7 +33,9 @@
/**
* M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
*
* *** TODO: Deprecate M206 for SCARA in favor of M665.
* *** @thinkyhead: I recommend deprecating M206 for SCARA in favor of M665.
* *** M206 for SCARA will remain enabled in 1.1.x for compatibility.
* *** In the 2.0 release, it will simply be disabled by default.
*/
void GcodeSuite::M206() {
if (!parser.seen_any()) return M206_report();
+74 -58
View File
@@ -45,75 +45,91 @@ extern xyze_pos_t destination;
* G0, G1: Coordinated movement of X Y Z E axes
*/
void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
if (!MOTION_CONDITIONS) return;
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
if (IsRunning()
#if ENABLED(NO_MOTION_BEFORE_HOMING)
&& !homing_needed_error(
NUM_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),
| (parser.seen_test(AXIS7_NAME) ? _BV(U_AXIS) : 0),
| (parser.seen_test(AXIS8_NAME) ? _BV(V_AXIS) : 0),
| (parser.seen_test(AXIS9_NAME) ? _BV(W_AXIS) : 0))
)
#endif
) {
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
#ifdef G0_FEEDRATE
feedRate_t old_feedrate;
#if ENABLED(VARIABLE_G0_FEEDRATE)
#ifdef G0_FEEDRATE
feedRate_t old_feedrate;
#if ENABLED(VARIABLE_G0_FEEDRATE)
if (fast_move) {
old_feedrate = feedrate_mm_s; // Back up the (old) motion mode feedrate
feedrate_mm_s = fast_move_feedrate; // Get G0 feedrate from last usage
}
#endif
#endif
get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power)
#ifdef G0_FEEDRATE
if (fast_move) {
old_feedrate = feedrate_mm_s; // Back up the (old) motion mode feedrate
feedrate_mm_s = fast_move_feedrate; // Get G0 feedrate from last usage
#if ENABLED(VARIABLE_G0_FEEDRATE)
fast_move_feedrate = feedrate_mm_s; // Save feedrate for the next G0
#else
old_feedrate = feedrate_mm_s; // Back up the (new) motion mode feedrate
feedrate_mm_s = MMM_TO_MMS(G0_FEEDRATE); // Get the fixed G0 feedrate
#endif
}
#endif
#endif
get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power)
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
#ifdef G0_FEEDRATE
if (fast_move) {
#if ENABLED(VARIABLE_G0_FEEDRATE)
fast_move_feedrate = feedrate_mm_s; // Save feedrate for the next G0
#else
old_feedrate = feedrate_mm_s; // Back up the (new) motion mode feedrate
feedrate_mm_s = MMM_TO_MMS(G0_FEEDRATE); // Get the fixed G0 feedrate
#endif
}
#endif
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
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_test('E')
&& !parser.seen(STR_AXES_MAIN)
) {
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)) {
current_position.e = destination.e; // Hide a G1-based retract/recover from calculations
sync_plan_position_e(); // AND from the planner
return fwretract.retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
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_test('E')
&& !parser.seen(STR_AXES_MAIN)
) {
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)) {
current_position.e = destination.e; // Hide a G1-based retract/recover from calculations
sync_plan_position_e(); // AND from the planner
return fwretract.retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
}
}
}
}
#endif // FWRETRACT
#endif // FWRETRACT
#if EITHER(IS_SCARA, POLAR)
fast_move ? prepare_fast_move_to_destination() : prepare_line_to_destination();
#else
prepare_line_to_destination();
#endif
#ifdef G0_FEEDRATE
// Restore the motion mode feedrate
if (fast_move) feedrate_mm_s = old_feedrate;
#endif
#if ENABLED(NANODLP_Z_SYNC)
#if ENABLED(NANODLP_ALL_AXIS)
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
#if EITHER(IS_SCARA, POLAR)
fast_move ? prepare_fast_move_to_destination() : prepare_line_to_destination();
#else
#define _MOVE_SYNC parser.seenval('Z') // Only for Z move
prepare_line_to_destination();
#endif
if (_MOVE_SYNC) {
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
#ifdef G0_FEEDRATE
// Restore the motion mode feedrate
if (fast_move) feedrate_mm_s = old_feedrate;
#endif
#if ENABLED(NANODLP_Z_SYNC)
#if ENABLED(NANODLP_ALL_AXIS)
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
#else
#define _MOVE_SYNC parser.seenval('Z') // Only for Z move
#endif
if (_MOVE_SYNC) {
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
}
}
+75 -77
View File
@@ -142,8 +142,8 @@ void plan_arc(
part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total
ARC_LIJKUVWE_CODE(
const float per_circle_L = travel_L * part_per_circle, // X, Y, or Z movement per circle
const float per_circle_I = travel_I * part_per_circle, // The rest are also non-arc
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_U = travel_U * part_per_circle,
@@ -154,9 +154,9 @@ void plan_arc(
xyze_pos_t temp_position = current_position;
for (uint16_t n = circles; n--;) {
ARC_LIJKUVWE_CODE( // Destination Linear Axes
temp_position[axis_l] += per_circle_L, // Linear X, Y, or Z
temp_position.i += per_circle_I, // The rest are also non-circular
ARC_LIJKUVWE_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.u += per_circle_U,
@@ -167,8 +167,8 @@ void plan_arc(
plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle
}
ARC_LIJKUVWE_CODE(
travel_L = cart[axis_l] - current_position[axis_l], // Linear X, Y, or Z
travel_I = cart.i - current_position.i, // The rest are also non-arc
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_U = cart.u - current_position.u,
@@ -183,21 +183,16 @@ void plan_arc(
// Return if the move is near zero
if (flat_mm < 0.0001f
GANG_N(SUB2(NUM_AXES), // Two axes for the arc
&& NEAR_ZERO(travel_L), // Linear X, Y, or Z
&& NEAR_ZERO(travel_I),
&& NEAR_ZERO(travel_J),
&& NEAR_ZERO(travel_K),
&& NEAR_ZERO(travel_U),
&& NEAR_ZERO(travel_V),
&& NEAR_ZERO(travel_W)
GANG_N(SUB2(NUM_AXES),
&& travel_L < 0.0001f,
&& travel_I < 0.0001f,
&& travel_J < 0.0001f,
&& travel_K < 0.0001f,
&& travel_U < 0.0001f,
&& travel_V < 0.0001f,
&& travel_W < 0.0001f
)
) {
#if HAS_EXTRUDERS
if (!NEAR_ZERO(travel_E)) gcode.G0_G1(); // Handle retract/recover as G1
return;
#endif
}
) return;
// Feedrate for the move, scaled by the feedrate multiplier
const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s);
@@ -361,6 +356,8 @@ void plan_arc(
planner.apply_leveling(raw);
#endif
hints.curve_radius = i > 1 ? radius : 0;
// calculate safe speed for stopping by the end of the arc
arc_mm_remaining -= segment_mm;
hints.safe_exit_speed_sqr = _MIN(limiting_speed_sqr, 2 * limiting_accel * arc_mm_remaining);
@@ -431,70 +428,71 @@ void plan_arc(
* G3 X20 Y12 R14 ; CCW circle with r=14 ending at X20 Y12
*/
void GcodeSuite::G2_G3(const bool clockwise) {
if (!MOTION_CONDITIONS) return;
if (MOTION_CONDITIONS) {
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
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
#if ENABLED(SF_ARC_FIX)
const bool relative_mode_backup = relative_mode;
relative_mode = true;
#endif
get_destination_from_command(); // Get X Y [Z[I[J[K...]]]] [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);
TERN_(SF_ARC_FIX, relative_mode = relative_mode_backup);
ab_float_t arc_offset = { 0, 0 };
if (parser.seenval('R')) {
const float r = parser.value_linear_units();
if (r) {
const xy_pos_t p1 = current_position, p2 = destination;
if (p1 != p2) {
const xy_pos_t d2 = (p2 - p1) * 0.5f; // XY vector to midpoint of move from current
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
len = d2.magnitude(), // Distance to mid-point of move from current
h2 = (r - len) * (r + len), // factored to reduce rounding error
h = (h2 >= 0) ? SQRT(h2) : 0.0f; // Distance to the arc pivot-point from midpoint
const xy_pos_t s = { -d2.y, d2.x }; // Perpendicular bisector. (Divide by len for unit vector.)
arc_offset = d2 + s / len * e * h; // The calculated offset (mid-point if |r| <= len)
ab_float_t arc_offset = { 0, 0 };
if (parser.seenval('R')) {
const float r = parser.value_linear_units();
if (r) {
const xy_pos_t p1 = current_position, p2 = destination;
if (p1 != p2) {
const xy_pos_t d2 = (p2 - p1) * 0.5f; // XY vector to midpoint of move from current
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
len = d2.magnitude(), // Distance to mid-point of move from current
h2 = (r - len) * (r + len), // factored to reduce rounding error
h = (h2 >= 0) ? SQRT(h2) : 0.0f; // Distance to the arc pivot-point from midpoint
const xy_pos_t s = { -d2.y, d2.x }; // Perpendicular bisector. (Divide by len for unit vector.)
arc_offset = d2 + s / len * e * h; // The calculated offset (mid-point if |r| <= len)
}
}
}
else {
#if ENABLED(CNC_WORKSPACE_PLANES)
char achar, bchar;
switch (workspace_plane) {
default:
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
case GcodeSuite::PLANE_ZX: achar = 'K'; bchar = 'I'; break;
}
#else
constexpr char achar = 'I', bchar = 'J';
#endif
if (parser.seenval(achar)) arc_offset.a = parser.value_linear_units();
if (parser.seenval(bchar)) arc_offset.b = parser.value_linear_units();
}
if (arc_offset) {
#if ENABLED(ARC_P_CIRCLES)
// P indicates number of circles to do
const int8_t circles_to_do = parser.byteval('P');
if (!WITHIN(circles_to_do, 0, 100))
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
#else
constexpr uint8_t circles_to_do = 0;
#endif
// Send the arc to the planner
plan_arc(destination, arc_offset, clockwise, circles_to_do);
reset_stepper_timeout();
}
else
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
}
else {
#if ENABLED(CNC_WORKSPACE_PLANES)
char achar, bchar;
switch (workspace_plane) {
default:
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
case GcodeSuite::PLANE_ZX: achar = 'K'; bchar = 'I'; break;
}
#else
constexpr char achar = 'I', bchar = 'J';
#endif
if (parser.seenval(achar)) arc_offset.a = parser.value_linear_units();
if (parser.seenval(bchar)) arc_offset.b = parser.value_linear_units();
}
if (arc_offset) {
#if ENABLED(ARC_P_CIRCLES)
// P indicates number of circles to do
const int8_t circles_to_do = parser.byteval('P');
if (!WITHIN(circles_to_do, 0, 100))
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
#else
constexpr uint8_t circles_to_do = 0;
#endif
// Send the arc to the planner
plan_arc(destination, arc_offset, clockwise, circles_to_do);
reset_stepper_timeout();
}
else
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
}
#endif // ARC_SUPPORT
+7 -1
View File
@@ -110,7 +110,13 @@ void GcodeSuite::G38(const int8_t subcode) {
remember_feedrate_scaling_off();
const bool error_on_fail = TERN(G38_PROBE_AWAY, !TEST(subcode, 0), subcode == 2);
const bool error_on_fail =
#if ENABLED(G38_PROBE_AWAY)
!TEST(subcode, 0)
#else
(subcode == 2)
#endif
;
// If any axis has enough movement, do the move
LOOP_NUM_AXES(i)
+5 -12
View File
@@ -31,13 +31,11 @@
/**
* M306: MPC settings and autotune
*
* E<extruder> Extruder index. (Default: Active Extruder)
* T Autotune the active extruder.
*
* T Autotune the specified or active extruder.
*
* Set MPC values manually for the specified or active extruder:
* A<watts/kelvin> Ambient heat transfer coefficient (no fan).
* C<joules/kelvin> Block heat capacity.
* E<extruder> Extruder number to set. (Default: E0)
* F<watts/kelvin> Ambient heat transfer coefficient (fan on full).
* H<joules/kelvin/mm> Filament heat capacity per mm.
* P<watts> Heater power.
@@ -45,21 +43,16 @@
*/
void GcodeSuite::M306() {
const uint8_t e = TERN(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder), 0);
if (e >= (EXTRUDERS)) {
SERIAL_ECHOLNPGM("?(E)xtruder index out of range (0-", (EXTRUDERS) - 1, ").");
return;
}
if (parser.seen_test('T')) {
LCD_MESSAGE(MSG_MPC_AUTOTUNE);
thermalManager.MPC_autotune(e);
thermalManager.MPC_autotune();
ui.reset_status();
return;
}
if (parser.seen("ACFPRH")) {
MPC_t &mpc = thermalManager.temp_hotend[e].mpc;
const heater_id_t hid = (heater_id_t)parser.intval('E', 0);
MPC_t &mpc = thermalManager.temp_hotend[hid].mpc;
if (parser.seenval('P')) mpc.heater_power = parser.value_float();
if (parser.seenval('C')) mpc.block_heat_capacity = parser.value_float();
if (parser.seenval('R')) mpc.sensor_responsiveness = parser.value_float();
+37 -49
View File
@@ -485,7 +485,7 @@
#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, NEXTION_TFT)
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, DGUS_LCD_UI_CREALITY_TOUCH)
#define IS_EXTUI 1
#define EXTENSIBLE_UI
#endif
@@ -613,9 +613,7 @@
#undef TEMP_SENSOR_7
#undef SINGLENOZZLE
#undef SWITCHING_EXTRUDER
#undef MECHANICAL_SWITCHING_EXTRUDER
#undef SWITCHING_NOZZLE
#undef MECHANICAL_SWITCHING_NOZZLE
#undef MIXING_EXTRUDER
#undef HOTEND_IDLE_TIMEOUT
#undef DISABLE_E
@@ -631,19 +629,12 @@
#define E_TERN_(N) TERN_(HAS_MULTI_EXTRUDER, N)
#define E_TERN0(N) TERN0(HAS_MULTI_EXTRUDER, N)
#if EITHER(SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_EXTRUDER)
#define HAS_SWITCHING_EXTRUDER 1
#endif
#if EITHER(SWITCHING_NOZZLE, MECHANICAL_SWITCHING_NOZZLE)
#define HAS_SWITCHING_NOZZLE 1
#endif
#if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0
#define E_STEPPERS 2
#define E_MANUAL 1
#elif HAS_SWITCHING_EXTRUDER // One stepper for every two EXTRUDERS
#elif ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
#if EXTRUDERS > 4
#define E_STEPPERS 3
@@ -652,7 +643,7 @@
#else
#define E_STEPPERS 1
#endif
#if !HAS_SWITCHING_NOZZLE
#if DISABLED(SWITCHING_NOZZLE)
#define HOTENDS E_STEPPERS
#endif
@@ -677,7 +668,7 @@
#endif
// No inactive extruders with SWITCHING_NOZZLE or Průša MMU1
#if HAS_SWITCHING_NOZZLE || HAS_PRUSA_MMU1
#if ENABLED(SWITCHING_NOZZLE) || HAS_PRUSA_MMU1
#undef DISABLE_INACTIVE_EXTRUDER
#endif
@@ -767,31 +758,39 @@
#define HAS_X_AXIS 1
#if NUM_AXES >= XY
#define HAS_Y_AXIS 1
#endif
#if NUM_AXES >= XYZ
#define HAS_Z_AXIS 1
#endif
#if NUM_AXES >= 4
#define HAS_I_AXIS 1
#endif
#if NUM_AXES >= 5
#define HAS_J_AXIS 1
#endif
#if NUM_AXES >= 6
#define HAS_K_AXIS 1
#endif
#if NUM_AXES >= 7
#define HAS_U_AXIS 1
#endif
#if NUM_AXES >= 8
#define HAS_V_AXIS 1
#endif
#if NUM_AXES >= 9
#define HAS_W_AXIS 1
#if NUM_AXES >= XYZ
#define HAS_Z_AXIS 1
#ifdef Z4_DRIVER_TYPE
#define NUM_Z_STEPPERS 4
#elif defined(Z3_DRIVER_TYPE)
#define NUM_Z_STEPPERS 3
#elif defined(Z2_DRIVER_TYPE)
#define NUM_Z_STEPPERS 2
#else
#define NUM_Z_STEPPERS 1
#endif
#if NUM_AXES >= 4
#define HAS_I_AXIS 1
#if NUM_AXES >= 5
#define HAS_J_AXIS 1
#if NUM_AXES >= 6
#define HAS_K_AXIS 1
#if NUM_AXES >= 7
#define HAS_U_AXIS 1
#if NUM_AXES >= 8
#define HAS_V_AXIS 1
#if NUM_AXES >= 9
#define HAS_W_AXIS 1
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#if !HAS_Y_AXIS
#undef AVOID_OBSTACLES
#undef ENDSTOPPULLUP_YMIN
#undef ENDSTOPPULLUP_YMAX
#undef Y_MIN_ENDSTOP_INVERTING
@@ -808,17 +807,7 @@
#undef MAX_SOFTWARE_ENDSTOP_Y
#endif
#if HAS_Z_AXIS
#ifdef Z4_DRIVER_TYPE
#define NUM_Z_STEPPERS 4
#elif defined(Z3_DRIVER_TYPE)
#define NUM_Z_STEPPERS 3
#elif defined(Z2_DRIVER_TYPE)
#define NUM_Z_STEPPERS 2
#else
#define NUM_Z_STEPPERS 1
#endif
#else
#if !HAS_Z_AXIS
#undef ENDSTOPPULLUP_ZMIN
#undef ENDSTOPPULLUP_ZMAX
#undef Z_MIN_ENDSTOP_INVERTING
@@ -833,7 +822,6 @@
#undef Z_MIN_POS
#undef Z_MAX_POS
#undef MANUAL_Z_HOME_POS
#undef Z_SAFE_HOMING
#undef MIN_SOFTWARE_ENDSTOP_Z
#undef MAX_SOFTWARE_ENDSTOP_Z
#endif
@@ -945,7 +933,7 @@
/**
* Number of Primary Linear Axes (e.g., XYZ)
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2, Z2, Z3, Z4)
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
*/
#if NUM_AXES >= 3
#define PRIMARY_LINEAR_AXES 3
@@ -1073,7 +1061,7 @@
#endif
// Switching extruder has its own servo?
#if ENABLED(SWITCHING_EXTRUDER) && (!HAS_SWITCHING_NOZZLE || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
#if ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
#define DO_SWITCH_EXTRUDER 1
#endif
+113 -178
View File
@@ -30,26 +30,26 @@
#define AXIS_RELATIVE_MODES {}
#endif
#if defined(SWITCHING_NOZZLE_E1_SERVO_NR) && DISABLED(MECHANICAL_SWITCHING_NOZZLE)
#ifdef SWITCHING_NOZZLE_E1_SERVO_NR
#define SWITCHING_NOZZLE_TWO_SERVOS 1
#endif
// Determine NUM_SERVOS if none was supplied
#ifndef NUM_SERVOS
#define NUM_SERVOS 0
#if HAS_Z_SERVO_PROBE && NUM_SERVOS <= Z_PROBE_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
#endif
#if ENABLED(CHAMBER_VENT) && NUM_SERVOS <= CHAMBER_VENT_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (CHAMBER_VENT_SERVO_NR + 1)
#endif
#if ENABLED(SWITCHING_TOOLHEAD) && NUM_SERVOS <= SWITCHING_TOOLHEAD_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_TOOLHEAD_SERVO_NR + 1)
#endif
#if ENABLED(SWITCHING_NOZZLE)
#if ANY(HAS_Z_SERVO_PROBE, CHAMBER_VENT, SWITCHING_TOOLHEAD, SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SPINDLE_SERVO)
#if NUM_SERVOS <= Z_PROBE_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
#endif
#if NUM_SERVOS <= CHAMBER_VENT_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (CHAMBER_VENT_SERVO_NR + 1)
#endif
#if NUM_SERVOS <= SWITCHING_TOOLHEAD_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_TOOLHEAD_SERVO_NR + 1)
#endif
#if NUM_SERVOS <= SWITCHING_NOZZLE_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_NOZZLE_SERVO_NR + 1)
@@ -58,8 +58,6 @@
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_NOZZLE_E1_SERVO_NR + 1)
#endif
#endif
#if ENABLED(SWITCHING_EXTRUDER)
#if NUM_SERVOS <= SWITCHING_EXTRUDER_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_EXTRUDER_SERVO_NR + 1)
@@ -68,12 +66,12 @@
#undef NUM_SERVOS
#define NUM_SERVOS (SWITCHING_EXTRUDER_E23_SERVO_NR + 1)
#endif
#if NUM_SERVOS <= SPINDLE_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SPINDLE_SERVO_NR + 1)
#endif
#endif
#if ENABLED(SPINDLE_SERVO) && NUM_SERVOS <= SPINDLE_SERVO_NR
#undef NUM_SERVOS
#define NUM_SERVOS (SPINDLE_SERVO_NR + 1)
#endif
#endif // !defined(NUM_SERVOS)
#endif
// Convenience override for a BLTouch alone
#if ENABLED(BLTOUCH) && NUM_SERVOS == 1
@@ -90,108 +88,56 @@
// Some options are disallowed without required axes
#if !HAS_Y_AXIS
#undef ARC_SUPPORT
#undef CALIBRATION_MEASURE_YMAX
#undef CALIBRATION_MEASURE_YMIN
#undef DISABLE_INACTIVE_Y
#undef HOME_Y_BEFORE_X
#undef INPUT_SHAPING_Y
#undef QUICK_HOME
#undef SAFE_BED_LEVELING_START_Y
#undef SHAPING_BUFFER_Y
#undef ARC_SUPPORT
#undef INPUT_SHAPING_Y
#undef SHAPING_FREQ_Y
#undef STEALTHCHOP_Y
#undef STEP_STATE_Y
#undef SHAPING_BUFFER_Y
#endif
#if !HAS_Z_AXIS
#undef CALIBRATION_MEASURE_ZMAX
#undef CALIBRATION_MEASURE_ZMIN
#undef CNC_WORKSPACE_PLANES
#undef DISABLE_INACTIVE_Z
#undef ENABLE_LEVELING_FADE_HEIGHT
#undef HOME_Z_FIRST
#undef HOMING_Z_WITH_PROBE
#undef NUM_Z_STEPPERS
#undef SAFE_BED_LEVELING_START_Z
#undef STEALTHCHOP_Z
#undef STEP_STATE_Z
#undef Z_IDLE_HEIGHT
#undef Z_PROBE_SLED
#undef Z_SAFE_HOMING
#endif
#if !HAS_I_AXIS
#undef CALIBRATION_MEASURE_IMAX
#undef CALIBRATION_MEASURE_IMIN
#undef DISABLE_INACTIVE_I
#undef SAFE_BED_LEVELING_START_I
#undef STEALTHCHOP_I
#undef STEP_STATE_I
#endif
#if !HAS_J_AXIS
#undef CALIBRATION_MEASURE_JMAX
#undef CALIBRATION_MEASURE_JMIN
#undef DISABLE_INACTIVE_J
#undef SAFE_BED_LEVELING_START_J
#undef STEALTHCHOP_J
#undef STEP_STATE_J
#endif
#if !HAS_K_AXIS
#undef CALIBRATION_MEASURE_KMAX
#undef CALIBRATION_MEASURE_KMIN
#undef DISABLE_INACTIVE_K
#undef SAFE_BED_LEVELING_START_K
#undef STEALTHCHOP_K
#undef STEP_STATE_K
#endif
#if !HAS_U_AXIS
#undef CALIBRATION_MEASURE_UMAX
#undef CALIBRATION_MEASURE_UMIN
#undef DISABLE_INACTIVE_U
#undef SAFE_BED_LEVELING_START_U
#undef STEALTHCHOP_U
#undef STEP_STATE_U
#endif
#if !HAS_V_AXIS
#undef CALIBRATION_MEASURE_VMAX
#undef CALIBRATION_MEASURE_VMIN
#undef DISABLE_INACTIVE_V
#undef SAFE_BED_LEVELING_START_V
#undef STEALTHCHOP_V
#undef STEP_STATE_V
#endif
#if !HAS_W_AXIS
#undef CALIBRATION_MEASURE_WMAX
#undef CALIBRATION_MEASURE_WMIN
#undef DISABLE_INACTIVE_W
#undef SAFE_BED_LEVELING_START_W
#undef STEALTHCHOP_W
#undef STEP_STATE_W
#endif
// Disallowed with no extruders
#if !HAS_EXTRUDERS
#define NO_VOLUMETRICS
#undef ADVANCED_PAUSE_FEATURE
#undef AUTOTEMP
#undef EXTRUDER_RUNOUT_PREVENT
#undef FILAMENT_LOAD_UNLOAD_GCODES
#undef FWRETRACT
#undef LCD_SHOW_E_TOTAL
#undef LIN_ADVANCE
#undef MANUAL_E_MOVES_RELATIVE
#undef PID_EXTRUSION_SCALING
#undef PIDTEMP
#undef SHOW_TEMP_ADC_VALUES
#undef STEALTHCHOP_E
#undef AUTOTEMP
#undef PID_EXTRUSION_SCALING
#undef LIN_ADVANCE
#undef FILAMENT_RUNOUT_SENSOR
#undef FIL_RUNOUT_ENABLED
#undef FIL_RUNOUT_MODE
#undef FIL_RUNOUT_DISTANCE_MM
#undef ADVANCED_PAUSE_FEATURE
#undef FILAMENT_LOAD_UNLOAD_GCODES
#undef DISABLE_INACTIVE_EXTRUDER
#undef EXTRUDER_RUNOUT_PREVENT
#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 HOTENDS <= 7
@@ -282,12 +228,13 @@
#define TEMP_SENSOR_0_IS_AD8495 1
#elif TEMP_SENSOR_0 == -1
#define TEMP_SENSOR_0_IS_AD595 1
#elif 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
#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
@@ -327,12 +274,13 @@
#define TEMP_SENSOR_1_IS_AD8495 1
#elif TEMP_SENSOR_1 == -1
#define TEMP_SENSOR_1_IS_AD595 1
#elif 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
#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
@@ -372,72 +320,18 @@
#define TEMP_SENSOR_2_IS_AD8495 1
#elif TEMP_SENSOR_2 == -1
#define TEMP_SENSOR_2_IS_AD595 1
#elif 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
#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 == 1000
#define TEMP_SENSOR_3_IS_CUSTOM 1
#elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
#define TEMP_SENSOR_3_IS_DUMMY 1
#elif TEMP_SENSOR_3 > 0
#define TEMP_SENSOR_3_IS_THERMISTOR 1
#elif !TEMP_SENSOR_3
#undef HEATER_3_MINTEMP
#undef HEATER_3_MAXTEMP
#endif
#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
#elif TEMP_SENSOR_4 > 0
#define TEMP_SENSOR_4_IS_THERMISTOR 1
#elif !TEMP_SENSOR_4
#undef HEATER_4_MINTEMP
#undef HEATER_4_MAXTEMP
#endif
#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
#elif TEMP_SENSOR_5 > 0
#define TEMP_SENSOR_5_IS_THERMISTOR 1
#elif !TEMP_SENSOR_5
#undef HEATER_5_MINTEMP
#undef HEATER_5_MAXTEMP
#endif
#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
#elif TEMP_SENSOR_6 > 0
#define TEMP_SENSOR_6_IS_THERMISTOR 1
#elif !TEMP_SENSOR_6
#undef HEATER_6_MINTEMP
#undef HEATER_6_MAXTEMP
#endif
#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
#elif TEMP_SENSOR_7 > 0
#define TEMP_SENSOR_7_IS_THERMISTOR 1
#elif !TEMP_SENSOR_7
#undef HEATER_7_MINTEMP
#undef HEATER_7_MAXTEMP
#endif
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
#if TEMP_SENSOR_REDUNDANT == -5
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
@@ -731,16 +625,19 @@
#define HAS_SERVICE_INTERVALS 1
#endif
// Probe Temperature Compensation
#if !TEMP_SENSOR_PROBE
#undef PTC_PROBE
#endif
#if !TEMP_SENSOR_BED
#undef PTC_BED
#endif
#if !HAS_EXTRUDERS
#undef PTC_HOTEND
#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
#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND)
#define HAS_PTC 1
#endif
@@ -1099,10 +996,51 @@
#endif
#endif
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
#define HAS_SAFE_BED_LEVELING 1
// Remove unused STEALTHCHOP flags
#if NUM_AXES < 9
#undef STEALTHCHOP_W
#undef CALIBRATION_MEASURE_WMIN
#undef CALIBRATION_MEASURE_WMAX
#if NUM_AXES < 8
#undef STEALTHCHOP_V
#undef CALIBRATION_MEASURE_VMIN
#undef CALIBRATION_MEASURE_VMAX
#if NUM_AXES < 7
#undef STEALTHCHOP_U
#undef CALIBRATION_MEASURE_UMIN
#undef CALIBRATION_MEASURE_UMAX
#if NUM_AXES < 6
#undef STEALTHCHOP_K
#undef CALIBRATION_MEASURE_KMIN
#undef CALIBRATION_MEASURE_KMAX
#if NUM_AXES < 5
#undef STEALTHCHOP_J
#undef CALIBRATION_MEASURE_JMIN
#undef CALIBRATION_MEASURE_JMAX
#if NUM_AXES < 4
#undef STEALTHCHOP_I
#undef CALIBRATION_MEASURE_IMIN
#undef CALIBRATION_MEASURE_IMAX
#if NUM_AXES < 3
#undef STEALTHCHOP_Z
#undef Z_IDLE_HEIGHT
#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_STEPPERS
#undef CNC_WORKSPACE_PLANES
#if NUM_AXES < 2
#undef STEALTHCHOP_Y
#undef QUICK_HOME
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
//
@@ -1194,6 +1132,10 @@
#define CANNOT_EMBED_CONFIGURATION defined(__AVR__)
#endif
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
#define HAS_DISABLE_INACTIVE_AXIS 1
#endif
// Fan Kickstart
#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
#define FAN_KICKSTART_POWER 180
@@ -1209,10 +1151,3 @@
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#define HAS_SHAPING 1
#endif
// Toolchange Event G-code
#if !HAS_MULTI_EXTRUDER || !(defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_TOOLCHANGE_T2) || defined(EVENT_GCODE_TOOLCHANGE_T3) || defined(EVENT_GCODE_TOOLCHANGE_T4) || defined(EVENT_GCODE_TOOLCHANGE_T5) || defined(EVENT_GCODE_TOOLCHANGE_T6) || defined(EVENT_GCODE_TOOLCHANGE_T7))
#undef TC_GCODE_USE_GLOBAL_X
#undef TC_GCODE_USE_GLOBAL_Y
#undef TC_GCODE_USE_GLOBAL_Z
#endif
+77 -44
View File
@@ -190,22 +190,22 @@
#define XY_CENTER { X_CENTER, Y_CENTER }
#endif
#if HAS_I_AXIS
#define I_CENTER _I_HALF_BED
#define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED)
#endif
#if HAS_J_AXIS
#define J_CENTER _J_HALF_BED
#define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED)
#endif
#if HAS_K_AXIS
#define K_CENTER _K_HALF_BED
#define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
#endif
#if HAS_U_AXIS
#define U_CENTER _U_HALF_BED
#define U_CENTER TERN(BED_CENTER_AT_0_0, 0, _U_HALF_BED)
#endif
#if HAS_V_AXIS
#define V_CENTER _V_HALF_BED
#define V_CENTER TERN(BED_CENTER_AT_0_0, 0, _V_HALF_BED)
#endif
#if HAS_W_AXIS
#define W_CENTER _W_HALF_BED
#define W_CENTER TERN(BED_CENTER_AT_0_0, 0, _W_HALF_BED)
#endif
// Get the linear boundaries of the bed
@@ -1308,6 +1308,9 @@
/**
* Set defaults for missing (newer) options
*/
#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
#define DISABLE_INACTIVE_X 1
#endif
#if HAS_Y_AXIS
#if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
@@ -1335,6 +1338,11 @@
#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 HAS_Z_AXIS
@@ -1350,6 +1358,11 @@
#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 NUM_Z_STEPPERS >= 2
@@ -1410,6 +1423,11 @@
#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 HAS_J_AXIS
@@ -1425,6 +1443,11 @@
#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 HAS_K_AXIS
@@ -1440,6 +1463,11 @@
#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
#if HAS_U_AXIS
@@ -1455,6 +1483,11 @@
#if PIN_EXISTS(U_MS1)
#define HAS_U_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
#define DISABLE_INACTIVE_U 1
#endif
#else
#undef DISABLE_INACTIVE_U
#endif
#if HAS_V_AXIS
@@ -1470,6 +1503,11 @@
#if PIN_EXISTS(V_MS1)
#define HAS_V_MS_PINS 1
#endif
#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
#define DISABLE_INACTIVE_V 1
#endif
#else
#undef DISABLE_INACTIVE_V
#endif
#if HAS_W_AXIS
@@ -1485,43 +1523,11 @@
#if PIN_EXISTS(W_MS1)
#define HAS_W_MS_PINS 1
#endif
#endif
#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
#define DISABLE_INACTIVE_X
#endif
#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
#define DISABLE_INACTIVE_Y
#endif
#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
#define DISABLE_INACTIVE_Z
#endif
#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
#define DISABLE_INACTIVE_I
#endif
#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
#define DISABLE_INACTIVE_J
#endif
#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
#define DISABLE_INACTIVE_K
#endif
#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
#define DISABLE_INACTIVE_U
#endif
#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
#define DISABLE_INACTIVE_V
#endif
#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
#define DISABLE_INACTIVE_W
#endif
#if !defined(DISABLE_INACTIVE_EXTRUDER) && ENABLED(DISABLE_E)
#define DISABLE_INACTIVE_EXTRUDER
#endif
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_EXTRUDER)
#define HAS_DISABLE_INACTIVE_AXIS 1
#endif
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W, DISABLE_E)
#define HAS_DISABLE_AXIS 1
#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
#define DISABLE_INACTIVE_W 1
#endif
#else
#undef DISABLE_INACTIVE_W
#endif
// Extruder steppers and solenoids
@@ -1645,6 +1651,11 @@
#endif
#endif
#if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
#define DISABLE_INACTIVE_E 1
#endif
#else
#undef DISABLE_INACTIVE_E
#endif // HAS_EXTRUDERS
/**
@@ -2245,6 +2256,28 @@
#endif
#if _HAS_STOP(X,MAX)
#define HAS_X_MAX 1
#else
#if !PIN_EXISTS(X_MAX)
#error "X_MAX Pin Doesnt Exist."
#endif
#if IS_PROBE_PIN(X,MAX)
#error "X_MAX Pin Used for Probe."
#endif
#if IS_X2_ENDSTOP(X,MAX)
#error "X_MAX Pin Used for X2 ES."
#endif
#if IS_Y2_ENDSTOP(X,MAX)
#error "X_MAX Pin Used for Y2 ES."
#endif
#if IS_Z2_ENDSTOP(X,MAX)
#error "X_MAX Pin Used for Z2 ES."
#endif
#if IS_Z3_ENDSTOP(X,MAX)
#error "X_MAX Pin Used for Z3 ES."
#endif
#if IS_Z4_ENDSTOP(X,MAX)
#error "X_MAX Pin Used for Z4 ES."
#endif
#endif
#if _HAS_STOP(Y,MIN)
#define HAS_Y_MIN 1
@@ -2932,7 +2965,7 @@
#define HAS_TEMPERATURE 1
#endif
#if HAS_TEMPERATURE && ANY(HAS_MARLINUI_MENU, HAS_DWIN_E3V2, HAS_DGUS_LCD_CLASSIC)
#if HAS_TEMPERATURE && ANY(HAS_MARLINUI_MENU, HAS_DWIN_E3V2, HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_CREALITY_TOUCH)
#ifdef PREHEAT_10_LABEL
#define PREHEAT_COUNT 10
#elif defined(PREHEAT_9_LABEL)
+49 -129
View File
@@ -670,12 +670,6 @@
#error "MILLISECONDS_PREHEAT_TIME is now PREHEAT_TIME_HOTEND_MS."
#elif defined(EXPERIMENTAL_SCURVE)
#error "EXPERIMENTAL_SCURVE is no longer needed and should be removed."
#elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY)
#error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY."
#elif defined(DISABLE_INACTIVE_E)
#error "DISABLE_INACTIVE_E is now set with DISABLE_INACTIVE_EXTRUDER."
#elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN)
#error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH."
#endif
// L64xx stepper drivers have been removed
@@ -1019,15 +1013,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
#endif
/**
* Custom Event G-code
*/
#if defined(EVENT_GCODE_SD_ABORT) && DISABLED(NOZZLE_PARK_FEATURE)
static_assert(nullptr == strstr(EVENT_GCODE_SD_ABORT, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_ABORT.");
#endif
#if ANY(TC_GCODE_USE_GLOBAL_X, TC_GCODE_USE_GLOBAL_Y, TC_GCODE_USE_GLOBAL_Z) && ENABLED(NO_WORKSPACE_OFFSETS)
#error "TC_GCODE_USE_GLOBAL_* options are incompatible with NO_WORKSPACE_OFFSETS."
#endif
/**
* I2C Position Encoders
@@ -1054,10 +1042,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_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_GFX_OVERLAY) && NONE(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI)
#error "BABYSTEP_GFX_OVERLAY requires a Graphical LCD."
#elif ENABLED(BABYSTEP_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET)
#error "BABYSTEP_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
#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."
#elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET
#error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
#elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
@@ -1330,34 +1318,20 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
/**
* A Dual Nozzle carriage with switching servo
*/
#if BOTH(SWITCHING_NOZZLE, MECHANICAL_SWITCHING_NOZZLE)
#error "Enable only one of SWITCHING_NOZZLE or MECHANICAL_SWITCHING_NOZZLE."
#elif ENABLED(MECHANICAL_SWITCHING_NOZZLE)
#if EXTRUDERS != 2
#error "MECHANICAL_SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
#elif ENABLED(DUAL_X_CARRIAGE)
#error "MECHANICAL_SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
#elif ENABLED(SINGLENOZZLE)
#error "MECHANICAL_SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
#elif HAS_PRUSA_MMU2
#error "MECHANICAL_SWITCHING_NOZZLE and PRUSA_MMU2(S) are incompatible."
#elif !defined(EVENT_GCODE_TOOLCHANGE_T0)
#error "MECHANICAL_SWITCHING_NOZZLE requires EVENT_GCODE_TOOLCHANGE_T0."
#elif !defined(EVENT_GCODE_TOOLCHANGE_T1)
#error "MECHANICAL_SWITCHING_NOZZLE requires EVENT_GCODE_TOOLCHANGE_T1."
#endif
#elif ENABLED(SWITCHING_NOZZLE)
#if EXTRUDERS != 2
#error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
#elif ENABLED(DUAL_X_CARRIAGE)
#if ENABLED(SWITCHING_NOZZLE)
#if ENABLED(DUAL_X_CARRIAGE)
#error "SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
#elif ENABLED(SINGLENOZZLE)
#error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
#elif HAS_PRUSA_MMU2
#error "SWITCHING_NOZZLE and PRUSA_MMU2(S) are incompatible."
#elif EXTRUDERS != 2
#error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
#elif NUM_SERVOS < 1
#error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
#elif !defined(SWITCHING_NOZZLE_SERVO_NR)
#endif
#ifndef SWITCHING_NOZZLE_SERVO_NR
#error "SWITCHING_NOZZLE requires SWITCHING_NOZZLE_SERVO_NR."
#elif SWITCHING_NOZZLE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
#error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
@@ -1368,6 +1342,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif SWITCHING_NOZZLE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
#error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
#endif
#ifdef SWITCHING_NOZZLE_E1_SERVO_NR
#if SWITCHING_NOZZLE_E1_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR
#error "SWITCHING_NOZZLE_E1_SERVO_NR must be different from SWITCHING_NOZZLE_SERVO_NR."
@@ -1381,26 +1356,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
#endif
#endif
#endif // SWITCHING_NOZZLE
#endif
/**
* Single Stepper Dual Extruder with switching servo
*/
#if BOTH(SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_EXTRUDER)
#error "Enable only one of SWITCHING_EXTRUDER or MECHANICAL_SWITCHING_EXTRUDER."
#elif ENABLED(MECHANICAL_SWITCHING_EXTRUDER)
#if EXTRUDERS < 2
#error "MECHANICAL_SWITCHING_EXTRUDER requires EXTRUDERS >= 2."
#elif !defined(EVENT_GCODE_TOOLCHANGE_T0)
#error "MECHANICAL_SWITCHING_EXTRUDER requires EVENT_GCODE_TOOLCHANGE_T0."
#elif !defined(EVENT_GCODE_TOOLCHANGE_T1)
#error "MECHANICAL_SWITCHING_EXTRUDER requires EVENT_GCODE_TOOLCHANGE_T1."
#endif
#elif ENABLED(SWITCHING_EXTRUDER)
#if ENABLED(SWITCHING_EXTRUDER)
#if NUM_SERVOS < 1
#error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
#elif !defined(SWITCHING_EXTRUDER_SERVO_NR)
#error "SWITCHING_EXTRUDER requires SWITCHING_EXTRUDER_SERVO_NR."
#elif SWITCHING_EXTRUDER_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
#error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
#elif SWITCHING_EXTRUDER_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
@@ -1424,10 +1387,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif SWITCHING_EXTRUDER_E23_SERVO_NR == SWITCHING_EXTRUDER_SERVO_NR
#error "SWITCHING_EXTRUDER_E23_SERVO_NR should be a different extruder from SWITCHING_EXTRUDER_SERVO_NR."
#endif
#elif EXTRUDERS < 2
#error "SWITCHING_EXTRUDER requires EXTRUDERS >= 2."
#endif
#endif // SWITCHING_EXTRUDER
#endif
/**
* Mixing Extruder requirements
@@ -1439,8 +1400,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
#elif ENABLED(FILAMENT_WIDTH_SENSOR)
#error "MIXING_EXTRUDER is incompatible with FILAMENT_WIDTH_SENSOR. Comment out this line to use it anyway."
#elif HAS_SWITCHING_EXTRUDER
#error "MIXING_EXTRUDER is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
#elif ENABLED(SWITCHING_EXTRUDER)
#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)
@@ -1456,8 +1417,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#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 HAS_SWITCHING_EXTRUDER
#error "E_DUAL_STEPPER_DRIVERS is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
#elif ENABLED(SWITCHING_EXTRUDER)
#error "E_DUAL_STEPPER_DRIVERS is incompatible with SWITCHING_EXTRUDER."
#endif
#endif
@@ -1678,18 +1639,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#endif
/**
* Features that require a min/max/specific steppers / axes to be enabled.
* Features that require a min/max/specific NUM_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 a Z axis"
#error "CNC_WORKSPACE_PLANES currently requires NUM_AXES >= 3"
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
#error "DIRECT_STEPPING does not currently support more than 3 axes (i.e., XYZ)."
#elif ENABLED(FOAMCUTTER_XYUV) && !(HAS_I_AXIS && HAS_J_AXIS)
#error "FOAMCUTTER_XYUV requires I and J steppers to be enabled."
#error "DIRECT_STEPPING currently requires NUM_AXES 3"
#elif ENABLED(FOAMCUTTER_XYUV) && NUM_AXES < 5
#error "FOAMCUTTER_XYUV requires NUM_AXES >= 5."
#elif ENABLED(LINEAR_ADVANCE) && HAS_I_AXIS
#error "LINEAR_ADVANCE does not currently support the inclusion of an I axis."
#error "LINEAR_ADVANCE currently requires NUM_AXES <= 3."
#endif
/**
@@ -1697,13 +1658,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
*/
#if HAS_I_AXIS
#if !defined(I_MIN_POS) || !defined(I_MAX_POS)
#error "I_MIN_POS and I_MAX_POS are required for the I axis."
#error "I_MIN_POS and I_MAX_POS are required with NUM_AXES >= 4."
#elif !defined(I_HOME_DIR)
#error "I_HOME_DIR is required for the I axis."
#error "I_HOME_DIR is required with NUM_AXES >= 4."
#elif HAS_I_ENABLE && !defined(I_ENABLE_ON)
#error "I_ENABLE_ON is required for the I stepper."
#elif !defined(INVERT_I_DIR)
#error "INVERT_I_DIR is required for the I stepper."
#error "I_ENABLE_ON is required for your I driver with NUM_AXES >= 4."
#endif
#endif
#if HAS_J_AXIS
@@ -1712,13 +1671,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif ENABLED(AXIS5_ROTATES) && DISABLED(AXIS4_ROTATES)
#error "AXIS5_ROTATES requires AXIS4_ROTATES."
#elif !defined(J_MIN_POS) || !defined(J_MAX_POS)
#error "J_MIN_POS and J_MAX_POS are required for the J axis."
#error "J_MIN_POS and J_MAX_POS are required with NUM_AXES >= 5."
#elif !defined(J_HOME_DIR)
#error "J_HOME_DIR is required for the J axis."
#error "J_HOME_DIR is required with NUM_AXES >= 5."
#elif HAS_J_ENABLE && !defined(J_ENABLE_ON)
#error "J_ENABLE_ON is required for the J stepper."
#elif !defined(INVERT_J_DIR)
#error "INVERT_J_DIR is required for the J stepper."
#error "J_ENABLE_ON is required for your J driver with NUM_AXES >= 5."
#endif
#endif
#if HAS_K_AXIS
@@ -1727,13 +1684,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif ENABLED(AXIS6_ROTATES) && DISABLED(AXIS5_ROTATES)
#error "AXIS6_ROTATES requires AXIS5_ROTATES."
#elif !defined(K_MIN_POS) || !defined(K_MAX_POS)
#error "K_MIN_POS and K_MAX_POS are required for the K axis."
#error "K_MIN_POS and K_MAX_POS are required with NUM_AXES >= 6."
#elif !defined(K_HOME_DIR)
#error "K_HOME_DIR is required for the K axis."
#error "K_HOME_DIR is required with NUM_AXES >= 6."
#elif HAS_K_ENABLE && !defined(K_ENABLE_ON)
#error "K_ENABLE_ON is required for the K stepper."
#elif !defined(INVERT_K_DIR)
#error "INVERT_K_DIR is required for the K stepper."
#error "K_ENABLE_ON is required for your K driver with NUM_AXES >= 6."
#endif
#endif
#if HAS_U_AXIS
@@ -1742,13 +1697,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif ENABLED(AXIS7_ROTATES) && DISABLED(AXIS6_ROTATES)
#error "AXIS7_ROTATES requires AXIS6_ROTATES."
#elif !defined(U_MIN_POS) || !defined(U_MAX_POS)
#error "U_MIN_POS and U_MAX_POS are required for the U axis."
#error "U_MIN_POS and U_MAX_POS are required with NUM_AXES >= 7."
#elif !defined(U_HOME_DIR)
#error "U_HOME_DIR is required for the U axis."
#error "U_HOME_DIR is required with NUM_AXES >= 7."
#elif HAS_U_ENABLE && !defined(U_ENABLE_ON)
#error "U_ENABLE_ON is required for the U stepper."
#elif !defined(INVERT_U_DIR)
#error "INVERT_U_DIR is required for the U stepper."
#error "U_ENABLE_ON is required for your U driver with NUM_AXES >= 7."
#endif
#endif
#if HAS_V_AXIS
@@ -1757,13 +1710,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif ENABLED(AXIS8_ROTATES) && DISABLED(AXIS7_ROTATES)
#error "AXIS8_ROTATES requires AXIS7_ROTATES."
#elif !defined(V_MIN_POS) || !defined(V_MAX_POS)
#error "V_MIN_POS and V_MAX_POS are required for the V axis."
#error "V_MIN_POS and V_MAX_POS are required with NUM_AXES >= 8."
#elif !defined(V_HOME_DIR)
#error "V_HOME_DIR is required for the V axis."
#error "V_HOME_DIR is required with NUM_AXES >= 8."
#elif HAS_V_ENABLE && !defined(V_ENABLE_ON)
#error "V_ENABLE_ON is required for the V stepper."
#elif !defined(INVERT_V_DIR)
#error "INVERT_V_DIR is required for the V stepper."
#error "V_ENABLE_ON is required for your V driver with NUM_AXES >= 8."
#endif
#endif
#if HAS_W_AXIS
@@ -1772,13 +1723,11 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#elif ENABLED(AXIS9_ROTATES) && DISABLED(AXIS8_ROTATES)
#error "AXIS9_ROTATES requires AXIS8_ROTATES."
#elif !defined(W_MIN_POS) || !defined(W_MAX_POS)
#error "W_MIN_POS and W_MAX_POS are required for the W axis."
#error "W_MIN_POS and W_MAX_POS are required with NUM_AXES >= 9."
#elif !defined(W_HOME_DIR)
#error "W_HOME_DIR is required for the W axis."
#error "W_HOME_DIR is required with NUM_AXES >= 9."
#elif HAS_W_ENABLE && !defined(W_ENABLE_ON)
#error "W_ENABLE_ON is required for the W stepper."
#elif !defined(INVERT_W_DIR)
#error "INVERT_W_DIR is required for the W stepper."
#error "W_ENABLE_ON is required for your W driver with NUM_AXES >= 9."
#endif
#endif
@@ -2005,9 +1954,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
*/
#if ENABLED(SENSORLESS_PROBING)
#if ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
#error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z and {X|Y|Z}_STALL_SENSITIVITY."
#error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z."
#elif !Z_SENSORLESS
#error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z and Z_STALL_SENSITIVITY."
#error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z."
#endif
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#if DISABLED(USE_ZMIN_PLUG)
@@ -2295,27 +2244,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
#endif
// Check Safe Bed Leveling settings
#if HAS_SAFE_BED_LEVELING
#if defined(SAFE_BED_LEVELING_START_Y) && !defined(SAFE_BED_LEVELING_START_X)
#error "If SAFE_BED_LEVELING_START_Y is defined, SAFE_BED_LEVELING_START_X must also be defined."
#elif defined(SAFE_BED_LEVELING_START_Z) && !defined(SAFE_BED_LEVELING_START_Y)
#error "If SAFE_BED_LEVELING_START_Z is defined, SAFE_BED_LEVELING_START_Y must also be defined."
#elif defined(SAFE_BED_LEVELING_START_I) && !defined(SAFE_BED_LEVELING_START_Z)
#error "If SAFE_BED_LEVELING_START_I is defined, SAFE_BED_LEVELING_START_Z must also be defined."
#elif defined(SAFE_BED_LEVELING_START_J) && !defined(SAFE_BED_LEVELING_START_I)
#error "If SAFE_BED_LEVELING_START_J is defined, SAFE_BED_LEVELING_START_I must also be defined."
#elif defined(SAFE_BED_LEVELING_START_K) && !defined(SAFE_BED_LEVELING_START_J)
#error "If SAFE_BED_LEVELING_START_K is defined, SAFE_BED_LEVELING_START_J must also be defined."
#elif defined(SAFE_BED_LEVELING_START_U) && !defined(SAFE_BED_LEVELING_START_K)
#error "If SAFE_BED_LEVELING_START_U is defined, SAFE_BED_LEVELING_START_K must also be defined."
#elif defined(SAFE_BED_LEVELING_START_V) && !defined(SAFE_BED_LEVELING_START_U)
#error "If SAFE_BED_LEVELING_START_V is defined, SAFE_BED_LEVELING_START_U must also be defined."
#elif defined(SAFE_BED_LEVELING_START_W) && !defined(SAFE_BED_LEVELING_START_V)
#error "If SAFE_BED_LEVELING_START_W is defined, SAFE_BED_LEVELING_START_V must also be defined."
#endif
#endif
/**
* Make sure DISABLE_[XYZ] compatible with selected homing options
*/
@@ -2819,8 +2747,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#error "MULTI_NOZZLE_DUPLICATION is incompatible with DUAL_X_CARRIAGE."
#elif ENABLED(MIXING_EXTRUDER)
#error "MULTI_NOZZLE_DUPLICATION is incompatible with MIXING_EXTRUDER."
#elif HAS_SWITCHING_EXTRUDER
#error "MULTI_NOZZLE_DUPLICATION is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
#elif ENABLED(SWITCHING_EXTRUDER)
#error "MULTI_NOZZLE_DUPLICATION is incompatible with SWITCHING_EXTRUDER."
#elif HOTENDS < 2
#error "MULTI_NOZZLE_DUPLICATION requires 2 or more hotends."
#endif
@@ -3180,7 +3108,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
+ DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE, DGUS_LCD_UI_CREALITY_TOUCH) \
+ COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \
+ COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
+ COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \
@@ -3327,14 +3255,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
#if LCD_BACKLIGHT_TIMEOUT_MINS
#if !HAS_ENCODER_ACTION
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad."
#elif ENABLED(NEOPIXEL_BKGD_INDEX_FIRST)
#if PIN_EXISTS(LCD_BACKLIGHT)
#error "LCD_BACKLIGHT_PIN and NEOPIXEL_BKGD_INDEX_FIRST are not supported at the same time."
#elif ENABLED(NEOPIXEL_BKGD_ALWAYS_ON)
#error "LCD_BACKLIGHT_TIMEOUT is not compatible with NEOPIXEL_BKGD_ALWAYS_ON."
#endif
#elif !PIN_EXISTS(LCD_BACKLIGHT)
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires either LCD_BACKLIGHT_PIN or NEOPIXEL_BKGD_INDEX_FIRST."
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires LCD_BACKLIGHT_PIN."
#endif
#endif
@@ -4468,8 +4390,6 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#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(HOME_AFTER_DEACTIVATE)
#error "DGUS_LCD_UI RELOADED requires HOME_AFTER_DEACTIVATE to be disabled."
#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
+1 -1
View File
@@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2023-03-10"
#define STRING_DISTRIBUTION_DATE "2023-02-03"
#endif
/**
+2 -12
View File
@@ -537,7 +537,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
*/
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 = heater_id == H_BED;
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
#else
@@ -546,17 +546,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
if (prefix >= 0) lcd_put_lchar(prefix);
if (t1 >= 0)
lcd_put_u8str(ui16tostr3rj(t1));
else {
#if ENABLED(SHOW_TEMPERATURE_BELOW_ZERO)
char * const str = i16tostr3rj(t1);
lcd_put_u8str(&str[1]);
#else
lcd_put_u8str(F("err"));
#endif
}
lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1));
lcd_put_u8str(F("/"));
#if !HEATER_IDLE_HANDLER
@@ -1,10 +0,0 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#pragma once
#include "langdata.h"
static const uxg_fontinfo_t g_fontinfo_fr_na[] PROGMEM = {};
+7 -1
View File
@@ -7,4 +7,10 @@
#include "langdata.h"
static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {};
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};
static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {
FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű'
};
@@ -27,9 +27,6 @@ const u8g_fntpgm_uint8_t fontpage_2_218_219[47] U8G_FONT_SECTION("fontpage_2_218
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDA,0xDB,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
const u8g_fntpgm_uint8_t fontpage_2_250_250[31] U8G_FONT_SECTION("fontpage_2_250_250") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFA,0xFA,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252_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};
@@ -40,6 +37,5 @@ static const uxg_fontinfo_t g_fontinfo_pl[] PROGMEM = {
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, 250, 250, fontpage_2_250_250), // 'ź' -- 'ź'
FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż'
};
@@ -1,10 +0,0 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#pragma once
#include "langdata.h"
static const uxg_fontinfo_t g_fontinfo_sv[] PROGMEM = {};
@@ -7,6 +7,9 @@
#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,
0x00,0x05,0x03,0x03,0x06,0x00,0x04,0xD8,0x48,0x90};
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,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x08,0x18,0x28,0x48,0xF8};
@@ -379,6 +382,10 @@ const u8g_fntpgm_uint8_t fontpage_172_232_232[45] U8G_FONT_SECTION("fontpage_172
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE8,0xE8,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7B,0xC0,0x4A,0x40,0x4A,0x40,0x7B,0xC0,0x04,
0x80,0xFF,0xE0,0x11,0x00,0xFB,0xE0,0x4A,0x40,0x4A,0x40,0x7B,0xC0};
const u8g_fntpgm_uint8_t fontpage_172_244_244[45] U8G_FONT_SECTION("fontpage_172_244_244") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x01,0x00,0xEF,0xE0,0xA5,0x40,0xAF,0xE0,0xA4,
0x40,0xA7,0xC0,0xE4,0x40,0x07,0xC0,0x04,0x40,0x07,0xC0,0x0C,0x60};
const u8g_fntpgm_uint8_t fontpage_173_222_222[45] U8G_FONT_SECTION("fontpage_173_222_222") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDE,0xDE,0x00,0x0A,0xFF,0x00,
0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0xFF,0xC0,0x80,0x40,0x80,0x40,0x9E,0x40,0x92,
@@ -737,6 +744,10 @@ const u8g_fntpgm_uint8_t fontpage_202_244_244[45] U8G_FONT_SECTION("fontpage_202
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x11,0x00,0xFF,0xE0,0x55,0x40,0x7C,0x80,0x39,
0x40,0x56,0x20,0x7F,0xC0,0x04,0x00,0x27,0x80,0x24,0x00,0xFF,0xE0};
const u8g_fntpgm_uint8_t fontpage_203_135_135[45] U8G_FONT_SECTION("fontpage_203_135_135") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x08,0x00,0x04,0x00,0xFF,0xE0,0x11,0x00,0x11,
0x00,0x11,0x00,0x0A,0x00,0x0A,0x00,0x04,0x00,0x1B,0x00,0xE0,0xE0};
const u8g_fntpgm_uint8_t fontpage_203_153_153[45] U8G_FONT_SECTION("fontpage_203_153_153") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x80,0xAC,0x80,0x72,0x80,0x20,0x80,0xFC,
@@ -1039,6 +1050,10 @@ const u8g_fntpgm_uint8_t fontpage_246_201_201[45] U8G_FONT_SECTION("fontpage_246
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x7F,0xC0,0x04,
0x00,0xFF,0xE0,0x01,0x00,0x7F,0xC0,0x11,0x00,0x09,0x00,0x03,0x00};
const u8g_fntpgm_uint8_t fontpage_247_128_128[45] U8G_FONT_SECTION("fontpage_247_128_128") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x27,0xC0,0x50,
0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x40,0xC0};
const u8g_fntpgm_uint8_t fontpage_247_177_177[45] U8G_FONT_SECTION("fontpage_247_177_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0x3D,0xE0,0x4A,0x80,0x94,0x40,0x7F,
@@ -1450,6 +1465,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0};
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), // '三' -- '下'
@@ -1537,6 +1553,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
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), // '固' -- '固'
@@ -1625,6 +1642,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
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), // '断' -- '断'
@@ -1700,6 +1718,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
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), // '索' -- '索'
@@ -343,10 +343,12 @@ const u8g_fntpgm_uint8_t fontpage_178_167_167[45] U8G_FONT_SECTION("fontpage_178
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA7,0xA7,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,
0x00,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
const u8g_fntpgm_uint8_t fontpage_178_169_169[45] U8G_FONT_SECTION("fontpage_178_169_169") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xA9,0x00,0x0A,0xFF,0x00,
const u8g_fntpgm_uint8_t fontpage_178_169_170[73] U8G_FONT_SECTION("fontpage_178_169_170") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xAA,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,
0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60,0x0B,0x0B,0x16,
0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,0x00,0x0A,0x00,0x0A,
0x00,0x11,0x00,0x19,0x00,0x24,0x80,0xC4,0x60};
const u8g_fntpgm_uint8_t fontpage_178_177_177[45] U8G_FONT_SECTION("fontpage_178_177_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x24,0x00,0x24,0x00,0x3F,0xC0,0x44,0x00,0x04,
@@ -1300,7 +1302,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = {
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, 169, fontpage_178_169_169), // '天' -- ''
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), // '媒' -- '媒'
+2 -2
View File
@@ -628,7 +628,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
#endif // AUTO_BED_LEVELING_UBL
#if EITHER(BABYSTEP_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
//
// Draw knob rotation => Z motion key for:
@@ -746,7 +746,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
}
}
#endif // BABYSTEP_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
#endif // HAS_MARLINUI_MENU
+9 -24
View File
@@ -96,10 +96,9 @@
DRAWBIT_HOTEND,
DRAWBIT_BED = HOTENDS,
DRAWBIT_CHAMBER,
DRAWBIT_CUTTER,
DRAWBIT_COUNT
DRAWBIT_CUTTER
};
bits_t(DRAWBIT_COUNT) draw_bits;
IF<(DRAWBIT_CUTTER > 7), uint16_t, uint8_t>::type draw_bits;
#endif
#if ANIM_HOTEND
@@ -193,26 +192,14 @@
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, const uint8_t ty) {
const char *str;
uint8_t len;
if (temp >= 0) {
str = i16tostr3left(temp);
len = strlen(str);
lcd_moveto(tx + 1 - len * (INFO_FONT_WIDTH) / 2, ty);
}
if (temp < 0)
lcd_put_u8str(tx - 3 * (INFO_FONT_WIDTH) / 2 + 1, ty, F("err"));
else {
#if ENABLED(SHOW_TEMPERATURE_BELOW_ZERO)
str = i16tostr3left((-temp) % 100);
len = strlen(str) + 1;
lcd_moveto(tx + 1 - len * (INFO_FONT_WIDTH) / 2, ty);
lcd_put_lchar('-');
#else
lcd_put_u8str(tx + 1 - 3 * (INFO_FONT_WIDTH) / 2, ty, F("err"));
return;
#endif
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_lchar(LCD_STR_DEGREE[0]);
}
lcd_put_u8str(str);
lcd_put_lchar(LCD_STR_DEGREE[0]);
}
#if DO_DRAW_FLOWMETER
@@ -525,9 +512,7 @@ void MarlinUI::draw_status_screen() {
const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive());
#if HAS_PRINT_PROGRESS
static u8g_uint_t progress_bar_solid_width = 0;
#endif
static u8g_uint_t progress_bar_solid_width = 0;
// At the first page, generate new display values
if (first_page) {
+4 -2
View File
@@ -133,8 +133,10 @@ EncoderState Encoder_ReceiveAnalyze() {
// Note that the rate is always calculated between two passes through the
// loop and that the abs of the temp_diff value is tracked.
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;
#if defined(ENCODER_100X_STEPS_PER_SEC)
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
#endif
if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
#if ENCODER_5X_STEPS_PER_SEC
else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5;
#endif
+7 -3
View File
@@ -2944,7 +2944,11 @@ void HMI_Control() {
void HMI_Leveling() {
Popup_Window_Leveling();
DWIN_UpdateLCD();
queue.inject(F("G28O\nG29"));
#if defined(MAIN_MENU_ITEM_1_GCODE)
queue.inject(F(MAIN_MENU_ITEM_1_GCODE));
#else
queue.inject(F("G28O\nG29\nG28\nG1Z0"));
#endif
}
#endif
@@ -4055,8 +4059,8 @@ 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_ICON_Show(ICON, ICON_Bar, 15, 450);
DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 450, 257, 470);
DWIN_UpdateLCD();
delay(20);
}
+22 -18
View File
@@ -2734,7 +2734,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
#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 + 1)
#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
@@ -2833,22 +2833,24 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
case ADVANCED_FILSENSORENABLED:
if (draw) {
Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor"));
Draw_Checkbox(row, runout.enabled[0]);
Draw_Checkbox(row, runout.enabled);
}
else {
runout.enabled[0] = !runout.enabled[0];
Draw_Checkbox(row, runout.enabled[0]);
runout.enabled = !runout.enabled;
Draw_Checkbox(row, runout.enabled);
}
break;
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;
#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)
@@ -3814,11 +3816,11 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
case TUNE_FILSENSORENABLED:
if (draw) {
Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor"));
Draw_Checkbox(row, runout.enabled[0]);
Draw_Checkbox(row, runout.enabled);
}
else {
runout.enabled = !runout.enabled[0];
Draw_Checkbox(row, runout.enabled[0]);
runout.enabled = !runout.enabled;
Draw_Checkbox(row, runout.enabled);
}
break;
#endif
@@ -4227,7 +4229,8 @@ void CrealityDWINClass::Value_Control() {
if (funcpointer) funcpointer();
return;
}
LIMIT(tempvalue, valuemin * valueunit, valuemax * valueunit);
NOLESS(tempvalue, (valuemin * valueunit));
NOMORE(tempvalue, (valuemax * valueunit));
Draw_Float(tempvalue / valueunit, selection - scrollpos, true, valueunit);
DWIN_UpdateLCD();
if (active_menu == Move && livemove) {
@@ -4269,7 +4272,8 @@ void CrealityDWINClass::Option_Control() {
DWIN_UpdateLCD();
return;
}
LIMIT(tempvalue, valuemin, valuemax);
NOLESS(tempvalue, valuemin);
NOMORE(tempvalue, valuemax);
Draw_Option(tempvalue, static_cast<const char * const *>(valuepointer), selection - scrollpos, true);
DWIN_UpdateLCD();
}
@@ -4659,7 +4663,7 @@ void CrealityDWINClass::Start_Print(bool sd) {
if (sd) {
#if ENABLED(POWER_LOSS_RECOVERY)
if (recovery.valid()) {
MediaFile *diveDir = nullptr;
SdFile *diveDir = nullptr;
const char * const fname = card.diveToFile(true, diveDir, recovery.info.sd_filename);
card.selectFileByName(fname);
}
@@ -48,6 +48,7 @@ void DWIN_Startup() {
DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here
DWIN_JPG_ShowAndCache(3);
DWIN_UpdateLCD();
DWIN_JPG_ShowAndCache(3);
}
/*---------------------------------------- Picture related functions ----------------------------------------*/
+4 -4
View File
@@ -109,8 +109,8 @@ void MarlinUI::clear_lcd() {
#define INFO_CENTER ((LCD_PIXEL_WIDTH) - 200 / 2)
#define VERSION_Y 84
#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_JPG_ShowAndCache(0); // Ensure DACAI stays on boot screen
DWIN_Draw_String(false, font10x20, Color_Yellow, Color_Bg_Black, INFO_CENTER - (dwin_string.length * 10) / 2, 230, S(dwin_string.string()));
TERN_(SHOW_CUSTOM_BOOTSCREEN, safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT));
clear_lcd();
@@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) {
#endif // AUTO_BED_LEVELING_UBL
#if EITHER(BABYSTEP_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
#if EITHER(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),
@@ -587,7 +587,7 @@ void MarlinUI::draw_status_message(const bool blink) {
DWIN_ICON_Show(ICON, rot_up, LCD_PIXEL_WIDTH - 10 - 48, arrow_y);
}
#endif // BABYSTEP_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
#endif // HAS_MARLINUI_MENU
+22 -4
View File
@@ -1271,6 +1271,7 @@ void EachMomentUpdate() {
if ((Printing() != HMI_flag.printing_flag) && !HMI_flag.home_flag) {
HMI_flag.printing_flag = Printing();
DEBUG_ECHOLNPGM("printing_flag: ", HMI_flag.printing_flag);
if (HMI_flag.printing_flag)
DWIN_Print_Started();
else if (HMI_flag.abort_flag)
@@ -1281,6 +1282,7 @@ void EachMomentUpdate() {
if ((printingIsPaused() != HMI_flag.pause_flag) && !HMI_flag.home_flag) {
HMI_flag.pause_flag = printingIsPaused();
DEBUG_ECHOLNPGM("pause_flag: ", HMI_flag.pause_flag);
if (HMI_flag.pause_flag)
DWIN_Print_Pause();
else if (HMI_flag.abort_flag)
@@ -1345,7 +1347,7 @@ void EachMomentUpdate() {
DWINUI::Draw_Button(BTN_Cancel, 26, 280);
DWINUI::Draw_Button(BTN_Continue, 146, 280);
}
MediaFile *dir = nullptr;
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, 207, card.longest_filename());
@@ -1626,6 +1628,7 @@ void DWIN_LevelingDone() {
// Started a Print Job
void DWIN_Print_Started() {
DEBUG_ECHOLNPGM("DWIN_Print_Started: ", SD_Printing());
TERN_(HAS_GCODE_PREVIEW, if (Host_Printing()) Preview_Invalidate());
_percent_done = 0;
_remain_time = 0;
@@ -1639,17 +1642,20 @@ void DWIN_Print_Started() {
// Pause a print job
void DWIN_Print_Pause() {
DEBUG_ECHOLNPGM("DWIN_Print_Pause");
ICON_ResumeOrPause();
}
// Resume print job
void DWIN_Print_Resume() {
DEBUG_ECHOLNPGM("DWIN_Print_Resume");
ICON_ResumeOrPause();
LCD_MESSAGE(MSG_RESUME_PRINT);
}
// Ended print job
void DWIN_Print_Finished() {
DEBUG_ECHOLNPGM("DWIN_Print_Finished");
TERN_(POWER_LOSS_RECOVERY, if (card.isPrinting()) recovery.cancel());
HMI_flag.pause_flag = false;
wait_for_heatup = false;
@@ -1660,6 +1666,7 @@ void DWIN_Print_Finished() {
// Print was aborted
void DWIN_Print_Aborted() {
DEBUG_ECHOLNPGM("DWIN_Print_Aborted");
DWIN_Print_Finished();
}
@@ -1707,6 +1714,7 @@ void DWIN_SetColorDefaults() {
}
void DWIN_SetDataDefaults() {
DEBUG_ECHOLNPGM("DWIN_SetDataDefaults");
DWIN_SetColorDefaults();
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
TERN_(PIDTEMP, HMI_data.HotendPidT = DEF_HOTENDPIDT);
@@ -1730,10 +1738,13 @@ void DWIN_SetDataDefaults() {
}
void DWIN_CopySettingsTo(char * const buff) {
DEBUG_ECHOLNPGM("DWIN_CopySettingsTo");
DEBUG_ECHOLNPGM("HMI_data: ", sizeof(HMI_data_t));
memcpy(buff, &HMI_data, eeprom_data_size);
}
void DWIN_CopySettingsFrom(const char * const buff) {
DEBUG_ECHOLNPGM("DWIN_CopySettingsFrom");
memcpy(&HMI_data, buff, sizeof(HMI_data_t));
if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults();
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
@@ -1753,14 +1764,18 @@ void DWIN_CopySettingsFrom(const char * const buff) {
// Initialize or re-initialize the LCD
void MarlinUI::init_lcd() {
DEBUG_ECHOLNPGM("MarlinUI::init_lcd");
delay(750); // wait to wakeup screen
const bool hs = DWIN_Handshake(); UNUSED(hs);
DEBUG_ECHOPGM("DWIN_Handshake ");
DEBUG_ECHOLNF(hs ? F("ok.") : F("error."));
DWIN_Frame_SetDir(1);
DWIN_JPG_CacheTo1(Language_English);
Encoder_Configuration();
}
void DWIN_InitScreen() {
DEBUG_ECHOLNPGM("DWIN_InitScreen");
DWIN_SetColorDefaults();
HMI_Init(); // draws boot screen
DWINUI::init();
@@ -2019,6 +2034,7 @@ void AutoHome() { queue.inject_P(G28_STR); }
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
const_float_t step_zoffset = round((MenuData.Value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum;
if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset);
//DEBUG_ECHOLNF(F("BB Steps: "), step_zoffset);
#endif
}
void SetZOffset() {
@@ -2209,7 +2225,9 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if HAS_FILAMENT_SENSOR
void SetRunoutEnable() {
runout.reset();
Toggle_Chkb_Line(runout.enabled[0]);
runout.enabled[0] = !runout.enabled[0];
Draw_Chkb_Line(CurrentMenu->line(), runout.enabled[0]);
DWIN_UpdateLCD();
}
void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); }
void SetRunoutDistance() { SetFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), ApplyRunoutDistance); }
@@ -3185,7 +3203,7 @@ void Draw_FilSet_Menu() {
if (SET_MENU(FilSetMenu, MSG_FILAMENT_SET, 9)) {
BACK_ITEM(Draw_AdvancedSettings_Menu);
#if HAS_FILAMENT_SENSOR
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, SetRunoutEnable, &runout.enabled[0]);
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, SetRunoutEnable, &runout.enabled);
#endif
#if HAS_FILAMENT_RUNOUT_DISTANCE
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_DISTANCE_MM, onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance());
@@ -3524,7 +3542,7 @@ void Draw_Steps_Menu() {
#if ENABLED(MPCTEMP)
void HotendMPC() { thermalManager.MPC_autotune(active_extruder); }
void HotendMPC() { thermalManager.MPC_autotune(); }
void SetHeaterPower() { SetPFloatOnClick(1, 200, 1); }
void SetBlkHeatCapacity() { SetPFloatOnClick(0, 40, 2); }
void SetSensorRespons() { SetPFloatOnClick(0, 1, 4); }
+1 -1
View File
@@ -135,7 +135,7 @@ bool Has_Preview() {
Get_Value(buf, ";MAXZ:", fileprop.height);
fileprop.height -= tmp;
posptr = strstr(buf, tbstart);
if (posptr != nullptr) {
if (posptr != NULL) {
fileprop.thumbstart = indx + (posptr - &buf[0]);
}
else {
@@ -70,6 +70,7 @@ char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folde
FileNavigator::FileNavigator() { reset(); }
void FileNavigator::reset() {
DEBUG_ECHOLNPGM("reset()");
currentfoldername[0] = '\0';
currentfolderdepth = 0;
currentindex = 0;
@@ -85,6 +86,7 @@ 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, "/");
@@ -94,6 +96,7 @@ void FileNavigator::changeDIR(const char *folder) {
}
void FileNavigator::upDIR() {
DEBUG_ECHOLNPGM("upDIR() from D:", currentfolderdepth, " N:", currentfoldername);
if (!filelist.isAtRootDir()) {
filelist.upDir();
currentfolderdepth--;
@@ -114,6 +117,7 @@ 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++;
@@ -147,6 +151,8 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
}
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) {
@@ -160,8 +166,12 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
filesneeded--;
}
for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++)
if (filelist.seek(seek)) sendFile(paneltype);
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) {
@@ -202,6 +212,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
#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();
@@ -237,6 +248,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
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
@@ -120,9 +120,6 @@ namespace ExtUI {
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLoss() {
// Called when power-loss state is detected
}
// Called on resume from power-loss
void onPowerLossResume() { Chiron.PowerLossRecovery(); }
#endif
@@ -80,6 +80,9 @@ void ChironTFT::Startup() {
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 initialize and finish the animation
@@ -106,9 +106,6 @@ namespace ExtUI {
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLoss() {
// Called when power-loss state is detected
}
void onPowerLossResume() {
// Called on resume from power-loss
}
@@ -704,7 +704,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
break;
case 16: { // A16 set hotend temp
uint16_t tempvalue;
unsigned int tempvalue;
if (CodeSeen('S')) {
tempvalue = constrain(CodeValue(), 0, 275);
setTargetTemp_celsius(tempvalue, (extruder_t)E0);
@@ -719,7 +719,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
break;
case 17: { // A17 set heated bed temp
uint16_t tempbed;
unsigned int tempbed;
if (CodeSeen('S')) {
tempbed = constrain(CodeValue(), 0, 100);
setTargetTemp_celsius(tempbed, (heater_t)BED);
@@ -777,7 +777,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
case 22: // A22 move X/Y/Z or extrude
if (!isPrinting()) {
float coorvalue;
uint16_t movespeed = 0;
unsigned int movespeed = 0;
char commandStr[30];
char fullCommandStr[38];
@@ -141,6 +141,7 @@ void DGUSDisplay::ProcessRx() {
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();
@@ -204,11 +205,17 @@ void DGUSDisplay::ProcessRx() {
| Command DataLen (in Words) */
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_ECHOPGM(" vp=", vp, " dlen=", dlen);
DGUS_VP_Variable ramcopy;
if (populate_VPVar(vp, &ramcopy)) {
if (ramcopy.set_by_display_handler)
ramcopy.set_by_display_handler(ramcopy, &tmp[3]);
else
DEBUG_ECHOLNPGM(" VPVar found, no handler.");
}
else
DEBUG_ECHOLNPGM(" VPVar not found:", vp);
rx_datagram_state = DGUS_IDLE;
break;
@@ -253,7 +260,9 @@ bool DGUSDisplay::Initialized = false,
#define sw_barrier() asm volatile("": : :"memory");
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
//DEBUG_ECHOPGM("populate_VPVar ", VP);
const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
//DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp);
if (!pvp) return false;
memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
return true;
@@ -112,6 +112,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_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
@@ -122,6 +124,8 @@ 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_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);
@@ -130,7 +134,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_ECHOPGM(" DGUSLCD_SendPrintProgressToDisplay ", var.VP);
uint16_t tmp = ExtUI::getProgress_percent();
//DEBUG_ECHOLNPGM(" data ", tmp);
dgusdisplay.WriteVariable(var.VP, tmp);
}
@@ -147,7 +153,9 @@ void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var) {
void DGUSScreenHandler::DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr) {
if (var.memadr) {
const uint16_t value = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("Got percent:", value);
*(uint8_t*)var.memadr = map(constrain(value, 0, 100), 0, 100, 0, 255);
DEBUG_ECHOLNPGM("Set uint8:", *(uint8_t*)var.memadr);
}
}
@@ -228,6 +236,8 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) {
if (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);
@@ -239,6 +249,8 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
// Send heater status value to the display.
void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) {
if (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);
@@ -251,8 +263,11 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(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_ECHOPGM(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP);
//DEBUG_ECHOLNPGM(" data ", BE16_P(&index));
if (period++ > DGUS_UI_WAITING_STATUS_PERIOD) {
dgusdisplay.WriteVariable(var.VP, index);
//DEBUG_ECHOLNPGM(" data ", BE16_P(&index));
if (++index >= DGUS_UI_WAITING_STATUS) index = 0;
period = 0;
}
@@ -294,14 +309,17 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var)
const int16_t scroll = (int16_t)BE16_P(val_ptr);
if (scroll) {
top_file += scroll;
DEBUG_ECHOPGM("new topfile calculated:", top_file);
if (top_file < 0) {
top_file = 0;
DEBUG_ECHOLNPGM("Top of filelist reached");
}
else {
int16_t max_top = filelist.count() - DGUS_SD_FILESPERSCREEN;
NOLESS(max_top, 0);
NOMORE(top_file, max_top);
}
DEBUG_ECHOPGM("new topfile adjusted:", top_file);
}
else if (!filelist.isAtRootDir()) {
IF_DISABLED(DGUS_LCD_UI_MKS, filelist.upDir());
@@ -356,6 +374,7 @@ const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp) {
++ret;
} while (1);
DEBUG_ECHOLNPGM("FindVPVar NOT FOUND ", vp);
return nullptr;
}
@@ -425,6 +444,8 @@ void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_p
}
void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualExtrude");
const int16_t movevalue = BE16_P(val_ptr);
float target = movevalue * 0.01f;
ExtUI::extruder_t target_extruder;
@@ -446,16 +467,19 @@ void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
void DGUSScreenHandler::HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualMoveOption");
*(uint16_t*)var.memadr = BE16_P(val_ptr);
}
#endif
void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleMotorLockUnlock");
const int16_t lock = BE16_P(val_ptr);
queue.enqueue_one_now(lock ? F("M18") : F("M17"));
}
void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleSettings");
const uint16_t value = BE16_P(val_ptr);
switch (value) {
default: break;
@@ -471,6 +495,7 @@ void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) {
void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t value_raw = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("HandleStepPerMMChanged:", value_raw);
const float value = (float)value_raw / 10;
ExtUI::axis_t axis;
switch (var.VP) {
@@ -479,12 +504,15 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
default: return;
}
DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisSteps_per_mm(value, axis);
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis));
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t value_raw = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged:", value_raw);
const float value = (float)value_raw / 10;
ExtUI::extruder_t extruder;
switch (var.VP) {
@@ -496,12 +524,16 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
#endif
#endif
}
DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisSteps_per_mm(value, extruder);
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
#if HAS_PID_HEATING
void DGUSScreenHandler::HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandlePIDAutotune");
char buf[32] = {0};
switch (var.VP) {
@@ -536,6 +568,8 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
#if HAS_BED_PROBE
void DGUSScreenHandler::HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleProbeOffsetZChanged");
const float offset = float(int16_t(BE16_P(val_ptr))) / 100.0f;
ExtUI::setZOffset_mm(offset);
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
@@ -545,11 +579,14 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
#if HAS_FAN
void DGUSScreenHandler::HandleFanControl(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleFanControl");
*(uint8_t*)var.memadr = *(uint8_t*)var.memadr > 0 ? 0 : 255;
}
#endif
void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleHeaterControl");
uint8_t preheat_temp = 0;
switch (var.VP) {
#if HAS_HOTEND
@@ -577,6 +614,8 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
#if ENABLED(DGUS_PREHEAT_UI)
void DGUSScreenHandler::HandlePreheat(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandlePreheat");
const uint16_t preheat_option = BE16_P(val_ptr);
switch (preheat_option) {
default:
@@ -615,6 +654,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
#endif
void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) {
DEBUG_ECHOLNPGM("SetNewScreen: ", newscreen);
if (!popup) {
memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1);
past_screens[0] = current_screen;
@@ -625,14 +665,18 @@ void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) {
}
void DGUSScreenHandler::PopToOldScreen() {
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_ECHOPGM(" UpdateScreenVPData Screen: ", current_screen);
const uint16_t *VPList = DGUSLCD_FindScreenVPMapList(current_screen);
if (!VPList) {
DEBUG_ECHOLNPGM(" NO SCREEN FOR: ", current_screen);
ScreenComplete = true;
return; // nothing to do, likely a bug or boring screen.
}
@@ -643,8 +687,10 @@ void DGUSScreenHandler::UpdateScreenVPData() {
bool sent_one = false;
do {
uint16_t VP = pgm_read_word(VPList);
DEBUG_ECHOPGM(" VP: ", VP);
if (!VP) {
update_ptr = 0;
DEBUG_ECHOLNPGM(" UpdateScreenVPData done");
ScreenComplete = true;
return; // Screen completed.
}
@@ -657,10 +703,14 @@ void DGUSScreenHandler::UpdateScreenVPData() {
// 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_ECHOPGM(" calling handler for ", rcpy.VP);
sent_one = true;
rcpy.send_to_display_handler(rcpy);
}
else {
// auto x=dgusdisplay.GetFreeTxBuffer();
//DEBUG_ECHOLNPGM(" tx almost full: ", x);
//DEBUG_ECHOPGM(" update_ptr ", update_ptr);
ScreenComplete = false;
return; // please call again!
}
@@ -675,6 +725,7 @@ void DGUSScreenHandler::GotoScreen(DGUSLCD_Screens screen, bool ispopup) {
}
void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
DEBUG_ECHOLNPGM("GotoScreen ", screen);
const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) };
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
}
@@ -191,7 +191,7 @@ public:
// 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<uint16_t decimals>
template<unsigned int decimals>
static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
@@ -203,7 +203,7 @@ public:
// 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<uint16_t decimals>
template<unsigned int decimals>
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
-3
View File
@@ -126,9 +126,6 @@ namespace ExtUI {
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLoss() {
// Called when power-loss state is detected
}
void onPowerLossResume() {
// Called on resume from power-loss
IF_DISABLED(DGUS_LCD_UI_MKS, ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS));
@@ -258,7 +258,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
@@ -272,10 +272,10 @@ constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
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 , uint16_t , 0~1638.4
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;
@@ -134,6 +134,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
// 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();
@@ -149,6 +151,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
}
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) {
@@ -157,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;
@@ -167,21 +171,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
break;
#if HAS_Y_AXIS
case VP_MOVE_Y:
axiscode = 'Y';
speed = _mf[Y_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#endif
case VP_MOVE_Y:
axiscode = 'Y';
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#if HAS_Z_AXIS
case VP_MOVE_Z:
axiscode = 'Z';
speed = _mf[Z_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
break;
#endif
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';
@@ -191,42 +190,63 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
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) queue.enqueue_now(F("G91"));
if (!relative_mode) {
//DEBUG_ECHOPGM(" G91");
queue.enqueue_now(F("G91"));
//DEBUG_ECHOPGM(" ✓ ");
}
char buf[32]; // G1 X9999.99 F12345
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
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(F("G90"));
//DEBUG_ECHOPGM(" ✓ ");
}
//while (!enqueue_and_echo_command(buf)) idle();
if (!old_relative_mode) queue.enqueue_now(F("G90"));
}
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) {
@@ -248,6 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif
}
DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
@@ -256,6 +277,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -266,6 +288,8 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -336,6 +360,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
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
@@ -257,7 +257,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
@@ -271,7 +271,7 @@ constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
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_BED_PID_P = 0x3710;
@@ -134,6 +134,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
// 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();
@@ -149,6 +151,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
}
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) {
@@ -157,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;
@@ -167,21 +171,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
break;
#if HAS_Y_AXIS
case VP_MOVE_Y:
axiscode = 'Y';
speed = _mf[Y_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#endif
case VP_MOVE_Y:
axiscode = 'Y';
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#if HAS_Z_AXIS
case VP_MOVE_Z:
axiscode = 'Z';
speed = _mf[Z_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
break;
#endif
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';
@@ -191,42 +190,63 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
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
const bool old_relative_mode = relative_mode;
if (!relative_mode) queue.enqueue_now(F("G91"));
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
bool old_relative_mode = relative_mode;
if (!relative_mode) {
//DEBUG_ECHOPGM(" G91");
queue.enqueue_now(F("G91"));
//DEBUG_ECHOPGM(" ✓ ");
}
char buf[32]; // G1 X9999.99 F12345
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
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(F("G90"));
//DEBUG_ECHOPGM(" ✓ ");
}
//while (!enqueue_and_echo_command(buf)) idle();
if (!old_relative_mode) queue.enqueue_now(F("G90"));
}
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) {
@@ -248,6 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif
}
DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
@@ -256,6 +277,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -266,6 +288,8 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -336,6 +360,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
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
@@ -256,10 +256,10 @@ constexpr uint16_t VP_E1_STATUS = 0x3412;
constexpr uint16_t VP_MOVE_OPTION = 0x3500;
// // PIDs
// constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
// 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 , uint16_t , 0~1638.4
// 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;
@@ -414,7 +414,7 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
constexpr uint16_t VP_FAN3_STATUS = 0x2716;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x2900; // at the moment , uint16_t , 0~1638.4
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;
@@ -521,10 +521,10 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
constexpr uint16_t VP_PrintTime_S = 0x3504;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
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 , uint16_t , 0~1638.4
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;
@@ -80,6 +80,8 @@ void DGUSScreenHandlerMKS::sendinfoscreen(const void *line1, const void *line2,
void DGUSScreenHandlerMKS::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);
@@ -88,6 +90,7 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) {
void DGUSScreenHandlerMKS::DGUSLCD_SendBabyStepToDisplay(DGUS_VP_Variable &var) {
float value = current_position.z;
DEBUG_ECHOLNPGM(" >> ", value, 6);
value *= cpow(10, 2);
dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
}
@@ -103,11 +106,14 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var)
void DGUSScreenHandlerMKS::DGUSLCD_SetUint8(DGUS_VP_Variable &var, void *val_ptr) {
if (var.memadr) {
const uint16_t value = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("Got uint8:", value);
*(uint8_t*)var.memadr = map(constrain(value, 0, 255), 0, 255, 0, 255);
DEBUG_ECHOLNPGM("Set uint8:", *(uint8_t*)var.memadr);
}
}
void DGUSScreenHandlerMKS::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);
}
@@ -272,6 +278,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
// 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
@@ -292,6 +300,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
// Special handling for popup is to return to previous menu
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
setPauseMenuResponse(PAUSE_RESPONSE_RESUME_PRINT);
PopToOldScreen();
return;
}
@@ -305,6 +314,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
void DGUSScreenHandlerMKS::ScreenBackChange(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t target = BE16_P(val_ptr);
DEBUG_ECHOLNPGM(" back = 0x%x", target);
switch (target) {
}
}
@@ -318,6 +328,7 @@ void DGUSScreenHandlerMKS::ZoffsetConfirm(DGUS_VP_Variable &var, void *val_ptr)
}
void DGUSScreenHandlerMKS::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("GetTurnOffCtrl\n");
const uint16_t value = BE16_P(val_ptr);
switch (value) {
case 0 ... 1: DGUSAutoTurnOff = (bool)value; break;
@@ -326,6 +337,7 @@ void DGUSScreenHandlerMKS::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr)
}
void DGUSScreenHandlerMKS::GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("GetMinExtrudeTemp");
const uint16_t value = BE16_P(val_ptr);
TERN_(PREVENT_COLD_EXTRUSION, thermalManager.extrude_min_temp = value);
mks_min_extrusion_temp = value;
@@ -333,6 +345,7 @@ void DGUSScreenHandlerMKS::GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_pt
}
void DGUSScreenHandlerMKS::GetZoffsetDistance(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("GetZoffsetDistance");
const uint16_t value = BE16_P(val_ptr);
float val_distance = 0;
switch (value) {
@@ -346,6 +359,7 @@ void DGUSScreenHandlerMKS::GetZoffsetDistance(DGUS_VP_Variable &var, void *val_p
}
void DGUSScreenHandlerMKS::GetManualMovestep(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("\nGetManualMovestep");
*(uint16_t *)var.memadr = BE16_P(val_ptr);
}
@@ -368,8 +382,8 @@ void DGUSScreenHandlerMKS::EEPROM_CTRL(DGUS_VP_Variable &var, void *val_ptr) {
}
void DGUSScreenHandlerMKS::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t z = BE16_P(val_ptr);
switch (z) {
const uint16_t z_value = BE16_P(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;
@@ -382,6 +396,7 @@ void DGUSScreenHandlerMKS::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr)
#if HAS_BED_PROBE
const int32_t value = BE32_P(val_ptr);
const float Offset = value / 100.0f;
DEBUG_ECHOLNPGM("\nget int6 offset >> ", value, 6);
switch (var.VP) {
default: break;
@@ -477,7 +492,7 @@ void DGUSScreenHandlerMKS::MeshLevelDistanceConfig(DGUS_VP_Variable &var, void *
void DGUSScreenHandlerMKS::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
#if ENABLED(MESH_BED_LEVELING)
const uint16_t mesh_val = BE16_P(val_ptr);
const uint16_t mesh_value = BE16_P(val_ptr);
// static uint8_t a_first_level = 1;
char cmd_buf[30];
float offset = mesh_adj_distance;
@@ -485,7 +500,7 @@ void DGUSScreenHandlerMKS::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
if (!queue.ring_buffer.empty()) return;
switch (mesh_val) {
switch (mesh_value) {
case 0:
offset = mesh_adj_distance;
integer = offset; // get int
@@ -575,19 +590,20 @@ void DGUSScreenHandlerMKS::SD_FileBack(DGUS_VP_Variable&, void*) {
}
void DGUSScreenHandlerMKS::LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t lcd_val = BE16_P(val_ptr);
lcd_default_light = constrain(lcd_val, 10, 100);
const uint16_t lcd_value = BE16_P(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 DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val_ptr) {
const int16_t point_val = BE16_P(val_ptr);
const int16_t point_value = BE16_P(val_ptr);
// Insist on leveling first time at this screen
static bool first_level_flag = false;
if (!first_level_flag || point_val == 0x0001) {
if (!first_level_flag || point_value == 0x0001) {
queue.enqueue_now_P(G28_STR);
first_level_flag = true;
}
@@ -600,10 +616,10 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
queue.enqueue_one_now(buf_level);
};
if (WITHIN(point_val, 0x0001, 0x0005))
if (WITHIN(point_value, 0x0001, 0x0005))
queue.enqueue_now(F("G1Z10"));
switch (point_val) {
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);
@@ -627,7 +643,7 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
break;
}
if (WITHIN(point_val, 0x0002, 0x0005)) {
if (WITHIN(point_value, 0x0002, 0x0005)) {
//queue.enqueue_now(F("G28Z"));
queue.enqueue_now(F("G1Z-10"));
}
@@ -637,14 +653,14 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
#define mks_max(a, b) ((a) > (b)) ? (a) : (b)
void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr) {
#if EITHER(HAS_TRINAMIC_CONFIG, HAS_STEALTHCHOP)
const uint16_t tmc_val = BE16_P(val_ptr);
const uint16_t tmc_value = BE16_P(val_ptr);
#endif
switch (var.VP) {
case VP_TMC_X_STEP:
#if USE_SENSORLESS
#if X_HAS_STEALTHCHOP
stepperX.homing_threshold(mks_min(tmc_val, 255));
stepperX.homing_threshold(mks_min(tmc_value, 255));
settings.save();
//tmc_step.x = stepperX.homing_threshold();
#endif
@@ -653,7 +669,7 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
case VP_TMC_Y_STEP:
#if USE_SENSORLESS
#if Y_HAS_STEALTHCHOP
stepperY.homing_threshold(mks_min(tmc_val, 255));
stepperY.homing_threshold(mks_min(tmc_value, 255));
settings.save();
//tmc_step.y = stepperY.homing_threshold();
#endif
@@ -662,7 +678,7 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
case VP_TMC_Z_STEP:
#if USE_SENSORLESS
#if Z_HAS_STEALTHCHOP
stepperZ.homing_threshold(mks_min(tmc_val, 255));
stepperZ.homing_threshold(mks_min(tmc_value, 255));
settings.save();
//tmc_step.z = stepperZ.homing_threshold();
#endif
@@ -670,49 +686,49 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
break;
case VP_TMC_X_Current:
#if AXIS_IS_TMC(X)
stepperX.rms_current(tmc_val);
stepperX.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_X1_Current:
#if AXIS_IS_TMC(X2)
stepperX2.rms_current(tmc_val);
stepperX2.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_Y_Current:
#if AXIS_IS_TMC(Y)
stepperY.rms_current(tmc_val);
stepperY.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_Y1_Current:
#if AXIS_IS_TMC(X2)
stepperY2.rms_current(tmc_val);
stepperY2.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_Z_Current:
#if AXIS_IS_TMC(Z)
stepperZ.rms_current(tmc_val);
stepperZ.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_Z1_Current:
#if AXIS_IS_TMC(Z2)
stepperZ2.rms_current(tmc_val);
stepperZ2.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_E0_Current:
#if AXIS_IS_TMC(E0)
stepperE0.rms_current(tmc_val);
stepperE0.rms_current(tmc_value);
settings.save();
#endif
break;
case VP_TMC_E1_Current:
#if AXIS_IS_TMC(E1)
stepperE1.rms_current(tmc_val);
stepperE1.rms_current(tmc_value);
settings.save();
#endif
break;
@@ -728,6 +744,8 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
}
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualMove");
int16_t movevalue = BE16_P(val_ptr);
// Choose Move distance
@@ -735,64 +753,69 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
else if (manualMoveStep == 0x02) manualMoveStep = 100;
else if (manualMoveStep == 0x03) manualMoveStep = 1000;
DEBUG_ECHOLNPGM("QUEUE LEN:", queue.ring_buffer.length);
if (!print_job_timer.isPaused() && !queue.ring_buffer.empty())
return;
char axiscode;
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
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;
#if HAS_Y_AXIS
case VP_MOVE_Y:
axiscode = 'Y';
speed = _mf[Y_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#endif
case VP_MOVE_Y:
DEBUG_ECHOLNPGM("Y Move");
axiscode = 'Y';
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#if HAS_Z_AXIS
case VP_MOVE_Z:
axiscode = 'Z';
speed = _mf[Z_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
break;
#endif
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
axiscode = '\0';
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:
axiscode = 'X';
DEBUG_ECHOLNPGM("X Home");
axiscode = 'X';
movevalue = 0;
break;
#if HAS_Y_AXIS
case VP_Y_HOME:
axiscode = 'Y';
movevalue = 0;
break;
#endif
case VP_Y_HOME:
DEBUG_ECHOLNPGM("Y Home");
axiscode = 'Y';
movevalue = 0;
break;
#if HAS_Z_AXIS
case VP_Z_HOME:
axiscode = 'Z';
movevalue = 0;
break;
#endif
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;
@@ -802,16 +825,21 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
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);
@@ -820,57 +848,80 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
else {
// movement
const bool old_relative_mode = relative_mode;
if (!relative_mode) queue.enqueue_now(F("G91"));
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
bool old_relative_mode = relative_mode;
if (!relative_mode) {
//DEBUG_ECHOPGM(" G91");
queue.enqueue_now(F("G91"));
//DEBUG_ECHOPGM(" ✓ ");
}
char buf[32]; // G1 X9999.99 F12345
//const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
// 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] = '-'; }
const int16_t fraction = ABS(movevalue) % 100;
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();
if (!old_relative_mode) queue.enqueue_now(F("G90"));
//DEBUG_ECHOLNPGM(" ✓ ");
if (!old_relative_mode) {
//DEBUG_ECHOPGM("G90");
//queue.enqueue_now(F("G90"));
queue.enqueue_now(F("G90"));
//DEBUG_ECHOPGM(" ✓ ");
}
}
ForceCompleteUpdate();
DEBUG_ECHOLNPGM("manmv done.");
return;
cannotmove:
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
return;
}
void DGUSScreenHandlerMKS::GetParkPos(DGUS_VP_Variable &var, void *val_ptr) {
const int16_t pos = BE16_P(val_ptr);
const int16_t value_pos = BE16_P(val_ptr);
switch (var.VP) {
case VP_X_PARK_POS: mks_park_pos.x = pos; break;
case VP_Y_PARK_POS: mks_park_pos.y = pos; break;
case VP_Z_PARK_POS: mks_park_pos.z = pos; break;
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 DGUSScreenHandlerMKS::HandleChangeLevelPoint(DGUS_VP_Variable &var, void *val_ptr) {
const int16_t raw = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("HandleChangeLevelPoint");
*(int16_t*)var.memadr = raw;
const int16_t value_raw = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t raw = BE16_P(val_ptr);
const float value = (float)raw;
DEBUG_ECHOLNPGM("HandleStepPerMMChanged");
const uint16_t value_raw = BE16_P(val_ptr);
const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis;
switch (var.VP) {
@@ -880,13 +931,19 @@ void DGUSScreenHandlerMKS::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *v
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
}
ExtUI::setAxisSteps_per_mm(value, axis);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t raw = BE16_P(val_ptr);
const float value = (float)raw;
DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged");
const uint16_t value_raw = BE16_P(val_ptr);
const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPGM("value:", value);
ExtUI::extruder_t extruder;
switch (var.VP) {
@@ -899,13 +956,19 @@ void DGUSScreenHandlerMKS::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var,
#endif
}
ExtUI::setAxisSteps_per_mm(value, extruder);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t raw = BE16_P(val_ptr);
const float value = (float)raw;
DEBUG_ECHOLNPGM("HandleMaxSpeedChange");
const uint16_t value_raw = BE16_P(val_ptr);
const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis;
switch (var.VP) {
@@ -915,13 +978,19 @@ void DGUSScreenHandlerMKS::HandleMaxSpeedChange(DGUS_VP_Variable &var, void *val
default: return;
}
ExtUI::setAxisMaxFeedrate_mm_s(value, axis);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleExtruderMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t raw = BE16_P(val_ptr);
const float value = (float)raw;
DEBUG_ECHOLNPGM("HandleExtruderMaxSpeedChange");
const uint16_t value_raw = BE16_P(val_ptr);
const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPGM("value:", value);
ExtUI::extruder_t extruder;
switch (var.VP) {
@@ -934,13 +1003,19 @@ void DGUSScreenHandlerMKS::HandleExtruderMaxSpeedChange(DGUS_VP_Variable &var, v
case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break;
}
ExtUI::setAxisMaxFeedrate_mm_s(value, extruder);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleMaxAccChange(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t raw = BE16_P(val_ptr);
const float value = (float)raw;
DEBUG_ECHOLNPGM("HandleMaxAccChange");
const uint16_t value_raw = BE16_P(val_ptr);
const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis;
switch (var.VP) {
@@ -950,13 +1025,17 @@ void DGUSScreenHandlerMKS::HandleMaxAccChange(DGUS_VP_Variable &var, void *val_p
case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break;
}
ExtUI::setAxisMaxAcceleration_mm_s2(value, axis);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleExtruderAccChange(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t raw = BE16_P(val_ptr);
float value = (float)raw;
DEBUG_ECHOLNPGM("HandleExtruderAccChange");
uint16_t value_raw = BE16_P(val_ptr);
DEBUG_ECHOLNPGM("value_raw:", value_raw);
float value = (float)value_raw;
ExtUI::extruder_t extruder;
switch (var.VP) {
default: return;
@@ -967,39 +1046,41 @@ void DGUSScreenHandlerMKS::HandleExtruderAccChange(DGUS_VP_Variable &var, void *
case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break;
#endif
}
DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder);
DEBUG_ECHOLNPGM("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 DGUSScreenHandlerMKS::HandleTravelAccChange(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t travel = BE16_P(val_ptr);
planner.settings.travel_acceleration = (float)travel;
uint16_t value_travel = BE16_P(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 DGUSScreenHandlerMKS::HandleFeedRateMinChange(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t t = BE16_P(val_ptr);
planner.settings.min_feedrate_mm_s = (float)t;
uint16_t value_t = BE16_P(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 DGUSScreenHandlerMKS::HandleMin_T_F(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t t_f = BE16_P(val_ptr);
planner.settings.min_travel_feedrate_mm_s = (float)t_f;
uint16_t value_t_f = BE16_P(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 DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t acc = BE16_P(val_ptr);
planner.settings.acceleration = (float)acc;
uint16_t value_acc = BE16_P(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 DGUSScreenHandlerMKS::HandleGetExMinTemp(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t ex_min_temp = BE16_P(val_ptr);
thermalManager.extrude_min_temp = ex_min_temp;
const uint16_t value_ex_min_temp = BE16_P(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
@@ -1007,7 +1088,9 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
#if HAS_PID_HEATING
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t rawvalue = BE16_P(val_ptr);
const float value = float(rawvalue);
DEBUG_ECHOLNPGM("V1:", rawvalue);
const float value = 1.0f * rawvalue;
DEBUG_ECHOLNPGM("V2:", value);
float newvalue = 0;
switch (var.VP) {
@@ -1029,6 +1112,7 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
#endif
}
DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue;
settings.save();
@@ -1038,6 +1122,7 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
#if ENABLED(BABYSTEPPING)
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
const float step = ZOffset_distance;
const uint16_t flag = BE16_P(val_ptr);
@@ -1079,17 +1164,19 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
#endif // BABYSTEPPING
void DGUSScreenHandlerMKS::GetManualFilament(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t len = BE16_P(val_ptr);
const float value = (float)len;
const uint16_t value_len = BE16_P(val_ptr);
const float value = (float)value_len;
DEBUG_ECHOLNPGM("GetManualFilament:", value);
distanceFilament = value;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
void DGUSScreenHandlerMKS::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr) {
const uint16_t len = BE16_P(val_ptr);
filamentSpeed_mm_s = len;
const uint16_t value_len = BE16_P(val_ptr);
filamentSpeed_mm_s = value_len;
DEBUG_ECHOLNPGM("GetManualFilamentSpeed:", value_len);
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
@@ -1178,16 +1265,20 @@ void GcodeSuite::M1002() {
}
void DGUSScreenHandlerMKS::FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("FilamentLoad");
FilamentLoadUnload(var, val_ptr, 1);
}
void DGUSScreenHandlerMKS::FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("FilamentUnLoad");
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 = BE16_P(val_ptr);
@@ -1255,6 +1346,7 @@ void DGUSScreenHandlerMKS::FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr)
}
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
@@ -247,7 +247,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
@@ -261,7 +261,7 @@ constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
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_BED_PID_P = 0x3710;
@@ -134,6 +134,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
// 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();
@@ -149,6 +151,8 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
}
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) {
@@ -157,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
#endif
char axiscode;
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
switch (var.VP) {
default: return;
@@ -167,21 +171,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
break;
#if HAS_Y_AXIS
case VP_MOVE_Y:
axiscode = 'Y';
speed = _mf[Y_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#endif
case VP_MOVE_Y:
axiscode = 'Y';
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
#if HAS_Z_AXIS
case VP_MOVE_Z:
axiscode = 'Z';
speed = _mf[Z_AXIS];
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
break;
#endif
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';
@@ -191,42 +190,63 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
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
const bool old_relative_mode = relative_mode;
if (!relative_mode) queue.enqueue_now(F("G91"));
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
bool old_relative_mode = relative_mode;
if (!relative_mode) {
//DEBUG_ECHOPGM(" G91");
queue.enqueue_now(F("G91"));
//DEBUG_ECHOPGM(" ✓ ");
}
char buf[32]; // G1 X9999.99 F12345
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
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(F("G90"));
//DEBUG_ECHOPGM(" ✓ ");
}
//while (!enqueue_and_echo_command(buf)) idle();
if (!old_relative_mode) queue.enqueue_now(F("G90"));
}
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) {
@@ -248,6 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif
}
DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
@@ -256,6 +277,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -266,6 +288,8 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#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);
@@ -336,6 +360,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
}
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
@@ -0,0 +1,357 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* DGUS implementation written by coldtobi in 2019 for Marlin */
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
#define DEBUG_ECHOLNPAIR DEBUG_ECHOLNPGM
#if HOTENDS > 2
#error "More than 2 hotends not implemented on the Display UI design."
#endif
#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"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../feature/powerloss.h"
#endif
#include "DGUSDisplay.h"
#include "DGUSVPVariable.h"
#include "DGUSDisplayDef.h"
// Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
constexpr uint8_t DGUS_HEADER1 = 0x5A;
constexpr uint8_t DGUS_HEADER2 = 0xA5;
constexpr uint8_t DGUS_CMD_WRITEVAR = 0x82;
constexpr uint8_t DGUS_CMD_READVAR = 0x83;
#if ENABLED(DEBUG_DGUSLCD)
bool dguslcd_local_debug; // = false;
#endif
#define dgusserial LCD_SERIAL
void DGUSDisplay::InitDisplay() {
dgusserial.begin(LCD_BAUDRATE);
/*delay(500); // Attempt to fix possible handshake error
ResetDisplay(); // Reset for firmware update
delay(500); // Attempt to fix possible handshake error
*/
if (true
#if ENABLED(POWER_LOSS_RECOVERY)
&& !recovery.valid()
#endif
)
RequestScreen(
#if ENABLED(SHOW_BOOTSCREEN)
DGUSLCD_SCREEN_BOOT
#else
DGUSLCD_SCREEN_MAIN
#endif
);
}
void DGUSDisplay::ResetDisplay() {
SERIAL_ECHOLN("ResetDisplay");
const unsigned char resetCommand[] = { 0x55, 0xAA, 0x5A, 0xA5 };
WriteVariable(0x04, resetCommand, sizeof(resetCommand));
}
void DGUSDisplay::ReadVariable(uint16_t adr) {
WriteHeader(adr, DGUS_CMD_READVAR, sizeof(uint8_t));
// Specify to read one byte
dgusserial.write(static_cast<uint8_t>(1));
}
void DGUSDisplay::WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr, char fillChar) {
const char* myvalues = static_cast<const char*>(values);
bool strend = !myvalues;
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
while (valueslen--) {
char x;
if (!strend) x = *myvalues++;
if ((isstr && !x) || strend) {
strend = true;
x = fillChar;
}
dgusserial.write(x);
}
}
void DGUSDisplay::WriteVariable(uint16_t adr, uint16_t value) {
value = (value & 0xffU) << 8U | (value >> 8U);
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint16_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, int16_t value) {
union { int16_t l; char lb[2]; } endian;
char tmp[2];
endian.l = value;
tmp[0] = endian.lb[1];
tmp[1] = endian.lb[0];
WriteVariable(adr, static_cast<const void*>(&tmp), sizeof(int16_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, uint8_t value) {
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint8_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, int8_t value) {
WriteVariable(adr, static_cast<const void*>(&value), sizeof(int8_t));
}
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<const void*>(&tmp), sizeof(long));
}
void DGUSDisplay::WriteVariable(uint16_t adr, float value) {
static_assert(sizeof(float) == 4);
union { float 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<const void*>(&tmp), sizeof(float));
}
void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr, char fillChar) {
const char* myvalues = static_cast<const char*>(values);
bool strend = !myvalues;
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
while (valueslen--) {
char x;
if (!strend) x = pgm_read_byte(myvalues++);
if ((isstr && !x) || strend) {
strend = true;
x = fillChar;
}
dgusserial.write(x);
}
}
void DGUSDisplay::SetVariableDisplayColor(uint16_t sp, uint16_t color) {
WriteVariable(sp + 0x03, color);
}
void DGUSDisplay::ProcessRx() {
#if ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS)
if (!dgusserial.available() && dgusserial.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;
//dgusserial.reset_rx_overun();
dgusserial.flush();
}
#endif
uint8_t receivedbyte;
while (dgusserial.available()) {
switch (rx_datagram_state) {
case DGUS_IDLE: // Waiting for the first header byte
receivedbyte = dgusserial.read();
//DEBUGLCDCOMM_ECHOPAIR("< ",receivedbyte);
if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN;
break;
case DGUS_HEADER1_SEEN: // Waiting for the second header byte
receivedbyte = dgusserial.read();
//DEBUGLCDCOMM_ECHOPAIR(" ", 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 = dgusserial.read();
//DEBUGLCDCOMM_ECHOPAIR(" (", 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 (dgusserial.available() < rx_datagram_len) return;
Initialized = true; // We've talked to it, so we defined it as initialized.
uint8_t command = dgusserial.read();
// DEBUGLCDCOMM_ECHOPAIR("# ", 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 = dgusserial.read();
//DEBUGLCDCOMM_ECHOPAIR(" ", receivedbyte);
*ptmp++ = receivedbyte;
}
//DEBUGLCDCOMM_ECHOPGM(" # ");
// mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it.
if (command == DGUS_CMD_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_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);
DGUS_VP_Variable ramcopy;
DEBUG_ECHOLNPAIR("VP received: ", vp , " - val ", tmp[3]);
if (populate_VPVar(vp, &ramcopy)) {
if (ramcopy.set_by_display_handler)
ramcopy.set_by_display_handler(ramcopy, &tmp[3]);
else
DEBUG_ECHOLNPGM(" VPVar found, no handler.");
}
else
DEBUG_ECHOLNPAIR(" VPVar not found:", vp);
rx_datagram_state = DGUS_IDLE;
break;
}
// discard anything else
rx_datagram_state = DGUS_IDLE;
}
}
}
size_t DGUSDisplay::GetFreeTxBuffer() { return SERIAL_GET_TX_BUFFER_FREE(); }
void DGUSDisplay::WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen) {
dgusserial.write(DGUS_HEADER1);
dgusserial.write(DGUS_HEADER2);
dgusserial.write(payloadlen + 3);
dgusserial.write(cmd);
dgusserial.write(adr >> 8);
dgusserial.write(adr & 0xFF);
}
void DGUSDisplay::WritePGM(const char str[], uint8_t len) {
while (len--) dgusserial.write(pgm_read_byte(str++));
}
void DGUSDisplay::loop() {
// protect against recursion… ProcessRx() may indirectly call idle() when injecting gcode commands.
if (!no_reentrance) {
no_reentrance = true;
ProcessRx();
//Because crappy VPHELPER macros cant take calcs or functions, process updated value here. If we handle only in button handler code, we will miss changes over M290
dgusdisplay.WriteVariable(VP_Z_OFFSET, (int16_t)(100*ExtUI::getZOffset_mm()));
no_reentrance = false;
}
}
void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
displayRequest = screen;
DEBUG_ECHOLNPAIR("GotoScreen ", screen);
const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) };
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
}
void DGUSDisplay::SetTouchScreenConfiguration(bool enable_standby, bool enable_sound, uint8_t standby_brightness, uint8_t brightness, uint16_t standbyTimeSeconds) {
// Main configuration (System_Config)
unsigned char cfg_bits = 0x0;
cfg_bits |= 1UL << 5; // 5: load 22 touch file
cfg_bits |= 1UL << 4; // 4: auto-upload should always be enabled
if (enable_sound) cfg_bits |= 1UL << 3; // 3: audio
if (enable_standby) cfg_bits |= 1UL << 2; // 2: backlight on standby
cfg_bits |= 1UL << 1; // 1 & 0: 270 degrees orientation of display
cfg_bits |= 1UL << 0;
DEBUG_ECHOLNPAIR("Update touch screen config - standby ", enable_standby);
DEBUG_ECHOLNPAIR("Update touch screen config - sound ", enable_sound);
const unsigned char config_set[] = { 0x5A, 0x00, (unsigned char) (cfg_bits >> 8U), (unsigned char) (cfg_bits & 0xFFU) };
WriteVariable(0x80 /*System_Config*/, config_set, sizeof(config_set));
// Standby brightness (LED_Config)
uint16_t dwinStandbyTimeSeconds = 100 * standbyTimeSeconds; /* milliseconds, but divided by 10 (not 5 like the docs say) */
const unsigned char brightness_set[] = {
brightness /*% active*/,
standby_brightness /*% standby*/,
static_cast<uint8_t>(dwinStandbyTimeSeconds >> 8),
static_cast<uint8_t>(dwinStandbyTimeSeconds)
};
WriteVariable(0x82 /*LED_Config*/, brightness_set, sizeof(brightness_set));
}
rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE;
uint8_t DGUSDisplay::rx_datagram_len = 0;
bool DGUSDisplay::Initialized = false;
bool DGUSDisplay::no_reentrance = false;
DGUSLCD_Screens DGUSDisplay::displayRequest = DGUSLCD_SCREEN_BOOT;
// A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() asm volatile("": : :"memory");
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
//DEBUG_ECHOLNPAIR("populate_VPVar ", VP);
const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
// DEBUG_ECHOLNPAIR(" pvp ", (uint16_t )pvp);
if (!pvp) return false;
memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
return true;
}
#endif // HAS_DGUS_LCD
@@ -0,0 +1,136 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//#define DEBUG_DGUSLCD
//#define DEBUG_DGUSLCD_OUTGOING_COMM
/* Creality DGUS implementation written by Sebastiaan Dammann in 2020 for Marlin */
#include "../../../inc/MarlinConfigPre.h"
#include "../../../MarlinCore.h"
#if HAS_BED_PROBE
#include "../../../module/probe.h"
#endif
#include "DGUSVPVariable.h"
enum DGUSLCD_Screens : uint8_t;
#ifndef DEBUG_OUT
#define DEBUG_OUT ENABLED(DEBUG_DGUSLCD)
#endif
#include "../../../core/debug_out.h"
typedef enum : 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.
} rx_datagram_state_t;
typedef void (*UPDATE_CURRENT_SCREEN_CALLBACK)(DGUSLCD_Screens screen);
// Low-Level access to the display.
class DGUSDisplay {
public:
DGUSDisplay() = default;
static void InitDisplay();
static void ResetDisplay();
// Variable access.
static void WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false, char fillChar = ' ');
static void WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false, char fillChar = ' ');
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 WriteVariable(uint16_t adr, float value);
static void SetVariableDisplayColor(uint16_t sp, uint16_t color);
static void ReadVariable(uint16_t adr);
// Utility functions for bridging ui_api and dgus
template<typename T, float(*Getter)(const T), T selector, typename WireType=uint16_t>
static void SetVariable(DGUS_VP_Variable &var) {
WriteVariable(var.VP, (WireType)Getter(selector));
}
template<typename T, void(*Setter)(const float V, const T), T selector>
static void GetVariable(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t newvalue = swap16(*(uint16_t*)val_ptr);
Setter(newvalue, selector);
}
// Force display into another screen.
// (And trigger update of containing VPs)
// (to implement a pop up message, which may not be nested)
static void RequestScreen(DGUSLCD_Screens screen);
static void SetTouchScreenConfiguration(bool enable_standby, bool enable_sound, uint8_t standby_brightness, uint8_t active_brightness, uint16_t standbyTimeSeconds);
// Periodic tasks, eg. Rx-Queue handling.
static void loop();
public:
// 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.
// (both boils down that the display answered to our chatting)
static inline bool isInitialized() { return Initialized; }
private:
static void WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen);
static void WritePGM(const char str[], uint8_t len);
static void ProcessRx();
static inline uint16_t swap16(const uint16_t value) { return (value & 0xffU) << 8U | (value >> 8U); }
static rx_datagram_state_t rx_datagram_state;
static uint8_t rx_datagram_len;
static bool Initialized, no_reentrance;
static DGUSLCD_Screens displayRequest;
};
#define GET_VARIABLE(f, t, V...) (&DGUSDisplay::GetVariable<decltype(t), f, t, ##V>)
#define SET_VARIABLE(f, t, V...) (&DGUSDisplay::SetVariable<decltype(t), f, t, ##V>)
extern DGUSDisplay dgusdisplay;
// compile-time x^y
template<typename T>
constexpr T cpow(const T x, const int y) { return y == 0 ? 1.0 : x * cpow(x, y - 1); }
/// Find the flash address of a DGUS_VP_Variable for the 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.
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy);
@@ -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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/* DGUS implementation written by Sebastiaan Dammann in 2020 for Marlin */
#include "DGUSVPVariable.h"
#include <stdint.h>
// This file defines the interaction between Marlin and the display firmware.
// 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)
struct VPMapping {
const uint8_t screen;
const uint16_t *VPList; // The list is null-terminated.
};
extern const struct VPMapping VPMap[];
// List of VPs handled by Marlin / The Display.
extern const struct DGUS_VP_Variable ListOfVP[];
#define DWIN_DEFAULT_FILLER_CHAR ' '
#define DWIN_SCROLLER_FILLER_CHAR 0x0
#include "../../../inc/MarlinConfig.h"
#if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
#include "creality_touch/DGUSDisplayDef.h"
#endif
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More