Compare commits
624 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d46cf60548 | |||
| e94a1b16c4 | |||
| b44c03c203 | |||
| 67cdaa89cf | |||
| db9763c65f | |||
| 0055b6b423 | |||
| ab38abb237 | |||
| 907761e2bb | |||
| eba4b1f556 | |||
| 30ba2241e3 | |||
| 6bb17e68c1 | |||
| 7a7f723eb6 | |||
| 1daa885dbc | |||
| c995ecb933 | |||
| 901628c53e | |||
| b8229c14d4 | |||
| 8bd0501bdf | |||
| b436a19f23 | |||
| 97179ddad3 | |||
| 57815d2d65 | |||
| 67aa28f0c1 | |||
| 8d4eadefef | |||
| 56a41810d2 | |||
| b5d7f3ef12 | |||
| e0ff391eba | |||
| 8d44b6c427 | |||
| 953ea9f16e | |||
| 59dffb5f1c | |||
| d3704f834a | |||
| 13395db032 | |||
| ebde4ceb35 | |||
| 6128d61186 | |||
| 55cd1f51a4 | |||
| 900464dc72 | |||
| b87f2a86c9 | |||
| 6657c44cc7 | |||
| 52c37ee699 | |||
| 97e0ed7393 | |||
| 7862493991 | |||
| 63e91dc0af | |||
| e713d5ee2b | |||
| 52f1474281 | |||
| a512f6b40a | |||
| 911093a28c | |||
| b05b35ece9 | |||
| 0fa6605b49 | |||
| b007343710 | |||
| 7e02ffb9e9 | |||
| 73c2954ecb | |||
| 1e8f6ba749 | |||
| 134958a535 | |||
| 99378bfad4 | |||
| 3eb7bc37b8 | |||
| d347e6ab22 | |||
| 793e1c0b1d | |||
| 69c6b0f812 | |||
| fa25cab5ce | |||
| 33afb53201 | |||
| 6dc15e953f | |||
| 19a449cdaa | |||
| 9ebc74c1e7 | |||
| d69b857d8b | |||
| 0a9ea5968a | |||
| 4c90eb0173 | |||
| 7bcfede5b7 | |||
| 7385ce389a | |||
| a1b0bfc23a | |||
| 773a894209 | |||
| d873148f2f | |||
| 0f7ef6b586 | |||
| 0766fcd082 | |||
| f2060b5c34 | |||
| 01479cab84 | |||
| 056db1c3ae | |||
| 57e4fe6381 | |||
| 6531db383c | |||
| 401f5cf1ca | |||
| ab427804ac | |||
| 3a4d705308 | |||
| 56ee00f354 | |||
| f434f368ac | |||
| 1d9cf20d4b | |||
| 313014515c | |||
| 11d9bb4a66 | |||
| 7591c8661f | |||
| 456b0a4011 | |||
| 278c49e9de | |||
| 0ed4727767 | |||
| fcbc6a929c | |||
| 3c9b927291 | |||
| aa3cd470da | |||
| 004fd179d1 | |||
| eab01ba183 | |||
| 42bd6e74a7 | |||
| 67d6f2f877 | |||
| 5e10f6d8d1 | |||
| 3a1f3a4ba3 | |||
| 9697434981 | |||
| 6dec98e54c | |||
| 39201418ce | |||
| 8a30019a18 | |||
| a1c5735d6f | |||
| b02badf25e | |||
| 686fe6fe74 | |||
| 8ece5bcbee | |||
| ae9fe880f8 | |||
| 9c48d93a36 | |||
| fad005fdc2 | |||
| 0cf916ce13 | |||
| 0a54b35981 | |||
| 3b7871005a | |||
| 9cbb6b1512 | |||
| 0bd0b3df80 | |||
| 549619995f | |||
| 47c0dc631c | |||
| 5c39469b94 | |||
| 8ea02e3ede | |||
| a33f7ddc8c | |||
| 462b586c76 | |||
| af85a271a5 | |||
| 1bab76a98a | |||
| 25de1facb5 | |||
| c43d064122 | |||
| 5a9736bfa3 | |||
| 359258701f | |||
| 04f5a42c60 | |||
| 6dc27f6fc0 | |||
| b010d0782f | |||
| 6fd0c3f6a8 | |||
| 8f7735655e | |||
| 5f431c140f | |||
| 23f580bd03 | |||
| a7eacbcc49 | |||
| 05e2e059e3 | |||
| 2752234e14 | |||
| c87943cff1 | |||
| 661abff6e6 | |||
| 7e0478c97d | |||
| a0ed4d51bc | |||
| 005019b82d | |||
| 55d943e9d2 | |||
| f3e8919552 | |||
| 2bd9bcf61b | |||
| 3ec124f417 | |||
| c5263830d8 | |||
| 050e0db3a3 | |||
| f8f918590c | |||
| 5d56a71423 | |||
| 93b664182e | |||
| e0990f1b65 | |||
| 0a55425552 | |||
| 47c0c7072a | |||
| beb163a183 | |||
| cd67b87f22 | |||
| e5f087bd98 | |||
| 1fcad0b87c | |||
| bf698efc93 | |||
| f0e950db72 | |||
| 200a3957d9 | |||
| b243c67de2 | |||
| 20d107adf2 | |||
| 5e3c15bd39 | |||
| 05cbeef2c6 | |||
| 2ab4b9bd13 | |||
| 1cc33f318c | |||
| 78e3a829ba | |||
| 60dc55c3bf | |||
| ef12aa5a6c | |||
| b8f90b2d71 | |||
| ee91c915ee | |||
| e7fac26f2b | |||
| e66a2fdbf4 | |||
| f96a4a53ef | |||
| 096c146f16 | |||
| 5111e8d3a3 | |||
| 775850a245 | |||
| 8401c6d267 | |||
| bdeceae5b4 | |||
| c6ace0d4a5 | |||
| e9c9f07b8b | |||
| 8386ae0f4d | |||
| 237ad14388 | |||
| 1c194d4e16 | |||
| fb5ee94263 | |||
| 7bfcba1cf7 | |||
| 147cda7c1d | |||
| 6016ef7ba1 | |||
| a82e3147fd | |||
| fa73edd76a | |||
| 591a42cdd0 | |||
| 6b74e0f142 | |||
| 4cdec14648 | |||
| e4e9f01bf0 | |||
| 01ef9afdd0 | |||
| 21f8741982 | |||
| fa80adf92c | |||
| 9e4cce23d4 | |||
| 868967d08c | |||
| 48dc25407e | |||
| b88833a1cd | |||
| 391a07b2bf | |||
| c8faaca998 | |||
| 01ab324a12 | |||
| 00152be921 | |||
| be5078f8ab | |||
| cacdb2d818 | |||
| 3553ef4c00 | |||
| 64cf8316e1 | |||
| b6ad2db3a9 | |||
| 47222bcdde | |||
| 22f2a8baa7 | |||
| 08b92c3d1c | |||
| 474111f1c9 | |||
| b35125e1a2 | |||
| 3a1646b2e8 | |||
| b99b6250ee | |||
| 947ee4560e | |||
| 11a0186b35 | |||
| db74ac3ce1 | |||
| 2b46761060 | |||
| 97e1768ffe | |||
| 8e83784656 | |||
| 73b0c506e4 | |||
| 4678bb49b9 | |||
| f581502cc4 | |||
| dfc3007326 | |||
| 7f691fc5c1 | |||
| 01e7a5cb76 | |||
| fa72415812 | |||
| 0b6ecbd553 | |||
| de6246f826 | |||
| e813742ae0 | |||
| 46c8204990 | |||
| bdfe4ca4d1 | |||
| adabc63617 | |||
| 6741f5182d | |||
| d8508c5110 | |||
| dae60f4b29 | |||
| e16655a011 | |||
| 0d576bb529 | |||
| 61c3d122c9 | |||
| 123086d14c | |||
| 10fd6df83d | |||
| d40750cde8 | |||
| 489b75ae3c | |||
| 378fc12628 | |||
| 0cedad36d1 | |||
| 07b2480d30 | |||
| dd88eb56ee | |||
| fc77afd93e | |||
| 26af3e70bc | |||
| 0c15e8e751 | |||
| 639a2dc0b3 | |||
| 91a094d8cb | |||
| 66efa0b09b | |||
| e1c5f8418d | |||
| 4a0769ec1b | |||
| 991f21c74c | |||
| 9ebf358b8a | |||
| 70c26fd4ca | |||
| 9e66a87122 | |||
| f177bd32eb | |||
| 8df38008ef | |||
| ec5d623c93 | |||
| aca3184ce4 | |||
| 7cda9dbf84 | |||
| 71d530e594 | |||
| 24e8499ef6 | |||
| 0821c72d39 | |||
| 2abf5f0ad8 | |||
| 5c59a3d7c7 | |||
| a9e7df859c | |||
| f6a48f82aa | |||
| c0f0964329 | |||
| 0322dfd76e | |||
| 2d651fc785 | |||
| bd967ba7a2 | |||
| cc1a4f5f70 | |||
| d43c557404 | |||
| c4ba4600dc | |||
| 0bbc122475 | |||
| 1868db82aa | |||
| 23091e566b | |||
| 0ac94f6a2f | |||
| 3d804bd314 | |||
| e0de16f3a8 | |||
| 7421731eed | |||
| 43bc8c3865 | |||
| c13d290934 | |||
| 49eb72816e | |||
| ec0c72e2f0 | |||
| ff221cdacd | |||
| af177e719e | |||
| c713b14143 | |||
| 44c21f477e | |||
| 9f2e0238df | |||
| fd72d771e6 | |||
| dc1a4080db | |||
| 1e3cd5ca8b | |||
| 09f1c97c6e | |||
| 13b16b4062 | |||
| 7f5f9724de | |||
| 92a7943d4e | |||
| 448abd5de2 | |||
| 37f4924ac1 | |||
| 1c269eda1e | |||
| d8573b97eb | |||
| 5a94a8e1c0 | |||
| e067dc4713 | |||
| 1f6da0c1b4 | |||
| 8bb4484af5 | |||
| 6cc524dd50 | |||
| 728539bb23 | |||
| a67b346523 | |||
| 4b767d7623 | |||
| 7e149b2532 | |||
| 3b7b4b48d8 | |||
| 49fd9bdb77 | |||
| 5bcf64f17c | |||
| a3e960c251 | |||
| a7696f32fd | |||
| b4d3f03a26 | |||
| 42c6324f68 | |||
| 4d15eb94e4 | |||
| 3d688fc324 | |||
| 58e54f6746 | |||
| bf7a48ed31 | |||
| dc52c64424 | |||
| 0e29cd8cc5 | |||
| 844fe9b24d | |||
| 2b19dc3232 | |||
| f41c78d178 | |||
| 6270df927e | |||
| cbcc1bc084 | |||
| ab1d124bf9 | |||
| 5b7215df43 | |||
| b589cac5ff | |||
| 44aaa4f042 | |||
| afef0b9dec | |||
| f7767be8a5 | |||
| 2f5e28dd66 | |||
| 0397d384d2 | |||
| 212dfb4050 | |||
| 59ff070dba | |||
| c7af93b39f | |||
| 794ea13ae8 | |||
| 227f014fb5 | |||
| e22408f3f9 | |||
| 9e8e1c1113 | |||
| 1427290e84 | |||
| 1c7b232d05 | |||
| 005dad193a | |||
| 88f502cac5 | |||
| 0cc286757b | |||
| d843e2be2b | |||
| cede5b22c9 | |||
| 43f996d68a | |||
| bd426d40cd | |||
| 099c329238 | |||
| 3db4452d28 | |||
| 385bab2f36 | |||
| 1fab2ef94f | |||
| 102c43dcd5 | |||
| 5284f45c62 | |||
| 9aaa7b1100 | |||
| ef661cd295 | |||
| d068769f2c | |||
| a6c4c5a3f7 | |||
| 78c57f2847 | |||
| 90b0be5e12 | |||
| c24456353f | |||
| ec7a4eb69e | |||
| 4f62ae9764 | |||
| 0cc6955ab7 | |||
| 86d2d5d0a8 | |||
| 5a994f0c9a | |||
| 39ee694856 | |||
| 10a16c8c75 | |||
| aa2763442e | |||
| f44a11f5ff | |||
| 7748fa84dd | |||
| cb506ec639 | |||
| 5e4f7516c1 | |||
| 6443790c6f | |||
| 9a238fa7f9 | |||
| 723fc88e78 | |||
| 4b4a4ba163 | |||
| 57250c8340 | |||
| 6bf069d1ab | |||
| 1921015d1f | |||
| 24f3400c46 | |||
| b8c9e823ca | |||
| 3801d831d4 | |||
| 6f4b2ce4a2 | |||
| ef85eeed2a | |||
| cd98d0cf5c | |||
| 6f57a7311c | |||
| dc19c60a0e | |||
| 38c79a4585 | |||
| 541e074f97 | |||
| 2a01b8ea62 | |||
| 38fd3782f9 | |||
| f5cfc65c1d | |||
| 00f3397cad | |||
| 8e6f5f90c5 | |||
| db0b14d97e | |||
| 84158b912b | |||
| 21f8c8d7f8 | |||
| e2363dc64c | |||
| 1f439cd89a | |||
| f3ddc1f8b6 | |||
| 223971c47f | |||
| c2eeda01de | |||
| 5ea4241ea3 | |||
| 04845c80e9 | |||
| 8194b7f5fc | |||
| e735948969 | |||
| 634ddeef7e | |||
| ea78c6bf61 | |||
| b52168e37c | |||
| ba7368ce3a | |||
| 69d06dd872 | |||
| a92b627d00 | |||
| b9aa338c19 | |||
| 27e105b890 | |||
| 494a9a90bb | |||
| d876e6b80a | |||
| 97da6e97b9 | |||
| 671ab75bce | |||
| 6a98f4e1be | |||
| dd86d60a32 | |||
| 706260d39f | |||
| bae9d18ee9 | |||
| df31aa486e | |||
| 9a4d0fec6c | |||
| b1f96cf4f7 | |||
| 916aaa4881 | |||
| 4a4820d84f | |||
| 8eeea354cd | |||
| b26e53156f | |||
| ce46fafd92 | |||
| 7d9ee39285 | |||
| bf8074c108 | |||
| dd82d2d217 | |||
| 1ee599a2ba | |||
| 8adb58c266 | |||
| 173b0f8bd1 | |||
| e77f6d855b | |||
| 23ce68436a | |||
| 6e15859ce2 | |||
| e76f769690 | |||
| 0a2ba2fadf | |||
| 37d5f55396 | |||
| eca2080a3f | |||
| d2fc1daf50 | |||
| 782fe78ea0 | |||
| 084c45a6ee | |||
| 94d8fc8e8a | |||
| 491d82f93e | |||
| 49fd0950ee | |||
| 06425bf4b7 | |||
| e9660aeed7 | |||
| 6480f0939d | |||
| d0e9c21aff | |||
| 63d1ae1021 | |||
| 5a4b2ba5c5 | |||
| a80c371340 | |||
| 6d39a6fc55 | |||
| 02fe3a6818 | |||
| be44105ae9 | |||
| 10e5d92dec | |||
| 2e11485da4 | |||
| d305f0a14b | |||
| 5f30e9fe1c | |||
| 80c8218d94 | |||
| bed2bfdc24 | |||
| 6f2967a8dc | |||
| 6496cedc17 | |||
| 7b01993bbc | |||
| 07a1b00a25 | |||
| 7325d66de5 | |||
| 865737345f | |||
| dfa6c2f4f1 | |||
| 0a2f0cca93 | |||
| dbbdf11d75 | |||
| 6430489e21 | |||
| 04d4fca75d | |||
| 486cf92c5c | |||
| 820aff4e7c | |||
| 120da68133 | |||
| 747e21ee3e | |||
| 53e8c005b7 | |||
| ef01aecd47 | |||
| 6ff92f3215 | |||
| ba5bab1a3a | |||
| af0b39982b | |||
| 680135583a | |||
| bdc256c048 | |||
| 0948c589d6 | |||
| fbf069ebe0 | |||
| 160f8ef0bc | |||
| 93ecbfa88c | |||
| 19d004b342 | |||
| 8b67e72afc | |||
| 9c863b1c67 | |||
| e4c4acbcc5 | |||
| 7dd2fe3f6c | |||
| a399028c77 | |||
| 840beb78be | |||
| 1181724b2b | |||
| 227aac34a2 | |||
| ecb6e215c5 | |||
| 8f09db27bd | |||
| 39e4ae2d7a | |||
| 8c181685d2 | |||
| 4f2730b6f8 | |||
| bc12ada74d | |||
| 7e97639e38 | |||
| c217fd3e66 | |||
| 6f69a30435 | |||
| 96d880e745 | |||
| d768f875ac | |||
| 02d54b9ce7 | |||
| 7070628ef9 | |||
| 1a89a43532 | |||
| 25faa304ee | |||
| 18a0f68ac0 | |||
| 7262ad3fc4 | |||
| b456959b97 | |||
| d20182aa91 | |||
| dc86dd9fae | |||
| e887033c0d | |||
| d786ba1773 | |||
| 3f0a4cfe25 | |||
| 442327d92e | |||
| 345ac6e8fe | |||
| 1b47fe8c64 | |||
| 67e9ee7bf2 | |||
| 7aecff2ba6 | |||
| 2e6d7308f6 | |||
| 9c5ee355e8 | |||
| 656946a0ff | |||
| 48e02a3210 | |||
| 6891ef5d00 | |||
| c392e6bf07 | |||
| de564f9b0a | |||
| c9aab13192 | |||
| 9ba9f654c4 | |||
| a13ebba41a | |||
| b1153cff1e | |||
| 9aa0004de6 | |||
| 3a9f043c58 | |||
| 80123bfdf2 | |||
| 923ce8e1d8 | |||
| c72fc3eaec | |||
| 3aa0763f26 | |||
| 96bee60be9 | |||
| b5df47bdf7 | |||
| c27474f396 | |||
| 6af2c36c50 | |||
| 577ebc6ba4 | |||
| 4b0135c022 | |||
| 27e95f2aab | |||
| 247385e94e | |||
| aafa3af088 | |||
| 12e230ca30 | |||
| 225a89004b | |||
| 0b6aa3cb2d | |||
| e7d3e67dc4 | |||
| 8fd37402a3 | |||
| 7cf72d5867 | |||
| a348c3caa9 | |||
| 6f5430f00a | |||
| 63821d87f9 | |||
| b5f447f144 | |||
| 4a56689801 | |||
| 0216e032be | |||
| 2d8aa0cea1 | |||
| 50f10fc57f | |||
| 12180f20e5 | |||
| f5dc8d73ee | |||
| 00e3806613 | |||
| 7296538849 | |||
| 6c4e3e9215 | |||
| 4f050e8dc9 | |||
| e50e446676 | |||
| b795860c5a | |||
| b97b2b9df8 | |||
| c6bdb2cd95 | |||
| f409cf8c87 | |||
| fbb75f41c2 | |||
| d560a493b2 | |||
| 0395b7563e | |||
| ebd414b3d5 | |||
| 0c8bafba38 | |||
| 65d5c57957 | |||
| b1d667c04a | |||
| ee8ea7a0b5 | |||
| 89ac692bcc | |||
| 88410b3cfe | |||
| 60eb467bfe | |||
| 1c3407ed62 | |||
| 82064d2341 | |||
| 16b7cffe0f | |||
| 638bac84cf | |||
| 9d3ad76d50 | |||
| 6edb31f58c | |||
| 01297cab24 | |||
| 80fa195db3 | |||
| 052b4387d3 | |||
| dd5481b001 | |||
| 59e1371f89 | |||
| 4fdcae6677 | |||
| 1c3dcae659 | |||
| ec425de694 | |||
| 29899e6fe8 | |||
| f7eaa32bc9 | |||
| 508dc26394 | |||
| 600d5922da | |||
| a2efee8b7b | |||
| 239e4737a8 | |||
| c8577bc673 | |||
| 3bd2ed7310 | |||
| 79414a1398 |
@@ -14,8 +14,6 @@ on:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- test/**
|
||||
- Marlin/tests/**
|
||||
- '**/*.md'
|
||||
push:
|
||||
branches:
|
||||
@@ -25,8 +23,6 @@ on:
|
||||
- config/**
|
||||
- data/**
|
||||
- docs/**
|
||||
- test/**
|
||||
- Marlin/tests/**
|
||||
- '**/*.md'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# ci-validate-pins.yml
|
||||
# Validate that all of the pins files are unchanged by pinsformat.py
|
||||
#
|
||||
|
||||
name: CI - Validate Pins Files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/pins/*/**'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.1.x
|
||||
# Cannot be enabled on 2.1.x until it contains the unit test framework
|
||||
#- 2.1.x
|
||||
paths:
|
||||
- 'Marlin/src/pins/*/**'
|
||||
|
||||
jobs:
|
||||
validate_pins_files:
|
||||
name: Validate Pins Files
|
||||
if: github.repository == 'MarlinFirmware/Marlin'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out the PR
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Validate all pins files
|
||||
run: |
|
||||
make validate-pins -j
|
||||
@@ -2,23 +2,22 @@ SCRIPTS_DIR := buildroot/share/scripts
|
||||
CONTAINER_RT_BIN := docker
|
||||
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
|
||||
CONTAINER_IMAGE := marlin-dev
|
||||
UNIT_TEST_CONFIG ?= default
|
||||
|
||||
help:
|
||||
@echo "Tasks for local development:"
|
||||
@echo "make marlin : Build marlin for the configured board"
|
||||
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
|
||||
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
|
||||
@echo "make format-pins : Reformat all pins files"
|
||||
@echo "make tests-single-ci : Run a single test from inside the CI"
|
||||
@echo "make tests-single-local : Run a single test locally"
|
||||
@echo "make tests-single-local-docker : Run a single test locally, using docker"
|
||||
@echo "make tests-all-local : Run all tests locally"
|
||||
@echo "make tests-all-local-docker : Run all tests locally, using docker"
|
||||
@echo "make unit-test-single-local : Run unit tests for a single config locally"
|
||||
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
|
||||
# @echo "make unit-test-single-ci : Run a single code test from inside the CI"
|
||||
# @echo "make unit-test-single-local : Run a single code test locally"
|
||||
# @echo "make unit-test-single-local-docker : Run a single code test locally, using docker-compose"
|
||||
@echo "make unit-test-all-local : Run all code tests locally"
|
||||
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
|
||||
@echo "make setup-local-docker : Setup local docker using buildx"
|
||||
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker-compose"
|
||||
@echo "make setup-local-docker : Setup local docker-compose"
|
||||
@echo ""
|
||||
@echo "Options for testing:"
|
||||
@echo " TEST_TARGET Set when running tests-single-*, to select the"
|
||||
@@ -28,9 +27,6 @@ help:
|
||||
@echo " run on GitHub CI"
|
||||
@echo " ONLY_TEST Limit tests to only those that contain this, or"
|
||||
@echo " the index of the test (1-based)"
|
||||
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
|
||||
@echo " the leading number. Default is 'default'". Used with the
|
||||
@echo " unit-test-single-* tasks"
|
||||
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
|
||||
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
|
||||
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
|
||||
@@ -55,29 +51,27 @@ tests-single-local-docker:
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
|
||||
|
||||
tests-all-local:
|
||||
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
|
||||
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
|
||||
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
|
||||
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
|
||||
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
|
||||
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
|
||||
continue ; \
|
||||
fi ; \
|
||||
echo "Running tests for $$TEST_TARGET" ; \
|
||||
run_tests . $$TEST_TARGET || exit 1 ; \
|
||||
sleep 5; \
|
||||
done
|
||||
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
|
||||
|
||||
tests-all-local-docker:
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
|
||||
|
||||
unit-test-single-local:
|
||||
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
|
||||
#unit-test-single-ci:
|
||||
# export GIT_RESET_HARD=true
|
||||
# $(MAKE) unit-test-single-local TEST_TARGET=$(TEST_TARGET)
|
||||
|
||||
unit-test-single-local-docker:
|
||||
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
|
||||
# TODO: How can we limit tests with ONLY_TEST with platformio?
|
||||
#unit-test-single-local:
|
||||
# @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make unit-test-all-local" ; return 1; fi
|
||||
# platformio run -t marlin_$(TEST_TARGET)
|
||||
|
||||
#unit-test-single-local-docker:
|
||||
# @if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make unit-test-all-local-docker" ; return 1; fi
|
||||
# @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
|
||||
# $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local TEST_TARGET=$(TEST_TARGET) ONLY_TEST="$(ONLY_TEST)"
|
||||
|
||||
unit-test-all-local:
|
||||
platformio run -t test-marlin -e linux_native_test
|
||||
@@ -91,14 +85,7 @@ setup-local-docker:
|
||||
|
||||
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
|
||||
|
||||
.PHONY: $(PINS) format-pins validate-pins
|
||||
|
||||
$(PINS): %:
|
||||
@echo "Formatting $@"
|
||||
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
|
||||
@echo "Formatting $@" && node $(SCRIPTS_DIR)/pinsformat.js $@
|
||||
|
||||
format-pins: $(PINS)
|
||||
|
||||
validate-pins: format-pins
|
||||
@echo "Validating pins files"
|
||||
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
|
||||
|
||||
+1871
-345
File diff suppressed because it is too large
Load Diff
+425
-222
File diff suppressed because it is too large
Load Diff
+162
-10
@@ -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,177 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
//#define SHORT_BUILD_VERSION "bugfix-2.1.x"
|
||||
#define SHORT_BUILD_VERSION "DW7.4.9"
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
#if(ENABLED(MachineMini))
|
||||
#define VerChar1 "M"
|
||||
#elif(ENABLED(MachineEnder2))
|
||||
#define VerChar1 "E2"
|
||||
#elif(ENABLED(MachineEnder2Pro))
|
||||
#define VerChar1 "E2P"
|
||||
#elif(ENABLED(MachineEnder3))
|
||||
#define VerChar1 "E3"
|
||||
#elif ENABLED(MachineEnder3V2)
|
||||
#define VerChar1 "E3V2"
|
||||
#elif ENABLED(MachineEnder3S1)
|
||||
#define VerChar1 "E3S1"
|
||||
#elif ENABLED(MachineEnder3Max)
|
||||
#define VerChar1 "E3M"
|
||||
#elif(ENABLED(MachineEnder4))
|
||||
#define VerChar1 "E4"
|
||||
#elif(ENABLED(MachineEnder5))
|
||||
#define VerChar1 "E5"
|
||||
#elif(ENABLED(MachineEnder6))
|
||||
#define VerChar1 "E6"
|
||||
#elif(ENABLED(MachineEnder7))
|
||||
#define VerChar1 "E7"
|
||||
#elif(ENABLED(MachineSermoonD1))
|
||||
#define VerChar1 "D1"
|
||||
#elif(ENABLED(MachineEnder5Plus))
|
||||
#define VerChar1 "E5P"
|
||||
#elif(ENABLED(MachineCR20))
|
||||
#define VerChar1 "2"
|
||||
#elif(ENABLED(MachineCR10Orig))
|
||||
#define VerChar1 "O"
|
||||
#elif(ENABLED(MachineCR10Std))
|
||||
#define VerChar1 "S"
|
||||
#elif(ENABLED(MachineCRX))
|
||||
#define VerChar1 "X"
|
||||
#elif(ENABLED(MachineCR6))
|
||||
#define VerChar1 "CR6"
|
||||
#elif(ENABLED(MachineCR5))
|
||||
#define VerChar1 "CR5"
|
||||
#elif(ENABLED(MachineCR6Max))
|
||||
#define VerChar1 "CR6M"
|
||||
#elif(ENABLED(MachineS4))
|
||||
#define VerChar1 "4"
|
||||
#elif(ENABLED(MachineS5) || ENABLED(MachineCR10Max))
|
||||
#define VerChar1 "5"
|
||||
#elif ENABLED(MachineCR2020)
|
||||
#define VerChar1 "20"
|
||||
#elif(ENABLED(MachineCR30))
|
||||
#define VerChar1 "CR30"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(HotendStock))
|
||||
#define VerChar2 "S"
|
||||
#elif(ENABLED(HotendE3D))
|
||||
#define VerChar2 "E"
|
||||
#elif ENABLED(HotendMosquito)
|
||||
#define VerChar2 "M"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(HotendAllMetal))
|
||||
#define VerChar3 "M"
|
||||
#else
|
||||
#define VerChar3 "S"
|
||||
#endif
|
||||
|
||||
|
||||
#if(ENABLED(BedAC))
|
||||
#define VerChar4 "A"
|
||||
#elif(ENABLED(BedDC))
|
||||
#define VerChar4 "D"
|
||||
#else
|
||||
#define VerChar4 "N"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(ABL_EZABL))
|
||||
#define VerChar5 "A"
|
||||
#elif(ENABLED(ABL_BLTOUCH))
|
||||
#define VerChar5 "B"
|
||||
#else
|
||||
#define VerChar5 "N"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(ABL_UBL))
|
||||
#define VerChar6 "U"
|
||||
#elif(ENABLED(ABL_BI))
|
||||
#define VerChar6 "B"
|
||||
#else
|
||||
#define VerChar6 "N"
|
||||
#endif
|
||||
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D " 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 "2024-05-29"
|
||||
#define STRING_DISTRIBUTION_DATE "2024-04-08"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
//#define MACHINE_NAME "3D Printer"
|
||||
#if(ENABLED(MachineMini))
|
||||
#define CUSTOM_MACHINE_NAME "Mini SuPeR"
|
||||
#elif(ENABLED(MachineCR10Smart))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D CR10Smart"
|
||||
#elif(ENABLED(MachineCR10SmartPro))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D CR10SmartPro"
|
||||
#elif(ENABLED(MachineEnder2))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender2"
|
||||
#elif(ENABLED(MachineEnder2Pro))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender2 Pro"
|
||||
#elif(ENABLED(MachineEnder3))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender3"
|
||||
#elif(ENABLED(MachineEnder3Max))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D E3Max"
|
||||
#elif(ENABLED(MachineEnder6))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender6"
|
||||
#elif(ENABLED(MachineEnder7))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender7"
|
||||
#elif(ENABLED(MachineEnder3V2))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender3V2"
|
||||
#elif(ENABLED(MachineEnder3S1))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender3S1"
|
||||
#elif(ENABLED(MachineEnder4))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender4"
|
||||
#elif(ENABLED(MachineEnder5))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Ender5"
|
||||
#elif(ENABLED(MachineEnder5Plus))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D E5 Plus"
|
||||
#elif(ENABLED(MachineCR20))
|
||||
#define CUSTOM_MACHINE_NAME "SuPeR CR-20"
|
||||
#elif(ENABLED(MachineCR10Orig))
|
||||
#define CUSTOM_MACHINE_NAME "SuPeR CR-10"
|
||||
#elif(ENABLED(MachineCRX))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D CR-X"
|
||||
#elif ENABLED(MachineCR10SProV2)
|
||||
#define CUSTOM_MACHINE_NAME "TM3D 10SProV2"
|
||||
#elif(ENABLED(MachineCR10SPro))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D 10S Pro"
|
||||
#elif(ENABLED(MachineCR10Max))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D Max"
|
||||
#elif(ENABLED(MachineCR10SV3))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D CR10V3"
|
||||
#elif(ENABLED(MachineCR10SV2))
|
||||
#define CUSTOM_MACHINE_NAME "TM3D CR10V2"
|
||||
#elif(ENABLED(MachineCR10Std))
|
||||
#define CUSTOM_MACHINE_NAME "300 SuPeR"
|
||||
#elif(ENABLED(MachineS4))
|
||||
#define CUSTOM_MACHINE_NAME "400 SuPeR"
|
||||
#elif(ENABLED(MachineS5))
|
||||
#define CUSTOM_MACHINE_NAME "500 SuPeR"
|
||||
#elif ENABLED(MachineCR2020)
|
||||
#define CUSTOM_MACHINE_NAME "TM3D 2020"
|
||||
#elif ENABLED(MachineSermoonD1)
|
||||
#define CUSTOM_MACHINE_NAME "SermoonD1"
|
||||
#elif ENABLED(MachineCR5)
|
||||
#define CUSTOM_MACHINE_NAME "CR5 Pro"
|
||||
#elif ENABLED(MachineCR6)
|
||||
#define CUSTOM_MACHINE_NAME "CR6"
|
||||
#elif ENABLED(MachineCR6Max)
|
||||
#define CUSTOM_MACHINE_NAME "CR6 Max"
|
||||
#elif ENABLED(MachineCR30)
|
||||
#define CUSTOM_MACHINE_NAME "CR30 Printmill"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
@@ -54,7 +206,7 @@
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/CrealityDwin_2.0"
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
@@ -65,12 +217,12 @@
|
||||
* The WEBSITE_URL is the location where users can get more information such as
|
||||
* documentation about a specific Marlin release.
|
||||
*/
|
||||
//#define WEBSITE_URL "marlinfw.org"
|
||||
#define WEBSITE_URL "tinymachines3d.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
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Bitmap for splashscreen
|
||||
*
|
||||
* You may use one of the following tools to generate the C++ bitmap array from
|
||||
* a black and white image:
|
||||
*
|
||||
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
*/
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
|
||||
#define CUSTOM_BOOTSCREEN_INVERTED
|
||||
|
||||
const unsigned char custom_start_bmp[] PROGMEM = {
|
||||
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
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Status Screen bitmap
|
||||
*
|
||||
* Place this file in the root with your configuration files
|
||||
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
|
||||
*
|
||||
* Use the Marlin Bitmap Converter to make your own:
|
||||
* http://marlinfw.org/tools/u8glib/converter.html
|
||||
*/
|
||||
|
||||
//
|
||||
// Status Screen Logo bitmap
|
||||
//
|
||||
#define STATUS_LOGO_Y 3
|
||||
#define STATUS_LOGO_WIDTH 24
|
||||
|
||||
const unsigned char status_logo_bmp[] PROGMEM = {
|
||||
B11111111,B11111111,B11111111,
|
||||
B10000000,B00000000,B00000001,
|
||||
B10001110,B00000000,B11100001,
|
||||
B10011111,B00000001,B11110001,
|
||||
B10010011,B10000001,B00111001,
|
||||
B10011111,B10000001,B11111001,
|
||||
B10011111,B10000001,B11111001,
|
||||
B10011111,B10111001,B11111001,
|
||||
B10001111,B00101000,B11110001,
|
||||
B10000000,B00111000,B00000001,
|
||||
B10000000,B00000000,B00000001,
|
||||
B10011111,B11111111,B11111001,
|
||||
B10010001,B01110100,B10011001,
|
||||
B10011011,B00000110,B10101001,
|
||||
B10011011,B01010100,B10101001,
|
||||
B10011011,B01010110,B10101001,
|
||||
B10011011,B01010100,B10011001,
|
||||
B10011111,B11111111,B11111001,
|
||||
B11111111,B11111111,B11111111
|
||||
};
|
||||
|
||||
//
|
||||
// Use default bitmaps
|
||||
//
|
||||
#define STATUS_HOTEND_ANIM
|
||||
#define STATUS_BED_ANIM
|
||||
#if HOTENDS < 2
|
||||
#define STATUS_LOGO_X 8
|
||||
#define STATUS_HEATERS_X 40
|
||||
#define STATUS_BED_X 72
|
||||
#else
|
||||
#define STATUS_LOGO_X 0
|
||||
#define STATUS_HEATERS_X 32
|
||||
#define STATUS_BED_X 80
|
||||
#endif
|
||||
@@ -141,8 +141,8 @@ typedef Servo hal_servo_t;
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define LCD_SERIAL lcdSerial
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
|
||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
|
||||
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.
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
static ring_buffer_pos_t available();
|
||||
static void write(const uint8_t c);
|
||||
static void flushTX();
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
|
||||
static ring_buffer_pos_t get_tx_buffer_free();
|
||||
#endif
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
static constexpr bool DROPPED_RX = false;
|
||||
static constexpr bool RX_FRAMING_ERRORS = false;
|
||||
static constexpr bool MAX_RX_QUEUED = false;
|
||||
static constexpr bool RX_OVERRUNS = ALL(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||
static constexpr bool RX_OVERRUNS = (ANY(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS) || ENABLED(DWINOS_4));
|
||||
};
|
||||
|
||||
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#else
|
||||
#define G2_PWM_Z 0
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM_E
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
#define G2_PWM_E 1
|
||||
#else
|
||||
#define G2_PWM_E 0
|
||||
|
||||
@@ -18,32 +18,32 @@ extern "C" {
|
||||
void sd_mmc_spi_mem_init() {
|
||||
}
|
||||
|
||||
inline bool media_ready() {
|
||||
return IS_SD_INSERTED() && !IS_SD_PRINTING() && !IS_SD_FILE_OPEN() && card.isMounted();
|
||||
}
|
||||
|
||||
bool sd_mmc_spi_unload(bool) { return true; }
|
||||
|
||||
bool sd_mmc_spi_wr_protect() { return false; }
|
||||
|
||||
bool sd_mmc_spi_removal() { return !media_ready(); }
|
||||
|
||||
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
// NOTE: This function is defined as returning the address of the last block
|
||||
// in the card, which is cardSize() - 1
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
*nb_sector = card.diskIODriver()->cardSize() - 1;
|
||||
return CTRL_GOOD;
|
||||
}
|
||||
|
||||
bool sd_mmc_spi_unload(bool) { return true; }
|
||||
|
||||
bool sd_mmc_spi_wr_protect() { return false; }
|
||||
|
||||
bool sd_mmc_spi_removal() {
|
||||
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
|
||||
}
|
||||
|
||||
#if ACCESS_USB == true
|
||||
/**
|
||||
* \name MEM <-> USB Interface
|
||||
@@ -61,7 +61,8 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
@@ -100,7 +101,8 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
||||
#ifdef DISABLE_DUE_SD_MMC
|
||||
return CTRL_NO_PRESENT;
|
||||
#endif
|
||||
if (!media_ready()) return CTRL_NO_PRESENT;
|
||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||
return CTRL_NO_PRESENT;
|
||||
|
||||
#ifdef DEBUG_MMC
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
//!
|
||||
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
|
||||
//!/
|
||||
void sd_mmc_spi_mem_init();
|
||||
extern void sd_mmc_spi_mem_init(void);
|
||||
|
||||
//!
|
||||
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
|
||||
@@ -87,7 +87,7 @@ void sd_mmc_spi_mem_init();
|
||||
//! Media not present -> CTRL_NO_PRESENT
|
||||
//! Media has changed -> CTRL_BUSY
|
||||
//!/
|
||||
Ctrl_status sd_mmc_spi_test_unit_ready();
|
||||
extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
|
||||
|
||||
//!
|
||||
//! @brief This function gives the address of the last valid sector.
|
||||
@@ -98,7 +98,7 @@ Ctrl_status sd_mmc_spi_test_unit_ready();
|
||||
//! Media ready -> CTRL_GOOD
|
||||
//! Media not present -> CTRL_NO_PRESENT
|
||||
//!/
|
||||
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
|
||||
/*! \brief Unload/Load the SD/MMC card selected
|
||||
*
|
||||
@@ -109,7 +109,7 @@ Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
|
||||
*
|
||||
* \return \c true if unload/load done success.
|
||||
*/
|
||||
bool sd_mmc_spi_unload(bool unload);
|
||||
extern bool sd_mmc_spi_unload(bool unload);
|
||||
|
||||
//!
|
||||
//! @brief This function returns the write protected status of the memory.
|
||||
@@ -120,14 +120,14 @@ bool sd_mmc_spi_unload(bool unload);
|
||||
//!
|
||||
//! @return false -> the memory is not write-protected (always)
|
||||
//!/
|
||||
bool sd_mmc_spi_wr_protect();
|
||||
extern bool sd_mmc_spi_wr_protect(void);
|
||||
|
||||
//!
|
||||
//! @brief This function tells if the memory has been removed or not.
|
||||
//!
|
||||
//! @return false -> The memory isn't removed
|
||||
//!
|
||||
bool sd_mmc_spi_removal();
|
||||
extern bool sd_mmc_spi_removal(void);
|
||||
|
||||
//---- ACCESS DATA FUNCTIONS ----
|
||||
|
||||
@@ -147,7 +147,7 @@ bool sd_mmc_spi_removal();
|
||||
//! It is ready -> CTRL_GOOD
|
||||
//! A error occur -> CTRL_FAIL
|
||||
//!
|
||||
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
|
||||
//! This function initializes the SD/MMC memory for a write operation
|
||||
//!
|
||||
@@ -161,7 +161,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
|
||||
//! It is ready -> CTRL_GOOD
|
||||
//! An error occurs -> CTRL_FAIL
|
||||
//!
|
||||
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
||||
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
|
||||
|
||||
#endif // #if ACCESS_USB == true
|
||||
|
||||
|
||||
@@ -142,31 +142,12 @@
|
||||
// ADC
|
||||
//
|
||||
#define HAL_ADC_VREF_MV 3300
|
||||
#define HAL_ADC_RESOLUTION 12
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
//
|
||||
// Debug port disable
|
||||
// JTMS / SWDIO = PA13
|
||||
// JTCK / SWCLK = PA14
|
||||
// JTDI = PA15
|
||||
// JTDO = PB3
|
||||
// NJTRST = PB4
|
||||
//
|
||||
#define DBG_SWCLK _BV(0)
|
||||
#define DBG_SWDIO _BV(1)
|
||||
#define DBG_TDO _BV(2)
|
||||
#define DBG_TDI _BV(3)
|
||||
#define DBG_TRST _BV(4)
|
||||
#define DBG_ALL (DBG_SWCLK | DBG_SWDIO | DBG_TDO | DBG_TDI | DBG_TRST)
|
||||
|
||||
#define JTAGSWD_RESET() PORT_DebugPortSetting(DBG_ALL, Enable);
|
||||
#define JTAG_DISABLE() PORT_DebugPortSetting(DBG_TDO | DBG_TDI | DBG_TRST, Disable);
|
||||
#define JTAGSWD_DISABLE() PORT_DebugPortSetting(DBG_ALL, Disable);
|
||||
|
||||
//
|
||||
// MarlinHAL implementation
|
||||
//
|
||||
|
||||
@@ -232,9 +232,7 @@ int MarlinHAL::freeMemory() {
|
||||
return &top - _sbrk(0);
|
||||
}
|
||||
|
||||
void MarlinHAL::adc_init() {
|
||||
analogReadResolution(HAL_ADC_RESOLUTION);
|
||||
}
|
||||
void MarlinHAL::adc_init() {}
|
||||
|
||||
void MarlinHAL::adc_enable(const pin_t pin) {
|
||||
#if TEMP_SENSOR_SOC
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
struct MarlinSerial : public Usart {
|
||||
MarlinSerial(
|
||||
struct usart_config_t *usart_device,
|
||||
gpio_pin_t tx_pin,
|
||||
struct usart_config_t *usart_device,
|
||||
gpio_pin_t tx_pin,
|
||||
gpio_pin_t rx_pin
|
||||
#if ENABLED(SERIAL_DMA)
|
||||
, M4_DMA_TypeDef *dma_unit = nullptr,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* app_config.h is included by the hc32f460 arduino build script for every source file.
|
||||
* it is used to configure the arduino core (and ddl) automatically according
|
||||
* it is used to configure the arduino core (and ddl) automatically according
|
||||
* to the settings in Configuration.h and Configuration_adv.h.
|
||||
*/
|
||||
#pragma once
|
||||
@@ -44,7 +44,7 @@
|
||||
#define DISABLE_SERIAL_GLOBALS 1
|
||||
|
||||
// increase the size of the Usart buffers (both RX and TX)
|
||||
// NOTE:
|
||||
// NOTE:
|
||||
// the heap usage will increase by (SERIAL_BUFFER_SIZE - 64) * "number of serial ports used"
|
||||
// if running out of heap, the system may become unstable
|
||||
//#define SERIAL_BUFFER_SIZE 256
|
||||
@@ -64,12 +64,7 @@
|
||||
// redirect printf to host serial
|
||||
#define REDIRECT_PRINTF_TO_SERIAL 1
|
||||
|
||||
// F_CPU must be known at compile time, but on HC32F460 it's not.
|
||||
// Thus we assume HCLK to be 200MHz, as that's what is configured in
|
||||
// 'core_hook_sysclock_init' in 'sysclock.cpp'.
|
||||
// If you face issues with this assumption, please double-check with the values
|
||||
// printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
|
||||
// see also: HAL_TIMER_RATE in timers.h
|
||||
#define F_CPU 200000000 // 200MHz HCLK
|
||||
// FIXME override F_CPU to PCLK1, as marlin freaks out otherwise
|
||||
#define F_CPU (SYSTEM_CLOCK_FREQUENCIES.pclk1)
|
||||
|
||||
#endif // _HC32_APP_CONFIG_H_
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#endif
|
||||
|
||||
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
|
||||
// because we use app_config.h introduced in arduino core version 1.1.0, the
|
||||
// because we use app_config.h introduced in arduino core version 1.1.0, the
|
||||
// HAL is not compatible with older versions
|
||||
#error "The HC32 HAL is not compatible with Arduino Core versions < 1.1.0. Consider updating the Arduino Core."
|
||||
#endif
|
||||
|
||||
@@ -96,44 +96,29 @@ void core_hook_sysclock_init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
|
||||
constexpr uint32_t sysclock = F_CPU;
|
||||
|
||||
// Setup clock divisors for sysclk = 200 MHz
|
||||
// Setup clock divisors for sysclk = 200 MHz:
|
||||
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
|
||||
constexpr stc_clk_sysclk_cfg_t sysClkConf = {
|
||||
stc_clk_sysclk_cfg_t sysClkConf = {
|
||||
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
|
||||
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
|
||||
.enPclk0Div = ClkSysclkDiv2, // PCLK0 = 100 MHz (Timer6 (not used))
|
||||
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used))
|
||||
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
|
||||
.enPclk2Div = ClkSysclkDiv8, // PCLK2 = 25 MHz (ADC)
|
||||
.enPclk3Div = ClkSysclkDiv8, // PCLK3 = 25 MHz (I2C, WDT)
|
||||
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC)
|
||||
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT)
|
||||
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
|
||||
};
|
||||
|
||||
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
|
||||
assert_system_clocks_valid<
|
||||
sysclock,
|
||||
sysClkConf.enHclkDiv,
|
||||
sysClkConf.enPclk0Div,
|
||||
sysClkConf.enPclk1Div,
|
||||
sysClkConf.enPclk2Div,
|
||||
sysClkConf.enPclk3Div,
|
||||
sysClkConf.enPclk4Div,
|
||||
sysClkConf.enExclkDiv
|
||||
>();
|
||||
#endif
|
||||
|
||||
sysclock_set_clock_dividers(&sysClkConf);
|
||||
|
||||
// Set power mode
|
||||
power_mode_update_pre(sysclock);
|
||||
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz
|
||||
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
|
||||
|
||||
// Switch to MPLL as sysclk source
|
||||
CLK_SetSysClkSource(CLKSysSrcMPLL);
|
||||
|
||||
// Set power mode
|
||||
power_mode_update_post(sysclock);
|
||||
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK);
|
||||
#undef POWER_MODE_SYSTEM_CLOCK
|
||||
}
|
||||
|
||||
#endif // ARDUINO_ARCH_HC32
|
||||
|
||||
@@ -38,48 +38,44 @@ extern Timer0 step_timer;
|
||||
// Timer Configurations
|
||||
//
|
||||
|
||||
/**
|
||||
* HAL_TIMER_RATE must be known at compile time since it's used to calculate
|
||||
* STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
|
||||
* On the HC32F460 the timer rate depends on PCLK1, which is derived from the
|
||||
* system clock configured at runtime. As a workaround, we use the existing
|
||||
* assumption of a 200MHz clock, defining F_CPU as 200000000, then configure PCLK1
|
||||
* as F_CPU with a divider of 4 in 'sysclock.cpp::core_hook_sysclock_init'.
|
||||
*
|
||||
* If you face issues with this assumption, please double-check with the values
|
||||
* printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
|
||||
*
|
||||
* TODO: If the 'constexpr' requirement is ever lifted, use TIMER0_BASE_FREQUENCY instead
|
||||
*/
|
||||
#define HAL_TIMER_RATE (F_CPU / 4) // i.e., 50MHz
|
||||
//#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
|
||||
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time
|
||||
// this is not possible with the HC32F460, as the timer rate depends on PCLK1
|
||||
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init())
|
||||
#define HAL_TIMER_RATE 50000000 // 50MHz
|
||||
// #define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
|
||||
|
||||
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
|
||||
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
|
||||
#undef CYCLES_PER_MICROSECOND
|
||||
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
|
||||
|
||||
// Temperature timer
|
||||
#define TEMP_TIMER_NUM (&temp_timer)
|
||||
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
|
||||
#define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
|
||||
#define TEMP_TIMER_RATE 1000 // 1kHz
|
||||
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
|
||||
#define TEMP_TIMER_NUM (&temp_timer)
|
||||
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
|
||||
#define TEMP_TIMER_PRESCALE 16ul
|
||||
#define TEMP_TIMER_RATE 1000 // 1kHz
|
||||
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin
|
||||
|
||||
// Stepper timer
|
||||
#define STEP_TIMER_NUM (&step_timer)
|
||||
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
|
||||
#define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
|
||||
#define STEP_TIMER_NUM (&step_timer)
|
||||
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01
|
||||
#define STEPPER_TIMER_PRESCALE 16ul
|
||||
|
||||
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
|
||||
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
|
||||
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
|
||||
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000)
|
||||
|
||||
// Pulse timer (== stepper timer)
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
|
||||
//
|
||||
// Channel aliases
|
||||
//
|
||||
#define MF_TIMER_TEMP TEMP_TIMER_NUM
|
||||
#define MF_TIMER_STEP STEP_TIMER_NUM
|
||||
#define MF_TIMER_PULSE PULSE_TIMER_NUM
|
||||
#define MF_TIMER_TEMP TEMP_TIMER_NUM
|
||||
#define MF_TIMER_STEP STEP_TIMER_NUM
|
||||
#define MF_TIMER_PULSE PULSE_TIMER_NUM
|
||||
|
||||
//
|
||||
// HAL functions
|
||||
|
||||
@@ -100,7 +100,7 @@ extern DefaultSerial1 USBSerial;
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||
#endif
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#if HAS_DGUS_LCD || ENABLED(DWINOS_4)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 1 to 9, or -1 for Native USB."
|
||||
#endif
|
||||
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(EXTENSIBLE_UI)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#else // Arduino non-DMA
|
||||
|
||||
FORCE_INLINE static uint8_t buffer_overruns() { return 0; }
|
||||
typedef void (*usart_rx_callback_t)(serial_t * obj);
|
||||
|
||||
struct MarlinSerial : public HardwareSerial {
|
||||
@@ -54,6 +55,7 @@
|
||||
|
||||
void _rx_complete_irq(serial_t *obj);
|
||||
FORCE_INLINE static uint8_t buffer_overruns() { return 0; } // Not implemented. Void to avoid platform-dependent code.
|
||||
FORCE_INLINE uint32_t dropped() { return 0; }
|
||||
|
||||
protected:
|
||||
usart_rx_callback_t _rx_callback;
|
||||
|
||||
@@ -138,7 +138,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 ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) || ENABLED(DWINOS_4)
|
||||
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -266,7 +266,7 @@ PGMSTR(M112_KILL_STR, "M112 Shutdown");
|
||||
MarlinState marlin_state = MF_INITIALIZING;
|
||||
|
||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||
bool wait_for_heatup = false;
|
||||
bool wait_for_heatup = true;
|
||||
|
||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||
#if HAS_RESUME_CONTINUE
|
||||
|
||||
@@ -383,9 +383,9 @@
|
||||
#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) CR-FDM-v2.4.S1_v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) CR-FDM-v24S1_301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) CR-FDM-v2.5.S1_100 as found in the CR-10 Smart Pro
|
||||
#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)
|
||||
@@ -468,11 +468,6 @@
|
||||
#define BOARD_FYSETC_CHEETAH_V30 5250 // FYSETC Cheetah V3.0 (STM32F446RC)
|
||||
#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6)
|
||||
|
||||
//
|
||||
// Other ARM Cortex-M4
|
||||
//
|
||||
#define BOARD_CREALITY_CR4NS 5300 // Creality CR4NS200320C13 (GD32F303RET6) as found in the Ender-3 V3 SE
|
||||
|
||||
//
|
||||
// ARM Cortex-M7
|
||||
//
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
#define STR_BUSY_PAUSED_FOR_USER "busy: paused for user"
|
||||
#define STR_BUSY_PAUSED_FOR_INPUT "busy: paused for input"
|
||||
#define STR_Z_MOVE_COMP "Z_move_comp"
|
||||
#define STR_LINE_NO "Line: "
|
||||
#define STR_RESEND "Resend: "
|
||||
#define STR_UNKNOWN_COMMAND "Unknown command: \""
|
||||
#define STR_ACTIVE_EXTRUDER "Active Extruder: "
|
||||
|
||||
@@ -89,8 +89,7 @@
|
||||
#define HYPOT2(x,y) (sq(x)+sq(y))
|
||||
#define NORMSQ(x,y,z) (sq(x)+sq(y)+sq(z))
|
||||
|
||||
#define FLOAT_SQ(I) sq(float(I))
|
||||
#define CIRCLE_AREA(R) (float(M_PI) * FLOAT_SQ(R))
|
||||
#define CIRCLE_AREA(R) (float(M_PI) * sq(float(R)))
|
||||
#define CIRCLE_CIRC(R) (2 * float(M_PI) * float(R))
|
||||
|
||||
#define SIGN(a) ({__typeof__(a) _a = (a); (_a>0)-(_a<0);})
|
||||
@@ -197,8 +196,8 @@
|
||||
#define ENABLED(V...) DO(ENA,&&,V)
|
||||
#define DISABLED(V...) DO(DIS,&&,V)
|
||||
#define ANY(V...) !DISABLED(V)
|
||||
#define ALL(V...) ENABLED(V)
|
||||
#define NONE(V...) DISABLED(V)
|
||||
#define ALL ENABLED
|
||||
#define NONE DISABLED
|
||||
#define COUNT_ENABLED(V...) DO(ENA,+,V)
|
||||
#define MANY(V...) (COUNT_ENABLED(V) > 1)
|
||||
|
||||
@@ -630,7 +629,7 @@
|
||||
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
|
||||
|
||||
// Force define expansion
|
||||
#define EVAL(V...) EVAL16(V)
|
||||
#define EVAL EVAL16
|
||||
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
|
||||
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
|
||||
#define EVAL1024(V...) EVAL512(EVAL512(V))
|
||||
|
||||
@@ -143,13 +143,13 @@ public:
|
||||
|
||||
// Set with format string and arguments, like printf
|
||||
template<typename... Args>
|
||||
MString& setf_P(PGM_P const pfmt, Args... more) { SNPRINTF_P(str, SIZE, pfmt, more...); debug(F("setf_P")); return *this; }
|
||||
MString& setf_P(PGM_P const fmt, Args... more) { SNPRINTF_P(str, SIZE, fmt, more...); debug(F("setf_P")); return *this; }
|
||||
|
||||
template<typename... Args>
|
||||
MString& setf(const char *fmt, Args... more) { SNPRINTF(str, SIZE, fmt, more...); debug(F("setf")); return *this; }
|
||||
MString& setf(const char *fmt, Args... more) { SNPRINTF(str, SIZE, fmt, more...); debug(F("setf")); return *this; }
|
||||
|
||||
template<typename... Args>
|
||||
MString& setf(FSTR_P const ffmt, Args... more) { return setf_P(FTOP(ffmt), more...); }
|
||||
MString& setf(FSTR_P const fmt, Args... more) { return setf_P(FTOP(fmt), more...); }
|
||||
|
||||
// Chainable String appenders
|
||||
MString& append() { debug(F("nil")); return *this; } // for macros that might emit no output
|
||||
@@ -206,9 +206,9 @@ public:
|
||||
MString& append(const spaces_t &s) { return append(repchr_t(' ', s.count)); }
|
||||
|
||||
template<typename... Args>
|
||||
MString& appendf_P(PGM_P const pfmt, Args... more) {
|
||||
MString& appendf_P(PGM_P const fmt, Args... more) {
|
||||
int sz = length();
|
||||
if (sz < SIZE) SNPRINTF_P(str + sz, SIZE - sz, pfmt, more...);
|
||||
if (sz < SIZE) SNPRINTF_P(str + sz, SIZE - sz, fmt, more...);
|
||||
debug(F("appendf_P"));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -271,13 +271,13 @@ public:
|
||||
SString& set() { super::set(); return *this; }
|
||||
|
||||
template<typename... Args>
|
||||
SString& setf_P(PGM_P const pfmt, Args... more) { super::setf_P(pfmt, more...); return *this; }
|
||||
SString& setf_P(PGM_P const fmt, Args... more) { super::setf_P(fmt, more...); return *this; }
|
||||
|
||||
template<typename... Args>
|
||||
SString& setf(const char *fmt, Args... more) { super::setf(fmt, more...); return *this; }
|
||||
SString& setf(const char *fmt, Args... more) { super::setf(fmt, more...); return *this; }
|
||||
|
||||
template<typename... Args>
|
||||
SString& setf(FSTR_P const ffmt, Args... more) { super::setf(ffmt, more...); return *this; }
|
||||
SString& setf(FSTR_P const fmt, Args... more) { super::setf(fmt, more...); return *this; }
|
||||
|
||||
template <typename T>
|
||||
SString& set(const T &v) { super::set(v); return *this; }
|
||||
|
||||
+4
-12
@@ -46,7 +46,6 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
#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_DECL(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)
|
||||
#define MAIN_AXIS_NAMES_LC NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)
|
||||
#define STR_AXES_MAIN NUM_AXIS_GANG("X", "Y", "Z", STR_I, STR_J, STR_K, STR_U, STR_V, STR_W)
|
||||
|
||||
#define LOGICAL_AXIS_GANG(E,V...) NUM_AXIS_GANG(V) GANG_ITEM_E(E)
|
||||
@@ -59,21 +58,17 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
#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)
|
||||
#define LOGICAL_AXIS_NAMES_LC LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)
|
||||
#define LOGICAL_AXIS_MAP(F) MAP(F, LOGICAL_AXIS_NAMES)
|
||||
#define LOGICAL_AXIS_MAP_LC(F) MAP(F, LOGICAL_AXIS_NAMES_LC)
|
||||
#define STR_AXES_LOGICAL LOGICAL_AXIS_GANG("E", "X", "Y", "Z", STR_I, STR_J, STR_K, STR_U, STR_V, STR_W)
|
||||
|
||||
#if NUM_AXES
|
||||
#define NUM_AXES_SEP ,
|
||||
#define MAIN_AXIS_MAP(F) MAP(F, MAIN_AXIS_NAMES)
|
||||
#define MAIN_AXIS_MAP_LC(F) MAP(F, MAIN_AXIS_NAMES_LC)
|
||||
#define OPTARGS_NUM(T) , NUM_AXIS_ARGS(T)
|
||||
#define OPTARGS_LOGICAL(T) , LOGICAL_AXIS_ARGS(T)
|
||||
#else
|
||||
#define NUM_AXES_SEP
|
||||
#define MAIN_AXIS_MAP(F)
|
||||
#define MAIN_AXIS_MAP_LC(F)
|
||||
#define OPTARGS_NUM(T)
|
||||
#define OPTARGS_LOGICAL(T)
|
||||
#endif
|
||||
@@ -84,7 +79,6 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
#define NUM_AXIS_ARGS_(T) NUM_AXIS_ARGS(T) NUM_AXES_SEP
|
||||
#define NUM_AXIS_ELEM_(T) NUM_AXIS_ELEM(T) NUM_AXES_SEP
|
||||
#define MAIN_AXIS_NAMES_ MAIN_AXIS_NAMES NUM_AXES_SEP
|
||||
#define MAIN_AXIS_NAMES_LC_ MAIN_AXIS_NAMES_LC NUM_AXES_SEP
|
||||
|
||||
#if LOGICAL_AXES
|
||||
#define LOGICAL_AXES_SEP ,
|
||||
@@ -98,7 +92,6 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
#define LOGICAL_AXIS_ARGS_(T) LOGICAL_AXIS_ARGS(T) LOGICAL_AXES_SEP
|
||||
#define LOGICAL_AXIS_ELEM_(T) LOGICAL_AXIS_ELEM(T) LOGICAL_AXES_SEP
|
||||
#define LOGICAL_AXIS_NAMES_ LOGICAL_AXIS_NAMES LOGICAL_AXES_SEP
|
||||
#define LOGICAL_AXIS_NAMES_LC_ LOGICAL_AXIS_NAMES_LC LOGICAL_AXES_SEP
|
||||
|
||||
#define SECONDARY_AXIS_GANG(V...) GANG_N(SECONDARY_AXES, V)
|
||||
#define SECONDARY_AXIS_CODE(V...) CODE_N(SECONDARY_AXES, V)
|
||||
@@ -166,7 +159,7 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
// General Flags for some number of states
|
||||
template<size_t N>
|
||||
struct Flags {
|
||||
typedef bits_t(N) flagbits_t;
|
||||
typedef uvalue_t(N) flagbits_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,
|
||||
@@ -226,7 +219,7 @@ typedef struct {
|
||||
//
|
||||
// - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
|
||||
// - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
|
||||
// - X_HEAD, Y_HEAD, and Z_HEAD should be used for axes on Core kinematics
|
||||
// - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
|
||||
//
|
||||
enum AxisEnum : uint8_t {
|
||||
|
||||
@@ -610,9 +603,9 @@ struct XYZval {
|
||||
// If any element is true then it's true
|
||||
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
|
||||
// Smallest element
|
||||
FI constexpr T small() const { return TERN0(HAS_X_AXIS, _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w))); }
|
||||
FI constexpr T small() const { return TERN(HAS_X_AXIS, _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)), 0); }
|
||||
// Largest element
|
||||
FI constexpr T large() const { return TERN0(HAS_X_AXIS, _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w))); }
|
||||
FI constexpr T large() const { return TERN(HAS_X_AXIS, _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)), 0); }
|
||||
|
||||
// Explicit copy and copies with conversion
|
||||
FI constexpr XYZval<T> copy() const { XYZval<T> o = *this; return o; }
|
||||
@@ -1091,7 +1084,6 @@ public:
|
||||
FI bool toggle(const AxisEnum n) { TBI(bits, n); return TEST(bits, n); }
|
||||
FI void bset(const AxisEnum n) { SBI(bits, n); }
|
||||
FI void bclr(const AxisEnum n) { CBI(bits, n); }
|
||||
FI void bset(const AxisEnum n, const bool b) { if (b) bset(n); else bclr(n); }
|
||||
|
||||
// Accessor via an AxisEnum (or any integer) [index]
|
||||
FI bool operator[](const int n) const { return TEST(bits, n); }
|
||||
|
||||
@@ -46,16 +46,10 @@ BDS_Leveling bdl;
|
||||
#define DEBUG_OUT ENABLED(DEBUG_OUT_BD)
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
/**
|
||||
* M102 S<#> : Set adjustable Z height in 0.1mm units (10ths of a mm)
|
||||
* (e.g., 'M102 S4' enables adjusting for Z <= 0.4mm)
|
||||
* M102 S0 : Disable adjustable Z height
|
||||
*
|
||||
* M102 S-1 : Read BDsensor version
|
||||
* M102 S-2 : Read BDsensor distance value
|
||||
* M102 S-5 : Read raw Calibration data
|
||||
* M102 S-6 : Start Calibration
|
||||
*/
|
||||
// M102 S-5 Read raw Calibrate data
|
||||
// M102 S-6 Start Calibrate
|
||||
// M102 S4 Set the adjustable Z height value (e.g., 'M102 S4' means it will do adjusting while the Z height <= 0.4mm , disable with 'M102 S0'.)
|
||||
// M102 S-1 Read sensor information
|
||||
|
||||
#define MAX_BD_HEIGHT 4.0f
|
||||
#define CMD_READ_VERSION 1016
|
||||
|
||||
@@ -765,7 +765,7 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
|
||||
const grid_count_t point_num = (GRID_MAX_POINTS - count) + 1;
|
||||
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
|
||||
TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout());
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
@@ -1494,7 +1494,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
SERIAL_ECHOLNPGM("Tilting mesh (", i + 1, "/3)");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT_F(MSG_LCD_TILTING_MESH), i + 1));
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT(MSG_LCD_TILTING_MESH), i + 1));
|
||||
|
||||
measured_z = probe.probe_at_point(points[i], i < 2 ? PROBE_PT_RAISE : PROBE_PT_LAST_STOW, param.V_verbosity);
|
||||
if ((abort_flag = isnan(measured_z))) break;
|
||||
@@ -1550,7 +1550,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
#endif
|
||||
|
||||
SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_LCD_TILTING_MESH), point_num, total_points));
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
|
||||
|
||||
measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ void FWRetract::retract(const bool retracting E_OPTARG(bool swapping/*=false*/))
|
||||
// Retract by moving from a faux E position back to the current E position
|
||||
current_retract[active_extruder] = base_retract;
|
||||
prepare_internal_move_to_destination( // set current from destination
|
||||
MUL_TERN(RETRACT_SYNC_MIXING, settings.retract_feedrate_mm_s, MIXING_STEPPERS)
|
||||
settings.retract_feedrate_mm_s * TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
|
||||
);
|
||||
|
||||
// Is a Z hop set, and has the hop not yet been done?
|
||||
@@ -165,7 +165,8 @@ void FWRetract::retract(const bool retracting E_OPTARG(bool swapping/*=false*/))
|
||||
|
||||
// Recover E, set_current_to_destination
|
||||
prepare_internal_move_to_destination(
|
||||
MUL_TERN(RETRACT_SYNC_MIXING, swapping ? settings.swap_retract_recover_feedrate_mm_s : settings.retract_recover_feedrate_mm_s, MIXING_STEPPERS)
|
||||
(swapping ? settings.swap_retract_recover_feedrate_mm_s : settings.retract_recover_feedrate_mm_s)
|
||||
* TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
if (runout.filament_ran_out) { // Disable a triggered sensor
|
||||
runout.enabled = false;
|
||||
runout.enabled[active_extruder] = false;
|
||||
runout.reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
|
||||
// Accessors
|
||||
static uint16_t pixels() { return MUL_TERN(NEOPIXEL2_INSERIES, adaneo1.numPixels(), 2); }
|
||||
static uint16_t pixels() { return adaneo1.numPixels() * TERN1(NEOPIXEL2_INSERIES, 2); }
|
||||
|
||||
static uint32_t pixel_color(const uint16_t n) {
|
||||
#if ENABLED(NEOPIXEL2_INSERIES)
|
||||
|
||||
@@ -135,7 +135,7 @@ void MMU2::reset() {
|
||||
int8_t MMU2::get_current_tool() { return extruder == MMU2_NO_TOOL ? -1 : extruder; }
|
||||
|
||||
#if ANY(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR)
|
||||
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)
|
||||
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != runout.out_state())
|
||||
#else
|
||||
#define FILAMENT_PRESENT() true
|
||||
#endif
|
||||
|
||||
@@ -214,12 +214,21 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
impatient_beep(max_beep_count);
|
||||
#if ALL(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
#define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
|
||||
switch (active_extruder) {
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED)
|
||||
LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) {
|
||||
pin_t pin;
|
||||
switch (i) {
|
||||
default: continue;
|
||||
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; break;
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_RUNOUT)
|
||||
#undef _CASE_RUNOUT
|
||||
}
|
||||
const RunoutMode rm = runout.mode[i - 1];
|
||||
if (rm != RM_NONE && rm != RM_MOTION_SENSOR && extDigitalRead(pin) != runout.out_state(i - 1))
|
||||
wait_for_user = false;
|
||||
}
|
||||
#else
|
||||
if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;
|
||||
if (READ(FIL_RUNOUT_PIN) != runout.out_state(active_extruder))
|
||||
wait_for_user = false;
|
||||
#endif
|
||||
#endif
|
||||
idle_no_sleep();
|
||||
@@ -680,7 +689,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));
|
||||
@@ -689,7 +698,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
|
||||
|
||||
@@ -122,6 +122,7 @@ void Power::power_off() {
|
||||
TERN_(HAS_SUICIDE, suicide());
|
||||
|
||||
if (!psu_on) return;
|
||||
SERIAL_ECHOLNPGM(STR_POWEROFF);
|
||||
|
||||
SERIAL_ECHOLNPGM(STR_POWEROFF);
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
FilamentMonitor runout;
|
||||
|
||||
bool FilamentMonitorBase::enabled = true,
|
||||
FilamentMonitorBase::filament_ran_out; // = false
|
||||
|
||||
bool FilamentMonitorBase::enabled[NUM_RUNOUT_SENSORS], // Initialized by settings.load
|
||||
FilamentMonitorBase::filament_ran_out; // = false
|
||||
RunoutMode FilamentMonitorBase::mode[NUM_RUNOUT_SENSORS]; // Initialized by settings.load
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
bool FilamentMonitorBase::host_handling; // = false
|
||||
#endif
|
||||
@@ -45,15 +45,10 @@ bool FilamentMonitorBase::enabled = true,
|
||||
#include "../core/debug_out.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float RunoutResponseDelayed::runout_distance_mm = FILAMENT_RUNOUT_DISTANCE_MM;
|
||||
countdown_t RunoutResponseDelayed::mm_countdown;
|
||||
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
||||
uint8_t FilamentSensorEncoder::motion_detected;
|
||||
#endif
|
||||
#else
|
||||
int8_t RunoutResponseDebounced::runout_count[NUM_RUNOUT_SENSORS]; // = 0
|
||||
#endif
|
||||
float RunoutResponseDelayed::runout_distance_mm[NUM_RUNOUT_SENSORS]; // Initialized by settings.load
|
||||
countdown_t RunoutResponseDelayed::mm_countdown;
|
||||
uint8_t FilamentSensorCore::motion_detected;
|
||||
int8_t RunoutResponseDelayed::runout_count[NUM_RUNOUT_SENSORS]; // = 0
|
||||
|
||||
//
|
||||
// Filament Runout event handler
|
||||
|
||||
+107
-223
@@ -44,12 +44,6 @@
|
||||
#define FILAMENT_RUNOUT_THRESHOLD 5
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
||||
#define HAS_FILAMENT_MOTION 1
|
||||
#endif
|
||||
#if DISABLED(FILAMENT_MOTION_SENSOR) || ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
#define HAS_FILAMENT_SWITCH 1
|
||||
#endif
|
||||
|
||||
typedef Flags<
|
||||
#if NUM_MOTION_SENSORS > NUM_RUNOUT_SENSORS
|
||||
@@ -64,24 +58,37 @@ inline bool should_monitor_runout() { return did_pause_print || printingIsActive
|
||||
|
||||
template<class RESPONSE_T, class SENSOR_T>
|
||||
class TFilamentMonitor;
|
||||
class FilamentSensor;
|
||||
class FilamentSensorCore;
|
||||
class RunoutResponseDelayed;
|
||||
class RunoutResponseDebounced;
|
||||
|
||||
/********************************* TEMPLATE SPECIALIZATION *********************************/
|
||||
|
||||
typedef TFilamentMonitor<
|
||||
TERN(HAS_FILAMENT_RUNOUT_DISTANCE, RunoutResponseDelayed, RunoutResponseDebounced),
|
||||
FilamentSensor
|
||||
RunoutResponseDelayed,
|
||||
FilamentSensorCore
|
||||
> FilamentMonitor;
|
||||
|
||||
extern FilamentMonitor runout;
|
||||
|
||||
/*******************************************************************************************/
|
||||
|
||||
enum RunoutMode : uint8_t {
|
||||
RM_NONE,
|
||||
RM_OUT_ON_LOW,
|
||||
RM_OUT_ON_HIGH,
|
||||
RM_RESERVED3,
|
||||
RM_RESERVED4,
|
||||
RM_RESERVED5,
|
||||
RM_RESERVED6,
|
||||
RM_MOTION_SENSOR
|
||||
};
|
||||
|
||||
class FilamentMonitorBase {
|
||||
public:
|
||||
static bool enabled, filament_ran_out;
|
||||
static bool enabled[NUM_RUNOUT_SENSORS], filament_ran_out;
|
||||
static RunoutMode mode[NUM_RUNOUT_SENSORS];
|
||||
|
||||
static uint8_t out_state(const uint8_t e=0) { return mode[e] == RM_OUT_ON_HIGH ? HIGH : LOW; }
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
static bool host_handling;
|
||||
@@ -111,24 +118,14 @@ class TFilamentMonitor : public FilamentMonitorBase {
|
||||
|
||||
// Call this method when filament is present,
|
||||
// so the response can reset its counter.
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
response.filament_present(extruder);
|
||||
}
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
response.filament_motion_present(extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
static float& runout_distance() { return response.runout_distance_mm; }
|
||||
static void set_runout_distance(const_float_t mm) { response.runout_distance_mm = mm; }
|
||||
#endif
|
||||
static void filament_present(const uint8_t e) { response.filament_present(e); }
|
||||
static float& runout_distance(const uint8_t e=0) { return response.runout_distance_mm[e]; }
|
||||
static void set_runout_distance(const_float_t mm, const uint8_t e=0) { response.runout_distance_mm[e] = mm; }
|
||||
|
||||
// Handle a block completion. RunoutResponseDelayed uses this to
|
||||
// add up the length of filament moved while the filament is out.
|
||||
static void block_completed(const block_t * const b) {
|
||||
if (enabled) {
|
||||
if (enabled[active_extruder]) {
|
||||
response.block_completed(b);
|
||||
sensor.block_completed(b);
|
||||
}
|
||||
@@ -137,11 +134,11 @@ class TFilamentMonitor : public FilamentMonitorBase {
|
||||
// Give the response a chance to update its counter.
|
||||
static void run() {
|
||||
if (enabled && !filament_ran_out && should_monitor_runout()) {
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, cli()); // Prevent RunoutResponseDelayed::block_completed from accumulating here
|
||||
cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here
|
||||
response.run();
|
||||
sensor.run();
|
||||
const runout_flags_t runout_flags = response.has_run_out();
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, sei());
|
||||
sei();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
#if ENABLED(WATCH_ALL_RUNOUT_SENSORS)
|
||||
const bool ran_out = bool(runout_flags); // any sensor triggers
|
||||
@@ -182,27 +179,40 @@ class FilamentSensorBase {
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
runout.filament_present(extruder); // ...which calls response.filament_present(extruder)
|
||||
}
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
runout.filament_motion_present(extruder); // ...which calls response.filament_motion_present(extruder)
|
||||
}
|
||||
#endif
|
||||
|
||||
public:
|
||||
static void setup() {
|
||||
#define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0);
|
||||
#define INIT_RUNOUT_PIN(N) _INIT_RUNOUT_PIN(FIL_RUNOUT##N##_PIN, FIL_RUNOUT##N##_STATE, FIL_RUNOUT##N##_PULLUP, FIL_RUNOUT##N##_PULLDOWN);
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, INIT_RUNOUT_PIN)
|
||||
#undef INIT_RUNOUT_PIN
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
#define INIT_MOTION_PIN(N) _INIT_RUNOUT_PIN(FIL_MOTION##N##_PIN, FIL_MOTION##N##_STATE, FIL_MOTION##N##_PULLUP, FIL_MOTION##N##_PULLDOWN);
|
||||
REPEAT_1(NUM_MOTION_SENSORS, INIT_MOTION_PIN)
|
||||
#undef INIT_MOTION_PIN
|
||||
#define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0)
|
||||
#define INIT_RUNOUT_PIN(N) _INIT_RUNOUT_PIN(FIL_RUNOUT##N##_PIN, FIL_RUNOUT##N##_STATE, FIL_RUNOUT##N##_PULLUP, FIL_RUNOUT##N##_PULLDOWN)
|
||||
#if NUM_RUNOUT_SENSORS >= 1
|
||||
INIT_RUNOUT_PIN(1);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 2
|
||||
INIT_RUNOUT_PIN(2);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 3
|
||||
INIT_RUNOUT_PIN(3);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 4
|
||||
INIT_RUNOUT_PIN(4);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 5
|
||||
INIT_RUNOUT_PIN(5);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 6
|
||||
INIT_RUNOUT_PIN(6);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 7
|
||||
INIT_RUNOUT_PIN(7);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 8
|
||||
INIT_RUNOUT_PIN(8);
|
||||
#endif
|
||||
#undef _INIT_RUNOUT_PIN
|
||||
#undef INIT_RUNOUT_PIN
|
||||
}
|
||||
|
||||
|
||||
// Return a bitmask of runout pin states
|
||||
static uint8_t poll_runout_pins() {
|
||||
#define _OR_RUNOUT(N) | (READ(FIL_RUNOUT##N##_PIN) ? _BV((N) - 1) : 0)
|
||||
@@ -212,7 +222,7 @@ class FilamentSensorBase {
|
||||
|
||||
// Return a bitmask of runout flag states (1 bits always indicates runout)
|
||||
static uint8_t poll_runout_states() {
|
||||
#define _INVERT_BIT(N) | (FIL_RUNOUT##N##_STATE ? 0 : _BV(N - 1))
|
||||
#define _INVERT_BIT(N) | (runout.out_state(N-1) ? 0 : _BV(N-1))
|
||||
return poll_runout_pins() ^ uint8_t(0 REPEAT_1(NUM_RUNOUT_SENSORS, _INVERT_BIT));
|
||||
#undef _INVERT_BIT
|
||||
}
|
||||
@@ -234,17 +244,21 @@ class FilamentSensorBase {
|
||||
#endif
|
||||
};
|
||||
|
||||
#if HAS_FILAMENT_MOTION
|
||||
class FilamentSensorCore : public FilamentSensorBase {
|
||||
private:
|
||||
static uint8_t motion_detected;
|
||||
|
||||
/**
|
||||
* This sensor uses a magnetic encoder disc and a Hall effect
|
||||
* sensor (or a slotted disc and optical sensor). The state
|
||||
* will toggle between 0 and 1 on filament movement. It can detect
|
||||
* filament runout and stripouts or jams.
|
||||
*/
|
||||
class FilamentSensorEncoder : public FilamentSensorBase {
|
||||
private:
|
||||
static uint8_t motion_detected;
|
||||
static bool poll_runout_state(const uint8_t extruder) {
|
||||
const uint8_t runout_states = poll_runout_states();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if ( !TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())
|
||||
&& !TERN0(MULTI_NOZZLE_DUPLICATION, extruder_duplication_enabled)
|
||||
) return TEST(runout_states, extruder); // A specific extruder ran out
|
||||
#else
|
||||
UNUSED(extruder);
|
||||
#endif
|
||||
return !!runout_states; // Any extruder ran out
|
||||
}
|
||||
|
||||
static void poll_motion_sensor() {
|
||||
static uint8_t old_state;
|
||||
@@ -252,17 +266,17 @@ class FilamentSensorBase {
|
||||
change = old_state ^ new_state;
|
||||
old_state = new_state;
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
if (change) {
|
||||
SERIAL_ECHOPGM("Motion detected:");
|
||||
for (uint8_t e = 0; e < TERN(FILAMENT_SWITCH_AND_MOTION, NUM_MOTION_SENSORS, NUM_RUNOUT_SENSORS); ++e)
|
||||
if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
if (change) {
|
||||
SERIAL_ECHOPGM("Motion detected:");
|
||||
for(uint8_t e = 0; e < NUM_RUNOUT_SENSORS; ++e)
|
||||
if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
||||
motion_detected |= change;
|
||||
}
|
||||
motion_detected |= change;
|
||||
}
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const b) {
|
||||
@@ -275,36 +289,12 @@ class FilamentSensorBase {
|
||||
motion_detected = 0;
|
||||
}
|
||||
|
||||
static void run() { poll_motion_sensor(); }
|
||||
};
|
||||
|
||||
#endif // HAS_FILAMENT_MOTION
|
||||
|
||||
#if HAS_FILAMENT_SWITCH
|
||||
|
||||
/**
|
||||
* This is a simple endstop switch in the path of the filament.
|
||||
* It can detect filament runout, but not stripouts or jams.
|
||||
*/
|
||||
class FilamentSensorSwitch : public FilamentSensorBase {
|
||||
private:
|
||||
static bool poll_runout_state(const uint8_t extruder) {
|
||||
const uint8_t runout_states = poll_runout_states();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if ( !TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())
|
||||
&& !TERN0(MULTI_NOZZLE_DUPLICATION, extruder_duplication_enabled)
|
||||
) return TEST(runout_states, extruder); // A specific extruder ran out
|
||||
#else
|
||||
UNUSED(extruder);
|
||||
#endif
|
||||
return !!runout_states; // Any extruder ran out
|
||||
static void run() {
|
||||
if (runout.mode[active_extruder] == RM_MOTION_SENSOR) {
|
||||
poll_motion_sensor();
|
||||
}
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const) {}
|
||||
|
||||
static void run() {
|
||||
for (uint8_t s = 0; s < NUM_RUNOUT_SENSORS; ++s) {
|
||||
else if (runout.mode[active_extruder] != RM_NONE) {
|
||||
for(uint8_t s = 0; s < NUM_RUNOUT_SENSORS; ++s) {
|
||||
const bool out = poll_runout_state(s);
|
||||
if (!out) filament_present(s);
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
@@ -316,36 +306,12 @@ class FilamentSensorBase {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // HAS_FILAMENT_SWITCH
|
||||
|
||||
/**
|
||||
* This is a simple endstop switch in the path of the filament.
|
||||
* It can detect filament runout, but not stripouts or jams.
|
||||
*/
|
||||
class FilamentSensor : public FilamentSensorBase {
|
||||
private:
|
||||
TERN_(HAS_FILAMENT_MOTION, static FilamentSensorEncoder encoder_sensor);
|
||||
TERN_(HAS_FILAMENT_SWITCH, static FilamentSensorSwitch switch_sensor);
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const b) {
|
||||
TERN_(HAS_FILAMENT_MOTION, encoder_sensor.block_completed(b));
|
||||
TERN_(HAS_FILAMENT_SWITCH, switch_sensor.block_completed(b));
|
||||
}
|
||||
|
||||
static void run() {
|
||||
TERN_(HAS_FILAMENT_MOTION, encoder_sensor.run());
|
||||
TERN_(HAS_FILAMENT_SWITCH, switch_sensor.run());
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/********************************* RESPONSE TYPE *********************************/
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
float runout[NUM_RUNOUT_SENSORS];
|
||||
Flags<NUM_RUNOUT_SENSORS> runout_reset; // Reset runout later
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
@@ -354,15 +320,16 @@ class FilamentSensorBase {
|
||||
#endif
|
||||
} countdown_t;
|
||||
|
||||
// RunoutResponseDelayed triggers a runout event only if the length
|
||||
// of filament specified by FILAMENT_RUNOUT_DISTANCE_MM has been fed
|
||||
// during a runout condition.
|
||||
class RunoutResponseDelayed {
|
||||
private:
|
||||
static countdown_t mm_countdown;
|
||||
// RunoutResponseDelayed triggers a runout event only if the length
|
||||
// of filament specified by FIL_RUNOUT_DISTANCE_MM has been fed
|
||||
// during a runout condition.
|
||||
class RunoutResponseDelayed {
|
||||
private:
|
||||
static countdown_t mm_countdown;
|
||||
|
||||
public:
|
||||
static float runout_distance_mm;
|
||||
public:
|
||||
static float runout_distance_mm[NUM_RUNOUT_SENSORS];
|
||||
static int8_t runout_count[NUM_RUNOUT_SENSORS];
|
||||
|
||||
static void reset() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) filament_present(i);
|
||||
@@ -371,116 +338,33 @@ class FilamentSensorBase {
|
||||
#endif
|
||||
}
|
||||
|
||||
static void run() {
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
static millis_t t = 0;
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, t)) {
|
||||
t = millis() + 1000UL;
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i)
|
||||
SERIAL_ECHO(i ? F(", ") : F("Runout remaining mm: "), mm_countdown.runout[i]);
|
||||
static void run() {
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
static millis_t t = 0;
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, t)) {
|
||||
t = millis() + 1000UL;
|
||||
for(uint8_t i; i < NUM_RUNOUT_SENSORS; ++i)
|
||||
SERIAL_ECHO(i ? F(", ") : F("Remaining mm: "), mm_countdown[i]);
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
for (uint8_t i = 0; i < NUM_MOTION_SENSORS; ++i)
|
||||
SERIAL_ECHO(i ? F(", ") : F("Motion remaining mm: "), mm_countdown.motion[i]);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static runout_flags_t has_run_out() {
|
||||
runout_flags_t runout_flags{0};
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (mm_countdown.runout[i] < 0) runout_flags.set(i);
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
for (uint8_t i = 0; i < NUM_MOTION_SENSORS; ++i) if (mm_countdown.motion[i] < 0) runout_flags.set(i);
|
||||
#endif
|
||||
return runout_flags;
|
||||
}
|
||||
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
if (mm_countdown.runout[extruder] < runout_distance_mm || did_pause_print) {
|
||||
// Reset runout only if it is smaller than runout_distance or printing is paused.
|
||||
// On Bowden systems retract may be larger than runout_distance_mm, so if retract
|
||||
// was added leave it in place, or the following unretract will cause runout event.
|
||||
mm_countdown.runout[extruder] = runout_distance_mm;
|
||||
mm_countdown.runout_reset.clear(extruder);
|
||||
}
|
||||
else {
|
||||
// If runout is larger than runout distance, we cannot reset right now, as Bowden and retract
|
||||
// distance larger than runout_distance_mm leads to negative runout right after unretract.
|
||||
// But we cannot ignore filament_present event. After unretract, runout will become smaller
|
||||
// than runout_distance_mm and should be reset after that. So activate delayed reset.
|
||||
mm_countdown.runout_reset.set(extruder);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
// Same logic as filament_present
|
||||
if (mm_countdown.motion[extruder] < runout_distance_mm || did_pause_print) {
|
||||
mm_countdown.motion[extruder] = runout_distance_mm;
|
||||
mm_countdown.motion_reset.clear(extruder);
|
||||
}
|
||||
else
|
||||
mm_countdown.motion_reset.set(extruder);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void block_completed(const block_t * const b) {
|
||||
const int32_t esteps = b->steps.e;
|
||||
if (!esteps) return;
|
||||
|
||||
// No calculation unless paused or printing
|
||||
if (!should_monitor_runout()) return;
|
||||
|
||||
// No need to ignore retract/unretract movement since they complement each other
|
||||
const uint8_t e = b->extruder;
|
||||
const float mm = (b->direction_bits.e ? esteps : -esteps) * planner.mm_per_step[E_AXIS_N(e)];
|
||||
|
||||
if (e < NUM_RUNOUT_SENSORS) {
|
||||
mm_countdown.runout[e] -= mm;
|
||||
if (mm_countdown.runout_reset[e]) filament_present(e); // Reset pending. Try to reset.
|
||||
}
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
if (e < NUM_MOTION_SENSORS) {
|
||||
mm_countdown.motion[e] -= mm;
|
||||
if (mm_countdown.motion_reset[e]) filament_motion_present(e); // Reset pending. Try to reset.
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
#else // !HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
||||
// RunoutResponseDebounced triggers a runout event after a runout
|
||||
// condition has been detected runout_threshold times in a row.
|
||||
|
||||
class RunoutResponseDebounced {
|
||||
private:
|
||||
static constexpr int8_t runout_threshold = FILAMENT_RUNOUT_THRESHOLD;
|
||||
static int8_t runout_count[NUM_RUNOUT_SENSORS];
|
||||
|
||||
public:
|
||||
static void reset() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) filament_present(i);
|
||||
}
|
||||
|
||||
static void run() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (runout_count[i] >= 0) runout_count[i]--;
|
||||
}
|
||||
|
||||
static runout_flags_t has_run_out() {
|
||||
runout_flags_t runout_flags{0};
|
||||
static runout_flags_t has_run_out() {
|
||||
runout_flags_t runout_flags{0};
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (runout_count[i] < 0) runout_flags.set(i);
|
||||
return runout_flags;
|
||||
}
|
||||
}
|
||||
|
||||
static void block_completed(const block_t * const) { }
|
||||
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
runout_count[extruder] = runout_threshold;
|
||||
runout_count[extruder] = runout_distance_mm[extruder];
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
||||
@@ -31,7 +31,7 @@ static uint32_t axis_plug_backward = 0;
|
||||
void stepper_driver_backward_error(FSTR_P const fstr) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOLN(fstr, F(" driver is backward!"));
|
||||
ui.status_printf(2, F(S_FMT S_FMT), FTOP(fstr), GET_TEXT_F(MSG_DRIVER_BACKWARD));
|
||||
ui.status_printf(2, F(S_FMT S_FMT), FTOP(fstr), GET_TEXT(MSG_DRIVER_BACKWARD));
|
||||
}
|
||||
|
||||
void stepper_driver_backward_check() {
|
||||
|
||||
@@ -32,12 +32,6 @@
|
||||
|
||||
/**
|
||||
* G42: Move X & Y axes to mesh coordinates (I & J)
|
||||
*
|
||||
* Parameters:
|
||||
* F<feedrate> : Feedrate in mm/min
|
||||
* I<index> : X axis point index
|
||||
* J<index> : Y axis point index
|
||||
* P<bool> : Flag to put the prove at the given point
|
||||
*/
|
||||
void GcodeSuite::G42() {
|
||||
if (MOTION_CONDITIONS) {
|
||||
|
||||
@@ -683,7 +683,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue;
|
||||
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points)));
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points)));
|
||||
|
||||
#if ENABLED(BD_SENSOR_PROBE_NO_STOP)
|
||||
if (PR_INNER_VAR == inStart) {
|
||||
@@ -782,7 +782,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3.");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT_F(MSG_PROBING_POINT), int(i + 1)));
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1)));
|
||||
|
||||
// Retain the last probe position
|
||||
abl.probePos = xy_pos_t(points[i]);
|
||||
@@ -985,6 +985,9 @@ G29_TYPE GcodeSuite::G29() {
|
||||
process_subcommands_now(F(EVENT_GCODE_AFTER_G29));
|
||||
#endif
|
||||
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
TERN_(HAS_MULTI_HOTEND, if (active_extruder != 0) tool_change(0));
|
||||
probe.use_probing_tool(false);
|
||||
|
||||
report_current_position();
|
||||
|
||||
@@ -253,7 +253,7 @@ void GcodeSuite::G29() {
|
||||
|
||||
if (state == MeshNext) {
|
||||
SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS);
|
||||
if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT_F(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS)));
|
||||
if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS)));
|
||||
}
|
||||
|
||||
report_current_position();
|
||||
|
||||
@@ -149,7 +149,7 @@ void GcodeSuite::M48() {
|
||||
for (uint8_t n = 0; n < n_samples; ++n) {
|
||||
#if HAS_STATUS_MESSAGE
|
||||
// Display M48 progress in the status bar
|
||||
ui.status_printf(0, F(S_FMT ": %d/%d"), GET_TEXT_F(MSG_M48_POINT), int(n + 1), int(n_samples));
|
||||
ui.status_printf(0, F(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples));
|
||||
#endif
|
||||
|
||||
// When there are "legs" of movement move around the point before probing
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* gcode/control/M10_M11.cpp
|
||||
* Air Evacuation
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(AIR_EVACUATION)
|
||||
@@ -66,7 +66,7 @@ void GcodeSuite::M111() {
|
||||
SERIAL_ECHOPGM(STR_DEBUG_OFF);
|
||||
#if !(defined(__AVR__) && defined(USBCON))
|
||||
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
|
||||
SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
//SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns());
|
||||
#endif
|
||||
#if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS)
|
||||
SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors());
|
||||
|
||||
@@ -68,7 +68,7 @@ void GcodeSuite::M907() {
|
||||
#define HAS_X_Y_XY_I_J_K_U_V_W 1
|
||||
#endif
|
||||
|
||||
#if HAS_X_Y_XY_I_J_K_U_V_W || HAS_MOTOR_CURRENT_PWM_E || PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
||||
#if HAS_X_Y_XY_I_J_K_U_V_W || ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_Z)
|
||||
|
||||
if (!parser.seen("S"
|
||||
#if HAS_X_Y_XY_I_J_K_U_V_W
|
||||
@@ -77,7 +77,7 @@ void GcodeSuite::M907() {
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
||||
"Z"
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM_E
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
"E"
|
||||
#endif
|
||||
)) return M907_report();
|
||||
@@ -94,7 +94,7 @@ void GcodeSuite::M907() {
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
|
||||
if (parser.seenval('Z')) stepper.set_digipot_current(1, parser.value_int());
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM_E
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
if (parser.seenval('E')) stepper.set_digipot_current(2, parser.value_int());
|
||||
#endif
|
||||
|
||||
@@ -133,7 +133,7 @@ void GcodeSuite::M907() {
|
||||
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
|
||||
PSTR(" M907 X"), stepper.motor_current_setting[0] // X, Y, (I, J, K, U, V, W)
|
||||
, SP_Z_STR, stepper.motor_current_setting[1] // Z
|
||||
#if HAS_MOTOR_CURRENT_PWM_E
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
, SP_E_STR, stepper.motor_current_setting[2] // E
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -44,15 +44,6 @@ void GcodeSuite::M593_report(const bool forReplay/*=true*/) {
|
||||
" D", stepper.get_shaping_damping_ratio(Y_AXIS)
|
||||
);
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Z)
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
report_echo_start(forReplay);
|
||||
#endif
|
||||
SERIAL_ECHOLNPGM(" M593 Z"
|
||||
" F", stepper.get_shaping_frequency(Z_AXIS),
|
||||
" D", stepper.get_shaping_damping_ratio(Z_AXIS)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,17 +59,14 @@ void GcodeSuite::M593() {
|
||||
|
||||
const bool seen_X = TERN0(INPUT_SHAPING_X, parser.seen_test('X')),
|
||||
seen_Y = TERN0(INPUT_SHAPING_Y, parser.seen_test('Y')),
|
||||
seen_Z = TERN0(INPUT_SHAPING_Z, parser.seen_test('Z')),
|
||||
for_X = seen_X || TERN0(INPUT_SHAPING_X, (!seen_X && !seen_Y && !seen_Z)),
|
||||
for_Y = seen_Y || TERN0(INPUT_SHAPING_Y, (!seen_X && !seen_Y && !seen_Z)),
|
||||
for_Z = seen_Z || TERN0(INPUT_SHAPING_Z, (!seen_X && !seen_Y && !seen_Z));
|
||||
for_X = seen_X || TERN0(INPUT_SHAPING_X, (!seen_X && !seen_Y)),
|
||||
for_Y = seen_Y || TERN0(INPUT_SHAPING_Y, (!seen_X && !seen_Y));
|
||||
|
||||
if (parser.seen('D')) {
|
||||
const float zeta = parser.value_float();
|
||||
if (WITHIN(zeta, 0, 1)) {
|
||||
if (for_X) stepper.set_shaping_damping_ratio(X_AXIS, zeta);
|
||||
if (for_Y) stepper.set_shaping_damping_ratio(Y_AXIS, zeta);
|
||||
if (for_Z) stepper.set_shaping_damping_ratio(Z_AXIS, zeta);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_MSG("?Zeta (D) value out of range (0-1)");
|
||||
@@ -90,7 +78,6 @@ void GcodeSuite::M593() {
|
||||
if (freq == 0.0f || freq > min_freq) {
|
||||
if (for_X) stepper.set_shaping_frequency(X_AXIS, freq);
|
||||
if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq);
|
||||
if (for_Z) stepper.set_shaping_frequency(Z_AXIS, freq);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Frequency (F) must be greater than ", min_freq, " or 0 to disable"));
|
||||
|
||||
@@ -94,7 +94,7 @@ void GcodeSuite::M600() {
|
||||
// In this case, for duplicating modes set DXC_ext to the extruder that ran out.
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if (idex_is_duplicating())
|
||||
DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT2_STATE) ? 1 : 0;
|
||||
DXC_ext = (READ(FIL_RUNOUT2_PIN) == runout.out_state(1)) ? 1 : 0;
|
||||
#else
|
||||
DXC_ext = active_extruder;
|
||||
#endif
|
||||
|
||||
+36
-25
@@ -28,36 +28,46 @@
|
||||
#include "../../../feature/runout.h"
|
||||
|
||||
/**
|
||||
* M412: Enable / Disable filament runout detection
|
||||
* M591: Configure filament runout detection
|
||||
*
|
||||
* Parameters
|
||||
* R : Reset the runout sensor
|
||||
* S<bool> : Reset and enable/disable the runout sensor
|
||||
* H<bool> : Enable/disable host handling of filament runout
|
||||
* D<linear> : Extra distance to continue after runout is triggered
|
||||
* L<linear> : Extra distance to continue after runout is triggered or motion interval
|
||||
* D<linear> : Alias for L
|
||||
* P<index> : Mode 0 = NONE
|
||||
* 1 = Switch NO (HIGH = filament present)
|
||||
* 2 = Switch NC (LOW = filament present)
|
||||
* 3 = Encoder / Motion Sensor
|
||||
*/
|
||||
void GcodeSuite::M412() {
|
||||
if (parser.seen("RS"
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, "D")
|
||||
TERN_(HOST_ACTION_COMMANDS, "H")
|
||||
)) {
|
||||
void GcodeSuite::M591() {
|
||||
if (parser.seen("RSDP" TERN_(HOST_ACTION_COMMANDS, "H"))) {
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
if (parser.seen('H')) runout.host_handling = parser.value_bool();
|
||||
#endif
|
||||
const bool seenR = parser.seen_test('R'), seenS = parser.seen('S');
|
||||
if (seenR || seenS) runout.reset();
|
||||
if (seenS) runout.enabled = parser.value_bool();
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
if (parser.seenval('D')) runout.set_runout_distance(parser.value_linear_units());
|
||||
#endif
|
||||
const uint8_t tool = TERN0(MULTI_FILAMENT_SENSOR, parser.ushortval('E', active_extruder));
|
||||
if (seenS) runout.enabled[tool] = parser.value_bool();
|
||||
if (parser.seen('D') || parser.seen('L')) runout.set_runout_distance(parser.value_linear_units(), tool);
|
||||
if (parser.seen('P')) {
|
||||
const RunoutMode tmp_mode = (RunoutMode)parser.value_int();
|
||||
switch (tmp_mode) {
|
||||
case RM_NONE ... RM_OUT_ON_HIGH:
|
||||
case RM_MOTION_SENSOR:
|
||||
runout.mode[tool] = tmp_mode;
|
||||
runout.setup();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled);
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm");
|
||||
#endif
|
||||
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);
|
||||
@@ -66,18 +76,19 @@ void GcodeSuite::M412() {
|
||||
}
|
||||
}
|
||||
|
||||
void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
|
||||
void GcodeSuite::M591_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
SERIAL_ECHOPGM(
|
||||
" M412 S", runout.enabled
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
, " D", LINEAR_UNIT(runout.runout_distance())
|
||||
#endif
|
||||
, " ; Sensor "
|
||||
);
|
||||
serialprintln_onoff(runout.enabled);
|
||||
for(int e=0; e < NUM_RUNOUT_SENSORS; e++)
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M591"
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
" E", e,
|
||||
#endif
|
||||
" S", runout.enabled[e]
|
||||
, " D", LINEAR_UNIT(runout.runout_distance(e))
|
||||
, " P", runout.mode[e]
|
||||
);
|
||||
}
|
||||
|
||||
#endif // HAS_FILAMENT_SENSOR
|
||||
@@ -865,10 +865,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 407: M407(); break; // M407: Display measured filament diameter
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
case 412: M412(); break; // M412: Enable/Disable filament runout detection
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_LANGUAGE
|
||||
case 414: M414(); break; // M414: Select multi language menu
|
||||
#endif
|
||||
@@ -943,6 +939,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 575: M575(); break; // M575: Set serial baudrate
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
case 412: M412(); break; // Alias to M591
|
||||
case 591: M591(); break; // M591 Configure filament runout detection
|
||||
#endif
|
||||
|
||||
#if ENABLED(NONLINEAR_EXTRUSION)
|
||||
case 592: M592(); break; // M592: Nonlinear Extrusion control
|
||||
#endif
|
||||
@@ -1105,10 +1106,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 1002: M1002(); break; // M1002: [INTERNAL] Tool-change and Relative E Move
|
||||
#endif
|
||||
|
||||
#if ENABLED(ONE_CLICK_PRINT)
|
||||
case 1003: M1003(); break; // M1003: [INTERNAL] Set the current dir to /
|
||||
#endif
|
||||
|
||||
#if ENABLED(UBL_MESH_WIZARD)
|
||||
case 1004: M1004(); break; // M1004: UBL Mesh Wizard
|
||||
#endif
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
* R<temp> Wait for extruder current temp to reach target temp. ** Wait for heating or cooling. **
|
||||
* If AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
||||
*
|
||||
* M110 - Get or set the current line number. (Used by host printing)
|
||||
* M110 - Set the current line number. (Used by host printing)
|
||||
* M111 - Set debug flags: "M111 S<flagbits>". See flag bits defined in enum.h.
|
||||
* M112 - Full Shutdown.
|
||||
*
|
||||
@@ -234,7 +234,6 @@
|
||||
* M406 - Disable Filament Sensor flow control. (Requires FILAMENT_WIDTH_SENSOR)
|
||||
* M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
|
||||
* M410 - Quickstop. Abort all planned moves.
|
||||
* M412 - Enable / Disable Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
|
||||
* M413 - Enable / Disable Power-Loss Recovery. (Requires POWER_LOSS_RECOVERY)
|
||||
* M414 - Set language by index. (Requires LCD_LANGUAGE_2...)
|
||||
* M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
|
||||
@@ -259,6 +258,7 @@
|
||||
* M554 - Get or set IP gateway. (Requires enabled Ethernet port)
|
||||
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
|
||||
* M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE)
|
||||
* M591 - Configure Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
|
||||
* M592 - Get or set nonlinear extrusion parameters. (Requires NONLINEAR_EXTRUSION)
|
||||
* M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING_[XY])
|
||||
* M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
|
||||
@@ -1035,8 +1035,9 @@ private:
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
static void M412();
|
||||
static void M412_report(const bool forReplay=true);
|
||||
static void M412() { M591(); }
|
||||
static void M591();
|
||||
static void M591_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_LANGUAGE
|
||||
@@ -1276,10 +1277,6 @@ private:
|
||||
static void M1002();
|
||||
#endif
|
||||
|
||||
#if ENABLED(ONE_CLICK_PRINT)
|
||||
static void M1003();
|
||||
#endif
|
||||
|
||||
#if ENABLED(UBL_MESH_WIZARD)
|
||||
static void M1004();
|
||||
#endif
|
||||
|
||||
@@ -24,19 +24,11 @@
|
||||
#include "../queue.h" // for last_N
|
||||
|
||||
/**
|
||||
* M110: Get or set Current Line Number
|
||||
*
|
||||
* Parameters:
|
||||
* N<int> Number to set as last-processed command
|
||||
*
|
||||
* Without parameters:
|
||||
* Report the last-processed (not last-received or last-enqueued) command
|
||||
* (To purge the queue and resume from this line, the host should use 'M999' instead.)
|
||||
* M110: Set Current Line Number
|
||||
*/
|
||||
void GcodeSuite::M110() {
|
||||
|
||||
if (parser.seenval('N'))
|
||||
queue.set_current_line_number(parser.value_long());
|
||||
else
|
||||
SERIAL_ECHOLNPGM(STR_LINE_NO, queue.get_current_line_number());
|
||||
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ void GcodeSuite::M115() {
|
||||
// AUTOLEVEL (G29)
|
||||
cap_line(F("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
|
||||
|
||||
// RUNOUT (M412, M600)
|
||||
// RUNOUT (M591, M600)
|
||||
cap_line(F("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR));
|
||||
|
||||
// Z_PROBE (G30)
|
||||
|
||||
@@ -373,6 +373,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
|
||||
const float arc_mm_remaining = flat_mm - segment_mm * i;
|
||||
hints.safe_exit_speed_sqr = _MIN(limiting_speed_sqr, 2 * limiting_accel * arc_mm_remaining);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "../../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#if ANY(DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define VERBOSE_SINGLE_PROBE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ inline bool G38_run_probe() {
|
||||
}
|
||||
#endif
|
||||
|
||||
planner.synchronize(); // Wait until the machine is idle
|
||||
planner.synchronize(); // wait until the machine is idle
|
||||
|
||||
// Move flag value
|
||||
#if ENABLED(G38_PROBE_AWAY)
|
||||
|
||||
@@ -54,21 +54,6 @@ void mpe_settings_init() {
|
||||
mpe_settings_report();
|
||||
}
|
||||
|
||||
/**
|
||||
* M951: Magnetic Parking Extruder
|
||||
*
|
||||
* Parameters:
|
||||
* L<linear> : Set X[0] position
|
||||
* R<linear> : Set X[1] position
|
||||
* I<linear> : Set grab distance
|
||||
* J<feedrate> : Set slow feedrate
|
||||
* H<feedrate> : Set fast feedrate
|
||||
* D<feedrate> : Set travel feedrate
|
||||
* C<factor> : Set compensation factor
|
||||
*
|
||||
* With no parameters report the current settings.
|
||||
*
|
||||
*/
|
||||
void GcodeSuite::M951() {
|
||||
if (parser.seenval('L')) mpe_settings.parking_xpos[0] = parser.value_linear_units();
|
||||
if (parser.seenval('R')) mpe_settings.parking_xpos[1] = parser.value_linear_units();
|
||||
|
||||
@@ -212,11 +212,6 @@ public:
|
||||
*/
|
||||
static void set_current_line_number(long n) { serial_state[ring_buffer.command_port().index].last_N = n; }
|
||||
|
||||
/**
|
||||
* Get the current line number for the last received command
|
||||
*/
|
||||
static long get_current_line_number() { return serial_state[ring_buffer.command_port().index].last_N; }
|
||||
|
||||
#if ENABLED(BUFFER_MONITORING)
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(ONE_CLICK_PRINT)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
/**
|
||||
* M1003: Set the current dir to /. Should come after 'M24'.
|
||||
* Prevents the SD menu getting stuck in the newest file's workDir.
|
||||
*/
|
||||
void GcodeSuite::M1003() { card.cdroot(); }
|
||||
|
||||
#endif // ONE_CLICK_PRINT
|
||||
@@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
void GcodeSuite::M306() {
|
||||
const uint8_t e = TERN0(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder));
|
||||
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;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* gcode/temp/M86_M87.cpp
|
||||
* gcode/temp/M86-M87.cpp
|
||||
*
|
||||
* Hotend Idle Timeout
|
||||
*/
|
||||
@@ -893,11 +893,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// FSMC/SPI TFT Panels (LVGL) with encoder click wheel
|
||||
// FSMC/SPI TFT Panels (LVGL)
|
||||
#if ENABLED(TFT_LVGL_UI)
|
||||
#define HAS_TFT_LVGL_UI 1
|
||||
#define SERIAL_RUNTIME_HOOK 1
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#endif
|
||||
|
||||
// FSMC/SPI TFT Panels
|
||||
@@ -977,17 +976,6 @@
|
||||
#define DETECT_I2C_LCD_DEVICE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Ender-3 V2 DWIN with Encoder
|
||||
*/
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
|
||||
#define HAS_DWIN_E3V2_BASIC 1
|
||||
#endif
|
||||
#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DWIN_E3V2 1
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#endif
|
||||
|
||||
// Encoder behavior
|
||||
#ifndef STD_ENCODER_PULSES_PER_STEP
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
@@ -1009,12 +997,10 @@
|
||||
#define ENCODER_FEEDRATE_DEADZONE 6
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Shift register panels
|
||||
* ---------------------
|
||||
* 2 wire Non-latching LCD SR from:
|
||||
* https://github.com/fmalpartida/New-LiquidCrystal/wiki/schematics#user-content-ShiftRegister_connection
|
||||
*/
|
||||
// Shift register panels
|
||||
// ---------------------
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://github.com/fmalpartida/New-LiquidCrystal/wiki/schematics#user-content-ShiftRegister_connection
|
||||
#if ENABLED(FF_INTERFACEBOARD)
|
||||
#define SR_LCD_3W_NL // Non latching 3 wire shift register
|
||||
#define IS_ULTIPANEL 1
|
||||
@@ -1054,6 +1040,11 @@
|
||||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
|
||||
// Aliases for LCD features
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DWIN_E3V2 1
|
||||
#endif
|
||||
|
||||
// E3V2 extras
|
||||
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
|
||||
#define SERIAL_CATCHALL 0
|
||||
@@ -1200,10 +1191,14 @@
|
||||
* Fill in undefined Filament Sensor options
|
||||
*/
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#define HAS_FILAMENT_SENSOR 1
|
||||
#ifndef NUM_RUNOUT_SENSORS
|
||||
#define NUM_RUNOUT_SENSORS E_STEPPERS
|
||||
#endif
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
#define WATCH_ALL_RUNOUT_SENSORS
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 1
|
||||
#ifndef FIL_RUNOUT1_STATE
|
||||
#define FIL_RUNOUT1_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT1_PULLUP
|
||||
#define FIL_RUNOUT1_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1212,9 +1207,7 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 2
|
||||
#ifndef FIL_RUNOUT2_STATE
|
||||
#define FIL_RUNOUT2_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#define MULTI_FILAMENT_SENSOR 1
|
||||
#ifndef FIL_RUNOUT2_PULLUP
|
||||
#define FIL_RUNOUT2_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1223,9 +1216,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 3
|
||||
#ifndef FIL_RUNOUT3_STATE
|
||||
#define FIL_RUNOUT3_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT3_PULLUP
|
||||
#define FIL_RUNOUT3_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1234,9 +1224,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 4
|
||||
#ifndef FIL_RUNOUT4_STATE
|
||||
#define FIL_RUNOUT4_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT4_PULLUP
|
||||
#define FIL_RUNOUT4_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1245,9 +1232,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 5
|
||||
#ifndef FIL_RUNOUT5_STATE
|
||||
#define FIL_RUNOUT5_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT5_PULLUP
|
||||
#define FIL_RUNOUT5_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1256,9 +1240,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 6
|
||||
#ifndef FIL_RUNOUT6_STATE
|
||||
#define FIL_RUNOUT6_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT6_PULLUP
|
||||
#define FIL_RUNOUT6_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1267,9 +1248,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 7
|
||||
#ifndef FIL_RUNOUT7_STATE
|
||||
#define FIL_RUNOUT7_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT7_PULLUP
|
||||
#define FIL_RUNOUT7_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1278,9 +1256,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 8
|
||||
#ifndef FIL_RUNOUT8_STATE
|
||||
#define FIL_RUNOUT8_STATE FIL_RUNOUT_STATE
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT8_PULLUP
|
||||
#define FIL_RUNOUT8_PULLUP FIL_RUNOUT_PULLUP
|
||||
#endif
|
||||
@@ -1603,6 +1578,8 @@
|
||||
#endif
|
||||
#if CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ
|
||||
#define IS_CORE 1
|
||||
#endif
|
||||
#if IS_CORE
|
||||
#if CORE_IS_XY
|
||||
#define CORE_AXIS_1 A_AXIS
|
||||
#define CORE_AXIS_2 B_AXIS
|
||||
@@ -1888,6 +1865,30 @@
|
||||
#define NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_INDEX_FIRST
|
||||
#endif
|
||||
|
||||
/*** TEMPORARY COMPATIBILITY ***/
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#ifndef FIL_RUNOUT_ENABLED
|
||||
#if FIL_RUNOUT_ENABLED_DEFAULT
|
||||
#define FIL_RUNOUT_ENABLED ARRAY_N_1(NUM_RUNOUT_SENSORS, true)
|
||||
#else
|
||||
#define FIL_RUNOUT_ENABLED ARRAY_N_1(NUM_RUNOUT_SENSORS, false)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT_MODE
|
||||
#if FIL_RUNOUT_STATE
|
||||
#define FIL_RUNOUT_MODE ARRAY_N_1(NUM_RUNOUT_SENSORS, 1)
|
||||
#else
|
||||
#define FIL_RUNOUT_MODE ARRAY_N_1(NUM_RUNOUT_SENSORS, 2)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef FIL_RUNOUT_DISTANCE_MM
|
||||
#define FIL_RUNOUT_DISTANCE_MM ARRAY_N_1(NUM_RUNOUT_SENSORS, 10)
|
||||
#endif
|
||||
#undef FIL_RUNOUT_ENABLED_DEFAULT
|
||||
#undef FIL_RUNOUT_STATE
|
||||
#undef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#endif
|
||||
#if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
|
||||
#define SPI_FLASH_BACKUP 1
|
||||
#endif
|
||||
|
||||
@@ -112,8 +112,8 @@
|
||||
#undef DISABLE_IDLE_X
|
||||
#undef INPUT_SHAPING_X
|
||||
#undef SAFE_BED_LEVELING_START_X
|
||||
#undef SHAPING_BUFFER_X
|
||||
#undef SHAPING_FREQ_X
|
||||
#undef SHAPING_ZETA_X
|
||||
#undef STEALTHCHOP_X
|
||||
#endif
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
#undef INPUT_SHAPING_Y
|
||||
#undef QUICK_HOME
|
||||
#undef SAFE_BED_LEVELING_START_Y
|
||||
#undef SHAPING_BUFFER_Y
|
||||
#undef SHAPING_FREQ_Y
|
||||
#undef SHAPING_ZETA_Y
|
||||
#undef STEALTHCHOP_Y
|
||||
#undef STEP_STATE_Y
|
||||
#endif
|
||||
@@ -142,11 +142,8 @@
|
||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||
#undef HOME_Z_FIRST
|
||||
#undef HOMING_Z_WITH_PROBE
|
||||
#undef INPUT_SHAPING_Z
|
||||
#undef NUM_Z_STEPPERS
|
||||
#undef SAFE_BED_LEVELING_START_Z
|
||||
#undef SHAPING_FREQ_Z
|
||||
#undef SHAPING_ZETA_Z
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef STEP_STATE_Z
|
||||
#undef Z_IDLE_HEIGHT
|
||||
@@ -1188,7 +1185,7 @@
|
||||
#elif HAS_DRIVER(A4988)
|
||||
#define MINIMUM_STEPPER_POST_DIR_DELAY 200
|
||||
#elif HAS_TRINAMIC_CONFIG || HAS_TRINAMIC_STANDALONE
|
||||
#define MINIMUM_STEPPER_POST_DIR_DELAY 100
|
||||
#define MINIMUM_STEPPER_POST_DIR_DELAY 70
|
||||
#else
|
||||
#define MINIMUM_STEPPER_POST_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire
|
||||
#endif
|
||||
@@ -1314,8 +1311,7 @@
|
||||
* currently HAL.h must be included ahead of pins.h.
|
||||
*/
|
||||
#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT)
|
||||
#if MB(MKS_MONSTER8_V1, BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, BTT_SKR_V3_0, BTT_SKR_V3_0_EZ, AQUILA_V101)
|
||||
|
||||
#if MB(MKS_MONSTER8_V1, BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
|
||||
#define LCD_SERIAL_PORT 1
|
||||
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
|
||||
#define LCD_SERIAL_PORT 2
|
||||
@@ -1341,7 +1337,7 @@
|
||||
#endif
|
||||
|
||||
// Input shaping
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#define HAS_ZV_SHAPING 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2814,7 +2814,7 @@
|
||||
#if PIN_EXISTS(DIGIPOTSS)
|
||||
#define HAS_MOTOR_CURRENT_SPI 1
|
||||
#endif
|
||||
#if ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_E0, MOTOR_CURRENT_PWM_E1)
|
||||
#if HAS_EXTRUDERS && PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
#define HAS_MOTOR_CURRENT_PWM_E 1
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM_E || ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K, MOTOR_CURRENT_PWM_U, MOTOR_CURRENT_PWM_V, MOTOR_CURRENT_PWM_W)
|
||||
@@ -2902,7 +2902,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)
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#include HAL_PATH(.., inc/Conditionals_type.h)
|
||||
|
||||
#include "Changes.h"
|
||||
#include "SanityCheck.h"
|
||||
#include HAL_PATH(.., inc/SanityCheck.h)
|
||||
|
||||
// Include all core headers
|
||||
#include "../core/language.h"
|
||||
@@ -63,8 +65,3 @@
|
||||
#endif
|
||||
|
||||
#include "../core/multi_language.h"
|
||||
|
||||
#ifndef __MARLIN_DEPS__
|
||||
#include "SanityCheck.h"
|
||||
#include HAL_PATH(.., inc/SanityCheck.h)
|
||||
#endif
|
||||
|
||||
@@ -388,8 +388,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
/**
|
||||
* Custom Boot and Status screens
|
||||
*/
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) && NONE(HAS_MARLINUI_HD44780, HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI)
|
||||
#error "SHOW_CUSTOM_BOOTSCREEN requires Character LCD, Graphical LCD, or TOUCH_UI_FTDI_EVE."
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) && NONE(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI)
|
||||
#error "SHOW_CUSTOM_BOOTSCREEN requires Graphical LCD or TOUCH_UI_FTDI_EVE."
|
||||
#elif ENABLED(SHOW_CUSTOM_BOOTSCREEN) && DISABLED(SHOW_BOOTSCREEN)
|
||||
#error "SHOW_CUSTOM_BOOTSCREEN requires SHOW_BOOTSCREEN."
|
||||
#elif ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && !HAS_MARLINUI_U8GLIB
|
||||
@@ -541,10 +541,71 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||
#error "You can't enable FIL_RUNOUT7_PULLUP and FIL_RUNOUT7_PULLDOWN at the same time."
|
||||
#elif ALL(FIL_RUNOUT8_PULLUP, FIL_RUNOUT8_PULLDOWN)
|
||||
#error "You can't enable FIL_RUNOUT8_PULLUP and FIL_RUNOUT8_PULLDOWN at the same time."
|
||||
#elif FILAMENT_RUNOUT_DISTANCE_MM < 0
|
||||
#error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero."
|
||||
#elif DISABLED(ADVANCED_PAUSE_FEATURE) && defined(FILAMENT_RUNOUT_SCRIPT)
|
||||
static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "FILAMENT_RUNOUT_SCRIPT cannot make use of M600 unless ADVANCED_PAUSE_FEATURE is enabled");
|
||||
#elif DISABLED(ADVANCED_PAUSE_FEATURE)
|
||||
static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR.");
|
||||
#elif defined(FIL_RUNOUT_ENABLED_DEFAULT)
|
||||
#error "FIL_RUNOUT_ENABLED_DEFAULT is now set with the FILAMENT_RUNOUT_ENABLED array."
|
||||
#elif defined(FILAMENT_RUNOUT_DISTANCE_MM)
|
||||
#error "FILAMENT_RUNOUT_DISTANCE_MM is now set with the FIL_RUNOUT_DISTANCE_MM array."
|
||||
#elif defined(FIL_RUNOUT_STATE) || defined(FIL_RUNOUT2_STATE) || defined(FIL_RUNOUT3_STATE) || defined(FIL_RUNOUT4_STATE) || defined(FIL_RUNOUT5_STATE) || defined(FIL_RUNOUT6_STATE) || defined(FIL_RUNOUT7_STATE) || defined(FIL_RUNOUT8_STATE)
|
||||
#ifdef FIL_RUNOUT_STATE
|
||||
#if FIL_RUNOUT_STATE
|
||||
#error "FIL_RUNOUT_STATE HIGH is now set with FIL_RUNOUT_MODE { 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT_STATE LOW is now set with FIL_RUNOUT_MODE { 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT2_STATE
|
||||
#if FIL_RUNOUT2_STATE
|
||||
#error "FIL_RUNOUT2_STATE HIGH is now set with FIL_RUNOUT_MODE { n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT2_STATE LOW is now set with FIL_RUNOUT_MODE { n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT3_STATE
|
||||
#if FIL_RUNOUT3_STATE
|
||||
#error "FIL_RUNOUT3_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT3_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT4_STATE
|
||||
#if FIL_RUNOUT4_STATE
|
||||
#error "FIL_RUNOUT4_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT4_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT5_STATE
|
||||
#if FIL_RUNOUT5_STATE
|
||||
#error "FIL_RUNOUT5_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT5_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT6_STATE
|
||||
#if FIL_RUNOUT6_STATE
|
||||
#error "FIL_RUNOUT6_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, n, n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT6_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT7_STATE
|
||||
#if FIL_RUNOUT7_STATE
|
||||
#error "FIL_RUNOUT7_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, n, n, n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT7_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, n, n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FIL_RUNOUT8_STATE
|
||||
#if FIL_RUNOUT8_STATE
|
||||
#error "FIL_RUNOUT8_STATE HIGH is now set with FIL_RUNOUT_MODE { n, n, n, n, n, n, n, 2 ... }."
|
||||
#else
|
||||
#error "FIL_RUNOUT8_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, n, n, n, n, 1 ... }."
|
||||
#endif
|
||||
#endif
|
||||
#elif ENABLED(FILAMENT_MOTION_SENSOR)
|
||||
#error "FILAMENT_MOTION_SENSOR is now set with FIL_RUNOUT_MODE { 7 ... }."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1536,18 +1597,17 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_BED_TRAMMING)
|
||||
#ifndef BED_TRAMMING_INSET_LFRB
|
||||
#error "LCD_BED_TRAMMING requires BED_TRAMMING_INSET_LFRB values."
|
||||
#elif ENABLED(BED_TRAMMING_USE_PROBE)
|
||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||
#if !HAS_BED_PROBE
|
||||
#error "BED_TRAMMING_USE_PROBE requires a real probe."
|
||||
#elif ENABLED(SENSORLESS_PROBING)
|
||||
#error "BED_TRAMMING_USE_PROBE is incompatible with SENSORLESS_PROBING."
|
||||
#endif
|
||||
#else
|
||||
#ifndef BED_TRAMMING_INSET_LFRB
|
||||
#error "LCD_BED_TRAMMING requires BED_TRAMMING_INSET_LFRB values."
|
||||
#endif
|
||||
#endif
|
||||
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0.");
|
||||
#elif ANY(DGUS_LCD_UI_RELOADED, DGUS_LCD_UI_E3S1PRO)
|
||||
#error "LCD_BED_TRAMMING is required for the selected display."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2647,7 +2707,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
||||
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \
|
||||
+ 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) \
|
||||
@@ -2703,28 +2763,6 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
||||
#undef IS_U8GLIB_SSD1306
|
||||
#undef IS_EXTUI
|
||||
|
||||
/**
|
||||
* Make sure LCD language settings are distinct
|
||||
*/
|
||||
#if NUM_LANGUAGES > 1
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_2), STRINGIFY(LCD_LANGUAGE)), "Error: LCD_LANGUAGE_2 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE.");
|
||||
#endif
|
||||
#if NUM_LANGUAGES > 2
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_3), STRINGIFY(LCD_LANGUAGE)), "Error: LCD_LANGUAGE_3 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_3), STRINGIFY(LCD_LANGUAGE_2)), "Error: LCD_LANGUAGE_3 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_2.");
|
||||
#endif
|
||||
#if NUM_LANGUAGES > 3
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_4), STRINGIFY(LCD_LANGUAGE)), "Error: LCD_LANGUAGE_4 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_4), STRINGIFY(LCD_LANGUAGE_2)), "Error: LCD_LANGUAGE_4 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_2.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_4), STRINGIFY(LCD_LANGUAGE_3)), "Error: LCD_LANGUAGE_4 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_3.");
|
||||
#endif
|
||||
#if NUM_LANGUAGES > 4
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_5), STRINGIFY(LCD_LANGUAGE)), "Error: LCD_LANGUAGE_5 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_5), STRINGIFY(LCD_LANGUAGE_2)), "Error: LCD_LANGUAGE_5 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_2.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_5), STRINGIFY(LCD_LANGUAGE_3)), "Error: LCD_LANGUAGE_5 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_3.");
|
||||
static_assert(strcmp(STRINGIFY(LCD_LANGUAGE_5), STRINGIFY(LCD_LANGUAGE_4)), "Error: LCD_LANGUAGE_5 (" STRINGIFY(LCD_LANGUAGE) ") cannot be the same as LCD_LANGUAGE_4.");
|
||||
#endif
|
||||
|
||||
#if ANY(TFT_GENERIC, MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, \
|
||||
TFT_TRONXY_X5SA, ANYCUBIC_TFT35, ANYCUBIC_TFT35, LONGER_LK_TFT28, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70, BTT_TFT35_SPI_V1_0)
|
||||
#if NONE(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
|
||||
@@ -3597,9 +3635,9 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
#error "LED_CONTROL_MENU requires an LCD controller that implements the menu."
|
||||
#endif
|
||||
|
||||
#if ENABLED(CUSTOM_MENU_MAIN) && NONE(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE, TFT_LVGL_UI)
|
||||
#error "CUSTOM_MENU_MAIN requires an LCD controller that implements the menu."
|
||||
#endif
|
||||
//#if ENABLED(CUSTOM_MENU_MAIN) && NONE(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE, TFT_LVGL_UI)
|
||||
//#error "CUSTOM_MENU_MAIN requires an LCD controller that implements the menu."
|
||||
//#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
|
||||
#error "CASE_LIGHT_USE_NEOPIXEL requires NEOPIXEL_LED."
|
||||
@@ -4208,12 +4246,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
*/
|
||||
#if HAS_ZV_SHAPING
|
||||
#if ENABLED(DELTA)
|
||||
#if !ALL(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#error "INPUT_SHAPING_X, INPUT_SHAPING_Y and INPUT_SHAPING_Z must all be enabled for DELTA."
|
||||
#else
|
||||
static_assert(SHAPING_FREQ_X == SHAPING_FREQ_Y && SHAPING_FREQ_Y == SHAPING_FREQ_Z, "SHAPING_FREQ_X, SHAPING_FREQ_Y and SHAPING_FREQ_Z must be the same for DELTA.");
|
||||
static_assert(SHAPING_ZETA_X == SHAPING_ZETA_Y && SHAPING_ZETA_Y == SHAPING_ZETA_Z, "SHAPING_ZETA_X, SHAPING_ZETA_Y and SHAPING_ZETA_Z must be the same for DELTA.");
|
||||
#endif
|
||||
#error "Input Shaping is not compatible with DELTA kinematics."
|
||||
#elif ENABLED(SCARA)
|
||||
#error "Input Shaping is not compatible with SCARA kinematics."
|
||||
#elif ENABLED(TPARA)
|
||||
@@ -4225,19 +4258,9 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
#elif ENABLED(DIRECT_STEPPING)
|
||||
#error "Input Shaping is not compatible with DIRECT_STEPPING."
|
||||
#elif ALL(INPUT_SHAPING_X, CORE_IS_XZ)
|
||||
#if !ALL(INPUT_SHAPING_X, INPUT_SHAPING_Z)
|
||||
#error "INPUT_SHAPING_X and INPUT_SHAPING_Z must both be enabled for COREXZ."
|
||||
#else
|
||||
static_assert(SHAPING_FREQ_X == SHAPING_FREQ_Z, "SHAPING_FREQ_X and SHAPING_FREQ_Z must be the same for COREXZ.");
|
||||
static_assert(SHAPING_ZETA_X == SHAPING_ZETA_Z, "SHAPING_ZETA_X and SHAPING_ZETA_Z must be the same for COREXZ.");
|
||||
#endif
|
||||
#error "INPUT_SHAPING_X is not supported with COREXZ."
|
||||
#elif ALL(INPUT_SHAPING_Y, CORE_IS_YZ)
|
||||
#if !ALL(INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#error "INPUT_SHAPING_Y and INPUT_SHAPING_Z must both be enabled for COREYZ."
|
||||
#else
|
||||
static_assert(SHAPING_FREQ_Y == SHAPING_FREQ_Z, "SHAPING_FREQ_Y and SHAPING_FREQ_Z must be the same for COREYZ.");
|
||||
static_assert(SHAPING_ZETA_Y == SHAPING_ZETA_Z, "SHAPING_ZETA_Y and SHAPING_ZETA_Z must be the same for COREYZ.");
|
||||
#endif
|
||||
#error "INPUT_SHAPING_Y is not supported with COREYZ."
|
||||
#elif ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
|
||||
#if !ALL(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#error "INPUT_SHAPING_X and INPUT_SHAPING_Y must both be enabled for COREXY, COREYX, or MARKFORGED_*."
|
||||
@@ -4252,7 +4275,6 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
#else
|
||||
TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
|
||||
TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
|
||||
TERN_(INPUT_SHAPING_Z, static_assert((SHAPING_FREQ_Z) > 0, "SHAPING_FREQ_Z must be > 0 or SHAPING_MIN_FREQ must be set."));
|
||||
#endif
|
||||
#ifdef __AVR__
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
@@ -4269,13 +4291,6 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||
static_assert((SHAPING_FREQ_Y) == 0 || (SHAPING_FREQ_Y) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Y is below the minimum (16) for AVR 16MHz.");
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Z)
|
||||
#if F_CPU > 16000000
|
||||
static_assert((SHAPING_FREQ_Z) == 0 || (SHAPING_FREQ_Z) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Z is below the minimum (20) for AVR 20MHz.");
|
||||
#else
|
||||
static_assert((SHAPING_FREQ_Z) == 0 || (SHAPING_FREQ_Z) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Z is below the minimum (16) for AVR 16MHz.");
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2024-05-29"
|
||||
#define STRING_DISTRIBUTION_DATE "2024-04-15"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
#warning "Warning! Don't use dummy thermistors (998/999) for final build!"
|
||||
#endif
|
||||
|
||||
#if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT, UNIT_TEST, NO_USER_FEEDBACK_WARNING)
|
||||
#warning "Your Configuration provides no method to acquire user feedback! (Define NO_USER_FEEDBACK_WARNING to suppress this warning.)"
|
||||
#if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT, UNIT_TEST)
|
||||
#warning "Your Configuration provides no method to acquire user feedback!"
|
||||
#endif
|
||||
|
||||
#if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && !TEMP_SENSOR_BOARD
|
||||
@@ -690,12 +690,8 @@
|
||||
#warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save."
|
||||
#endif
|
||||
|
||||
#if HOMING_Z_WITH_PROBE && IS_CARTESIAN && NONE(Z_SAFE_HOMING, NO_Z_SAFE_HOMING_WARNING)
|
||||
#error "Z_SAFE_HOMING is recommended when homing with a probe. (Enable Z_SAFE_HOMING or define NO_Z_SAFE_HOMING_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BIQU_MICROPROBE_V2) && NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, NO_MICROPROBE_WARNING)
|
||||
#warning "BIQU MicroProbe V2 detect signal requires a strong pull-up. Some processors have weak internal pull-up capabilities, so we recommended connecting MicroProbe SIGNAL / GND to Z-MIN / Z-STOP instead of the dedicated PROBE port. (Define NO_MICROPROBE_WARNING to suppress this warning.)"
|
||||
#if HOMING_Z_WITH_PROBE && IS_CARTESIAN && DISABLED(Z_SAFE_HOMING)
|
||||
#error "Z_SAFE_HOMING is recommended when homing with a probe. Enable Z_SAFE_HOMING or comment out this line to continue."
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -718,8 +714,8 @@
|
||||
#warning "Disabled CONFIGURATION_EMBEDDING because the target usually has less flash storage. Define FORCE_CONFIG_EMBED to override."
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX && DISABLED(NO_LCD_CONTRAST_WARNING)
|
||||
#warning "Contrast cannot be changed when LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX. (Define NO_LCD_CONTRAST_WARNING to suppress this warning.)"
|
||||
#if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX
|
||||
#warning "Contrast cannot be changed when LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX."
|
||||
#endif
|
||||
|
||||
#if PROGRESS_MSG_EXPIRE > 0 && HAS_STATUS_MESSAGE_TIMEOUT
|
||||
@@ -788,13 +784,8 @@
|
||||
/**
|
||||
* Input Shaping
|
||||
*/
|
||||
#if HAS_ZV_SHAPING
|
||||
#if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
|
||||
#warning "Input Shaping for CORE / MARKFORGED kinematic axes is still experimental."
|
||||
#endif
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#warning "Input Shaping has not been tested with I2S_STEPPER_STREAM."
|
||||
#endif
|
||||
#if HAS_ZV_SHAPING && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
|
||||
#warning "Input Shaping for CORE / MARKFORGED kinematic axes is still experimental."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -869,10 +860,3 @@
|
||||
#if DISABLED(EDITABLE_STEPS_PER_UNIT)
|
||||
#warning "EDITABLE_STEPS_PER_UNIT is required to enable G92 runtime configuration of steps-per-unit."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* HC32 clock speed is hard-coded in Marlin
|
||||
*/
|
||||
#if defined(ARDUINO_ARCH_HC32) && F_CPU == 200000000
|
||||
#warning "HC32 clock is assumed to be 200MHz. If this isn't the case for your board please submit a report so we can add support."
|
||||
#endif
|
||||
|
||||
@@ -331,24 +331,15 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS
|
||||
|
||||
#endif // HAS_MEDIA
|
||||
|
||||
switch (screen_charset) {
|
||||
|
||||
#if ENABLED(SHOW_BOOTSCREEN)
|
||||
case CHARSET_BOOT: {
|
||||
// Set boot screen corner characters
|
||||
for (uint8_t i = 4; i--;) createChar_P(i, corner[i]);
|
||||
} break;
|
||||
#endif
|
||||
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
|
||||
case CHARSET_BOOT_CUSTOM: {
|
||||
for (uint8_t i = COUNT(customBootChars); i--;)
|
||||
createChar_P(i, customBootChars[i]);
|
||||
} break;
|
||||
#endif
|
||||
|
||||
default: {
|
||||
// Info Screen uses 5 special characters
|
||||
#if ENABLED(SHOW_BOOTSCREEN)
|
||||
// Set boot screen corner characters
|
||||
if (screen_charset == CHARSET_BOOT) {
|
||||
for (uint8_t i = 4; i--;)
|
||||
createChar_P(i, corner[i]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ // Info Screen uses 5 special characters
|
||||
createChar_P(LCD_STR_BEDTEMP[0], bedTemp);
|
||||
createChar_P(LCD_STR_DEGREE[0], degree);
|
||||
createChar_P(LCD_STR_THERMOMETER[0], thermometer);
|
||||
@@ -370,9 +361,7 @@ void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARS
|
||||
createChar_P(LCD_STR_FOLDER[0], folder);
|
||||
#endif
|
||||
}
|
||||
} break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -411,42 +400,6 @@ bool MarlinUI::detected() {
|
||||
return TERN1(DETECT_I2C_LCD_DEVICE, lcd.LcdDetected() == 1);
|
||||
}
|
||||
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
|
||||
|
||||
#ifndef CUSTOM_BOOTSCREEN_X
|
||||
#define CUSTOM_BOOTSCREEN_X -1
|
||||
#endif
|
||||
#ifndef CUSTOM_BOOTSCREEN_Y
|
||||
#define CUSTOM_BOOTSCREEN_Y ((LCD_HEIGHT - COUNT(custom_boot_lines)) / 2)
|
||||
#endif
|
||||
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#endif
|
||||
|
||||
void MarlinUI::draw_custom_bootscreen(const uint8_t/*=0*/) {
|
||||
set_custom_characters(CHARSET_BOOT_CUSTOM);
|
||||
lcd.clear();
|
||||
const int8_t sx = CUSTOM_BOOTSCREEN_X;
|
||||
const uint8_t sy = CUSTOM_BOOTSCREEN_Y;
|
||||
for (lcd_uint_t i = 0; i < COUNT(custom_boot_lines); ++i) {
|
||||
PGM_P const pstr = (PGM_P)pgm_read_ptr(&custom_boot_lines[i]);
|
||||
const uint8_t clen = utf8_strlen_P(pstr);
|
||||
const lcd_uint_t x = sx >= 0 ? sx : (LCD_WIDTH - clen) / 2;
|
||||
for (lcd_uint_t j = 0; j < clen; ++j) {
|
||||
const lchar_t c = pgm_read_byte(&pstr[j]);
|
||||
lcd_put_lchar(x + j, sy + i, c == '\x08' ? '\x00' : c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shows the custom bootscreen and delays
|
||||
void MarlinUI::show_custom_bootscreen() {
|
||||
draw_custom_bootscreen();
|
||||
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
|
||||
}
|
||||
|
||||
#endif // SHOW_CUSTOM_BOOTSCREEN
|
||||
|
||||
#if HAS_SLOW_BUTTONS
|
||||
uint8_t MarlinUI::read_slow_buttons() {
|
||||
#if ENABLED(LCD_I2C_TYPE_MCP23017)
|
||||
@@ -513,8 +466,6 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
}
|
||||
|
||||
void MarlinUI::show_bootscreen() {
|
||||
TERN_(SHOW_CUSTOM_BOOTSCREEN, show_custom_bootscreen());
|
||||
|
||||
set_custom_characters(CHARSET_BOOT);
|
||||
lcd.clear();
|
||||
|
||||
@@ -709,6 +660,9 @@ FORCE_INLINE void _draw_bed_status(const bool blink) {
|
||||
lcd_put_u8str(F("K"));
|
||||
#else
|
||||
lcd_put_u8str(cutter_power2str(cutter.unitPower));
|
||||
#if CUTTER_UNIT_IS(PERCENT)
|
||||
lcd_put_u8str(F("%"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
lcd_put_u8str(F(" "));
|
||||
|
||||
@@ -27,20 +27,6 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
|
||||
|
||||
#include "../../../_Bootscreen.h"
|
||||
|
||||
#ifdef CUSTOM_BOOTSCREEN_Y
|
||||
#define CUSTOM_BOOT_LAST COUNT(custom_boot_lines) + CUSTOM_BOOTSCREEN_Y
|
||||
#else
|
||||
#define CUSTOM_BOOT_LAST COUNT(custom_boot_lines)
|
||||
#endif
|
||||
|
||||
static_assert(CUSTOM_BOOT_LAST <= LCD_HEIGHT, "custom_boot_lines (plus CUSTOM_BOOTSCREEN_Y) doesn't fit on the selected LCD.");
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_I2C_TYPE_PCF8575)
|
||||
|
||||
// NOTE: These are register-mapped pins on the PCF8575 controller, not Arduino pins.
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
|
||||
#define HAS_MARLINUI_ENCODER 1
|
||||
#define HAS_ENCODER_WHEEL 1
|
||||
#endif
|
||||
#if (HAS_MARLINUI_ENCODER || ANY_BUTTON(ENC, BACK, UP, DOWN, LEFT, RIGHT)) && DISABLED(TOUCH_UI_FTDI_EVE)
|
||||
#if (HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DOWN, LEFT, RIGHT)) && DISABLED(TOUCH_UI_FTDI_EVE)
|
||||
#define HAS_DIGITAL_BUTTONS 1
|
||||
#endif
|
||||
#if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
|
||||
|
||||
@@ -377,10 +377,10 @@ void MarlinUI::draw_kill_screen() {
|
||||
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
void MarlinUI::sleep_display(const bool sleep/*=true*/) {
|
||||
void MarlinUI::sleep_display(const bool sleep/*=true*/) {
|
||||
static bool asleep = false;
|
||||
if (asleep != sleep){
|
||||
sleep ? u8g.sleepOn() : u8g.sleepOff();
|
||||
sleep ? u8g.sleepOn() : u8g.sleepOff();
|
||||
asleep = sleep;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef ENCODER_PULSES_PER_STEP
|
||||
#define ENCODER_PULSES_PER_STEP 4
|
||||
#endif
|
||||
|
||||
EncoderRate encoderRate;
|
||||
|
||||
// TODO: Replace with ui.quick_feedback
|
||||
@@ -49,12 +53,32 @@ void Encoder_tick() {
|
||||
TERN_(HAS_BEEPER, if (ui.sound_on) buzzer.click(10));
|
||||
}
|
||||
|
||||
// Encoder initialization
|
||||
void encoderConfiguration() {
|
||||
#if BUTTON_EXISTS(EN1)
|
||||
SET_INPUT_PULLUP(BTN_EN1);
|
||||
#endif
|
||||
#if BUTTON_EXISTS(EN2)
|
||||
SET_INPUT_PULLUP(BTN_EN2);
|
||||
#endif
|
||||
#if BUTTON_EXISTS(ENC)
|
||||
SET_INPUT_PULLUP(BTN_ENC);
|
||||
#endif
|
||||
#if HAS_BEEPER
|
||||
SET_OUTPUT(BEEPER_PIN); // TODO: Use buzzer.h which already inits this
|
||||
#endif
|
||||
}
|
||||
|
||||
// Analyze encoder value and return state
|
||||
EncoderState encoderReceiveAnalyze() {
|
||||
const millis_t now = millis();
|
||||
static int8_t temp_diff = 0; // Cleared on each full step, as configured
|
||||
static uint8_t lastEncoderBits;
|
||||
uint8_t newbutton = 0;
|
||||
static signed char temp_diff = 0;
|
||||
|
||||
EncoderState temp_diffState = ENCODER_DIFF_NO;
|
||||
if (BUTTON_PRESSED(EN1)) newbutton |= EN_A;
|
||||
if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
|
||||
if (BUTTON_PRESSED(ENC)) {
|
||||
static millis_t next_click_update_ms;
|
||||
if (ELAPSED(now, next_click_update_ms)) {
|
||||
@@ -74,47 +98,71 @@ EncoderState encoderReceiveAnalyze() {
|
||||
}
|
||||
else return ENCODER_DIFF_NO;
|
||||
}
|
||||
if (newbutton != lastEncoderBits) {
|
||||
switch (newbutton) {
|
||||
case 0:
|
||||
if (lastEncoderBits == 1) temp_diff++;
|
||||
else if (lastEncoderBits == 2) temp_diff--;
|
||||
break;
|
||||
case 2:
|
||||
if (lastEncoderBits == 0) temp_diff++;
|
||||
else if (lastEncoderBits == 3) temp_diff--;
|
||||
break;
|
||||
case 3:
|
||||
if (lastEncoderBits == 2) temp_diff++;
|
||||
else if (lastEncoderBits == 1) temp_diff--;
|
||||
break;
|
||||
case 1:
|
||||
if (lastEncoderBits == 3) temp_diff++;
|
||||
else if (lastEncoderBits == 0) temp_diff--;
|
||||
break;
|
||||
}
|
||||
lastEncoderBits = newbutton;
|
||||
}
|
||||
|
||||
temp_diff += ui.get_encoder_delta();
|
||||
|
||||
const int8_t abs_diff = ABS(temp_diff);
|
||||
if (abs_diff >= ENCODER_PULSES_PER_STEP) {
|
||||
temp_diffState = temp_diff > 0
|
||||
? TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CCW, ENCODER_DIFF_CW)
|
||||
: TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CW, ENCODER_DIFF_CCW);
|
||||
|
||||
int32_t encoder_multiplier = 1;
|
||||
if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) {
|
||||
if (temp_diff > 0) temp_diffState = TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CCW, ENCODER_DIFF_CW);
|
||||
else temp_diffState = TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CW, ENCODER_DIFF_CCW);
|
||||
|
||||
#if ENABLED(ENCODER_RATE_MULTIPLIER)
|
||||
|
||||
const millis_t ms = millis();
|
||||
millis_t ms = millis();
|
||||
int32_t encoder_multiplier = 1;
|
||||
|
||||
// Encoder rate multiplier
|
||||
// if must encoder rati multiplier
|
||||
if (encoderRate.enabled) {
|
||||
// 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 = ((float(abs_diff) / float(ENCODER_PULSES_PER_STEP)) * 1000.0f) / float(ms - encoderRate.lastEncoderTime);
|
||||
const float abs_diff = ABS(temp_diff),
|
||||
encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP);
|
||||
if (encoderRate.lastEncoderTime) {
|
||||
// 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 (ENCODER_100X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_100X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 100;
|
||||
else if (ENCODER_10X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_10X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 10;
|
||||
else if (ENCODER_5X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_5X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 5;
|
||||
}
|
||||
encoderRate.lastEncoderTime = ms;
|
||||
if (ENCODER_100X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_100X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 100;
|
||||
else if (ENCODER_10X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_10X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 10;
|
||||
else if (ENCODER_5X_STEPS_PER_SEC > 0 && encoderStepRate >= ENCODER_5X_STEPS_PER_SEC)
|
||||
encoder_multiplier = 5;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
constexpr int32_t encoder_multiplier = 1;
|
||||
|
||||
#endif
|
||||
|
||||
encoderRate.encoderMoveValue = abs_diff * encoder_multiplier / (ENCODER_PULSES_PER_STEP);
|
||||
// encoderRate.encoderMoveValue += (temp_diff * encoder_multiplier) / (ENCODER_PULSES_PER_STEP);
|
||||
encoderRate.encoderMoveValue = (temp_diff * encoder_multiplier) / (ENCODER_PULSES_PER_STEP);
|
||||
if (encoderRate.encoderMoveValue < 0) encoderRate.encoderMoveValue = -encoderRate.encoderMoveValue;
|
||||
|
||||
temp_diff = 0;
|
||||
}
|
||||
|
||||
if (temp_diffState != ENCODER_DIFF_NO) {
|
||||
TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout());
|
||||
if (!ui.backlight) ui.refresh_brightness();
|
||||
}
|
||||
|
||||
return temp_diffState;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ typedef enum {
|
||||
|
||||
#define ENCODER_WAIT_MS TERN(DWIN_LCD_PROUI, 10, 20)
|
||||
|
||||
// Encoder initialization
|
||||
void encoderConfiguration();
|
||||
|
||||
// Analyze encoder value and return state
|
||||
EncoderState encoderReceiveAnalyze();
|
||||
|
||||
|
||||
@@ -2950,7 +2950,11 @@ void hmiControl() {
|
||||
void hmiLeveling() {
|
||||
popupWindowLeveling();
|
||||
dwinUpdateLCD();
|
||||
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
|
||||
|
||||
@@ -4068,8 +4072,8 @@ void hmiInit() {
|
||||
hmiSDCardInit();
|
||||
|
||||
for (uint16_t t = 0; t <= 100; t += 2) {
|
||||
dwinIconShow(ICON, ICON_Bar, 15, 260);
|
||||
dwinDrawRectangle(1, COLOR_BG_BLACK, 15 + t * 242 / 100, 260, 257, 280);
|
||||
dwinIconShow(ICON, ICON_Bar, 15, 450);
|
||||
dwinDrawRectangle(1, COLOR_BG_BLACK, 15 + t * 242 / 100, 450, 257, 470);
|
||||
dwinUpdateLCD();
|
||||
delay(20);
|
||||
}
|
||||
@@ -4078,6 +4082,7 @@ void hmiInit() {
|
||||
}
|
||||
|
||||
void dwinInitScreen() {
|
||||
encoderConfiguration();
|
||||
hmiInit();
|
||||
hmiSetLanguageCache();
|
||||
hmiStartFrame(true);
|
||||
|
||||
@@ -5143,6 +5143,7 @@ void MarlinUI::init_lcd() {
|
||||
if (dwinHandshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error.");
|
||||
dwinFrameSetDir(1); // Orientation 90°
|
||||
dwinUpdateLCD(); // Show bootscreen (first image)
|
||||
encoderConfiguration();
|
||||
for (uint16_t t = 0; t <= 100; t += 2) {
|
||||
dwinIconShow(ICON, ICON_Bar, 15, 260);
|
||||
dwinDrawRectangle(1, COLOR_BG_BLACK, 15 + t * 242 / 100, 260, 257, 280);
|
||||
|
||||
@@ -48,6 +48,7 @@ void dwinStartup() {
|
||||
dwinFrameClear(COLOR_BG_BLACK); // MarlinUI handles the bootscreen so just clear here
|
||||
dwinJPGShowAndCache(3);
|
||||
dwinUpdateLCD();
|
||||
dwinJPGShowAndCache(3);
|
||||
}
|
||||
|
||||
/*---------------------------------------- Picture related functions ----------------------------------------*/
|
||||
|
||||
@@ -108,8 +108,8 @@ void MarlinUI::clear_lcd() {
|
||||
#define INFO_CENTER ((LCD_PIXEL_WIDTH) - 200 / 2)
|
||||
#define VERSION_Y 84
|
||||
#endif
|
||||
|
||||
dwinDrawString(false, font10x20, COLOR_YELLOW, COLOR_BG_BLACK, INFO_CENTER - (dwin_string.length * 10) / 2, VERSION_Y, S(dwin_string.string()));
|
||||
dwinJPGShowAndCache(0); // Ensure DACAI stays on boot screen
|
||||
dwinDrawString(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();
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
/**
|
||||
* Bed Level Tools for Pro UI
|
||||
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.2.0
|
||||
* Date: 2023/05/03
|
||||
*
|
||||
* Based on the original work of: Henri-J-Norden
|
||||
* https://github.com/Jyers/Marlin/pull/126
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
/**
|
||||
* Bed Level Tools for Pro UI
|
||||
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.2.0
|
||||
* Date: 2023/05/03
|
||||
*
|
||||
* Based on the original work of: Henri-J-Norden
|
||||
* https://github.com/Jyers/Marlin/pull/126
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.25.3
|
||||
* Date: 2023/05/18
|
||||
*/
|
||||
@@ -38,7 +37,6 @@
|
||||
|
||||
#include "../../utf8.h"
|
||||
#include "../../marlinui.h"
|
||||
#include "../../extui/ui_api.h"
|
||||
#include "../../../MarlinCore.h"
|
||||
#include "../../../core/serial.h"
|
||||
#include "../../../core/macros.h"
|
||||
@@ -201,7 +199,7 @@ typedef struct {
|
||||
} select_t;
|
||||
select_t select_page{0}, select_print{0};
|
||||
|
||||
#if ENABLED(LCD_BED_TRAMMING)
|
||||
#if ENABLED(LCD_BED_TRAMMING) && DISABLED(BED_TRAMMING_USE_PROBE)
|
||||
constexpr float bed_tramming_inset_lfbr[] = BED_TRAMMING_INSET_LFRB;
|
||||
#endif
|
||||
|
||||
@@ -1313,7 +1311,7 @@ void eachMomentUpdate() {
|
||||
TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); })
|
||||
TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) { plot.update(thermalManager.wholeDegBed()); })
|
||||
TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PIDTEMPCHAMBER_START) { plot.update(thermalManager.wholeDegChamber()); })
|
||||
TERN_(MPCTEMP, if (hmiValue.tempControl == MPC_STARTED) { plot.update(thermalManager.wholeDegHotend(0)); })
|
||||
TERN_(MPCTEMP, if (hmiValue.tempControl == MPCTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); })
|
||||
if (hmiFlag.abort_flag || hmiFlag.pause_flag || print_job_timer.isPaused()) {
|
||||
hmiReturnScreen();
|
||||
}
|
||||
@@ -1568,7 +1566,7 @@ void dwinLevelingDone() {
|
||||
switch (hmiValue.tempControl) {
|
||||
default: return;
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
case MPC_STARTED:
|
||||
case MPCTEMP_START:
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_MPC_AUTOTUNE));
|
||||
DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius"));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE));
|
||||
@@ -1621,7 +1619,7 @@ void dwinLevelingDone() {
|
||||
|
||||
switch (result) {
|
||||
#if ENABLED(MPCTEMP)
|
||||
case MPC_STARTED:
|
||||
case MPCTEMP_START:
|
||||
#elif ENABLED(PIDTEMP)
|
||||
case PIDTEMP_START:
|
||||
#endif
|
||||
@@ -1657,7 +1655,7 @@ void dwinLevelingDone() {
|
||||
|
||||
void drawHPlot() {
|
||||
TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START));
|
||||
TERN_(MPCTEMP, dwinDrawPlot(MPC_STARTED));
|
||||
TERN_(MPCTEMP, dwinDrawPlot(MPCTEMP_START));
|
||||
}
|
||||
void drawBPlot() {
|
||||
TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START));
|
||||
@@ -1743,7 +1741,7 @@ void dwinLevelingDone() {
|
||||
void dwinMPCTuning(tempcontrol_t result) {
|
||||
hmiValue.tempControl = result;
|
||||
switch (result) {
|
||||
case MPC_STARTED:
|
||||
case MPCTEMP_START:
|
||||
hmiSaveProcessID(ID_MPCProcess);
|
||||
#if PROUI_TUNING_GRAPH
|
||||
dwinDrawPIDMPCPopup();
|
||||
@@ -1911,6 +1909,7 @@ void MarlinUI::init_lcd() {
|
||||
const bool hs = dwinHandshake(); UNUSED(hs);
|
||||
dwinFrameSetDir(1);
|
||||
dwinJPGCacheTo1(Language_English);
|
||||
encoderConfiguration();
|
||||
}
|
||||
|
||||
void dwinInitScreen() {
|
||||
@@ -2319,12 +2318,12 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
void setRunoutEnable() {
|
||||
runout.reset();
|
||||
toggleCheckboxLine(runout.enabled);
|
||||
runout.enabled[0] = !runout.enabled[0];
|
||||
Draw_Chkb_Line(CurrentMenu->line(), runout.enabled[0]);
|
||||
DWIN_UpdateLCD();
|
||||
}
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
void applyRunoutDistance() { runout.set_runout_distance(menuData.value / MINUNITMULT); }
|
||||
void setRunoutDistance() { setFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), applyRunoutDistance); }
|
||||
#endif
|
||||
void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); }
|
||||
void SetRunoutDistance() { SetFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), ApplyRunoutDistance); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
@@ -2389,6 +2388,11 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres
|
||||
#if ENABLED(LCD_BED_TRAMMING)
|
||||
|
||||
void tramXY(const uint8_t point, float &x, float &y) {
|
||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||
float bed_tramming_inset_lfbr[] = {X_MIN_BED + probe.min_x() + 0.01f, Y_MIN_BED + probe.min_y() + 0.01f,
|
||||
X_MAX_BED - probe.max_x() - 0.01f, Y_MAX_BED - probe.max_y() - 0.01f };
|
||||
#endif
|
||||
|
||||
switch (point) {
|
||||
case 0:
|
||||
LCD_MESSAGE(MSG_TRAM_FL);
|
||||
@@ -3146,7 +3150,7 @@ void drawControlMenu() {
|
||||
enableLiveCaseLightBrightness = true; // Allow live update of brightness in control menu
|
||||
MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawSubMenu, drawCaseLightMenu);
|
||||
#else
|
||||
EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on);
|
||||
MENU_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on);
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
@@ -3316,7 +3320,7 @@ void drawFilSetMenu() {
|
||||
if (SET_MENU(filSetMenu, MSG_FILAMENT_SET, 9)) {
|
||||
BACK_ITEM(drawAdvancedSettingsMenu);
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_SENSOR, onDrawChkbMenu, setRunoutEnable, &runout.enabled);
|
||||
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());
|
||||
@@ -3407,7 +3411,7 @@ void drawTuneMenu() {
|
||||
MENU_ITEM(ICON_FilMan, MSG_FILAMENTCHANGE, onDrawMenuItem, changeFilament);
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_SENSOR, onDrawChkbMenu, setRunoutEnable, &runout.enabled);
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, setRunoutEnable, &runout.enabled);
|
||||
#endif
|
||||
#if ENABLED(PROUI_ITEM_PLR)
|
||||
EDIT_ITEM(ICON_Pwrlossr, MSG_OUTAGE_RECOVERY, onDrawChkbMenu, setPwrLossr, &recovery.enabled);
|
||||
@@ -3478,16 +3482,9 @@ void drawTuneMenu() {
|
||||
void setShapingYZeta() { hmiValue.axis = Y_AXIS; setFloatOnClick(0, 1, 2, stepper.get_shaping_damping_ratio(Y_AXIS), applyShapingZeta); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(INPUT_SHAPING_Z)
|
||||
void onDrawShapingZFreq(MenuItem* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, stepper.get_shaping_frequency(Z_AXIS)); }
|
||||
void onDrawShapingZZeta(MenuItem* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, stepper.get_shaping_damping_ratio(Z_AXIS)); }
|
||||
void setShapingZFreq() { hmiValue.axis = Z_AXIS; setFloatOnClick(0, 200, 2, stepper.get_shaping_frequency(Z_AXIS), applyShapingFreq); }
|
||||
void setShapingZZeta() { hmiValue.axis = Z_AXIS; setFloatOnClick(0, 1, 2, stepper.get_shaping_damping_ratio(Z_AXIS), applyShapingZeta); }
|
||||
#endif
|
||||
|
||||
void drawInputShaping_menu() {
|
||||
checkkey = ID_Menu;
|
||||
if (SET_MENU(inputShapingMenu, MSG_INPUT_SHAPING, 1 PLUS_TERN0(INPUT_SHAPING_X, 2) PLUS_TERN0(INPUT_SHAPING_Y, 2) PLUS_TERN0(INPUT_SHAPING_Z, 2))) {
|
||||
if (SET_MENU(inputShapingMenu, MSG_INPUT_SHAPING, 5)) {
|
||||
BACK_ITEM(drawMotionMenu);
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
MENU_ITEM(ICON_ShapingX, MSG_SHAPING_A_FREQ, onDrawShapingXFreq, setShapingXFreq);
|
||||
@@ -3497,10 +3494,6 @@ void drawTuneMenu() {
|
||||
MENU_ITEM(ICON_ShapingY, MSG_SHAPING_B_FREQ, onDrawShapingYFreq, setShapingYFreq);
|
||||
MENU_ITEM(ICON_ShapingY, MSG_SHAPING_B_ZETA, onDrawShapingYZeta, setShapingYZeta);
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Z)
|
||||
MENU_ITEM(ICON_ShapingZ, MSG_SHAPING_C_FREQ, onDrawShapingZFreq, setShapingZFreq);
|
||||
MENU_ITEM(ICON_ShapingZ, MSG_SHAPING_C_ZETA, onDrawShapingZZeta, setShapingZZeta);
|
||||
#endif
|
||||
}
|
||||
updateMenu(inputShapingMenu);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.25.3
|
||||
* Date: 2023/05/18
|
||||
*/
|
||||
@@ -91,7 +90,7 @@ enum processID : uint8_t {
|
||||
PID_TUNING_TIMEOUT,
|
||||
#endif
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
MPC_STARTED,
|
||||
MPCTEMP_START,
|
||||
MPC_TEMP_ERROR,
|
||||
MPC_INTERRUPTED,
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN general defines and data structs for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.12.2
|
||||
* Date: 2022/08/08
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.12.1
|
||||
* Date: 2023/01/22
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.12.1
|
||||
* Date: 2023/01/22
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.11.1
|
||||
* Date: 2022/02/28
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.11.1
|
||||
* Date: 2022/02/28
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.21.1
|
||||
* Date: 2023/03/21
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Enhanced implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 3.21.1
|
||||
* Date: 2023/03/21
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* DWIN Endstops diagnostic page for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 1.4.3
|
||||
* Date: 2023/05/10
|
||||
*/
|
||||
@@ -86,7 +85,7 @@ void ESDiag::update() {
|
||||
TERN_(USE_X_MIN, ES_REPORT(X_MIN)); TERN_(USE_X_MAX, ES_REPORT(X_MAX));
|
||||
TERN_(USE_Y_MIN, ES_REPORT(Y_MIN)); TERN_(USE_Y_MAX, ES_REPORT(Y_MAX));
|
||||
TERN_(USE_Z_MIN, ES_REPORT(Z_MIN)); TERN_(USE_Z_MAX, ES_REPORT(Z_MAX));
|
||||
TERN_(HAS_FILAMENT_SENSOR, draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE));
|
||||
TERN_(HAS_FILAMENT_SENSOR, draw_es_state(READ(FIL_RUNOUT1_PIN) != runout.out_state());
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* DWIN End Stops diagnostic page for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 1.4.3
|
||||
* Date: 2023/05/10
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* Lock screen implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 2.3.2
|
||||
* Date: 2022/11/20
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* Lock screen implementation for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 2.3.2
|
||||
* Date: 2022/11/20
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* Mesh Viewer for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* version: 4.2.1
|
||||
* Date: 2023/05/05
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
/**
|
||||
* Mesh Viewer for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* version: 4.2.1
|
||||
* Date: 2023/05/05
|
||||
*/
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
|
||||
/**
|
||||
* Print Stats page for PRO UI
|
||||
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
|
||||
* https://github.com/mriscoc/Ender3V2S1
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 1.4.0
|
||||
* Date: 2022/12/03
|
||||
*/
|
||||
@@ -56,9 +55,9 @@ void PrintStats::draw() {
|
||||
DWINUI::drawString(MRG, 80, TS(GET_TEXT_F(MSG_INFO_PRINT_COUNT), F(": "), ps.totalPrints));
|
||||
DWINUI::drawString(MRG, 100, TS(GET_TEXT_F(MSG_INFO_COMPLETED_PRINTS), F(": "), ps.finishedPrints));
|
||||
duration_t(print_job_timer.getStats().printTime).toDigital(str, true);
|
||||
DWINUI::drawString(MRG, 120, TS(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str));
|
||||
DWINUI::drawString(MRG, 120, MString<50>(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str));
|
||||
duration_t(print_job_timer.getStats().longestPrint).toDigital(str, true);
|
||||
DWINUI::drawString(MRG, 140, TS(GET_TEXT_F(MSG_INFO_PRINT_LONGEST), F(": "), str));
|
||||
DWINUI::drawString(MRG, 140, MString<50>(GET_TEXT(MSG_INFO_PRINT_LONGEST), F(": "), str));
|
||||
DWINUI::drawString(MRG, 160, TS(GET_TEXT_F(MSG_INFO_PRINT_FILAMENT), F(": "), p_float_t(ps.filamentUsed / 1000, 2), F(" m")));
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user