Compare commits
1521 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1e187a5dd | |||
| 4072f5bfb7 | |||
| 2808b3be84 | |||
| 5a620276ae | |||
| 3331de15be | |||
| 16fd59f130 | |||
| 7d6c4bfa5e | |||
| 4d2c30e2a8 | |||
| b3e7af57ad | |||
| 9934d0e88c | |||
| 0904be9100 | |||
| 14fcaa02dc | |||
| f36ffdf741 | |||
| d594c81515 | |||
| d6f3615a84 | |||
| d9f899622f | |||
| 1999e89659 | |||
| a38f9c9dc9 | |||
| e189562dfe | |||
| 44337ce5a5 | |||
| 2b50fafc2a | |||
| ae025bcb67 | |||
| b128797198 | |||
| 0a301d5ea7 | |||
| a11e82f828 | |||
| 48b918ef2c | |||
| a85ba9ab3f | |||
| 335140e621 | |||
| 149c483db2 | |||
| b22a302a72 | |||
| 8972ae62c7 | |||
| edb3e840b1 | |||
| 03580ae173 | |||
| 4910c6256c | |||
| 0b3d8553ab | |||
| 092fb5dc09 | |||
| c6a30f7eef | |||
| e83ae2d3f3 | |||
| cb521c3f54 | |||
| 9930b72421 | |||
| 0dff845241 | |||
| e26c77a509 | |||
| 64372d6e03 | |||
| 5def332bf1 | |||
| 90adb07d7d | |||
| 6df3cf22ad | |||
| 2a9067b033 | |||
| 781c3140b5 | |||
| e3d852be66 | |||
| f98fbf637d | |||
| 0d2f7ff289 | |||
| 8136c0f82a | |||
| 6156173b82 | |||
| 96d2784564 | |||
| ff697a7c34 | |||
| ec21c8fc9e | |||
| 4d09457891 | |||
| 22571797d2 | |||
| 88b2a6004a | |||
| cbd5dda826 | |||
| 795c7fb0e0 | |||
| f6f04c0e10 | |||
| 37fb804933 | |||
| 6a8ecf3a69 | |||
| 688efa881f | |||
| d407c5a91a | |||
| 1b677713e9 | |||
| 4f337e8735 | |||
| 81e765e1e9 | |||
| 7410d24f1f | |||
| 694620dd67 | |||
| be805a8132 | |||
| 5400f6ecf8 | |||
| 8022669a04 | |||
| 66a55a5eb4 | |||
| 04fad1c5f4 | |||
| 6ca0865cad | |||
| a1a8d19a9d | |||
| e2ba0def50 | |||
| afd0b532ad | |||
| 1cb2de37de | |||
| fd94570a0d | |||
| b120adf8df | |||
| 1cfe6d7478 | |||
| a9b30acbe6 | |||
| b9e4ce3715 | |||
| 78410b210b | |||
| de0b872a24 | |||
| ae24f4f930 | |||
| f093ce35a0 | |||
| 7ee1ab4fd3 | |||
| bb352f9836 | |||
| 5c120222a4 | |||
| b3af5a1ac0 | |||
| 124cff0dbe | |||
| 9076a9314f | |||
| 40ce9d0299 | |||
| 20f1688376 | |||
| 59e8707a4f | |||
| 5735c8af5b | |||
| c97bf04166 | |||
| 156bd28160 | |||
| 1f991f07be | |||
| 675be8db7c | |||
| fcb19823db | |||
| e8779e7fe2 | |||
| ac5ff1d802 | |||
| 08e20dbbc6 | |||
| 1682036533 | |||
| 42180e25a3 | |||
| c6e4fbe162 | |||
| 65adea6240 | |||
| 888da29b61 | |||
| 50ff4cf157 | |||
| 12b9bbaa50 | |||
| b50afa9897 | |||
| a556a8c506 | |||
| ee7b6a5e68 | |||
| da9f3868d5 | |||
| 04183da302 | |||
| 0b9f99f940 | |||
| 5aff43e65e | |||
| 32b6a3ad12 | |||
| 94857b59c9 | |||
| 3c5f0ce858 | |||
| 0d7c559139 | |||
| 542baea2e1 | |||
| 33ddd4e929 | |||
| 96c1721eeb | |||
| 80c51ea572 | |||
| f71e65aa9c | |||
| 1025066ab1 | |||
| f4a7531ccb | |||
| 3e53754ccf | |||
| 99cbeb3806 | |||
| 751de314a4 | |||
| 689ae467f2 | |||
| b06fc3b539 | |||
| 3ca3268241 | |||
| 382aa96870 | |||
| 522ea178a4 | |||
| 2756a1d411 | |||
| 94b8eac6d0 | |||
| b4ddee8beb | |||
| f0494b4021 | |||
| ba8d03d241 | |||
| 37927f9274 | |||
| 81b9914704 | |||
| d86efae37c | |||
| 3550494db1 | |||
| 95d19cfcbf | |||
| e5e5c1513d | |||
| 083bfa3fe9 | |||
| 8f5d99a2ab | |||
| f748b1a1ce | |||
| e931bc7e72 | |||
| b95a1b94cb | |||
| 3bdca8730e | |||
| cb02b6ec60 | |||
| d70a4646f4 | |||
| 11bbcfd69e | |||
| d429d5a4ae | |||
| c6d99c772b | |||
| 8898eb20a6 | |||
| 53b6c74f0f | |||
| 5c90a5bbf5 | |||
| baae6ddfef | |||
| c941fe470b | |||
| 21f5ca6ad4 | |||
| ad3b95c8ea | |||
| 50cc55d172 | |||
| 3eb55016e4 | |||
| 51004e003d | |||
| 0764981aa1 | |||
| b19d8182c1 | |||
| 6b50a50676 | |||
| 29c9c723f8 | |||
| b49da0c4ba | |||
| 58bd2a5e81 | |||
| 6f176d1d64 | |||
| 38c97dc975 | |||
| d7ec13ce69 | |||
| 7e585cab83 | |||
| e76545c450 | |||
| 1894b981af | |||
| 61f9e28c23 | |||
| c6ecfc1429 | |||
| 4cc2bc1343 | |||
| dcb8af0518 | |||
| 4108382c2c | |||
| 0c1be965b6 | |||
| 6f87e4b4dc | |||
| c91b3142aa | |||
| df6becfb07 | |||
| 51aa9743a6 | |||
| e561ecb5a7 | |||
| 38ed5f5ee9 | |||
| 23618d9cd0 | |||
| 8cf6ef8411 | |||
| fa3c14fccf | |||
| 773d773baa | |||
| 5c186f7dd3 | |||
| 77b75ce86c | |||
| 6f156d01d9 | |||
| c0f6eebded | |||
| 6786101c64 | |||
| ee21f44969 | |||
| 090e08ef3d | |||
| b1990d3e39 | |||
| 20c027464e | |||
| d7c8491a07 | |||
| 2a18869b50 | |||
| 444b6d6d83 | |||
| f1dfc80332 | |||
| 6137b671fe | |||
| 0858670828 | |||
| 0ab3f7e985 | |||
| 022eb85937 | |||
| 31261d0c17 | |||
| 85d57f7a9e | |||
| 8a159dfec2 | |||
| d59ed4dce0 | |||
| 110e631656 | |||
| 9769d799df | |||
| a783caabac | |||
| b978153ca4 | |||
| 090d72f591 | |||
| e3c2d43b2b | |||
| 5274ab0ad5 | |||
| 59d9886473 | |||
| 6e30d1bef1 | |||
| db81a1d4a2 | |||
| 2edc13a0e2 | |||
| 8db9b800e7 | |||
| 21971f2f7a | |||
| b2265869b2 | |||
| f408863043 | |||
| 336131fb37 | |||
| 808d6f367b | |||
| 00d03c6dc5 | |||
| 4f660a18bc | |||
| e87ae5b643 | |||
| 73fe8ef4df | |||
| 157d28c418 | |||
| e143b1252f | |||
| 816fa9e2b4 | |||
| 661a38586b | |||
| 4d297dd562 | |||
| 56b5fb5e15 | |||
| 2205c7775b | |||
| b637b80a9a | |||
| 19440df4d0 | |||
| 6f8717ce12 | |||
| 6ec2cbce18 | |||
| f6bf247302 | |||
| 4b36a0a3dc | |||
| be0afd71df | |||
| 8e35029f10 | |||
| 0aa833fe6c | |||
| 08b09f7a4c | |||
| 151962baf2 | |||
| aca2bbbc50 | |||
| 211544b543 | |||
| 8e36d00ad0 | |||
| e596931aac | |||
| ed949cc5c1 | |||
| 53757444c5 | |||
| c46d47f45f | |||
| bc2fc86993 | |||
| 01e100360f | |||
| dba26a6d1f | |||
| 05fc3d7891 | |||
| 7ff70d7adb | |||
| a7e142460c | |||
| 9d2ef95f1d | |||
| de5f69b285 | |||
| 829281d016 | |||
| be098cd42f | |||
| 2dafc10da3 | |||
| 6444ef02e4 | |||
| ab5232c37b | |||
| 6b150bfc40 | |||
| 885ad70c8b | |||
| d37cfa327e | |||
| 040ebd1675 | |||
| 48fa0e6de0 | |||
| c9aa7486ce | |||
| 80b3f8c395 | |||
| 712b213b40 | |||
| 52750bf362 | |||
| 0afdec882c | |||
| 29b048810c | |||
| 0eb1830d85 | |||
| f5c980f9cf | |||
| d36e950547 | |||
| df75e9d692 | |||
| 86c3be7089 | |||
| 575b099e40 | |||
| 360166f626 | |||
| b5f1a4141c | |||
| 0401f4ce14 | |||
| 9f3b4d537d | |||
| deefd2defa | |||
| 1e31b56b0f | |||
| 86e58df324 | |||
| 3edf9904f4 | |||
| 8f461568e0 | |||
| e848bebb10 | |||
| f84f7e5a38 | |||
| 677bd19dbf | |||
| dc05d7fc2b | |||
| 2894d8b18e | |||
| bfdd14be4f | |||
| 941e9bd329 | |||
| e1f8c97b21 | |||
| 71c05f1b57 | |||
| 2c79faede9 | |||
| 94badcbace | |||
| 2746eb589e | |||
| f264228074 | |||
| 994fdb5179 | |||
| 1e41d157a3 | |||
| c57545ee08 | |||
| 647c04def8 | |||
| 9e987e4971 | |||
| ba55602462 | |||
| ec46336df7 | |||
| d57adbb88b | |||
| b24099c9d0 | |||
| 203d3f8f56 | |||
| d9e1cbebea | |||
| e5fbbbc068 | |||
| 4eddcf9142 | |||
| bc01200495 | |||
| c95e3e3bcb | |||
| 105c81217c | |||
| 3911c38d5e | |||
| 80adb124f7 | |||
| 8e783e24e8 | |||
| 8a19bc0c0e | |||
| 312bebff9a | |||
| 4995e0ebfa | |||
| 84bbd018ab | |||
| a03502080e | |||
| 72776f647b | |||
| 4eb4476ce6 | |||
| a66ae52234 | |||
| 68b9503b96 | |||
| cf4e2e507f | |||
| af3500044a | |||
| 5793ca42b5 | |||
| 07b1ac06a9 | |||
| bba2a3b906 | |||
| 80c70f33eb | |||
| d16f443d33 | |||
| f7de05e50c | |||
| c8b2fbd91e | |||
| aef23c9637 | |||
| 7cf2788cc3 | |||
| c294613b53 | |||
| 4dc4d348d4 | |||
| 6146126b2a | |||
| 5492f15633 | |||
| 4d1df2e357 | |||
| 954f03b6a8 | |||
| a560c0f7cd | |||
| ec30e8c9ef | |||
| bc0e977229 | |||
| 1993365967 | |||
| c2ba9a03ee | |||
| 7b2ea8febe | |||
| e38307355e | |||
| 5c81ce2bb8 | |||
| 7f8984b500 | |||
| 062b955f1d | |||
| ccb2a95456 | |||
| 00165699e9 | |||
| cc4148e246 | |||
| dc98ee553f | |||
| 738a8495ad | |||
| 17b4ba7c9c | |||
| 96c54c188a | |||
| e63cb5fe8f | |||
| 4dad8628ff | |||
| 009fd186f8 | |||
| 8c7e98627f | |||
| 656c3c3b2a | |||
| 9ec8762497 | |||
| 39d63b800c | |||
| 33b18dc801 | |||
| 0aa100a31e | |||
| 879b54a8bc | |||
| d1256be7ec | |||
| eb6f44372e | |||
| b0abce5a7e | |||
| 72df10c669 | |||
| b8f1b74abd | |||
| e8fc0e9a57 | |||
| 4b5a42f86a | |||
| 83c83e3127 | |||
| 5ce64f6d16 | |||
| c05c5d96d9 | |||
| cce80fd41c | |||
| 1b79217fbc | |||
| 192507b524 | |||
| 0d13c5d077 | |||
| fd3e243989 | |||
| 12b697c5cd | |||
| 03676d8e2f | |||
| ea6f5e20a6 | |||
| 3c6d2d7711 | |||
| a9392c6b27 | |||
| fa12866de3 | |||
| 9508f9ec75 | |||
| beb7e2ed93 | |||
| f24cdf1081 | |||
| 61be06ef70 | |||
| ba1c2a9819 | |||
| e5e3c3ff35 | |||
| 9c667b5436 | |||
| de8fbdea6d | |||
| 282170a259 | |||
| 31980f01ba | |||
| dcd2fa9291 | |||
| 967d1034d9 | |||
| 179de4423d | |||
| d11ed30584 | |||
| 1381b5d57d | |||
| 63d6dddae1 | |||
| e5d69d313c | |||
| f177da45bb | |||
| 5a1ba9c32f | |||
| dc40b3ec00 | |||
| e7d519c898 | |||
| 2bf1bbf399 | |||
| 2d0d5eccd8 | |||
| 1f77930e01 | |||
| 1ed1882766 | |||
| 4dd612a68d | |||
| dc733192be | |||
| fb9de6e787 | |||
| b935bc948a | |||
| ecddd2a655 | |||
| fa998178e9 | |||
| ed605e77fa | |||
| 73aa7ffff9 | |||
| 50ad30259f | |||
| 8139154243 | |||
| fa3492fc6e | |||
| 536fa07ed5 | |||
| 828dea2ee0 | |||
| 3bae28a5e1 | |||
| 70e9c07b2d | |||
| 55ec7d43ef | |||
| 0b016c08c9 | |||
| 890a396a2a | |||
| b01f10dfac | |||
| f0d8d76f68 | |||
| bc08ce86be | |||
| 081ab35e82 | |||
| eacb8346af | |||
| d77be210c1 | |||
| e98288ecab | |||
| cfc41e5587 | |||
| 36a94ac586 | |||
| 5ad60d89a8 | |||
| bdfeb54a9d | |||
| 1f488292cd | |||
| b6fa55aa37 | |||
| 7450b7c36e | |||
| 3cdd2591ed | |||
| 699b5f5b30 | |||
| 4a30fe1a44 | |||
| 63b13588a8 | |||
| cd4c35c543 | |||
| b86125c6d6 | |||
| 432b72e7a8 | |||
| a6326d25fb | |||
| de26374746 | |||
| d25f0a5a21 | |||
| 951b65c2de | |||
| f7b44ac2a6 | |||
| 803c3169ad | |||
| f151bf8bb7 | |||
| 198b059b44 | |||
| a18d6171a6 | |||
| 8af3c04e7d | |||
| c5fd486e91 | |||
| 03da376104 | |||
| 897170294c | |||
| 2bde53bd46 | |||
| 1eb3364ac9 | |||
| ce5c848284 | |||
| 114e9b0f56 | |||
| 3f56bd91d2 | |||
| ddfddae4f4 | |||
| c776cda9fa | |||
| 9d7a1ae9f5 | |||
| 97a35dd534 | |||
| e3e51a9a8d | |||
| d0720a565f | |||
| 72d5029f42 | |||
| aa380aeb4b | |||
| 1617798287 | |||
| 8f6a5d538f | |||
| c1a1f80fff | |||
| 8488d64062 | |||
| 0977226a4b | |||
| 7dab8ca5dc | |||
| d0c8aabd28 | |||
| 8c22f9fd4f | |||
| 2e3d74f60f | |||
| 2a1162b42c | |||
| 9e3025e07b | |||
| 5299b577d1 | |||
| 47619e4476 | |||
| 6845f17fb2 | |||
| 2aaa1a5815 | |||
| f36da47b85 | |||
| 03da273ea6 | |||
| 1c1d444b0c | |||
| 742733d714 | |||
| 235d024505 | |||
| 921001f004 | |||
| 0d9d11a2d5 | |||
| 113a5fa80e | |||
| 4ea058260b | |||
| 9c65890644 | |||
| e41b2274b0 | |||
| 85162da0df | |||
| d55aaf95e8 | |||
| d6c416bb22 | |||
| 5f6a8588c5 | |||
| 1c95c13224 | |||
| 967076b080 | |||
| 855b188102 | |||
| a1d4835404 | |||
| 6759be43ea | |||
| 6e0001b4f8 | |||
| 84f0ce4751 | |||
| d9e2acd1b2 | |||
| e8f9473be2 | |||
| 126a80ea83 | |||
| aa635fe9f1 | |||
| d473456a08 | |||
| 7761812532 | |||
| 18881e6725 | |||
| 1d78bdac82 | |||
| e1fc89c83f | |||
| 35800eec02 | |||
| 83e093f5cc | |||
| 2b7e5c8e6c | |||
| 3c2f735fb8 | |||
| e3370d097a | |||
| f39b28b6a9 | |||
| b1ec140f0b | |||
| 6e932f979d | |||
| d3dea2e091 | |||
| cc8711419e | |||
| c04f8e8c9d | |||
| 4813938a87 | |||
| 971732b9f6 | |||
| 1997640e41 | |||
| b45a277c52 | |||
| 016bd86c28 | |||
| fc709c28b5 | |||
| 65d69e9507 | |||
| 28e7562e7a | |||
| 2e5a6243df | |||
| d413781b98 | |||
| 50d38e7d03 | |||
| 80784c4d11 | |||
| 8761cb0464 | |||
| aceadabe89 | |||
| 3a1fedaee6 | |||
| a1f0d9d349 | |||
| c67cefd913 | |||
| c71f542d61 | |||
| fe5ba25a00 | |||
| 4ae9afcc56 | |||
| c3ff130127 | |||
| fbf8819253 | |||
| a7ebbe6dcd | |||
| 49909d3cd1 | |||
| ada40af5d6 | |||
| ec045f39aa | |||
| ba4a17f251 | |||
| 12628d43ce | |||
| 023d21a1cf | |||
| a8a64f19f4 | |||
| 529e6ed1ea | |||
| acb4dba7cd | |||
| f508bdded4 | |||
| 20f8c9b950 | |||
| d7e2e655ca | |||
| 15204bd5e9 | |||
| 2ec90d2162 | |||
| b56c6b9e13 | |||
| e4b27c2401 | |||
| 1647db8fad | |||
| c8d3069580 | |||
| b7e245036b | |||
| 66370006bb | |||
| 3fcd131f46 | |||
| 0e7999915d | |||
| e301e28e45 | |||
| 6e4a7e2dcb | |||
| 8fbba6abd9 | |||
| e2fef4df6f | |||
| c93dab2307 | |||
| d89a61bd51 | |||
| 2683b2636b | |||
| 7cb3640ea4 | |||
| dc85b604bb | |||
| aa3292cc57 | |||
| 7e17a2cfd0 | |||
| 0acaaf536d | |||
| 30b08e218d | |||
| 7babfbbcb2 | |||
| 2e7a754ac1 | |||
| 61f3051982 | |||
| 69a5e0c136 | |||
| 73419681dc | |||
| bb155ed38e | |||
| 7aad82cccd | |||
| 18aa682954 | |||
| 5e72729c67 | |||
| 6f1afb411a | |||
| 016171d682 | |||
| f6a73bbd84 | |||
| baaf79b755 | |||
| 2aafc5b7b0 | |||
| 7145731844 | |||
| 1e00ba5433 | |||
| abda89437d | |||
| d6d01f1f8e | |||
| 5a39afb81b | |||
| 8f4c564b04 | |||
| 017e0e6951 | |||
| 7ee87dc2db | |||
| 3a3228ef1b | |||
| 5a53e4d921 | |||
| 8979990805 | |||
| 4e276c6e00 | |||
| 96bcf08477 | |||
| 68cc5c72fd | |||
| 06dff0b7ec | |||
| c4dbedd5b6 | |||
| 9727e5e3d6 | |||
| ad323d852e | |||
| 4300547c66 | |||
| f61ff9c813 | |||
| 55071749b7 | |||
| 9dd8a49f82 | |||
| 36ba754842 | |||
| 169515404d | |||
| 3e838bf6b6 | |||
| b81980a439 | |||
| 98e7b821b4 | |||
| 03f27a5e41 | |||
| cffbb146ea | |||
| 1ddbdd0321 | |||
| 4f04f4e6b8 | |||
| c1a3ec1228 | |||
| bdbd15e6d9 | |||
| 5c2cb60f03 | |||
| f8a8711075 | |||
| b509567567 | |||
| 2c6c9e90df | |||
| 8438a57910 | |||
| a471cd26e1 | |||
| f089bbbc93 | |||
| f3a09768e8 | |||
| 9509568b7e | |||
| 252ae1b52d | |||
| 3137df9ad4 | |||
| 42866db251 | |||
| 50582e3b47 | |||
| 0c6c96bb60 | |||
| 3621f21fb2 | |||
| 3d346f8398 | |||
| 41785a10dd | |||
| ca76c3df7a | |||
| c4f1a191c3 | |||
| 967bf41080 | |||
| 1e4482df54 | |||
| 254417e8b0 | |||
| 80946a17ee | |||
| 1dc6d50dca | |||
| b86dfd35ae | |||
| 6dbeca94b3 | |||
| 527d260581 | |||
| ae2476dfdb | |||
| 91eaa54ea9 | |||
| 1352acdf75 | |||
| 123c6c5d34 | |||
| df320209c3 | |||
| 8da92b6823 | |||
| b708bcf8b1 | |||
| 7b3e28fc77 | |||
| 873fb84d27 | |||
| 7d8f49f82c | |||
| 587e6b7c8d | |||
| f1958ac060 | |||
| 4d2355cc9e | |||
| 0f6f05441b | |||
| ca58084020 | |||
| 89a9aa931f | |||
| e9d374dd54 | |||
| 21bfbb9d44 | |||
| 5054c53901 | |||
| 56d5c5b97a | |||
| ad70d76faa | |||
| 8f787cc474 | |||
| 499248c5ef | |||
| 6e86c9d22b | |||
| 9c3a562208 | |||
| d00eb4da5c | |||
| 5b4e39a429 | |||
| b11e78f5f7 | |||
| 3bdd7b1ed3 | |||
| 14b7c8cf51 | |||
| 68cff5f245 | |||
| 652162777b | |||
| 923f17328f | |||
| f4076fe99d | |||
| 6445859270 | |||
| 4661451d32 | |||
| 22e688460f | |||
| 8bccd0ef5b | |||
| f4639fa964 | |||
| 0a10d010b7 | |||
| 7a056a4e09 | |||
| 33c459c1d6 | |||
| 65c2f3bb65 | |||
| ec9a5b7157 | |||
| 31920a5285 | |||
| b78cccad0f | |||
| 36a1d12238 | |||
| 79183f7620 | |||
| b0f148f7db | |||
| bc4fa3984b | |||
| d60e5c89d8 | |||
| 57d68e0d01 | |||
| 908d487212 | |||
| a855d01336 | |||
| d5ad51821c | |||
| 59b5800e58 | |||
| 1b84807eb0 | |||
| 3ab4736ac9 | |||
| d8aa40eedf | |||
| 2177c246d5 | |||
| e5c6448063 | |||
| f447668387 | |||
| d4ab383a1b | |||
| 87c254b238 | |||
| cc9165cb99 | |||
| df5c06ab7b | |||
| b2dcb75c6c | |||
| 074f191bc3 | |||
| 2bda584fc6 | |||
| b818543045 | |||
| 3175266681 | |||
| 1ae40abb09 | |||
| 1cea0b6f70 | |||
| 5c6061ea5a | |||
| 6799aa9806 | |||
| 049898fa30 | |||
| a29ca4947e | |||
| feb6014e92 | |||
| c7ae531e35 | |||
| c373afbddd | |||
| c970869d74 | |||
| 74873f377d | |||
| e8687e5b9e | |||
| 198498b1aa | |||
| 0527090a31 | |||
| dff96a8952 | |||
| 3d9f360b5a | |||
| b0bfa65be7 | |||
| c8ac3a2a72 | |||
| 957bb3124a | |||
| 1f37781bf1 | |||
| 7b62670987 | |||
| 7b5a4f71be | |||
| 94a9cd6477 | |||
| 0cfcc7cbf5 | |||
| 292755258a | |||
| 02e2ace199 | |||
| 4a40cf268d | |||
| 428fbe8228 | |||
| 81a12b2fac | |||
| fb636db61a | |||
| 369f1a64d8 | |||
| 6ed2840615 | |||
| eb3a05c437 | |||
| d29a0d64d5 | |||
| 09ad00b2d1 | |||
| f8192f6e46 | |||
| f360b3b849 | |||
| 6253560ffa | |||
| 74c23bf80d | |||
| 8d14ff1446 | |||
| 2814103458 | |||
| 21a631dd4e | |||
| d0e61d82c0 | |||
| 0edf5a2ab5 | |||
| 597d94bd3a | |||
| 73565728c7 | |||
| 3b53c5ada1 | |||
| cbdbeb3e69 | |||
| 80c1afde0f | |||
| c11665e92f | |||
| 333bd8f394 | |||
| e668e053c2 | |||
| ba9aa47260 | |||
| deda3d3a3c | |||
| ec028faa1b | |||
| 06adef7343 | |||
| 69c993092b | |||
| d25487dfb9 | |||
| f3f26f7cb3 | |||
| 90125ab639 | |||
| a16ae30a61 | |||
| 175207659a | |||
| 5129eb1d43 | |||
| 8f08e029d8 | |||
| 5c6c12dc3a | |||
| 734fa91e63 | |||
| 1d5eba4470 | |||
| 758d9db964 | |||
| 1d8b03964f | |||
| 4fa0937a55 | |||
| 82dc89bfd2 | |||
| a0bd811093 | |||
| c1d6d24b9d | |||
| e2871f0dcd | |||
| 4393c3ef7f | |||
| 59d48b9b1f | |||
| e8b1bbac83 | |||
| 885200f833 | |||
| 044938bfd0 | |||
| ab7fb5b2e3 | |||
| 3df0d62725 | |||
| d1ce0bc071 | |||
| 9714c9aebe | |||
| 2fcef3e8e2 | |||
| d7651ea0d0 | |||
| dd55c98139 | |||
| bb5ba482bc | |||
| 5903b002ac | |||
| 97b6eabe0c | |||
| 1326eb4ef7 | |||
| 0eee55c0dd | |||
| f8dee4e726 | |||
| 2c3bdfe2ea | |||
| ffeb4495fe | |||
| be555e3578 | |||
| eec97a5cf1 | |||
| fa3709451b | |||
| eaa6257baf | |||
| f2fd9ab1b0 | |||
| b5e98ac1b7 | |||
| b83c49befb | |||
| 4cb35a285b | |||
| 0b5b2a424c | |||
| 0868907359 | |||
| 670df2ea6d | |||
| 0970dbcdf3 | |||
| fbda8a2e2b | |||
| 3d34dddbc0 | |||
| 3b3b7e09ec | |||
| 5d26f88bd5 | |||
| 51977c64ee | |||
| 42216f52ab | |||
| 760c4e94d5 | |||
| a4e0fd7883 | |||
| 2287fa126c | |||
| fd4f49512d | |||
| 7d8acb8def | |||
| e7bf7e6031 | |||
| 518d9beb83 | |||
| 2ed4d4a30a | |||
| d2dc7a53c2 | |||
| 80cc860810 | |||
| 39289a6952 | |||
| 1761cacaa1 | |||
| f33b405152 | |||
| aec65112b5 | |||
| cce91eef61 | |||
| 46a839cbca | |||
| c5e31b1723 | |||
| 20d55e5fed | |||
| 01e3ccfd69 | |||
| 36541d61ab | |||
| a436e89b83 | |||
| faf7dda9d3 | |||
| d3139e47f8 | |||
| c893a90d64 | |||
| 586d50ff99 | |||
| ba9879f8fa | |||
| 3cd48db9a9 | |||
| 454a8ae26a | |||
| 9de9e37539 | |||
| 949191215b | |||
| decf844788 | |||
| 642dec3625 | |||
| 8e82dd0b5b | |||
| 5f13e2e336 | |||
| 4153d76810 | |||
| a66811a597 | |||
| 839dd66c3b | |||
| 7a8c132ee9 | |||
| 1e18d716c2 | |||
| 81193e9338 | |||
| d1cad5afa4 | |||
| 2a535bdce8 | |||
| 52244f690e | |||
| eaf681675a | |||
| 2385c06696 | |||
| 81e0f5bc7d | |||
| 18e277d9d3 | |||
| 025a4558fb | |||
| 85ca7fed93 | |||
| 7637eb863a | |||
| f9b7659b56 | |||
| 6195f7810a | |||
| ecba9b6738 | |||
| 93e3b3d5ba | |||
| 417bdb0488 | |||
| 8ea3b29c17 | |||
| 81f1001b2c | |||
| 99f98890c2 | |||
| 5f0026893f | |||
| 4f943a73bc | |||
| e31923be8d | |||
| 395235a529 | |||
| 55848a4bd8 | |||
| 19e768d43d | |||
| 3c7cdcdc22 | |||
| e0d487e339 | |||
| defff1e4a8 | |||
| 05a6d48753 | |||
| b12eb33feb | |||
| 00749d8ef0 | |||
| 59d047c1d7 | |||
| fb6b62a01b | |||
| 1bb5791e64 | |||
| e47316c9d3 | |||
| 88c0688961 | |||
| aa9cad0cc6 | |||
| 0950527437 | |||
| b7306ef07f | |||
| 0fc3fea8df | |||
| b5677907d0 | |||
| 6f40d57e14 | |||
| 2aaf66b789 | |||
| fdd85a529a | |||
| 477e36afab | |||
| 1068798465 | |||
| 4f375cd17d | |||
| 98159c0507 | |||
| ea345b1db7 | |||
| 51a0f7aaba | |||
| ab7f1a0608 | |||
| 201bbaacfc | |||
| 3929deed10 | |||
| 435981056e | |||
| e6f46f3832 | |||
| 1aea024589 | |||
| ce6a691999 | |||
| 10d73155b0 | |||
| 4b1b02a17d | |||
| f0bca012a5 | |||
| 56d355f8de | |||
| f5fc851925 | |||
| 7378905053 | |||
| 76b0df6ba1 | |||
| df8420aa62 | |||
| 72a047d549 | |||
| 3a511e4583 | |||
| e8d3ea803d | |||
| c5a4230a6a | |||
| 5249765508 | |||
| fdf83f1416 | |||
| e1b998e40a | |||
| 4277fcb32c | |||
| 9a4af6bd7c | |||
| 59265034ae | |||
| 0ac0324af2 | |||
| f38f2ace5a | |||
| b10831d58e | |||
| 817eb5a5ba | |||
| f36f91dfb5 | |||
| 172ea8c71c | |||
| da9748fb21 | |||
| be58e137c5 | |||
| 8519451161 | |||
| 7c1adff8ad | |||
| eca1509cb2 | |||
| 17b05c150c | |||
| bdf69db0a8 | |||
| ba48ce8586 | |||
| 5cce532a29 | |||
| a20eacaa48 | |||
| 4f042533a5 | |||
| 6e8da93c42 | |||
| bb33a26e62 | |||
| da2eaa6b09 | |||
| 8244284116 | |||
| db204c13f2 | |||
| 08d9aeff41 | |||
| aa1b4eded6 | |||
| 684692091e | |||
| ccca1ade2d | |||
| dc9e469c4c | |||
| ec028bf747 | |||
| 009920f393 | |||
| 666d95285b | |||
| b692d91ca3 | |||
| f4c31565bc | |||
| cf0604da07 | |||
| 55acb65e27 | |||
| 4f465c2d07 | |||
| 77519e9f14 | |||
| 22baf3356a | |||
| 360c553228 | |||
| b4d69527e6 | |||
| 4aba382b01 | |||
| 2c445743e9 | |||
| 6f38814541 | |||
| 7251850028 | |||
| 6eb268f63f | |||
| ae547c3044 | |||
| 23dd2cb6e7 | |||
| 8385cddd8d | |||
| ab5133514c | |||
| 75eb93140f | |||
| 8be7a0b131 | |||
| cd6468d6de | |||
| 822254291f | |||
| e29bf84f06 | |||
| 44800e9899 | |||
| 6e85c060a9 | |||
| 7c6d33b0d2 | |||
| 86b65e52c4 | |||
| 6310a00d7e | |||
| 6b93d20e4e | |||
| 909fac6d90 | |||
| 6c328ec096 | |||
| 1951d3a37a | |||
| aa7236e03c | |||
| 574153a810 | |||
| 3b30cc90f1 | |||
| f30b774f26 | |||
| 1063b3b2b8 | |||
| 93560836de | |||
| ff26b7446c | |||
| 7b6ad28a5d | |||
| 5d01a2f467 | |||
| 6e197d4a42 | |||
| a5b20fec2f | |||
| 348e989a50 | |||
| b19846aca1 | |||
| d951ba83e6 | |||
| 203a445bc1 | |||
| 9edefa645d | |||
| 4608e1f590 | |||
| 794f8f1329 | |||
| b1f3dfab28 | |||
| 2d6c84a817 | |||
| 23291a0466 | |||
| 83a1a70103 | |||
| 47f6fc1e07 | |||
| 88b34d2bb6 | |||
| f36fdc74ac | |||
| ff258d43e7 | |||
| d8ef6faa80 | |||
| 59eb77fd28 | |||
| dde0e9ee0a | |||
| 860d98a897 | |||
| 3abd307691 | |||
| 000818f5e4 | |||
| 1bbf55a7f7 | |||
| 298a357a43 | |||
| 44d2c5ef88 | |||
| 1600f7d4ee | |||
| 71a4c04dd5 | |||
| 0eef0ff0de | |||
| 1d0ee83e18 | |||
| db8631e49a | |||
| 2e295759f2 | |||
| d8582b7506 | |||
| 7f656b867f | |||
| 077fed1d88 | |||
| 152c5d2616 | |||
| 26c5bbc5a7 | |||
| 344e6b857a | |||
| 81e52138cc | |||
| a27a9b63e4 | |||
| 8b7c274db5 | |||
| 7bed539fdb | |||
| e990fd23f1 | |||
| 172ce67344 | |||
| a8d83aec89 | |||
| 38e5883d44 | |||
| e7c6abd767 | |||
| 9f7405b3f0 | |||
| d3f8111fe7 | |||
| ab43113f73 | |||
| d1a807fdf8 | |||
| 8df42a84a4 | |||
| 8f462b5717 | |||
| ace3e50898 | |||
| 68c1f05aeb | |||
| 1f770bb103 | |||
| e25567a5dd | |||
| 9951f28892 | |||
| 83ab68b36f | |||
| 80929c2637 | |||
| d786fb99e2 | |||
| a0fc5f7b52 | |||
| a6d39b7192 | |||
| ea87cd975d | |||
| 417a82fd95 | |||
| b781f76711 | |||
| 228d6050a4 | |||
| fd50f452ff | |||
| 6eedb64777 | |||
| 46776de90b | |||
| dfcef11bca | |||
| f1757f30cb | |||
| ddab1533c5 | |||
| 44c7f86f49 | |||
| 915c4b9ce2 | |||
| d7cc26cc17 | |||
| 5bc5ba7ee3 | |||
| 82df656cc7 | |||
| 51d09bb9c9 | |||
| 5a1f1305f0 | |||
| 3cf31205bc | |||
| 26a40373fc | |||
| 6b9e7defac | |||
| a63d9cc550 | |||
| 1e84cded98 | |||
| bb0cc1bbbc | |||
| 941ffea81c | |||
| 737cee4b8c | |||
| d3165cca4f | |||
| 2060ba3556 | |||
| e56ead5e1c | |||
| 4c93153194 | |||
| 8b9e68c32d | |||
| b2d3fffe74 | |||
| b5c5b175f1 | |||
| ecf19344f6 | |||
| b2473e57dd | |||
| d38aaa0c7e | |||
| 8696f98c3b | |||
| adee17847c | |||
| a7d82bd73b | |||
| de67c3f235 | |||
| 59a699063a | |||
| ff800e08fd | |||
| c0190eff00 | |||
| 4e445f2c55 | |||
| 9da817eae0 | |||
| a77e513443 | |||
| 664d386623 | |||
| 7cf4009838 | |||
| f8e30f49d7 | |||
| 5c087727a9 | |||
| 3b431f2f72 | |||
| e5b43d48ee | |||
| 8282d732c1 | |||
| 82f41d6e46 | |||
| b8c65078fc | |||
| 04419af419 | |||
| ed6a5ff7e5 | |||
| 956680104b | |||
| 3958ff8627 | |||
| 99b71c1dde | |||
| 73ddc762c8 | |||
| 7a5b3a1e6a | |||
| e2568d7589 | |||
| 0b1d754e7d | |||
| bbc2ee6da1 | |||
| 6ebf8ea230 | |||
| b96ceb4256 | |||
| b6dbc4c5c1 | |||
| 12b018e619 | |||
| 9b80e1e04a | |||
| bf6a1816b4 | |||
| 4f05a66ee1 | |||
| dcc9b0d437 | |||
| 622d100c30 | |||
| 74997a5251 | |||
| 50148f7185 | |||
| 8f57a3e28a | |||
| 2511e869e2 | |||
| aa612124f2 | |||
| 3e050fb35a | |||
| 3dee10636c | |||
| eb3bdb7550 | |||
| 33fdb9ab8b | |||
| 97c19de8b9 | |||
| 4e19c59ab3 | |||
| 9cf5b96971 | |||
| 0eed5e0667 | |||
| 69a710fef1 | |||
| d2613ce077 | |||
| f2e222b9e8 | |||
| a6ee4a0468 | |||
| d3b8f30818 | |||
| 2390f6d3ab | |||
| d8b1343279 | |||
| eacb6b6e8b | |||
| 7efffc1548 | |||
| 10e366ebd7 | |||
| 95590adf07 | |||
| be67acbd48 | |||
| 8d06cf7b84 | |||
| 216f9b45cc | |||
| 645b586041 | |||
| 1962c13455 | |||
| 069ec3f9a9 | |||
| 56035e9965 | |||
| 4e3b566f72 | |||
| d65c99f38b | |||
| 90c7d28055 | |||
| 8b684637bc | |||
| d2df00bfca | |||
| 25ec0fecfa | |||
| 227b96b28b | |||
| a2fc7da587 | |||
| a2c013c8c7 | |||
| f27196214b | |||
| aa616cd410 | |||
| 5926159890 | |||
| c9f88297b8 | |||
| 5cc87abb3a | |||
| 355dfed437 | |||
| 802ae73b13 | |||
| 549c814e8d | |||
| 564fbc8dec | |||
| 972248c333 | |||
| df44bcc5ae | |||
| 3293823642 | |||
| 24b302c001 | |||
| 4714fb8fcb | |||
| 2a54fd1444 | |||
| b0ff3a4c6d | |||
| 7aadfe32e7 | |||
| 8ce9306b27 | |||
| 438e894899 | |||
| 80682ec61e | |||
| deaa70c2cc | |||
| 7535c21894 | |||
| 8327667988 | |||
| b6b4bf0959 | |||
| d60619f8e5 | |||
| 658e1ebe5a | |||
| 54963cc898 | |||
| ad879a1f90 | |||
| 513f25d42c | |||
| 2559745f54 | |||
| 7326fe1136 | |||
| 97a43f0c2f | |||
| 279b73fecd | |||
| 87b655e59e | |||
| 677d490b5c | |||
| 6ee4ba6932 | |||
| 77cef3bef2 | |||
| 4a857f1af6 | |||
| 50a1352f7f | |||
| 1d0739d6d1 | |||
| 69a7d4e0a5 | |||
| 2fb35f7991 | |||
| 5fe15c7f10 | |||
| 094bebcc2d | |||
| abb15bc30a | |||
| 8e18e05d1d | |||
| aa80882bdf | |||
| e4466b55b5 | |||
| 60ea0f1222 | |||
| b60efb4230 | |||
| 2f4a42b313 | |||
| fff4d71ba5 | |||
| e1ab285435 | |||
| 26ebeadfaa | |||
| 30e4b85587 | |||
| 44edffa0a9 | |||
| 20b57f9d38 | |||
| ddf5d68815 | |||
| 298863c2d0 | |||
| 8e8787ad63 | |||
| 12151e62ee | |||
| efc1029226 | |||
| 1b09733e7c | |||
| d8ef9bda18 | |||
| 1b870377b1 | |||
| 267c247da7 | |||
| 95296191a2 | |||
| 8ab368559a | |||
| bb111b928b | |||
| 91abf07087 | |||
| e642a64b68 | |||
| 64f077fd2a | |||
| 5fefa200ba | |||
| 4388719c5d | |||
| 46c2841904 | |||
| 03904697ac | |||
| 9bd230cf64 | |||
| 309890cb8c | |||
| f9f0ee0f21 | |||
| 640526f0c8 | |||
| 9af9596f69 | |||
| 6e9093c288 | |||
| 0c4e9980fb | |||
| 13a3fb1acc | |||
| 343dd1c0b8 | |||
| 64029ef8a6 | |||
| 524f4ee0cf | |||
| 34aeaec553 | |||
| 0e4b6b373d | |||
| 193a0e9273 | |||
| 39cc36d3f1 | |||
| 87d3a1ae4d | |||
| 5289c4135a | |||
| dcd7949544 | |||
| 277eb16d67 | |||
| 41ba4e507e | |||
| c9980c0a5c | |||
| 3e9504d306 | |||
| 1b68ee82ce | |||
| 4bf0e15653 | |||
| b63a55666d | |||
| f02ca2a9a3 | |||
| 4fb3ce4739 | |||
| 704640bf98 | |||
| b48a77c88a | |||
| db6de76acb | |||
| 15be1cb9a9 | |||
| 4817c0d055 | |||
| 893092ff7f | |||
| 8b7c1e9cec | |||
| 393ceb28fc | |||
| d9cb7be444 | |||
| 5837f067cf | |||
| 5e5a177934 | |||
| 0b5b03d9dc | |||
| 9288d80613 | |||
| 6698db29de | |||
| 25e86a520d | |||
| a6f7cda23e | |||
| b0e282a74b | |||
| 46ed54cd8e | |||
| 9c870baf84 | |||
| 21249f7c3d | |||
| 471c2b5d5c | |||
| e792c2b234 | |||
| daa85f71e1 | |||
| 9850ba0cbd | |||
| c0a8275cb0 | |||
| 318c419f77 | |||
| 7e1232269a | |||
| 62d52d62dc | |||
| 77cf42588f | |||
| 50f6c645de | |||
| 7ade65d44b | |||
| a979c428ee | |||
| 6920769a9a | |||
| 410aa0716d | |||
| 445a7f65cd | |||
| e64cfb13b8 | |||
| e374d87ac4 | |||
| 2296d98845 | |||
| 9aac3d8773 | |||
| 6569b9ba56 | |||
| 7ab9abe4ef | |||
| 3357170b18 | |||
| 2e746f2b8b | |||
| 594c075377 | |||
| 8bb1e91afd | |||
| a12d1b21b5 | |||
| 5bed2f351a | |||
| 209560fcd2 | |||
| ec9d7b639d | |||
| 1c97c1582c | |||
| f06f4b40b8 | |||
| 3235beef6d | |||
| e5ab783b08 | |||
| 355ebec92d | |||
| fa157f08ff | |||
| 39a545b3f8 | |||
| 226fe192a1 | |||
| e9bc9a2ab4 | |||
| b22c87183f | |||
| fa44130734 | |||
| 9b3f27f02a | |||
| 1d5fb360cc | |||
| a7398a0459 | |||
| 91c5c2538a | |||
| 259cf1b0b2 | |||
| 2338632270 | |||
| 2a88a3fd33 | |||
| 84470f6b2a | |||
| 10d72f31c2 | |||
| e04902f589 | |||
| 31d0b77df7 | |||
| 9e82533eb9 | |||
| 4410aac60b | |||
| d63d08ef8b | |||
| 5911dc597a | |||
| 5c2ff6ed19 | |||
| 6efad5e495 | |||
| 5f708d47ce | |||
| 23dbaaf03b | |||
| 3b4b9c6d68 | |||
| 8df47d76c7 | |||
| be55a49946 | |||
| e05af35678 | |||
| 060d16d26b | |||
| 0976d22225 | |||
| e17869ca20 | |||
| 1c3d06876e | |||
| 662105c1b6 | |||
| b8ddae61e2 | |||
| ece14af556 | |||
| b07a2aa23c | |||
| 88857e8028 | |||
| 8e808fcadc | |||
| da93a272a0 | |||
| fcd3b326e9 | |||
| 3d5b10735f | |||
| 94228d4522 | |||
| f054f566b4 | |||
| 167058b61f | |||
| f835245ee1 | |||
| 98c7bde514 | |||
| 38110e220d | |||
| 75e4867d22 | |||
| 9239fcf0da | |||
| 73c5675485 | |||
| 381ebc043f | |||
| c7e0a49c94 | |||
| 067622fcc6 | |||
| ae256576e1 | |||
| cbfcce09fa | |||
| a21201a713 | |||
| 53f2f188f2 | |||
| a6e95c7d25 | |||
| 97e6663bb3 | |||
| e2ceb1b800 | |||
| 8c93295d62 | |||
| c26242a553 | |||
| b825bc87ae | |||
| dac5f20a01 | |||
| b211fa4e1f | |||
| a4954a68e0 | |||
| 355cba4aa7 | |||
| 2f0164b995 | |||
| e287e14354 | |||
| 5e63ba970d | |||
| 2a46ab288e | |||
| 7999249a5c | |||
| 0ec9a7f090 | |||
| a47c5c093d | |||
| 5a674a8e10 | |||
| bcb8722513 | |||
| 4c34b3ad9c | |||
| 1b8b5c4b06 | |||
| 451c1fb5f9 | |||
| 4e19ff75b6 | |||
| 94caabf89a | |||
| f365448338 | |||
| 3d1536a1b2 | |||
| 8ab426c3a4 | |||
| 33d28c24bf | |||
| ac70048945 | |||
| 40a4a716e1 | |||
| 802f147686 | |||
| 80a0f935a1 | |||
| de3c9bade6 | |||
| 7f8ff0a724 | |||
| 3a8923be74 | |||
| 723a34d9c7 | |||
| 2efd5b119d | |||
| b105e47cb5 | |||
| 0c2cefed8f | |||
| 41dcbe89dd | |||
| 70a64355f6 | |||
| aefd2a5c4b | |||
| e37a1ded0d | |||
| 3e28243076 | |||
| bbb94b8f68 | |||
| a277b43e30 | |||
| 8a994fb1b1 | |||
| 9ee92f1246 | |||
| ac2ac99e15 | |||
| 72e9534d11 | |||
| c1cc79176c | |||
| f25dccd6d1 | |||
| cd09a83cfa | |||
| 9bbc2df217 | |||
| 74d430cb97 | |||
| ca13f4c3dd | |||
| 9d4d53e2fd | |||
| 00896f1713 | |||
| c3a9e95a5f | |||
| 0afd25a010 | |||
| 5b87843fae | |||
| 386b74f8c2 | |||
| 2a963fb5d1 | |||
| d69c5317df | |||
| 2864ef8c7f | |||
| 534bbb81ff | |||
| 3e5485de92 | |||
| 9e147e9ac4 | |||
| 8ab2e420f6 | |||
| b4c53af07d |
@@ -0,0 +1,274 @@
|
|||||||
|
# Python CircleCI 2.0 configuration file
|
||||||
|
#
|
||||||
|
# Check https://circleci.com/docs/2.0/language-python/ for more details
|
||||||
|
#
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
# specify the version you desire here
|
||||||
|
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
|
||||||
|
- image: circleci/python:2.7.13
|
||||||
|
|
||||||
|
# Specify service dependencies here if necessary
|
||||||
|
# CircleCI maintains a library of pre-built images
|
||||||
|
# documented at https://circleci.com/docs/2.0/circleci-images/
|
||||||
|
# - image: circleci/postgres:9.4
|
||||||
|
environment:
|
||||||
|
TEST_PLATFORM: "-e megaatmega2560"
|
||||||
|
|
||||||
|
working_directory: ~/Marlin
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
|
||||||
|
- restore_cache:
|
||||||
|
paths:
|
||||||
|
- ~/.platformio
|
||||||
|
- ~/Marlin/.piolibdeps
|
||||||
|
keys:
|
||||||
|
- v1-dependencies-{{ checksum "~/Marlin/platformio.ini" }}
|
||||||
|
# fallback to using the latest cache if no exact match is found
|
||||||
|
- v1-dependencies-
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: install dependencies
|
||||||
|
command: |
|
||||||
|
sudo pip install -U platformio
|
||||||
|
|
||||||
|
# run tests!
|
||||||
|
- run:
|
||||||
|
name: run tests
|
||||||
|
command: |
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Fetch the tag information for the current branch
|
||||||
|
ls -la
|
||||||
|
git fetch origin --tags
|
||||||
|
#
|
||||||
|
# Publish the buildroot script folder
|
||||||
|
chmod +x buildroot/bin/*
|
||||||
|
export PATH=`pwd`/buildroot/bin/:${PATH}
|
||||||
|
|
||||||
|
# Generate custom version include
|
||||||
|
generate_version ./Marlin/
|
||||||
|
cat ./Marlin/Version.h
|
||||||
|
#
|
||||||
|
# Back up pins_RAMPS.h
|
||||||
|
#
|
||||||
|
backup_ramps
|
||||||
|
|
||||||
|
env_backup
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Build all sample configurations
|
||||||
|
#################################
|
||||||
|
|
||||||
|
echo testing megaatmega2560 targets...
|
||||||
|
export TEST_PLATFORM="-e megaatmega2560"
|
||||||
|
echo use_example_configs adafruit/ST7565
|
||||||
|
use_example_configs adafruit/ST7565
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs BQ/Hephestos
|
||||||
|
use_example_configs BQ/Hephestos
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs BQ/Hephestos_2
|
||||||
|
use_example_configs BQ/Hephestos_2
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs BQ/WITBOX
|
||||||
|
use_example_configs BQ/WITBOX
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs AliExpress/CL-260
|
||||||
|
use_example_configs AliExpress/CL-260
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
#echo use_example_configs Cartesio
|
||||||
|
#use_example_configs Cartesio
|
||||||
|
#build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
#restore_configs
|
||||||
|
echo use_example_configs delta/FLSUN/auto_calibrate
|
||||||
|
use_example_configs delta/FLSUN/auto_calibrate
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs delta/FLSUN/kossel_mini
|
||||||
|
use_example_configs delta/FLSUN/kossel_mini
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs delta/generic
|
||||||
|
use_example_configs delta/generic
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs delta/kossel_mini
|
||||||
|
use_example_configs delta/kossel_mini
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs delta/kossel_xl
|
||||||
|
use_example_configs delta/kossel_xl
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Felix
|
||||||
|
use_example_configs Felix
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Felix/DUAL
|
||||||
|
use_example_configs Felix/DUAL
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs FolgerTech/i3-2020
|
||||||
|
use_example_configs FolgerTech/i3-2020
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs gCreate/gMax1.5+
|
||||||
|
use_example_configs gCreate/gMax1.5+
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Geeetech/GT2560
|
||||||
|
use_example_configs Geeetech/GT2560
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
#echo use_example_configs Geeetech/I3_Pro_X-GT2560
|
||||||
|
#use_example_configs Geeetech/I3_Pro_X-GT2560
|
||||||
|
#build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
#restore_configs
|
||||||
|
echo use_example_configs Infitary/i3-M508
|
||||||
|
use_example_configs Infitary/i3-M508
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
use_example_configs Malyan/M200
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Micromake/C1/basic
|
||||||
|
use_example_configs Micromake/C1/basic
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Micromake/C1/enhanced
|
||||||
|
use_example_configs Micromake/C1/enhanced
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs RepRapWorld/Megatronics
|
||||||
|
use_example_configs RepRapWorld/Megatronics
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs RigidBot
|
||||||
|
use_example_configs RigidBot
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs SCARA
|
||||||
|
use_example_configs SCARA
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Velleman/K8200
|
||||||
|
use_example_configs Velleman/K8200
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Velleman/K8400/Dual-head
|
||||||
|
use_example_configs Velleman/K8400/Dual-head
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Velleman/K8400
|
||||||
|
use_example_configs Velleman/K8400
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Wanhao/Duplicator6
|
||||||
|
use_example_configs Wanhao/Duplicator6
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
# Requires manual load of https://github.com/stawel/SlowSoftI2CMaster
|
||||||
|
#use_example_configs wt150
|
||||||
|
#build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
#restore_configs
|
||||||
|
echo testing melzi targets...
|
||||||
|
export TEST_PLATFORM="-e melzi"
|
||||||
|
echo use_example_configs Anet/A6
|
||||||
|
use_example_configs Anet/A6
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Anet/A8
|
||||||
|
use_example_configs Anet/A8
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Creality/CR-10
|
||||||
|
use_example_configs Creality/CR-10
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Malyan/M150
|
||||||
|
use_example_configs Malyan/M150
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs Sanguinololu
|
||||||
|
use_example_configs Sanguinololu
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs TinyBoy2
|
||||||
|
use_example_configs TinyBoy2
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
|
||||||
|
echo testing rambo targets...
|
||||||
|
export TEST_PLATFORM="-e rambo"
|
||||||
|
echo use_example_configs AlephObjects/TAZ4
|
||||||
|
use_example_configs AlephObjects/TAZ4
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
|
||||||
|
echo testing at90usb1286_* targets...
|
||||||
|
export TEST_PLATFORM="-e at90usb1286_dfu"
|
||||||
|
#echo se_example_configs delta/kossel_pro
|
||||||
|
#use_example_configs delta/kossel_pro
|
||||||
|
#build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
#restore_configs
|
||||||
|
echo use_example_configs makibox
|
||||||
|
use_example_configs makibox
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
|
||||||
|
echo testing sanguino_atmega644p targets...
|
||||||
|
export TEST_PLATFORM="-e sanguino_atmega644p"
|
||||||
|
echo use_example_configs tvrrug/Round2
|
||||||
|
use_example_configs tvrrug/Round2
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
|
||||||
|
echo testing LPC1768 targets...
|
||||||
|
export TEST_PLATFORM="-e LPC1768"
|
||||||
|
echo use_example_configs Mks/Sbase
|
||||||
|
use_example_configs Mks/Sbase
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo testing STM32F1 targets...
|
||||||
|
export TEST_PLATFORM="-e STM32F103RE"
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs STM32/STM32F103RE
|
||||||
|
use_example_configs STM32/STM32F103RE
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
echo use_example_configs STM32/stm32f103ret6
|
||||||
|
use_example_configs STM32/stm32f103ret6
|
||||||
|
build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
restore_configs
|
||||||
|
|
||||||
|
echo testing DUE targets...
|
||||||
|
export TEST_PLATFORM="-e DUE"
|
||||||
|
#echo use_example_configs UltiMachine/Archim2
|
||||||
|
#use_example_configs UltiMachine/Archim2
|
||||||
|
#build_marlin_pio ./ ${TEST_PLATFORM}
|
||||||
|
#restore_configs
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remove temp files from dependencies tree prior to caching
|
||||||
|
rm -rf ~/Marlin/.piolibdeps/_tmp_*
|
||||||
|
|
||||||
|
#
|
||||||
|
# Restore the environment
|
||||||
|
#
|
||||||
|
env_restore
|
||||||
|
|
||||||
|
- save_cache:
|
||||||
|
paths:
|
||||||
|
- ~/.platformio
|
||||||
|
- ~/Marlin/.piolibdeps
|
||||||
|
key: v1-dependencies-{{ checksum "~/Marlin/platformio.ini" }}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# bump-date.yml
|
|
||||||
# Bump the distribution date once per day
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Bump Distribution Date
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
bump_date:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Check out bugfix-2.0.x
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: bugfix-2.0.x
|
|
||||||
|
|
||||||
- name: Bump Distribution Date
|
|
||||||
run: source ./buildroot/bin/bump_date
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
#
|
|
||||||
# test-builds.yml
|
|
||||||
# Do test builds to catch compile errors
|
|
||||||
#
|
|
||||||
|
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- bugfix-2.0.x
|
|
||||||
- dev-2.1.x
|
|
||||||
paths-ignore:
|
|
||||||
- config/**
|
|
||||||
- data/**
|
|
||||||
- docs/**
|
|
||||||
- '**/*.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test_builds:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
test-platform:
|
|
||||||
# Base Environments
|
|
||||||
|
|
||||||
- DUE
|
|
||||||
- esp32
|
|
||||||
- linux_native
|
|
||||||
- megaatmega2560
|
|
||||||
- teensy31
|
|
||||||
- teensy35
|
|
||||||
|
|
||||||
# Extended AVR Environments
|
|
||||||
|
|
||||||
- FYSETC_F6_13
|
|
||||||
- megaatmega1280
|
|
||||||
- rambo
|
|
||||||
- sanguino_atmega1284p
|
|
||||||
- sanguino_atmega644p
|
|
||||||
|
|
||||||
# Extended STM32 Environments
|
|
||||||
|
|
||||||
- STM32F103RC_bigtree
|
|
||||||
- STM32F103RC_bigtree_USB
|
|
||||||
- STM32F103RE_bigtree
|
|
||||||
- STM32F103RE_bigtree_USB
|
|
||||||
- STM32F103RC_fysetc
|
|
||||||
- jgaurora_a5s_a1
|
|
||||||
- STM32F103VE_longer
|
|
||||||
- STM32F407VE_black
|
|
||||||
- BIGTREE_SKR_PRO
|
|
||||||
- mks_robin
|
|
||||||
- ARMED
|
|
||||||
|
|
||||||
# Put lengthy tests last
|
|
||||||
|
|
||||||
- LPC1768
|
|
||||||
- LPC1769
|
|
||||||
|
|
||||||
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
|
|
||||||
|
|
||||||
#- STM32F4
|
|
||||||
#- STM32F7
|
|
||||||
|
|
||||||
# Non-working environment tests
|
|
||||||
|
|
||||||
#- BIGTREE_BTT002
|
|
||||||
#- at90usb1286_cdc
|
|
||||||
#- at90usb1286_dfu
|
|
||||||
#- STM32F103CB_malyan
|
|
||||||
#- mks_robin_lite
|
|
||||||
#- mks_robin_mini
|
|
||||||
#- mks_robin_nano
|
|
||||||
#- SAMD51_grandcentral_m4
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Select Python 3.7
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
|
||||||
|
|
||||||
- name: Install PlatformIO
|
|
||||||
run: |
|
|
||||||
pip install -U https://github.com/platformio/platformio-core/archive/master.zip
|
|
||||||
platformio update
|
|
||||||
|
|
||||||
- name: Check out the PR
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Run ${{ matrix.test-platform }} Tests
|
|
||||||
run: |
|
|
||||||
chmod +x buildroot/bin/*
|
|
||||||
chmod +x buildroot/share/tests/*
|
|
||||||
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
|
|
||||||
run_tests . ${{ matrix.test-platform }}
|
|
||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
dist: bionic
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- "3.7"
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Base Environments
|
||||||
|
- TEST_PLATFORM="DUE"
|
||||||
|
- TEST_PLATFORM="esp32"
|
||||||
|
- TEST_PLATFORM="linux_native"
|
||||||
|
- TEST_PLATFORM="megaatmega2560"
|
||||||
|
- TEST_PLATFORM="STM32F103RE"
|
||||||
|
- TEST_PLATFORM="teensy31"
|
||||||
|
- TEST_PLATFORM="teensy35"
|
||||||
|
|
||||||
|
# Extended AVR Environments
|
||||||
|
- TEST_PLATFORM="fysetc_f6_13"
|
||||||
|
- TEST_PLATFORM="megaatmega1280"
|
||||||
|
- TEST_PLATFORM="rambo"
|
||||||
|
- TEST_PLATFORM="sanguino_atmega1284p"
|
||||||
|
- TEST_PLATFORM="sanguino_atmega644p"
|
||||||
|
|
||||||
|
# Broken Extended STM32 Environments
|
||||||
|
#- TEST_PLATFORM="ARMED"
|
||||||
|
#- TEST_PLATFORM="BIGTREE_BTT002"
|
||||||
|
#- TEST_PLATFORM="BIGTREE_SKR_PRO"
|
||||||
|
|
||||||
|
# Extended STM32 Environments
|
||||||
|
- TEST_PLATFORM="STM32F103RC_bigtree"
|
||||||
|
- TEST_PLATFORM="jgaurora_a5s_a1"
|
||||||
|
- TEST_PLATFORM="STM32F103VE_longer"
|
||||||
|
- TEST_PLATFORM="STM32F407VE_black"
|
||||||
|
- TEST_PLATFORM="mks_robin"
|
||||||
|
|
||||||
|
# Put lengthy tests last
|
||||||
|
- TEST_PLATFORM="LPC1768"
|
||||||
|
- TEST_PLATFORM="LPC1769"
|
||||||
|
|
||||||
|
# Non-working environment tests
|
||||||
|
#- TEST_PLATFORM="at90usb1286_cdc"
|
||||||
|
#- TEST_PLATFORM="at90usb1286_dfu"
|
||||||
|
#- TEST_PLATFORM="STM32F103CB_malyan"
|
||||||
|
#- TEST_PLATFORM="mks_robin_lite"
|
||||||
|
#- TEST_PLATFORM="mks_robin_mini"
|
||||||
|
#- TEST_PLATFORM="mks_robin_nano"
|
||||||
|
#- TEST_PLATFORM="SAMD51_grandcentral_m4"
|
||||||
|
#- TEST_PLATFORM="STM32F103RC_bigtree"
|
||||||
|
#- TEST_PLATFORM="STM32F103RC_bigtree_USB"
|
||||||
|
#- TEST_PLATFORM="STM32F103RC_fysetc"
|
||||||
|
#- TEST_PLATFORM="STM32F4"
|
||||||
|
#- TEST_PLATFORM="STM32F7"
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
#
|
||||||
|
# Fetch the tag information for the current branch
|
||||||
|
- git fetch origin --tags
|
||||||
|
#
|
||||||
|
# Publish the buildroot script folder
|
||||||
|
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
|
||||||
|
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/share/tests/*
|
||||||
|
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${TRAVIS_BUILD_DIR}/buildroot/share/tests/:${PATH}
|
||||||
|
|
||||||
|
install:
|
||||||
|
#- pip install -U platformio
|
||||||
|
- pip install -U https://github.com/platformio/platformio-core/archive/master.zip
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# Update PlatformIO packages
|
||||||
|
- platformio update
|
||||||
|
#
|
||||||
|
# Change current working directory to the build dir
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
#
|
||||||
|
# Generate custom version include
|
||||||
|
- generate_version ${TRAVIS_BUILD_DIR}/Marlin/
|
||||||
|
- cat ${TRAVIS_BUILD_DIR}/Marlin/Version.h
|
||||||
|
#
|
||||||
|
script:
|
||||||
|
- run_tests ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
|
||||||
+283
-107
@@ -1,3 +1,45 @@
|
|||||||
|
// If you have a trex 3, stock is this option plus 2208 on all axis. None in spreadcycle.
|
||||||
|
#define TREX3
|
||||||
|
|
||||||
|
// If you have a trex 3 that was upgraded from a 2+ with the kit, modifies home position and offsets.
|
||||||
|
//#define TREX3_UPGRADE
|
||||||
|
|
||||||
|
//Stock 2+ X is a 4988, all options off defaults to this
|
||||||
|
//#define X_2208
|
||||||
|
//#define X_Spreadcycle
|
||||||
|
//#define X_S109
|
||||||
|
|
||||||
|
// Y all options off defaults to 2+ 8825 / 3 2208
|
||||||
|
//#define Y_2208 // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
|
||||||
|
//#define Y_Spreadcycle
|
||||||
|
//#define Y_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
|
||||||
|
//#define Y_S109
|
||||||
|
|
||||||
|
//Stock 2+ Z is a 8825, all options off defaults to this
|
||||||
|
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
|
||||||
|
//#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
|
||||||
|
//#define Z_Spreadcycle
|
||||||
|
//#define Z_S109
|
||||||
|
|
||||||
|
//Stock 2+ Z is a 4988, all options off defaults to this
|
||||||
|
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
|
||||||
|
//#define E_Spreadcycle
|
||||||
|
//#define E_S109
|
||||||
|
|
||||||
|
#define BedAC
|
||||||
|
|
||||||
|
#define tallVersion
|
||||||
|
|
||||||
|
//#define ABL_Bilinear
|
||||||
|
/*
|
||||||
|
* Enables a filament sensor plugged into the laser pin. Disables the laser
|
||||||
|
*/
|
||||||
|
//#define FilamentSensor // Standard older TM3D runout sensor
|
||||||
|
//#define lerdgeFilSensor // Newer inverted logic TM3D Runout Sensor
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////DO not edit below here unless you know what youre doing! //////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
@@ -21,6 +63,25 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// The TREX2+ upgraded to the 3 enables most of the same options, simplify here
|
||||||
|
#if ENABLED(TREX3_UPGRADE)
|
||||||
|
#define TREX3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(TREX3)
|
||||||
|
#if DISABLED(X_S109)
|
||||||
|
#define X_2208
|
||||||
|
#endif
|
||||||
|
#if DISABLED(Y_S109)
|
||||||
|
#define Y_2208
|
||||||
|
#endif
|
||||||
|
#define Z_2208
|
||||||
|
#define E_2208
|
||||||
|
#define FilamentSensor
|
||||||
|
#endif
|
||||||
|
#if ENABLED(lerdgeFilSensor) && DISABLED(FilamentSensor)
|
||||||
|
#define FilamentSensor
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Configuration.h
|
* Configuration.h
|
||||||
*
|
*
|
||||||
@@ -71,8 +132,8 @@
|
|||||||
// @section info
|
// @section info
|
||||||
|
|
||||||
// Author info of this build printed to the host during boot and M115
|
// Author info of this build printed to the host during boot and M115
|
||||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
#define STRING_CONFIG_H_AUTHOR "Tinymachines3D" // Who made the changes.
|
||||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* *** VENDORS PLEASE READ ***
|
* *** VENDORS PLEASE READ ***
|
||||||
@@ -89,10 +150,10 @@
|
|||||||
#define SHOW_BOOTSCREEN
|
#define SHOW_BOOTSCREEN
|
||||||
|
|
||||||
// Show the bitmap in Marlin/_Bootscreen.h on startup.
|
// Show the bitmap in Marlin/_Bootscreen.h on startup.
|
||||||
//#define SHOW_CUSTOM_BOOTSCREEN
|
#define SHOW_CUSTOM_BOOTSCREEN
|
||||||
|
|
||||||
// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
|
// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
|
||||||
//#define CUSTOM_STATUS_SCREEN_IMAGE
|
#define CUSTOM_STATUS_SCREEN_IMAGE
|
||||||
|
|
||||||
// @section machine
|
// @section machine
|
||||||
|
|
||||||
@@ -130,11 +191,22 @@
|
|||||||
|
|
||||||
// Choose the name from boards.h that matches your setup
|
// Choose the name from boards.h that matches your setup
|
||||||
#ifndef MOTHERBOARD
|
#ifndef MOTHERBOARD
|
||||||
#define MOTHERBOARD BOARD_MKS_GEN_13
|
#if ENABLED(TREX3)
|
||||||
|
#define MOTHERBOARD BOARD_FORMBOT_TREX3
|
||||||
|
#else
|
||||||
|
#define MOTHERBOARD BOARD_FORMBOT_TREX2PLUS
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Name displayed in the LCD "Ready" message and Info menu
|
// Optional custom name for your RepStrap or other custom machine
|
||||||
//#define CUSTOM_MACHINE_NAME "Trex+"
|
// Displayed in the LCD "Ready" message
|
||||||
|
#if ENABLED(TREX3_UPGRADE)
|
||||||
|
#define CUSTOM_MACHINE_TIME "T-REX 3(u)"
|
||||||
|
#elif ENABLED(TREX3)
|
||||||
|
#define CUSTOM_MACHINE_NAME "T-REX 3"
|
||||||
|
#else
|
||||||
|
#define CUSTOM_MACHINE_NAME "T-REX 2+"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Printer's unique ID, used by some programs to differentiate between machines.
|
// Printer's unique ID, used by some programs to differentiate between machines.
|
||||||
// Choose your own or use a service like http://www.uuidgenerator.net/version4
|
// Choose your own or use a service like http://www.uuidgenerator.net/version4
|
||||||
@@ -309,7 +381,12 @@
|
|||||||
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
|
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
|
||||||
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
|
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
|
||||||
// For the other hotends it is their distance from the extruder 0 hotend.
|
// For the other hotends it is their distance from the extruder 0 hotend.
|
||||||
//#define HOTEND_OFFSET_X { 0.0, -34.00 } // (mm) relative X-offset for each nozzle
|
#if ENABLED(TREX3)
|
||||||
|
#define HOTEND_OFFSET_X {0.0, 438.5} // (mm) relative X-offset for each nozzle
|
||||||
|
#else
|
||||||
|
#define HOTEND_OFFSET_X {0.0, 442.0} // (mm) relative X-offset for each nozzle
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
|
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
|
||||||
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
|
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
|
||||||
|
|
||||||
@@ -325,14 +402,13 @@
|
|||||||
//#define PSU_NAME "Power Supply"
|
//#define PSU_NAME "Power Supply"
|
||||||
|
|
||||||
#if ENABLED(PSU_CONTROL)
|
#if ENABLED(PSU_CONTROL)
|
||||||
#define PSU_ACTIVE_HIGH false // Set 'false' for ATX, 'true' for X-Box
|
#define PSU_ACTIVE_HIGH false // Set 'false' for ATX (1), 'true' for X-Box (2)
|
||||||
|
|
||||||
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
//#define PS_DEFAULT_OFF // Keep power off until enabled directly with M80
|
||||||
//#define PSU_POWERUP_DELAY 100 // (ms) Delay for the PSU to warm up to full power
|
|
||||||
|
|
||||||
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
|
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
|
||||||
#if ENABLED(AUTO_POWER_CONTROL)
|
#if ENABLED(AUTO_POWER_CONTROL)
|
||||||
#define AUTO_POWER_FANS // Turn on PSU if fans need power
|
#define AUTO_POWER_FANS // Turn on PSU if fans need power
|
||||||
#define AUTO_POWER_E_FANS
|
#define AUTO_POWER_E_FANS
|
||||||
#define AUTO_POWER_CONTROLLERFAN
|
#define AUTO_POWER_CONTROLLERFAN
|
||||||
#define AUTO_POWER_CHAMBER_FAN
|
#define AUTO_POWER_CHAMBER_FAN
|
||||||
@@ -353,10 +429,9 @@
|
|||||||
*
|
*
|
||||||
* Temperature sensors available:
|
* Temperature sensors available:
|
||||||
*
|
*
|
||||||
* -5 : PT100 / PT1000 with MAX31865 (only for sensors 0-1)
|
|
||||||
* -3 : thermocouple with MAX31855 (only for sensors 0-1)
|
|
||||||
* -2 : thermocouple with MAX6675 (only for sensors 0-1)
|
|
||||||
* -4 : thermocouple with AD8495
|
* -4 : thermocouple with AD8495
|
||||||
|
* -3 : thermocouple with MAX31855 (only for sensor 0)
|
||||||
|
* -2 : thermocouple with MAX6675 (only for sensor 0)
|
||||||
* -1 : thermocouple with AD595
|
* -1 : thermocouple with AD595
|
||||||
* 0 : not used
|
* 0 : not used
|
||||||
* 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
|
* 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
|
||||||
@@ -405,13 +480,23 @@
|
|||||||
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
|
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
|
||||||
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
|
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
|
||||||
*/
|
*/
|
||||||
#define TEMP_SENSOR_0 1
|
#if ENABLED(TREX3)
|
||||||
#define TEMP_SENSOR_1 1
|
#define TEMP_SENSOR_0 61
|
||||||
|
#define TEMP_SENSOR_1 61
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define TEMP_SENSOR_0 1
|
||||||
|
#define TEMP_SENSOR_1 1
|
||||||
|
#endif
|
||||||
#define TEMP_SENSOR_2 0
|
#define TEMP_SENSOR_2 0
|
||||||
#define TEMP_SENSOR_3 0
|
#define TEMP_SENSOR_3 0
|
||||||
#define TEMP_SENSOR_4 0
|
#define TEMP_SENSOR_4 0
|
||||||
#define TEMP_SENSOR_5 0
|
#define TEMP_SENSOR_5 0
|
||||||
#define TEMP_SENSOR_BED 1
|
#if(ENABLED(BedAC))
|
||||||
|
#define TEMP_SENSOR_BED 11
|
||||||
|
#else
|
||||||
|
#define TEMP_SENSOR_BED 0
|
||||||
|
#endif
|
||||||
#define TEMP_SENSOR_CHAMBER 0
|
#define TEMP_SENSOR_CHAMBER 0
|
||||||
|
|
||||||
// Dummy thermistor constant temperature readings, for use with 998 and 999
|
// Dummy thermistor constant temperature readings, for use with 998 and 999
|
||||||
@@ -423,7 +508,7 @@
|
|||||||
//#define TEMP_SENSOR_1_AS_REDUNDANT
|
//#define TEMP_SENSOR_1_AS_REDUNDANT
|
||||||
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
|
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
|
||||||
|
|
||||||
#define TEMP_RESIDENCY_TIME 5 // (seconds) Time to wait for hotend to "settle" in M109
|
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
|
||||||
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
|
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
|
||||||
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
|
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
|
||||||
|
|
||||||
@@ -444,13 +529,18 @@
|
|||||||
// Above this temperature the heater will be switched off.
|
// Above this temperature the heater will be switched off.
|
||||||
// This can protect components from overheating, but NOT from shorts and failures.
|
// This can protect components from overheating, but NOT from shorts and failures.
|
||||||
// (Use MINTEMP for thermistor short/failure protection.)
|
// (Use MINTEMP for thermistor short/failure protection.)
|
||||||
#define HEATER_0_MAXTEMP 315
|
#if ENABLED(TREX3)
|
||||||
#define HEATER_1_MAXTEMP 315
|
#define HEATER_0_MAXTEMP 350
|
||||||
|
#define HEATER_1_MAXTEMP 350
|
||||||
|
#else
|
||||||
|
#define HEATER_0_MAXTEMP 410
|
||||||
|
#define HEATER_1_MAXTEMP 295
|
||||||
|
#endif
|
||||||
#define HEATER_2_MAXTEMP 275
|
#define HEATER_2_MAXTEMP 275
|
||||||
#define HEATER_3_MAXTEMP 275
|
#define HEATER_3_MAXTEMP 275
|
||||||
#define HEATER_4_MAXTEMP 275
|
#define HEATER_4_MAXTEMP 275
|
||||||
#define HEATER_5_MAXTEMP 275
|
#define HEATER_5_MAXTEMP 275
|
||||||
#define BED_MAXTEMP 135
|
#define BED_MAXTEMP 150
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= PID Settings ================================
|
//============================= PID Settings ================================
|
||||||
@@ -468,7 +558,7 @@
|
|||||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||||
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||||
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
||||||
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
|
#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
|
||||||
// Set/get with gcode: M301 E[extruder number, 0-2]
|
// Set/get with gcode: M301 E[extruder number, 0-2]
|
||||||
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
|
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
|
||||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||||
@@ -476,10 +566,15 @@
|
|||||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||||
|
|
||||||
// Ultimaker
|
// Ultimaker
|
||||||
#define DEFAULT_Kp 22.2
|
#if ENABLED(TREX3)
|
||||||
#define DEFAULT_Ki 1.08
|
#define DEFAULT_Kp 14.64
|
||||||
#define DEFAULT_Kd 114
|
#define DEFAULT_Ki 1.08
|
||||||
|
#define DEFAULT_Kd 53.36
|
||||||
|
#else
|
||||||
|
#define DEFAULT_Kp 22.2
|
||||||
|
#define DEFAULT_Ki 1.08
|
||||||
|
#define DEFAULT_Kd 114
|
||||||
|
#endif
|
||||||
// MakerGear
|
// MakerGear
|
||||||
//#define DEFAULT_Kp 7.0
|
//#define DEFAULT_Kp 7.0
|
||||||
//#define DEFAULT_Ki 0.1
|
//#define DEFAULT_Ki 0.1
|
||||||
@@ -509,7 +604,7 @@
|
|||||||
* heater. If your configuration is significantly different than this and you don't understand
|
* heater. If your configuration is significantly different than this and you don't understand
|
||||||
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
|
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
|
||||||
*/
|
*/
|
||||||
#define PIDTEMPBED
|
//#define PIDTEMPBED
|
||||||
|
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
@@ -605,9 +700,9 @@
|
|||||||
// Almost all printers will be using one per axis. Probes will use one or more of the
|
// Almost all printers will be using one per axis. Probes will use one or more of the
|
||||||
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
|
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
|
||||||
#define USE_XMIN_PLUG
|
#define USE_XMIN_PLUG
|
||||||
#define USE_YMIN_PLUG
|
//#define USE_YMIN_PLUG
|
||||||
#define USE_ZMIN_PLUG
|
#define USE_ZMIN_PLUG
|
||||||
//#define USE_XMAX_PLUG
|
#define USE_XMAX_PLUG
|
||||||
#define USE_YMAX_PLUG
|
#define USE_YMAX_PLUG
|
||||||
//#define USE_ZMAX_PLUG
|
//#define USE_ZMAX_PLUG
|
||||||
|
|
||||||
@@ -638,12 +733,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
|
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
|
||||||
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
|
||||||
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
||||||
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
||||||
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
|
||||||
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
||||||
#define Z_MAX_ENDSTOP_INVERTING true= // set to true to invert the logic of the endstop.
|
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
|
||||||
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
|
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -661,15 +756,37 @@
|
|||||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||||
*/
|
*/
|
||||||
//#define X_DRIVER_TYPE A4988
|
#if ENABLED(X_2208)
|
||||||
//#define Y_DRIVER_TYPE A4988
|
#define X_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
//#define Z_DRIVER_TYPE A4988
|
#define X2_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
//#define X2_DRIVER_TYPE A4988
|
#else
|
||||||
|
#define X_DRIVER_TYPE A4988
|
||||||
|
#define X2_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if ENABLED(Y_2208)
|
||||||
|
#define Y_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
|
#elif ENABLED(Y_4988)
|
||||||
|
#define Y_DRIVER_TYPE A4988
|
||||||
|
#else
|
||||||
|
#define Y_DRIVER_TYPE DRV8825
|
||||||
|
#endif
|
||||||
|
#if ENABLED(Z_2208)
|
||||||
|
#define Z_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
|
#elif ENABLED(Z_4988)
|
||||||
|
#define Z_DRIVER_TYPE A4988
|
||||||
|
#else
|
||||||
|
#define Z_DRIVER_TYPE DRV8825
|
||||||
|
#endif
|
||||||
//#define Y2_DRIVER_TYPE A4988
|
//#define Y2_DRIVER_TYPE A4988
|
||||||
//#define Z2_DRIVER_TYPE A4988
|
//#define Z2_DRIVER_TYPE A4988
|
||||||
//#define Z3_DRIVER_TYPE A4988
|
//#define Z3_DRIVER_TYPE A4988
|
||||||
//#define E0_DRIVER_TYPE A4988
|
#if ENABLED(E_2208)
|
||||||
//#define E1_DRIVER_TYPE A4988
|
#define E0_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
|
#define E1_DRIVER_TYPE TMC2208_STANDALONE
|
||||||
|
#else
|
||||||
|
#define E0_DRIVER_TYPE DRV8825
|
||||||
|
#define E1_DRIVER_TYPE DRV8825
|
||||||
|
#endif
|
||||||
//#define E2_DRIVER_TYPE A4988
|
//#define E2_DRIVER_TYPE A4988
|
||||||
//#define E3_DRIVER_TYPE A4988
|
//#define E3_DRIVER_TYPE A4988
|
||||||
//#define E4_DRIVER_TYPE A4988
|
//#define E4_DRIVER_TYPE A4988
|
||||||
@@ -716,33 +833,52 @@
|
|||||||
/**
|
/**
|
||||||
* Default Axis Steps Per Unit (steps/mm)
|
* Default Axis Steps Per Unit (steps/mm)
|
||||||
* Override with M92
|
* Override with M92
|
||||||
* X, Y, Z, E0 [, E1[, E2...]]
|
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 125.4 }
|
|
||||||
|
|
||||||
|
#if(ENABLED(Y_2208) || ENABLED(Y_4988) || ENABLED(Y_S109))
|
||||||
|
#define Y_STEPSMM 80
|
||||||
|
#else
|
||||||
|
#define Y_STEPSMM 160
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if(ENABLED(Z_2208) || ENABLED(Z_4988))
|
||||||
|
#define Z_STEPSMM 800
|
||||||
|
#else
|
||||||
|
#define Z_STEPSMM 1600
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, Y_STEPSMM, Z_STEPSMM, 93 }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Max Feed Rate (mm/s)
|
* Default Max Feed Rate (mm/s)
|
||||||
* Override with M203
|
* Override with M203
|
||||||
* X, Y, Z, E0 [, E1[, E2...]]
|
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_MAX_FEEDRATE { 150, 150, 5, 75 }
|
#if ENABLED(Y_2208) && DISABLED(Y_Spreadcycle)
|
||||||
|
#define Y_MAXFEED 100
|
||||||
|
#else
|
||||||
|
#define Y_MAXFEED 150
|
||||||
|
#endif
|
||||||
|
#define DEFAULT_MAX_FEEDRATE { 200, Y_MAXFEED, 8, 75 }
|
||||||
|
|
||||||
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
|
#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
|
||||||
#if ENABLED(LIMITED_MAX_FR_EDITING)
|
#if ENABLED(LIMITED_MAX_FR_EDITING)
|
||||||
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
|
#define MAX_FEEDRATE_EDIT_VALUES { 300, 200, 15, 150 } // ...or, set your own edit limits
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Max Acceleration (change/s) change = mm/s
|
* Default Max Acceleration (change/s) change = mm/s
|
||||||
* (Maximum start speed for accelerated moves)
|
* (Maximum start speed for accelerated moves)
|
||||||
* Override with M201
|
* Override with M201
|
||||||
* X, Y, Z, E0 [, E1[, E2...]]
|
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_MAX_ACCELERATION { 800, 500, 400, 4000 }
|
#define DEFAULT_MAX_ACCELERATION { 750, 500, 400, 3000 }
|
||||||
|
|
||||||
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
|
#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
|
||||||
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
|
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
|
||||||
#define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
|
#define MAX_ACCEL_EDIT_VALUES { 1500, 1500, 800, 5000 } // ...or, set your own edit limits
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -753,9 +889,9 @@
|
|||||||
* M204 R Retract Acceleration
|
* M204 R Retract Acceleration
|
||||||
* M204 T Travel Acceleration
|
* M204 T Travel Acceleration
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
|
#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves
|
||||||
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
|
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
|
||||||
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
|
#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Jerk limits (mm/s)
|
* Default Jerk limits (mm/s)
|
||||||
@@ -787,7 +923,7 @@
|
|||||||
* http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
|
* http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
|
||||||
*/
|
*/
|
||||||
#if DISABLED(CLASSIC_JERK)
|
#if DISABLED(CLASSIC_JERK)
|
||||||
#define JUNCTION_DEVIATION_MM 0.04 // (mm) Distance from real junction edge
|
#define JUNCTION_DEVIATION_MM 0.06 // (mm) Distance from real junction edge
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -855,12 +991,6 @@
|
|||||||
*/
|
*/
|
||||||
//#define FIX_MOUNTED_PROBE
|
//#define FIX_MOUNTED_PROBE
|
||||||
|
|
||||||
/**
|
|
||||||
* Use the nozzle as the probe, as with a conductive
|
|
||||||
* nozzle system or a piezo-electric smart effector.
|
|
||||||
*/
|
|
||||||
//#define NOZZLE_AS_PROBE
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Z Servo Probe, such as an endstop switch on a rotating arm.
|
* Z Servo Probe, such as an endstop switch on a rotating arm.
|
||||||
*/
|
*/
|
||||||
@@ -927,13 +1057,17 @@
|
|||||||
*
|
*
|
||||||
* Specify a Probe position as { X, Y, Z }
|
* Specify a Probe position as { X, Y, Z }
|
||||||
*/
|
*/
|
||||||
#define NOZZLE_TO_PROBE_OFFSET { -28, 8, -1.50 }
|
|
||||||
|
|
||||||
|
#if ENABLED(TREX3)
|
||||||
|
#define NOZZLE_TO_PROBE_OFFSET { -3, 31, -1.5 }
|
||||||
|
#else
|
||||||
|
#define NOZZLE_TO_PROBE_OFFSET { -7, 29, -1.5 }
|
||||||
|
#endif
|
||||||
// Certain types of probes need to stay away from edges
|
// Certain types of probes need to stay away from edges
|
||||||
#define MIN_PROBE_EDGE 10
|
#define MIN_PROBE_EDGE 10
|
||||||
|
|
||||||
// X and Y axis travel speed (mm/m) between probes
|
// X and Y axis travel speed (mm/m) between probes
|
||||||
#define XY_PROBE_SPEED 8000
|
#define XY_PROBE_SPEED 5000
|
||||||
|
|
||||||
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||||
@@ -967,19 +1101,19 @@
|
|||||||
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||||
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||||
*/
|
*/
|
||||||
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
|
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
|
||||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
|
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
|
||||||
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
|
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
|
||||||
//#define Z_AFTER_PROBING 5 // Z position after probing is done
|
#define Z_AFTER_PROBING 5 // Z position after probing is done
|
||||||
|
|
||||||
#define Z_PROBE_LOW_POINT -5 // Farthest distance below the trigger-point to go before stopping
|
#define Z_PROBE_LOW_POINT -3 // Farthest distance below the trigger-point to go before stopping
|
||||||
|
|
||||||
// For M851 give a range for adjusting the Z probe offset
|
// For M851 give a range for adjusting the Z probe offset
|
||||||
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||||
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
||||||
|
|
||||||
// Enable the M48 repeatability test to test probe accuracy
|
// Enable the M48 repeatability test to test probe accuracy
|
||||||
//#define Z_MIN_PROBE_REPEATABILITY_TEST
|
#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||||
|
|
||||||
// Before deploy/stow pause for user confirmation
|
// Before deploy/stow pause for user confirmation
|
||||||
//#define PAUSE_BEFORE_DEPLOY_STOW
|
//#define PAUSE_BEFORE_DEPLOY_STOW
|
||||||
@@ -1026,15 +1160,31 @@
|
|||||||
// @section machine
|
// @section machine
|
||||||
|
|
||||||
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
|
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
|
||||||
#define INVERT_X_DIR false
|
#if ENABLED(X_2208)
|
||||||
#define INVERT_Y_DIR false
|
#define INVERT_X_DIR true
|
||||||
#define INVERT_Z_DIR true
|
#else
|
||||||
|
#define INVERT_X_DIR false
|
||||||
|
#endif
|
||||||
|
#if ENABLED(Y_2208)
|
||||||
|
#define INVERT_Y_DIR true
|
||||||
|
#else
|
||||||
|
#define INVERT_Y_DIR false
|
||||||
|
#endif
|
||||||
|
#if ENABLED(Z_2208)
|
||||||
|
#define INVERT_Z_DIR false
|
||||||
|
#else
|
||||||
|
#define INVERT_Z_DIR true
|
||||||
|
#endif
|
||||||
// @section extruder
|
// @section extruder
|
||||||
|
|
||||||
// For direct drive extruder v9 set to true, for geared extruder set to false.
|
// For direct drive extruder v9 set to true, for geared extruder set to false.
|
||||||
#define INVERT_E0_DIR true
|
#if ENABLED(E_2208) && DISABLED(TREX3)
|
||||||
#define INVERT_E1_DIR false
|
#define INVERT_E0_DIR true
|
||||||
|
#define INVERT_E1_DIR false
|
||||||
|
#else
|
||||||
|
#define INVERT_E0_DIR false
|
||||||
|
#define INVERT_E1_DIR true
|
||||||
|
#endif
|
||||||
#define INVERT_E2_DIR false
|
#define INVERT_E2_DIR false
|
||||||
#define INVERT_E3_DIR false
|
#define INVERT_E3_DIR false
|
||||||
#define INVERT_E4_DIR false
|
#define INVERT_E4_DIR false
|
||||||
@@ -1046,13 +1196,13 @@
|
|||||||
|
|
||||||
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
|
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
|
||||||
|
|
||||||
//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
|
#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
|
||||||
// Be sure you have this distance over your Z_MAX_POS in case.
|
// Be sure you have this distance over your Z_MAX_POS in case.
|
||||||
|
|
||||||
// Direction of endstops when homing; 1=MAX, -1=MIN
|
// Direction of endstops when homing; 1=MAX, -1=MIN
|
||||||
// :[-1,1]
|
// :[-1,1]
|
||||||
#define X_HOME_DIR -1
|
#define X_HOME_DIR -1
|
||||||
#define Y_HOME_DIR 1
|
#define Y_HOME_DIR 1
|
||||||
#define Z_HOME_DIR -1
|
#define Z_HOME_DIR -1
|
||||||
|
|
||||||
// @section machine
|
// @section machine
|
||||||
@@ -1062,12 +1212,24 @@
|
|||||||
#define Y_BED_SIZE 400
|
#define Y_BED_SIZE 400
|
||||||
|
|
||||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||||
#define X_MIN_POS 0
|
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
|
||||||
#define Y_MIN_POS 0
|
#define X_MIN_POS -42
|
||||||
#define Z_MIN_POS 0
|
#define Y_MIN_POS 0
|
||||||
#define X_MAX_POS X_BED_SIZE
|
#define Z_MIN_POS -3
|
||||||
#define Y_MAX_POS Y_BED_SIZE
|
#define X_MAX_POS 450
|
||||||
#define Z_MAX_POS 450
|
#define Y_MAX_POS Y_BED_SIZE
|
||||||
|
#else
|
||||||
|
#define X_MIN_POS -47
|
||||||
|
#define Y_MIN_POS 0
|
||||||
|
#define Z_MIN_POS -3
|
||||||
|
#define X_MAX_POS 460
|
||||||
|
#define Y_MAX_POS Y_BED_SIZE
|
||||||
|
#endif
|
||||||
|
#if(ENABLED(tallVersion))
|
||||||
|
#define Z_MAX_POS 700
|
||||||
|
#else
|
||||||
|
#define Z_MAX_POS 500
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Software Endstops
|
* Software Endstops
|
||||||
@@ -1095,7 +1257,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
||||||
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
|
#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1106,10 +1268,20 @@
|
|||||||
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
|
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
|
||||||
* By default the firmware assumes HIGH=FILAMENT PRESENT.
|
* By default the firmware assumes HIGH=FILAMENT PRESENT.
|
||||||
*/
|
*/
|
||||||
//#define FILAMENT_RUNOUT_SENSOR
|
#if ENABLED(FilamentSensor)
|
||||||
|
#define FILAMENT_RUNOUT_SENSOR
|
||||||
|
#endif
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
|
#if ENABLED(TREX3)
|
||||||
|
#define NUM_RUNOUT_SENSORS 2
|
||||||
|
#else
|
||||||
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
|
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
|
||||||
#define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor.
|
#endif
|
||||||
|
#if ENABLED(lerdgeFilSensor) || ENABLED(TREX3)
|
||||||
|
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
|
||||||
|
#else
|
||||||
|
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.
|
||||||
|
#endif
|
||||||
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
|
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
|
||||||
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
|
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
|
||||||
|
|
||||||
@@ -1120,7 +1292,7 @@
|
|||||||
// After a runout is detected, continue printing this length of filament
|
// After a runout is detected, continue printing this length of filament
|
||||||
// before executing the runout script. Useful for a sensor at the end of
|
// before executing the runout script. Useful for a sensor at the end of
|
||||||
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
|
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
|
||||||
//#define FILAMENT_RUNOUT_DISTANCE_MM 25
|
#define FILAMENT_RUNOUT_DISTANCE_MM 5
|
||||||
|
|
||||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||||
// Enable this option to use an encoder disc that toggles the runout pin
|
// Enable this option to use an encoder disc that toggles the runout pin
|
||||||
@@ -1170,8 +1342,11 @@
|
|||||||
*/
|
*/
|
||||||
//#define AUTO_BED_LEVELING_3POINT
|
//#define AUTO_BED_LEVELING_3POINT
|
||||||
//#define AUTO_BED_LEVELING_LINEAR
|
//#define AUTO_BED_LEVELING_LINEAR
|
||||||
//#define AUTO_BED_LEVELING_BILINEAR
|
#if ENABLED(ABL_Bilinear)
|
||||||
#define AUTO_BED_LEVELING_UBL
|
#define AUTO_BED_LEVELING_BILINEAR
|
||||||
|
#else
|
||||||
|
#define AUTO_BED_LEVELING_UBL
|
||||||
|
#endif
|
||||||
//#define MESH_BED_LEVELING
|
//#define MESH_BED_LEVELING
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1196,8 +1371,8 @@
|
|||||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||||
// split up moves into short segments like a Delta. This follows the
|
// split up moves into short segments like a Delta. This follows the
|
||||||
// contours of the bed more closely than edge-to-edge straight moves.
|
// contours of the bed more closely than edge-to-edge straight moves.
|
||||||
#define SEGMENT_LEVELED_MOVES
|
//#define SEGMENT_LEVELED_MOVES
|
||||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
//#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the G26 Mesh Validation Pattern tool.
|
* Enable the G26 Mesh Validation Pattern tool.
|
||||||
@@ -1216,7 +1391,7 @@
|
|||||||
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
||||||
|
|
||||||
// Set the number of grid points per dimension.
|
// Set the number of grid points per dimension.
|
||||||
#define GRID_MAX_POINTS_X 3
|
#define GRID_MAX_POINTS_X 11
|
||||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||||
|
|
||||||
// Probe along the Y axis, advancing X after each column
|
// Probe along the Y axis, advancing X after each column
|
||||||
@@ -1246,16 +1421,16 @@
|
|||||||
//========================= Unified Bed Leveling ============================
|
//========================= Unified Bed Leveling ============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||||
|
|
||||||
#define MESH_INSET 5 // Set Mesh bounds as an inset region of the bed
|
#define MESH_INSET 3 // Set Mesh bounds as an inset region of the bed
|
||||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
#define GRID_MAX_POINTS_X 15 // Don't use more than 15 points per axis, implementation limited.
|
||||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||||
|
|
||||||
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
|
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
|
||||||
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
|
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
|
||||||
|
|
||||||
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
|
#define UBL_Z_RAISE_WHEN_OFF_MESH 0.0 // When the nozzle is off the mesh, this value is used
|
||||||
// as the Z-Height correction value.
|
// as the Z-Height correction value.
|
||||||
|
|
||||||
#elif ENABLED(MESH_BED_LEVELING)
|
#elif ENABLED(MESH_BED_LEVELING)
|
||||||
@@ -1276,12 +1451,12 @@
|
|||||||
* Add a bed leveling sub-menu for ABL or MBL.
|
* Add a bed leveling sub-menu for ABL or MBL.
|
||||||
* Include a guided procedure if manual probing is enabled.
|
* Include a guided procedure if manual probing is enabled.
|
||||||
*/
|
*/
|
||||||
#define LCD_BED_LEVELING
|
//#define LCD_BED_LEVELING
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_LEVELING)
|
#if ENABLED(LCD_BED_LEVELING)
|
||||||
#define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
|
#define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
|
||||||
#define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
|
#define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||||
#define MESH_EDIT_MENU // Add a menu to edit mesh points
|
//#define MESH_EDIT_MENU // Add a menu to edit mesh points
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add a menu item to move between bed corners for manual bed adjustment
|
// Add a menu item to move between bed corners for manual bed adjustment
|
||||||
@@ -1310,7 +1485,7 @@
|
|||||||
// For DELTA this is the top-center of the Cartesian print volume.
|
// For DELTA this is the top-center of the Cartesian print volume.
|
||||||
//#define MANUAL_X_HOME_POS 0
|
//#define MANUAL_X_HOME_POS 0
|
||||||
//#define MANUAL_Y_HOME_POS 0
|
//#define MANUAL_Y_HOME_POS 0
|
||||||
//#define MANUAL_Z_HOME_POS 0
|
#define MANUAL_Z_HOME_POS 0
|
||||||
|
|
||||||
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
|
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
|
||||||
//
|
//
|
||||||
@@ -1330,7 +1505,7 @@
|
|||||||
|
|
||||||
// Homing speeds (mm/m)
|
// Homing speeds (mm/m)
|
||||||
#define HOMING_FEEDRATE_XY (50*60)
|
#define HOMING_FEEDRATE_XY (50*60)
|
||||||
#define HOMING_FEEDRATE_Z (4*60)
|
#define HOMING_FEEDRATE_Z (6*60)
|
||||||
|
|
||||||
// Validate that endstops are triggered on homing moves
|
// Validate that endstops are triggered on homing moves
|
||||||
#define VALIDATE_HOMING_ENDSTOPS
|
#define VALIDATE_HOMING_ENDSTOPS
|
||||||
@@ -1467,7 +1642,7 @@
|
|||||||
|
|
||||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||||
// Specify a park position as { X, Y, Z_raise }
|
// Specify a park position as { X, Y, Z_raise }
|
||||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 30), (Y_MIN_POS + 10), 5 }
|
#define NOZZLE_PARK_POINT { 150, (Y_MIN_POS + 10), 10 }
|
||||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
|
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
|
||||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
|
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
|
||||||
#endif
|
#endif
|
||||||
@@ -1735,7 +1910,7 @@
|
|||||||
//
|
//
|
||||||
// Note: Usually sold with a white PCB.
|
// Note: Usually sold with a white PCB.
|
||||||
//
|
//
|
||||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||||
|
|
||||||
//
|
//
|
||||||
// Original RADDS LCD Display+Encoder+SDCardReader
|
// Original RADDS LCD Display+Encoder+SDCardReader
|
||||||
@@ -1775,7 +1950,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||||
// https://www.aliexpress.com/item/32765887917.html
|
// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
|
||||||
//
|
//
|
||||||
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
|
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
|
||||||
|
|
||||||
@@ -1875,7 +2050,7 @@
|
|||||||
// RepRapDiscount FULL GRAPHIC Smart Controller
|
// RepRapDiscount FULL GRAPHIC Smart Controller
|
||||||
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
||||||
//
|
//
|
||||||
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||||
|
|
||||||
//
|
//
|
||||||
// ReprapWorld Graphical LCD
|
// ReprapWorld Graphical LCD
|
||||||
@@ -1949,7 +2124,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Factory display for Creality CR-10
|
// Factory display for Creality CR-10
|
||||||
// https://www.aliexpress.com/item/32833148327.html
|
// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
|
||||||
//
|
//
|
||||||
// This is RAMPS-compatible using a single 10-pin connector.
|
// This is RAMPS-compatible using a single 10-pin connector.
|
||||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||||
@@ -1967,7 +2142,7 @@
|
|||||||
|
|
||||||
//
|
//
|
||||||
// AZSMZ 12864 LCD with SD
|
// AZSMZ 12864 LCD with SD
|
||||||
// https://www.aliexpress.com/item/32837222770.html
|
// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
|
||||||
//
|
//
|
||||||
//#define AZSMZ_12864
|
//#define AZSMZ_12864
|
||||||
|
|
||||||
@@ -2034,10 +2209,10 @@
|
|||||||
//#define MALYAN_LCD
|
//#define MALYAN_LCD
|
||||||
|
|
||||||
//
|
//
|
||||||
// Touch UI for FTDI EVE (FT800/FT810) displays
|
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||||
// See Configuration_adv.h for all configuration options.
|
// See Configuration_adv.h for all configuration options.
|
||||||
//
|
//
|
||||||
//#define TOUCH_UI_FTDI_EVE
|
//#define LULZBOT_TOUCH_UI
|
||||||
|
|
||||||
//
|
//
|
||||||
// Third-party or vendor-customized controller interfaces.
|
// Third-party or vendor-customized controller interfaces.
|
||||||
@@ -2091,8 +2266,9 @@
|
|||||||
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
|
||||||
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
|
||||||
// is too low, you should also increment SOFT_PWM_SCALE.
|
// is too low, you should also increment SOFT_PWM_SCALE.
|
||||||
//#define FAN_SOFT_PWM
|
#if ENABLED(TREX3)
|
||||||
|
#define FAN_SOFT_PWM
|
||||||
|
#endif
|
||||||
// Incrementing this by 1 will double the software PWM frequency,
|
// Incrementing this by 1 will double the software PWM frequency,
|
||||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
||||||
// However, control resolution will be halved for each increment;
|
// However, control resolution will be halved for each increment;
|
||||||
|
|||||||
+170
-215
@@ -137,7 +137,7 @@
|
|||||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||||
*/
|
*/
|
||||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||||
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
|
#define THERMAL_PROTECTION_PERIOD 60 // Seconds
|
||||||
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
|
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
|
||||||
|
|
||||||
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
|
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
|
||||||
* below 2.
|
* below 2.
|
||||||
*/
|
*/
|
||||||
#define WATCH_TEMP_PERIOD 20 // Seconds
|
#define WATCH_TEMP_PERIOD 60 // Seconds
|
||||||
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
|
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -165,13 +165,13 @@
|
|||||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||||
*/
|
*/
|
||||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
|
#define THERMAL_PROTECTION_BED_PERIOD 80 // Seconds
|
||||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* As described above, except for the bed (M140/M190/M303).
|
* As described above, except for the bed (M140/M190/M303).
|
||||||
*/
|
*/
|
||||||
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
|
#define WATCH_BED_TEMP_PERIOD 80 // Seconds
|
||||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -197,56 +197,6 @@
|
|||||||
#define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
|
#define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
|
||||||
#define LPQ_MAX_LEN 50
|
#define LPQ_MAX_LEN 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an experimental additional term to the heater power, proportional to the fan speed.
|
|
||||||
* A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
|
|
||||||
* You can either just add a constant compensation with the DEFAULT_Kf value
|
|
||||||
* or follow the instruction below to get speed-dependent compensation.
|
|
||||||
*
|
|
||||||
* Constant compensation (use only with fanspeeds of 0% and 100%)
|
|
||||||
* ---------------------------------------------------------------------
|
|
||||||
* A good starting point for the Kf-value comes from the calculation:
|
|
||||||
* kf = (power_fan * eff_fan) / power_heater * 255
|
|
||||||
* where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
|
|
||||||
* Kf = (2.4W * 0.8) / 40W * 255 = 12.24
|
|
||||||
*
|
|
||||||
* Fan-speed dependent compensation
|
|
||||||
* --------------------------------
|
|
||||||
* 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
|
|
||||||
* Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
|
|
||||||
* If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
|
|
||||||
* drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
|
|
||||||
* 2. Note the Kf-value for fan-speed at 100%
|
|
||||||
* 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
|
|
||||||
* 4. Repeat step 1. and 2. for this fan speed.
|
|
||||||
* 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
|
|
||||||
* PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
|
|
||||||
*/
|
|
||||||
//#define PID_FAN_SCALING
|
|
||||||
#if ENABLED(PID_FAN_SCALING)
|
|
||||||
//#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
|
|
||||||
#if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
|
|
||||||
// The alternative definition is used for an easier configuration.
|
|
||||||
// Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
|
|
||||||
// DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
|
|
||||||
|
|
||||||
#define PID_FAN_SCALING_AT_FULL_SPEED 13.0 //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
|
|
||||||
#define PID_FAN_SCALING_AT_MIN_SPEED 6.0 //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
|
|
||||||
#define PID_FAN_SCALING_MIN_SPEED 10.0 // Minimum fan speed at which to enable PID_FAN_SCALING
|
|
||||||
|
|
||||||
#define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
|
|
||||||
#define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define PID_FAN_SCALING_LIN_FACTOR (0) // Power loss due to cooling = Kf * (fan_speed)
|
|
||||||
#define DEFAULT_Kf 10 // A constant value added to the PID-tuner
|
|
||||||
#define PID_FAN_SCALING_MIN_SPEED 10 // Minimum fan speed at which to enable PID_FAN_SCALING
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -265,7 +215,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Show extra position information with 'M114 D'
|
// Show extra position information with 'M114 D'
|
||||||
//#define M114_DETAIL
|
#define M114_DETAIL
|
||||||
|
|
||||||
// Show Temperature ADC value
|
// Show Temperature ADC value
|
||||||
// Enable for M105 to include ADC values read from temperature sensors.
|
// Enable for M105 to include ADC values read from temperature sensors.
|
||||||
@@ -338,10 +288,7 @@
|
|||||||
// When first starting the main fan, run it at full speed for the
|
// When first starting the main fan, run it at full speed for the
|
||||||
// given number of milliseconds. This gets the fan spinning reliably
|
// given number of milliseconds. This gets the fan spinning reliably
|
||||||
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
||||||
//#define FAN_KICKSTART_TIME 100
|
#define FAN_KICKSTART_TIME 100
|
||||||
|
|
||||||
// Some coolers may require a non-zero "off" state.
|
|
||||||
//#define FAN_OFF_PWM 1
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PWM Fan Scaling
|
* PWM Fan Scaling
|
||||||
@@ -399,8 +346,14 @@
|
|||||||
* Multiple extruders can be assigned to the same pin in which case
|
* Multiple extruders can be assigned to the same pin in which case
|
||||||
* the fan will turn on when any selected extruder is above the threshold.
|
* the fan will turn on when any selected extruder is above the threshold.
|
||||||
*/
|
*/
|
||||||
#define E0_AUTO_FAN_PIN -1
|
#if ENABLED(TREX3)
|
||||||
#define E1_AUTO_FAN_PIN -1
|
#define E0_AUTO_FAN_PIN 6
|
||||||
|
#define E1_AUTO_FAN_PIN 45
|
||||||
|
#else
|
||||||
|
#define E0_AUTO_FAN_PIN -1
|
||||||
|
#define E1_AUTO_FAN_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define E2_AUTO_FAN_PIN -1
|
#define E2_AUTO_FAN_PIN -1
|
||||||
#define E3_AUTO_FAN_PIN -1
|
#define E3_AUTO_FAN_PIN -1
|
||||||
#define E4_AUTO_FAN_PIN -1
|
#define E4_AUTO_FAN_PIN -1
|
||||||
@@ -426,15 +379,15 @@
|
|||||||
/**
|
/**
|
||||||
* M355 Case Light on-off / brightness
|
* M355 Case Light on-off / brightness
|
||||||
*/
|
*/
|
||||||
//#define CASE_LIGHT_ENABLE
|
#define CASE_LIGHT_ENABLE
|
||||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||||
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
|
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
|
||||||
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
||||||
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
||||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
|
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
|
||||||
//#define CASE_LIGHT_MAX_PWM 128 // Limit pwm
|
//#define CASE_LIGHT_MAX_PWM 128 // Limit pwm
|
||||||
//#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||||
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
||||||
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
|
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
|
||||||
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
||||||
#define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
|
#define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
|
||||||
@@ -541,12 +494,16 @@
|
|||||||
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
|
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
|
||||||
* follow with M605 S3 to initiate mirrored movement.
|
* follow with M605 S3 to initiate mirrored movement.
|
||||||
*/
|
*/
|
||||||
//#define DUAL_X_CARRIAGE
|
#define DUAL_X_CARRIAGE
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#if ENABLED(DUAL_X_CARRIAGE)
|
||||||
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
|
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
|
||||||
#define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage
|
#define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage
|
||||||
#define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage
|
#define X2_MIN_POS 0 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage
|
||||||
#define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed
|
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
|
||||||
|
#define X2_MAX_POS 442 // Set this to the distance between toolheads when both heads are homed
|
||||||
|
#else
|
||||||
|
#define X2_MAX_POS 446 // Set this to the distance between toolheads when both heads are homed
|
||||||
|
#endif
|
||||||
#define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position
|
#define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position
|
||||||
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
|
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
|
||||||
// However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
|
// However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
|
||||||
@@ -558,7 +515,7 @@
|
|||||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
|
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
|
||||||
|
|
||||||
// Default x offset in duplication mode (typically set to half print bed width)
|
// Default x offset in duplication mode (typically set to half print bed width)
|
||||||
#define DEFAULT_DUPLICATION_X_OFFSET 100
|
#define DEFAULT_DUPLICATION_X_OFFSET 200
|
||||||
|
|
||||||
#endif // DUAL_X_CARRIAGE
|
#endif // DUAL_X_CARRIAGE
|
||||||
|
|
||||||
@@ -656,7 +613,7 @@
|
|||||||
//#define Z_STEPPER_AUTO_ALIGN
|
//#define Z_STEPPER_AUTO_ALIGN
|
||||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||||
// Define probe X and Y positions for Z1, Z2 [, Z3]
|
// Define probe X and Y positions for Z1, Z2 [, Z3]
|
||||||
#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }
|
#define Z_STEPPER_ALIGN_XY { { 10, 290 }, { 150, 10 }, { 290, 290 } }
|
||||||
|
|
||||||
// Provide Z stepper positions for more rapid convergence in bed alignment.
|
// Provide Z stepper positions for more rapid convergence in bed alignment.
|
||||||
// Currently requires triple stepper drivers.
|
// Currently requires triple stepper drivers.
|
||||||
@@ -691,7 +648,7 @@
|
|||||||
#define AXIS_RELATIVE_MODES { false, false, false, false }
|
#define AXIS_RELATIVE_MODES { false, false, false, false }
|
||||||
|
|
||||||
// Add a Duplicate option for well-separated conjoined nozzles
|
// Add a Duplicate option for well-separated conjoined nozzles
|
||||||
#define MULTI_NOZZLE_DUPLICATION
|
//#define MULTI_NOZZLE_DUPLICATION
|
||||||
|
|
||||||
// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
|
// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
|
||||||
#define INVERT_X_STEP_PIN false
|
#define INVERT_X_STEP_PIN false
|
||||||
@@ -916,7 +873,7 @@
|
|||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
|
|
||||||
// Include a page of printer information in the LCD Main Menu
|
// Include a page of printer information in the LCD Main Menu
|
||||||
//#define LCD_INFO_MENU
|
#define LCD_INFO_MENU
|
||||||
#if ENABLED(LCD_INFO_MENU)
|
#if ENABLED(LCD_INFO_MENU)
|
||||||
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
|
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
|
||||||
#endif
|
#endif
|
||||||
@@ -944,31 +901,25 @@
|
|||||||
#endif // HAS_LCD_MENU
|
#endif // HAS_LCD_MENU
|
||||||
|
|
||||||
// Scroll a longer status message into view
|
// Scroll a longer status message into view
|
||||||
//#define STATUS_MESSAGE_SCROLLING
|
#define STATUS_MESSAGE_SCROLLING
|
||||||
|
|
||||||
// On the Info Screen, display XY with one decimal place when possible
|
// On the Info Screen, display XY with one decimal place when possible
|
||||||
//#define LCD_DECIMAL_SMALL_XY
|
#define LCD_DECIMAL_SMALL_XY
|
||||||
|
|
||||||
// The timeout (in ms) to return to the status screen from sub-menus
|
// The timeout (in ms) to return to the status screen from sub-menus
|
||||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
#define LCD_TIMEOUT_TO_STATUS 15000
|
||||||
|
|
||||||
// Add an 'M73' G-code to set the current percentage
|
// Add an 'M73' G-code to set the current percentage
|
||||||
#define LCD_SET_PROGRESS_MANUALLY
|
#define LCD_SET_PROGRESS_MANUALLY
|
||||||
|
|
||||||
// Show the E position (filament used) during printing
|
|
||||||
//#define LCD_SHOW_E_TOTAL
|
|
||||||
|
|
||||||
#if HAS_GRAPHICAL_LCD && HAS_PRINT_PROGRESS
|
#if HAS_GRAPHICAL_LCD && HAS_PRINT_PROGRESS
|
||||||
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
|
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
|
||||||
//#define SHOW_REMAINING_TIME // Display estimated time to completion
|
//#define SHOW_REMAINING_TIME // Display estimated time to completion
|
||||||
#if ENABLED(SHOW_REMAINING_TIME)
|
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
|
||||||
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
|
|
||||||
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
|
#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
|
||||||
#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
|
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
|
||||||
#if ENABLED(LCD_PROGRESS_BAR)
|
#if ENABLED(LCD_PROGRESS_BAR)
|
||||||
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
|
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
|
||||||
#define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
|
#define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
|
||||||
@@ -1010,8 +961,6 @@
|
|||||||
*/
|
*/
|
||||||
//#define POWER_LOSS_RECOVERY
|
//#define POWER_LOSS_RECOVERY
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
|
|
||||||
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
|
|
||||||
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
|
||||||
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||||
//#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
|
//#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
|
||||||
@@ -1062,10 +1011,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This allows hosts to request long names for files and folders with M33
|
// This allows hosts to request long names for files and folders with M33
|
||||||
//#define LONG_FILENAME_HOST_SUPPORT
|
#define LONG_FILENAME_HOST_SUPPORT
|
||||||
|
|
||||||
// Enable this option to scroll long filenames in the SD card menu
|
// Enable this option to scroll long filenames in the SD card menu
|
||||||
//#define SCROLL_LONG_FILENAMES
|
#define SCROLL_LONG_FILENAMES
|
||||||
|
|
||||||
// Leave the heaters on after Stop Print (not recommended!)
|
// Leave the heaters on after Stop Print (not recommended!)
|
||||||
//#define SD_ABORT_NO_COOLDOWN
|
//#define SD_ABORT_NO_COOLDOWN
|
||||||
@@ -1087,7 +1036,7 @@
|
|||||||
/**
|
/**
|
||||||
* Auto-report SdCard status with M27 S<seconds>
|
* Auto-report SdCard status with M27 S<seconds>
|
||||||
*/
|
*/
|
||||||
//#define AUTO_REPORT_SD_STATUS
|
#define AUTO_REPORT_SD_STATUS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Support for USB thumb drives using an Arduino USB Host Shield or
|
* Support for USB thumb drives using an Arduino USB Host Shield or
|
||||||
@@ -1244,9 +1193,9 @@
|
|||||||
#endif // HAS_GRAPHICAL_LCD
|
#endif // HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
//
|
//
|
||||||
// Touch UI for the FTDI Embedded Video Engine (EVE)
|
// Lulzbot Touch UI
|
||||||
//
|
//
|
||||||
#if ENABLED(TOUCH_UI_FTDI_EVE)
|
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||||
// Display board used
|
// Display board used
|
||||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||||
@@ -1324,9 +1273,6 @@
|
|||||||
|
|
||||||
// Output extra debug info for Touch UI events
|
// Output extra debug info for Touch UI events
|
||||||
//#define TOUCH_UI_DEBUG
|
//#define TOUCH_UI_DEBUG
|
||||||
|
|
||||||
// Developer menu (accessed by touching "About Printer" copyright text)
|
|
||||||
//#define TOUCH_UI_DEVELOPER_MENU
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1369,12 +1315,11 @@
|
|||||||
#define BABYSTEPPING
|
#define BABYSTEPPING
|
||||||
#if ENABLED(BABYSTEPPING)
|
#if ENABLED(BABYSTEPPING)
|
||||||
//#define BABYSTEP_WITHOUT_HOMING
|
//#define BABYSTEP_WITHOUT_HOMING
|
||||||
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
|
#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
|
||||||
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
|
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
|
||||||
#define BABYSTEP_MULTIPLICATOR_Z 10 // Babysteps are very small. Increase for faster motion.
|
#define BABYSTEP_MULTIPLICATOR 20 // Babysteps are very small. Increase for faster motion.
|
||||||
#define BABYSTEP_MULTIPLICATOR_XY 1
|
|
||||||
|
|
||||||
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
|
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
|
||||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
|
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
|
||||||
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
|
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
|
||||||
// Note: Extra time may be added to mitigate controller latency.
|
// Note: Extra time may be added to mitigate controller latency.
|
||||||
@@ -1390,7 +1335,7 @@
|
|||||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||||
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
||||||
//#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1412,10 +1357,12 @@
|
|||||||
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
|
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
|
||||||
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
|
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
|
||||||
*/
|
*/
|
||||||
//#define LIN_ADVANCE
|
#if DISABLED(E_2208) || ENABLED(E_Spreadcycle)
|
||||||
|
#define LIN_ADVANCE
|
||||||
|
#endif
|
||||||
#if ENABLED(LIN_ADVANCE)
|
#if ENABLED(LIN_ADVANCE)
|
||||||
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
|
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
|
||||||
#define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
|
#define LIN_ADVANCE_K 0.0 // Unit: mm compression per 1mm/s extruder speed
|
||||||
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
|
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1459,10 +1406,10 @@
|
|||||||
|
|
||||||
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||||
// Override the mesh area if the automatic (max) area is too large
|
// Override the mesh area if the automatic (max) area is too large
|
||||||
//#define MESH_MIN_X MESH_INSET
|
#define MESH_MIN_X X_MIN_POS + MESH_INSET
|
||||||
//#define MESH_MIN_Y MESH_INSET
|
#define MESH_MIN_Y Y_MIN_POS + MESH_INSET
|
||||||
//#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
|
#define MESH_MAX_X X_MAX_POS - MESH_INSET
|
||||||
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
|
#define MESH_MAX_Y Y_MAX_POS - MESH_INSET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1498,7 +1445,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
|
||||||
//#define BEZIER_CURVE_SUPPORT
|
#define BEZIER_CURVE_SUPPORT
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G38 Probe Target
|
* G38 Probe Target
|
||||||
@@ -1548,12 +1495,12 @@
|
|||||||
/**
|
/**
|
||||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||||
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
||||||
* 5000000 : Maximum for TMC2xxx stepper drivers
|
* 500000 : Maximum for A4988 stepper driver
|
||||||
* 1000000 : Maximum for LV8729 stepper driver
|
* 400000 : Maximum for TMC2xxx stepper drivers
|
||||||
* 500000 : Maximum for A4988 stepper driver
|
* 250000 : Maximum for DRV8825 stepper driver
|
||||||
* 250000 : Maximum for DRV8825 stepper driver
|
* 200000 : Maximum for LV8729 stepper driver
|
||||||
* 150000 : Maximum for TB6600 stepper driver
|
* 150000 : Maximum for TB6600 stepper driver
|
||||||
* 15000 : Maximum for TB6560 stepper driver
|
* 15000 : Maximum for TB6560 stepper driver
|
||||||
*
|
*
|
||||||
* Override the default value based on the driver type set in Configuration.h.
|
* Override the default value based on the driver type set in Configuration.h.
|
||||||
*/
|
*/
|
||||||
@@ -1663,7 +1610,9 @@
|
|||||||
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//#define FWRETRACT
|
#if ENABLED(ABL_Bilinear)
|
||||||
|
#define FWRETRACT
|
||||||
|
#endif
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
#define FWRETRACT_AUTORETRACT // Override slicer retractions
|
#define FWRETRACT_AUTORETRACT // Override slicer retractions
|
||||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||||
@@ -1689,16 +1638,16 @@
|
|||||||
*/
|
*/
|
||||||
#if EXTRUDERS > 1
|
#if EXTRUDERS > 1
|
||||||
// Z raise distance for tool-change, as needed for some extruders
|
// Z raise distance for tool-change, as needed for some extruders
|
||||||
#define TOOLCHANGE_ZRAISE 2 // (mm)
|
#define TOOLCHANGE_ZRAISE 1 // (mm)
|
||||||
#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
|
#define TOOLCHANGE_NO_RETURN // Don't return to the previous position on tool-change
|
||||||
|
|
||||||
// Retract and prime filament on tool-change
|
// Retract and prime filament on tool-change
|
||||||
#define TOOLCHANGE_FILAMENT_SWAP
|
#define TOOLCHANGE_FILAMENT_SWAP
|
||||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||||
#define TOOLCHANGE_FIL_SWAP_LENGTH 6 // (mm)
|
#define TOOLCHANGE_FIL_SWAP_LENGTH 4 // (mm)
|
||||||
#define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
|
#define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
|
||||||
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
|
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3000 // (mm/m)
|
||||||
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
|
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3000 // (mm/m)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1722,47 +1671,46 @@
|
|||||||
* Requires NOZZLE_PARK_FEATURE.
|
* Requires NOZZLE_PARK_FEATURE.
|
||||||
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
|
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
|
||||||
*/
|
*/
|
||||||
//#define ADVANCED_PAUSE_FEATURE
|
#define ADVANCED_PAUSE_FEATURE
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
|
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
|
||||||
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||||
// This short retract is done immediately, before parking the nozzle.
|
// This short retract is done immediately, before parking the nozzle.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
#define FILAMENT_CHANGE_UNLOAD_LENGTH 70 // (mm) The length of filament for a complete unload.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
// Set to 0 for manual unloading.
|
// Set to 0 for manual unloading.
|
||||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||||
// 0 to disable start loading and skip to fast load only
|
// 0 to disable start loading and skip to fast load only
|
||||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 50 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||||
// For Bowden, the full length of the tube and nozzle.
|
// For Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the nozzle.
|
// For direct drive, the full length of the nozzle.
|
||||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||||
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||||
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
|
#define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
|
||||||
// Set to 0 for manual extrusion.
|
// Set to 0 for manual extrusion.
|
||||||
// Filament can be extruded repeatedly from the Filament Change menu
|
// Filament can be extruded repeatedly from the Filament Change menu
|
||||||
// until extrusion is consistent, and to purge old filament.
|
// until extrusion is consistent, and to purge old filament.
|
||||||
#define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
|
#define ADVANCED_PAUSE_RESUME_PRIME 2 // (mm) Extra distance to prime nozzle after returning from park.
|
||||||
//#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||||
|
|
||||||
// Filament Unload does a Retract, Delay, and Purge first:
|
// Filament Unload does a Retract, Delay, and Purge first:
|
||||||
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
|
#define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length.
|
||||||
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
#define FILAMENT_UNLOAD_DELAY 2000 // (ms) Delay for the filament to cool after retract.
|
||||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
#define FILAMENT_UNLOAD_PURGE_LENGTH 0 // (mm) An unretract is done, then this length is purged.
|
||||||
|
|
||||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
#define FILAMENT_CHANGE_ALERT_BEEPS 1 // Number of alert beeps to play when a response is needed.
|
||||||
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
|
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
|
||||||
|
|
||||||
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||||
//#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
|
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
|
||||||
|
|
||||||
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||||
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1880,101 +1828,94 @@
|
|||||||
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
|
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
|
||||||
|
|
||||||
#if AXIS_IS_TMC(X)
|
#if AXIS_IS_TMC(X)
|
||||||
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
#define X_MICROSTEPS 16 // 0..256
|
||||||
#define X_MICROSTEPS 16 // 0..256
|
#define X_RSENSE 0.11
|
||||||
#define X_RSENSE 0.11
|
#define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
|
||||||
#define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(X2)
|
#if AXIS_IS_TMC(X2)
|
||||||
#define X2_CURRENT 800
|
#define X2_CURRENT 800
|
||||||
#define X2_CURRENT_HOME X2_CURRENT
|
#define X2_MICROSTEPS 16
|
||||||
#define X2_MICROSTEPS 16
|
#define X2_RSENSE 0.11
|
||||||
#define X2_RSENSE 0.11
|
#define X2_CHAIN_POS -1
|
||||||
#define X2_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(Y)
|
#if AXIS_IS_TMC(Y)
|
||||||
#define Y_CURRENT 800
|
#define Y_CURRENT 800
|
||||||
#define Y_CURRENT_HOME Y_CURRENT
|
#define Y_MICROSTEPS 16
|
||||||
#define Y_MICROSTEPS 16
|
#define Y_RSENSE 0.11
|
||||||
#define Y_RSENSE 0.11
|
#define Y_CHAIN_POS -1
|
||||||
#define Y_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(Y2)
|
#if AXIS_IS_TMC(Y2)
|
||||||
#define Y2_CURRENT 800
|
#define Y2_CURRENT 800
|
||||||
#define Y2_CURRENT_HOME Y2_CURRENT
|
#define Y2_MICROSTEPS 16
|
||||||
#define Y2_MICROSTEPS 16
|
#define Y2_RSENSE 0.11
|
||||||
#define Y2_RSENSE 0.11
|
#define Y2_CHAIN_POS -1
|
||||||
#define Y2_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(Z)
|
#if AXIS_IS_TMC(Z)
|
||||||
#define Z_CURRENT 800
|
#define Z_CURRENT 800
|
||||||
#define Z_CURRENT_HOME Z_CURRENT
|
#define Z_MICROSTEPS 16
|
||||||
#define Z_MICROSTEPS 16
|
#define Z_RSENSE 0.11
|
||||||
#define Z_RSENSE 0.11
|
#define Z_CHAIN_POS -1
|
||||||
#define Z_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(Z2)
|
#if AXIS_IS_TMC(Z2)
|
||||||
#define Z2_CURRENT 800
|
#define Z2_CURRENT 800
|
||||||
#define Z2_CURRENT_HOME Z2_CURRENT
|
#define Z2_MICROSTEPS 16
|
||||||
#define Z2_MICROSTEPS 16
|
#define Z2_RSENSE 0.11
|
||||||
#define Z2_RSENSE 0.11
|
#define Z2_CHAIN_POS -1
|
||||||
#define Z2_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(Z3)
|
#if AXIS_IS_TMC(Z3)
|
||||||
#define Z3_CURRENT 800
|
#define Z3_CURRENT 800
|
||||||
#define Z3_CURRENT_HOME Z3_CURRENT
|
#define Z3_MICROSTEPS 16
|
||||||
#define Z3_MICROSTEPS 16
|
#define Z3_RSENSE 0.11
|
||||||
#define Z3_RSENSE 0.11
|
#define Z3_CHAIN_POS -1
|
||||||
#define Z3_CHAIN_POS -1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E0)
|
#if AXIS_IS_TMC(E0)
|
||||||
#define E0_CURRENT 800
|
#define E0_CURRENT 800
|
||||||
#define E0_MICROSTEPS 16
|
#define E0_MICROSTEPS 16
|
||||||
#define E0_RSENSE 0.11
|
#define E0_RSENSE 0.11
|
||||||
#define E0_CHAIN_POS -1
|
#define E0_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E1)
|
#if AXIS_IS_TMC(E1)
|
||||||
#define E1_CURRENT 800
|
#define E1_CURRENT 800
|
||||||
#define E1_MICROSTEPS 16
|
#define E1_MICROSTEPS 16
|
||||||
#define E1_RSENSE 0.11
|
#define E1_RSENSE 0.11
|
||||||
#define E1_CHAIN_POS -1
|
#define E1_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E2)
|
#if AXIS_IS_TMC(E2)
|
||||||
#define E2_CURRENT 800
|
#define E2_CURRENT 800
|
||||||
#define E2_MICROSTEPS 16
|
#define E2_MICROSTEPS 16
|
||||||
#define E2_RSENSE 0.11
|
#define E2_RSENSE 0.11
|
||||||
#define E2_CHAIN_POS -1
|
#define E2_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E3)
|
#if AXIS_IS_TMC(E3)
|
||||||
#define E3_CURRENT 800
|
#define E3_CURRENT 800
|
||||||
#define E3_MICROSTEPS 16
|
#define E3_MICROSTEPS 16
|
||||||
#define E3_RSENSE 0.11
|
#define E3_RSENSE 0.11
|
||||||
#define E3_CHAIN_POS -1
|
#define E3_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E4)
|
#if AXIS_IS_TMC(E4)
|
||||||
#define E4_CURRENT 800
|
#define E4_CURRENT 800
|
||||||
#define E4_MICROSTEPS 16
|
#define E4_MICROSTEPS 16
|
||||||
#define E4_RSENSE 0.11
|
#define E4_RSENSE 0.11
|
||||||
#define E4_CHAIN_POS -1
|
#define E4_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_IS_TMC(E5)
|
#if AXIS_IS_TMC(E5)
|
||||||
#define E5_CURRENT 800
|
#define E5_CURRENT 800
|
||||||
#define E5_MICROSTEPS 16
|
#define E5_MICROSTEPS 16
|
||||||
#define E5_RSENSE 0.11
|
#define E5_RSENSE 0.11
|
||||||
#define E5_CHAIN_POS -1
|
#define E5_CHAIN_POS -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2128,6 +2069,8 @@
|
|||||||
*
|
*
|
||||||
* IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when
|
* IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when
|
||||||
* homing and adds a guard period for endstop triggering.
|
* homing and adds a guard period for endstop triggering.
|
||||||
|
*
|
||||||
|
* TMC2209 requires STEALTHCHOP enabled for SENSORLESS_HOMING
|
||||||
*/
|
*/
|
||||||
//#define SENSORLESS_HOMING // StallGuard capable drivers only
|
//#define SENSORLESS_HOMING // StallGuard capable drivers only
|
||||||
|
|
||||||
@@ -2168,8 +2111,8 @@
|
|||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* #define TMC_ADV() { \
|
* #define TMC_ADV() { \
|
||||||
* stepperX.diag0_otpw(1); \
|
* stepperX.diag0_temp_prewarn(1); \
|
||||||
* stepperY.intpol(0); \
|
* stepperY.interpolate(0); \
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
#define TMC_ADV() { }
|
#define TMC_ADV() { }
|
||||||
@@ -2401,14 +2344,16 @@
|
|||||||
*
|
*
|
||||||
* See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
|
* See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
|
||||||
*/
|
*/
|
||||||
//#define SPINDLE_FEATURE
|
|
||||||
//#define LASER_FEATURE
|
#if ENABLED(TREX3)
|
||||||
|
#define LASER_FEATURE
|
||||||
|
#endif
|
||||||
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
|
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
|
||||||
#define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH
|
#define SPINDLE_LASER_ACTIVE_HIGH true // Set to "true" if the on/off function is active HIGH
|
||||||
#define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power
|
#define SPINDLE_LASER_PWM false // Set to "true" if your controller supports setting the speed/power
|
||||||
#define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower
|
#define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower
|
||||||
#define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
#define SPINDLE_LASER_POWERUP_DELAY 1 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
||||||
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop
|
#define SPINDLE_LASER_POWERDOWN_DELAY 1 // (ms) Delay to allow the spindle to stop
|
||||||
|
|
||||||
#if ENABLED(SPINDLE_FEATURE)
|
#if ENABLED(SPINDLE_FEATURE)
|
||||||
//#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction
|
//#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction
|
||||||
@@ -2584,27 +2529,37 @@
|
|||||||
/**
|
/**
|
||||||
* User-defined menu items that execute custom GCode
|
* User-defined menu items that execute custom GCode
|
||||||
*/
|
*/
|
||||||
//#define CUSTOM_USER_MENUS
|
#define CUSTOM_USER_MENUS
|
||||||
#if ENABLED(CUSTOM_USER_MENUS)
|
#if ENABLED(CUSTOM_USER_MENUS)
|
||||||
//#define CUSTOM_USER_MENU_TITLE "Custom Commands"
|
//#define USER_SCRIPT_DONE "M117 User Script Done"
|
||||||
#define USER_SCRIPT_DONE "M117 User Script Done"
|
#define CUSTOM_USER_MENU_TITLE "Setup"
|
||||||
#define USER_SCRIPT_AUDIBLE_FEEDBACK
|
#define USER_SCRIPT_AUDIBLE_FEEDBACK
|
||||||
//#define USER_SCRIPT_RETURN // Return to status screen after a script
|
#define USER_SCRIPT_RETURN // Return to status screen after a script
|
||||||
|
|
||||||
#define USER_DESC_1 "Home & UBL Info"
|
#if ENABLED(TREX3)
|
||||||
#define USER_GCODE_1 "G28\nG29 W"
|
#define COMMFANNSPEED " "
|
||||||
|
#else
|
||||||
|
#define COMMFANNSPEED "M106 S128 \n"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
|
#define USER_DESC_1 "Mesh Setup"
|
||||||
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
#define USER_DESC_3 "Prep for Z Adjust"
|
||||||
|
#if ENABLED(ABL_Bilinear)
|
||||||
|
#define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 \n M500 \n G28 \n M420 S1 \n " COMMFANNSPEED " M109 S225 \n G1 X100 Y 100 \n G1 Z0 \n M77 \n M117 Set Z Offset"
|
||||||
|
#define USER_GCODE_3 "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n M420 S1 \n G1 X100 Y 100 \n G1 Z0"
|
||||||
|
#else
|
||||||
|
#define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 P1 \n G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n " COMMFANNSPEED " M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M77 \n M117 Set Z Offset"
|
||||||
|
#define USER_GCODE_3 "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
|
#define USER_DESC_4 "Fill Mesh Points"
|
||||||
#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
#define USER_GCODE_4 "G29 P3 \n G29 P3 \n G29 P3 \n G29 T"
|
||||||
|
|
||||||
#define USER_DESC_4 "Heat Bed/Home/Level"
|
#define USER_DESC_2 "PID Bed"
|
||||||
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
#define USER_GCODE_2 "M303 C4 S75 E-1 U \n M500 \n M117 PID Tune Done"
|
||||||
|
|
||||||
#define USER_DESC_5 "Home & Info"
|
#define USER_DESC_5 "Run Mesh Validation"
|
||||||
#define USER_GCODE_5 "G28\nM503"
|
#define USER_GCODE_5 "G26"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+20
-33
@@ -92,9 +92,6 @@ U8GLIB ?= 1
|
|||||||
# this defines whether to include the Trinamic TMCStepper library
|
# this defines whether to include the Trinamic TMCStepper library
|
||||||
TMC ?= 1
|
TMC ?= 1
|
||||||
|
|
||||||
# this defines whether to include the AdaFruit NeoPixel library
|
|
||||||
NEOPIXEL ?= 0
|
|
||||||
|
|
||||||
############
|
############
|
||||||
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
# Try to automatically determine whether RELOC_WORKAROUND is needed based
|
||||||
# on GCC versions:
|
# on GCC versions:
|
||||||
@@ -188,7 +185,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1109)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
|
||||||
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
# zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
|
||||||
# BigTreeTech or BIQU KFB2.0
|
# Bigtreetech or BIQU KFB2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
|
||||||
# Felix 2.0+ Electronics Board (RAMPS like)
|
# Felix 2.0+ Electronics Board (RAMPS like)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
|
||||||
@@ -254,14 +251,6 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1141)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
|
||||||
# Overlord/Overlord Pro
|
# Overlord/Overlord Pro
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
|
||||||
# ADIMLab Gantry v1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
|
|
||||||
# ADIMLab Gantry v2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
|
|
||||||
# BIQU Tango V1
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
|
|
||||||
# MKS GEN L V2
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# RAMBo and derivatives
|
# RAMBo and derivatives
|
||||||
@@ -288,44 +277,42 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1205)
|
|||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
|
||||||
# Cartesio CN Controls V12
|
# Cartesio CN Controls V12
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
|
||||||
# Cartesio CN Controls V15
|
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
|
||||||
# Cheaptronic v1.0
|
# Cheaptronic v1.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
|
||||||
# Cheaptronic v2.0
|
# Cheaptronic v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
|
||||||
# Makerbot Mightyboard Revision E
|
# Makerbot Mightyboard Revision E
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
|
||||||
# Megatronics
|
# Megatronics
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
|
||||||
# Megatronics v2.0
|
# Megatronics v2.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
|
||||||
# Megatronics v3.0
|
# Megatronics v3.0
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
|
||||||
# Megatronics v3.1
|
# Megatronics v3.1
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
|
||||||
# Megatronics v3.2
|
# Megatronics v3.2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
|
||||||
# Elefu Ra Board (v3)
|
# Elefu Ra Board (v3)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
|
||||||
# Leapfrog
|
# Leapfrog
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
|
||||||
# Mega controller
|
# Mega controller
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
|
||||||
# Geeetech GT2560 Rev B for Mecreator2
|
# Geeetech GT2560 Rev B for Mecreator2
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
|
||||||
# Geeetech GT2560 Rev. A
|
# Geeetech GT2560 Rev. A
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
|
||||||
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
# Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
|
||||||
# Geeetech GT2560 Rev B for A10(M/D)
|
# Geeetech GT2560 Rev B for A10(M/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
|
||||||
# Geeetech GT2560 Rev B for A20(M/D)
|
# Geeetech GT2560 Rev B for A20(M/D)
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
|
||||||
# Einstart retrofit
|
# Einstart retrofit
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
|
||||||
# Wanhao 0ne+ i3 Mini
|
# Wanhao 0ne+ i3 Mini
|
||||||
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
|
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ATmega1281, ATmega2561
|
# ATmega1281, ATmega2561
|
||||||
@@ -700,7 +687,7 @@ CXXSTANDARD = -std=gnu++11
|
|||||||
CDEBUG = -g$(DEBUG)
|
CDEBUG = -g$(DEBUG)
|
||||||
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
|
||||||
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
|
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
|
||||||
-fshort-enums -ffunction-sections -fdata-sections
|
-fshort-enums -ffunction-sections -fdata-sections
|
||||||
ifneq ($(HARDWARE_MOTHERBOARD),)
|
ifneq ($(HARDWARE_MOTHERBOARD),)
|
||||||
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
|
||||||
|
|||||||
+6
-6
@@ -28,25 +28,25 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin release version identifier
|
* Marlin release version identifier
|
||||||
*/
|
*/
|
||||||
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
|
#define SHORT_BUILD_VERSION "2.0.x_TR20"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verbose version identifier which should contain a reference to the location
|
* Verbose version identifier which should contain a reference to the location
|
||||||
* from where the binary was downloaded or the source code was compiled.
|
* from where the binary was downloaded or the source code was compiled.
|
||||||
*/
|
*/
|
||||||
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
|
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
|
#define STRING_DISTRIBUTION_DATE "2019-10-26"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||||
*/
|
*/
|
||||||
//#define MACHINE_NAME "3D Printer"
|
#define MACHINE_NAME "TM3D Trex"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
* has a distinct Github fork— the Source Code URL should just be the main
|
* has a distinct Github fork— the Source Code URL should just be the main
|
||||||
* Marlin repository.
|
* Marlin repository.
|
||||||
*/
|
*/
|
||||||
//#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
|
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/TM_Trex2+_2.0.x"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default generic printer UUID.
|
* Default generic printer UUID.
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
* The WEBSITE_URL is the location where users can get more information such as
|
* The WEBSITE_URL is the location where users can get more information such as
|
||||||
* documentation about a specific Marlin release.
|
* documentation about a specific Marlin release.
|
||||||
*/
|
*/
|
||||||
//#define WEBSITE_URL "http://marlinfw.org"
|
#define WEBSITE_URL "tinymachines3d.com"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the vendor info the serial USB interface, if changable
|
* Set the vendor info the serial USB interface, if changable
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
|
#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
|
||||||
|
};
|
||||||
Executable → Regular
+29
-25
@@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin 3D Printer Firmware
|
* Marlin 3D Printer Firmware
|
||||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
*
|
*
|
||||||
* Based on Sprinter and grbl.
|
* Based on Sprinter and grbl.
|
||||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -33,26 +33,29 @@
|
|||||||
//
|
//
|
||||||
// Status Screen Logo bitmap
|
// Status Screen Logo bitmap
|
||||||
//
|
//
|
||||||
#define STATUS_LOGO_Y 6
|
#define STATUS_LOGO_Y 3
|
||||||
#define STATUS_LOGO_WIDTH 40
|
#define STATUS_LOGO_WIDTH 24
|
||||||
|
|
||||||
const unsigned char status_logo_bmp[] PROGMEM = {
|
const unsigned char status_logo_bmp[] PROGMEM = {
|
||||||
B00011110,B00000000,B10000000,B00000000,B01111000,
|
B11111111,B11111111,B11111111,
|
||||||
B00010000,B00000000,B10000000,B00000000,B01000000,
|
B10000000,B00000000,B00000001,
|
||||||
B00010000,B10100011,B10011001,B01100000,B01110000,
|
B10001110,B00000000,B11100001,
|
||||||
B00011100,B11010100,B10100101,B10000000,B00001000,
|
B10011111,B00000001,B11110001,
|
||||||
B00010000,B10010100,B10111101,B00001111,B00001000,
|
B10010011,B10000001,B00111001,
|
||||||
B00010000,B10010100,B10100001,B00000000,B01001000,
|
B10011111,B10000001,B11111001,
|
||||||
B00011110,B10010011,B10011101,B00000000,B00110000,
|
B10011111,B10000001,B11111001,
|
||||||
B00000000,B00000000,B00000000,B00000000,B00000000,
|
B10011111,B10111001,B11111001,
|
||||||
B00000000,B00000000,B00000000,B00000000,B00000000,
|
B10001111,B00101000,B11110001,
|
||||||
B00000000,B00000011,B10000000,B00000000,B00000000,
|
B10000000,B00111000,B00000001,
|
||||||
B00000000,B00000010,B01000000,B00000000,B00000000,
|
B10000000,B00000000,B00000001,
|
||||||
B00000000,B00000010,B01010110,B01100000,B00000000,
|
B10011111,B11111111,B11111001,
|
||||||
B00000000,B00000011,B10011000,B10010000,B00000000,
|
B10010001,B01110100,B10011001,
|
||||||
B00000000,B00000010,B00010000,B10010000,B00000000,
|
B10011011,B00000110,B10101001,
|
||||||
B00000000,B00000010,B00010000,B10010000,B00000000,
|
B10011011,B01010100,B10101001,
|
||||||
B00000000,B00000010,B00010000,B01100000,B00000000
|
B10011011,B01010110,B10101001,
|
||||||
|
B10011011,B01010100,B10011001,
|
||||||
|
B10011111,B11111111,B11111001,
|
||||||
|
B11111111,B11111111,B11111111
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -60,11 +63,12 @@ const unsigned char status_logo_bmp[] PROGMEM = {
|
|||||||
//
|
//
|
||||||
#define STATUS_HOTEND_ANIM
|
#define STATUS_HOTEND_ANIM
|
||||||
#define STATUS_BED_ANIM
|
#define STATUS_BED_ANIM
|
||||||
#define STATUS_HEATERS_XSPACE 20
|
|
||||||
#if HOTENDS < 2
|
#if HOTENDS < 2
|
||||||
#define STATUS_HEATERS_X 48
|
#define STATUS_LOGO_X 8
|
||||||
#define STATUS_BED_X 73
|
|
||||||
#else
|
|
||||||
#define STATUS_HEATERS_X 40
|
#define STATUS_HEATERS_X 40
|
||||||
#define STATUS_BED_X 81
|
#define STATUS_BED_X 72
|
||||||
|
#else
|
||||||
|
#define STATUS_LOGO_X 0
|
||||||
|
#define STATUS_HEATERS_X 32
|
||||||
|
#define STATUS_BED_X 80
|
||||||
#endif
|
#endif
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
This directory is intended for the project specific (private) libraries.
|
|
||||||
PlatformIO will compile them to static libraries and link to executable file.
|
|
||||||
|
|
||||||
The source code of each library should be placed in separate directory, like
|
|
||||||
"lib/private_lib/[here are source files]".
|
|
||||||
|
|
||||||
For example, see how can be organized `Foo` and `Bar` libraries:
|
|
||||||
|
|
||||||
|--lib
|
|
||||||
| |--Bar
|
|
||||||
| | |--docs
|
|
||||||
| | |--examples
|
|
||||||
| | |--src
|
|
||||||
| | |- Bar.c
|
|
||||||
| | |- Bar.h
|
|
||||||
| |--Foo
|
|
||||||
| | |- Foo.c
|
|
||||||
| | |- Foo.h
|
|
||||||
| |- readme.txt --> THIS FILE
|
|
||||||
|- platformio.ini
|
|
||||||
|--src
|
|
||||||
|- main.c
|
|
||||||
|
|
||||||
Then in `src/main.c` you should use:
|
|
||||||
|
|
||||||
#include <Foo.h>
|
|
||||||
#include <Bar.h>
|
|
||||||
|
|
||||||
// rest H/C/CPP code
|
|
||||||
|
|
||||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
|
||||||
include paths and build them.
|
|
||||||
|
|
||||||
More information about PlatformIO Library Dependency Finder
|
|
||||||
- http://docs.platformio.org/page/librarymanager/ldf.html
|
|
||||||
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include HAL_PATH(.,HAL.h)
|
#include HAL_PATH(.,HAL.h)
|
||||||
|
|
||||||
#define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION)
|
|
||||||
|
|
||||||
inline void watchdog_refresh() {
|
inline void watchdog_refresh() {
|
||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
HAL_watchdog_refresh();
|
HAL_watchdog_refresh();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "math.h"
|
#include "math.h"
|
||||||
|
|
||||||
#ifdef USBCON
|
#ifdef USBCON
|
||||||
#include <HardwareSerial.h>
|
#include "HardwareSerial.h"
|
||||||
#else
|
#else
|
||||||
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
|
#define HardwareSerial_h // Hack to prevent HardwareSerial.h header inclusion
|
||||||
#include "MarlinSerial.h"
|
#include "MarlinSerial.h"
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
#ifndef pgm_read_ptr
|
#ifndef pgm_read_ptr
|
||||||
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
|
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
|
||||||
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
|
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019
|
||||||
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
|
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
|
||||||
#define pgm_read_ptr_near(address_short) (void*)__LPM_word((uint16_t)(address_short))
|
#define pgm_read_ptr_near(address_short) (void*)__LPM_word((uint16_t)(address_short))
|
||||||
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
|
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
|
||||||
#endif
|
#endif
|
||||||
@@ -365,7 +365,6 @@ inline void HAL_adc_init() {
|
|||||||
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
|
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() ADC
|
#define HAL_READ_ADC() ADC
|
||||||
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
||||||
|
|
||||||
|
|||||||
@@ -46,55 +46,39 @@ void endstop_ISR() { endstops.update(); }
|
|||||||
/**
|
/**
|
||||||
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
|
* Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
|
||||||
*
|
*
|
||||||
* These macros for the Arduino MEGA do not include the two connected pins on Port J (D14, D15).
|
* These macros for the Arduino MEGA do not include the two connected pins on Port J (D13, D14).
|
||||||
* So we extend them here because these are the normal pins for Y_MIN and Y_MAX on RAMPS.
|
* So we extend them here because these are the normal pins for Y_MIN and Y_MAX on RAMPS.
|
||||||
* There are more PCI-enabled processor pins on Port J, but they are not connected to Arduino MEGA.
|
* There are more PCI-enabled processor pins on Port J, but they are not connected to Arduino MEGA.
|
||||||
*/
|
*/
|
||||||
#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
|
#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
|
||||||
|
|
||||||
#define digitalPinHasPCICR(p) (WITHIN(p, 10, 15) || WITHIN(p, 50, 53) || WITHIN(p, 62, 69))
|
|
||||||
|
|
||||||
#undef digitalPinToPCICR
|
#undef digitalPinToPCICR
|
||||||
#define digitalPinToPCICR(p) (digitalPinHasPCICR(p) ? (&PCICR) : nullptr)
|
#define digitalPinToPCICR(p) ( WITHIN(p, 10, 15) || \
|
||||||
|
WITHIN(p, 50, 53) || \
|
||||||
|
WITHIN(p, 62, 69) ? &PCICR : nullptr )
|
||||||
#undef digitalPinToPCICRbit
|
#undef digitalPinToPCICRbit
|
||||||
#define digitalPinToPCICRbit(p) (WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
|
#define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
|
||||||
WITHIN(p, 14, 15) ? 1 : \
|
WITHIN(p, 14, 15) ? 1 : \
|
||||||
WITHIN(p, 62, 69) ? 2 : \
|
WITHIN(p, 62, 69) ? 2 : \
|
||||||
0)
|
0 )
|
||||||
|
|
||||||
#undef digitalPinToPCMSK
|
#undef digitalPinToPCMSK
|
||||||
#define digitalPinToPCMSK(p) (WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? (&PCMSK0) : \
|
#define digitalPinToPCMSK(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \
|
||||||
WITHIN(p, 14, 15) ? (&PCMSK1) : \
|
WITHIN(p, 14, 15) ? &PCMSK1 : \
|
||||||
WITHIN(p, 62, 69) ? (&PCMSK2) : \
|
WITHIN(p, 62, 69) ? &PCMSK2 : \
|
||||||
nullptr)
|
nullptr )
|
||||||
|
|
||||||
#undef digitalPinToPCMSKbit
|
#undef digitalPinToPCMSKbit
|
||||||
#define digitalPinToPCMSKbit(p) (WITHIN(p, 10, 13) ? ((p) - 6) : \
|
#define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \
|
||||||
(p) == 14 || (p) == 51 ? 2 : \
|
(p) == 14 || (p) == 51 ? 2 : \
|
||||||
(p) == 15 || (p) == 52 ? 1 : \
|
(p) == 15 || (p) == 52 ? 1 : \
|
||||||
(p) == 50 ? 3 : \
|
(p) == 50 ? 3 : \
|
||||||
(p) == 53 ? 0 : \
|
(p) == 53 ? 0 : \
|
||||||
WITHIN(p, 62, 69) ? ((p) - 62) : \
|
WITHIN(p, 62, 69) ? ((p) - 62) : \
|
||||||
0)
|
0 )
|
||||||
|
|
||||||
#elif defined(__AVR_ATmega164A__) || defined(__AVR_ATmega164P__) || defined(__AVR_ATmega324A__) || \
|
|
||||||
defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega324PB__) || \
|
|
||||||
defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284__) || \
|
|
||||||
defined(__AVR_ATmega1284P__)
|
|
||||||
|
|
||||||
#define digitalPinHasPCICR(p) WITHIN(p, 0, NUM_DIGITAL_PINS)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#error "Unsupported AVR variant!"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Install Pin change interrupt for a pin. Can be called multiple times.
|
// Install Pin change interrupt for a pin. Can be called multiple times.
|
||||||
void pciSetup(const int8_t pin) {
|
void pciSetup(const int8_t pin) {
|
||||||
if (digitalPinHasPCICR(pin)) {
|
if (digitalPinToPCMSK(pin) != nullptr) {
|
||||||
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
|
SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin
|
||||||
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
|
SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
|
||||||
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
|
SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
|
||||||
@@ -124,7 +108,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X_MAX_PIN);
|
_ATTACH(X_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(X_MAX_PIN);
|
pciSetup(X_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -132,7 +116,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X_MIN_PIN);
|
_ATTACH(X_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(X_MIN_PIN);
|
pciSetup(X_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -140,7 +124,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y_MAX_PIN);
|
_ATTACH(Y_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Y_MAX_PIN);
|
pciSetup(Y_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -148,7 +132,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y_MIN_PIN);
|
_ATTACH(Y_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Y_MIN_PIN);
|
pciSetup(Y_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -156,7 +140,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MAX_PIN);
|
_ATTACH(Z_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MAX_PIN);
|
pciSetup(Z_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -164,7 +148,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MIN_PIN);
|
_ATTACH(Z_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MIN_PIN);
|
pciSetup(Z_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -172,7 +156,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X2_MAX_PIN);
|
_ATTACH(X2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(X2_MAX_PIN);
|
pciSetup(X2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -180,7 +164,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(X2_MIN_PIN);
|
_ATTACH(X2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(X2_MIN_PIN);
|
pciSetup(X2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -188,7 +172,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y2_MAX_PIN);
|
_ATTACH(Y2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Y2_MAX_PIN);
|
pciSetup(Y2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -196,7 +180,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Y2_MIN_PIN);
|
_ATTACH(Y2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Y2_MIN_PIN);
|
pciSetup(Y2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -204,7 +188,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z2_MAX_PIN);
|
_ATTACH(Z2_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z2_MAX_PIN);
|
pciSetup(Z2_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -212,7 +196,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z2_MIN_PIN);
|
_ATTACH(Z2_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z2_MIN_PIN);
|
pciSetup(Z2_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -220,7 +204,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z3_MAX_PIN);
|
_ATTACH(Z3_MAX_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable");
|
||||||
pciSetup(Z3_MAX_PIN);
|
pciSetup(Z3_MAX_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -228,7 +212,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z3_MIN_PIN);
|
_ATTACH(Z3_MIN_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable");
|
||||||
pciSetup(Z3_MIN_PIN);
|
pciSetup(Z3_MIN_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -236,7 +220,7 @@ void setup_endstop_interrupts() {
|
|||||||
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||||
_ATTACH(Z_MIN_PROBE_PIN);
|
_ATTACH(Z_MIN_PROBE_PIN);
|
||||||
#else
|
#else
|
||||||
static_assert(digitalPinHasPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable");
|
static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable");
|
||||||
pciSetup(Z_MIN_PROBE_PIN);
|
pciSetup(Z_MIN_PROBE_PIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
* Checks for FAST PWM
|
* Checks for FAST PWM
|
||||||
*/
|
*/
|
||||||
#if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
|
#if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
|
||||||
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
|
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,10 +26,7 @@
|
|||||||
|
|
||||||
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
|
||||||
|
|
||||||
#define AVR_ATmega2560_FAMILY_PLUS_70 MB(BQ_ZUM_MEGA_3D, MIGHTYBOARD_REVE, MINIRAMBO, SCOOVO_X9H)
|
|
||||||
|
|
||||||
#if AVR_AT90USB1286_FAMILY
|
#if AVR_AT90USB1286_FAMILY
|
||||||
|
|
||||||
// Working with Teensyduino extension so need to re-define some things
|
// Working with Teensyduino extension so need to re-define some things
|
||||||
#include "pinsDebug_Teensyduino.h"
|
#include "pinsDebug_Teensyduino.h"
|
||||||
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
// Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
|
||||||
@@ -38,9 +35,7 @@
|
|||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
|
||||||
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||||
|
|
||||||
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||||
|
|
||||||
#include "pinsDebug_plus_70.h"
|
#include "pinsDebug_plus_70.h"
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p)
|
||||||
@@ -48,13 +43,11 @@
|
|||||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||||
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
bool GET_PINMODE(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); }
|
||||||
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ extern uint16_t HAL_adc_result; // result of last ADC conversion
|
|||||||
inline void HAL_adc_init() {}//todo
|
inline void HAL_adc_init() {}//todo
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -444,8 +444,8 @@ typedef struct
|
|||||||
#define ENABLE 1
|
#define ENABLE 1
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#ifndef __bool_true_false_are_defined
|
#ifndef __bool_true_false_are_defined
|
||||||
#define false (1==0)
|
#define false 0
|
||||||
#define true (1==1)
|
#define true 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PASS
|
#ifndef PASS
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ void sd_mmc_spi_mem_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
Ctrl_status sd_mmc_spi_test_unit_ready() {
|
||||||
#ifdef DISABLE_DUE_SD_MMC
|
|
||||||
return CTRL_NO_PRESENT;
|
|
||||||
#endif
|
|
||||||
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||||
return CTRL_NO_PRESENT;
|
return CTRL_NO_PRESENT;
|
||||||
return CTRL_GOOD;
|
return CTRL_GOOD;
|
||||||
@@ -58,9 +55,6 @@ uint8_t sector_buf[SD_MMC_BLOCK_SIZE];
|
|||||||
// #define DEBUG_MMC
|
// #define DEBUG_MMC
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
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 (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||||
return CTRL_NO_PRESENT;
|
return CTRL_NO_PRESENT;
|
||||||
|
|
||||||
@@ -98,9 +92,6 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
|
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 (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
|
||||||
return CTRL_NO_PRESENT;
|
return CTRL_NO_PRESENT;
|
||||||
|
|
||||||
|
|||||||
@@ -45,11 +45,10 @@
|
|||||||
|
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
#include <Reset.h>
|
|
||||||
|
|
||||||
#include "conf_usb.h"
|
#include "conf_usb.h"
|
||||||
#include "udc.h"
|
#include "udc.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <Reset.h>
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
static volatile bool main_b_msc_enable = false;
|
static volatile bool main_b_msc_enable = false;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if ENABLED(WEBSUPPORT)
|
#if EITHER(EEPROM_SETTINGS, WEBSUPPORT)
|
||||||
#include "spiffs.h"
|
#include "spiffs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ void HAL_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HAL_init_board() {
|
void HAL_init_board() {
|
||||||
#if ENABLED(WEBSUPPORT)
|
#if EITHER(EEPROM_SETTINGS, WEBSUPPORT)
|
||||||
spiffs_init();
|
spiffs_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
|
|||||||
void HAL_adc_init();
|
void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -23,18 +23,16 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#include <Stream.h>
|
#include "Stream.h"
|
||||||
|
|
||||||
|
#ifndef RX_BUFFER_SIZE
|
||||||
|
#define RX_BUFFER_SIZE 128
|
||||||
|
#endif
|
||||||
#ifndef TX_BUFFER_SIZE
|
#ifndef TX_BUFFER_SIZE
|
||||||
#define TX_BUFFER_SIZE 32
|
#define TX_BUFFER_SIZE 32
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(WIFISUPPORT)
|
#if TX_BUFFER_SIZE <= 0
|
||||||
#ifndef RX_BUFFER_SIZE
|
#error "TX_BUFFER_SIZE is required for the WebSocket."
|
||||||
#define RX_BUFFER_SIZE 128
|
|
||||||
#endif
|
|
||||||
#if TX_BUFFER_SIZE <= 0
|
|
||||||
#error "TX_BUFFER_SIZE is required for the WebSocket."
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef uint16_t ring_buffer_pos_t;
|
typedef uint16_t ring_buffer_pos_t;
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
#include "i2s.h"
|
#include "i2s.h"
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../shared/Marduino.h"
|
||||||
#include <driver/periph_ctrl.h>
|
#include "driver/periph_ctrl.h"
|
||||||
#include <rom/lldesc.h>
|
#include "rom/lldesc.h"
|
||||||
#include <soc/i2s_struct.h>
|
#include "soc/i2s_struct.h"
|
||||||
#include <freertos/queue.h>
|
#include "freertos/queue.h"
|
||||||
#include "../../module/stepper.h"
|
#include "../../module/stepper.h"
|
||||||
|
|
||||||
#define DMA_BUF_COUNT 8 // number of DMA buffers to store data
|
#define DMA_BUF_COUNT 8 // number of DMA buffers to store data
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include <WiFiUdp.h>
|
#include <WiFiUdp.h>
|
||||||
#include <ArduinoOTA.h>
|
#include <ArduinoOTA.h>
|
||||||
#include <driver/timer.h>
|
#include "driver/timer.h"
|
||||||
|
|
||||||
void OTA_init() {
|
void OTA_init() {
|
||||||
ArduinoOTA
|
ArduinoOTA
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
* Copyright (c) 2019 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/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
|
|
||||||
|
|
||||||
#include "../shared/persistent_store_api.h"
|
|
||||||
#include "EEPROM.h"
|
|
||||||
|
|
||||||
#define EEPROM_SIZE 4096
|
|
||||||
|
|
||||||
bool PersistentStore::access_start() {
|
|
||||||
return EEPROM.begin(EEPROM_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::access_finish() {
|
|
||||||
EEPROM.end();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
|
||||||
EEPROM.write(pos++, value[i]);
|
|
||||||
crc16(crc, &value[i], 1);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
|
||||||
uint8_t c = EEPROM.read(pos++);
|
|
||||||
if (writing) value[i] = c;
|
|
||||||
crc16(crc, &c, 1);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS
|
|
||||||
#endif // ARDUINO_ARCH_ESP32
|
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2019 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/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
|
||||||
|
#include "../shared/persistent_store_api.h"
|
||||||
|
|
||||||
|
#include <SPIFFS.h>
|
||||||
|
#include <FS.h>
|
||||||
|
#include "spiffs.h"
|
||||||
|
|
||||||
|
#define HAL_ESP32_EEPROM_SIZE 4096
|
||||||
|
#define HAL_ESP32_EEPROM_FILE_PATH "/eeprom.dat"
|
||||||
|
|
||||||
|
File eeprom_file;
|
||||||
|
|
||||||
|
bool PersistentStore::access_start() {
|
||||||
|
if (spiffs_initialized) {
|
||||||
|
eeprom_file = SPIFFS.open(HAL_ESP32_EEPROM_FILE_PATH, "r+");
|
||||||
|
|
||||||
|
size_t file_size = eeprom_file.size();
|
||||||
|
if (file_size < HAL_ESP32_EEPROM_SIZE) {
|
||||||
|
SERIAL_ECHO_MSG("SPIFFS EEPROM settings file " HAL_ESP32_EEPROM_FILE_PATH " is too small or did not exist, expanding.");
|
||||||
|
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" file size: ", file_size, ", required size: ", HAL_ESP32_EEPROM_SIZE);
|
||||||
|
|
||||||
|
// mode r+ does not allow to expand the file (at least on ESP32 SPIFFS9, so we close, reopen "a", append, close, reopen "r+"
|
||||||
|
eeprom_file.close();
|
||||||
|
|
||||||
|
eeprom_file = SPIFFS.open(HAL_ESP32_EEPROM_FILE_PATH, "a");
|
||||||
|
for (size_t i = eeprom_file.size(); i < HAL_ESP32_EEPROM_SIZE; i++)
|
||||||
|
eeprom_file.write(0xFF);
|
||||||
|
eeprom_file.close();
|
||||||
|
|
||||||
|
eeprom_file = SPIFFS.open(HAL_ESP32_EEPROM_FILE_PATH, "r+");
|
||||||
|
file_size = eeprom_file.size();
|
||||||
|
if (file_size < HAL_ESP32_EEPROM_SIZE) {
|
||||||
|
SERIAL_ERROR_MSG("Failed to expand " HAL_ESP32_EEPROM_FILE_PATH " to required size. SPIFFS partition full?");
|
||||||
|
SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(" file size: ", file_size, ", required size: ", HAL_ESP32_EEPROM_SIZE);
|
||||||
|
SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(" SPIFFS used bytes: ", SPIFFS.usedBytes(), ", total bytes: ", SPIFFS.totalBytes());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PersistentStore::access_finish() {
|
||||||
|
eeprom_file.close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
|
if (!eeprom_file.seek(pos)) return true; // return true for any error
|
||||||
|
if (eeprom_file.write(value, size) != size) return true;
|
||||||
|
|
||||||
|
crc16(crc, value, size);
|
||||||
|
pos += size;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
|
if (!eeprom_file.seek(pos)) return true; // return true for any error
|
||||||
|
|
||||||
|
if (writing) {
|
||||||
|
if (eeprom_file.read(value, size) != size) return true;
|
||||||
|
crc16(crc, value, size);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uint8_t tmp[size];
|
||||||
|
if (eeprom_file.read(tmp, size) != size) return true;
|
||||||
|
crc16(crc, tmp, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
pos += size;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t PersistentStore::capacity() { return HAL_ESP32_EEPROM_SIZE; }
|
||||||
|
|
||||||
|
#endif // EEPROM_SETTINGS
|
||||||
|
#endif // ARDUINO_ARCH_ESP32
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#if ENABLED(WEBSUPPORT)
|
#if EITHER(WEBSUPPORT, EEPROM_SETTINGS)
|
||||||
|
|
||||||
#include "../../core/serial.h"
|
#include "../../core/serial.h"
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <esp_types.h>
|
#include "esp_types.h"
|
||||||
#include <soc/timer_group_struct.h>
|
#include "soc/timer_group_struct.h"
|
||||||
#include <driver/periph_ctrl.h>
|
#include "driver/periph_ctrl.h"
|
||||||
#include <driver/timer.h>
|
#include "driver/timer.h"
|
||||||
|
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <driver/timer.h>
|
#include "driver/timer.h"
|
||||||
|
|
||||||
// Includes needed to get I2S_STEPPER_STREAM. Note that pins.h
|
// Includes needed to get I2S_STEPPER_STREAM. Note that pins.h
|
||||||
// is included in case this header is being included early.
|
// is included in case this header is being included early.
|
||||||
@@ -51,8 +51,8 @@ typedef uint64_t hal_timer_t;
|
|||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
|
||||||
#else
|
#else
|
||||||
#define STEPPER_TIMER_PRESCALE 40
|
#define STEPPER_TIMER_PRESCALE 40
|
||||||
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
|
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer, 2MHz
|
||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||||
|
|||||||
@@ -21,18 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
esp_err_t esp_task_wdt_reset();
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Initialize watchdog with a 4 second interrupt time
|
// Initialize watchdog with a 4 second interrupt time
|
||||||
void watchdog_init();
|
void watchdog_init();
|
||||||
|
|
||||||
// Reset watchdog.
|
// Reset watchdog.
|
||||||
inline void HAL_watchdog_refresh() { esp_task_wdt_reset(); }
|
inline void HAL_watchdog_refresh() {}
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ int freeMemory();
|
|||||||
// ADC
|
// ADC
|
||||||
#define HAL_ANALOG_SELECT(pin) HAL_adc_enable_channel(pin)
|
#define HAL_ANALOG_SELECT(pin) HAL_adc_enable_channel(pin)
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_get_result()
|
#define HAL_READ_ADC() HAL_adc_get_result()
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,6 @@
|
|||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t HAL_adc_reading = 0;
|
|
||||||
|
|
||||||
// U8glib required functions
|
// U8glib required functions
|
||||||
extern "C" void u8g_xMicroDelay(uint16_t val) {
|
extern "C" void u8g_xMicroDelay(uint16_t val) {
|
||||||
DELAY_US(val);
|
DELAY_US(val);
|
||||||
@@ -63,7 +61,7 @@ int freeMemory() {
|
|||||||
// return dval if not found or not a valid pin.
|
// return dval if not found or not a valid pin.
|
||||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) {
|
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) {
|
||||||
const uint16_t val = (uint16_t)parser.intval(code, -1), port = val / 100, pin = val % 100;
|
const uint16_t val = (uint16_t)parser.intval(code, -1), port = val / 100, pin = val % 100;
|
||||||
const int16_t ind = (port < ((NUM_DIGITAL_PINS) >> 5) && pin < 32) ? ((port << 5) | pin) : -2;
|
const int16_t ind = (port < ((NUM_DIGITAL_PINS) >> 5) && pin < 32) ? GET_PIN_MAP_INDEX((port << 5) | pin) : -2;
|
||||||
return ind > -1 ? ind : dval;
|
return ind > -1 ? ind : dval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,43 +131,12 @@ int freeMemory();
|
|||||||
// K = 6, 565 samples, 500Hz sample rate, 1.13s convergence on full range step
|
// K = 6, 565 samples, 500Hz sample rate, 1.13s convergence on full range step
|
||||||
// Memory usage per ADC channel (bytes): 4 (32 Bytes for 8 channels)
|
// Memory usage per ADC channel (bytes): 4 (32 Bytes for 8 channels)
|
||||||
|
|
||||||
#define HAL_ADC_RESOLUTION 12 // 15 bit maximum, raw temperature is stored as int16_t
|
|
||||||
#define HAL_ADC_FILTERED // Disable oversampling done in Marlin as ADC values already filtered in HAL
|
|
||||||
|
|
||||||
using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
|
using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
|
||||||
extern uint32_t HAL_adc_reading;
|
#define HAL_adc_init() FilteredADC::init()
|
||||||
[[gnu::always_inline]] inline void HAL_start_adc(const pin_t pin) {
|
|
||||||
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
|
|
||||||
}
|
|
||||||
[[gnu::always_inline]] inline uint16_t HAL_read_adc() {
|
|
||||||
return HAL_adc_reading;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define HAL_adc_init()
|
|
||||||
#define HAL_ANALOG_SELECT(pin) FilteredADC::enable_channel(pin)
|
#define HAL_ANALOG_SELECT(pin) FilteredADC::enable_channel(pin)
|
||||||
#define HAL_START_ADC(pin) HAL_start_adc(pin)
|
#define HAL_START_ADC(pin) FilteredADC::start_conversion(pin)
|
||||||
#define HAL_READ_ADC() HAL_read_adc()
|
#define HAL_READ_ADC() FilteredADC::get_result()
|
||||||
#define HAL_ADC_READY() (true)
|
#define HAL_ADC_READY() FilteredADC::finished_conversion()
|
||||||
|
|
||||||
// Test whether the pin is valid
|
|
||||||
constexpr bool VALID_PIN(const pin_t pin) {
|
|
||||||
return LPC176x::pin_is_valid(pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the analog index for a digital pin
|
|
||||||
constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t pin) {
|
|
||||||
return (LPC176x::pin_is_valid(pin) && LPC176x::pin_has_adc(pin)) ? pin : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the index of a pin number
|
|
||||||
constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) {
|
|
||||||
return LPC176x::pin_index(pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the pin number at the given index
|
|
||||||
constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
|
|
||||||
return LPC176x::pin_index(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse a G-code word into a pin index
|
// Parse a G-code word into a pin index
|
||||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
// ------------------------
|
// ------------------------
|
||||||
#if ENABLED(LPC_SOFTWARE_SPI)
|
#if ENABLED(LPC_SOFTWARE_SPI)
|
||||||
|
|
||||||
#include <SoftwareSPI.h>
|
#include "SoftwareSPI.h"
|
||||||
|
|
||||||
// Software SPI
|
// Software SPI
|
||||||
|
|
||||||
@@ -125,18 +125,18 @@
|
|||||||
PinCfg.Funcnum = 2;
|
PinCfg.Funcnum = 2;
|
||||||
PinCfg.OpenDrain = 0;
|
PinCfg.OpenDrain = 0;
|
||||||
PinCfg.Pinmode = 0;
|
PinCfg.Pinmode = 0;
|
||||||
PinCfg.Pinnum = LPC176x::pin_bit(SCK_PIN);
|
PinCfg.Pinnum = LPC1768_PIN_PIN(SCK_PIN);
|
||||||
PinCfg.Portnum = LPC176x::pin_port(SCK_PIN);
|
PinCfg.Portnum = LPC1768_PIN_PORT(SCK_PIN);
|
||||||
PINSEL_ConfigPin(&PinCfg);
|
PINSEL_ConfigPin(&PinCfg);
|
||||||
SET_OUTPUT(SCK_PIN);
|
SET_OUTPUT(SCK_PIN);
|
||||||
|
|
||||||
PinCfg.Pinnum = LPC176x::pin_bit(MISO_PIN);
|
PinCfg.Pinnum = LPC1768_PIN_PIN(MISO_PIN);
|
||||||
PinCfg.Portnum = LPC176x::pin_port(MISO_PIN);
|
PinCfg.Portnum = LPC1768_PIN_PORT(MISO_PIN);
|
||||||
PINSEL_ConfigPin(&PinCfg);
|
PINSEL_ConfigPin(&PinCfg);
|
||||||
SET_INPUT(MISO_PIN);
|
SET_INPUT(MISO_PIN);
|
||||||
|
|
||||||
PinCfg.Pinnum = LPC176x::pin_bit(MOSI_PIN);
|
PinCfg.Pinnum = LPC1768_PIN_PIN(MOSI_PIN);
|
||||||
PinCfg.Portnum = LPC176x::pin_port(MOSI_PIN);
|
PinCfg.Portnum = LPC1768_PIN_PORT(MOSI_PIN);
|
||||||
PINSEL_ConfigPin(&PinCfg);
|
PINSEL_ConfigPin(&PinCfg);
|
||||||
SET_OUTPUT(MOSI_PIN);
|
SET_OUTPUT(MOSI_PIN);
|
||||||
// divide PCLK by 2 for SSP0
|
// divide PCLK by 2 for SSP0
|
||||||
@@ -42,8 +42,6 @@ void endstop_ISR() { endstops.update(); }
|
|||||||
|
|
||||||
void setup_endstop_interrupts() {
|
void setup_endstop_interrupts() {
|
||||||
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
||||||
#define LPC1768_PIN_INTERRUPT_M(pin) ((pin >> 0x5 & 0x7) == 0 || (pin >> 0x5 & 0x7) == 2)
|
|
||||||
|
|
||||||
#if HAS_X_MAX
|
#if HAS_X_MAX
|
||||||
#if !LPC1768_PIN_INTERRUPT_M(X_MAX_PIN)
|
#if !LPC1768_PIN_INTERRUPT_M(X_MAX_PIN)
|
||||||
#error "X_MAX_PIN is not INTERRUPT-capable."
|
#error "X_MAX_PIN is not INTERRUPT-capable."
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
#include <pwm.h>
|
#include <pwm.h>
|
||||||
|
|
||||||
void set_pwm_frequency(const pin_t pin, int f_desired) {
|
void set_pwm_frequency(const pin_t pin, int f_desired) {
|
||||||
LPC176x::pwm_set_frequency(pin, f_desired);
|
pwm_set_frequency(pin, f_desired);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
||||||
LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
|
pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
|
#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
|
||||||
|
|||||||
@@ -37,19 +37,19 @@
|
|||||||
|
|
||||||
#define PWM_PIN(P) true // all pins are PWM capable
|
#define PWM_PIN(P) true // all pins are PWM capable
|
||||||
|
|
||||||
#define LPC_PIN(pin) LPC176x::gpio_pin(pin)
|
#define LPC_PIN(pin) gpio_pin(pin)
|
||||||
#define LPC_GPIO(port) LPC176x::gpio_port(port)
|
#define LPC_GPIO(port) gpio_port(port)
|
||||||
|
|
||||||
#define SET_DIR_INPUT(IO) LPC176x::gpio_set_input(IO)
|
#define SET_DIR_INPUT(IO) gpio_set_input(IO)
|
||||||
#define SET_DIR_OUTPUT(IO) LPC176x::gpio_set_output(IO)
|
#define SET_DIR_OUTPUT(IO) gpio_set_output(IO)
|
||||||
|
|
||||||
#define SET_MODE(IO, mode) pinMode(IO, mode)
|
#define SET_MODE(IO, mode) pinMode(IO, mode)
|
||||||
|
|
||||||
#define WRITE_PIN_SET(IO) LPC176x::gpio_set(IO)
|
#define WRITE_PIN_SET(IO) gpio_set(IO)
|
||||||
#define WRITE_PIN_CLR(IO) LPC176x::gpio_clear(IO)
|
#define WRITE_PIN_CLR(IO) gpio_clear(IO)
|
||||||
|
|
||||||
#define READ_PIN(IO) LPC176x::gpio_get(IO)
|
#define READ_PIN(IO) gpio_get(IO)
|
||||||
#define WRITE_PIN(IO,V) LPC176x::gpio_set(IO, V)
|
#define WRITE_PIN(IO,V) gpio_set(IO, V)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic I/O routines
|
* Magic I/O routines
|
||||||
@@ -81,10 +81,10 @@
|
|||||||
#define _PULLDOWN(IO,V) pinMode(IO, (V) ? INPUT_PULLDOWN : INPUT)
|
#define _PULLDOWN(IO,V) pinMode(IO, (V) ? INPUT_PULLDOWN : INPUT)
|
||||||
|
|
||||||
/// check if pin is an input
|
/// check if pin is an input
|
||||||
#define _IS_INPUT(IO) (!LPC176x::gpio_get_dir(IO))
|
#define _IS_INPUT(IO) (!gpio_get_dir(IO))
|
||||||
|
|
||||||
/// check if pin is an output
|
/// check if pin is an output
|
||||||
#define _IS_OUTPUT(IO) (LPC176x::gpio_get_dir(IO))
|
#define _IS_OUTPUT(IO) (gpio_get_dir(IO))
|
||||||
|
|
||||||
/// Read a pin wrapper
|
/// Read a pin wrapper
|
||||||
#define READ(IO) _READ(IO)
|
#define READ(IO) _READ(IO)
|
||||||
|
|||||||
@@ -21,42 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if PIO_PLATFORM_VERSION < 1001
|
|
||||||
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
|
|
||||||
#endif
|
|
||||||
#if PIO_FRAMEWORK_VERSION < 2002
|
|
||||||
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Detect an old pins file by checking for old ADC pins values.
|
|
||||||
*/
|
|
||||||
#define _OLD_TEMP_PIN(P) PIN_EXISTS(P) && _CAT(P,_PIN) <= 7 && _CAT(P,_PIN) != 2 && _CAT(P,_PIN) != 3
|
|
||||||
#if _OLD_TEMP_PIN(TEMP_BED)
|
|
||||||
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_0)
|
|
||||||
#error "TEMP_0_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_1)
|
|
||||||
#error "TEMP_1_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_2)
|
|
||||||
#error "TEMP_2_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_3)
|
|
||||||
#error "TEMP_3_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_4)
|
|
||||||
#error "TEMP_4_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#elif _OLD_TEMP_PIN(TEMP_5)
|
|
||||||
#error "TEMP_5_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
|
|
||||||
#endif
|
|
||||||
#undef _OLD_TEMP_PIN
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Because PWM hardware channels all share the same frequency, along with the
|
|
||||||
* fallback software channels, FAST_PWM_FAN is incompatible with Servos.
|
|
||||||
*/
|
|
||||||
#if NUM_SERVOS > 0 && ENABLED(FAST_PWM_FAN)
|
|
||||||
#error "BLTOUCH and Servos are incompatible with FAST_PWM_FAN on LPC176x boards."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test LPC176x-specific configuration values for errors at compile-time.
|
* Test LPC176x-specific configuration values for errors at compile-time.
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +32,3 @@
|
|||||||
#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
|
#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
|
||||||
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
|
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BAUD_RATE_GCODE)
|
|
||||||
#error "BAUD_RATE_GCODE is not yet supported on LPC176x."
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <lpc17xx_iap.h>
|
#include "lpc17xx_iap.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SECTOR_START(sector) ((sector < 16) ? (sector * 0x1000) : ((sector - 14) * 0x8000))
|
#define SECTOR_START(sector) ((sector < 16) ? (sector * 0x1000) : ((sector - 14) * 0x8000))
|
||||||
|
|||||||
@@ -33,21 +33,52 @@
|
|||||||
#define PRINT_PORT(p)
|
#define PRINT_PORT(p)
|
||||||
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
#define GET_ARRAY_PIN(p) pin_array[p].pin
|
||||||
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0)
|
#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC1768_PIN_PORT(p), LPC1768_PIN_PIN(p)); SERIAL_ECHO(buffer); }while(0)
|
||||||
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin
|
||||||
|
|
||||||
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
|
// pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities
|
||||||
|
// uses pin index
|
||||||
#ifndef M43_NEVER_TOUCH
|
#ifndef M43_NEVER_TOUCH
|
||||||
#define M43_NEVER_TOUCH(Q) ((Q) == P0_29 || (Q) == P0_30 || (Q) == P2_09) // USB pins
|
#define M43_NEVER_TOUCH(Q) ((Q) == 29 || (Q) == 30 || (Q) == 73) // USB pins
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool GET_PINMODE(const pin_t pin) {
|
// active ADC function/mode/code values for PINSEL registers
|
||||||
if (!LPC176x::pin_is_valid(pin) || LPC176x::pin_adc_enabled(pin)) // found an invalid pin or active analog pin
|
constexpr int8_t ADC_pin_mode(pin_t pin) {
|
||||||
|
return (LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 2 ? 2 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 3 ? 2 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 23 ? 1 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 24 ? 1 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 25 ? 1 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 0 && LPC1768_PIN_PIN(pin) == 26 ? 1 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 1 && LPC1768_PIN_PIN(pin) == 30 ? 3 :
|
||||||
|
LPC1768_PIN_PORT(pin) == 1 && LPC1768_PIN_PIN(pin) == 31 ? 3 : -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int8_t get_pin_mode(pin_t pin) {
|
||||||
|
if (!VALID_PIN(pin)) return -1;
|
||||||
|
uint8_t pin_port = LPC1768_PIN_PORT(pin);
|
||||||
|
uint8_t pin_port_pin = LPC1768_PIN_PIN(pin);
|
||||||
|
//get appropriate PINSEL register
|
||||||
|
volatile uint32_t * pinsel_reg = (pin_port == 0 && pin_port_pin <= 15) ? &LPC_PINCON->PINSEL0 :
|
||||||
|
(pin_port == 0) ? &LPC_PINCON->PINSEL1 :
|
||||||
|
(pin_port == 1 && pin_port_pin <= 15) ? &LPC_PINCON->PINSEL2 :
|
||||||
|
pin_port == 1 ? &LPC_PINCON->PINSEL3 :
|
||||||
|
pin_port == 2 ? &LPC_PINCON->PINSEL4 :
|
||||||
|
pin_port == 3 ? &LPC_PINCON->PINSEL7 : &LPC_PINCON->PINSEL9;
|
||||||
|
uint8_t pinsel_start_bit = pin_port_pin > 15 ? 2 * (pin_port_pin - 16) : 2 * pin_port_pin;
|
||||||
|
int8_t pin_mode = (int8_t) ((*pinsel_reg >> pinsel_start_bit) & 0x3);
|
||||||
|
return pin_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GET_PINMODE(pin_t pin) {
|
||||||
|
int8_t pin_mode = get_pin_mode(pin);
|
||||||
|
if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // found an invalid pin or active analog pin
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return LPC176x::gpio_direction(pin);
|
uint32_t * FIO_reg[5] PROGMEM = {(uint32_t*) 0x2009C000,(uint32_t*) 0x2009C020,(uint32_t*) 0x2009C040,(uint32_t*) 0x2009C060,(uint32_t*) 0x2009C080};
|
||||||
|
return ((*FIO_reg[LPC1768_PIN_PORT(pin)] >> LPC1768_PIN_PIN(pin) & 1) != 0); //input/output state
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GET_ARRAY_IS_DIGITAL(const pin_t pin) {
|
bool GET_ARRAY_IS_DIGITAL(pin_t pin) {
|
||||||
return (!LPC176x::pin_has_adc(pin) || !LPC176x::pin_adc_enabled(pin));
|
return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
typedef uint32_t hal_timer_t;
|
typedef uint32_t hal_timer_t;
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||||
|
|
||||||
#define HAL_TIMER_RATE ((F_CPU) / 4) // frequency of timers peripherals
|
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
|
||||||
|
|
||||||
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
|
#define STEP_TIMER_NUM 0 // Timer Index for Stepper
|
||||||
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
|
#define TEMP_TIMER_NUM 1 // Timer Index for Temperature
|
||||||
|
|||||||
+3
-5
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#ifdef TARGET_LPC1768
|
#ifdef TARGET_LPC1768
|
||||||
|
|
||||||
extern int millis();
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -37,7 +35,6 @@ extern int millis();
|
|||||||
|
|
||||||
#include "../../../core/millis_t.h"
|
#include "../../../core/millis_t.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// These two routines are exact copies of the lpc17xx_i2c.c routines. Couldn't link to
|
// These two routines are exact copies of the lpc17xx_i2c.c routines. Couldn't link to
|
||||||
@@ -154,13 +151,14 @@ void u8g_i2c_init(uint8_t clock_option) {
|
|||||||
u8g_i2c_start(0); // send slave address and write bit
|
u8g_i2c_start(0); // send slave address and write bit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volatile extern millis_t _millis;
|
||||||
uint8_t u8g_i2c_send_byte(uint8_t data) {
|
uint8_t u8g_i2c_send_byte(uint8_t data) {
|
||||||
#define I2C_TIMEOUT 3
|
#define I2C_TIMEOUT 3
|
||||||
LPC_I2C1->I2DAT = data & I2C_I2DAT_BITMASK; // transmit data
|
LPC_I2C1->I2DAT = data & I2C_I2DAT_BITMASK; // transmit data
|
||||||
LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
|
LPC_I2C1->I2CONSET = I2C_I2CONSET_AA;
|
||||||
LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
|
LPC_I2C1->I2CONCLR = I2C_I2CONCLR_SIC;
|
||||||
const millis_t timeout = millis() + I2C_TIMEOUT;
|
const millis_t timeout = _millis + I2C_TIMEOUT;
|
||||||
while ((I2C_status != I2C_I2STAT_M_TX_DAT_ACK) && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK) && PENDING(millis(), timeout)); // wait for xmit to finish
|
while ((I2C_status != I2C_I2STAT_M_TX_DAT_ACK) && (I2C_status != I2C_I2STAT_M_TX_DAT_NACK) && PENDING(_millis, timeout)); // wait for xmit to finish
|
||||||
// had hangs with SH1106 so added time out - have seen temporary screen corruption when this happens
|
// had hangs with SH1106 so added time out - have seen temporary screen corruption when this happens
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
#if ENABLED(U8GLIB_ST7920)
|
#if ENABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
#include <U8glib.h>
|
#include <U8glib.h>
|
||||||
#include <SoftwareSPI.h>
|
#include "SoftwareSPI.h"
|
||||||
#include "../../shared/Delay.h"
|
#include "../../shared/Delay.h"
|
||||||
|
|
||||||
#undef SPI_SPEED
|
#undef SPI_SPEED
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
#if HAS_GRAPHICAL_LCD && DISABLED(U8GLIB_ST7920)
|
#if HAS_GRAPHICAL_LCD && DISABLED(U8GLIB_ST7920)
|
||||||
|
|
||||||
#include <SoftwareSPI.h>
|
#include "SoftwareSPI.h"
|
||||||
|
|
||||||
#undef SPI_SPEED
|
#undef SPI_SPEED
|
||||||
#define SPI_SPEED 2 // About 2 MHz
|
#define SPI_SPEED 2 // About 2 MHz
|
||||||
@@ -75,25 +75,25 @@ uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck
|
|||||||
|
|
||||||
for (uint8_t i = 0; i < 8; i++) {
|
for (uint8_t i = 0; i < 8; i++) {
|
||||||
if (spi_speed == 0) {
|
if (spi_speed == 0) {
|
||||||
LPC176x::gpio_set(mosi_pin, !!(b & 0x80));
|
gpio_set(mosi_pin, !!(b & 0x80));
|
||||||
LPC176x::gpio_set(sck_pin, HIGH);
|
gpio_set(sck_pin, HIGH);
|
||||||
b <<= 1;
|
b <<= 1;
|
||||||
if (miso_pin >= 0 && LPC176x::gpio_get(miso_pin)) b |= 1;
|
if (miso_pin >= 0 && gpio_get(miso_pin)) b |= 1;
|
||||||
LPC176x::gpio_set(sck_pin, LOW);
|
gpio_set(sck_pin, LOW);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
||||||
for (uint8_t j = 0; j < spi_speed; j++)
|
for (uint8_t j = 0; j < spi_speed; j++)
|
||||||
LPC176x::gpio_set(mosi_pin, state);
|
gpio_set(mosi_pin, state);
|
||||||
|
|
||||||
for (uint8_t j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1); j++)
|
for (uint8_t j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1); j++)
|
||||||
LPC176x::gpio_set(sck_pin, HIGH);
|
gpio_set(sck_pin, HIGH);
|
||||||
|
|
||||||
b <<= 1;
|
b <<= 1;
|
||||||
if (miso_pin >= 0 && LPC176x::gpio_get(miso_pin)) b |= 1;
|
if (miso_pin >= 0 && gpio_get(miso_pin)) b |= 1;
|
||||||
|
|
||||||
for (uint8_t j = 0; j < spi_speed; j++)
|
for (uint8_t j = 0; j < spi_speed; j++)
|
||||||
LPC176x::gpio_set(sck_pin, LOW);
|
gpio_set(sck_pin, LOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,23 +105,23 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
|
|||||||
for (uint8_t i = 0; i < 8; i++) {
|
for (uint8_t i = 0; i < 8; i++) {
|
||||||
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
const uint8_t state = (b & 0x80) ? HIGH : LOW;
|
||||||
if (spi_speed == 0) {
|
if (spi_speed == 0) {
|
||||||
LPC176x::gpio_set(sck_pin, LOW);
|
gpio_set(sck_pin, LOW);
|
||||||
LPC176x::gpio_set(mosi_pin, state);
|
gpio_set(mosi_pin, state);
|
||||||
LPC176x::gpio_set(mosi_pin, state); // need some setup time
|
gpio_set(mosi_pin, state); // need some setup time
|
||||||
LPC176x::gpio_set(sck_pin, HIGH);
|
gpio_set(sck_pin, HIGH);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (uint8_t j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1); j++)
|
for (uint8_t j = 0; j < spi_speed + (miso_pin >= 0 ? 0 : 1); j++)
|
||||||
LPC176x::gpio_set(sck_pin, LOW);
|
gpio_set(sck_pin, LOW);
|
||||||
|
|
||||||
for (uint8_t j = 0; j < spi_speed; j++)
|
for (uint8_t j = 0; j < spi_speed; j++)
|
||||||
LPC176x::gpio_set(mosi_pin, state);
|
gpio_set(mosi_pin, state);
|
||||||
|
|
||||||
for (uint8_t j = 0; j < spi_speed; j++)
|
for (uint8_t j = 0; j < spi_speed; j++)
|
||||||
LPC176x::gpio_set(sck_pin, HIGH);
|
gpio_set(sck_pin, HIGH);
|
||||||
}
|
}
|
||||||
b <<= 1;
|
b <<= 1;
|
||||||
if (miso_pin >= 0 && LPC176x::gpio_get(miso_pin)) b |= 1;
|
if (miso_pin >= 0 && gpio_get(miso_pin)) b |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
@@ -130,7 +130,7 @@ uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck
|
|||||||
static uint8_t SPI_speed = 0;
|
static uint8_t SPI_speed = 0;
|
||||||
|
|
||||||
static void u8g_sw_spi_HAL_LPC1768_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
|
static void u8g_sw_spi_HAL_LPC1768_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) {
|
||||||
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864)
|
#if ENABLED(FYSETC_MINI_12864)
|
||||||
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
|
swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin);
|
||||||
#else
|
#else
|
||||||
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
|
swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin);
|
||||||
@@ -158,10 +158,10 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case U8G_COM_MSG_CHIP_SELECT:
|
case U8G_COM_MSG_CHIP_SELECT:
|
||||||
#if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
|
||||||
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
|
||||||
// the next chip select goes active
|
// the next chip select goes active
|
||||||
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
|
||||||
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
|
u8g_SetPILevel(u8g, U8G_PI_CS, LOW);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Executable → Regular
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#if ENABLED(USE_WATCHDOG)
|
#if ENABLED(USE_WATCHDOG)
|
||||||
|
|
||||||
#include <lpc17xx_wdt.h>
|
#include "lpc17xx_wdt.h"
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
|
||||||
void watchdog_init() {
|
void watchdog_init() {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
#ifdef __SAMD51__
|
#ifdef __SAMD51__
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include <Adafruit_ZeroDMA.h>
|
#include "Adafruit_ZeroDMA.h"
|
||||||
#include <wiring_private.h>
|
#include "wiring_private.h"
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Local defines
|
// Local defines
|
||||||
@@ -442,11 +442,9 @@ void HAL_adc_init() {
|
|||||||
// Preloaded data (fixed for all ADC instances hence not loaded by DMA)
|
// Preloaded data (fixed for all ADC instances hence not loaded by DMA)
|
||||||
adc->REFCTRL.bit.REFSEL = ADC_REFCTRL_REFSEL_AREFA_Val; // VRefA pin
|
adc->REFCTRL.bit.REFSEL = ADC_REFCTRL_REFSEL_AREFA_Val; // VRefA pin
|
||||||
SYNC(adc->SYNCBUSY.bit.REFCTRL);
|
SYNC(adc->SYNCBUSY.bit.REFCTRL);
|
||||||
adc->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_12BIT_Val;
|
adc->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_10BIT_Val;
|
||||||
SYNC(adc->SYNCBUSY.bit.CTRLB);
|
SYNC(adc->SYNCBUSY.bit.CTRLB);
|
||||||
adc->SAMPCTRL.bit.SAMPLEN = (6 - 1); // Sampling clocks
|
adc->SAMPCTRL.bit.SAMPLEN = (6 - 1); // Sampling clocks
|
||||||
adc->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_16 | ADC_AVGCTRL_ADJRES(4); // 16 Accumulated conversions and shift 4 to get oversampled 12 bits result
|
|
||||||
SYNC(adc->SYNCBUSY.bit.AVGCTRL);
|
|
||||||
// Registers loaded by DMA
|
// Registers loaded by DMA
|
||||||
adc->DSEQCTRL.bit.INPUTCTRL = true;
|
adc->DSEQCTRL.bit.INPUTCTRL = true;
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,6 @@ extern uint16_t HAL_adc_result; // result of last ADC conversion
|
|||||||
|
|
||||||
void HAL_adc_init();
|
void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_ADC_FILTERED // Disable oversampling done in Marlin as ADC values already filtered in HAL
|
|
||||||
#define HAL_ADC_RESOLUTION 12
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SDIO_SUPPORT)
|
#if ENABLED(SDIO_SUPPORT)
|
||||||
#error "SDIO_SUPPORT is not supported on SAMD51."
|
#error "SDIO_SUPPORT is not supported."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FAST_PWM_FAN)
|
#if ENABLED(FAST_PWM_FAN)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
SYNC(tc->COUNT32.SYNCBUSY.bit.CTRLB);
|
SYNC(tc->COUNT32.SYNCBUSY.bit.CTRLB);
|
||||||
|
|
||||||
// Set compare value
|
// Set compare value
|
||||||
tc->COUNT32.COUNT.reg = tc->COUNT32.CC[0].reg = (HAL_TIMER_RATE) / frequency;
|
tc->COUNT32.COUNT.reg = tc->COUNT32.CC[0].reg = HAL_TIMER_RATE / frequency;
|
||||||
|
|
||||||
// And start timer
|
// And start timer
|
||||||
tc->COUNT32.CTRLA.bit.ENABLE = true;
|
tc->COUNT32.CTRLA.bit.ENABLE = true;
|
||||||
|
|||||||
@@ -28,21 +28,11 @@
|
|||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "../shared/Delay.h"
|
#include "../shared/Delay.h"
|
||||||
|
|
||||||
#if (__cplusplus == 201703L) && defined(__has_include)
|
|
||||||
#define HAS_SWSERIAL __has_include(<SoftwareSerial.h>)
|
|
||||||
#else
|
|
||||||
#define HAS_SWSERIAL HAS_TMC220x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAS_SWSERIAL
|
|
||||||
#include "SoftwareSerial.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(SRAM_EEPROM_EMULATION)
|
#if ENABLED(SRAM_EEPROM_EMULATION)
|
||||||
#if STM32F7xx
|
#if STM32F7xx
|
||||||
#include <stm32f7xx_ll_pwr.h>
|
#include "stm32f7xx_ll_pwr.h"
|
||||||
#elif STM32F4xx
|
#elif STM32F4xx
|
||||||
#include <stm32f4xx_ll_pwr.h>
|
#include "stm32f4xx_ll_pwr.h"
|
||||||
#else
|
#else
|
||||||
#error "SRAM_EEPROM_EMULATION is currently only supported for STM32F4xx and STM32F7xx"
|
#error "SRAM_EEPROM_EMULATION is currently only supported for STM32F4xx and STM32F7xx"
|
||||||
#endif
|
#endif
|
||||||
@@ -92,10 +82,6 @@ void HAL_init() {
|
|||||||
// Wait until backup regulator is initialized
|
// Wait until backup regulator is initialized
|
||||||
while (!LL_PWR_IsActiveFlag_BRR());
|
while (!LL_PWR_IsActiveFlag_BRR());
|
||||||
#endif // EEPROM_EMULATED_SRAM
|
#endif // EEPROM_EMULATED_SRAM
|
||||||
|
|
||||||
#if HAS_SWSERIAL
|
|
||||||
SoftwareSerial::setInterruptPriority(SWSERIAL_TIMER_IRQ_PRIO, 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
|
void HAL_clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n);
|
|||||||
inline void HAL_adc_init() {}
|
inline void HAL_adc_init() {}
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -83,13 +83,6 @@ void spiInit(uint8_t spiRate) {
|
|||||||
}
|
}
|
||||||
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
|
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
|
||||||
|
|
||||||
#if ENABLED(CUSTOM_SPI_PINS)
|
|
||||||
SPI.setMISO(MISO_PIN);
|
|
||||||
SPI.setMOSI(MOSI_PIN);
|
|
||||||
SPI.setSCLK(SCK_PIN);
|
|
||||||
SPI.setSSEL(SS_PIN);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SPI.begin();
|
SPI.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,30 +28,25 @@
|
|||||||
|
|
||||||
#include "Servo.h"
|
#include "Servo.h"
|
||||||
|
|
||||||
static uint_fast8_t servoCount = 0;
|
uint8_t servoPin[MAX_SERVOS] = { 0 };
|
||||||
constexpr millis_t servoDelay[] = SERVO_DELAY;
|
|
||||||
static_assert(COUNT(servoDelay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
|
|
||||||
|
|
||||||
libServo::libServo()
|
|
||||||
: delay(servoDelay[servoCount++])
|
|
||||||
{}
|
|
||||||
|
|
||||||
int8_t libServo::attach(const int pin) {
|
int8_t libServo::attach(const int pin) {
|
||||||
if (servoCount >= MAX_SERVOS) return -1;
|
if (servoIndex >= MAX_SERVOS) return -1;
|
||||||
if (pin > 0) servo_pin = pin;
|
if (pin > 0) servoPin[servoIndex] = pin;
|
||||||
return super::attach(servo_pin);
|
return super::attach(servoPin[servoIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t libServo::attach(const int pin, const int min, const int max) {
|
int8_t libServo::attach(const int pin, const int min, const int max) {
|
||||||
if (servoCount >= MAX_SERVOS) return -1;
|
if (pin > 0) servoPin[servoIndex] = pin;
|
||||||
if (pin > 0) servo_pin = pin;
|
return super::attach(servoPin[servoIndex], min, max);
|
||||||
return super::attach(servo_pin, min, max);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void libServo::move(const int value) {
|
void libServo::move(const int value) {
|
||||||
|
constexpr uint16_t servo_delay[] = SERVO_DELAY;
|
||||||
|
static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long.");
|
||||||
if (attach(0) >= 0) {
|
if (attach(0) >= 0) {
|
||||||
write(value);
|
write(value);
|
||||||
safe_delay(delay);
|
safe_delay(servo_delay[servoIndex]);
|
||||||
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
|
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
|
||||||
detach();
|
detach();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,13 +27,11 @@
|
|||||||
// Inherit and expand on the official library
|
// Inherit and expand on the official library
|
||||||
class libServo : public Servo {
|
class libServo : public Servo {
|
||||||
public:
|
public:
|
||||||
libServo();
|
|
||||||
int8_t attach(const int pin);
|
int8_t attach(const int pin);
|
||||||
int8_t attach(const int pin, const int min, const int max);
|
int8_t attach(const int pin, const int min, const int max);
|
||||||
void move(const int value);
|
void move(const int value);
|
||||||
private:
|
private:
|
||||||
typedef Servo super;
|
typedef Servo super;
|
||||||
|
uint16_t min_ticks, max_ticks;
|
||||||
int servo_pin = 0;
|
uint8_t servoIndex; // index into the channel data for this servo
|
||||||
millis_t delay = 0;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,395 +0,0 @@
|
|||||||
/*
|
|
||||||
* SoftwareSerial.cpp (formerly NewSoftSerial.cpp)
|
|
||||||
*
|
|
||||||
* Multi-instance software serial library for Arduino/Wiring
|
|
||||||
* -- Interrupt-driven receive and other improvements by ladyada
|
|
||||||
* (http://ladyada.net)
|
|
||||||
* -- Tuning, circular buffer, derivation from class Print/Stream,
|
|
||||||
* multi-instance support, porting to 8MHz processors,
|
|
||||||
* various optimizations, PROGMEM delay tables, inverse logic and
|
|
||||||
* direct port writing by Mikal Hart (http://www.arduiniana.org)
|
|
||||||
* -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com)
|
|
||||||
* -- 20MHz processor support by Garrett Mace (http://www.macetech.com)
|
|
||||||
* -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/)
|
|
||||||
* -- STM32 support by Armin van der Togt
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* The latest version of this library can always be found at
|
|
||||||
* http://arduiniana.org.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// Includes
|
|
||||||
//
|
|
||||||
#if defined(PLATFORMIO) && defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
|
||||||
|
|
||||||
#include "SoftwareSerial.h"
|
|
||||||
#include "timers.h"
|
|
||||||
|
|
||||||
#define OVERSAMPLE 3 // in RX, Timer will generate interruption OVERSAMPLE time during a bit. Thus OVERSAMPLE ticks in a bit. (interrupt not synchonized with edge).
|
|
||||||
|
|
||||||
// defined in bit-periods
|
|
||||||
#define HALFDUPLEX_SWITCH_DELAY 5
|
|
||||||
// It's best to define TIMER_SERIAL in variant.h. If not defined, we choose one here
|
|
||||||
// The order is based on (lack of) features and compare channels, we choose the simplest available
|
|
||||||
// because we only need an update interrupt
|
|
||||||
#if !defined(TIMER_SERIAL)
|
|
||||||
#if defined (TIM18_BASE)
|
|
||||||
#define TIMER_SERIAL TIM18
|
|
||||||
#elif defined (TIM7_BASE)
|
|
||||||
#define TIMER_SERIAL TIM7
|
|
||||||
#elif defined (TIM6_BASE)
|
|
||||||
#define TIMER_SERIAL TIM6
|
|
||||||
#elif defined (TIM22_BASE)
|
|
||||||
#define TIMER_SERIAL TIM22
|
|
||||||
#elif defined (TIM21_BASE)
|
|
||||||
#define TIMER_SERIAL TIM21
|
|
||||||
#elif defined (TIM17_BASE)
|
|
||||||
#define TIMER_SERIAL TIM17
|
|
||||||
#elif defined (TIM16_BASE)
|
|
||||||
#define TIMER_SERIAL TIM16
|
|
||||||
#elif defined (TIM15_BASE)
|
|
||||||
#define TIMER_SERIAL TIM15
|
|
||||||
#elif defined (TIM14_BASE)
|
|
||||||
#define TIMER_SERIAL TIM14
|
|
||||||
#elif defined (TIM13_BASE)
|
|
||||||
#define TIMER_SERIAL TIM13
|
|
||||||
#elif defined (TIM11_BASE)
|
|
||||||
#define TIMER_SERIAL TIM11
|
|
||||||
#elif defined (TIM10_BASE)
|
|
||||||
#define TIMER_SERIAL TIM10
|
|
||||||
#elif defined (TIM12_BASE)
|
|
||||||
#define TIMER_SERIAL TIM12
|
|
||||||
#elif defined (TIM19_BASE)
|
|
||||||
#define TIMER_SERIAL TIM19
|
|
||||||
#elif defined (TIM9_BASE)
|
|
||||||
#define TIMER_SERIAL TIM9
|
|
||||||
#elif defined (TIM5_BASE)
|
|
||||||
#define TIMER_SERIAL TIM5
|
|
||||||
#elif defined (TIM4_BASE)
|
|
||||||
#define TIMER_SERIAL TIM4
|
|
||||||
#elif defined (TIM3_BASE)
|
|
||||||
#define TIMER_SERIAL TIM3
|
|
||||||
#elif defined (TIM2_BASE)
|
|
||||||
#define TIMER_SERIAL TIM2
|
|
||||||
#elif defined (TIM20_BASE)
|
|
||||||
#define TIMER_SERIAL TIM20
|
|
||||||
#elif defined (TIM8_BASE)
|
|
||||||
#define TIMER_SERIAL TIM8
|
|
||||||
#elif defined (TIM1_BASE)
|
|
||||||
#define TIMER_SERIAL TIM1
|
|
||||||
#else
|
|
||||||
#error No suitable timer found for SoftwareSerial, define TIMER_SERIAL in variant.h
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
//
|
|
||||||
// Statics
|
|
||||||
//
|
|
||||||
HardwareTimer SoftwareSerial::timer(TIMER_SERIAL);
|
|
||||||
const IRQn_Type SoftwareSerial::timer_interrupt_number = static_cast<IRQn_Type>(getTimerUpIrq(TIMER_SERIAL));
|
|
||||||
uint32_t SoftwareSerial::timer_interrupt_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), TIM_IRQ_PRIO, TIM_IRQ_SUBPRIO);
|
|
||||||
SoftwareSerial *SoftwareSerial::active_listener = nullptr;
|
|
||||||
SoftwareSerial *volatile SoftwareSerial::active_out = nullptr;
|
|
||||||
SoftwareSerial *volatile SoftwareSerial::active_in = nullptr;
|
|
||||||
int32_t SoftwareSerial::tx_tick_cnt = 0; // OVERSAMPLE ticks needed for a bit
|
|
||||||
int32_t volatile SoftwareSerial::rx_tick_cnt = 0; // OVERSAMPLE ticks needed for a bit
|
|
||||||
uint32_t SoftwareSerial::tx_buffer = 0;
|
|
||||||
int32_t SoftwareSerial::tx_bit_cnt = 0;
|
|
||||||
uint32_t SoftwareSerial::rx_buffer = 0;
|
|
||||||
int32_t SoftwareSerial::rx_bit_cnt = -1; // rx_bit_cnt = -1 : waiting for start bit
|
|
||||||
uint32_t SoftwareSerial::cur_speed = 0;
|
|
||||||
|
|
||||||
void SoftwareSerial::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority) {
|
|
||||||
timer_interrupt_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), preemptPriority, subPriority);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Private methods
|
|
||||||
//
|
|
||||||
|
|
||||||
void SoftwareSerial::setSpeed(uint32_t speed) {
|
|
||||||
if (speed != cur_speed) {
|
|
||||||
timer.pause();
|
|
||||||
if (speed != 0) {
|
|
||||||
// Disable the timer
|
|
||||||
uint32_t clock_rate, cmp_value;
|
|
||||||
// Get timer clock
|
|
||||||
clock_rate = timer.getTimerClkFreq();
|
|
||||||
int pre = 1;
|
|
||||||
// Calculate prescale an compare value
|
|
||||||
do {
|
|
||||||
cmp_value = clock_rate / (speed * OVERSAMPLE);
|
|
||||||
if (cmp_value >= UINT16_MAX) {
|
|
||||||
clock_rate /= 2;
|
|
||||||
pre *= 2;
|
|
||||||
}
|
|
||||||
} while (cmp_value >= UINT16_MAX);
|
|
||||||
timer.setPrescaleFactor(pre);
|
|
||||||
timer.setOverflow(cmp_value);
|
|
||||||
timer.setCount(0);
|
|
||||||
timer.attachInterrupt(&handleInterrupt);
|
|
||||||
timer.resume();
|
|
||||||
NVIC_SetPriority(timer_interrupt_number, timer_interrupt_priority);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
timer.detachInterrupt();
|
|
||||||
cur_speed = speed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This function sets the current object as the "listening"
|
|
||||||
// one and returns true if it replaces another
|
|
||||||
bool SoftwareSerial::listen() {
|
|
||||||
if (active_listener != this) {
|
|
||||||
// wait for any transmit to complete as we may change speed
|
|
||||||
while (active_out);
|
|
||||||
active_listener->stopListening();
|
|
||||||
rx_tick_cnt = 1; // 1 : next interrupt will decrease rx_tick_cnt to 0 which means RX pin level will be considered.
|
|
||||||
rx_bit_cnt = -1; // rx_bit_cnt = -1 : waiting for start bit
|
|
||||||
setSpeed(_speed);
|
|
||||||
active_listener = this;
|
|
||||||
if (!_half_duplex) active_in = this;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop listening. Returns true if we were actually listening.
|
|
||||||
bool SoftwareSerial::stopListening() {
|
|
||||||
if (active_listener == this) {
|
|
||||||
// wait for any output to complete
|
|
||||||
while (active_out);
|
|
||||||
if (_half_duplex) setRXTX(false);
|
|
||||||
active_listener = nullptr;
|
|
||||||
active_in = nullptr;
|
|
||||||
// turn off ints
|
|
||||||
setSpeed(0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SoftwareSerial::setTX() {
|
|
||||||
if (_inverse_logic)
|
|
||||||
LL_GPIO_ResetOutputPin(_transmitPinPort, _transmitPinNumber);
|
|
||||||
else
|
|
||||||
LL_GPIO_SetOutputPin(_transmitPinPort, _transmitPinNumber);
|
|
||||||
pinMode(_transmitPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SoftwareSerial::setRX() {
|
|
||||||
pinMode(_receivePin, _inverse_logic ? INPUT_PULLDOWN : INPUT_PULLUP); // pullup for normal logic!
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SoftwareSerial::setRXTX(bool input) {
|
|
||||||
if (_half_duplex) {
|
|
||||||
if (input) {
|
|
||||||
if (active_in != this) {
|
|
||||||
setRX();
|
|
||||||
rx_bit_cnt = -1; // rx_bit_cnt = -1 : waiting for start bit
|
|
||||||
rx_tick_cnt = 2; // 2 : next interrupt will be discarded. 2 interrupts required to consider RX pin level
|
|
||||||
active_in = this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (active_in == this) {
|
|
||||||
setTX();
|
|
||||||
active_in = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SoftwareSerial::send() {
|
|
||||||
if (--tx_tick_cnt <= 0) { // if tx_tick_cnt > 0 interrupt is discarded. Only when tx_tick_cnt reaches 0 is TX pin set.
|
|
||||||
if (tx_bit_cnt++ < 10) { // tx_bit_cnt < 10 transmission is not finished (10 = 1 start +8 bits + 1 stop)
|
|
||||||
// Send data (including start and stop bits)
|
|
||||||
if (tx_buffer & 1)
|
|
||||||
LL_GPIO_SetOutputPin(_transmitPinPort, _transmitPinNumber);
|
|
||||||
else
|
|
||||||
LL_GPIO_ResetOutputPin(_transmitPinPort, _transmitPinNumber);
|
|
||||||
tx_buffer >>= 1;
|
|
||||||
tx_tick_cnt = OVERSAMPLE; // Wait OVERSAMPLE ticks to send next bit
|
|
||||||
}
|
|
||||||
else { // Transmission finished
|
|
||||||
tx_tick_cnt = 1;
|
|
||||||
if (_output_pending) {
|
|
||||||
active_out = nullptr;
|
|
||||||
|
|
||||||
// In half-duplex mode wait HALFDUPLEX_SWITCH_DELAY bit-periods after the byte has
|
|
||||||
// been transmitted before allowing the switch to RX mode
|
|
||||||
}
|
|
||||||
else if (tx_bit_cnt > 10 + OVERSAMPLE * HALFDUPLEX_SWITCH_DELAY) {
|
|
||||||
if (_half_duplex && active_listener == this) setRXTX(true);
|
|
||||||
active_out = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// The receive routine called by the interrupt handler
|
|
||||||
//
|
|
||||||
inline void SoftwareSerial::recv() {
|
|
||||||
if (--rx_tick_cnt <= 0) { // if rx_tick_cnt > 0 interrupt is discarded. Only when rx_tick_cnt reaches 0 is RX pin considered
|
|
||||||
bool inbit = LL_GPIO_IsInputPinSet(_receivePinPort, _receivePinNumber) ^ _inverse_logic;
|
|
||||||
if (rx_bit_cnt == -1) { // rx_bit_cnt = -1 : waiting for start bit
|
|
||||||
if (!inbit) {
|
|
||||||
// got start bit
|
|
||||||
rx_bit_cnt = 0; // rx_bit_cnt == 0 : start bit received
|
|
||||||
rx_tick_cnt = OVERSAMPLE + 1; // Wait 1 bit (OVERSAMPLE ticks) + 1 tick in order to sample RX pin in the middle of the edge (and not too close to the edge)
|
|
||||||
rx_buffer = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rx_tick_cnt = 1; // Waiting for start bit, but wrong level. Wait for next Interrupt to check RX pin level
|
|
||||||
}
|
|
||||||
else if (rx_bit_cnt >= 8) { // rx_bit_cnt >= 8 : waiting for stop bit
|
|
||||||
if (inbit) {
|
|
||||||
// Stop-bit read complete. Add to buffer.
|
|
||||||
uint8_t next = (_receive_buffer_tail + 1) % _SS_MAX_RX_BUFF;
|
|
||||||
if (next != _receive_buffer_head) {
|
|
||||||
// save new data in buffer: tail points to byte destination
|
|
||||||
_receive_buffer[_receive_buffer_tail] = rx_buffer; // save new byte
|
|
||||||
_receive_buffer_tail = next;
|
|
||||||
}
|
|
||||||
else // rx_bit_cnt = x with x = [0..7] correspond to new bit x received
|
|
||||||
_buffer_overflow = true;
|
|
||||||
}
|
|
||||||
// Full trame received. Restart waiting for start bit at next interrupt
|
|
||||||
rx_tick_cnt = 1;
|
|
||||||
rx_bit_cnt = -1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// data bits
|
|
||||||
rx_buffer >>= 1;
|
|
||||||
if (inbit) rx_buffer |= 0x80;
|
|
||||||
rx_bit_cnt++; // Prepare for next bit
|
|
||||||
rx_tick_cnt = OVERSAMPLE; // Wait OVERSAMPLE ticks before sampling next bit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Interrupt handling
|
|
||||||
//
|
|
||||||
|
|
||||||
/* static */
|
|
||||||
inline void SoftwareSerial::handleInterrupt(HardwareTimer*) {
|
|
||||||
if (active_in) active_in->recv();
|
|
||||||
if (active_out) active_out->send();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Constructor
|
|
||||||
//
|
|
||||||
SoftwareSerial::SoftwareSerial(uint16_t receivePin, uint16_t transmitPin, bool inverse_logic /* = false */) :
|
|
||||||
_receivePin(receivePin),
|
|
||||||
_transmitPin(transmitPin),
|
|
||||||
_receivePinPort(digitalPinToPort(receivePin)),
|
|
||||||
_receivePinNumber(STM_LL_GPIO_PIN(digitalPinToPinName(receivePin))),
|
|
||||||
_transmitPinPort(digitalPinToPort(transmitPin)),
|
|
||||||
_transmitPinNumber(STM_LL_GPIO_PIN(digitalPinToPinName(transmitPin))),
|
|
||||||
_speed(0),
|
|
||||||
_buffer_overflow(false),
|
|
||||||
_inverse_logic(inverse_logic),
|
|
||||||
_half_duplex(receivePin == transmitPin),
|
|
||||||
_output_pending(0),
|
|
||||||
_receive_buffer_tail(0),
|
|
||||||
_receive_buffer_head(0)
|
|
||||||
{
|
|
||||||
if ((receivePin < NUM_DIGITAL_PINS) || (transmitPin < NUM_DIGITAL_PINS)) {
|
|
||||||
/* Enable GPIO clock for tx and rx pin*/
|
|
||||||
set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(transmitPin)));
|
|
||||||
set_GPIO_Port_Clock(STM_PORT(digitalPinToPinName(receivePin)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_Error_Handler("ERROR: invalid pin number\n", -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Destructor
|
|
||||||
//
|
|
||||||
SoftwareSerial::~SoftwareSerial() { end(); }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Public methods
|
|
||||||
//
|
|
||||||
|
|
||||||
void SoftwareSerial::begin(long speed) {
|
|
||||||
#ifdef FORCE_BAUD_RATE
|
|
||||||
speed = FORCE_BAUD_RATE;
|
|
||||||
#endif
|
|
||||||
_speed = speed;
|
|
||||||
if (!_half_duplex) {
|
|
||||||
setTX();
|
|
||||||
setRX();
|
|
||||||
listen();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
setTX();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareSerial::end() {
|
|
||||||
stopListening();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read data from buffer
|
|
||||||
int SoftwareSerial::read() {
|
|
||||||
// Empty buffer?
|
|
||||||
if (_receive_buffer_head == _receive_buffer_tail) return -1;
|
|
||||||
|
|
||||||
// Read from "head"
|
|
||||||
uint8_t d = _receive_buffer[_receive_buffer_head]; // grab next byte
|
|
||||||
_receive_buffer_head = (_receive_buffer_head + 1) % _SS_MAX_RX_BUFF;
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SoftwareSerial::available() {
|
|
||||||
return (_receive_buffer_tail + _SS_MAX_RX_BUFF - _receive_buffer_head) % _SS_MAX_RX_BUFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t SoftwareSerial::write(uint8_t b) {
|
|
||||||
// wait for previous transmit to complete
|
|
||||||
_output_pending = 1;
|
|
||||||
while (active_out) { /* nada */ }
|
|
||||||
// add start and stop bits.
|
|
||||||
tx_buffer = b << 1 | 0x200;
|
|
||||||
if (_inverse_logic) tx_buffer = ~tx_buffer;
|
|
||||||
tx_bit_cnt = 0;
|
|
||||||
tx_tick_cnt = OVERSAMPLE;
|
|
||||||
setSpeed(_speed);
|
|
||||||
if (_half_duplex) setRXTX(false);
|
|
||||||
_output_pending = 0;
|
|
||||||
// make us active
|
|
||||||
active_out = this;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareSerial::flush() {
|
|
||||||
noInterrupts();
|
|
||||||
_receive_buffer_head = _receive_buffer_tail = 0;
|
|
||||||
interrupts();
|
|
||||||
}
|
|
||||||
|
|
||||||
int SoftwareSerial::peek() {
|
|
||||||
// Empty buffer?
|
|
||||||
if (_receive_buffer_head == _receive_buffer_tail) return -1;
|
|
||||||
|
|
||||||
// Read from "head"
|
|
||||||
return _receive_buffer[_receive_buffer_head];
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
/**
|
|
||||||
* SoftwareSerial.h (formerly NewSoftSerial.h)
|
|
||||||
*
|
|
||||||
* Multi-instance software serial library for Arduino/Wiring
|
|
||||||
* -- Interrupt-driven receive and other improvements by ladyada
|
|
||||||
* (http://ladyada.net)
|
|
||||||
* -- Tuning, circular buffer, derivation from class Print/Stream,
|
|
||||||
* multi-instance support, porting to 8MHz processors,
|
|
||||||
* various optimizations, PROGMEM delay tables, inverse logic and
|
|
||||||
* direct port writing by Mikal Hart (http://www.arduiniana.org)
|
|
||||||
* -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com)
|
|
||||||
* -- 20MHz processor support by Garrett Mace (http://www.macetech.com)
|
|
||||||
* -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/)
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* The latest version of this library can always be found at
|
|
||||||
* http://arduiniana.org.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SOFTWARESERIAL_H
|
|
||||||
#define SOFTWARESERIAL_H
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Definitions
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#define _SS_MAX_RX_BUFF 64 // RX buffer size
|
|
||||||
|
|
||||||
class SoftwareSerial : public Stream {
|
|
||||||
private:
|
|
||||||
// per object data
|
|
||||||
uint16_t _receivePin;
|
|
||||||
uint16_t _transmitPin;
|
|
||||||
GPIO_TypeDef *_receivePinPort;
|
|
||||||
uint32_t _receivePinNumber;
|
|
||||||
GPIO_TypeDef *_transmitPinPort;
|
|
||||||
uint32_t _transmitPinNumber;
|
|
||||||
uint32_t _speed;
|
|
||||||
|
|
||||||
uint16_t _buffer_overflow: 1;
|
|
||||||
uint16_t _inverse_logic: 1;
|
|
||||||
uint16_t _half_duplex: 1;
|
|
||||||
uint16_t _output_pending: 1;
|
|
||||||
|
|
||||||
unsigned char _receive_buffer[_SS_MAX_RX_BUFF];
|
|
||||||
volatile uint8_t _receive_buffer_tail;
|
|
||||||
volatile uint8_t _receive_buffer_head;
|
|
||||||
|
|
||||||
uint32_t delta_start = 0;
|
|
||||||
|
|
||||||
// static data
|
|
||||||
static bool initialised;
|
|
||||||
static HardwareTimer timer;
|
|
||||||
static const IRQn_Type timer_interrupt_number;
|
|
||||||
static uint32_t timer_interrupt_priority;
|
|
||||||
static SoftwareSerial *active_listener;
|
|
||||||
static SoftwareSerial *volatile active_out;
|
|
||||||
static SoftwareSerial *volatile active_in;
|
|
||||||
static int32_t tx_tick_cnt;
|
|
||||||
static volatile int32_t rx_tick_cnt;
|
|
||||||
static uint32_t tx_buffer;
|
|
||||||
static int32_t tx_bit_cnt;
|
|
||||||
static uint32_t rx_buffer;
|
|
||||||
static int32_t rx_bit_cnt;
|
|
||||||
static uint32_t cur_speed;
|
|
||||||
|
|
||||||
// private methods
|
|
||||||
void send();
|
|
||||||
void recv();
|
|
||||||
void setTX();
|
|
||||||
void setRX();
|
|
||||||
void setSpeed(uint32_t speed);
|
|
||||||
void setRXTX(bool input);
|
|
||||||
static void handleInterrupt(HardwareTimer *timer);
|
|
||||||
|
|
||||||
public:
|
|
||||||
// public methods
|
|
||||||
|
|
||||||
SoftwareSerial(uint16_t receivePin, uint16_t transmitPin, bool inverse_logic = false);
|
|
||||||
virtual ~SoftwareSerial();
|
|
||||||
void begin(long speed);
|
|
||||||
bool listen();
|
|
||||||
void end();
|
|
||||||
bool isListening() { return active_listener == this; }
|
|
||||||
bool stopListening();
|
|
||||||
bool overflow() {
|
|
||||||
bool ret = _buffer_overflow;
|
|
||||||
if (ret) _buffer_overflow = false;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
int peek();
|
|
||||||
|
|
||||||
virtual size_t write(uint8_t byte);
|
|
||||||
virtual int read();
|
|
||||||
virtual int available();
|
|
||||||
virtual void flush();
|
|
||||||
operator bool() { return true; }
|
|
||||||
|
|
||||||
static void setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority);
|
|
||||||
|
|
||||||
using Print::write;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // SOFTWARESERIAL_H
|
|
||||||
@@ -1,265 +0,0 @@
|
|||||||
/**
|
|
||||||
* Marlin 3D Printer Firmware
|
|
||||||
*
|
|
||||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
||||||
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
|
|
||||||
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
|
|
||||||
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT 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/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
|
||||||
|
|
||||||
#if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION)
|
|
||||||
|
|
||||||
#include "../shared/persistent_store_api.h"
|
|
||||||
|
|
||||||
|
|
||||||
// Only STM32F4 can support wear leveling at this time
|
|
||||||
#ifndef STM32F4xx
|
|
||||||
#undef FLASH_EEPROM_LEVELING
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The STM32 HAL supports chips that deal with "pages" and some with "sectors" and some that
|
|
||||||
* even have multiple "banks" of flash.
|
|
||||||
*
|
|
||||||
* This code is a bit of a mashup of
|
|
||||||
* framework-arduinoststm32/cores/arduino/stm32/stm32_eeprom.c
|
|
||||||
* hal/hal_lpc1768/persistent_store_flash.cpp
|
|
||||||
*
|
|
||||||
* This has only be written against those that use a single "sector" design.
|
|
||||||
*
|
|
||||||
* Those that deal with "pages" could be made to work. Looking at the STM32F07 for example, there are
|
|
||||||
* 128 "pages", each 2kB in size. If we continued with our EEPROM being 4Kb, we'd always need to operate
|
|
||||||
* on 2 of these pages. Each write, we'd use 2 different pages from a pool of pages until we are done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
|
|
||||||
#include "stm32_def.h"
|
|
||||||
|
|
||||||
#define DEBUG_OUT ENABLED(EEPROM_CHITCHAT)
|
|
||||||
#include "src/core/debug_out.h"
|
|
||||||
|
|
||||||
#ifndef EEPROM_SIZE
|
|
||||||
#define EEPROM_SIZE 0x1000 // 4kB
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FLASH_SECTOR
|
|
||||||
#define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1)
|
|
||||||
#endif
|
|
||||||
#ifndef FLASH_UNIT_SIZE
|
|
||||||
#define FLASH_UNIT_SIZE 0x20000 // 128kB
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FLASH_ADDRESS_START (FLASH_END - ((FLASH_SECTOR_TOTAL - FLASH_SECTOR) * FLASH_UNIT_SIZE) + 1)
|
|
||||||
#define FLASH_ADDRESS_END (FLASH_ADDRESS_START + FLASH_UNIT_SIZE - 1)
|
|
||||||
|
|
||||||
#define EEPROM_SLOTS (FLASH_UNIT_SIZE/EEPROM_SIZE)
|
|
||||||
#define SLOT_ADDRESS(slot) (FLASH_ADDRESS_START + (slot * EEPROM_SIZE))
|
|
||||||
|
|
||||||
#define UNLOCK_FLASH() if (!flash_unlocked) { \
|
|
||||||
HAL_FLASH_Unlock(); \
|
|
||||||
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | \
|
|
||||||
FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR); \
|
|
||||||
flash_unlocked = true; \
|
|
||||||
}
|
|
||||||
#define LOCK_FLASH() if (flash_unlocked) { HAL_FLASH_Lock(); flash_unlocked = false; }
|
|
||||||
|
|
||||||
#define EMPTY_UINT32 ((uint32_t)-1)
|
|
||||||
#define EMPTY_UINT8 ((uint8_t)-1)
|
|
||||||
|
|
||||||
static uint8_t ram_eeprom[EEPROM_SIZE] __attribute__((aligned(4))) = {0};
|
|
||||||
static int current_slot = -1;
|
|
||||||
|
|
||||||
static_assert(0 == EEPROM_SIZE % 4, "EEPROM_SIZE must be a multiple of 4"); // Ensure copying as uint32_t is safe
|
|
||||||
static_assert(0 == FLASH_UNIT_SIZE % EEPROM_SIZE, "EEPROM_SIZE must divide evenly into your FLASH_UNIT_SIZE");
|
|
||||||
static_assert(FLASH_UNIT_SIZE >= EEPROM_SIZE, "FLASH_UNIT_SIZE must be greater than or equal to your EEPROM_SIZE");
|
|
||||||
static_assert(IS_FLASH_SECTOR(FLASH_SECTOR), "FLASH_SECTOR is invalid");
|
|
||||||
static_assert(IS_POWER_OF_2(FLASH_UNIT_SIZE), "FLASH_UNIT_SIZE should be a power of 2, please check your chip's spec sheet");
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool eeprom_data_written = false;
|
|
||||||
|
|
||||||
bool PersistentStore::access_start() {
|
|
||||||
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
|
|
||||||
if (current_slot == -1 || eeprom_data_written) {
|
|
||||||
// This must be the first time since power on that we have accessed the storage, or someone
|
|
||||||
// loaded and called write_data and never called access_finish.
|
|
||||||
// Lets go looking for the slot that holds our configuration.
|
|
||||||
if (eeprom_data_written) DEBUG_ECHOLN("Dangling EEPROM write_data");
|
|
||||||
uint32_t address = FLASH_ADDRESS_START;
|
|
||||||
while (address <= FLASH_ADDRESS_END) {
|
|
||||||
uint32_t address_value = (*(__IO uint32_t*)address);
|
|
||||||
if (address_value != EMPTY_UINT32) {
|
|
||||||
current_slot = (address - FLASH_ADDRESS_START) / EEPROM_SIZE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
address += sizeof(uint32_t);
|
|
||||||
}
|
|
||||||
if (current_slot == -1) {
|
|
||||||
// We didn't find anything, so we'll just intialize to empty
|
|
||||||
for (int i = 0; i < EEPROM_SIZE; i++) ram_eeprom[i] = EMPTY_UINT8;
|
|
||||||
current_slot = EEPROM_SLOTS;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// load current settings
|
|
||||||
uint8_t *eeprom_data = (uint8_t *)SLOT_ADDRESS(current_slot);
|
|
||||||
for (int i = 0; i < EEPROM_SIZE; i++) ram_eeprom[i] = eeprom_data[i];
|
|
||||||
DEBUG_ECHOLNPAIR("EEPROM loaded from slot ", current_slot, ".");
|
|
||||||
}
|
|
||||||
eeprom_data_written = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
eeprom_buffer_fill();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::access_finish() {
|
|
||||||
|
|
||||||
if (eeprom_data_written) {
|
|
||||||
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
|
|
||||||
HAL_StatusTypeDef status = HAL_ERROR;
|
|
||||||
bool flash_unlocked = false;
|
|
||||||
|
|
||||||
if (--current_slot < 0) {
|
|
||||||
// all slots have been used, erase everything and start again
|
|
||||||
|
|
||||||
FLASH_EraseInitTypeDef EraseInitStruct;
|
|
||||||
uint32_t SectorError = 0;
|
|
||||||
|
|
||||||
EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS;
|
|
||||||
EraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3;
|
|
||||||
EraseInitStruct.Sector = FLASH_SECTOR;
|
|
||||||
EraseInitStruct.NbSectors = 1;
|
|
||||||
|
|
||||||
current_slot = EEPROM_SLOTS - 1;
|
|
||||||
UNLOCK_FLASH();
|
|
||||||
|
|
||||||
status = HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError);
|
|
||||||
if (status != HAL_OK) {
|
|
||||||
DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status);
|
|
||||||
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
|
|
||||||
DEBUG_ECHOLNPAIR("SectorError=", SectorError);
|
|
||||||
LOCK_FLASH();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UNLOCK_FLASH();
|
|
||||||
|
|
||||||
uint32_t offset = 0;
|
|
||||||
uint32_t address = SLOT_ADDRESS(current_slot);
|
|
||||||
uint32_t address_end = address + EEPROM_SIZE;
|
|
||||||
uint32_t data = 0;
|
|
||||||
|
|
||||||
bool success = true;
|
|
||||||
|
|
||||||
while (address < address_end) {
|
|
||||||
memcpy(&data, ram_eeprom + offset, sizeof(uint32_t));
|
|
||||||
status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, address, data);
|
|
||||||
if (status == HAL_OK) {
|
|
||||||
address += sizeof(uint32_t);
|
|
||||||
offset += sizeof(uint32_t);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DEBUG_ECHOLNPAIR("HAL_FLASH_Program=", status);
|
|
||||||
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
|
|
||||||
DEBUG_ECHOLNPAIR("address=", address);
|
|
||||||
success = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LOCK_FLASH();
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
eeprom_data_written = false;
|
|
||||||
DEBUG_ECHOLNPAIR("EEPROM saved to slot ", current_slot, ".");
|
|
||||||
}
|
|
||||||
|
|
||||||
return success;
|
|
||||||
|
|
||||||
#else
|
|
||||||
eeprom_buffer_flush();
|
|
||||||
eeprom_data_written = false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
|
||||||
while (size--) {
|
|
||||||
uint8_t v = *value;
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
if (v != ram_eeprom[pos]) {
|
|
||||||
ram_eeprom[pos] = v;
|
|
||||||
eeprom_data_written = true;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (v != eeprom_buffered_read_byte(pos)) {
|
|
||||||
eeprom_buffered_write_byte(pos, v);
|
|
||||||
eeprom_data_written = true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
crc16(crc, &v, 1);
|
|
||||||
pos++;
|
|
||||||
value++;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
|
||||||
do {
|
|
||||||
const uint8_t c = (
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
ram_eeprom[pos]
|
|
||||||
#else
|
|
||||||
eeprom_buffered_read_byte(pos)
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
if (writing) *value = c;
|
|
||||||
crc16(crc, &c, 1);
|
|
||||||
pos++;
|
|
||||||
value++;
|
|
||||||
} while (--size);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t PersistentStore::capacity() {
|
|
||||||
return (
|
|
||||||
#if ENABLED(FLASH_EEPROM_LEVELING)
|
|
||||||
EEPROM_SIZE
|
|
||||||
#else
|
|
||||||
E2END + 1
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS && FLASH_EEPROM_EMULATION
|
|
||||||
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
|
||||||
@@ -24,15 +24,29 @@
|
|||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS) && ANY(SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
|
#if ENABLED(EEPROM_SETTINGS) && ANY(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SPI_EEPROM, I2C_EEPROM)
|
||||||
|
|
||||||
#include "../shared/persistent_store_api.h"
|
#include "../shared/persistent_store_api.h"
|
||||||
|
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
#include <EEPROM.h>
|
||||||
|
static bool eeprom_data_written = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool PersistentStore::access_start() {
|
bool PersistentStore::access_start() {
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
eeprom_buffer_fill();
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::access_finish() {
|
bool PersistentStore::access_finish() {
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
if (eeprom_data_written) {
|
||||||
|
eeprom_buffer_flush();
|
||||||
|
eeprom_data_written = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,6 +66,8 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#elif ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
eeprom_buffered_write_byte(pos, v);
|
||||||
#else
|
#else
|
||||||
*(__IO uint8_t *)(BKPSRAM_BASE + (uint8_t * const)pos) = v;
|
*(__IO uint8_t *)(BKPSRAM_BASE + (uint8_t * const)pos) = v;
|
||||||
#endif
|
#endif
|
||||||
@@ -60,6 +76,9 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
|
|||||||
pos++;
|
pos++;
|
||||||
value++;
|
value++;
|
||||||
};
|
};
|
||||||
|
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
eeprom_data_written = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -70,6 +89,8 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
|
|||||||
const uint8_t c = (
|
const uint8_t c = (
|
||||||
#if EITHER(SPI_EEPROM, I2C_EEPROM)
|
#if EITHER(SPI_EEPROM, I2C_EEPROM)
|
||||||
eeprom_read_byte((uint8_t*)pos)
|
eeprom_read_byte((uint8_t*)pos)
|
||||||
|
#elif ENABLED(FLASH_EEPROM_EMULATION)
|
||||||
|
eeprom_buffered_read_byte(pos)
|
||||||
#else
|
#else
|
||||||
(*(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)))
|
(*(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)))
|
||||||
#endif
|
#endif
|
||||||
@@ -93,5 +114,5 @@ size_t PersistentStore::capacity() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS && (SRAM_EEPROM_EMULATION || SPI_EEPROM || I2C_EEPROM)
|
#endif // EEPROM_SETTINGS && (FLASH_EEPROM_EMULATION || SRAM_EEPROM_EMULATION || SPI_EEPROM || I2C_EEPROM)
|
||||||
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
||||||
|
|||||||
@@ -32,108 +32,62 @@
|
|||||||
|
|
||||||
#define NUM_HARDWARE_TIMERS 2
|
#define NUM_HARDWARE_TIMERS 2
|
||||||
|
|
||||||
#define __TIMER_DEV(X) TIM##X
|
|
||||||
#define _TIMER_DEV(X) __TIMER_DEV(X)
|
|
||||||
#define STEP_TIMER_DEV _TIMER_DEV(STEP_TIMER)
|
|
||||||
#define TEMP_TIMER_DEV _TIMER_DEV(TEMP_TIMER)
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Private Variables
|
// Private Variables
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
HardwareTimer *timer_instance[NUM_HARDWARE_TIMERS] = { NULL };
|
stm32_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
|
||||||
bool timer_enabled[NUM_HARDWARE_TIMERS] = { false };
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Public functions
|
// Public functions
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
// frequency is in Hertz
|
bool timers_initialized[NUM_HARDWARE_TIMERS] = { false };
|
||||||
|
|
||||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||||
if (!HAL_timer_initialized(timer_num)) {
|
|
||||||
switch (timer_num) {
|
|
||||||
case STEP_TIMER_NUM: // STEPPER TIMER - use a 32bit timer if possible
|
|
||||||
timer_instance[timer_num] = new HardwareTimer(STEP_TIMER_DEV);
|
|
||||||
/* Set the prescaler to the final desired value.
|
|
||||||
* This will change the effective ISR callback frequency but when
|
|
||||||
* HAL_timer_start(timer_num=0) is called in the core for the first time
|
|
||||||
* the real frequency isn't important as long as, after boot, the ISR
|
|
||||||
* gets called with the correct prescaler and count register. So here
|
|
||||||
* we set the prescaler to the correct, final value and ignore the frequency
|
|
||||||
* asked. We will call back the ISR in 1 second to start at full speed.
|
|
||||||
*
|
|
||||||
* The proper fix, however, would be a correct initialization OR a
|
|
||||||
* HAL_timer_change(const uint8_t timer_num, const uint32_t frequency)
|
|
||||||
* which changes the prescaler when an IRQ frequency change is needed
|
|
||||||
* (for example when steppers are turned on)
|
|
||||||
*/
|
|
||||||
timer_instance[timer_num]->setPrescaleFactor(STEPPER_TIMER_PRESCALE); //the -1 is done internally
|
|
||||||
timer_instance[timer_num]->setOverflow(_MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE) /* /frequency */), TICK_FORMAT);
|
|
||||||
break;
|
|
||||||
case TEMP_TIMER_NUM: // TEMP TIMER - any available 16bit timer
|
|
||||||
timer_instance[timer_num] = new HardwareTimer(TEMP_TIMER_DEV);
|
|
||||||
// The prescale factor is computed automatically for HERTZ_FORMAT
|
|
||||||
timer_instance[timer_num]->setOverflow(frequency, HERTZ_FORMAT);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
HAL_timer_enable_interrupt(timer_num);
|
if (!timers_initialized[timer_num]) {
|
||||||
|
uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
|
||||||
/*
|
temp_prescaler = TEMP_TIMER_PRESCALE - 1;
|
||||||
* Initializes (and unfortunately starts) the timer.
|
|
||||||
* This is needed to set correct IRQ priority at the moment but causes
|
|
||||||
* no harm since every call to HAL_timer_start() is actually followed by
|
|
||||||
* a call to HAL_timer_enable_interrupt() which means that there isn't
|
|
||||||
* a case in which you want the timer to run without a callback.
|
|
||||||
*/
|
|
||||||
timer_instance[timer_num]->resume(); // First call to resume() MUST follow the attachInterrupt()
|
|
||||||
|
|
||||||
// This is fixed in Arduino_Core_STM32 1.8.
|
|
||||||
// These calls can be removed and replaced with
|
|
||||||
// timer_instance[timer_num]->setInterruptPriority
|
|
||||||
switch (timer_num) {
|
switch (timer_num) {
|
||||||
case STEP_TIMER_NUM:
|
case STEP_TIMER_NUM:
|
||||||
|
// STEPPER TIMER - use a 32bit timer if possible
|
||||||
|
TimerHandle[timer_num].timer = STEP_TIMER_DEV;
|
||||||
|
TimerHandle[timer_num].irqHandle = Step_Handler;
|
||||||
|
TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / step_prescaler) / frequency) - 1, step_prescaler);
|
||||||
HAL_NVIC_SetPriority(STEP_TIMER_IRQ_NAME, STEP_TIMER_IRQ_PRIO, 0);
|
HAL_NVIC_SetPriority(STEP_TIMER_IRQ_NAME, STEP_TIMER_IRQ_PRIO, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TEMP_TIMER_NUM:
|
case TEMP_TIMER_NUM:
|
||||||
|
// TEMP TIMER - any available 16bit Timer
|
||||||
|
TimerHandle[timer_num].timer = TEMP_TIMER_DEV;
|
||||||
|
TimerHandle[timer_num].irqHandle = Temp_Handler;
|
||||||
|
TimerHandleInit(&TimerHandle[timer_num], (((HAL_TIMER_RATE) / temp_prescaler) / frequency) - 1, temp_prescaler);
|
||||||
HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_NAME, TEMP_TIMER_IRQ_PRIO, 0);
|
HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_NAME, TEMP_TIMER_IRQ_PRIO, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
timers_initialized[timer_num] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
|
void HAL_timer_enable_interrupt(const uint8_t timer_num) {
|
||||||
if (HAL_timer_initialized(timer_num) && !timer_enabled[timer_num]) {
|
const IRQn_Type IRQ_Id = IRQn_Type(getTimerIrq(TimerHandle[timer_num].timer));
|
||||||
timer_enabled[timer_num] = true;
|
HAL_NVIC_EnableIRQ(IRQ_Id);
|
||||||
switch (timer_num) {
|
|
||||||
case STEP_TIMER_NUM:
|
|
||||||
timer_instance[timer_num]->attachInterrupt(Step_Handler);
|
|
||||||
break;
|
|
||||||
case TEMP_TIMER_NUM:
|
|
||||||
timer_instance[timer_num]->attachInterrupt(Temp_Handler);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
||||||
if (HAL_timer_interrupt_enabled(timer_num)) {
|
const IRQn_Type IRQ_Id = IRQn_Type(getTimerIrq(TimerHandle[timer_num].timer));
|
||||||
timer_instance[timer_num]->detachInterrupt();
|
HAL_NVIC_DisableIRQ(IRQ_Id);
|
||||||
timer_enabled[timer_num] = false;
|
|
||||||
}
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
__DSB();
|
||||||
|
__ISB();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||||
return HAL_timer_initialized(timer_num) && timer_enabled[timer_num];
|
const uint32_t IRQ_Id = getTimerIrq(TimerHandle[timer_num].timer);
|
||||||
}
|
return NVIC->ISER[IRQ_Id >> 5] & _BV32(IRQ_Id & 0x1F);
|
||||||
|
|
||||||
// Only for use within the HAL
|
|
||||||
TIM_TypeDef * HAL_timer_device(const uint8_t timer_num) {
|
|
||||||
switch (timer_num) {
|
|
||||||
case STEP_TIMER_NUM: return STEP_TIMER_DEV;
|
|
||||||
case TEMP_TIMER_NUM: return TEMP_TIMER_DEV;
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#define hal_timer_t uint32_t
|
#define hal_timer_t uint32_t
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF // Timers can be 16 or 32 bit
|
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF // Timers can be 16 or 32 bit
|
||||||
|
|
||||||
|
|
||||||
#ifdef STM32F0xx
|
#ifdef STM32F0xx
|
||||||
|
|
||||||
#define HAL_TIMER_RATE (F_CPU) // frequency of timer peripherals
|
#define HAL_TIMER_RATE (F_CPU) // frequency of timer peripherals
|
||||||
@@ -67,30 +66,27 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TEMP_TIMER
|
#ifndef TEMP_TIMER
|
||||||
#define TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used.
|
#define TEMP_TIMER 7
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SWSERIAL_TIMER_IRQ_PRIO
|
|
||||||
#define SWSERIAL_TIMER_IRQ_PRIO 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef STEP_TIMER_IRQ_PRIO
|
#ifndef STEP_TIMER_IRQ_PRIO
|
||||||
#define STEP_TIMER_IRQ_PRIO 2
|
#define STEP_TIMER_IRQ_PRIO 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TEMP_TIMER_IRQ_PRIO
|
#ifndef TEMP_TIMER_IRQ_PRIO
|
||||||
#define TEMP_TIMER_IRQ_PRIO 14 //14 = after hardware ISRs
|
#define TEMP_TIMER_IRQ_PRIO 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define STEP_TIMER_NUM 0 // index of timer to use for stepper
|
#define STEP_TIMER_NUM 0 // index of timer to use for stepper
|
||||||
#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
|
#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
|
||||||
#define TEMP_TIMER_FREQUENCY 1000 //Temperature::isr() is expected to be called at around 1kHz
|
#define TEMP_TIMER_RATE 72000 // 72 Khz
|
||||||
|
#define TEMP_TIMER_PRESCALE ((HAL_TIMER_RATE)/(TEMP_TIMER_RATE))
|
||||||
|
#define TEMP_TIMER_FREQUENCY 1000
|
||||||
|
|
||||||
//TODO: get rid of manual rate/prescale/ticks/cycles taken for procedures in stepper.cpp
|
|
||||||
#define STEPPER_TIMER_RATE 2000000 // 2 Mhz
|
#define STEPPER_TIMER_RATE 2000000 // 2 Mhz
|
||||||
#define STEPPER_TIMER_PRESCALE ((HAL_TIMER_RATE)/(STEPPER_TIMER_RATE))
|
#define STEPPER_TIMER_PRESCALE ((HAL_TIMER_RATE)/(STEPPER_TIMER_RATE))
|
||||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||||
@@ -99,6 +95,17 @@
|
|||||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||||
|
|
||||||
|
#define __TIMER_DEV(X) TIM##X
|
||||||
|
#define _TIMER_DEV(X) __TIMER_DEV(X)
|
||||||
|
#define STEP_TIMER_DEV _TIMER_DEV(STEP_TIMER)
|
||||||
|
#define TEMP_TIMER_DEV _TIMER_DEV(TEMP_TIMER)
|
||||||
|
|
||||||
|
#define __TIMER_CALLBACK(X) TIM##X##_IRQHandler
|
||||||
|
#define _TIMER_CALLBACK(X) __TIMER_CALLBACK(X)
|
||||||
|
|
||||||
|
#define STEP_TIMER_CALLBACK _TIMER_CALLBACK(STEP_TIMER)
|
||||||
|
#define TEMP_TIMER_CALLBACK _TIMER_CALLBACK(TEMP_TIMER)
|
||||||
|
|
||||||
#define __TIMER_IRQ_NAME(X) TIM##X##_IRQn
|
#define __TIMER_IRQ_NAME(X) TIM##X##_IRQn
|
||||||
#define _TIMER_IRQ_NAME(X) __TIMER_IRQ_NAME(X)
|
#define _TIMER_IRQ_NAME(X) __TIMER_IRQ_NAME(X)
|
||||||
|
|
||||||
@@ -112,16 +119,22 @@
|
|||||||
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
||||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
||||||
|
|
||||||
extern void Step_Handler(HardwareTimer *htim);
|
extern void Step_Handler(stimer_t *htim);
|
||||||
extern void Temp_Handler(HardwareTimer *htim);
|
extern void Temp_Handler(stimer_t *htim);
|
||||||
#define HAL_STEP_TIMER_ISR() void Step_Handler(HardwareTimer *htim)
|
#define HAL_STEP_TIMER_ISR() void Step_Handler(stimer_t *htim)
|
||||||
#define HAL_TEMP_TIMER_ISR() void Temp_Handler(HardwareTimer *htim)
|
#define HAL_TEMP_TIMER_ISR() void Temp_Handler(stimer_t *htim)
|
||||||
|
|
||||||
|
// ------------------------
|
||||||
|
// Types
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
typedef stimer_t stm32_timer_t;
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Public Variables
|
// Public Variables
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
extern HardwareTimer *timer_instance[];
|
extern stm32_timer_t TimerHandle[];
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Public functions
|
// Public functions
|
||||||
@@ -132,26 +145,18 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
|||||||
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||||
|
|
||||||
//TIM_TypeDef* HAL_timer_device(const uint8_t timer_num); no need to be public for now. not public = not used externally
|
FORCE_INLINE static uint32_t HAL_timer_get_count(const uint8_t timer_num) {
|
||||||
|
return __HAL_TIM_GET_COUNTER(&TimerHandle[timer_num].handle);
|
||||||
// FORCE_INLINE because these are used in performance-critical situations
|
|
||||||
FORCE_INLINE bool HAL_timer_initialized(const uint8_t timer_num) {
|
|
||||||
return timer_instance[timer_num] != NULL;
|
|
||||||
}
|
|
||||||
FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) {
|
|
||||||
return HAL_timer_initialized(timer_num) ? timer_instance[timer_num]->getCount() : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Method name may be misleading.
|
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const uint32_t compare) {
|
||||||
// STM32 has an Auto-Reload Register (ARR) as opposed to a "compare" register
|
__HAL_TIM_SET_AUTORELOAD(&TimerHandle[timer_num].handle, compare);
|
||||||
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t overflow) {
|
if (HAL_timer_get_count(timer_num) >= compare)
|
||||||
if (HAL_timer_initialized(timer_num)) {
|
TimerHandle[timer_num].handle.Instance->EGR |= TIM_EGR_UG; // Generate an immediate update interrupt
|
||||||
timer_instance[timer_num]->setOverflow(overflow + 1, TICK_FORMAT); // Value decremented by setOverflow()
|
}
|
||||||
// wiki: "force all registers (Autoreload, prescaler, compare) to be taken into account"
|
|
||||||
// So, if the new overflow value is less than the count it will trigger a rollover interrupt.
|
FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
|
||||||
if (overflow < timer_instance[timer_num]->getCount()) // Added 'if' here because reports say it won't boot without it
|
return __HAL_TIM_GET_AUTORELOAD(&TimerHandle[timer_num].handle);
|
||||||
timer_instance[timer_num]->refresh();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HAL_timer_isr_prologue(TIMER_NUM)
|
#define HAL_timer_isr_prologue(TIMER_NUM)
|
||||||
|
|||||||
@@ -121,9 +121,6 @@ const uint8_t adc_pins[] = {
|
|||||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
FILWIDTH_PIN,
|
FILWIDTH_PIN,
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(ADC_KEYPAD)
|
|
||||||
ADC_KEYPAD_PIN,
|
|
||||||
#endif
|
|
||||||
#if HAS_JOY_ADC_X
|
#if HAS_JOY_ADC_X
|
||||||
JOY_X_PIN,
|
JOY_X_PIN,
|
||||||
#endif
|
#endif
|
||||||
@@ -163,9 +160,6 @@ enum TEMP_PINS : char {
|
|||||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
FILWIDTH,
|
FILWIDTH,
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(ADC_KEYPAD)
|
|
||||||
ADC_KEY,
|
|
||||||
#endif
|
|
||||||
#if HAS_JOY_ADC_X
|
#if HAS_JOY_ADC_X
|
||||||
JOY_X,
|
JOY_X,
|
||||||
#endif
|
#endif
|
||||||
@@ -278,7 +272,7 @@ extern "C" {
|
|||||||
// return free memory between end of heap (or end bss) and whatever is current
|
// return free memory between end of heap (or end bss) and whatever is current
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <wirish/syscalls.c>
|
#include "wirish/syscalls.c"
|
||||||
//extern caddr_t _sbrk(int incr);
|
//extern caddr_t _sbrk(int incr);
|
||||||
#ifndef CONFIG_HEAP_END
|
#ifndef CONFIG_HEAP_END
|
||||||
extern char _lm_heap_end;
|
extern char _lm_heap_end;
|
||||||
@@ -358,9 +352,6 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
|||||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
|
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(ADC_KEYPAD)
|
|
||||||
case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
|
HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,14 +51,6 @@
|
|||||||
// Defines
|
// Defines
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
#ifndef STM32_FLASH_SIZE
|
|
||||||
#ifdef MCU_STM32F103RE
|
|
||||||
#define STM32_FLASH_SIZE 512
|
|
||||||
#else
|
|
||||||
#define STM32_FLASH_SIZE 256
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SERIAL_USB
|
#ifdef SERIAL_USB
|
||||||
#ifndef USE_USB_COMPOSITE
|
#ifndef USE_USB_COMPOSITE
|
||||||
#define UsbSerial Serial
|
#define UsbSerial Serial
|
||||||
@@ -246,7 +238,6 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n);
|
|||||||
void HAL_adc_init();
|
void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ static const spi_pins* dev_to_spi_pins(spi_dev *dev);
|
|||||||
static void configure_gpios(spi_dev *dev, bool as_master);
|
static void configure_gpios(spi_dev *dev, bool as_master);
|
||||||
static spi_baud_rate determine_baud_rate(spi_dev *dev, uint32_t freq);
|
static spi_baud_rate determine_baud_rate(spi_dev *dev, uint32_t freq);
|
||||||
|
|
||||||
#if BOARD_NR_SPI >= 3 && !defined(STM32_HIGH_DENSITY)
|
#if (BOARD_NR_SPI >= 3) && !defined(STM32_HIGH_DENSITY)
|
||||||
#error "The SPI library is misconfigured: 3 SPI ports only available on high density STM32 devices"
|
#error "The SPI library is misconfigured: 3 SPI ports only available on high density STM32 devices"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef HAVE_SW_SERIAL
|
#define SW_SERIAL_PLACEHOLDER 1
|
||||||
#define SW_SERIAL_PLACEHOLDER 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SoftwareSerial {
|
class SoftwareSerial {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Executable → Regular
@@ -29,33 +29,32 @@
|
|||||||
|
|
||||||
#include <libmaple/gpio.h>
|
#include <libmaple/gpio.h>
|
||||||
|
|
||||||
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
|
#define READ(IO) (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
|
||||||
#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
|
#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
|
||||||
#define TOGGLE(IO) (PIN_MAP[IO].gpio_device->regs->ODR = PIN_MAP[IO].gpio_device->regs->ODR ^ (1U << PIN_MAP[IO].gpio_bit))
|
#define TOGGLE(IO) (PIN_MAP[IO].gpio_device->regs->ODR = PIN_MAP[IO].gpio_device->regs->ODR ^ (1U << PIN_MAP[IO].gpio_bit))
|
||||||
|
|
||||||
#define _GET_MODE(IO) gpio_get_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit)
|
#define _GET_MODE(IO) gpio_get_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit)
|
||||||
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
|
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
|
||||||
#define _SET_OUTPUT(IO) _SET_MODE(IO, GPIO_OUTPUT_PP)
|
#define _SET_OUTPUT(IO) _SET_MODE(IO, GPIO_OUTPUT_PP)
|
||||||
#define _SET_OUTPUT_OD(IO) _SET_MODE(IO, GPIO_OUTPUT_OD)
|
#define _SET_OUTPUT_OD(IO) _SET_MODE(IO, GPIO_OUTPUT_OD)
|
||||||
|
|
||||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||||
#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0)
|
#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0)
|
||||||
|
|
||||||
#define SET_INPUT(IO) _SET_MODE(IO, GPIO_INPUT_FLOATING)
|
#define SET_INPUT(IO) _SET_MODE(IO, GPIO_INPUT_FLOATING)
|
||||||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
|
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
|
||||||
#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, GPIO_INPUT_PD)
|
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
||||||
#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW)
|
#define SET_PWM(IO) pinMode(IO, PWM) // do{ gpio_set_mode(PIN_MAP[pin].gpio_device, PIN_MAP[pin].gpio_bit, GPIO_AF_OUTPUT_PP); timer_set_mode(PIN_MAP[pin].timer_device, PIN_MAP[pin].timer_channel, TIMER_PWM); }while(0)
|
||||||
#define SET_PWM(IO) pinMode(IO, PWM) // do{ gpio_set_mode(PIN_MAP[pin].gpio_device, PIN_MAP[pin].gpio_bit, GPIO_AF_OUTPUT_PP); timer_set_mode(PIN_MAP[pin].timer_device, PIN_MAP[pin].timer_channel, TIMER_PWM); }while(0)
|
#define SET_PWM_OD(IO) pinMode(IO, PWM_OPEN_DRAIN)
|
||||||
#define SET_PWM_OD(IO) pinMode(IO, PWM_OPEN_DRAIN)
|
|
||||||
|
|
||||||
#define IS_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
|
#define IS_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
|
||||||
#define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP || _GET_MODE(IO) == GPIO_OUTPUT_OD)
|
#define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP || _GET_MODE(IO) == GPIO_OUTPUT_OD)
|
||||||
|
|
||||||
#define PWM_PIN(IO) (PIN_MAP[IO].timer_device != nullptr)
|
#define PWM_PIN(IO) (PIN_MAP[IO].timer_device != nullptr)
|
||||||
|
|
||||||
// digitalRead/Write wrappers
|
// digitalRead/Write wrappers
|
||||||
#define extDigitalRead(IO) digitalRead(IO)
|
#define extDigitalRead(IO) digitalRead(IO)
|
||||||
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
#define extDigitalWrite(IO,V) digitalWrite(IO,V)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pins Definitions
|
// Pins Definitions
|
||||||
|
|||||||
@@ -36,8 +36,3 @@
|
|||||||
#if ENABLED(FAST_PWM_FAN)
|
#if ENABLED(FAST_PWM_FAN)
|
||||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_SW_SERIAL) && HAS_TMC220x
|
|
||||||
#warning "With TMC2208/9 consider using SoftwareSerialM with HAVE_SW_SERIAL and appropriate SS_TIMER."
|
|
||||||
#error "Missing SoftwareSerial implementation."
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2
|
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) /* Set OnBoardSPI cs low */
|
#define CS_LOW() {WRITE(ONBOARD_SD_CS_PIN, LOW);} /* Set OnBoardSPI cs low */
|
||||||
#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) /* Set OnBoardSPI cs high */
|
#define CS_HIGH() {WRITE(ONBOARD_SD_CS_PIN, HIGH);} /* Set OnBoardSPI cs high */
|
||||||
|
|
||||||
#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX)
|
#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX)
|
||||||
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256)
|
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256)
|
||||||
|
|||||||
@@ -40,73 +40,53 @@
|
|||||||
#include <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
|
|
||||||
// Store settings in the last two pages
|
// Store settings in the last two pages
|
||||||
#define EEPROM_SIZE (EEPROM_PAGE_SIZE * 2)
|
// Flash pages must be erased before writing, so keep track.
|
||||||
#define ACCESS_FINISHED(TF) do{ FLASH_Lock(); eeprom_dirty = false; return TF; }while(0)
|
bool firstWrite = false;
|
||||||
|
|
||||||
static uint8_t ram_eeprom[EEPROM_SIZE] __attribute__((aligned(4))) = {0};
|
|
||||||
static bool eeprom_dirty = false;
|
|
||||||
|
|
||||||
bool PersistentStore::access_start() {
|
bool PersistentStore::access_start() {
|
||||||
const uint32_t* source = reinterpret_cast<const uint32_t*>(EEPROM_PAGE0_BASE);
|
firstWrite = true;
|
||||||
uint32_t* destination = reinterpret_cast<uint32_t*>(ram_eeprom);
|
|
||||||
|
|
||||||
static_assert(0 == EEPROM_SIZE % 4, "EEPROM_SIZE is corrupted. (Must be a multiple of 4.)"); // Ensure copying as uint32_t is safe
|
|
||||||
constexpr size_t eeprom_size_u32 = EEPROM_SIZE / 4;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < eeprom_size_u32; ++i, ++destination, ++source)
|
|
||||||
*destination = *source;
|
|
||||||
|
|
||||||
eeprom_dirty = false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::access_finish() {
|
bool PersistentStore::access_finish() {
|
||||||
|
FLASH_Lock();
|
||||||
if (eeprom_dirty) {
|
firstWrite = false;
|
||||||
FLASH_Status status;
|
|
||||||
|
|
||||||
// Instead of erasing all (both) pages, maybe in the loop we check what page we are in, and if the
|
|
||||||
// data has changed in that page. We then erase the first time we "detect" a change. In theory, if
|
|
||||||
// nothing changed in a page, we wouldn't need to erase/write it.
|
|
||||||
// Or, instead of checking at this point, turn eeprom_dirty into an array of bool the size of number
|
|
||||||
// of pages. Inside write_data, we set the flag to true at that time if something in that
|
|
||||||
// page changes...either way, something to look at later.
|
|
||||||
FLASH_Unlock();
|
|
||||||
|
|
||||||
status = FLASH_ErasePage(EEPROM_PAGE0_BASE);
|
|
||||||
if (status != FLASH_COMPLETE) ACCESS_FINISHED(true);
|
|
||||||
status = FLASH_ErasePage(EEPROM_PAGE1_BASE);
|
|
||||||
if (status != FLASH_COMPLETE) ACCESS_FINISHED(true);
|
|
||||||
|
|
||||||
const uint16_t *source = reinterpret_cast<const uint16_t*>(ram_eeprom);
|
|
||||||
for (size_t i = 0; i < EEPROM_SIZE; i += 2, ++source) {
|
|
||||||
if (FLASH_ProgramHalfWord(EEPROM_PAGE0_BASE + i, *source) != FLASH_COMPLETE)
|
|
||||||
ACCESS_FINISHED(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ACCESS_FINISHED(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
|
||||||
for (size_t i = 0; i < size; ++i) ram_eeprom[pos + i] = value[i];
|
FLASH_Status status;
|
||||||
eeprom_dirty = true;
|
|
||||||
|
if (firstWrite) {
|
||||||
|
FLASH_Unlock();
|
||||||
|
status = FLASH_ErasePage(EEPROM_PAGE0_BASE);
|
||||||
|
if (status != FLASH_COMPLETE) return true;
|
||||||
|
status = FLASH_ErasePage(EEPROM_PAGE1_BASE);
|
||||||
|
if (status != FLASH_COMPLETE) return true;
|
||||||
|
firstWrite = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < size; i++) {
|
||||||
|
if (FLASH_ProgramHalfWord(EEPROM_PAGE0_BASE + (pos + i) * 2, value[i]) != FLASH_COMPLETE)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
crc16(crc, value, size);
|
crc16(crc, value, size);
|
||||||
pos += size;
|
pos += size;
|
||||||
return false; // return true for any error
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uint16_t *crc, const bool writing/*=true*/) {
|
||||||
const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos];
|
for (size_t i = 0; i < size; i++) {
|
||||||
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i];
|
uint8_t v = *(uint16_t *)(EEPROM_PAGE0_BASE + (pos + i) * 2);
|
||||||
crc16(crc, buff, size);
|
if (writing) value[i] = v;
|
||||||
|
crc16(crc, &v, 1);
|
||||||
|
}
|
||||||
pos += size;
|
pos += size;
|
||||||
return false; // return true for any error
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
|
size_t PersistentStore::capacity() { return size_t(E2END + 1); }
|
||||||
|
|
||||||
#endif // EEPROM_SETTINGS && EEPROM FLASH
|
#endif // EEPROM_SETTINGS && EEPROM FLASH
|
||||||
#endif // __STM32F1__
|
#endif // __STM32F1__
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
case 3: irq_num = NVIC_TIMER3; break;
|
case 3: irq_num = NVIC_TIMER3; break;
|
||||||
case 4: irq_num = NVIC_TIMER4; break;
|
case 4: irq_num = NVIC_TIMER4; break;
|
||||||
case 5: irq_num = NVIC_TIMER5; break;
|
case 5: irq_num = NVIC_TIMER5; break;
|
||||||
#ifdef STM32_HIGH_DENSITY
|
#if ENABLED(STM32_HIGH_DENSITY)
|
||||||
// 6 & 7 are basic timers, avoid them
|
// 6 & 7 are basic timers, avoid them
|
||||||
case 8: irq_num = NVIC_TIMER8_CC; break;
|
case 8: irq_num = NVIC_TIMER8_CC; break;
|
||||||
#endif
|
#endif
|
||||||
@@ -82,7 +82,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
timer_set_prescaler(STEP_TIMER_DEV, (uint16_t)(STEPPER_TIMER_PRESCALE - 1));
|
timer_set_prescaler(STEP_TIMER_DEV, (uint16_t)(STEPPER_TIMER_PRESCALE - 1));
|
||||||
timer_set_reload(STEP_TIMER_DEV, 0xFFFF);
|
timer_set_reload(STEP_TIMER_DEV, 0xFFFF);
|
||||||
timer_oc_set_mode(STEP_TIMER_DEV, STEP_TIMER_CHAN, TIMER_OC_MODE_FROZEN, TIMER_OC_NO_PRELOAD); // no output pin change
|
timer_oc_set_mode(STEP_TIMER_DEV, STEP_TIMER_CHAN, TIMER_OC_MODE_FROZEN, TIMER_OC_NO_PRELOAD); // no output pin change
|
||||||
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (STEPPER_TIMER_RATE) / frequency));
|
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (STEPPER_TIMER_RATE / frequency)));
|
||||||
timer_no_ARR_preload_ARPE(STEP_TIMER_DEV); // Need to be sure no preload on ARR register
|
timer_no_ARR_preload_ARPE(STEP_TIMER_DEV); // Need to be sure no preload on ARR register
|
||||||
timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler);
|
timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler);
|
||||||
nvic_irq_set_priority(irq_num, STEP_TIMER_IRQ_PRIO);
|
nvic_irq_set_priority(irq_num, STEP_TIMER_IRQ_PRIO);
|
||||||
@@ -95,7 +95,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
timer_set_count(TEMP_TIMER_DEV, 0);
|
timer_set_count(TEMP_TIMER_DEV, 0);
|
||||||
timer_set_prescaler(TEMP_TIMER_DEV, (uint16_t)(TEMP_TIMER_PRESCALE - 1));
|
timer_set_prescaler(TEMP_TIMER_DEV, (uint16_t)(TEMP_TIMER_PRESCALE - 1));
|
||||||
timer_set_reload(TEMP_TIMER_DEV, 0xFFFF);
|
timer_set_reload(TEMP_TIMER_DEV, 0xFFFF);
|
||||||
timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (F_CPU) / (TEMP_TIMER_PRESCALE) / frequency));
|
timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), ((F_CPU / TEMP_TIMER_PRESCALE) / frequency)));
|
||||||
timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler);
|
timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler);
|
||||||
nvic_irq_set_priority(irq_num, TEMP_TIMER_IRQ_PRIO);
|
nvic_irq_set_priority(irq_num, TEMP_TIMER_IRQ_PRIO);
|
||||||
timer_generate_update(TEMP_TIMER_DEV);
|
timer_generate_update(TEMP_TIMER_DEV);
|
||||||
|
|||||||
@@ -47,20 +47,6 @@ typedef uint16_t hal_timer_t;
|
|||||||
#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
||||||
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
||||||
|
|
||||||
/**
|
|
||||||
* Note: Timers may be used by platforms and libraries
|
|
||||||
*
|
|
||||||
* FAN PWMs:
|
|
||||||
* With FAN_SOFT_PWM disabled the Temperature class uses
|
|
||||||
* FANx_PIN timers to generate FAN PWM signals.
|
|
||||||
*
|
|
||||||
* Speaker:
|
|
||||||
* When SPEAKER is enabled, one timer is allocated by maple/tone.cpp.
|
|
||||||
* - If BEEPER_PIN has a timer channel (and USE_PIN_TIMER is
|
|
||||||
* defined in tone.cpp) it uses the pin's own timer.
|
|
||||||
* - Otherwise it uses Timer 8 on boards with STM32_HIGH_DENSITY
|
|
||||||
* or Timer 4 on other boards.
|
|
||||||
*/
|
|
||||||
#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
|
#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
|
||||||
#define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4
|
#define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4
|
||||||
#else
|
#else
|
||||||
@@ -70,13 +56,9 @@ typedef uint16_t hal_timer_t;
|
|||||||
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
||||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||||
|
|
||||||
#if MB(BTT_SKR_MINI_E3_V1_0, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
||||||
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
||||||
#ifdef STM32_HIGH_DENSITY
|
#define SERVO0_TIMER_NUM 8
|
||||||
#define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4
|
|
||||||
#else
|
|
||||||
#define SERVO0_TIMER_NUM 3 // tone.cpp uses Timer 8
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ extern "C" {
|
|||||||
// return free memory between end of heap (or end bss) and whatever is current
|
// return free memory between end of heap (or end bss) and whatever is current
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <wirish/syscalls.c>
|
#include "wirish/syscalls.c"
|
||||||
//extern caddr_t _sbrk(int incr);
|
//extern caddr_t _sbrk(int incr);
|
||||||
#ifndef CONFIG_HEAP_END
|
#ifndef CONFIG_HEAP_END
|
||||||
extern char _lm_heap_end;
|
extern char _lm_heap_end;
|
||||||
|
|||||||
@@ -24,16 +24,17 @@
|
|||||||
|
|
||||||
#define CPU_32_BIT
|
#define CPU_32_BIT
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
|
||||||
|
|
||||||
#include "../shared/Marduino.h"
|
#include "../shared/Marduino.h"
|
||||||
#include "../shared/math_32bit.h"
|
#include "../shared/math_32bit.h"
|
||||||
#include "../shared/HAL_SPI.h"
|
#include "../shared/HAL_SPI.h"
|
||||||
|
|
||||||
#include "fastio.h"
|
#include "fastio.h"
|
||||||
#include "timers.h"
|
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
|
||||||
|
#include "timers.h"
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined(STM32F4) && USBCON
|
#if defined(STM32F4) && USBCON
|
||||||
@@ -207,7 +208,6 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
|
|||||||
inline void HAL_adc_init() {}
|
inline void HAL_adc_init() {}
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_result
|
#define HAL_READ_ADC() HAL_adc_result
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
//Error_Handler();
|
//Error_Handler();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if PIN_EXISTS(LED) && DISABLED(PINS_DEBUGGING)
|
#if PIN_EXISTS(LED) && !ENABLED(PINS_DEBUGGING)
|
||||||
TOGGLE(LED_PIN); // heartbeat indicator
|
TOGGLE(LED_PIN); // heartbeat indicator
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ extern "C" {
|
|||||||
void HAL_adc_init();
|
void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_get_result()
|
#define HAL_READ_ADC() HAL_adc_get_result()
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
FTM0_SC = 0x00; // Set this to zero before changing the modulus
|
FTM0_SC = 0x00; // Set this to zero before changing the modulus
|
||||||
FTM0_CNT = 0x0000; // Reset the count to zero
|
FTM0_CNT = 0x0000; // Reset the count to zero
|
||||||
FTM0_MOD = 0xFFFF; // max modulus = 65535
|
FTM0_MOD = 0xFFFF; // max modulus = 65535
|
||||||
FTM0_C0V = (FTM0_TIMER_RATE) / frequency; // Initial FTM Channel 0 compare value
|
FTM0_C0V = FTM0_TIMER_RATE / frequency; // Initial FTM Channel 0 compare value
|
||||||
FTM0_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM0_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 8
|
FTM0_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM0_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 8
|
||||||
FTM0_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
FTM0_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
||||||
break;
|
break;
|
||||||
@@ -62,7 +62,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
FTM1_SC = 0x00; // Set this to zero before changing the modulus
|
FTM1_SC = 0x00; // Set this to zero before changing the modulus
|
||||||
FTM1_CNT = 0x0000; // Reset the count to zero
|
FTM1_CNT = 0x0000; // Reset the count to zero
|
||||||
FTM1_MOD = 0xFFFF; // max modulus = 65535
|
FTM1_MOD = 0xFFFF; // max modulus = 65535
|
||||||
FTM1_C0V = (FTM1_TIMER_RATE) / frequency; // Initial FTM Channel 0 compare value 65535
|
FTM1_C0V = FTM1_TIMER_RATE / frequency; // Initial FTM Channel 0 compare value 65535
|
||||||
FTM1_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM1_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 4
|
FTM1_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM1_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 4
|
||||||
FTM1_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
FTM1_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ extern "C" {
|
|||||||
void HAL_adc_init();
|
void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||||
#define HAL_ADC_RESOLUTION 10
|
|
||||||
#define HAL_READ_ADC() HAL_adc_get_result()
|
#define HAL_READ_ADC() HAL_adc_get_result()
|
||||||
#define HAL_ADC_READY() true
|
#define HAL_ADC_READY() true
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
FTM0_SC = 0x00; // Set this to zero before changing the modulus
|
FTM0_SC = 0x00; // Set this to zero before changing the modulus
|
||||||
FTM0_CNT = 0x0000; // Reset the count to zero
|
FTM0_CNT = 0x0000; // Reset the count to zero
|
||||||
FTM0_MOD = 0xFFFF; // max modulus = 65535
|
FTM0_MOD = 0xFFFF; // max modulus = 65535
|
||||||
FTM0_C0V = (FTM0_TIMER_RATE) / frequency; // Initial FTM Channel 0 compare value
|
FTM0_C0V = FTM0_TIMER_RATE / frequency; // Initial FTM Channel 0 compare value
|
||||||
FTM0_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM0_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 8
|
FTM0_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM0_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 8
|
||||||
FTM0_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
FTM0_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
||||||
break;
|
break;
|
||||||
@@ -63,7 +63,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||||||
FTM1_SC = 0x00; // Set this to zero before changing the modulus
|
FTM1_SC = 0x00; // Set this to zero before changing the modulus
|
||||||
FTM1_CNT = 0x0000; // Reset the count to zero
|
FTM1_CNT = 0x0000; // Reset the count to zero
|
||||||
FTM1_MOD = 0xFFFF; // max modulus = 65535
|
FTM1_MOD = 0xFFFF; // max modulus = 65535
|
||||||
FTM1_C0V = (FTM1_TIMER_RATE) / frequency; // Initial FTM Channel 0 compare value 65535
|
FTM1_C0V = FTM1_TIMER_RATE / frequency; // Initial FTM Channel 0 compare value 65535
|
||||||
FTM1_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM1_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 4
|
FTM1_SC = (FTM_SC_CLKS(0b1) & FTM_SC_CLKS_MASK) | (FTM_SC_PS(FTM1_TIMER_PRESCALE_BITS) & FTM_SC_PS_MASK); // Bus clock 60MHz divided by prescaler 4
|
||||||
FTM1_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
FTM1_C0SC = FTM_CSC_CHIE | FTM_CSC_MSA | FTM_CSC_ELSA;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -36,15 +36,14 @@
|
|||||||
|
|
||||||
#if __CORTEX_M == 7
|
#if __CORTEX_M == 7
|
||||||
|
|
||||||
// Cortex-M3 through M7 can use the cycle counter of the DWT unit
|
// Cortex-M7 can use the cycle counter of the DWT unit
|
||||||
// http://www.anthonyvh.com/2017/05/18/cortex_m-cycle_counter/
|
// http://www.anthonyvh.com/2017/05/18/cortex_m-cycle_counter/
|
||||||
|
|
||||||
FORCE_INLINE static void enableCycleCounter() {
|
FORCE_INLINE static void enableCycleCounter() {
|
||||||
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
||||||
|
|
||||||
#if __CORTEX_M == 7
|
// Unlock DWT.
|
||||||
DWT->LAR = 0xC5ACCE55; // Unlock DWT on the M7
|
DWT->LAR = 0xC5ACCE55;
|
||||||
#endif
|
|
||||||
|
|
||||||
DWT->CYCCNT = 0;
|
DWT->CYCCNT = 0;
|
||||||
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "backtrace.h"
|
||||||
|
|
||||||
#if defined(__arm__) || defined(__thumb__)
|
#if defined(__arm__) || defined(__thumb__)
|
||||||
|
|
||||||
#include "backtrace.h"
|
|
||||||
#include "unwinder.h"
|
#include "unwinder.h"
|
||||||
#include "unwmemaccess.h"
|
#include "unwmemaccess.h"
|
||||||
|
|
||||||
|
|||||||
+75
-68
@@ -110,7 +110,7 @@
|
|||||||
#include "feature/I2CPositionEncoder.h"
|
#include "feature/I2CPositionEncoder.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF)
|
#if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
|
||||||
#include "feature/tmc_util.h"
|
#include "feature/tmc_util.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -181,16 +181,6 @@
|
|||||||
#include "libs/L6470/L6470_Marlin.h"
|
#include "libs/L6470/L6470_Marlin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char NUL_STR[] PROGMEM = "",
|
|
||||||
G28_STR[] PROGMEM = "G28",
|
|
||||||
M21_STR[] PROGMEM = "M21",
|
|
||||||
M23_STR[] PROGMEM = "M23 %s",
|
|
||||||
M24_STR[] PROGMEM = "M24",
|
|
||||||
SP_X_STR[] PROGMEM = " X",
|
|
||||||
SP_Y_STR[] PROGMEM = " Y",
|
|
||||||
SP_Z_STR[] PROGMEM = " Z",
|
|
||||||
SP_E_STR[] PROGMEM = " E";
|
|
||||||
|
|
||||||
bool Running = true;
|
bool Running = true;
|
||||||
|
|
||||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||||
@@ -234,7 +224,7 @@ void setup_powerhold() {
|
|||||||
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(PSU_CONTROL)
|
#if ENABLED(PSU_CONTROL)
|
||||||
#if ENABLED(PSU_DEFAULT_OFF)
|
#if ENABLED(PS_DEFAULT_OFF)
|
||||||
powersupply_on = true; PSU_OFF();
|
powersupply_on = true; PSU_OFF();
|
||||||
#else
|
#else
|
||||||
powersupply_on = false; PSU_ON();
|
powersupply_on = false; PSU_ON();
|
||||||
@@ -290,8 +280,7 @@ void quickstop_stepper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void enable_e_steppers() {
|
void enable_e_steppers() {
|
||||||
#define _ENA_E(N) enable_E##N();
|
enable_E0(); enable_E1(); enable_E2(); enable_E3(); enable_E4(); enable_E5();
|
||||||
REPEAT(E_STEPPERS, _ENA_E)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_all_steppers() {
|
void enable_all_steppers() {
|
||||||
@@ -305,14 +294,17 @@ void enable_all_steppers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void disable_e_steppers() {
|
void disable_e_steppers() {
|
||||||
#define _DIS_E(N) disable_E##N();
|
disable_E0(); disable_E1(); disable_E2(); disable_E3(); disable_E4(); disable_E5();
|
||||||
REPEAT(E_STEPPERS, _DIS_E)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void disable_e_stepper(const uint8_t e) {
|
void disable_e_stepper(const uint8_t e) {
|
||||||
#define _CASE_DIS_E(N) case N: disable_E##N(); break;
|
|
||||||
switch (e) {
|
switch (e) {
|
||||||
REPEAT(EXTRUDERS, _CASE_DIS_E)
|
case 0: disable_E0(); break;
|
||||||
|
case 1: disable_E1(); break;
|
||||||
|
case 2: disable_E2(); break;
|
||||||
|
case 3: disable_E3(); break;
|
||||||
|
case 4: disable_E4(); break;
|
||||||
|
case 5: disable_E5(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,46 +367,12 @@ bool printingIsPaused() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void startOrResumeJob() {
|
void startOrResumeJob() {
|
||||||
if (!printingIsPaused()) {
|
#if ENABLED(CANCEL_OBJECTS)
|
||||||
#if ENABLED(CANCEL_OBJECTS)
|
if (!printingIsPaused()) cancelable.reset();
|
||||||
cancelable.reset();
|
#endif
|
||||||
#endif
|
|
||||||
#if ENABLED(LCD_SHOW_E_TOTAL)
|
|
||||||
e_move_accumulator = 0;
|
|
||||||
#endif
|
|
||||||
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
|
|
||||||
ui.reset_remaining_time();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
print_job_timer.start();
|
print_job_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
|
||||||
|
|
||||||
void abortSDPrinting() {
|
|
||||||
card.stopSDPrint(
|
|
||||||
#if SD_RESORT
|
|
||||||
true
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
queue.clear();
|
|
||||||
quickstop_stepper();
|
|
||||||
print_job_timer.stop();
|
|
||||||
#if DISABLED(SD_ABORT_NO_COOLDOWN)
|
|
||||||
thermalManager.disable_all_heaters();
|
|
||||||
#endif
|
|
||||||
thermalManager.zero_fan_speeds();
|
|
||||||
wait_for_heatup = false;
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
|
||||||
card.removeJobRecoveryFile();
|
|
||||||
#endif
|
|
||||||
#ifdef EVENT_GCODE_SD_STOP
|
|
||||||
queue.inject_P(PSTR(EVENT_GCODE_SD_STOP));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage several activities:
|
* Manage several activities:
|
||||||
* - Check for Filament Runout
|
* - Check for Filament Runout
|
||||||
@@ -520,7 +478,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
|||||||
if (ELAPSED(ms, next_home_key_ms)) {
|
if (ELAPSED(ms, next_home_key_ms)) {
|
||||||
next_home_key_ms = ms + HOME_DEBOUNCE_DELAY;
|
next_home_key_ms = ms + HOME_DEBOUNCE_DELAY;
|
||||||
LCD_MESSAGEPGM(MSG_AUTO_HOME);
|
LCD_MESSAGEPGM(MSG_AUTO_HOME);
|
||||||
queue.enqueue_now_P(G28_STR);
|
queue.enqueue_now_P(PSTR("G28"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -552,11 +510,24 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
|||||||
#else // !SWITCHING_EXTRUDER
|
#else // !SWITCHING_EXTRUDER
|
||||||
bool oldstatus;
|
bool oldstatus;
|
||||||
switch (active_extruder) {
|
switch (active_extruder) {
|
||||||
default:
|
default: oldstatus = E0_ENABLE_READ(); enable_E0(); break;
|
||||||
#define _CASE_EN(N) case N: oldstatus = E##N##_ENABLE_READ(); enable_E##N(); break;
|
#if E_STEPPERS > 1
|
||||||
REPEAT(E_STEPPERS, _CASE_EN);
|
case 1: oldstatus = E1_ENABLE_READ(); enable_E1(); break;
|
||||||
|
#if E_STEPPERS > 2
|
||||||
|
case 2: oldstatus = E2_ENABLE_READ(); enable_E2(); break;
|
||||||
|
#if E_STEPPERS > 3
|
||||||
|
case 3: oldstatus = E3_ENABLE_READ(); enable_E3(); break;
|
||||||
|
#if E_STEPPERS > 4
|
||||||
|
case 4: oldstatus = E4_ENABLE_READ(); enable_E4(); break;
|
||||||
|
#if E_STEPPERS > 5
|
||||||
|
case 5: oldstatus = E5_ENABLE_READ(); enable_E5(); break;
|
||||||
|
#endif // E_STEPPERS > 5
|
||||||
|
#endif // E_STEPPERS > 4
|
||||||
|
#endif // E_STEPPERS > 3
|
||||||
|
#endif // E_STEPPERS > 2
|
||||||
|
#endif // E_STEPPERS > 1
|
||||||
}
|
}
|
||||||
#endif
|
#endif // !SWITCHING_EXTRUDER
|
||||||
|
|
||||||
const float olde = current_position.e;
|
const float olde = current_position.e;
|
||||||
current_position.e += EXTRUDER_RUNOUT_EXTRUDE;
|
current_position.e += EXTRUDER_RUNOUT_EXTRUDE;
|
||||||
@@ -577,8 +548,22 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
|||||||
}
|
}
|
||||||
#else // !SWITCHING_EXTRUDER
|
#else // !SWITCHING_EXTRUDER
|
||||||
switch (active_extruder) {
|
switch (active_extruder) {
|
||||||
#define _CASE_RESTORE(N) case N: E##N##_ENABLE_WRITE(oldstatus); break;
|
case 0: E0_ENABLE_WRITE(oldstatus); break;
|
||||||
REPEAT(E_STEPPERS, _CASE_RESTORE);
|
#if E_STEPPERS > 1
|
||||||
|
case 1: E1_ENABLE_WRITE(oldstatus); break;
|
||||||
|
#if E_STEPPERS > 2
|
||||||
|
case 2: E2_ENABLE_WRITE(oldstatus); break;
|
||||||
|
#if E_STEPPERS > 3
|
||||||
|
case 3: E3_ENABLE_WRITE(oldstatus); break;
|
||||||
|
#if E_STEPPERS > 4
|
||||||
|
case 4: E4_ENABLE_WRITE(oldstatus); break;
|
||||||
|
#if E_STEPPERS > 5
|
||||||
|
case 5: E5_ENABLE_WRITE(oldstatus); break;
|
||||||
|
#endif // E_STEPPERS > 5
|
||||||
|
#endif // E_STEPPERS > 4
|
||||||
|
#endif // E_STEPPERS > 3
|
||||||
|
#endif // E_STEPPERS > 2
|
||||||
|
#endif // E_STEPPERS > 1
|
||||||
}
|
}
|
||||||
#endif // !SWITCHING_EXTRUDER
|
#endif // !SWITCHING_EXTRUDER
|
||||||
|
|
||||||
@@ -601,7 +586,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||||
monitor_tmc_drivers();
|
monitor_tmc_driver();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(MONITOR_L6470_DRIVER_STATUS)
|
#if ENABLED(MONITOR_L6470_DRIVER_STATUS)
|
||||||
@@ -724,7 +709,7 @@ void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr
|
|||||||
SERIAL_ERROR_MSG(MSG_ERR_KILLED);
|
SERIAL_ERROR_MSG(MSG_ERR_KILLED);
|
||||||
|
|
||||||
#if HAS_DISPLAY
|
#if HAS_DISPLAY
|
||||||
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
|
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component);
|
||||||
#else
|
#else
|
||||||
UNUSED(lcd_error);
|
UNUSED(lcd_error);
|
||||||
UNUSED(lcd_component);
|
UNUSED(lcd_component);
|
||||||
@@ -1110,7 +1095,7 @@ void setup() {
|
|||||||
host_action_prompt_end();
|
host_action_prompt_end();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TRINAMIC && DISABLED(PSU_DEFAULT_OFF)
|
#if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
|
||||||
test_tmc_connection(true, true, true, true);
|
test_tmc_connection(true, true, true, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1134,12 +1119,34 @@ void loop() {
|
|||||||
idle(); // Do an idle first so boot is slightly faster
|
idle(); // Do an idle first so boot is slightly faster
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
card.checkautostart();
|
card.checkautostart();
|
||||||
if (card.flag.abort_sd_printing) abortSDPrinting();
|
|
||||||
#endif
|
if (card.flag.abort_sd_printing) {
|
||||||
|
card.stopSDPrint(
|
||||||
|
#if SD_RESORT
|
||||||
|
true
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
queue.clear();
|
||||||
|
quickstop_stepper();
|
||||||
|
print_job_timer.stop();
|
||||||
|
#if DISABLED(SD_ABORT_NO_COOLDOWN)
|
||||||
|
thermalManager.disable_all_heaters();
|
||||||
|
#endif
|
||||||
|
thermalManager.zero_fan_speeds();
|
||||||
|
wait_for_heatup = false;
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
|
card.removeJobRecoveryFile();
|
||||||
|
#endif
|
||||||
|
#ifdef EVENT_GCODE_SD_STOP
|
||||||
|
queue.inject_P(PSTR(EVENT_GCODE_SD_STOP));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SDSUPPORT
|
||||||
|
|
||||||
queue.advance();
|
queue.advance();
|
||||||
|
|
||||||
endstops.event_handler();
|
endstops.event_handler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+106
-109
@@ -51,96 +51,96 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
|
|||||||
//
|
//
|
||||||
#if AXIS_DRIVER_TYPE_X(L6470)
|
#if AXIS_DRIVER_TYPE_X(L6470)
|
||||||
extern L6470 stepperX;
|
extern L6470 stepperX;
|
||||||
#define X_enable() NOOP
|
#define X_enable NOOP
|
||||||
#define X_disable() stepperX.free()
|
#define X_disable stepperX.free()
|
||||||
#elif HAS_X_ENABLE
|
#elif HAS_X_ENABLE
|
||||||
#define X_enable() X_ENABLE_WRITE( X_ENABLE_ON)
|
#define X_enable X_ENABLE_WRITE( X_ENABLE_ON)
|
||||||
#define X_disable() X_ENABLE_WRITE(!X_ENABLE_ON)
|
#define X_disable X_ENABLE_WRITE(!X_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define X_enable() NOOP
|
#define X_enable NOOP
|
||||||
#define X_disable() NOOP
|
#define X_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_X2(L6470)
|
#if AXIS_DRIVER_TYPE_X2(L6470)
|
||||||
extern L6470 stepperX2;
|
extern L6470 stepperX2;
|
||||||
#define X2_enable() NOOP
|
#define X2_enable NOOP
|
||||||
#define X2_disable() stepperX2.free()
|
#define X2_disable stepperX2.free()
|
||||||
#elif HAS_X2_ENABLE
|
#elif HAS_X2_ENABLE
|
||||||
#define X2_enable() X2_ENABLE_WRITE( X_ENABLE_ON)
|
#define X2_enable X2_ENABLE_WRITE( X_ENABLE_ON)
|
||||||
#define X2_disable() X2_ENABLE_WRITE(!X_ENABLE_ON)
|
#define X2_disable X2_ENABLE_WRITE(!X_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define X2_enable() NOOP
|
#define X2_enable NOOP
|
||||||
#define X2_disable() NOOP
|
#define X2_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define enable_X() do{ X_enable(); X2_enable(); }while(0)
|
#define enable_X() do{ X_enable; X2_enable; }while(0)
|
||||||
#define disable_X() do{ X_disable(); X2_disable(); CBI(axis_known_position, X_AXIS); }while(0)
|
#define disable_X() do{ X_disable; X2_disable; CBI(axis_known_position, X_AXIS); }while(0)
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_Y(L6470)
|
#if AXIS_DRIVER_TYPE_Y(L6470)
|
||||||
extern L6470 stepperY;
|
extern L6470 stepperY;
|
||||||
#define Y_enable() NOOP
|
#define Y_enable NOOP
|
||||||
#define Y_disable() stepperY.free()
|
#define Y_disable stepperY.free()
|
||||||
#elif HAS_Y_ENABLE
|
#elif HAS_Y_ENABLE
|
||||||
#define Y_enable() Y_ENABLE_WRITE( Y_ENABLE_ON)
|
#define Y_enable Y_ENABLE_WRITE( Y_ENABLE_ON)
|
||||||
#define Y_disable() Y_ENABLE_WRITE(!Y_ENABLE_ON)
|
#define Y_disable Y_ENABLE_WRITE(!Y_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define Y_enable() NOOP
|
#define Y_enable NOOP
|
||||||
#define Y_disable() NOOP
|
#define Y_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_Y2(L6470)
|
#if AXIS_DRIVER_TYPE_Y2(L6470)
|
||||||
extern L6470 stepperY2;
|
extern L6470 stepperY2;
|
||||||
#define Y2_enable() NOOP
|
#define Y2_enable NOOP
|
||||||
#define Y2_disable() stepperY2.free()
|
#define Y2_disable stepperY2.free()
|
||||||
#elif HAS_Y2_ENABLE
|
#elif HAS_Y2_ENABLE
|
||||||
#define Y2_enable() Y2_ENABLE_WRITE( Y_ENABLE_ON)
|
#define Y2_enable Y2_ENABLE_WRITE( Y_ENABLE_ON)
|
||||||
#define Y2_disable() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
|
#define Y2_disable Y2_ENABLE_WRITE(!Y_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define Y2_enable() NOOP
|
#define Y2_enable NOOP
|
||||||
#define Y2_disable() NOOP
|
#define Y2_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define enable_Y() do{ Y_enable(); Y2_enable(); }while(0)
|
#define enable_Y() do{ Y_enable; Y2_enable; }while(0)
|
||||||
#define disable_Y() do{ Y_disable(); Y2_disable(); CBI(axis_known_position, Y_AXIS); }while(0)
|
#define disable_Y() do{ Y_disable; Y2_disable; CBI(axis_known_position, Y_AXIS); }while(0)
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_Z(L6470)
|
#if AXIS_DRIVER_TYPE_Z(L6470)
|
||||||
extern L6470 stepperZ;
|
extern L6470 stepperZ;
|
||||||
#define Z_enable() NOOP
|
#define Z_enable NOOP
|
||||||
#define Z_disable() stepperZ.free()
|
#define Z_disable stepperZ.free()
|
||||||
#elif HAS_Z_ENABLE
|
#elif HAS_Z_ENABLE
|
||||||
#define Z_enable() Z_ENABLE_WRITE( Z_ENABLE_ON)
|
#define Z_enable Z_ENABLE_WRITE( Z_ENABLE_ON)
|
||||||
#define Z_disable() Z_ENABLE_WRITE(!Z_ENABLE_ON)
|
#define Z_disable Z_ENABLE_WRITE(!Z_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define Z_enable() NOOP
|
#define Z_enable NOOP
|
||||||
#define Z_disable() NOOP
|
#define Z_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_Z2(L6470)
|
#if AXIS_DRIVER_TYPE_Z2(L6470)
|
||||||
extern L6470 stepperZ2;
|
extern L6470 stepperZ2;
|
||||||
#define Z2_enable() NOOP
|
#define Z2_enable NOOP
|
||||||
#define Z2_disable() stepperZ2.free()
|
#define Z2_disable stepperZ2.free()
|
||||||
#elif HAS_Z2_ENABLE
|
#elif HAS_Z2_ENABLE
|
||||||
#define Z2_enable() Z2_ENABLE_WRITE( Z_ENABLE_ON)
|
#define Z2_enable Z2_ENABLE_WRITE( Z_ENABLE_ON)
|
||||||
#define Z2_disable() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
|
#define Z2_disable Z2_ENABLE_WRITE(!Z_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define Z2_enable() NOOP
|
#define Z2_enable NOOP
|
||||||
#define Z2_disable() NOOP
|
#define Z2_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_Z3(L6470)
|
#if AXIS_DRIVER_TYPE_Z3(L6470)
|
||||||
extern L6470 stepperZ3;
|
extern L6470 stepperZ3;
|
||||||
#define Z3_enable() NOOP
|
#define Z3_enable NOOP
|
||||||
#define Z3_disable() stepperZ3.free()
|
#define Z3_disable stepperZ3.free()
|
||||||
#elif HAS_Z3_ENABLE
|
#elif HAS_Z3_ENABLE
|
||||||
#define Z3_enable() Z3_ENABLE_WRITE( Z_ENABLE_ON)
|
#define Z3_enable Z3_ENABLE_WRITE( Z_ENABLE_ON)
|
||||||
#define Z3_disable() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
|
#define Z3_disable Z3_ENABLE_WRITE(!Z_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define Z3_enable() NOOP
|
#define Z3_enable NOOP
|
||||||
#define Z3_disable() NOOP
|
#define Z3_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define enable_Z() do{ Z_enable(); Z2_enable(); Z3_enable(); }while(0)
|
#define enable_Z() do{ Z_enable; Z2_enable; Z3_enable; }while(0)
|
||||||
#define disable_Z() do{ Z_disable(); Z2_disable(); Z3_disable(); CBI(axis_known_position, Z_AXIS); }while(0)
|
#define disable_Z() do{ Z_disable; Z2_disable; Z3_disable; CBI(axis_known_position, Z_AXIS); }while(0)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extruder Stepper enable / disable
|
// Extruder Stepper enable / disable
|
||||||
@@ -149,74 +149,74 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
|
|||||||
// define the individual enables/disables
|
// define the individual enables/disables
|
||||||
#if AXIS_DRIVER_TYPE_E0(L6470)
|
#if AXIS_DRIVER_TYPE_E0(L6470)
|
||||||
extern L6470 stepperE0;
|
extern L6470 stepperE0;
|
||||||
#define E0_enable() NOOP
|
#define E0_enable NOOP
|
||||||
#define E0_disable() do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E0_disable do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif HAS_E0_ENABLE
|
#elif HAS_E0_ENABLE
|
||||||
#define E0_enable() E0_ENABLE_WRITE( E_ENABLE_ON)
|
#define E0_enable E0_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E0_disable() E0_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E0_disable E0_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E0_enable() NOOP
|
#define E0_enable NOOP
|
||||||
#define E0_disable() NOOP
|
#define E0_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_E1(L6470)
|
#if AXIS_DRIVER_TYPE_E1(L6470)
|
||||||
extern L6470 stepperE1;
|
extern L6470 stepperE1;
|
||||||
#define E1_enable() NOOP
|
#define E1_enable NOOP
|
||||||
#define E1_disable() do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E1_disable do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif E_STEPPERS > 1 && HAS_E1_ENABLE
|
#elif E_STEPPERS > 1 && HAS_E1_ENABLE
|
||||||
#define E1_enable() E1_ENABLE_WRITE( E_ENABLE_ON)
|
#define E1_enable E1_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E1_disable() E1_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E1_disable E1_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E1_enable() NOOP
|
#define E1_enable NOOP
|
||||||
#define E1_disable() NOOP
|
#define E1_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_E2(L6470)
|
#if AXIS_DRIVER_TYPE_E2(L6470)
|
||||||
extern L6470 stepperE2;
|
extern L6470 stepperE2;
|
||||||
#define E2_enable() NOOP
|
#define E2_enable NOOP
|
||||||
#define E2_disable() do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E2_disable do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif E_STEPPERS > 2 && HAS_E2_ENABLE
|
#elif E_STEPPERS > 2 && HAS_E2_ENABLE
|
||||||
#define E2_enable() E2_ENABLE_WRITE( E_ENABLE_ON)
|
#define E2_enable E2_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E2_disable() E2_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E2_disable E2_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E2_enable() NOOP
|
#define E2_enable NOOP
|
||||||
#define E2_disable() NOOP
|
#define E2_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_E3(L6470)
|
#if AXIS_DRIVER_TYPE_E3(L6470)
|
||||||
extern L6470 stepperE3;
|
extern L6470 stepperE3;
|
||||||
#define E3_enable() NOOP
|
#define E3_enable NOOP
|
||||||
#define E3_disable() do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E3_disable do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif E_STEPPERS > 3 && HAS_E3_ENABLE
|
#elif E_STEPPERS > 3 && HAS_E3_ENABLE
|
||||||
#define E3_enable() E3_ENABLE_WRITE( E_ENABLE_ON)
|
#define E3_enable E3_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E3_disable() E3_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E3_disable E3_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E3_enable() NOOP
|
#define E3_enable NOOP
|
||||||
#define E3_disable() NOOP
|
#define E3_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_E4(L6470)
|
#if AXIS_DRIVER_TYPE_E4(L6470)
|
||||||
extern L6470 stepperE4;
|
extern L6470 stepperE4;
|
||||||
#define E4_enable() NOOP
|
#define E4_enable NOOP
|
||||||
#define E4_disable() do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E4_disable do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif E_STEPPERS > 4 && HAS_E4_ENABLE
|
#elif E_STEPPERS > 4 && HAS_E4_ENABLE
|
||||||
#define E4_enable() E4_ENABLE_WRITE( E_ENABLE_ON)
|
#define E4_enable E4_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E4_disable() E4_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E4_disable E4_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E4_enable() NOOP
|
#define E4_enable NOOP
|
||||||
#define E4_disable() NOOP
|
#define E4_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AXIS_DRIVER_TYPE_E5(L6470)
|
#if AXIS_DRIVER_TYPE_E5(L6470)
|
||||||
extern L6470 stepperE5;
|
extern L6470 stepperE5;
|
||||||
#define E5_enable() NOOP
|
#define E5_enable NOOP
|
||||||
#define E5_disable() do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
#define E5_disable do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
||||||
#elif E_STEPPERS > 5 && HAS_E5_ENABLE
|
#elif E_STEPPERS > 5 && HAS_E5_ENABLE
|
||||||
#define E5_enable() E5_ENABLE_WRITE( E_ENABLE_ON)
|
#define E5_enable E5_ENABLE_WRITE( E_ENABLE_ON)
|
||||||
#define E5_disable() E5_ENABLE_WRITE(!E_ENABLE_ON)
|
#define E5_disable E5_ENABLE_WRITE(!E_ENABLE_ON)
|
||||||
#else
|
#else
|
||||||
#define E5_enable() NOOP
|
#define E5_enable NOOP
|
||||||
#define E5_disable() NOOP
|
#define E5_disable NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(MIXING_EXTRUDER)
|
#if ENABLED(MIXING_EXTRUDER)
|
||||||
@@ -225,20 +225,20 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
|
|||||||
* Mixing steppers synchronize their enable (and direction) together
|
* Mixing steppers synchronize their enable (and direction) together
|
||||||
*/
|
*/
|
||||||
#if MIXING_STEPPERS > 5
|
#if MIXING_STEPPERS > 5
|
||||||
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); }
|
#define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; E4_enable; E5_enable; }
|
||||||
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); }
|
#define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; E4_disable; E5_disable; }
|
||||||
#elif MIXING_STEPPERS > 4
|
#elif MIXING_STEPPERS > 4
|
||||||
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); }
|
#define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; E4_enable; }
|
||||||
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); }
|
#define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; E4_disable; }
|
||||||
#elif MIXING_STEPPERS > 3
|
#elif MIXING_STEPPERS > 3
|
||||||
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); }
|
#define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; }
|
||||||
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); }
|
#define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; }
|
||||||
#elif MIXING_STEPPERS > 2
|
#elif MIXING_STEPPERS > 2
|
||||||
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); }
|
#define enable_E0() { E0_enable; E1_enable; E2_enable; }
|
||||||
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); }
|
#define disable_E0() { E0_disable; E1_disable; E2_disable; }
|
||||||
#else
|
#else
|
||||||
#define enable_E0() { E0_enable(); E1_enable(); }
|
#define enable_E0() { E0_enable; E1_enable; }
|
||||||
#define disable_E0() { E0_disable(); E1_disable(); }
|
#define disable_E0() { E0_disable; E1_disable; }
|
||||||
#endif
|
#endif
|
||||||
#define enable_E1() NOOP
|
#define enable_E1() NOOP
|
||||||
#define disable_E1() NOOP
|
#define disable_E1() NOOP
|
||||||
@@ -254,48 +254,48 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
|
|||||||
#else // !MIXING_EXTRUDER
|
#else // !MIXING_EXTRUDER
|
||||||
|
|
||||||
#if HAS_E0_ENABLE
|
#if HAS_E0_ENABLE
|
||||||
#define enable_E0() E0_enable()
|
#define enable_E0() E0_enable
|
||||||
#define disable_E0() E0_disable()
|
#define disable_E0() E0_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E0() NOOP
|
#define enable_E0() NOOP
|
||||||
#define disable_E0() NOOP
|
#define disable_E0() NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if E_STEPPERS > 1 && HAS_E1_ENABLE
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE
|
||||||
#define enable_E1() E1_enable()
|
#define enable_E1() E1_enable
|
||||||
#define disable_E1() E1_disable()
|
#define disable_E1() E1_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E1() NOOP
|
#define enable_E1() NOOP
|
||||||
#define disable_E1() NOOP
|
#define disable_E1() NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if E_STEPPERS > 2 && HAS_E2_ENABLE
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE
|
||||||
#define enable_E2() E2_enable()
|
#define enable_E2() E2_enable
|
||||||
#define disable_E2() E2_disable()
|
#define disable_E2() E2_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E2() NOOP
|
#define enable_E2() NOOP
|
||||||
#define disable_E2() NOOP
|
#define disable_E2() NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if E_STEPPERS > 3 && HAS_E3_ENABLE
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE
|
||||||
#define enable_E3() E3_enable()
|
#define enable_E3() E3_enable
|
||||||
#define disable_E3() E3_disable()
|
#define disable_E3() E3_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E3() NOOP
|
#define enable_E3() NOOP
|
||||||
#define disable_E3() NOOP
|
#define disable_E3() NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if E_STEPPERS > 4 && HAS_E4_ENABLE
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE
|
||||||
#define enable_E4() E4_enable()
|
#define enable_E4() E4_enable
|
||||||
#define disable_E4() E4_disable()
|
#define disable_E4() E4_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E4() NOOP
|
#define enable_E4() NOOP
|
||||||
#define disable_E4() NOOP
|
#define disable_E4() NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if E_STEPPERS > 5 && HAS_E5_ENABLE
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE
|
||||||
#define enable_E5() E5_enable()
|
#define enable_E5() E5_enable
|
||||||
#define disable_E5() E5_disable()
|
#define disable_E5() E5_disable
|
||||||
#else
|
#else
|
||||||
#define enable_E5() NOOP
|
#define enable_E5() NOOP
|
||||||
#define disable_E5() NOOP
|
#define disable_E5() NOOP
|
||||||
@@ -376,6 +376,3 @@ void protected_pin_err();
|
|||||||
void event_probe_recover();
|
void event_probe_recover();
|
||||||
void event_probe_failure();
|
void event_probe_failure();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char NUL_STR[], G28_STR[], M21_STR[], M23_STR[], M24_STR[],
|
|
||||||
SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[];
|
|
||||||
|
|||||||
+18
-33
@@ -64,7 +64,7 @@
|
|||||||
#define BOARD_MKS_BASE_HEROIC 1108 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
#define BOARD_MKS_BASE_HEROIC 1108 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
|
||||||
#define BOARD_MKS_GEN_13 1109 // MKS GEN v1.3 or 1.4
|
#define BOARD_MKS_GEN_13 1109 // MKS GEN v1.3 or 1.4
|
||||||
#define BOARD_MKS_GEN_L 1110 // MKS GEN L
|
#define BOARD_MKS_GEN_L 1110 // MKS GEN L
|
||||||
#define BOARD_KFB_2 1111 // BigTreeTech or BIQU KFB2.0
|
#define BOARD_KFB_2 1111 // Bigtreetech or BIQU KFB2.0
|
||||||
#define BOARD_ZRIB_V20 1112 // zrib V2.0 control board (Chinese knock off RAMPS replica)
|
#define BOARD_ZRIB_V20 1112 // zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||||
#define BOARD_FELIX2 1113 // Felix 2.0+ Electronics Board (RAMPS like)
|
#define BOARD_FELIX2 1113 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||||
#define BOARD_RIGIDBOARD 1114 // Invent-A-Part RigidBoard
|
#define BOARD_RIGIDBOARD 1114 // Invent-A-Part RigidBoard
|
||||||
@@ -99,8 +99,6 @@
|
|||||||
#define BOARD_OVERLORD 1143 // Overlord/Overlord Pro
|
#define BOARD_OVERLORD 1143 // Overlord/Overlord Pro
|
||||||
#define BOARD_HJC2560C_REV1 1144 // ADIMLab Gantry v1
|
#define BOARD_HJC2560C_REV1 1144 // ADIMLab Gantry v1
|
||||||
#define BOARD_HJC2560C_REV2 1145 // ADIMLab Gantry v2
|
#define BOARD_HJC2560C_REV2 1145 // ADIMLab Gantry v2
|
||||||
#define BOARD_TANGO 1146 // BIQU Tango V1
|
|
||||||
#define BOARD_MKS_GEN_L_V2 1147 // MKS GEN L V2
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// RAMBo and derivatives
|
// RAMBo and derivatives
|
||||||
@@ -208,15 +206,14 @@
|
|||||||
#define BOARD_COHESION3D_MINI 2011 // Cohesion3D Mini
|
#define BOARD_COHESION3D_MINI 2011 // Cohesion3D Mini
|
||||||
#define BOARD_SMOOTHIEBOARD 2012 // Smoothieboard
|
#define BOARD_SMOOTHIEBOARD 2012 // Smoothieboard
|
||||||
#define BOARD_AZTEEG_X5_MINI_WIFI 2013 // Azteeg X5 Mini Wifi (Power outputs: Hotend0, Bed, Fan)
|
#define BOARD_AZTEEG_X5_MINI_WIFI 2013 // Azteeg X5 Mini Wifi (Power outputs: Hotend0, Bed, Fan)
|
||||||
#define BOARD_BIQU_B300_V1_0 2014 // BIQU B300_V1.0 (Power outputs: Hotend0, Fan, Bed, SPI Driver)
|
#define BOARD_BIGTREE_SKR_V1_1 2014 // BIGTREE SKR_V1.1 (Power outputs: Hotend0,Hotend1, Fan, Bed)
|
||||||
#define BOARD_AZTEEG_X5_MINI 2015 // Azteeg X5 Mini (Power outputs: Hotend0, Bed, Fan)
|
#define BOARD_BIQU_B300_V1_0 2015 // BIQU B300_V1.0 (Power outputs: Hotend0, Fan, Bed, SPI Driver)
|
||||||
#define BOARD_MKS_SGEN 2016 // MKS-SGen (Power outputs: Hotend0, Hotend1, Bed, Fan)
|
#define BOARD_BIGTREE_SKR_V1_3 2016 // BIGTREE SKR_V1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||||
#define BOARD_MKS_SGEN_L 2017 // MKS-SGen-L (Power outputs: Hotend0, Hotend1, Bed, Fan)
|
#define BOARD_AZTEEG_X5_MINI 2017 // Azteeg X5 Mini (Power outputs: Hotend0, Bed, Fan)
|
||||||
#define BOARD_TH3D_EZBOARD 2018 // TH3D EZBoard v1.0
|
#define BOARD_MKS_SGEN 2018 // MKS-SGen (Power outputs: Hotend0, Hotend1, Bed, Fan)
|
||||||
#define BOARD_GMARSH_X6_REV1 2019 // GMARSH X6 board, revision 1 prototype
|
#define BOARD_MKS_SGEN_L 2019 // MKS-SGen-L (Power outputs: Hotend0, Hotend1, Bed, Fan)
|
||||||
#define BOARD_BIGTREE_SKR_V1_1 2020 // BigTreeTech SKR v1.1 (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
#define BOARD_TH3D_EZBOARD 2020 // TH3D EZBoard v1.0
|
||||||
#define BOARD_BIGTREE_SKR_V1_3 2021 // BigTreeTech SKR v1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
#define BOARD_GMARSH_X6_REV1 2021 // GMARSH X6 board, revision 1 prototype
|
||||||
#define BOARD_BIGTREE_SKR_V1_4 2022 // BigTreeTech SKR v1.4 (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// SAM3X8E ARM Cortex M3
|
// SAM3X8E ARM Cortex M3
|
||||||
@@ -270,21 +267,15 @@
|
|||||||
#define BOARD_MKS_ROBIN_MINI 4007 // MKS Robin Mini (STM32F103VET6)
|
#define BOARD_MKS_ROBIN_MINI 4007 // MKS Robin Mini (STM32F103VET6)
|
||||||
#define BOARD_MKS_ROBIN_NANO 4008 // MKS Robin Nano (STM32F103VET6)
|
#define BOARD_MKS_ROBIN_NANO 4008 // MKS Robin Nano (STM32F103VET6)
|
||||||
#define BOARD_MKS_ROBIN_LITE 4009 // MKS Robin Lite/Lite2 (STM32F103RCT6)
|
#define BOARD_MKS_ROBIN_LITE 4009 // MKS Robin Lite/Lite2 (STM32F103RCT6)
|
||||||
#define BOARD_MKS_ROBIN_LITE3 4010 // MKS Robin Lite3 (STM32F103RCT6)
|
#define BOARD_BIGTREE_SKR_MINI_V1_1 4010 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||||
#define BOARD_MKS_ROBIN_PRO 4011 // MKS Robin Pro (STM32F103ZET6)
|
#define BOARD_BIGTREE_SKR_MINI_E3 4011 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||||
#define BOARD_BIGTREE_SKR_MINI_V1_1 4012 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
#define BOARD_BIGTREE_SKR_E3_DIP 4012 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC)
|
||||||
#define BOARD_BTT_SKR_MINI_E3_V1_0 4013 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
#define BOARD_BTT_SKR_MINI_E3_V1_2 4013 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 4014 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
#define BOARD_JGAURORA_A5S_A1 4014 // JGAurora A5S A1 (STM32F103ZET6)
|
||||||
#define BOARD_BIGTREE_SKR_E3_DIP 4015 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
#define BOARD_FYSETC_AIO_II 4015 // FYSETC AIO_II
|
||||||
#define BOARD_JGAURORA_A5S_A1 4016 // JGAurora A5S A1 (STM32F103ZET6)
|
#define BOARD_FYSETC_CHEETAH 4016 // FYSETC Cheetah
|
||||||
#define BOARD_FYSETC_AIO_II 4017 // FYSETC AIO_II
|
#define BOARD_FYSETC_CHEETAH_V12 4017 // FYSETC Cheetah V1.2
|
||||||
#define BOARD_FYSETC_CHEETAH 4018 // FYSETC Cheetah
|
#define BOARD_LONGER3D_LK 4018 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
|
||||||
#define BOARD_FYSETC_CHEETAH_V12 4019 // FYSETC Cheetah V1.2
|
|
||||||
#define BOARD_LONGER3D_LK 4020 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
|
|
||||||
#define BOARD_GTM32_MINI 4021 // STM32F103VET6 controller
|
|
||||||
#define BOARD_GTM32_MINI_A30 4022 // STM32F103VET6 controller
|
|
||||||
#define BOARD_GTM32_REV_B 4023 // STM32F103VET6 controller
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARM Cortex-M4F
|
// ARM Cortex-M4F
|
||||||
@@ -308,10 +299,6 @@
|
|||||||
#define BOARD_BIGTREE_BTT002_V1_0 4208 // BigTreeTech BTT002 v1.0 (STM32F407VE)
|
#define BOARD_BIGTREE_BTT002_V1_0 4208 // BigTreeTech BTT002 v1.0 (STM32F407VE)
|
||||||
#define BOARD_LERDGE_K 4209 // Lerdge K (STM32F407ZG)
|
#define BOARD_LERDGE_K 4209 // Lerdge K (STM32F407ZG)
|
||||||
#define BOARD_LERDGE_X 4210 // Lerdge X (STM32F407VE)
|
#define BOARD_LERDGE_X 4210 // Lerdge X (STM32F407VE)
|
||||||
#define BOARD_VAKE403D 4211 // VAkE 403D (STM32F446VET6)
|
|
||||||
#define BOARD_FYSETC_S6 4212 // FYSETC S6 board
|
|
||||||
#define BOARD_FLYF407ZG 4213 // FLYF407ZG board (STM32F407ZG)
|
|
||||||
#define BOARD_MKS_ROBIN2 4214 // MKS_ROBIN2 (STM32F407ZE)
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARM Cortex M7
|
// ARM Cortex M7
|
||||||
@@ -324,8 +311,6 @@
|
|||||||
// Espressif ESP32 WiFi
|
// Espressif ESP32 WiFi
|
||||||
//
|
//
|
||||||
#define BOARD_ESPRESSIF_ESP32 6000
|
#define BOARD_ESPRESSIF_ESP32 6000
|
||||||
#define BOARD_MRR_ESPA 6001
|
|
||||||
#define BOARD_MRR_ESPE 6002
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Simulations
|
// Simulations
|
||||||
|
|||||||
+20
-31
@@ -19,6 +19,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
//
|
//
|
||||||
// Serial aliases for debugging.
|
// Serial aliases for debugging.
|
||||||
@@ -36,13 +37,9 @@
|
|||||||
#undef DEBUG_ECHOPGM
|
#undef DEBUG_ECHOPGM
|
||||||
#undef DEBUG_ECHOLNPGM
|
#undef DEBUG_ECHOLNPGM
|
||||||
#undef DEBUG_ECHOPAIR
|
#undef DEBUG_ECHOPAIR
|
||||||
#undef DEBUG_ECHOPAIR_P
|
|
||||||
#undef DEBUG_ECHOPAIR_F
|
#undef DEBUG_ECHOPAIR_F
|
||||||
#undef DEBUG_ECHOPAIR_F_P
|
|
||||||
#undef DEBUG_ECHOLNPAIR
|
#undef DEBUG_ECHOLNPAIR
|
||||||
#undef DEBUG_ECHOLNPAIR_P
|
|
||||||
#undef DEBUG_ECHOLNPAIR_F
|
#undef DEBUG_ECHOLNPAIR_F
|
||||||
#undef DEBUG_ECHOLNPAIR_F_P
|
|
||||||
#undef DEBUG_ECHO_MSG
|
#undef DEBUG_ECHO_MSG
|
||||||
#undef DEBUG_ERROR_MSG
|
#undef DEBUG_ERROR_MSG
|
||||||
#undef DEBUG_EOL
|
#undef DEBUG_EOL
|
||||||
@@ -61,13 +58,9 @@
|
|||||||
#define DEBUG_ECHOPGM SERIAL_ECHOPGM
|
#define DEBUG_ECHOPGM SERIAL_ECHOPGM
|
||||||
#define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
|
#define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM
|
||||||
#define DEBUG_ECHOPAIR SERIAL_ECHOPAIR
|
#define DEBUG_ECHOPAIR SERIAL_ECHOPAIR
|
||||||
#define DEBUG_ECHOPAIR_P SERIAL_ECHOPAIR_P
|
|
||||||
#define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F
|
#define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F
|
||||||
#define DEBUG_ECHOPAIR_F_P SERIAL_ECHOPAIR_F_P
|
|
||||||
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
|
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
|
||||||
#define DEBUG_ECHOLNPAIR_P SERIAL_ECHOLNPAIR_P
|
|
||||||
#define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F
|
#define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F
|
||||||
#define DEBUG_ECHOLNPAIR_F_P SERIAL_ECHOLNPAIR_F_P
|
|
||||||
#define DEBUG_ECHO_MSG SERIAL_ECHO_MSG
|
#define DEBUG_ECHO_MSG SERIAL_ECHO_MSG
|
||||||
#define DEBUG_ERROR_MSG SERIAL_ERROR_MSG
|
#define DEBUG_ERROR_MSG SERIAL_ERROR_MSG
|
||||||
#define DEBUG_EOL SERIAL_EOL
|
#define DEBUG_EOL SERIAL_EOL
|
||||||
@@ -75,29 +68,25 @@
|
|||||||
#define DEBUG_XYZ SERIAL_XYZ
|
#define DEBUG_XYZ SERIAL_XYZ
|
||||||
#define DEBUG_DELAY(ms) serial_delay(ms)
|
#define DEBUG_DELAY(ms) serial_delay(ms)
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PRINT_P(P) NOOP
|
#define DEBUG_PRINT_P(P) NOOP
|
||||||
#define DEBUG_ECHO_START() NOOP
|
#define DEBUG_ECHO_START() NOOP
|
||||||
#define DEBUG_ERROR_START() NOOP
|
#define DEBUG_ERROR_START() NOOP
|
||||||
#define DEBUG_CHAR(...) NOOP
|
#define DEBUG_CHAR(...) NOOP
|
||||||
#define DEBUG_ECHO(...) NOOP
|
#define DEBUG_ECHO(...) NOOP
|
||||||
#define DEBUG_ECHO_F(...) NOOP
|
#define DEBUG_ECHO_F(...) NOOP
|
||||||
#define DEBUG_ECHOLN(...) NOOP
|
#define DEBUG_ECHOLN(...) NOOP
|
||||||
#define DEBUG_ECHOPGM(...) NOOP
|
#define DEBUG_ECHOPGM(...) NOOP
|
||||||
#define DEBUG_ECHOLNPGM(...) NOOP
|
#define DEBUG_ECHOLNPGM(...) NOOP
|
||||||
#define DEBUG_ECHOPAIR(...) NOOP
|
#define DEBUG_ECHOPAIR(...) NOOP
|
||||||
#define DEBUG_ECHOPAIR_P(...) NOOP
|
#define DEBUG_ECHOPAIR_F(...) NOOP
|
||||||
#define DEBUG_ECHOPAIR_F(...) NOOP
|
#define DEBUG_ECHOLNPAIR(...) NOOP
|
||||||
#define DEBUG_ECHOPAIR_F_P(...) NOOP
|
#define DEBUG_ECHOLNPAIR_F(...) NOOP
|
||||||
#define DEBUG_ECHOLNPAIR(...) NOOP
|
#define DEBUG_ECHO_MSG(...) NOOP
|
||||||
#define DEBUG_ECHOLNPAIR_P(...) NOOP
|
#define DEBUG_ERROR_MSG(...) NOOP
|
||||||
#define DEBUG_ECHOLNPAIR_F(...) NOOP
|
#define DEBUG_EOL() NOOP
|
||||||
#define DEBUG_ECHOLNPAIR_F_P(...) NOOP
|
#define DEBUG_POS(...) NOOP
|
||||||
#define DEBUG_ECHO_MSG(...) NOOP
|
#define DEBUG_XYZ(...) NOOP
|
||||||
#define DEBUG_ERROR_MSG(...) NOOP
|
#define DEBUG_DELAY(...) NOOP
|
||||||
#define DEBUG_EOL() NOOP
|
|
||||||
#define DEBUG_POS(...) NOOP
|
|
||||||
#define DEBUG_XYZ(...) NOOP
|
|
||||||
#define DEBUG_DELAY(...) NOOP
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef DEBUG_OUT
|
#undef DEBUG_OUT
|
||||||
|
|||||||
@@ -121,19 +121,6 @@
|
|||||||
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|
|| AXIS_DRIVER_TYPE(A,TMC5130) \
|
||||||
|| AXIS_DRIVER_TYPE(A,TMC5160) )
|
|| AXIS_DRIVER_TYPE(A,TMC5160) )
|
||||||
|
|
||||||
#define HAS_TMC_E_DRIVER ( HAS_E_DRIVER(TMC2130) \
|
|
||||||
|| HAS_E_DRIVER(TMC2160) \
|
|
||||||
|| HAS_E_DRIVER(TMC2660) \
|
|
||||||
|| HAS_E_DRIVER(TMC2209) \
|
|
||||||
|| HAS_E_DRIVER(TMC5130) \
|
|
||||||
|| HAS_E_DRIVER(TMC5160) )
|
|
||||||
|
|
||||||
#define HAS_TMC_STANDALONE_E_DRIVER ( HAS_E_DRIVER(TMC2130_STANDALONE) \
|
|
||||||
|| HAS_E_DRIVER(TMC2160_STANDALONE) \
|
|
||||||
|| HAS_E_DRIVER(TMC2660_STANDALONE) \
|
|
||||||
|| HAS_E_DRIVER(TMC2209_STANDALONE) \
|
|
||||||
|| HAS_E_DRIVER(TMC5130_STANDALONE) \
|
|
||||||
|| HAS_E_DRIVER(TMC5160_STANDALONE) )
|
|
||||||
//
|
//
|
||||||
// Stretching 'drivers.h' to include LPC/SAMD51 SD options
|
// Stretching 'drivers.h' to include LPC/SAMD51 SD options
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -252,15 +252,15 @@
|
|||||||
#define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
|
#define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
|
||||||
#define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
|
#define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
|
||||||
|
|
||||||
#define MSG_STOP_BLTOUCH "!! STOP called because of BLTouch error - restart with M999"
|
#define MSG_STOP_BLTOUCH "STOP called because of BLTouch error - restart with M999"
|
||||||
#define MSG_STOP_UNHOMED "!! STOP called because of unhomed error - restart with M999"
|
#define MSG_STOP_UNHOMED "STOP called because of unhomed error - restart with M999"
|
||||||
#define MSG_KILL_INACTIVE_TIME "!! KILL caused by too much inactive time - current command: "
|
#define MSG_KILL_INACTIVE_TIME "KILL caused by too much inactive time - current command: "
|
||||||
#define MSG_KILL_BUTTON "!! KILL caused by KILL button/pin"
|
#define MSG_KILL_BUTTON "KILL caused by KILL button/pin"
|
||||||
|
|
||||||
// temperature.cpp strings
|
// temperature.cpp strings
|
||||||
#define MSG_PID_AUTOTUNE_PREFIX "PID Autotune"
|
#define MSG_PID_AUTOTUNE "PID Autotune"
|
||||||
#define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE_PREFIX " start"
|
#define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE " start"
|
||||||
#define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE_PREFIX " failed!"
|
#define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE " failed!"
|
||||||
#define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
|
#define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
|
||||||
#define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high"
|
#define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high"
|
||||||
#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
|
#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
#define MSG_KI " Ki: "
|
#define MSG_KI " Ki: "
|
||||||
#define MSG_KD " Kd: "
|
#define MSG_KD " Kd: "
|
||||||
#define MSG_AT " @:"
|
#define MSG_AT " @:"
|
||||||
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE_PREFIX " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
|
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
|
||||||
#define MSG_PID_DEBUG " PID_DEBUG "
|
#define MSG_PID_DEBUG " PID_DEBUG "
|
||||||
#define MSG_PID_DEBUG_INPUT ": Input "
|
#define MSG_PID_DEBUG_INPUT ": Input "
|
||||||
#define MSG_PID_DEBUG_OUTPUT " Output "
|
#define MSG_PID_DEBUG_OUTPUT " Output "
|
||||||
@@ -349,7 +349,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#if ENABLED(NUMBER_TOOLS_FROM_0)
|
#if ENABLED(NUMBER_TOOLS_FROM_0)
|
||||||
#define LCD_FIRST_TOOL '0'
|
|
||||||
#define LCD_STR_N0 "0"
|
#define LCD_STR_N0 "0"
|
||||||
#define LCD_STR_N1 "1"
|
#define LCD_STR_N1 "1"
|
||||||
#define LCD_STR_N2 "2"
|
#define LCD_STR_N2 "2"
|
||||||
@@ -357,7 +356,6 @@
|
|||||||
#define LCD_STR_N4 "4"
|
#define LCD_STR_N4 "4"
|
||||||
#define LCD_STR_N5 "5"
|
#define LCD_STR_N5 "5"
|
||||||
#else
|
#else
|
||||||
#define LCD_FIRST_TOOL '1'
|
|
||||||
#define LCD_STR_N0 "1"
|
#define LCD_STR_N0 "1"
|
||||||
#define LCD_STR_N1 "2"
|
#define LCD_STR_N1 "2"
|
||||||
#define LCD_STR_N2 "3"
|
#define LCD_STR_N2 "3"
|
||||||
|
|||||||
+26
-126
@@ -165,7 +165,6 @@
|
|||||||
|
|
||||||
// Macros to support option testing
|
// Macros to support option testing
|
||||||
#define _CAT(a,V...) a##V
|
#define _CAT(a,V...) a##V
|
||||||
#define CAT(a,V...) _CAT(a,V)
|
|
||||||
#define SWITCH_ENABLED_false 0
|
#define SWITCH_ENABLED_false 0
|
||||||
#define SWITCH_ENABLED_true 1
|
#define SWITCH_ENABLED_true 1
|
||||||
#define SWITCH_ENABLED_0 0
|
#define SWITCH_ENABLED_0 0
|
||||||
@@ -230,6 +229,32 @@
|
|||||||
#define _JOIN_1(O) (O)
|
#define _JOIN_1(O) (O)
|
||||||
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
|
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
|
||||||
|
|
||||||
|
// Macros for adding
|
||||||
|
#define INC_0 1
|
||||||
|
#define INC_1 2
|
||||||
|
#define INC_2 3
|
||||||
|
#define INC_3 4
|
||||||
|
#define INC_4 5
|
||||||
|
#define INC_5 6
|
||||||
|
#define INC_6 7
|
||||||
|
#define INC_7 8
|
||||||
|
#define INC_8 9
|
||||||
|
#define INCREMENT_(n) INC_##n
|
||||||
|
#define INCREMENT(n) INCREMENT_(n)
|
||||||
|
|
||||||
|
// Macros for subtracting
|
||||||
|
#define DEC_1 0
|
||||||
|
#define DEC_2 1
|
||||||
|
#define DEC_3 2
|
||||||
|
#define DEC_4 3
|
||||||
|
#define DEC_5 4
|
||||||
|
#define DEC_6 5
|
||||||
|
#define DEC_7 6
|
||||||
|
#define DEC_8 7
|
||||||
|
#define DEC_9 8
|
||||||
|
#define DECREMENT_(n) DEC_##n
|
||||||
|
#define DECREMENT(n) DECREMENT_(n)
|
||||||
|
|
||||||
#define NOOP (void(0))
|
#define NOOP (void(0))
|
||||||
|
|
||||||
#define CEILING(x,y) (((x) + (y) - 1) / (y))
|
#define CEILING(x,y) (((x) + (y) - 1) / (y))
|
||||||
@@ -251,7 +276,6 @@
|
|||||||
//
|
//
|
||||||
// Maths macros that can be overridden by HAL
|
// Maths macros that can be overridden by HAL
|
||||||
//
|
//
|
||||||
#define ACOS(x) acosf(x)
|
|
||||||
#define ATAN2(y, x) atan2f(y, x)
|
#define ATAN2(y, x) atan2f(y, x)
|
||||||
#define POW(x, y) powf(x, y)
|
#define POW(x, y) powf(x, y)
|
||||||
#define SQRT(x) sqrtf(x)
|
#define SQRT(x) sqrtf(x)
|
||||||
@@ -322,127 +346,3 @@
|
|||||||
#define _MAX(V...) _MAX_N(NUM_ARGS(V), V)
|
#define _MAX(V...) _MAX_N(NUM_ARGS(V), V)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Macros for adding
|
|
||||||
#define INC_0 1
|
|
||||||
#define INC_1 2
|
|
||||||
#define INC_2 3
|
|
||||||
#define INC_3 4
|
|
||||||
#define INC_4 5
|
|
||||||
#define INC_5 6
|
|
||||||
#define INC_6 7
|
|
||||||
#define INC_7 8
|
|
||||||
#define INC_8 9
|
|
||||||
#define INCREMENT_(n) INC_##n
|
|
||||||
#define INCREMENT(n) INCREMENT_(n)
|
|
||||||
|
|
||||||
#define ADD0(N) N
|
|
||||||
#define ADD1(N) INCREMENT_(N)
|
|
||||||
#define ADD2(N) ADD1(ADD1(N))
|
|
||||||
#define ADD3(N) ADD1(ADD2(N))
|
|
||||||
#define ADD4(N) ADD2(ADD2(N))
|
|
||||||
#define ADD5(N) ADD2(ADD3(N))
|
|
||||||
#define ADD6(N) ADD3(ADD3(N))
|
|
||||||
#define ADD7(N) ADD3(ADD4(N))
|
|
||||||
#define ADD8(N) ADD4(ADD4(N))
|
|
||||||
#define ADD9(N) ADD4(ADD5(N))
|
|
||||||
#define ADD10(N) ADD5(ADD5(N))
|
|
||||||
|
|
||||||
// Macros for subtracting
|
|
||||||
#define DEC_0 0
|
|
||||||
#define DEC_1 0
|
|
||||||
#define DEC_2 1
|
|
||||||
#define DEC_3 2
|
|
||||||
#define DEC_4 3
|
|
||||||
#define DEC_5 4
|
|
||||||
#define DEC_6 5
|
|
||||||
#define DEC_7 6
|
|
||||||
#define DEC_8 7
|
|
||||||
#define DEC_9 8
|
|
||||||
#define DECREMENT_(n) DEC_##n
|
|
||||||
#define DECREMENT(n) DECREMENT_(n)
|
|
||||||
|
|
||||||
#define SUB0(N) N
|
|
||||||
#define SUB1(N) DECREMENT_(N)
|
|
||||||
#define SUB2(N) SUB1(SUB1(N))
|
|
||||||
#define SUB3(N) SUB1(SUB2(N))
|
|
||||||
#define SUB4(N) SUB2(SUB2(N))
|
|
||||||
#define SUB5(N) SUB2(SUB3(N))
|
|
||||||
#define SUB6(N) SUB3(SUB3(N))
|
|
||||||
#define SUB7(N) SUB3(SUB4(N))
|
|
||||||
#define SUB8(N) SUB4(SUB4(N))
|
|
||||||
#define SUB9(N) SUB4(SUB5(N))
|
|
||||||
#define SUB10(N) SUB5(SUB5(N))
|
|
||||||
|
|
||||||
//
|
|
||||||
// Primitives supporting precompiler REPEAT
|
|
||||||
//
|
|
||||||
#define FIRST(a,...) a
|
|
||||||
#define SECOND(a,b,...) b
|
|
||||||
|
|
||||||
// Defer expansion
|
|
||||||
#define EMPTY()
|
|
||||||
#define DEFER(M) M EMPTY()
|
|
||||||
#define DEFER2(M) M EMPTY EMPTY()()
|
|
||||||
#define DEFER3(M) M EMPTY EMPTY EMPTY()()()
|
|
||||||
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
|
|
||||||
|
|
||||||
// Force define expansion
|
|
||||||
#define EVAL(V...) EVAL16(V)
|
|
||||||
#define EVAL1024(V...) EVAL512(EVAL512(V))
|
|
||||||
#define EVAL512(V...) EVAL256(EVAL256(V))
|
|
||||||
#define EVAL256(V...) EVAL128(EVAL128(V))
|
|
||||||
#define EVAL128(V...) EVAL64(EVAL64(V))
|
|
||||||
#define EVAL64(V...) EVAL32(EVAL32(V))
|
|
||||||
#define EVAL32(V...) EVAL16(EVAL16(V))
|
|
||||||
#define EVAL16(V...) EVAL8(EVAL8(V))
|
|
||||||
#define EVAL8(V...) EVAL4(EVAL4(V))
|
|
||||||
#define EVAL4(V...) EVAL2(EVAL2(V))
|
|
||||||
#define EVAL2(V...) EVAL1(EVAL1(V))
|
|
||||||
#define EVAL1(V...) V
|
|
||||||
|
|
||||||
#define IS_PROBE(V...) SECOND(V, 0) // Get the second item passed, or 0
|
|
||||||
#define PROBE() ~, 1 // Second item will be 1 if this is passed
|
|
||||||
#define _NOT_0 PROBE()
|
|
||||||
#define NOT(x) IS_PROBE(_CAT(_NOT_, x)) // NOT('0') gets '1'. Anything else gets '0'.
|
|
||||||
#define _BOOL(x) NOT(NOT(x)) // NOT('0') gets '0'. Anything else gets '1'.
|
|
||||||
|
|
||||||
#define IF_ELSE(TF) _IF_ELSE(_BOOL(TF))
|
|
||||||
#define _IF_ELSE(TF) _CAT(_IF_, TF)
|
|
||||||
|
|
||||||
#define _IF_1(V...) V _IF_1_ELSE
|
|
||||||
#define _IF_0(...) _IF_0_ELSE
|
|
||||||
|
|
||||||
#define _IF_1_ELSE(...)
|
|
||||||
#define _IF_0_ELSE(V...) V
|
|
||||||
|
|
||||||
#define HAS_ARGS(V...) _BOOL(FIRST(_END_OF_ARGUMENTS_ V)())
|
|
||||||
#define _END_OF_ARGUMENTS_() 0
|
|
||||||
|
|
||||||
//
|
|
||||||
// REPEAT core macros. Recurse N times with ascending I.
|
|
||||||
//
|
|
||||||
|
|
||||||
// Call OP(I) N times with ascending counter.
|
|
||||||
#define _REPEAT(_RPT_I,_RPT_N,_RPT_OP) \
|
|
||||||
_RPT_OP(_RPT_I) \
|
|
||||||
IF_ELSE(SUB1(_RPT_N)) \
|
|
||||||
( DEFER2(__REPEAT)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP) ) \
|
|
||||||
( /* Do nothing */ )
|
|
||||||
#define __REPEAT() _REPEAT
|
|
||||||
|
|
||||||
// Call OP(I, ...) N times with ascending counter.
|
|
||||||
#define _REPEAT2(_RPT_I,_RPT_N,_RPT_OP,V...) \
|
|
||||||
_RPT_OP(_RPT_I,V) \
|
|
||||||
IF_ELSE(SUB1(_RPT_N)) \
|
|
||||||
( DEFER2(__REPEAT2)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP,V) ) \
|
|
||||||
( /* Do nothing */ )
|
|
||||||
#define __REPEAT2() _REPEAT2
|
|
||||||
|
|
||||||
// Repeat a macro passing S...N-1.
|
|
||||||
#define REPEAT_S(S,N,OP) EVAL(_REPEAT(S,SUB##S(N),OP))
|
|
||||||
#define REPEAT(N,OP) REPEAT_S(0,N,OP)
|
|
||||||
|
|
||||||
// Repeat a macro passing 0...N-1 plus additional arguments.
|
|
||||||
#define REPEAT2_S(S,N,OP,V...) EVAL(_REPEAT2(S,SUB##S(N),OP,V))
|
|
||||||
#define REPEAT2(N,OP,V...) REPEAT2_S(0,N,OP,V)
|
|
||||||
|
|||||||
@@ -67,10 +67,8 @@ void print_bin(const uint16_t val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];
|
|
||||||
|
|
||||||
void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
|
void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
|
||||||
serialprintPGM(prefix);
|
serialprintPGM(prefix);
|
||||||
SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
|
SERIAL_ECHOPAIR(" " MSG_X, x, " " MSG_Y, y, " " MSG_Z, z);
|
||||||
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define SERIAL_PRINTF(V...) SERIAL_OUT(printf, V)
|
#define SERIAL_PRINTF(V...) SERIAL_OUT(printf, V)
|
||||||
#define SERIAL_FLUSH() SERIAL_OUT(flush)
|
#define SERIAL_FLUSH() SERIAL_OUT(flush)
|
||||||
|
|
||||||
#ifdef ARDUINO_ARCH_STM32
|
#ifdef __STM32F1__
|
||||||
#define SERIAL_FLUSHTX() SERIAL_OUT(flush)
|
#define SERIAL_FLUSHTX() SERIAL_OUT(flush)
|
||||||
#elif TX_BUFFER_SIZE > 0
|
#elif TX_BUFFER_SIZE > 0
|
||||||
#define SERIAL_FLUSHTX() SERIAL_OUT(flushTX)
|
#define SERIAL_FLUSHTX() SERIAL_OUT(flushTX)
|
||||||
@@ -83,7 +83,7 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define SERIAL_FLUSHTX()
|
#define SERIAL_FLUSHTX()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR().
|
// Print up to 12 pairs of values
|
||||||
#define __SEP_N(N,V...) _SEP_##N(V)
|
#define __SEP_N(N,V...) _SEP_##N(V)
|
||||||
#define _SEP_N(N,V...) __SEP_N(N,V)
|
#define _SEP_N(N,V...) __SEP_N(N,V)
|
||||||
#define _SEP_1(PRE) SERIAL_ECHOPGM(PRE)
|
#define _SEP_1(PRE) SERIAL_ECHOPGM(PRE)
|
||||||
@@ -113,36 +113,6 @@ extern uint8_t marlin_debug_flags;
|
|||||||
|
|
||||||
#define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V)
|
#define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V)
|
||||||
|
|
||||||
// Print up to 12 pairs of values. Odd elements must be PSTR pointers.
|
|
||||||
#define __SEP_N_P(N,V...) _SEP_##N##_P(V)
|
|
||||||
#define _SEP_N_P(N,V...) __SEP_N_P(N,V)
|
|
||||||
#define _SEP_1_P(PRE) serialprintPGM(PRE)
|
|
||||||
#define _SEP_2_P(PRE,V) serial_echopair_PGM(PRE,V)
|
|
||||||
#define _SEP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
|
|
||||||
#define _SEP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_2_P(V); }while(0)
|
|
||||||
#define _SEP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_3_P(V); }while(0)
|
|
||||||
#define _SEP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_4_P(V); }while(0)
|
|
||||||
#define _SEP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_5_P(V); }while(0)
|
|
||||||
#define _SEP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_6_P(V); }while(0)
|
|
||||||
#define _SEP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_7_P(V); }while(0)
|
|
||||||
#define _SEP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_8_P(V); }while(0)
|
|
||||||
#define _SEP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_9_P(V); }while(0)
|
|
||||||
#define _SEP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_10_P(V); }while(0)
|
|
||||||
#define _SEP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_11_P(V); }while(0)
|
|
||||||
#define _SEP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_12_P(V); }while(0)
|
|
||||||
#define _SEP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_13_P(V); }while(0)
|
|
||||||
#define _SEP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_14_P(V); }while(0)
|
|
||||||
#define _SEP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_15_P(V); }while(0)
|
|
||||||
#define _SEP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_16_P(V); }while(0)
|
|
||||||
#define _SEP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_17_P(V); }while(0)
|
|
||||||
#define _SEP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_18_P(V); }while(0)
|
|
||||||
#define _SEP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_19_P(V); }while(0)
|
|
||||||
#define _SEP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_20_P(V); }while(0)
|
|
||||||
#define _SEP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_21_P(V); }while(0)
|
|
||||||
#define _SEP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_22_P(V); }while(0)
|
|
||||||
|
|
||||||
#define SERIAL_ECHOPAIR_P(V...) _SEP_N_P(NUM_ARGS(V),V)
|
|
||||||
|
|
||||||
// Print up to 12 pairs of values followed by newline
|
// Print up to 12 pairs of values followed by newline
|
||||||
#define __SELP_N(N,V...) _SELP_##N(V)
|
#define __SELP_N(N,V...) _SELP_##N(V)
|
||||||
#define _SELP_N(N,V...) __SELP_N(N,V)
|
#define _SELP_N(N,V...) __SELP_N(N,V)
|
||||||
@@ -169,40 +139,10 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0)
|
#define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0)
|
||||||
#define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0)
|
#define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0)
|
||||||
#define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0)
|
#define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0)
|
||||||
#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0) // Eat two args, pass the rest up
|
#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0) // Use up two, pass the rest up
|
||||||
|
|
||||||
#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
|
#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
|
||||||
|
|
||||||
// Print up to 12 pairs of values followed by newline
|
|
||||||
#define __SELP_N_P(N,V...) _SELP_##N##_P(V)
|
|
||||||
#define _SELP_N_P(N,V...) __SELP_N_P(N,V)
|
|
||||||
#define _SELP_1_P(PRE) serialprintPGM(PRE)
|
|
||||||
#define _SELP_2_P(PRE,V) do{ serial_echopair_PGM(PRE,V); SERIAL_EOL(); }while(0)
|
|
||||||
#define _SELP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
|
|
||||||
#define _SELP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_2_P(V); }while(0)
|
|
||||||
#define _SELP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_3_P(V); }while(0)
|
|
||||||
#define _SELP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_4_P(V); }while(0)
|
|
||||||
#define _SELP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_5_P(V); }while(0)
|
|
||||||
#define _SELP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_6_P(V); }while(0)
|
|
||||||
#define _SELP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_7_P(V); }while(0)
|
|
||||||
#define _SELP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_8_P(V); }while(0)
|
|
||||||
#define _SELP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_9_P(V); }while(0)
|
|
||||||
#define _SELP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_10_P(V); }while(0)
|
|
||||||
#define _SELP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_11_P(V); }while(0)
|
|
||||||
#define _SELP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_12_P(V); }while(0)
|
|
||||||
#define _SELP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_13_P(V); }while(0)
|
|
||||||
#define _SELP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_14_P(V); }while(0)
|
|
||||||
#define _SELP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_15_P(V); }while(0)
|
|
||||||
#define _SELP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_16_P(V); }while(0)
|
|
||||||
#define _SELP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_17_P(V); }while(0)
|
|
||||||
#define _SELP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_18_P(V); }while(0)
|
|
||||||
#define _SELP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_19_P(V); }while(0)
|
|
||||||
#define _SELP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_20_P(V); }while(0)
|
|
||||||
#define _SELP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_21_P(V); }while(0)
|
|
||||||
#define _SELP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_22_P(V); }while(0) // Eat two args, pass the rest up
|
|
||||||
|
|
||||||
#define SERIAL_ECHOLNPAIR_P(V...) _SELP_N_P(NUM_ARGS(V),V)
|
|
||||||
|
|
||||||
// Print up to 20 comma-separated pairs of values
|
// Print up to 20 comma-separated pairs of values
|
||||||
#define __SLST_N(N,V...) _SLST_##N(V)
|
#define __SLST_N(N,V...) _SLST_##N(V)
|
||||||
#define _SLST_N(N,V...) __SLST_N(N,V)
|
#define _SLST_N(N,V...) __SLST_N(N,V)
|
||||||
@@ -225,20 +165,15 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define _SLST_17(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_15(V); }while(0)
|
#define _SLST_17(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_15(V); }while(0)
|
||||||
#define _SLST_18(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_16(V); }while(0)
|
#define _SLST_18(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_16(V); }while(0)
|
||||||
#define _SLST_19(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_17(V); }while(0)
|
#define _SLST_19(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_17(V); }while(0)
|
||||||
#define _SLST_20(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_18(V); }while(0) // Eat two args, pass the rest up
|
#define _SLST_20(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_18(V); }while(0) // Use up two, pass the rest up
|
||||||
|
|
||||||
#define SERIAL_ECHOLIST(pre,V...) do{ SERIAL_ECHOPGM(pre); _SLST_N(NUM_ARGS(V),V); }while(0)
|
#define SERIAL_ECHOLIST(pre,V...) do{ SERIAL_ECHOPGM(pre); _SLST_N(NUM_ARGS(V),V); }while(0)
|
||||||
#define SERIAL_ECHOLIST_N(N,V...) _SLST_N(N,LIST_N(N,V))
|
#define SERIAL_ECHOLIST_N(N,V...) _SLST_N(N,LIST_N(N,V))
|
||||||
|
|
||||||
#define SERIAL_ECHO_P(P) (serialprintPGM(P))
|
#define SERIAL_ECHOPGM(S) (serialprintPGM(PSTR(S)))
|
||||||
|
#define SERIAL_ECHOLNPGM(S) (serialprintPGM(PSTR(S "\n")))
|
||||||
|
|
||||||
#define SERIAL_ECHOPGM(S) (SERIAL_ECHO_P(PSTR(S)))
|
#define SERIAL_ECHOPAIR_F(S,V...) do{ SERIAL_ECHOPGM(S); SERIAL_ECHO_F(V); }while(0)
|
||||||
#define SERIAL_ECHOLNPGM(S) (SERIAL_ECHO_P(PSTR(S "\n")))
|
|
||||||
|
|
||||||
#define SERIAL_ECHOPAIR_F_P(P,V...) do{ serialprintPGM(P); SERIAL_ECHO_F(V); }while(0)
|
|
||||||
#define SERIAL_ECHOLNPAIR_F_P(V...) do{ SERIAL_ECHOPAIR_F_P(V); SERIAL_EOL(); }while(0)
|
|
||||||
|
|
||||||
#define SERIAL_ECHOPAIR_F(S,V...) SERIAL_ECHOPAIR_F_P(PSTR(S),V)
|
|
||||||
#define SERIAL_ECHOLNPAIR_F(V...) do{ SERIAL_ECHOPAIR_F(V); SERIAL_EOL(); }while(0)
|
#define SERIAL_ECHOLNPAIR_F(V...) do{ SERIAL_ECHOPAIR_F(V); SERIAL_EOL(); }while(0)
|
||||||
|
|
||||||
#define SERIAL_ECHO_START() serial_echo_start()
|
#define SERIAL_ECHO_START() serial_echo_start()
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
|
|
||||||
#include "millis_t.h"
|
#include "millis_t.h"
|
||||||
|
|
||||||
class __FlashStringHelper;
|
|
||||||
typedef const __FlashStringHelper *progmem_str;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Enumerated axis indices
|
// Enumerated axis indices
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ void safe_delay(millis_t ms) {
|
|||||||
SERIAL_ECHOLNPGM("Probe: "
|
SERIAL_ECHOLNPGM("Probe: "
|
||||||
#if ENABLED(PROBE_MANUALLY)
|
#if ENABLED(PROBE_MANUALLY)
|
||||||
"PROBE_MANUALLY"
|
"PROBE_MANUALLY"
|
||||||
#elif ENABLED(NOZZLE_AS_PROBE)
|
|
||||||
"NOZZLE_AS_PROBE"
|
|
||||||
#elif ENABLED(FIX_MOUNTED_PROBE)
|
#elif ENABLED(FIX_MOUNTED_PROBE)
|
||||||
"FIX_MOUNTED_PROBE"
|
"FIX_MOUNTED_PROBE"
|
||||||
#elif ENABLED(BLTOUCH)
|
#elif ENABLED(BLTOUCH)
|
||||||
@@ -81,7 +79,7 @@ void safe_delay(millis_t ms) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
SERIAL_ECHOPAIR_P(PSTR("Probe Offset X"), probe_offset.x, SP_Y_STR, probe_offset.y, SP_Z_STR, probe_offset.z);
|
SERIAL_ECHOPAIR("Probe Offset X", probe_offset.x, " Y", probe_offset.y, " Z", probe_offset.z);
|
||||||
if (probe_offset.x > 0)
|
if (probe_offset.x > 0)
|
||||||
SERIAL_ECHOPGM(" (Right");
|
SERIAL_ECHOPGM(" (Right");
|
||||||
else if (probe_offset.x < 0)
|
else if (probe_offset.x < 0)
|
||||||
|
|||||||
@@ -455,19 +455,15 @@ void Max7219::register_setup() {
|
|||||||
#ifdef MAX7219_INIT_TEST
|
#ifdef MAX7219_INIT_TEST
|
||||||
#if MAX7219_INIT_TEST == 2
|
#if MAX7219_INIT_TEST == 2
|
||||||
|
|
||||||
#define MAX7219_LEDS (MAX7219_X_LEDS * MAX7219_Y_LEDS)
|
|
||||||
|
|
||||||
void Max7219::spiral(const bool on, const uint16_t del) {
|
void Max7219::spiral(const bool on, const uint16_t del) {
|
||||||
constexpr int8_t way[][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } };
|
constexpr int8_t way[] = { 1, 0, 0, 1, -1, 0, 0, -1 };
|
||||||
int8_t px = 0, py = 0, dir = 0;
|
int8_t px = 0, py = 0, dir = 0;
|
||||||
for (IF<(MAX7219_LEDS > 255), uint16_t, uint8_t>::type i = MAX7219_LEDS; i--;) {
|
for (uint8_t i = MAX7219_X_LEDS * MAX7219_Y_LEDS; i--;) {
|
||||||
led_set(px, py, on);
|
led_set(px, py, on);
|
||||||
delay(del);
|
delay(del);
|
||||||
const int8_t x = px + way[dir][0], y = py + way[dir][1];
|
const int8_t x = px + way[dir], y = py + way[dir + 1];
|
||||||
if (!WITHIN(x, 0, MAX7219_X_LEDS - 1) || !WITHIN(y, 0, MAX7219_Y_LEDS - 1) || BIT_7219(x, y) == on)
|
if (!WITHIN(x, 0, MAX7219_X_LEDS - 1) || !WITHIN(y, 0, MAX7219_Y_LEDS - 1) || BIT_7219(x, y) == on) dir = (dir + 2) & 0x7;
|
||||||
dir = (dir + 1) & 0x3;
|
px += way[dir]; py += way[dir + 1];
|
||||||
px += way[dir][0];
|
|
||||||
py += way[dir][1];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "../../../lcd/extensible_ui/ui_api.h"
|
#include "../../../lcd/extensible_ui/ui_api.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xy_pos_t bilinear_grid_spacing, bilinear_start;
|
xy_int_t bilinear_grid_spacing, bilinear_start;
|
||||||
xy_float_t bilinear_grid_factor;
|
xy_float_t bilinear_grid_factor;
|
||||||
bed_mesh_t z_values;
|
bed_mesh_t z_values;
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ void print_bilinear_leveling_grid() {
|
|||||||
#define ABL_TEMP_POINTS_X (GRID_MAX_POINTS_X + 2)
|
#define ABL_TEMP_POINTS_X (GRID_MAX_POINTS_X + 2)
|
||||||
#define ABL_TEMP_POINTS_Y (GRID_MAX_POINTS_Y + 2)
|
#define ABL_TEMP_POINTS_Y (GRID_MAX_POINTS_Y + 2)
|
||||||
float z_values_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
|
float z_values_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
|
||||||
xy_pos_t bilinear_grid_spacing_virt;
|
xy_int_t bilinear_grid_spacing_virt;
|
||||||
xy_float_t bilinear_grid_factor_virt;
|
xy_float_t bilinear_grid_factor_virt;
|
||||||
|
|
||||||
void print_bilinear_leveling_grid_virt() {
|
void print_bilinear_leveling_grid_virt() {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
extern xy_pos_t bilinear_grid_spacing, bilinear_start;
|
extern xy_int_t bilinear_grid_spacing, bilinear_start;
|
||||||
extern xy_float_t bilinear_grid_factor;
|
extern xy_float_t bilinear_grid_factor;
|
||||||
extern bed_mesh_t z_values;
|
extern bed_mesh_t z_values;
|
||||||
float bilinear_z_offset(const xy_pos_t &raw);
|
float bilinear_z_offset(const xy_pos_t &raw);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
if (!isnan(z_values[x][y])) {
|
if (!isnan(z_values[x][y])) {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_START();
|
||||||
SERIAL_ECHOPAIR(" M421 I", int(x), " J", int(y));
|
SERIAL_ECHOPAIR(" M421 I", int(x), " J", int(y));
|
||||||
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4);
|
SERIAL_ECHOLNPAIR_F(" Z", z_values[x][y], 4);
|
||||||
serial_delay(75); // Prevent Printrun from exploding
|
serial_delay(75); // Prevent Printrun from exploding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,7 +338,7 @@
|
|||||||
}
|
}
|
||||||
z_values[cpos.x][cpos.y] = NAN;
|
z_values[cpos.x][cpos.y] = NAN;
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
ExtUI::onMeshUpdate(cpos, 0.0f);
|
ExtUI::onMeshUpdate(closest, 0);
|
||||||
#endif
|
#endif
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
@@ -541,7 +541,7 @@
|
|||||||
else {
|
else {
|
||||||
z_values[cpos.x][cpos.y] = g29_constant;
|
z_values[cpos.x][cpos.y] = g29_constant;
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
ExtUI::onMeshUpdate(cpos, g29_constant);
|
ExtUI::onMeshUpdate(closest, g29_constant);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -741,13 +741,13 @@
|
|||||||
* This attempts to fill in locations closest to the nozzle's start location first.
|
* This attempts to fill in locations closest to the nozzle's start location first.
|
||||||
*/
|
*/
|
||||||
void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
|
void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) {
|
||||||
DEPLOY_PROBE(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW
|
|
||||||
|
|
||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
ui.capture();
|
ui.capture();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
||||||
|
DEPLOY_PROBE();
|
||||||
|
|
||||||
uint8_t count = GRID_MAX_POINTS;
|
uint8_t count = GRID_MAX_POINTS;
|
||||||
|
|
||||||
mesh_index_pair best;
|
mesh_index_pair best;
|
||||||
@@ -764,10 +764,10 @@
|
|||||||
if (ui.button_pressed()) {
|
if (ui.button_pressed()) {
|
||||||
ui.quick_feedback(false); // Preserve button state for click-and-hold
|
ui.quick_feedback(false); // Preserve button state for click-and-hold
|
||||||
SERIAL_ECHOLNPGM("\nMesh only partially populated.\n");
|
SERIAL_ECHOLNPGM("\nMesh only partially populated.\n");
|
||||||
|
STOW_PROBE();
|
||||||
ui.wait_for_release();
|
ui.wait_for_release();
|
||||||
ui.quick_feedback();
|
ui.quick_feedback();
|
||||||
ui.release();
|
ui.release();
|
||||||
STOW_PROBE(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW
|
|
||||||
return restore_ubl_active_state_and_leave();
|
return restore_ubl_active_state_and_leave();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -783,20 +783,14 @@
|
|||||||
);
|
);
|
||||||
z_values[best.pos.x][best.pos.y] = measured_z;
|
z_values[best.pos.x][best.pos.y] = measured_z;
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
ExtUI::onMeshUpdate(best.pos, measured_z);
|
ExtUI::onMeshUpdate(best, measured_z);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
|
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
|
||||||
|
|
||||||
} while (best.pos.x >= 0 && --count);
|
} while (best.pos.x >= 0 && --count);
|
||||||
|
|
||||||
#if HAS_LCD_MENU
|
STOW_PROBE();
|
||||||
ui.release();
|
|
||||||
#endif
|
|
||||||
STOW_PROBE(); // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW
|
|
||||||
#if HAS_LCD_MENU
|
|
||||||
ui.capture();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Z_AFTER_PROBING
|
#ifdef Z_AFTER_PROBING
|
||||||
move_z_after_probing();
|
move_z_after_probing();
|
||||||
@@ -855,9 +849,7 @@
|
|||||||
static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
|
static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
|
||||||
|
|
||||||
float unified_bed_leveling::measure_business_card_thickness(float in_height) {
|
float unified_bed_leveling::measure_business_card_thickness(float in_height) {
|
||||||
#if HAS_LCD_MENU
|
ui.capture();
|
||||||
ui.capture();
|
|
||||||
#endif
|
|
||||||
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
|
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
|
||||||
|
|
||||||
do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
|
do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
|
||||||
@@ -896,9 +888,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) {
|
void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) {
|
||||||
#if HAS_LCD_MENU
|
|
||||||
ui.capture();
|
ui.capture();
|
||||||
#endif
|
|
||||||
|
|
||||||
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
||||||
do_blocking_move_to_xy_z(current_position, z_clearance);
|
do_blocking_move_to_xy_z(current_position, z_clearance);
|
||||||
@@ -926,9 +917,7 @@
|
|||||||
do_blocking_move_to_z(z_clearance);
|
do_blocking_move_to_z(z_clearance);
|
||||||
|
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
#if HAS_LCD_MENU
|
ui.capture();
|
||||||
ui.capture();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
|
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
|
||||||
|
|
||||||
@@ -995,9 +984,8 @@
|
|||||||
save_ubl_active_state_and_disable();
|
save_ubl_active_state_and_disable();
|
||||||
|
|
||||||
LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
|
LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
|
||||||
#if HAS_LCD_MENU
|
ui.capture(); // Take over control of the LCD encoder
|
||||||
ui.capture(); // Take over control of the LCD encoder
|
|
||||||
#endif
|
|
||||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
|
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
|
||||||
|
|
||||||
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
|
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
|
||||||
@@ -1347,7 +1335,7 @@
|
|||||||
if (!isnan(v2)) {
|
if (!isnan(v2)) {
|
||||||
z_values[x][y] = v1 < v2 ? v1 : v1 + v1 - v2;
|
z_values[x][y] = v1 < v2 ? v1 : v1 + v1 - v2;
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
ExtUI::onMeshUpdate(x, y, z_values[x][y]);
|
ExtUI::onMeshUpdate(x, y, z_values[pos.x][pos.y]);
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1397,8 +1385,17 @@
|
|||||||
dx = (x_max - x_min) / (g29_grid_size - 1),
|
dx = (x_max - x_min) / (g29_grid_size - 1),
|
||||||
dy = (y_max - y_min) / (g29_grid_size - 1);
|
dy = (y_max - y_min) / (g29_grid_size - 1);
|
||||||
|
|
||||||
xy_float_t points[3];
|
const vector_3 points[3] = {
|
||||||
get_three_probe_points(points);
|
#if ENABLED(HAS_FIXED_3POINT)
|
||||||
|
{ PROBE_PT_1_X, PROBE_PT_1_Y, 0 },
|
||||||
|
{ PROBE_PT_2_X, PROBE_PT_2_Y, 0 },
|
||||||
|
{ PROBE_PT_3_X, PROBE_PT_3_Y, 0 }
|
||||||
|
#else
|
||||||
|
{ x_min, y_min, 0 },
|
||||||
|
{ x_max, y_min, 0 },
|
||||||
|
{ (x_max - x_min) / 2, y_max, 0 }
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
float measured_z;
|
float measured_z;
|
||||||
bool abort_flag = false;
|
bool abort_flag = false;
|
||||||
@@ -1507,20 +1504,18 @@
|
|||||||
|
|
||||||
abort_flag = isnan(measured_z);
|
abort_flag = isnan(measured_z);
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
if (DEBUGGING(LEVELING)) {
|
||||||
if (DEBUGGING(LEVELING)) {
|
const xy_pos_t lpos = rpos.asLogical();
|
||||||
const xy_pos_t lpos = rpos.asLogical();
|
DEBUG_CHAR('(');
|
||||||
DEBUG_CHAR('(');
|
DEBUG_ECHO_F(rpos.x, 7);
|
||||||
DEBUG_ECHO_F(rpos.x, 7);
|
DEBUG_CHAR(',');
|
||||||
DEBUG_CHAR(',');
|
DEBUG_ECHO_F(rpos.y, 7);
|
||||||
DEBUG_ECHO_F(rpos.y, 7);
|
DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7);
|
||||||
DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7);
|
DEBUG_CHAR(',');
|
||||||
DEBUG_CHAR(',');
|
DEBUG_ECHO_F(lpos.y, 7);
|
||||||
DEBUG_ECHO_F(lpos.y, 7);
|
DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7);
|
||||||
DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7);
|
DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7);
|
||||||
DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7);
|
}
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
measured_z -= get_z_correction(rpos) /* + probe_offset.z */ ;
|
measured_z -= get_z_correction(rpos) /* + probe_offset.z */ ;
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ private:
|
|||||||
static bool file_open(char* filename) {
|
static bool file_open(char* filename) {
|
||||||
if (!dummy_transfer) {
|
if (!dummy_transfer) {
|
||||||
card.mount();
|
card.mount();
|
||||||
card.openFileWrite(filename);
|
card.openFile(filename, false);
|
||||||
if (!card.isFileOpen()) return false;
|
if (!card.isFileOpen()) return false;
|
||||||
}
|
}
|
||||||
transfer_active = true;
|
transfer_active = true;
|
||||||
|
|||||||
@@ -42,13 +42,6 @@ void CancelObject::set_active_object(const int8_t obj) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
skipping = false;
|
skipping = false;
|
||||||
|
|
||||||
#if HAS_DISPLAY
|
|
||||||
if (active_object >= 0)
|
|
||||||
ui.status_printf_P(0, PSTR(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object + 1));
|
|
||||||
else
|
|
||||||
ui.reset_status();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CancelObject::cancel_object(const int8_t obj) {
|
void CancelObject::cancel_object(const int8_t obj) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user