Compare commits
1022 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eab3a89a82 | |||
| 0640bd0282 | |||
| 21ba70d587 | |||
| dcd405275c | |||
| 99f98890c2 | |||
| 5f0026893f | |||
| 4f943a73bc | |||
| e31923be8d | |||
| 395235a529 | |||
| 55848a4bd8 | |||
| 19e768d43d | |||
| 3c7cdcdc22 | |||
| e0d487e339 | |||
| defff1e4a8 | |||
| 05a6d48753 | |||
| b12eb33feb | |||
| 00749d8ef0 | |||
| 59d047c1d7 | |||
| fb6b62a01b | |||
| 1bb5791e64 | |||
| e47316c9d3 | |||
| 88c0688961 | |||
| aa9cad0cc6 | |||
| 0950527437 | |||
| b7306ef07f | |||
| 0fc3fea8df | |||
| b5677907d0 | |||
| 6f40d57e14 | |||
| 20f6a4582d | |||
| e0dba46271 | |||
| 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 | |||
| 8dc10fb4c2 | |||
| 3571dd0ad6 | |||
| e17869ca20 | |||
| 1c3d06876e | |||
| 662105c1b6 | |||
| b8ddae61e2 | |||
| ece14af556 | |||
| b07a2aa23c | |||
| 88857e8028 | |||
| 8e808fcadc | |||
| da93a272a0 | |||
| fcd3b326e9 | |||
| 3d5b10735f | |||
| 94228d4522 | |||
| 22c968ee32 | |||
| 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 | |||
| 367e1b54ba | |||
| 41e4de62b3 | |||
| 8a184a526a | |||
| 353c23b16e | |||
| 898f48e331 | |||
| 5851c2d36f | |||
| 9c00cff898 | |||
| f9b9df2497 | |||
| 52073f21c5 | |||
| 321f98f867 | |||
| 9721c77fb9 | |||
| 36771e9492 | |||
| 3f0b38ed5d | |||
| ca9734805c | |||
| 0067bb2840 | |||
| 2b12093589 | |||
| ddfe527ff2 | |||
| 54d48130f3 | |||
| 86c024ce98 | |||
| c7b07d20f2 | |||
| 356af7dcb0 | |||
| 11a724d8fc | |||
| d29bf49b66 | |||
| e337df2e98 | |||
| c0409b85e7 | |||
| e82e9073d6 | |||
| 69d1052010 | |||
| 6127154af3 | |||
| b94a1c6b9f | |||
| 405a2132f3 | |||
| 869d7f3703 | |||
| 101ba70517 | |||
| 5e14bb61de | |||
| 4817b39d98 | |||
| 6772e33ef6 | |||
| 385f1bb9e5 | |||
| 2a31c9f2ce | |||
| 5fa61c0ad3 | |||
| b3f59ec945 | |||
| b33739d493 | |||
| a1878cd1c0 | |||
| 0a18fb735e | |||
| 30887feae3 | |||
| 257b693ab0 | |||
| ab2ac1af71 | |||
| f1843211e6 | |||
| be5ca34215 | |||
| 06541ec885 | |||
| e9c72978c7 | |||
| 96ae53cf41 | |||
| 6172f150c2 | |||
| 3be9c19f12 | |||
| 8fd58cd6dc | |||
| 75e6f72c89 | |||
| ac76101ec3 | |||
| 75e6ead5fd | |||
| 6bd63d27b5 | |||
| f54e0fc90f | |||
| 0938c62b48 | |||
| 9d95b1b4df | |||
| 35d5a7bdff | |||
| 419c8969a7 | |||
| 25a11cd485 | |||
| 7f3406d47b | |||
| 2864ef8c7f | |||
| 534bbb81ff | |||
| 3e5485de92 | |||
| 9e147e9ac4 | |||
| 8ab2e420f6 | |||
| b4c53af07d | |||
| 6440904c1c | |||
| 97c21e9007 | |||
| 82cfdd4d8f | |||
| b2822a59f9 | |||
| a7e5c1bf19 | |||
| dd66d21749 | |||
| b370906031 | |||
| 804818b4d9 | |||
| dd841a3675 | |||
| 0fd2923a9f | |||
| 8b97da0e3d | |||
| db188934d1 | |||
| 24af9e1bf4 | |||
| 8443872d10 | |||
| 6827a162bb | |||
| 43d298a324 | |||
| 3497153cf1 | |||
| 16f8c4865a | |||
| 50bfcf4c3e | |||
| 622048ffb0 | |||
| 65a36948c0 | |||
| c6509076c4 | |||
| 2cbdc0ebb6 | |||
| 650e5274c4 | |||
| ce65c13a97 | |||
| 6ef71c3d5f | |||
| 936dfb965c | |||
| ffe3013bb5 | |||
| 7ef0650504 | |||
| e948f77cf9 | |||
| 08b0456d91 | |||
| 850e404838 | |||
| 936d00dda8 | |||
| 29eef360d0 | |||
| 894608f8a3 | |||
| ff06e1a030 | |||
| 15e009b6ca | |||
| 8b0bd44b1e | |||
| bfd396c13a | |||
| 48c5f3dddf | |||
| be7a9a07c5 | |||
| dfe670247d | |||
| af83c512b8 | |||
| 4eff18854b | |||
| 14482d2f2a | |||
| 9fc72422e4 | |||
| fee696db5d | |||
| 423b0f3a1e | |||
| 283d15a8d0 | |||
| e52c1a0882 | |||
| 5b69d67da9 | |||
| 51864fd365 | |||
| dc7c95e07b | |||
| a972c060d7 | |||
| 42aa10d263 | |||
| 4718c09c48 | |||
| 21591352d7 | |||
| 890e7a16a9 | |||
| a059e95463 | |||
| d6d6043548 | |||
| 03989824fa | |||
| 851f9f5399 | |||
| b7a16e4468 | |||
| f38b8c5bf8 | |||
| 60cb2bd4e7 | |||
| 8a3bc6be4d | |||
| b0173ccdb9 | |||
| 7afafb05b8 | |||
| c45798694f | |||
| 72de280c1e | |||
| 4d98e3f0a7 | |||
| e530c67349 | |||
| 2ad3ca5d8a | |||
| 37a6833d7e | |||
| a519b093b9 | |||
| b9809ea86c | |||
| 0873c667fa | |||
| 8c2907d10f | |||
| 9af67e2446 | |||
| e5904c4df8 | |||
| 76e90b93b7 | |||
| f63f1ff12c | |||
| 00e4ced58e | |||
| 1066b17457 | |||
| e927941c06 | |||
| 68aea9c01d | |||
| aaacef9441 | |||
| 4bc79ec877 | |||
| 186580b55f | |||
| 6be369f3ea | |||
| 7fc31a7940 | |||
| 11e376e920 | |||
| a3aa798f6d | |||
| 2065591daf | |||
| 61be28133d | |||
| 9248a90a4c | |||
| ce834bb78e | |||
| 5ef1e5ef60 | |||
| c7732db99d | |||
| f713f25fa5 | |||
| 2cb308fb53 | |||
| fc9ce65095 | |||
| 504d26341a | |||
| c6d430670a | |||
| 11c589c3ec | |||
| 678914be25 | |||
| d3bc877007 | |||
| 700549ee5d | |||
| ef94ddf53c | |||
| 3efe4aeef8 | |||
| 28deff01b8 | |||
| cca1cca3a5 | |||
| a2babb532d | |||
| 8c34233452 | |||
| b8066fb36f | |||
| 20f6676d63 | |||
| c28749a567 | |||
| df87278fce | |||
| 4be8d7720e | |||
| 760bf49a00 | |||
| 567941e341 | |||
| 57fff2e95e | |||
| 94c965fad6 | |||
| 6a3967ee33 | |||
| 534bffa7a9 | |||
| e1e1a0c344 | |||
| ab79933d1f | |||
| 69297b2d7b | |||
| 015839fc50 | |||
| d609489b22 | |||
| 167169e1bf | |||
| 395a9f59ac | |||
| 14663efe0d | |||
| ae5923a3d0 | |||
| 859248433f | |||
| 09c90c2f6c | |||
| 41e0955c27 | |||
| 232a10410d | |||
| 76c92a1fab | |||
| 312f63dbe8 | |||
| cf96109056 | |||
| dcec7178d1 | |||
| 3e78a01262 | |||
| 2ff967f3e6 | |||
| 1ff7d10c80 | |||
| 4cb45c10dd | |||
| abd6ba62b4 | |||
| f17bae1f70 | |||
| 8e0f3b7eba | |||
| 009a6104c5 | |||
| fcceed5be6 | |||
| 457489d7ac | |||
| 30b327d24c | |||
| 6c97c5595c | |||
| 553d5ca283 | |||
| e6e3132f79 | |||
| cd2ac3b759 | |||
| bfbf5f8200 | |||
| 814925d692 | |||
| 406ef69702 | |||
| 379926961c | |||
| 5b03f23fa2 | |||
| e3cedfa0ec | |||
| bb0508b6cf | |||
| 5c1888467f | |||
| 85777a56c6 | |||
| d1e8d4cd9d | |||
| 797d6a97e7 | |||
| b492e0878d | |||
| 98d362c2da | |||
| 80abc872f3 | |||
| e90cbf5c16 | |||
| ada836db29 | |||
| fc140c4962 | |||
| f4246dc8ff | |||
| 66faedb2b8 | |||
| bd776df8c1 | |||
| 05449cf6ee | |||
| 12f092c812 | |||
| 941943c167 | |||
| 5b11b33854 | |||
| a4a587a897 | |||
| ba1706a265 | |||
| c2c8aafda2 | |||
| 627afb29df | |||
| 61d00d8990 | |||
| f0f9fb7465 | |||
| 99592c8458 | |||
| 31514f453a | |||
| 134116b874 | |||
| 89c6e92b66 | |||
| e80958b631 | |||
| fe7e890b09 | |||
| a1632cfa0a | |||
| e687782875 | |||
| 1446b5f01d | |||
| efc6a9c1b8 | |||
| b3c36c98fd | |||
| 3c7bfe798d | |||
| 9651d01e1a | |||
| eb314373bb | |||
| 6c45fa7dcc | |||
| ece89bcf7a | |||
| afbc6e3e2f | |||
| 1e47c17b46 | |||
| ebe6719e12 | |||
| 80a232419d | |||
| 5fb0d401eb | |||
| ed04d0b6be | |||
| 786cdea124 | |||
| ee7163fd3a | |||
| a9f8e518bf | |||
| a18324bc8d | |||
| 254a11b083 | |||
| aeb6d465a4 | |||
| 325f09ea6c | |||
| d26c8cc5c8 | |||
| c7f04fbcc7 | |||
| 4171520729 | |||
| 41bfff14e2 | |||
| 424d0bae8b | |||
| 5c59ee4e93 | |||
| 37bc0fce62 | |||
| d5368461f9 | |||
| e907654d6a | |||
| 6c45d0fd81 | |||
| 8a51e2960c | |||
| 725d9d9a56 | |||
| 499bb85a95 | |||
| 90f5f82926 | |||
| 0c616700f3 | |||
| 6dcf42f1a7 | |||
| a1c65fd3d5 | |||
| 7b79f443ef | |||
| 907cafcbfd | |||
| 17f69f8ca2 | |||
| cfcd069501 | |||
| b8b7ef1902 | |||
| 42f7f9e013 | |||
| 0b49bddec2 | |||
| 7e028ec429 | |||
| 2e26a7c752 | |||
| 2e1b7d3a22 | |||
| 4c3dc8bf07 | |||
| 4857a3ba48 | |||
| 3d24c329af | |||
| 311f6aff72 | |||
| 8fb30aaed6 | |||
| 6cb9bb27fe | |||
| 43a95ae5ad | |||
| dd1a84b23f | |||
| d4270f15a9 | |||
| c61c0a9aeb | |||
| 062131554f | |||
| 3d043976f7 | |||
| 93da4e83f7 | |||
| 43c96eb31f | |||
| 7c95f762f2 | |||
| 92eb55f246 | |||
| 428be27893 | |||
| 8d5a37fb3d | |||
| 7769a22064 | |||
| d9da126776 | |||
| 499d5c3b24 | |||
| 7164fd499e | |||
| c10d763d98 | |||
| 4ebff8eaa5 | |||
| 09bc34f4dc | |||
| 4414825e0d | |||
| 50c2702ba5 | |||
| 9dda022705 | |||
| b3338ccb01 | |||
| 40bb0cbf7a | |||
| 26d20ebcfc | |||
| 824f71d503 | |||
| 445227c807 | |||
| 699aa35df6 | |||
| 570722a0fe | |||
| 0bc66bf22c | |||
| 896dfa0577 | |||
| e47029199e | |||
| 8326c1c279 | |||
| 979a6a6459 | |||
| 07f8da36d2 | |||
| dce665a083 | |||
| 7b09ab6bda | |||
| 5bdb4bbc5e | |||
| 634b7fa7d4 | |||
| 772275ab0c | |||
| 11e28f389e | |||
| 21217d53df | |||
| da8e946efb | |||
| dde8bb7c8b | |||
| 83263076dc | |||
| ec61b07836 | |||
| 57a51fd5db | |||
| fc89de6d8b | |||
| 6c9b5ab8e8 | |||
| 92011e3d8c | |||
| 7864b133a8 | |||
| 0b6b7c9c7e | |||
| f17a3c2474 | |||
| 5a72b6818e | |||
| 4cc5444144 | |||
| 51bc50214a | |||
| 748bf32388 | |||
| 5426fc1735 | |||
| 87d8223251 | |||
| b378deaf89 | |||
| f4b76b1ee7 | |||
| e94f79ccea | |||
| d91710e9aa | |||
| 761df686bd | |||
| 897bc2ac1f | |||
| 1c107b3949 | |||
| 5b270417ed | |||
| 2f55870edb | |||
| f7dacd1f50 | |||
| 28d72f48f1 | |||
| 76a610cf81 | |||
| 8d1d9040b6 | |||
| a17ffe1ece | |||
| 731c8e6372 | |||
| abb6b8ad54 | |||
| c2eff60d3f | |||
| 1419126721 | |||
| a453be7357 | |||
| 1d615e0a67 | |||
| 707707d71a | |||
| e556ab1dff | |||
| a27b08e6af | |||
| dac29e0f75 | |||
| 9128d9ab45 | |||
| 6bb05c4543 | |||
| b7dc4d9973 | |||
| c9e3caf928 | |||
| 4134a6b526 | |||
| 36cc03a9b4 | |||
| 2a41f0ff84 | |||
| e6d10f6ddd | |||
| 97e13a30ba | |||
| 45c74406cf | |||
| e1c5a43247 | |||
| efc198f952 | |||
| 7f0945d2b1 | |||
| 4406fba994 | |||
| 19b62c14f0 | |||
| d28f5d8a78 | |||
| 5d5ff36446 | |||
| b88957e0d4 | |||
| dd071a4a65 | |||
| 8db1197c9b | |||
| 82e662fc69 | |||
| 2c2b991b59 | |||
| 0dd0033b33 | |||
| ba0bd33c38 | |||
| 04b07a6ecc | |||
| eb8af486d2 | |||
| bfe7fbe5c0 | |||
| 61db0fd102 |
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [marlinfirmware@github.com](mailto:marlinfirmware@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: https://contributor-covenant.org
|
||||
[version]: https://contributor-covenant.org/version/1/4/
|
||||
@@ -0,0 +1,144 @@
|
||||
# Contributing to Marlin
|
||||
|
||||
Thanks for your interest in contributing to Marlin Firmware!
|
||||
|
||||
The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request.
|
||||
|
||||
#### Table Of Contents
|
||||
|
||||
[Code of Conduct](#code-of-conduct)
|
||||
|
||||
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
|
||||
|
||||
[How Can I Contribute?](#how-can-i-contribute)
|
||||
* [Reporting Bugs](#reporting-bugs)
|
||||
* [Suggesting Features or Changes](#suggesting-features-or-changes)
|
||||
* [Your First Code Contribution](#your-first-code-contribution)
|
||||
* [Pull Requests](#pull-requests)
|
||||
|
||||
[Styleguides](#styleguides)
|
||||
* [Git Commit Messages](#git-commit-messages)
|
||||
* [C++ Coding Standards](#c++-coding-standards)
|
||||
* [Documentation Styleguide](#documentation)
|
||||
|
||||
[Additional Notes](#additional-notes)
|
||||
* [Issue and Pull Request Labels](#issue-and-pull-request-labels)
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [marlinfirmware@github.com](mailto:marlinfirmware@github.com).
|
||||
|
||||
## I don't want to read this whole thing I just have a question!!!
|
||||
|
||||
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
|
||||
|
||||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
||||
|
||||
* [Marlin RepRap forum](http://forums.reprap.org/list.php?415)
|
||||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
||||
|
||||
If chat is more your speed, you can join the MarlinFirmware Slack team:
|
||||
|
||||
* Join the Marlin Slack Team
|
||||
* To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
|
||||
* Even though Slack is a chat service, sometimes it takes several hours for community members to respond — please be patient!
|
||||
* Use the `#general` channel for general questions or discussion about Marlin.
|
||||
* Other channels exist for certain topics. Check the channel list.
|
||||
|
||||
## How Can I Contribute?
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
|
||||
|
||||
Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster.
|
||||
|
||||
> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888.
|
||||
|
||||
#### How Do I Submit A (Good) Bug Report?
|
||||
|
||||
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md).
|
||||
|
||||
Explain the problem and include additional details to help maintainers reproduce the problem:
|
||||
|
||||
* **Use a clear and descriptive title** for the issue to identify the problem.
|
||||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one?
|
||||
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
|
||||
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
|
||||
* **Explain which behavior you expected to see instead and why.**
|
||||
* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`.
|
||||
* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem.
|
||||
* **Include G-code** (if relevant) that reliably causes the problem to show itself.
|
||||
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
||||
|
||||
Provide more context:
|
||||
|
||||
* **Can you reproduce the problem with a minimum of options enabled?**
|
||||
* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem?
|
||||
* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases).
|
||||
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
||||
|
||||
Include details about your configuration and environment:
|
||||
|
||||
* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled).
|
||||
* **What kind of 3D Printer and electronics are you using**?
|
||||
* **What kind of add-ons (probe, filament sensor) do you have**?
|
||||
* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply.
|
||||
|
||||
### Suggesting Features or Changes
|
||||
|
||||
This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
|
||||
|
||||
Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed.
|
||||
|
||||
#### Before Submitting a Feature Request
|
||||
|
||||
* **Check the [Marlin website](http://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](http://marlinfw.org/docs/configuration/configuration.html).
|
||||
* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
|
||||
#### How Do I Submit A (Good) Feature Request?
|
||||
|
||||
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request:
|
||||
|
||||
* **Use a clear and descriptive title** for the issue to identify the suggestion.
|
||||
* **Provide a step-by-step description of the suggested feature** in as many details as possible.
|
||||
* **Provide specific examples to demonstrate the steps**.
|
||||
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
|
||||
* **Include screenshots and links to videos** which demonstrate the steps or point out the part of Marlin which the suggestion is related to.
|
||||
* **Explain why this feature would be useful** to most Marlin users.
|
||||
* **Name other firmwares that have this feature.**
|
||||
|
||||
### Your First Code Contribution
|
||||
|
||||
Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues:
|
||||
|
||||
* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two.
|
||||
* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`).
|
||||
|
||||
* Fill in [the required template](pull_request_template.md).
|
||||
* Do not include issue numbers in the PR title.
|
||||
* Include screenshots and links to videos in your Pull Request whenever possible.
|
||||
* Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website.
|
||||
* Document new code with clear and concise comments.
|
||||
* End all files with a newline.
|
||||
|
||||
## Styleguides
|
||||
|
||||
### Git Commit Messages
|
||||
|
||||
* Use the present tense ("Add feature" not "Added feature")
|
||||
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
|
||||
* Limit the first line to 72 characters or less
|
||||
* Reference issues and Pull Requests liberally after the first line
|
||||
|
||||
### C++ Coding Standards
|
||||
|
||||
* Please read and follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
|
||||
|
||||
### Documentation
|
||||
|
||||
* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point.
|
||||
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
|
||||
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
|
||||
|
||||
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use the Marlin Firmware forum at http://forums.reprap.org/list.php?415 or the Marlin Facebook Group https://www.facebook.com/groups/1049718498464482/.
|
||||
|
||||
Before filing an issue be sure to test the 1.1 and/or 2.0 "bugfix" branches to see whether the issue is already addressed.
|
||||
|
||||
-->
|
||||
|
||||
### Description
|
||||
|
||||
<!-- Description of the bug or requested feature -->
|
||||
|
||||
### Steps to Reproduce
|
||||
|
||||
<!-- If this is a Bug Report, please describe the steps needed to reproduce the issue -->
|
||||
|
||||
1. [First Step]
|
||||
2. [Second Step]
|
||||
3. [and so on...]
|
||||
|
||||
**Expected behavior:** [What you expect to happen]
|
||||
|
||||
**Actual behavior:** [What actually happens]
|
||||
|
||||
#### Additional Information
|
||||
|
||||
* Include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
|
||||
* Provide pictures or links to videos that clearly demonstrate the issue.
|
||||
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
|
||||
@@ -0,0 +1,19 @@
|
||||
### Requirements
|
||||
|
||||
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
|
||||
|
||||
### Description
|
||||
|
||||
<!--
|
||||
|
||||
We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
|
||||
|
||||
-->
|
||||
|
||||
### Benefits
|
||||
|
||||
<!-- What does this fix or improve? -->
|
||||
|
||||
### Related Issues
|
||||
|
||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
||||
+11
-4
@@ -118,16 +118,23 @@ tags
|
||||
|
||||
# PlatformIO files/dirs
|
||||
.pio*
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
lib/readme.txt
|
||||
|
||||
#Visual Studio
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
Marlin/Release/
|
||||
Marlin/Debug/
|
||||
Marlin/__vm/
|
||||
Marlin/.vs/
|
||||
Release/
|
||||
Debug/
|
||||
__vm/
|
||||
.vs/
|
||||
vc-fileutils.settings
|
||||
|
||||
#VScode
|
||||
.vscode
|
||||
.vscode/c_cpp_properties.json
|
||||
|
||||
#cmake
|
||||
CMakeLists.txt
|
||||
|
||||
+107
-161
@@ -1,4 +1,6 @@
|
||||
---
|
||||
dist: trusty
|
||||
sudo: true
|
||||
#
|
||||
language: c
|
||||
#
|
||||
notifications:
|
||||
@@ -11,7 +13,7 @@ before_install:
|
||||
#
|
||||
# Publish the buildroot script folder
|
||||
- chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
|
||||
- ln -s ${TRAVIS_BUILD_DIR}/buildroot/bin/ ~/bin
|
||||
- export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
|
||||
#
|
||||
# Start fb X server
|
||||
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
|
||||
@@ -50,6 +52,14 @@ install:
|
||||
- git clone https://github.com/teemuatlut/TMC2130Stepper.git
|
||||
- sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
|
||||
#
|
||||
# Install: TMC2208 Stepper Motor Controller library
|
||||
- git clone https://github.com/teemuatlut/TMC2208Stepper.git
|
||||
- sudo mv TMC2208Stepper /usr/local/share/arduino/libraries/TMC2208Stepper
|
||||
#
|
||||
# Install: Adafruit Neopixel library
|
||||
- git clone https://github.com/adafruit/Adafruit_NeoPixel.git
|
||||
- sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
|
||||
#
|
||||
before_script:
|
||||
#
|
||||
# Change current working directory to the build dir
|
||||
@@ -71,16 +81,74 @@ script:
|
||||
#
|
||||
- build_marlin
|
||||
#
|
||||
# Test heated bed temperature sensor
|
||||
#
|
||||
- opt_set TEMP_SENSOR_BED 1
|
||||
- build_marlin
|
||||
#
|
||||
# Test 2 extruders on basic RAMPS 1.4
|
||||
# Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
|
||||
# Test a "Fix Mounted" Probe with Safe Homing, some arc options,
|
||||
# linear bed leveling, M48, leveling debug, and firmware retraction.
|
||||
#
|
||||
- opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
|
||||
- opt_set EXTRUDERS 2
|
||||
- opt_set TEMP_SENSOR_0 -2
|
||||
- opt_set TEMP_SENSOR_1 1
|
||||
- opt_set TEMP_SENSOR_BED 1
|
||||
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
|
||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
|
||||
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
|
||||
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
|
||||
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
|
||||
- opt_set ABL_GRID_POINTS_X 16
|
||||
- opt_set ABL_GRID_POINTS_Y 16
|
||||
- opt_set_adv FANMUX0_PIN 53
|
||||
- build_marlin
|
||||
#
|
||||
# Test a probeless build of AUTO_BED_LEVELING_UBL
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL
|
||||
- opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING NANODLP_Z_SYNC
|
||||
- build_marlin
|
||||
#
|
||||
# Add a Sled Z Probe, use UBL Cartesian moves
|
||||
#
|
||||
- opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
|
||||
- opt_disable SEGMENT_LEVELED_MOVES
|
||||
- opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
|
||||
- build_marlin
|
||||
#
|
||||
# Test a Servo Probe
|
||||
# ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
- opt_set NUM_SERVOS 1
|
||||
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
|
||||
- opt_enable_adv NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
|
||||
- build_marlin
|
||||
#
|
||||
# Test MESH_BED_LEVELING feature, with LCD
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
# Test MINIRAMBO for PWM_MOTOR_CURRENT
|
||||
# PROBE_MANUALLY feature, with LCD support,
|
||||
# ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
|
||||
# PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
|
||||
# Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
|
||||
# ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
|
||||
# EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
|
||||
# INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
|
||||
#
|
||||
- restore_configs
|
||||
- opt_set MOTHERBOARD BOARD_MINIRAMBO
|
||||
- opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
|
||||
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
|
||||
- opt_enable ULTIMAKERCONTROLLER SDSUPPORT
|
||||
- opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 USE_XMAX_PLUG
|
||||
- opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
|
||||
- opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
|
||||
- opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
|
||||
- opt_set_adv I2C_SLAVE_ADDRESS 63
|
||||
- build_marlin
|
||||
#
|
||||
# Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
|
||||
@@ -96,74 +164,6 @@ script:
|
||||
- opt_enable_adv LIN_ADVANCE
|
||||
- build_marlin
|
||||
#
|
||||
# Test PIDTEMPBED
|
||||
#
|
||||
- restore_configs
|
||||
- opt_set TEMP_SENSOR_BED 1
|
||||
- opt_enable PIDTEMPBED
|
||||
- build_marlin
|
||||
#
|
||||
# Test MAX6675
|
||||
#
|
||||
- restore_configs
|
||||
- opt_set TEMP_SENSOR_0 -2
|
||||
- build_marlin
|
||||
#
|
||||
# Test a "Fix Mounted" Probe along with Safe Homing
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable FIX_MOUNTED_PROBE Z_SAFE_HOMING
|
||||
- build_marlin
|
||||
#
|
||||
# ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE
|
||||
#
|
||||
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
|
||||
- opt_set ABL_GRID_POINTS_X 16
|
||||
- opt_set ABL_GRID_POINTS_Y 16
|
||||
- build_marlin
|
||||
#
|
||||
# Test a simple build of AUTO_BED_LEVELING_UBL
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT FIX_MOUNTED_PROBE EEPROM_SETTINGS G3D_PANEL
|
||||
- opt_enable_adv CUSTOM_USER_MENUS
|
||||
- build_marlin
|
||||
#
|
||||
# Test a Sled Z Probe
|
||||
# ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable Z_PROBE_SLED AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
|
||||
- build_marlin
|
||||
#
|
||||
# Test a Servo Probe
|
||||
# ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
- opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
|
||||
- opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP
|
||||
- build_marlin
|
||||
#
|
||||
# Test MESH_BED_LEVELING feature, with LCD
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
# Test PROBE_MANUALLY feature, with LCD support
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR LCD_BED_LEVELING ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
# Test EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
|
||||
# INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
|
||||
- build_marlin
|
||||
#
|
||||
# Mixing Extruder with 5 steppers
|
||||
#
|
||||
- restore_configs
|
||||
@@ -201,77 +201,31 @@ script:
|
||||
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
# Test MINIRAMBO for PWM_MOTOR_CURRENT
|
||||
#
|
||||
- restore_configs
|
||||
- opt_set MOTHERBOARD BOARD_MINIRAMBO
|
||||
- build_marlin
|
||||
#
|
||||
# Test FILAMENT_CHANGE_FEATURE, PARK_HEAD_ON_PAUSE, and LCD_INFO_MENU
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable ULTIMAKERCONTROLLER
|
||||
- opt_enable_adv FILAMENT_CHANGE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
|
||||
- build_marlin
|
||||
#
|
||||
# Enable filament sensor
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable FILAMENT_WIDTH_SENSOR
|
||||
- build_marlin
|
||||
#
|
||||
# Enable filament sensor with LCD display
|
||||
#
|
||||
- opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY
|
||||
- build_marlin
|
||||
#
|
||||
# Enable BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS, and I2C_SLAVE_ADDRESS
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
|
||||
- opt_set_adv I2C_SLAVE_ADDRESS 63
|
||||
- build_marlin
|
||||
#
|
||||
# Enable COREXY
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable COREXY
|
||||
- build_marlin
|
||||
#
|
||||
# Enable COREYX (swapped)
|
||||
# Test many less common options
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable COREYX
|
||||
- opt_set_adv FAN_MIN_PWM 50
|
||||
- opt_set_adv FAN_KICKSTART_TIME 100
|
||||
- opt_set_adv XY_FREQUENCY_LIMIT 15
|
||||
- opt_enable_adv SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME
|
||||
- opt_enable_adv ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED ADVANCED_OK
|
||||
- opt_enable_adv VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL
|
||||
- opt_enable_adv EXTRA_FAN_SPEED FWERETRACT Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
|
||||
- opt_enable_adv MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
|
||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
- opt_enable FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR
|
||||
- opt_enable ENDSTOP_INTERRUPTS_FEATURE FAN_SOFT_PWM SDSUPPORT
|
||||
- opt_enable USE_XMAX_PLUG
|
||||
- build_marlin
|
||||
#
|
||||
# Enable Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
|
||||
- pins_set RAMPS X_MAX_PIN -1
|
||||
- opt_set_adv Z2_MAX_PIN 2
|
||||
- build_marlin
|
||||
#
|
||||
# Test PRINTCOUNTER
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable PRINTCOUNTER
|
||||
- build_marlin
|
||||
#
|
||||
# Test NOZZLE_PARK_FEATURE
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable NOZZLE_PARK_FEATURE
|
||||
- build_marlin
|
||||
#
|
||||
# Test NOZZLE_CLEAN_FEATURE
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable NOZZLE_CLEAN_FEATURE
|
||||
- build_marlin
|
||||
#
|
||||
#
|
||||
######## STANDARD LCD/PANELS ##############
|
||||
######## Other Standard LCD/Panels ##############
|
||||
#
|
||||
# ULTRA_LCD
|
||||
#
|
||||
@@ -285,12 +239,6 @@ script:
|
||||
- opt_enable DOGLCD
|
||||
- build_marlin
|
||||
#
|
||||
# ULTIMAKERCONTROLLER
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
# MAKRPANEL
|
||||
# Needs to use Melzi and Sanguino hardware
|
||||
#
|
||||
@@ -298,31 +246,29 @@ script:
|
||||
#- opt_enable MAKRPANEL
|
||||
#- build_marlin
|
||||
#
|
||||
# REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, and BABYSTEPPING
|
||||
# REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING
|
||||
- opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
|
||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
|
||||
- build_marlin
|
||||
#
|
||||
# G3D_PANEL
|
||||
# G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable G3D_PANEL SDSUPPORT
|
||||
- build_marlin
|
||||
#
|
||||
# Add SDCARD_SORT_ALPHA, test G3D_PANEL again
|
||||
#
|
||||
- opt_enable_adv SDCARD_SORT_ALPHA
|
||||
- opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
|
||||
- opt_set_adv SDSORT_GCODE true
|
||||
- opt_set_adv SDSORT_USES_RAM true
|
||||
- opt_set_adv SDSORT_USES_STACK true
|
||||
- opt_set_adv SDSORT_CACHE_NAMES true
|
||||
- build_marlin
|
||||
#
|
||||
# REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
# REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
|
||||
- opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
|
||||
- build_marlin
|
||||
#
|
||||
# REPRAPWORLD_KEYPAD
|
||||
@@ -372,12 +318,11 @@ script:
|
||||
######## Example Configurations ##############
|
||||
#
|
||||
# BQ Hephestos 2
|
||||
- restore_configs
|
||||
- use_example_configs Hephestos_2
|
||||
- build_marlin
|
||||
#- restore_configs
|
||||
#- use_example_configs Hephestos_2
|
||||
#- build_marlin
|
||||
#
|
||||
# Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
|
||||
- restore_configs
|
||||
- use_example_configs delta/generic
|
||||
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
|
||||
- build_marlin
|
||||
@@ -386,7 +331,7 @@ script:
|
||||
#
|
||||
- use_example_configs delta/generic
|
||||
- opt_disable DISABLE_MIN_ENDSTOPS
|
||||
- opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2
|
||||
- opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
|
||||
- build_marlin
|
||||
#
|
||||
# Delta Config (FLSUN AC because it's complex)
|
||||
@@ -399,18 +344,19 @@ script:
|
||||
#- use_example_configs makibox
|
||||
#- build_marlin
|
||||
#
|
||||
# SCARA Config
|
||||
# SCARA with TMC2130
|
||||
#
|
||||
- use_example_configs SCARA
|
||||
- opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
|
||||
- opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
|
||||
- opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG SENSORLESS_HOMING
|
||||
- build_marlin
|
||||
#
|
||||
# TMC2130 Config
|
||||
# TMC2208 Config
|
||||
#
|
||||
- restore_configs
|
||||
- opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
|
||||
- build_marlin
|
||||
- opt_enable_adv AUTOMATIC_CURRENT_CONTROL STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING
|
||||
- opt_enable_adv HAVE_TMC2208 X_IS_TMC2208 Y_IS_TMC2208 Z_IS_TMC2208
|
||||
- opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG
|
||||
- build_marlin
|
||||
#
|
||||
# tvrrug Config need to check board type for sanguino atmega644p
|
||||
|
||||
+173
-98
@@ -31,48 +31,115 @@
|
||||
#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
|
||||
|
||||
#if ENABLED(CARTESIO_UI)
|
||||
|
||||
#define DOGLCD
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#define DEFAULT_LCD_CONTRAST 90
|
||||
#define LCD_CONTRAST_MIN 60
|
||||
#define LCD_CONTRAST_MAX 140
|
||||
#endif
|
||||
|
||||
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
||||
#define DOGLCD
|
||||
#elif ENABLED(MAKRPANEL)
|
||||
|
||||
#define U8GLIB_ST7565_64128N
|
||||
|
||||
#elif ENABLED(ZONESTAR_LCD)
|
||||
|
||||
#define REPRAPWORLD_KEYPAD
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
|
||||
#define ADC_KEYPAD
|
||||
#define ADC_KEY_NUM 8
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#define DEFAULT_LCD_CONTRAST 17
|
||||
#endif
|
||||
|
||||
#if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
// this helps to implement ADC_KEYPAD menus
|
||||
#define ENCODER_PULSES_PER_STEP 1
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define ENCODER_FEEDRATE_DEADZONE 2
|
||||
#define REVERSE_MENU_DIRECTION
|
||||
|
||||
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
|
||||
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
#elif ENABLED(BQ_LCD_SMART_CONTROLLER)
|
||||
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
|
||||
#define ULTRA_LCD //general LCD support, also 16x2
|
||||
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
|
||||
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
||||
|
||||
#if ENABLED(miniVIKI)
|
||||
#define LCD_CONTRAST_MIN 75
|
||||
#define LCD_CONTRAST_MAX 115
|
||||
#define DEFAULT_LCD_CONTRAST 95
|
||||
#define LCD_CONTRAST_MIN 75
|
||||
#define LCD_CONTRAST_MAX 115
|
||||
#define DEFAULT_LCD_CONTRAST 95
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#elif ENABLED(VIKI2)
|
||||
#define DEFAULT_LCD_CONTRAST 40
|
||||
#define LCD_CONTRAST_MIN 0
|
||||
#define LCD_CONTRAST_MAX 255
|
||||
#define DEFAULT_LCD_CONTRAST 140
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#define LCD_CONTRAST_MIN 90
|
||||
#define LCD_CONTRAST_MAX 130
|
||||
#define LCD_CONTRAST_MIN 90
|
||||
#define LCD_CONTRAST_MAX 130
|
||||
#define DEFAULT_LCD_CONTRAST 110
|
||||
#define U8GLIB_LM6059_AF
|
||||
#define SD_DETECT_INVERTED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#elif ENABLED(OLED_PANEL_TINYBOY2)
|
||||
|
||||
#if ENABLED(OLED_PANEL_TINYBOY2)
|
||||
#define U8GLIB_SSD1306
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#define REVERSE_ENCODER_DIRECTION
|
||||
#define REVERSE_MENU_DIRECTION
|
||||
|
||||
#elif ENABLED(RA_CONTROL_PANEL)
|
||||
|
||||
#define LCD_I2C_TYPE_PCA8574
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
#define ULTIPANEL
|
||||
|
||||
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define ULTIPANEL
|
||||
|
||||
#elif ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
#ifndef ST7920_DELAY_1
|
||||
#define ST7920_DELAY_1 DELAY_2_NOP
|
||||
#endif
|
||||
#ifndef ST7920_DELAY_2
|
||||
#define ST7920_DELAY_2 DELAY_2_NOP
|
||||
#endif
|
||||
#ifndef ST7920_DELAY_3
|
||||
#define ST7920_DELAY_3 DELAY_2_NOP
|
||||
#endif
|
||||
|
||||
#elif ENABLED(MKS_12864OLED)
|
||||
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#define U8GLIB_SH1106
|
||||
|
||||
#elif ENABLED(MKS_12864OLED_SSD1306)
|
||||
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#define U8GLIB_SSD1306
|
||||
|
||||
#elif ENABLED(MKS_MINI_12864)
|
||||
|
||||
#define MINIPANEL
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
|
||||
#define DOGLCD
|
||||
#define ULTIPANEL
|
||||
#define DEFAULT_LCD_CONTRAST 17
|
||||
#endif
|
||||
|
||||
// Generic support for SSD1306 / SH1106 OLED based LCDs.
|
||||
@@ -82,17 +149,18 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
|
||||
|
||||
#define ULTIMAKERCONTROLLER
|
||||
|
||||
#elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
|
||||
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#define LCD_WIDTH 16
|
||||
#define LCD_HEIGHT 2
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
#ifndef LONG_FILENAME_HOST_SUPPORT
|
||||
#define LONG_FILENAME_HOST_SUPPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
@@ -103,25 +171,13 @@
|
||||
|| ENABLED(G3D_PANEL) \
|
||||
|| ENABLED(RIGIDBOT_PANEL)
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAPWORLD_KEYPAD)
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
#if ENABLED(RA_CONTROL_PANEL)
|
||||
#define LCD_I2C_TYPE_PCA8574
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
|
||||
#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -129,54 +185,72 @@
|
||||
*/
|
||||
|
||||
#if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
|
||||
// This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
|
||||
// Make sure it is placed in the Arduino libraries directory.
|
||||
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
|
||||
#define LCD_I2C_TYPE_PCF8575
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
#if ENABLED(LCD_I2C_PANELOLU2)
|
||||
#elif ENABLED(LCD_I2C_PANELOLU2)
|
||||
|
||||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
|
||||
#define LCD_I2C_TYPE_MCP23017
|
||||
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
||||
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||
#if ENABLED(LCD_I2C_VIKI)
|
||||
// This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
// Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
||||
// Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
||||
// BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
/**
|
||||
* Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||
*
|
||||
* This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
* Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
||||
* Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
||||
* BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
||||
*/
|
||||
#define LCD_I2C_TYPE_MCP23017
|
||||
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
||||
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
|
||||
#define ENCODER_FEEDRATE_DEADZONE 4
|
||||
|
||||
#ifndef ENCODER_PULSES_PER_STEP
|
||||
#define ENCODER_PULSES_PER_STEP 1
|
||||
#endif
|
||||
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 2
|
||||
#endif
|
||||
#define STD_ENCODER_PULSES_PER_STEP 1
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 2
|
||||
|
||||
#elif ENABLED(G3D_PANEL)
|
||||
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|
||||
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|
||||
|| ENABLED(OLED_PANEL_TINYBOY2) \
|
||||
|| ENABLED(BQ_LCD_SMART_CONTROLLER) \
|
||||
|| ENABLED(LCD_I2C_PANELOLU2) \
|
||||
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#endif
|
||||
|
||||
// Set encoder detents for well-known controllers
|
||||
#if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(OLED_PANEL_TINYBOY2) \
|
||||
|| ENABLED(BQ_LCD_SMART_CONTROLLER) || ENABLED(LCD_I2C_PANELOLU2) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#ifndef ENCODER_PULSES_PER_STEP
|
||||
#define ENCODER_PULSES_PER_STEP 4
|
||||
#endif
|
||||
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#endif
|
||||
#ifndef STD_ENCODER_PULSES_PER_STEP
|
||||
#define STD_ENCODER_PULSES_PER_STEP 5
|
||||
#endif
|
||||
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#endif
|
||||
#ifndef ENCODER_PULSES_PER_STEP
|
||||
#define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
|
||||
#endif
|
||||
#ifndef ENCODER_STEPS_PER_MENU_ITEM
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
|
||||
#endif
|
||||
#ifndef ENCODER_FEEDRATE_DEADZONE
|
||||
#define ENCODER_FEEDRATE_DEADZONE 6
|
||||
#endif
|
||||
|
||||
// Shift register panels
|
||||
@@ -187,7 +261,6 @@
|
||||
#if ENABLED(SAV_3DLCD)
|
||||
#define SR_LCD_2W_NL // Non latching 2 wire shift register
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
||||
#if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
|
||||
@@ -200,7 +273,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#define NEWPANEL //enable this if you have a click-encoder panel
|
||||
#define NEWPANEL // Disable this if you actually have no click-encoder panel
|
||||
#define ULTRA_LCD
|
||||
#ifndef LCD_WIDTH
|
||||
#define LCD_WIDTH 20
|
||||
@@ -208,14 +281,12 @@
|
||||
#ifndef LCD_HEIGHT
|
||||
#define LCD_HEIGHT 4
|
||||
#endif
|
||||
#else // no panel but just LCD
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
#ifndef LCD_WIDTH
|
||||
#define LCD_WIDTH 16
|
||||
#endif
|
||||
#ifndef LCD_HEIGHT
|
||||
#define LCD_HEIGHT 2
|
||||
#endif
|
||||
#elif ENABLED(ULTRA_LCD) // no panel but just LCD
|
||||
#ifndef LCD_WIDTH
|
||||
#define LCD_WIDTH 16
|
||||
#endif
|
||||
#ifndef LCD_HEIGHT
|
||||
#define LCD_HEIGHT 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -240,15 +311,15 @@
|
||||
#define LCD_STR_FILAM_DIA "\xf8"
|
||||
#define LCD_STR_FILAM_MUL "\xa4"
|
||||
#else
|
||||
/* Custom characters defined in the first 8 characters of the LCD */
|
||||
#define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
|
||||
#define LCD_STR_DEGREE "\x01"
|
||||
#define LCD_STR_THERMOMETER "\x02"
|
||||
#define LCD_STR_UPLEVEL "\x03"
|
||||
// Custom characters defined in the first 8 characters of the LCD
|
||||
#define LCD_BEDTEMP_CHAR 0x00 // Print only as a char. This will have 'unexpected' results when used in a string!
|
||||
#define LCD_DEGREE_CHAR 0x01
|
||||
#define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
|
||||
#define LCD_UPLEVEL_CHAR 0x03
|
||||
#define LCD_STR_REFRESH "\x04"
|
||||
#define LCD_STR_FOLDER "\x05"
|
||||
#define LCD_STR_FEEDRATE "\x06"
|
||||
#define LCD_STR_CLOCK "\x07"
|
||||
#define LCD_FEEDRATE_CHAR 0x06
|
||||
#define LCD_CLOCK_CHAR 0x07
|
||||
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
|
||||
#endif
|
||||
|
||||
@@ -278,12 +349,20 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOTSCREEN_TIMEOUT
|
||||
// Boot screens
|
||||
#if DISABLED(ULTRA_LCD)
|
||||
#undef SHOW_BOOTSCREEN
|
||||
#elif !defined(BOOTSCREEN_TIMEOUT)
|
||||
#define BOOTSCREEN_TIMEOUT 2500
|
||||
#endif
|
||||
|
||||
#define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
|
||||
|
||||
// MK2 Multiplexer forces SINGLENOZZLE to be enabled
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
#define SINGLENOZZLE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Extruders have some combination of stepper motors and hotends
|
||||
* so we separate these concepts into the defines:
|
||||
@@ -291,6 +370,7 @@
|
||||
* EXTRUDERS - Number of Selectable Tools
|
||||
* HOTENDS - Number of hotends, whether connected or separate
|
||||
* E_STEPPERS - Number of actual E stepper motors
|
||||
* E_MANUAL - Number of E steppers for LCD move options
|
||||
* TOOL_E_INDEX - Index to use when getting/setting the tool state
|
||||
*
|
||||
*/
|
||||
@@ -344,8 +424,10 @@
|
||||
#define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1)
|
||||
#endif
|
||||
#undef DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
#undef SERVO_DELAY
|
||||
#define SERVO_DELAY 50
|
||||
#if NUM_SERVOS == 1
|
||||
#undef SERVO_DELAY
|
||||
#define SERVO_DELAY { 50 }
|
||||
#endif
|
||||
#ifndef BLTOUCH_DELAY
|
||||
#define BLTOUCH_DELAY 375
|
||||
#endif
|
||||
@@ -376,13 +458,6 @@
|
||||
*/
|
||||
#define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
|
||||
|
||||
/**
|
||||
* UBL has its own manual probing, so this just causes trouble.
|
||||
*/
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#undef PROBE_MANUALLY
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set a flag for any enabled probe
|
||||
*/
|
||||
@@ -398,6 +473,6 @@
|
||||
|
||||
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
||||
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
||||
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED))
|
||||
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
|
||||
|
||||
#endif // CONDITIONALS_LCD_H
|
||||
|
||||
+400
-105
@@ -28,15 +28,45 @@
|
||||
#ifndef CONDITIONALS_POST_H
|
||||
#define CONDITIONALS_POST_H
|
||||
|
||||
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
|
||||
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
||||
#define IS_CARTESIAN !IS_KINEMATIC
|
||||
|
||||
/**
|
||||
* Axis lengths and center
|
||||
*/
|
||||
#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
|
||||
#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
|
||||
#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
|
||||
#define X_CENTER float((X_MIN_POS + X_MAX_POS) * 0.5)
|
||||
#define Y_CENTER float((Y_MIN_POS + Y_MAX_POS) * 0.5)
|
||||
#define Z_CENTER float((Z_MIN_POS + Z_MAX_POS) * 0.5)
|
||||
|
||||
// Defined only if the sanity-check is bypassed
|
||||
#ifndef X_BED_SIZE
|
||||
#define X_BED_SIZE X_MAX_LENGTH
|
||||
#endif
|
||||
#ifndef Y_BED_SIZE
|
||||
#define Y_BED_SIZE Y_MAX_LENGTH
|
||||
#endif
|
||||
|
||||
// Require 0,0 bed center for Delta and SCARA
|
||||
#if IS_KINEMATIC
|
||||
#define BED_CENTER_AT_0_0
|
||||
#endif
|
||||
|
||||
// Define center values for future use
|
||||
#if ENABLED(BED_CENTER_AT_0_0)
|
||||
#define X_CENTER 0
|
||||
#define Y_CENTER 0
|
||||
#else
|
||||
#define X_CENTER ((X_BED_SIZE) / 2)
|
||||
#define Y_CENTER ((Y_BED_SIZE) / 2)
|
||||
#endif
|
||||
#define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
|
||||
|
||||
// Get the linear boundaries of the bed
|
||||
#define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
|
||||
#define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
|
||||
#define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
|
||||
#define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
|
||||
|
||||
/**
|
||||
* CoreXY, CoreXZ, and CoreYZ - and their reverse
|
||||
@@ -59,16 +89,19 @@
|
||||
#define CORE_AXIS_1 B_AXIS
|
||||
#define CORE_AXIS_2 C_AXIS
|
||||
#endif
|
||||
#if (ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY))
|
||||
#if ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY)
|
||||
#define CORESIGN(n) (-(n))
|
||||
#else
|
||||
#define CORESIGN(n) (n)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
|
||||
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
||||
#define IS_CARTESIAN !IS_KINEMATIC
|
||||
/**
|
||||
* No adjustable bed on non-cartesians
|
||||
*/
|
||||
#if IS_KINEMATIC
|
||||
#undef LEVEL_BED_CORNERS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* SCARA cannot use SLOWDOWN and requires QUICKHOME
|
||||
@@ -87,11 +120,11 @@
|
||||
#if ENABLED(DELTA)
|
||||
#define X_HOME_POS 0
|
||||
#else
|
||||
#define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5)
|
||||
#define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5)
|
||||
#endif
|
||||
#else
|
||||
#if ENABLED(DELTA)
|
||||
#define X_HOME_POS (X_MIN_POS + (X_MAX_LENGTH) * 0.5)
|
||||
#define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5)
|
||||
#else
|
||||
#define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
|
||||
#endif
|
||||
@@ -103,11 +136,11 @@
|
||||
#if ENABLED(DELTA)
|
||||
#define Y_HOME_POS 0
|
||||
#else
|
||||
#define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5)
|
||||
#define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5)
|
||||
#endif
|
||||
#else
|
||||
#if ENABLED(DELTA)
|
||||
#define Y_HOME_POS (Y_MIN_POS + (Y_MAX_LENGTH) * 0.5)
|
||||
#define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5)
|
||||
#else
|
||||
#define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
|
||||
#endif
|
||||
@@ -151,10 +184,10 @@
|
||||
*/
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#ifndef Z_SAFE_HOMING_X_POINT
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
|
||||
#define Z_SAFE_HOMING_X_POINT X_CENTER
|
||||
#endif
|
||||
#ifndef Z_SAFE_HOMING_Y_POINT
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
|
||||
#define Z_SAFE_HOMING_Y_POINT Y_CENTER
|
||||
#endif
|
||||
#define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
|
||||
#define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
|
||||
@@ -170,6 +203,13 @@
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Provide a MAX_AUTORETRACT for older configs
|
||||
*/
|
||||
#if ENABLED(FWRETRACT) && !defined(MAX_AUTORETRACT)
|
||||
#define MAX_AUTORETRACT 99
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MAX_STEP_FREQUENCY differs for TOSHIBA
|
||||
*/
|
||||
@@ -187,13 +227,8 @@
|
||||
#define MICROSTEP16 HIGH,HIGH
|
||||
|
||||
/**
|
||||
* Advance calculated values
|
||||
* Override here because this is set in Configuration_adv.h
|
||||
*/
|
||||
#if ENABLED(ADVANCE)
|
||||
#define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
|
||||
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA))
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#undef SD_DETECT_INVERTED
|
||||
#endif
|
||||
@@ -343,29 +378,122 @@
|
||||
#define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__)
|
||||
#define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
|
||||
|
||||
/**
|
||||
* X_DUAL_ENDSTOPS endstop reassignment
|
||||
*/
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
#if X_HOME_DIR > 0
|
||||
#if X2_USE_ENDSTOP == _XMIN_
|
||||
#define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN X_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _XMAX_
|
||||
#define X2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN X_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMIN_
|
||||
#define X2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN Y_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMAX_
|
||||
#define X2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN Y_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMIN_
|
||||
#define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN Z_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MAX_PIN Z_MAX_PIN
|
||||
#else
|
||||
#define X2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define X2_MIN_ENDSTOP_INVERTING false
|
||||
#else
|
||||
#if X2_USE_ENDSTOP == _XMIN_
|
||||
#define X2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN X_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _XMAX_
|
||||
#define X2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN X_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMIN_
|
||||
#define X2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN Y_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMAX_
|
||||
#define X2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN Y_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMIN_
|
||||
#define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN Z_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MIN_PIN Z_MAX_PIN
|
||||
#else
|
||||
#define X2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define X2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Is an endstop plug used for the X2 endstop?
|
||||
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
|
||||
|
||||
/**
|
||||
* Y_DUAL_ENDSTOPS endstop reassignment
|
||||
*/
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#if Y_HOME_DIR > 0
|
||||
#if Y2_USE_ENDSTOP == _XMIN_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN X_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XMAX_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN X_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMIN_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN Y_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMAX_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN Y_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMIN_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN Z_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_PIN Z_MAX_PIN
|
||||
#else
|
||||
#define Y2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define Y2_MIN_ENDSTOP_INVERTING false
|
||||
#else
|
||||
#if Y2_USE_ENDSTOP == _XMIN_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN X_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XMAX_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN X_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMIN_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN Y_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMAX_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN Y_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMIN_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN Z_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_PIN Z_MAX_PIN
|
||||
#else
|
||||
#define Y2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define Y2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Is an endstop plug used for the Y2 endstop or the bed probe?
|
||||
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
|
||||
|
||||
/**
|
||||
* Z_DUAL_ENDSTOPS endstop reassignment
|
||||
*/
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define _XMIN_ 100
|
||||
#define _YMIN_ 200
|
||||
#define _ZMIN_ 300
|
||||
#define _XMAX_ 101
|
||||
#define _YMAX_ 201
|
||||
#define _ZMAX_ 301
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
#define USE_XMIN_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _XMAX_
|
||||
#define USE_XMAX_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _YMIN_
|
||||
#define USE_YMIN_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _YMAX_
|
||||
#define USE_YMAX_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _ZMIN_
|
||||
#define USE_ZMIN_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
#define USE_ZMAX_PLUG
|
||||
#endif
|
||||
#if Z_HOME_DIR > 0
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
#define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
@@ -388,6 +516,7 @@
|
||||
#else
|
||||
#define Z2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define Z2_MIN_ENDSTOP_INVERTING false
|
||||
#else
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
#define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
|
||||
@@ -410,6 +539,7 @@
|
||||
#else
|
||||
#define Z2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#define Z2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -506,12 +636,16 @@
|
||||
#define HAS_SOLENOID_4 (PIN_EXISTS(SOL4))
|
||||
|
||||
// Endstops and bed probe
|
||||
#define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X,MIN))
|
||||
#define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X,MAX))
|
||||
#define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y,MIN))
|
||||
#define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y,MAX))
|
||||
#define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z,MIN))
|
||||
#define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z,MAX))
|
||||
#define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_X2_ENDSTOP(X,MIN) && !IS_Y2_ENDSTOP(X,MIN) && !IS_Z2_OR_PROBE(X,MIN))
|
||||
#define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_X2_ENDSTOP(X,MAX) && !IS_Y2_ENDSTOP(X,MAX) && !IS_Z2_OR_PROBE(X,MAX))
|
||||
#define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_X2_ENDSTOP(Y,MIN) && !IS_Y2_ENDSTOP(Y,MIN) && !IS_Z2_OR_PROBE(Y,MIN))
|
||||
#define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_X2_ENDSTOP(Y,MAX) && !IS_Y2_ENDSTOP(Y,MAX) && !IS_Z2_OR_PROBE(Y,MAX))
|
||||
#define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_X2_ENDSTOP(Z,MIN) && !IS_Y2_ENDSTOP(Z,MIN) && !IS_Z2_OR_PROBE(Z,MIN))
|
||||
#define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_X2_ENDSTOP(Z,MAX) && !IS_Y2_ENDSTOP(Z,MAX) && !IS_Z2_OR_PROBE(Z,MAX))
|
||||
#define HAS_X2_MIN (PIN_EXISTS(X2_MIN))
|
||||
#define HAS_X2_MAX (PIN_EXISTS(X2_MAX))
|
||||
#define HAS_Y2_MIN (PIN_EXISTS(Y2_MIN))
|
||||
#define HAS_Y2_MAX (PIN_EXISTS(Y2_MAX))
|
||||
#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
|
||||
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
|
||||
#define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
|
||||
@@ -616,8 +750,18 @@
|
||||
#else
|
||||
#define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Heated bed requires settings
|
||||
*/
|
||||
#if HAS_HEATER_BED
|
||||
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v)
|
||||
#ifndef MAX_BED_POWER
|
||||
#define MAX_BED_POWER 255
|
||||
#endif
|
||||
#ifndef HEATER_BED_INVERTING
|
||||
#define HEATER_BED_INVERTING false
|
||||
#endif
|
||||
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ HEATER_BED_INVERTING)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -645,14 +789,10 @@
|
||||
#endif
|
||||
#define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
|
||||
|
||||
|
||||
/**
|
||||
* Heater & Fan Pausing
|
||||
* Part Cooling fan multipliexer
|
||||
*/
|
||||
#if FAN_COUNT == 0
|
||||
#undef PROBING_FANS_OFF
|
||||
#endif
|
||||
#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF)))
|
||||
#define HAS_FANMUX PIN_EXISTS(FANMUX0)
|
||||
|
||||
/**
|
||||
* Servos and probes
|
||||
@@ -664,9 +804,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
|
||||
|
||||
#define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY))
|
||||
#define HAS_BED_PROBE (PROBE_SELECTED && DISABLED(PROBE_MANUALLY))
|
||||
|
||||
#if ENABLED(Z_PROBE_ALLEN_KEY)
|
||||
#define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
|
||||
@@ -706,10 +844,75 @@
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* XYZ Bed Skew Correction
|
||||
*/
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
#define SKEW_FACTOR_MIN -1
|
||||
#define SKEW_FACTOR_MAX 1
|
||||
|
||||
#define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
|
||||
#define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
|
||||
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
|
||||
|
||||
#ifndef XY_SKEW_FACTOR
|
||||
constexpr float XY_SKEW_FACTOR = (
|
||||
#if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
|
||||
_SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
|
||||
#else
|
||||
0.0
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#ifndef XZ_SKEW_FACTOR
|
||||
#if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
|
||||
#define XZ_SIDE_AD XY_SIDE_AD
|
||||
#endif
|
||||
constexpr float XZ_SKEW_FACTOR = (
|
||||
#if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
|
||||
_SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
|
||||
#else
|
||||
0.0
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#ifndef YZ_SKEW_FACTOR
|
||||
constexpr float YZ_SKEW_FACTOR = (
|
||||
#if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
|
||||
_SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
|
||||
#else
|
||||
0.0
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#endif // SKEW_CORRECTION
|
||||
|
||||
/**
|
||||
* Heater & Fan Pausing
|
||||
*/
|
||||
#if FAN_COUNT == 0
|
||||
#undef PROBING_FANS_OFF
|
||||
#endif
|
||||
#define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
|
||||
#define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
|
||||
|
||||
/**
|
||||
* Only constrain Z on DELTA / SCARA machines
|
||||
*/
|
||||
#if IS_KINEMATIC
|
||||
#undef MIN_SOFTWARE_ENDSTOP_X
|
||||
#undef MIN_SOFTWARE_ENDSTOP_Y
|
||||
#undef MAX_SOFTWARE_ENDSTOP_X
|
||||
#undef MAX_SOFTWARE_ENDSTOP_Y
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Delta radius/rod trimmers/angle trimmers
|
||||
*/
|
||||
#if ENABLED(DELTA)
|
||||
#ifndef DELTA_PROBEABLE_RADIUS
|
||||
#define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
|
||||
#endif
|
||||
#ifndef DELTA_CALIBRATION_RADIUS
|
||||
#define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10
|
||||
#endif
|
||||
@@ -730,19 +933,103 @@
|
||||
/**
|
||||
* Set granular options based on the specific type of leveling
|
||||
*/
|
||||
|
||||
#define UBL_DELTA (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)))
|
||||
#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
|
||||
#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
|
||||
#define HAS_ABL (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL))
|
||||
#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING))
|
||||
#define PLANNER_LEVELING (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
|
||||
#define UBL_SEGMENTED (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(SEGMENT_LEVELED_MOVES)))
|
||||
#define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
|
||||
#define ABL_GRID (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
|
||||
#define OLDSCHOOL_ABL (ABL_PLANAR || ABL_GRID)
|
||||
#define HAS_ABL (OLDSCHOOL_ABL || ENABLED(AUTO_BED_LEVELING_UBL))
|
||||
#define HAS_LEVELING (HAS_ABL || ENABLED(MESH_BED_LEVELING))
|
||||
#define HAS_AUTOLEVEL (HAS_ABL && DISABLED(PROBE_MANUALLY))
|
||||
#define HAS_MESH (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING))
|
||||
#define PLANNER_LEVELING (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION))
|
||||
#define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
|
||||
#if HAS_PROBING_PROCEDURE
|
||||
#define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
|
||||
#define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION))
|
||||
#endif
|
||||
|
||||
#if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH)
|
||||
#define LEVELED_SEGMENT_LENGTH 5
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Bed Probing rectangular bounds
|
||||
* These can be further constrained in code for Delta and SCARA
|
||||
*/
|
||||
#if ENABLED(DELTA)
|
||||
// Probing points may be verified at compile time within the radius
|
||||
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
|
||||
// so that may be added to SanityCheck.h in the future.
|
||||
#define _MIN_PROBE_X (X_CENTER - DELTA_PRINTABLE_RADIUS)
|
||||
#define _MIN_PROBE_Y (Y_CENTER - DELTA_PRINTABLE_RADIUS)
|
||||
#define _MAX_PROBE_X (X_CENTER + DELTA_PRINTABLE_RADIUS)
|
||||
#define _MAX_PROBE_Y (Y_CENTER + DELTA_PRINTABLE_RADIUS)
|
||||
#elif IS_SCARA
|
||||
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
||||
#define _MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
|
||||
#define _MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
|
||||
#define _MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS)
|
||||
#define _MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS)
|
||||
#else
|
||||
// Boundaries for Cartesian probing based on bed limits
|
||||
#define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#endif
|
||||
|
||||
// Allow configuration to override these for special purposes
|
||||
#ifndef MIN_PROBE_X
|
||||
#define MIN_PROBE_X _MIN_PROBE_X
|
||||
#endif
|
||||
#ifndef MIN_PROBE_Y
|
||||
#define MIN_PROBE_Y _MIN_PROBE_Y
|
||||
#endif
|
||||
#ifndef MAX_PROBE_X
|
||||
#define MAX_PROBE_X _MAX_PROBE_X
|
||||
#endif
|
||||
#ifndef MAX_PROBE_Y
|
||||
#define MAX_PROBE_Y _MAX_PROBE_Y
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default mesh area is an area with an inset margin on the print area.
|
||||
*/
|
||||
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#if IS_KINEMATIC
|
||||
// Probing points may be verified at compile time within the radius
|
||||
// using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
|
||||
// so that may be added to SanityCheck.h in the future.
|
||||
#define _MESH_MIN_X (MIN_PROBE_X + MESH_INSET)
|
||||
#define _MESH_MIN_Y (MIN_PROBE_Y + MESH_INSET)
|
||||
#define _MESH_MAX_X (MAX_PROBE_X - (MESH_INSET))
|
||||
#define _MESH_MAX_Y (MAX_PROBE_Y - (MESH_INSET))
|
||||
#else
|
||||
// Boundaries for Cartesian probing based on set limits
|
||||
#define _MESH_MIN_X (max(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MESH_MAX_X (min(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define _MESH_MAX_Y (min(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#endif
|
||||
/**
|
||||
* These may be overridden in Configuration if a smaller area is wanted
|
||||
*/
|
||||
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#ifndef MESH_MIN_X
|
||||
#define MESH_MIN_X _MESH_MIN_X
|
||||
#endif
|
||||
#ifndef MESH_MIN_Y
|
||||
#define MESH_MIN_Y _MESH_MIN_Y
|
||||
#endif
|
||||
#ifndef MESH_MAX_X
|
||||
#define MESH_MAX_X _MESH_MAX_X
|
||||
#endif
|
||||
#ifndef MESH_MAX_Y
|
||||
#define MESH_MAX_Y _MESH_MAX_Y
|
||||
#endif
|
||||
#endif
|
||||
#endif // MESH_BED_LEVELING || AUTO_BED_LEVELING_UBL
|
||||
|
||||
/**
|
||||
* Buzzer/Speaker
|
||||
*/
|
||||
@@ -762,6 +1049,18 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* VIKI2, miniVIKI, and AZSMZ_12864 require DOGLCD_SCK and DOGLCD_MOSI to be defined.
|
||||
*/
|
||||
#if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864)
|
||||
#ifndef DOGLCD_SCK
|
||||
#define DOGLCD_SCK SCK_PIN
|
||||
#endif
|
||||
#ifndef DOGLCD_MOSI
|
||||
#define DOGLCD_MOSI MOSI_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES
|
||||
*/
|
||||
@@ -781,27 +1080,6 @@
|
||||
#define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
|
||||
#endif
|
||||
|
||||
#if ENABLED(DELTA)
|
||||
// These will be further constrained in code, but UBL_PROBE_PT values
|
||||
// cannot be compile-time verified within the radius.
|
||||
#define MIN_PROBE_X (-DELTA_PRINTABLE_RADIUS)
|
||||
#define MAX_PROBE_X ( DELTA_PRINTABLE_RADIUS)
|
||||
#define MIN_PROBE_Y (-DELTA_PRINTABLE_RADIUS)
|
||||
#define MAX_PROBE_Y ( DELTA_PRINTABLE_RADIUS)
|
||||
#elif IS_SCARA
|
||||
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
||||
#define MIN_PROBE_X (-SCARA_PRINTABLE_RADIUS)
|
||||
#define MAX_PROBE_X ( SCARA_PRINTABLE_RADIUS)
|
||||
#define MIN_PROBE_Y (-SCARA_PRINTABLE_RADIUS)
|
||||
#define MAX_PROBE_Y ( SCARA_PRINTABLE_RADIUS)
|
||||
#else
|
||||
// Boundaries for probing based on set limits
|
||||
#define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
|
||||
#endif
|
||||
|
||||
// Stepper pulse duration, in cycles
|
||||
#define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND)
|
||||
|
||||
@@ -812,7 +1090,7 @@
|
||||
// Updated G92 behavior shifts the workspace
|
||||
#define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
|
||||
// The home offset also shifts the coordinate space
|
||||
#define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA))
|
||||
#define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA))
|
||||
// Either offset yields extra calculations on all moves
|
||||
#define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
|
||||
// M206 doesn't apply to DELTA
|
||||
@@ -823,33 +1101,50 @@
|
||||
#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DELTA_SEGMENT_MIN_LENGTH and DELTA_PROBEABLE_RADIUS for UBL_DELTA
|
||||
*/
|
||||
#if UBL_DELTA
|
||||
#ifndef DELTA_SEGMENT_MIN_LENGTH
|
||||
#if IS_SCARA
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
|
||||
#elif ENABLED(DELTA)
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
|
||||
#else // CARTESIAN
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef DELTA_PROBEABLE_RADIUS
|
||||
#define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Shorthand
|
||||
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
||||
|
||||
// Add commands that need sub-codes to this list
|
||||
#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET)
|
||||
#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS)
|
||||
|
||||
// MESH_BED_LEVELING overrides PROBE_MANUALLY
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
#undef PROBE_MANUALLY
|
||||
// Parking Extruder
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#ifndef PARKING_EXTRUDER_GRAB_DISTANCE
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 0
|
||||
#endif
|
||||
#ifndef PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE HIGH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Number of VFAT entries used. Each entry has 13 UTF-16 characters
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
||||
#define MAX_VFAT_ENTRIES (5)
|
||||
#else
|
||||
#define MAX_VFAT_ENTRIES (2)
|
||||
#endif
|
||||
|
||||
// Set defaults for unspecified LED user colors
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
#ifndef LED_USER_PRESET_RED
|
||||
#define LED_USER_PRESET_RED 255
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_GREEN
|
||||
#define LED_USER_PRESET_GREEN 255
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_BLUE
|
||||
#define LED_USER_PRESET_BLUE 255
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_WHITE
|
||||
#define LED_USER_PRESET_WHITE 0
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_BRIGHTNESS
|
||||
#ifdef NEOPIXEL_BRIGHTNESS
|
||||
#define LED_USER_PRESET_BRIGHTNESS NEOPIXEL_BRIGHTNESS
|
||||
#else
|
||||
#define LED_USER_PRESET_BRIGHTNESS 255
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // CONDITIONALS_POST_H
|
||||
|
||||
+306
-118
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/delta directory.
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -298,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +351,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -390,12 +431,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -524,19 +566,18 @@
|
||||
* When changing speed and direction, if the difference is less than the
|
||||
* value set here, it may happen instantaneously.
|
||||
*/
|
||||
#define DEFAULT_XJERK 20.0
|
||||
#define DEFAULT_YJERK 20.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//============================= Z Probe Options =============================
|
||||
//===========================================================================
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -566,13 +607,12 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
*
|
||||
* Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
|
||||
* You must activate one of these to use Auto Bed Leveling below.
|
||||
* Activate one of these to use Auto Bed Leveling below.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -603,14 +643,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -649,14 +690,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -723,6 +766,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -734,18 +779,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 200
|
||||
#define Y_BED_SIZE 200
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 200
|
||||
#define Y_MAX_POS 200
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -765,7 +834,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -791,12 +860,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -823,6 +887,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -878,17 +960,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -915,6 +1001,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -941,17 +1030,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -965,13 +1112,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -981,11 +1125,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1009,7 +1154,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1024,6 +1169,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1130,10 +1277,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1155,7 +1303,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1281,12 +1429,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1369,6 +1511,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1385,6 +1550,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1437,6 +1605,42 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128x64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
// If there is a pixel shift, try the other controller.
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1475,12 +1679,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1490,16 +1697,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1507,6 +1720,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1518,68 +1742,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
+502
-191
File diff suppressed because it is too large
Load Diff
+575
-562
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,346 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016, 2017 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef I2CPOSENC_H
|
||||
#define I2CPOSENC_H
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(I2C_POSITION_ENCODERS)
|
||||
|
||||
#include "enum.h"
|
||||
#include "macros.h"
|
||||
#include "types.h"
|
||||
#include <Wire.h>
|
||||
|
||||
//=========== Advanced / Less-Common Encoder Configuration Settings ==========
|
||||
|
||||
#define I2CPE_EC_THRESH_PROPORTIONAL // if enabled adjusts the error correction threshold
|
||||
// proportional to the current speed of the axis allows
|
||||
// for very small error margin at low speeds without
|
||||
// stuttering due to reading latency at high speeds
|
||||
|
||||
#define I2CPE_DEBUG // enable encoder-related debug serial echos
|
||||
|
||||
#define I2CPE_REBOOT_TIME 5000 // time we wait for an encoder module to reboot
|
||||
// after changing address.
|
||||
|
||||
#define I2CPE_MAG_SIG_GOOD 0
|
||||
#define I2CPE_MAG_SIG_MID 1
|
||||
#define I2CPE_MAG_SIG_BAD 2
|
||||
#define I2CPE_MAG_SIG_NF 255
|
||||
|
||||
#define I2CPE_REQ_REPORT 0
|
||||
#define I2CPE_RESET_COUNT 1
|
||||
#define I2CPE_SET_ADDR 2
|
||||
#define I2CPE_SET_REPORT_MODE 3
|
||||
#define I2CPE_CLEAR_EEPROM 4
|
||||
|
||||
#define I2CPE_LED_PAR_MODE 10
|
||||
#define I2CPE_LED_PAR_BRT 11
|
||||
#define I2CPE_LED_PAR_RATE 14
|
||||
|
||||
#define I2CPE_REPORT_DISTANCE 0
|
||||
#define I2CPE_REPORT_STRENGTH 1
|
||||
#define I2CPE_REPORT_VERSION 2
|
||||
|
||||
// Default I2C addresses
|
||||
#define I2CPE_PRESET_ADDR_X 30
|
||||
#define I2CPE_PRESET_ADDR_Y 31
|
||||
#define I2CPE_PRESET_ADDR_Z 32
|
||||
#define I2CPE_PRESET_ADDR_E 33
|
||||
|
||||
#define I2CPE_DEF_AXIS X_AXIS
|
||||
#define I2CPE_DEF_ADDR I2CPE_PRESET_ADDR_X
|
||||
|
||||
// Error event counter; tracks how many times there is an error exceeding a certain threshold
|
||||
#define I2CPE_ERR_CNT_THRESH 3.00
|
||||
#define I2CPE_ERR_CNT_DEBOUNCE_MS 2000
|
||||
|
||||
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
|
||||
#define I2CPE_ERR_ARRAY_SIZE 32
|
||||
#endif
|
||||
|
||||
// Error Correction Methods
|
||||
#define I2CPE_ECM_NONE 0
|
||||
#define I2CPE_ECM_MICROSTEP 1
|
||||
#define I2CPE_ECM_PLANNER 2
|
||||
#define I2CPE_ECM_STALLDETECT 3
|
||||
|
||||
// Encoder types
|
||||
#define I2CPE_ENC_TYPE_ROTARY 0
|
||||
#define I2CPE_ENC_TYPE_LINEAR 1
|
||||
|
||||
// Parser
|
||||
#define I2CPE_PARSE_ERR 1
|
||||
#define I2CPE_PARSE_OK 0
|
||||
|
||||
#define LOOP_PE(VAR) LOOP_L_N(VAR, I2CPE_ENCODER_CNT)
|
||||
#define CHECK_IDX() do{ if (!WITHIN(idx, 0, I2CPE_ENCODER_CNT - 1)) return; }while(0)
|
||||
|
||||
extern const char axis_codes[XYZE];
|
||||
|
||||
typedef union {
|
||||
volatile int32_t val = 0;
|
||||
uint8_t bval[4];
|
||||
} i2cLong;
|
||||
|
||||
class I2CPositionEncoder {
|
||||
private:
|
||||
AxisEnum encoderAxis = I2CPE_DEF_AXIS;
|
||||
|
||||
uint8_t i2cAddress = I2CPE_DEF_ADDR,
|
||||
ecMethod = I2CPE_DEF_EC_METHOD,
|
||||
type = I2CPE_DEF_TYPE,
|
||||
H = I2CPE_MAG_SIG_NF; // Magnetic field strength
|
||||
|
||||
int encoderTicksPerUnit = I2CPE_DEF_ENC_TICKS_UNIT,
|
||||
stepperTicks = I2CPE_DEF_TICKS_REV,
|
||||
errorCount = 0,
|
||||
errorPrev = 0;
|
||||
|
||||
float ecThreshold = I2CPE_DEF_EC_THRESH;
|
||||
|
||||
bool homed = false,
|
||||
trusted = false,
|
||||
initialised = false,
|
||||
active = false,
|
||||
invert = false,
|
||||
ec = true;
|
||||
|
||||
int32_t zeroOffset = 0,
|
||||
lastPosition = 0,
|
||||
position;
|
||||
|
||||
millis_t lastPositionTime = 0,
|
||||
nextErrorCountTime = 0,
|
||||
lastErrorTime;
|
||||
|
||||
//double positionMm; //calculate
|
||||
|
||||
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
|
||||
uint8_t errIdx = 0;
|
||||
int err[I2CPE_ERR_ARRAY_SIZE] = { 0 };
|
||||
#endif
|
||||
|
||||
//float positionMm; //calculate
|
||||
|
||||
public:
|
||||
void init(const uint8_t address, const AxisEnum axis);
|
||||
void reset();
|
||||
|
||||
void update();
|
||||
|
||||
void set_homed();
|
||||
|
||||
int32_t get_raw_count();
|
||||
|
||||
FORCE_INLINE float mm_from_count(const int32_t count) {
|
||||
switch (type) {
|
||||
default: return -1;
|
||||
case I2CPE_ENC_TYPE_LINEAR:
|
||||
return count / encoderTicksPerUnit;
|
||||
case I2CPE_ENC_TYPE_ROTARY:
|
||||
return (count * stepperTicks) / (encoderTicksPerUnit * planner.axis_steps_per_mm[encoderAxis]);
|
||||
}
|
||||
}
|
||||
|
||||
FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
|
||||
FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset; }
|
||||
|
||||
int32_t get_axis_error_steps(const bool report);
|
||||
float get_axis_error_mm(const bool report);
|
||||
|
||||
void calibrate_steps_mm(const uint8_t iter);
|
||||
|
||||
bool passes_test(const bool report);
|
||||
|
||||
bool test_axis(void);
|
||||
|
||||
FORCE_INLINE int get_error_count(void) { return errorCount; }
|
||||
FORCE_INLINE void set_error_count(const int newCount) { errorCount = newCount; }
|
||||
|
||||
FORCE_INLINE uint8_t get_address() { return i2cAddress; }
|
||||
FORCE_INLINE void set_address(const uint8_t addr) { i2cAddress = addr; }
|
||||
|
||||
FORCE_INLINE bool get_active(void) { return active; }
|
||||
FORCE_INLINE void set_active(const bool a) { active = a; }
|
||||
|
||||
FORCE_INLINE void set_inverted(const bool i) { invert = i; }
|
||||
|
||||
FORCE_INLINE AxisEnum get_axis() { return encoderAxis; }
|
||||
|
||||
FORCE_INLINE bool get_ec_enabled() { return ec; }
|
||||
FORCE_INLINE void set_ec_enabled(const bool enabled) { ec = enabled; }
|
||||
|
||||
FORCE_INLINE uint8_t get_ec_method() { return ecMethod; }
|
||||
FORCE_INLINE void set_ec_method(const byte method) { ecMethod = method; }
|
||||
|
||||
FORCE_INLINE float get_ec_threshold() { return ecThreshold; }
|
||||
FORCE_INLINE void set_ec_threshold(const float newThreshold) { ecThreshold = newThreshold; }
|
||||
|
||||
FORCE_INLINE int get_encoder_ticks_mm() {
|
||||
switch (type) {
|
||||
default: return 0;
|
||||
case I2CPE_ENC_TYPE_LINEAR:
|
||||
return encoderTicksPerUnit;
|
||||
case I2CPE_ENC_TYPE_ROTARY:
|
||||
return (int)((encoderTicksPerUnit / stepperTicks) * planner.axis_steps_per_mm[encoderAxis]);
|
||||
}
|
||||
}
|
||||
|
||||
FORCE_INLINE int get_ticks_unit() { return encoderTicksPerUnit; }
|
||||
FORCE_INLINE void set_ticks_unit(const int ticks) { encoderTicksPerUnit = ticks; }
|
||||
|
||||
FORCE_INLINE uint8_t get_type() { return type; }
|
||||
FORCE_INLINE void set_type(const byte newType) { type = newType; }
|
||||
|
||||
FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
|
||||
FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
|
||||
};
|
||||
|
||||
class I2CPositionEncodersMgr {
|
||||
private:
|
||||
static bool I2CPE_anyaxis;
|
||||
static uint8_t I2CPE_addr, I2CPE_idx;
|
||||
|
||||
public:
|
||||
|
||||
static void init(void);
|
||||
|
||||
// consider only updating one endoder per call / tick if encoders become too time intensive
|
||||
static void update(void) { LOOP_PE(i) encoders[i].update(); }
|
||||
|
||||
static void homed(const AxisEnum axis) {
|
||||
LOOP_PE(i)
|
||||
if (encoders[i].get_axis() == axis) encoders[i].set_homed();
|
||||
}
|
||||
|
||||
static void report_position(const int8_t idx, const bool units, const bool noOffset);
|
||||
|
||||
static void report_status(const int8_t idx) {
|
||||
CHECK_IDX();
|
||||
SERIAL_ECHOPAIR("Encoder ",idx);
|
||||
SERIAL_ECHOPGM(": ");
|
||||
encoders[idx].get_raw_count();
|
||||
encoders[idx].passes_test(true);
|
||||
}
|
||||
|
||||
static void report_error(const int8_t idx) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].get_axis_error_steps(true);
|
||||
}
|
||||
|
||||
static void test_axis(const int8_t idx) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].test_axis();
|
||||
}
|
||||
|
||||
static void calibrate_steps_mm(const int8_t idx, const int iterations) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].calibrate_steps_mm(iterations);
|
||||
}
|
||||
|
||||
static void change_module_address(const uint8_t oldaddr, const uint8_t newaddr);
|
||||
static void report_module_firmware(const uint8_t address);
|
||||
|
||||
static void report_error_count(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
|
||||
SERIAL_ECHOLNPAIR(" axis is ", encoders[idx].get_error_count());
|
||||
}
|
||||
|
||||
static void reset_error_count(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_error_count(0);
|
||||
SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
|
||||
SERIAL_ECHOLNPGM(" axis has been reset.");
|
||||
}
|
||||
|
||||
static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_ec_enabled(enabled);
|
||||
SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
|
||||
SERIAL_ECHOPGM(" axis is ");
|
||||
serialprintPGM(encoders[idx].get_ec_enabled() ? PSTR("en") : PSTR("dis"));
|
||||
SERIAL_ECHOLNPGM("abled.");
|
||||
}
|
||||
|
||||
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
encoders[idx].set_ec_threshold(newThreshold);
|
||||
SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
|
||||
SERIAL_ECHOPAIR_F(" axis set to ", newThreshold);
|
||||
SERIAL_ECHOLNPGM("mm.");
|
||||
}
|
||||
|
||||
static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
|
||||
CHECK_IDX();
|
||||
const float threshold = encoders[idx].get_ec_threshold();
|
||||
SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
|
||||
SERIAL_ECHOPAIR_F(" axis is ", threshold);
|
||||
SERIAL_ECHOLNPGM("mm.");
|
||||
}
|
||||
|
||||
static int8_t idx_from_axis(const AxisEnum axis) {
|
||||
LOOP_PE(i)
|
||||
if (encoders[i].get_axis() == axis) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int8_t idx_from_addr(const uint8_t addr) {
|
||||
LOOP_PE(i)
|
||||
if (encoders[i].get_address() == addr) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int8_t parse();
|
||||
|
||||
static void M860();
|
||||
static void M861();
|
||||
static void M862();
|
||||
static void M863();
|
||||
static void M864();
|
||||
static void M865();
|
||||
static void M866();
|
||||
static void M867();
|
||||
static void M868();
|
||||
static void M869();
|
||||
|
||||
static I2CPositionEncoder encoders[I2CPE_ENCODER_CNT];
|
||||
};
|
||||
|
||||
extern I2CPositionEncodersMgr I2CPEM;
|
||||
|
||||
FORCE_INLINE static void gcode_M860() { I2CPEM.M860(); }
|
||||
FORCE_INLINE static void gcode_M861() { I2CPEM.M861(); }
|
||||
FORCE_INLINE static void gcode_M862() { I2CPEM.M862(); }
|
||||
FORCE_INLINE static void gcode_M863() { I2CPEM.M863(); }
|
||||
FORCE_INLINE static void gcode_M864() { I2CPEM.M864(); }
|
||||
FORCE_INLINE static void gcode_M865() { I2CPEM.M865(); }
|
||||
FORCE_INLINE static void gcode_M866() { I2CPEM.M866(); }
|
||||
FORCE_INLINE static void gcode_M867() { I2CPEM.M867(); }
|
||||
FORCE_INLINE static void gcode_M868() { I2CPEM.M868(); }
|
||||
FORCE_INLINE static void gcode_M869() { I2CPEM.M869(); }
|
||||
|
||||
#endif //I2C_POSITION_ENCODERS
|
||||
#endif //I2CPOSENC_H
|
||||
@@ -130,7 +130,7 @@ int16_t count_test_bytes(const char * const ptr) {
|
||||
}
|
||||
SERIAL_CHAR(ccc);
|
||||
}
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
ptr += 16;
|
||||
safe_delay(25);
|
||||
idle();
|
||||
@@ -189,19 +189,17 @@ void free_memory_pool_report(char * const ptr, const int16_t size) {
|
||||
* This is useful to check the correctness of the M100 D and the M100 F commands.
|
||||
*/
|
||||
void corrupt_free_memory(char *ptr, const uint16_t size) {
|
||||
if (parser.seen('C')) {
|
||||
ptr += 8;
|
||||
const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
|
||||
j = near_top / (size + 1);
|
||||
ptr += 8;
|
||||
const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
|
||||
j = near_top / (size + 1);
|
||||
|
||||
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
|
||||
for (uint16_t i = 1; i <= size; i++) {
|
||||
char * const addr = ptr + i * j;
|
||||
*addr = i;
|
||||
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
|
||||
}
|
||||
SERIAL_EOL;
|
||||
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
|
||||
for (uint16_t i = 1; i <= size; i++) {
|
||||
char * const addr = ptr + i * j;
|
||||
*addr = i;
|
||||
SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif // M100_FREE_MEMORY_CORRUPTOR
|
||||
|
||||
@@ -229,7 +227,7 @@ void init_free_memory(char *ptr, int16_t size) {
|
||||
if (ptr[i] != TEST_BYTE) {
|
||||
SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
|
||||
SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,7 +321,7 @@ int check_for_free_memory_corruption(const char * const title) {
|
||||
SERIAL_ECHOPGM(" return=");
|
||||
if (block_cnt == 1) {
|
||||
SERIAL_CHAR('0'); // if the block_cnt is 1, nothing has broken up the free memory
|
||||
SERIAL_EOL; // area and it is appropriate to say 'no corruption'.
|
||||
SERIAL_EOL(); // area and it is appropriate to say 'no corruption'.
|
||||
return 0;
|
||||
}
|
||||
SERIAL_ECHOLNPGM("true");
|
||||
|
||||
+29
-8
@@ -82,6 +82,13 @@ LIQUID_TWI2 ?= 0
|
||||
# this defines if Wire is needed
|
||||
WIRE ?= 0
|
||||
|
||||
# this defines if U8GLIB is needed (may require RELOC_WORKAROUND)
|
||||
U8GLIB ?= 1
|
||||
|
||||
# this defines whether to add a workaround for the avr-gcc relocation bug
|
||||
# https://www.stix.id.au/wiki/AVR_relocation_truncations_workaround
|
||||
RELOC_WORKAROUND ?= 1
|
||||
|
||||
############################################################################
|
||||
# Below here nothing should be changed...
|
||||
|
||||
@@ -270,6 +277,13 @@ ifeq ($(WIRE), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
|
||||
endif
|
||||
ifeq ($(NEOPIXEL), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
|
||||
endif
|
||||
ifeq ($(U8GLIB), 1)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/U8glib/utility
|
||||
endif
|
||||
|
||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||
HARDWARE_SUB_VARIANT ?= mega
|
||||
@@ -290,13 +304,11 @@ ifeq ($(HARDWARE_VARIANT), Teensy)
|
||||
SRC = wiring.c
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy
|
||||
endif
|
||||
CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
|
||||
MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \
|
||||
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
|
||||
temperature.cpp cardreader.cpp configuration_store.cpp \
|
||||
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
|
||||
dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp \
|
||||
printcounter.cpp nozzle.cpp serial.cpp
|
||||
CXXSRC = WMath.cpp WString.cpp Print.cpp SPI.cpp Tone.cpp
|
||||
CXXSRC += $(wildcard *.cpp)
|
||||
ifeq ($(NEOPIXEL), 1)
|
||||
CXXSRC += Adafruit_NeoPixel.cpp
|
||||
endif
|
||||
ifeq ($(LIQUID_TWI2), 0)
|
||||
CXXSRC += LiquidCrystal.cpp
|
||||
else
|
||||
@@ -309,6 +321,15 @@ SRC += twi.c
|
||||
CXXSRC += Wire.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(U8GLIB), 1)
|
||||
SRC += u8g_ll_api.c u8g_bitmap.c u8g_clip.c u8g_com_null.c u8g_delay.c u8g_page.c u8g_pb.c u8g_pb16h1.c u8g_rect.c u8g_state.c u8g_font.c u8g_font_data.c
|
||||
endif
|
||||
|
||||
ifeq ($(RELOC_WORKAROUND), 1)
|
||||
LD_PREFIX=-nodefaultlibs
|
||||
LD_SUFFIX=-lm -lgcc -lc -lgcc -L$(ARDUINO_INSTALL_DIR)/hardware/tools/avr/avr/lib/avr6 -l$(MCU)
|
||||
endif
|
||||
|
||||
#Check for Arduino 1.0.0 or higher and use the correct source files for that version
|
||||
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
||||
CXXSRC += main.cpp
|
||||
@@ -487,7 +508,7 @@ extcoff: $(TARGET).elf
|
||||
# Link: create ELF output file from library.
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
|
||||
$(Pecho) " CXX $@"
|
||||
$P $(CC) $(ALL_CXXFLAGS) -Wl,--gc-sections,--relax -o $@ -L. $(OBJ) $(LDFLAGS)
|
||||
$P $(CC) $(LD_PREFIX) $(ALL_CXXFLAGS) -Wl,--gc-sections,--relax -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX)
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
|
||||
$(Pecho) " CC $<"
|
||||
|
||||
+113
-54
@@ -210,17 +210,12 @@ inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
|
||||
/**
|
||||
* Feedrate scaling and conversion
|
||||
*/
|
||||
extern int feedrate_percentage;
|
||||
extern float feedrate_mm_s;
|
||||
extern int16_t feedrate_percentage;
|
||||
|
||||
#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
|
||||
#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
|
||||
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
|
||||
|
||||
extern bool axis_relative_modes[];
|
||||
extern bool volumetric_enabled;
|
||||
extern int flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
|
||||
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
|
||||
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
|
||||
extern bool axis_known_position[XYZ];
|
||||
extern bool axis_homed[XYZ];
|
||||
extern volatile bool wait_for_heatup;
|
||||
@@ -229,7 +224,7 @@ extern volatile bool wait_for_heatup;
|
||||
extern volatile bool wait_for_user;
|
||||
#endif
|
||||
|
||||
extern float current_position[NUM_AXIS];
|
||||
extern float current_position[XYZE], destination[XYZE];
|
||||
|
||||
// Workspace offsets
|
||||
#if HAS_WORKSPACE_OFFSET
|
||||
@@ -252,14 +247,14 @@ extern float current_position[NUM_AXIS];
|
||||
#define WORKSPACE_OFFSET(AXIS) 0
|
||||
#endif
|
||||
|
||||
#define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
|
||||
#define RAW_POSITION(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
|
||||
#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
|
||||
#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
|
||||
|
||||
#if HAS_POSITION_SHIFT || DISABLED(DELTA)
|
||||
#define LOGICAL_X_POSITION(POS) LOGICAL_POSITION(POS, X_AXIS)
|
||||
#define LOGICAL_Y_POSITION(POS) LOGICAL_POSITION(POS, Y_AXIS)
|
||||
#define RAW_X_POSITION(POS) RAW_POSITION(POS, X_AXIS)
|
||||
#define RAW_Y_POSITION(POS) RAW_POSITION(POS, Y_AXIS)
|
||||
#define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS)
|
||||
#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS)
|
||||
#define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS)
|
||||
#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS)
|
||||
#else
|
||||
#define LOGICAL_X_POSITION(POS) (POS)
|
||||
#define LOGICAL_Y_POSITION(POS) (POS)
|
||||
@@ -267,9 +262,8 @@ extern float current_position[NUM_AXIS];
|
||||
#define RAW_Y_POSITION(POS) (POS)
|
||||
#endif
|
||||
|
||||
#define LOGICAL_Z_POSITION(POS) LOGICAL_POSITION(POS, Z_AXIS)
|
||||
#define RAW_Z_POSITION(POS) RAW_POSITION(POS, Z_AXIS)
|
||||
#define RAW_CURRENT_POSITION(A) RAW_##A##_POSITION(current_position[A##_AXIS])
|
||||
#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
|
||||
#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS)
|
||||
|
||||
// Hotend Offsets
|
||||
#if HOTENDS > 1
|
||||
@@ -291,29 +285,81 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
void update_software_endstops(const AxisEnum axis);
|
||||
#endif
|
||||
|
||||
#if ENABLED(CNC_COORDINATE_SYSTEMS)
|
||||
#define MAX_COORDINATE_SYSTEMS 9
|
||||
extern float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ];
|
||||
bool select_coordinate_system(const int8_t _new);
|
||||
#endif
|
||||
|
||||
void report_current_position();
|
||||
|
||||
#if IS_KINEMATIC
|
||||
extern float delta[ABC];
|
||||
void inverse_kinematics(const float logical[XYZ]);
|
||||
void inverse_kinematics(const float raw[XYZ]);
|
||||
#endif
|
||||
|
||||
#if ENABLED(DELTA)
|
||||
extern float endstop_adj[ABC],
|
||||
extern float delta_height,
|
||||
delta_endstop_adj[ABC],
|
||||
delta_radius,
|
||||
delta_tower_angle_trim[ABC],
|
||||
delta_tower[ABC][2],
|
||||
delta_diagonal_rod,
|
||||
delta_calibration_radius,
|
||||
delta_diagonal_rod_2_tower[ABC],
|
||||
delta_segments_per_second,
|
||||
delta_tower_angle_trim[2],
|
||||
delta_clip_start_height;
|
||||
void recalc_delta_settings(float radius, float diagonal_rod);
|
||||
|
||||
void recalc_delta_settings();
|
||||
float delta_safe_distance_from_top();
|
||||
|
||||
#if ENABLED(DELTA_FAST_SQRT)
|
||||
float Q_rsqrt(const float number);
|
||||
#define _SQRT(n) (1.0f / Q_rsqrt(n))
|
||||
#else
|
||||
#define _SQRT(n) SQRT(n)
|
||||
#endif
|
||||
|
||||
// Macro to obtain the Z position of an individual tower
|
||||
#define DELTA_Z(V,T) V[Z_AXIS] + _SQRT( \
|
||||
delta_diagonal_rod_2_tower[T] - HYPOT2( \
|
||||
delta_tower[T][X_AXIS] - V[X_AXIS], \
|
||||
delta_tower[T][Y_AXIS] - V[Y_AXIS] \
|
||||
) \
|
||||
)
|
||||
|
||||
#define DELTA_IK(V) do { \
|
||||
delta[A_AXIS] = DELTA_Z(V, A_AXIS); \
|
||||
delta[B_AXIS] = DELTA_Z(V, B_AXIS); \
|
||||
delta[C_AXIS] = DELTA_Z(V, C_AXIS); \
|
||||
}while(0)
|
||||
|
||||
#elif IS_SCARA
|
||||
void forward_kinematics_SCARA(const float &a, const float &b);
|
||||
#endif
|
||||
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
extern bool g26_debug_flag;
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
constexpr bool g26_debug_flag = false;
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
#define _GET_MESH_X(I) (bilinear_start[X_AXIS] + (I) * bilinear_grid_spacing[X_AXIS])
|
||||
#define _GET_MESH_Y(J) (bilinear_start[Y_AXIS] + (J) * bilinear_grid_spacing[Y_AXIS])
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#define _GET_MESH_X(I) ubl.mesh_index_to_xpos(I)
|
||||
#define _GET_MESH_Y(J) ubl.mesh_index_to_ypos(J)
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
#define _GET_MESH_X(I) mbl.index_to_xpos[I]
|
||||
#define _GET_MESH_Y(J) mbl.index_to_ypos[J]
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
extern int bilinear_grid_spacing[2], bilinear_start[2];
|
||||
extern float bilinear_grid_factor[2],
|
||||
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
float bilinear_z_offset(const float logical[XYZ]);
|
||||
float bilinear_z_offset(const float raw[XYZ]);
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
@@ -323,22 +369,26 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
|
||||
#if HAS_LEVELING
|
||||
bool leveling_is_valid();
|
||||
bool leveling_is_active();
|
||||
void set_bed_leveling_enabled(const bool enable=true);
|
||||
void reset_bed_level();
|
||||
#endif
|
||||
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
void set_z_fade_height(const float zfh);
|
||||
void set_z_fade_height(const float zfh, const bool do_report=true);
|
||||
#endif
|
||||
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
extern float x_endstop_adj;
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
extern float y_endstop_adj;
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
extern float z_endstop_adj;
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
extern float zprobe_zoffset;
|
||||
void refresh_zprobe_zoffset(const bool no_babystep=false);
|
||||
#define DEPLOY_PROBE() set_probe_deployed(true)
|
||||
#define STOW_PROBE() set_probe_deployed(false)
|
||||
#else
|
||||
@@ -355,6 +405,10 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
extern int16_t fanSpeeds[FAN_COUNT];
|
||||
#if ENABLED(EXTRA_FAN_SPEED)
|
||||
extern int16_t old_fanSpeeds[FAN_COUNT],
|
||||
new_fanSpeeds[FAN_COUNT];
|
||||
#endif
|
||||
#if ENABLED(PROBING_FANS_OFF)
|
||||
extern bool fans_paused;
|
||||
extern int16_t paused_fanSpeeds[FAN_COUNT];
|
||||
@@ -362,17 +416,16 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
#endif
|
||||
|
||||
#if ENABLED(BARICUDA)
|
||||
extern int baricuda_valve_pressure;
|
||||
extern int baricuda_e_to_p_pressure;
|
||||
extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
extern bool filament_sensor; // Flag that filament sensor readings should control extrusion
|
||||
extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
|
||||
filament_width_meas; // Measured filament diameter
|
||||
extern int8_t measurement_delay[]; // Ring buffer to delay measurement
|
||||
extern int filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
|
||||
extern int meas_delay_cm; // Delay distance
|
||||
extern uint8_t meas_delay_cm; // Delay distance
|
||||
extern int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1], // Ring buffer to delay measurement
|
||||
filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
@@ -384,10 +437,15 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
#endif
|
||||
|
||||
#if ENABLED(FWRETRACT)
|
||||
extern bool autoretract_enabled;
|
||||
extern bool retracted[EXTRUDERS]; // extruder[n].retracted
|
||||
extern float retract_length, retract_length_swap, retract_feedrate_mm_s, retract_zlift;
|
||||
extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate_mm_s;
|
||||
extern bool autoretract_enabled; // M209 S - Autoretract switch
|
||||
extern float retract_length, // M207 S - G10 Retract length
|
||||
retract_feedrate_mm_s, // M207 F - G10 Retract feedrate
|
||||
retract_zlift, // M207 Z - G10 Retract hop size
|
||||
retract_recover_length, // M208 S - G11 Recover length
|
||||
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
|
||||
swap_retract_length, // M207 W - G10 Swap Retract length
|
||||
swap_retract_recover_length, // M208 W - G11 Swap Recover length
|
||||
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
|
||||
#endif
|
||||
|
||||
// Print job timer
|
||||
@@ -400,15 +458,13 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
||||
// Handling multiple extruders pins
|
||||
extern uint8_t active_extruder;
|
||||
|
||||
#if HAS_TEMP_HOTEND || HAS_TEMP_BED
|
||||
void print_heaterstates();
|
||||
#endif
|
||||
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
extern float mixing_factor[MIXING_STEPPERS];
|
||||
#endif
|
||||
|
||||
void calculate_volumetric_multipliers();
|
||||
inline void set_current_from_destination() { COPY(current_position, destination); }
|
||||
inline void set_destination_from_current() { COPY(destination, current_position); }
|
||||
void prepare_move_to_destination();
|
||||
|
||||
/**
|
||||
* Blocking movement and shorthand functions
|
||||
@@ -418,7 +474,18 @@ void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
|
||||
void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
|
||||
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
|
||||
|
||||
#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
|
||||
#define HAS_AXIS_UNHOMED_ERR ( \
|
||||
ENABLED(Z_PROBE_ALLEN_KEY) \
|
||||
|| ENABLED(Z_PROBE_SLED) \
|
||||
|| HAS_PROBING_PROCEDURE \
|
||||
|| HOTENDS > 1 \
|
||||
|| ENABLED(NOZZLE_CLEAN_FEATURE) \
|
||||
|| ENABLED(NOZZLE_PARK_FEATURE) \
|
||||
|| (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
|
||||
|| HAS_M206_COMMAND \
|
||||
) || ENABLED(NO_MOTION_BEFORE_HOMING)
|
||||
|
||||
#if HAS_AXIS_UNHOMED_ERR
|
||||
bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
|
||||
#endif
|
||||
|
||||
@@ -432,7 +499,7 @@ void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s
|
||||
extern const float L1, L2;
|
||||
#endif
|
||||
|
||||
inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
|
||||
inline bool position_is_reachable(const float &rx, const float &ry) {
|
||||
#if ENABLED(DELTA)
|
||||
return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
|
||||
#elif IS_SCARA
|
||||
@@ -447,24 +514,24 @@ void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
|
||||
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
|
||||
// Both the nozzle and the probe must be able to reach the point.
|
||||
// This won't work on SCARA since the probe offset rotates with the arm.
|
||||
|
||||
return position_is_reachable_raw_xy(rx, ry)
|
||||
&& position_is_reachable_raw_xy(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
|
||||
return position_is_reachable(rx, ry)
|
||||
&& position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER));
|
||||
}
|
||||
|
||||
#else // CARTESIAN
|
||||
|
||||
inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
|
||||
inline bool position_is_reachable(const float &rx, const float &ry) {
|
||||
// Add 0.001 margin to deal with float imprecision
|
||||
return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
|
||||
&& WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
|
||||
}
|
||||
|
||||
inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
|
||||
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
||||
// Add 0.001 margin to deal with float imprecision
|
||||
return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
|
||||
&& WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
|
||||
@@ -472,12 +539,4 @@ void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s
|
||||
|
||||
#endif // CARTESIAN
|
||||
|
||||
FORCE_INLINE bool position_is_reachable_by_probe_xy(const float &lx, const float &ly) {
|
||||
return position_is_reachable_by_probe_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
|
||||
}
|
||||
|
||||
FORCE_INLINE bool position_is_reachable_xy(const float &lx, const float &ly) {
|
||||
return position_is_reachable_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
|
||||
}
|
||||
|
||||
#endif // MARLIN_H
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "Version.h"
|
||||
#include "Configuration.h"
|
||||
#include "Conditionals_LCD.h"
|
||||
#include "tmc_macros.h"
|
||||
#include "Configuration_adv.h"
|
||||
#include "pins.h"
|
||||
#ifndef USBCON
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SPI_H__
|
||||
#define __SPI_H__
|
||||
#ifndef __MARLIN_SPI_H__
|
||||
#define __MARLIN_SPI_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "softspi.h"
|
||||
@@ -54,4 +54,4 @@ class SPI<MISO_PIN, MOSI_PIN, SCK_PIN> {
|
||||
|
||||
};
|
||||
|
||||
#endif // __SPI_H__
|
||||
#endif // __MARLIN_SPI_H__
|
||||
+197
-59
@@ -27,15 +27,30 @@
|
||||
* Modified 23 November 2006 by David A. Mellis
|
||||
* Modified 28 September 2010 by Mark Sproul
|
||||
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
|
||||
* Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
|
||||
*/
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "Marlin.h"
|
||||
|
||||
// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
|
||||
|
||||
#include "MarlinSerial.h"
|
||||
#include "Marlin.h"
|
||||
|
||||
struct ring_buffer_r {
|
||||
unsigned char buffer[RX_BUFFER_SIZE];
|
||||
volatile ring_buffer_pos_t head, tail;
|
||||
};
|
||||
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
struct ring_buffer_t {
|
||||
unsigned char buffer[TX_BUFFER_SIZE];
|
||||
volatile uint8_t head, tail;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if UART_PRESENT(SERIAL_PORT)
|
||||
ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
@@ -44,6 +59,23 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80; // XON / XOFF Character was sent
|
||||
constexpr uint8_t XON_XOFF_CHAR_MASK = 0x1F; // XON / XOFF character to send
|
||||
// XON / XOFF character definitions
|
||||
constexpr uint8_t XON_CHAR = 17;
|
||||
constexpr uint8_t XOFF_CHAR = 19;
|
||||
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
uint8_t rx_dropped_bytes = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
ring_buffer_pos_t rx_max_enqueued = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
|
||||
#include "stepper.h"
|
||||
@@ -136,20 +168,78 @@
|
||||
|
||||
#endif // EMERGENCY_PARSER
|
||||
|
||||
FORCE_INLINE void store_char(unsigned char c) {
|
||||
CRITICAL_SECTION_START;
|
||||
const uint8_t h = rx_buffer.head,
|
||||
i = (uint8_t)(h + 1) & (RX_BUFFER_SIZE - 1);
|
||||
FORCE_INLINE void store_rxd_char() {
|
||||
const ring_buffer_pos_t h = rx_buffer.head,
|
||||
i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
||||
|
||||
// if we should be storing the received character into the location
|
||||
// just before the tail (meaning that the head would advance to the
|
||||
// current location of the tail), we're about to overflow the buffer
|
||||
// and so we don't write the character or advance the head.
|
||||
if (i != rx_buffer.tail) {
|
||||
rx_buffer.buffer[h] = c;
|
||||
rx_buffer.head = i;
|
||||
// If the character is to be stored at the index just before the tail
|
||||
// (such that the head would advance to the current tail), the buffer is
|
||||
// critical, so don't write the character or advance the head.
|
||||
const char c = M_UDRx;
|
||||
if (i != rx_buffer.tail) {
|
||||
rx_buffer.buffer[h] = c;
|
||||
rx_buffer.head = i;
|
||||
}
|
||||
else {
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
if (!++rx_dropped_bytes) ++rx_dropped_bytes;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
// calculate count of bytes stored into the RX buffer
|
||||
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
||||
// Keep track of the maximum count of enqueued bytes
|
||||
NOLESS(rx_max_enqueued, rx_count);
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
|
||||
// for high speed transfers, we can use XON/XOFF protocol to do
|
||||
// software handshake and avoid overruns.
|
||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
|
||||
|
||||
// calculate count of bytes stored into the RX buffer
|
||||
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
||||
|
||||
// if we are above 12.5% of RX buffer capacity, send XOFF before
|
||||
// we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
|
||||
// let the host react and stop sending bytes. This translates to 13mS
|
||||
// propagation time.
|
||||
if (rx_count >= (RX_BUFFER_SIZE) / 8) {
|
||||
// If TX interrupts are disabled and data register is empty,
|
||||
// just write the byte to the data register and be done. This
|
||||
// shortcut helps significantly improve the effective datarate
|
||||
// at high (>500kbit/s) bitrates, where interrupt overhead
|
||||
// becomes a slowdown.
|
||||
if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
|
||||
// Send an XOFF character
|
||||
M_UDRx = XOFF_CHAR;
|
||||
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
||||
// location". This makes sure flush() won't return until the bytes
|
||||
// actually got written
|
||||
SBI(M_UCSRxA, M_TXCx);
|
||||
// And remember it was sent
|
||||
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
|
||||
}
|
||||
else {
|
||||
// TX interrupts disabled, but buffer still not empty ... or
|
||||
// TX interrupts enabled. Reenable TX ints and schedule XOFF
|
||||
// character to be sent
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
SBI(M_UCSRxB, M_UDRIEx);
|
||||
xon_xoff_state = XOFF_CHAR;
|
||||
#else
|
||||
// We are not using TX interrupts, we will have to send this manually
|
||||
while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
|
||||
M_UDRx = XOFF_CHAR;
|
||||
// And remember we already sent it
|
||||
xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
CRITICAL_SECTION_END;
|
||||
#endif // SERIAL_XON_XOFF
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
emergency_parser(c);
|
||||
@@ -160,37 +250,41 @@
|
||||
|
||||
FORCE_INLINE void _tx_udr_empty_irq(void) {
|
||||
// If interrupts are enabled, there must be more data in the output
|
||||
// buffer. Send the next byte
|
||||
const uint8_t t = tx_buffer.tail,
|
||||
c = tx_buffer.buffer[t];
|
||||
tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
|
||||
// buffer.
|
||||
|
||||
M_UDRx = c;
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
// Do a priority insertion of an XON/XOFF char, if needed.
|
||||
const uint8_t state = xon_xoff_state;
|
||||
if (!(state & XON_XOFF_CHAR_SENT)) {
|
||||
M_UDRx = state & XON_XOFF_CHAR_MASK;
|
||||
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ // Send the next byte
|
||||
const uint8_t t = tx_buffer.tail, c = tx_buffer.buffer[t];
|
||||
tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
|
||||
M_UDRx = c;
|
||||
}
|
||||
|
||||
// clear the TXC bit -- "can be cleared by writing a one to its bit
|
||||
// location". This makes sure flush() won't return until the bytes
|
||||
// actually got written
|
||||
SBI(M_UCSRxA, M_TXCx);
|
||||
|
||||
if (tx_buffer.head == tx_buffer.tail) {
|
||||
// Buffer empty, so disable interrupts
|
||||
// Disable interrupts if the buffer is empty
|
||||
if (tx_buffer.head == tx_buffer.tail)
|
||||
CBI(M_UCSRxB, M_UDRIEx);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef M_USARTx_UDRE_vect
|
||||
ISR(M_USARTx_UDRE_vect) {
|
||||
_tx_udr_empty_irq();
|
||||
}
|
||||
ISR(M_USARTx_UDRE_vect) { _tx_udr_empty_irq(); }
|
||||
#endif
|
||||
|
||||
#endif // TX_BUFFER_SIZE
|
||||
|
||||
#ifdef M_USARTx_RX_vect
|
||||
ISR(M_USARTx_RX_vect) {
|
||||
const unsigned char c = M_UDRx;
|
||||
store_char(c);
|
||||
}
|
||||
ISR(M_USARTx_RX_vect) { store_rxd_char(); }
|
||||
#endif
|
||||
|
||||
// Public Methods
|
||||
@@ -200,9 +294,9 @@
|
||||
bool useU2X = true;
|
||||
|
||||
#if F_CPU == 16000000UL && SERIAL_PORT == 0
|
||||
// hard-coded exception for compatibility with the bootloader shipped
|
||||
// with the Duemilanove and previous boards and the firmware on the 8U2
|
||||
// on the Uno and Mega 2560.
|
||||
// Hard-coded exception for compatibility with the bootloader shipped
|
||||
// with the Duemilanove and previous boards, and the firmware on the
|
||||
// 8U2 on the Uno and Mega 2560.
|
||||
if (baud == 57600) useU2X = false;
|
||||
#endif
|
||||
|
||||
@@ -237,8 +331,9 @@
|
||||
|
||||
void MarlinSerial::checkRx(void) {
|
||||
if (TEST(M_UCSRxA, M_RXCx)) {
|
||||
const uint8_t c = M_UDRx;
|
||||
store_char(c);
|
||||
CRITICAL_SECTION_START;
|
||||
store_rxd_char();
|
||||
CRITICAL_SECTION_END;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,51 +347,81 @@
|
||||
int MarlinSerial::read(void) {
|
||||
int v;
|
||||
CRITICAL_SECTION_START;
|
||||
const uint8_t t = rx_buffer.tail;
|
||||
const ring_buffer_pos_t t = rx_buffer.tail;
|
||||
if (rx_buffer.head == t)
|
||||
v = -1;
|
||||
else {
|
||||
v = rx_buffer.buffer[t];
|
||||
rx_buffer.tail = (uint8_t)(t + 1) & (RX_BUFFER_SIZE - 1);
|
||||
rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
|
||||
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||
// Get count of bytes in the RX buffer
|
||||
ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
|
||||
// When below 10% of RX buffer capacity, send XON before
|
||||
// running out of RX buffer bytes
|
||||
if (rx_count < (RX_BUFFER_SIZE) / 10) {
|
||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||
CRITICAL_SECTION_END; // End critical section before returning!
|
||||
writeNoHandshake(XON_CHAR);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
CRITICAL_SECTION_END;
|
||||
return v;
|
||||
}
|
||||
|
||||
uint8_t MarlinSerial::available(void) {
|
||||
ring_buffer_pos_t MarlinSerial::available(void) {
|
||||
CRITICAL_SECTION_START;
|
||||
const uint8_t h = rx_buffer.head,
|
||||
t = rx_buffer.tail;
|
||||
const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
|
||||
CRITICAL_SECTION_END;
|
||||
return (uint8_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
|
||||
return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
|
||||
}
|
||||
|
||||
void MarlinSerial::flush(void) {
|
||||
// RX
|
||||
// don't reverse this or there may be problems if the RX interrupt
|
||||
// occurs after reading the value of rx_buffer_head but before writing
|
||||
// the value to rx_buffer_tail; the previous value of rx_buffer_head
|
||||
// may be written to rx_buffer_tail, making it appear as if the buffer
|
||||
// were full, not empty.
|
||||
// Don't change this order of operations. If the RX interrupt occurs between
|
||||
// reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
|
||||
// may be written to rx_buffer_tail, making the buffer appear full rather than empty.
|
||||
CRITICAL_SECTION_START;
|
||||
rx_buffer.head = rx_buffer.tail;
|
||||
CRITICAL_SECTION_END;
|
||||
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
|
||||
xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
|
||||
writeNoHandshake(XON_CHAR);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
uint8_t MarlinSerial::availableForWrite(void) {
|
||||
CRITICAL_SECTION_START;
|
||||
const uint8_t h = tx_buffer.head,
|
||||
t = tx_buffer.tail;
|
||||
const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
|
||||
CRITICAL_SECTION_END;
|
||||
return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
|
||||
}
|
||||
|
||||
void MarlinSerial::write(const uint8_t c) {
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
const uint8_t state = xon_xoff_state;
|
||||
if (!(state & XON_XOFF_CHAR_SENT)) {
|
||||
// Send 2 chars: XON/XOFF, then a user-specified char
|
||||
writeNoHandshake(state & XON_XOFF_CHAR_MASK);
|
||||
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
|
||||
}
|
||||
#endif
|
||||
writeNoHandshake(c);
|
||||
}
|
||||
|
||||
void MarlinSerial::writeNoHandshake(const uint8_t c) {
|
||||
_written = true;
|
||||
CRITICAL_SECTION_START;
|
||||
bool emty = (tx_buffer.head == tx_buffer.tail);
|
||||
CRITICAL_SECTION_END;
|
||||
|
||||
// If the buffer and the data register is empty, just write the byte
|
||||
// to the data register and be done. This shortcut helps
|
||||
// significantly improve the effective datarate at high (>
|
||||
@@ -320,7 +445,8 @@
|
||||
// space for us.
|
||||
if (TEST(M_UCSRxA, M_UDREx))
|
||||
_tx_udr_empty_irq();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// nop, the interrupt handler will free up space for us
|
||||
}
|
||||
}
|
||||
@@ -352,20 +478,32 @@
|
||||
}
|
||||
// If we get here, nothing is queued anymore (DRIE is disabled) and
|
||||
// the hardware finished tranmission (TXC is set).
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
void MarlinSerial::write(uint8_t c) {
|
||||
while (!TEST(M_UCSRxA, M_UDREx))
|
||||
;
|
||||
#else // TX_BUFFER_SIZE == 0
|
||||
|
||||
void MarlinSerial::write(const uint8_t c) {
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
// Do a priority insertion of an XON/XOFF char, if needed.
|
||||
const uint8_t state = xon_xoff_state;
|
||||
if (!(state & XON_XOFF_CHAR_SENT)) {
|
||||
writeNoHandshake(state & XON_XOFF_CHAR_MASK);
|
||||
xon_xoff_state = state | XON_XOFF_CHAR_SENT;
|
||||
}
|
||||
#endif
|
||||
writeNoHandshake(c);
|
||||
}
|
||||
|
||||
void MarlinSerial::writeNoHandshake(uint8_t c) {
|
||||
while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
|
||||
M_UDRx = c;
|
||||
}
|
||||
#endif
|
||||
|
||||
// end NEW
|
||||
|
||||
/// imports from print.h
|
||||
#endif // TX_BUFFER_SIZE == 0
|
||||
|
||||
/**
|
||||
* Imports from print.h
|
||||
*/
|
||||
|
||||
void MarlinSerial::print(char c, int base) {
|
||||
print((long)c, base);
|
||||
|
||||
+34
-38
@@ -75,44 +75,31 @@
|
||||
#define BIN 2
|
||||
#define BYTE 0
|
||||
|
||||
// Define constants and variables for buffering serial data.
|
||||
// Use only 0 or powers of 2 greater than 1
|
||||
// : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
|
||||
#ifndef RX_BUFFER_SIZE
|
||||
#define RX_BUFFER_SIZE 128
|
||||
#endif
|
||||
// 256 is the max TX buffer limit due to uint8_t head and tail.
|
||||
#ifndef TX_BUFFER_SIZE
|
||||
#define TX_BUFFER_SIZE 32
|
||||
#endif
|
||||
|
||||
#ifndef USBCON
|
||||
// Define constants and variables for buffering incoming serial data. We're
|
||||
// using a ring buffer (I think), in which rx_buffer_head is the index of the
|
||||
// location to which to write the next incoming character and rx_buffer_tail
|
||||
// is the index of the location from which to read.
|
||||
// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
|
||||
#ifndef RX_BUFFER_SIZE
|
||||
#define RX_BUFFER_SIZE 128
|
||||
#endif
|
||||
#ifndef TX_BUFFER_SIZE
|
||||
#define TX_BUFFER_SIZE 32
|
||||
#endif
|
||||
#if !((RX_BUFFER_SIZE == 256) ||(RX_BUFFER_SIZE == 128) ||(RX_BUFFER_SIZE == 64) ||(RX_BUFFER_SIZE == 32) ||(RX_BUFFER_SIZE == 16) ||(RX_BUFFER_SIZE == 8) ||(RX_BUFFER_SIZE == 4) ||(RX_BUFFER_SIZE == 2))
|
||||
#error "RX_BUFFER_SIZE has to be a power of 2 and >= 2"
|
||||
#endif
|
||||
#if !((TX_BUFFER_SIZE == 256) ||(TX_BUFFER_SIZE == 128) ||(TX_BUFFER_SIZE == 64) ||(TX_BUFFER_SIZE == 32) ||(TX_BUFFER_SIZE == 16) ||(TX_BUFFER_SIZE == 8) ||(TX_BUFFER_SIZE == 4) ||(TX_BUFFER_SIZE == 2) ||(TX_BUFFER_SIZE == 0))
|
||||
#error TX_BUFFER_SIZE has to be a power of 2 or 0
|
||||
|
||||
#if RX_BUFFER_SIZE > 256
|
||||
typedef uint16_t ring_buffer_pos_t;
|
||||
#else
|
||||
typedef uint8_t ring_buffer_pos_t;
|
||||
#endif
|
||||
|
||||
struct ring_buffer_r {
|
||||
unsigned char buffer[RX_BUFFER_SIZE];
|
||||
volatile uint8_t head;
|
||||
volatile uint8_t tail;
|
||||
};
|
||||
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
struct ring_buffer_t {
|
||||
unsigned char buffer[TX_BUFFER_SIZE];
|
||||
volatile uint8_t head;
|
||||
volatile uint8_t tail;
|
||||
};
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
extern uint8_t rx_dropped_bytes;
|
||||
#endif
|
||||
|
||||
#if UART_PRESENT(SERIAL_PORT)
|
||||
extern ring_buffer_r rx_buffer;
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
extern ring_buffer_t tx_buffer;
|
||||
#endif
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
extern ring_buffer_pos_t rx_max_enqueued;
|
||||
#endif
|
||||
|
||||
class MarlinSerial { //: public Stream
|
||||
@@ -124,23 +111,32 @@
|
||||
static int peek(void);
|
||||
static int read(void);
|
||||
static void flush(void);
|
||||
static uint8_t available(void);
|
||||
static ring_buffer_pos_t available(void);
|
||||
static void checkRx(void);
|
||||
static void write(const uint8_t c);
|
||||
#if TX_BUFFER_SIZE > 0
|
||||
static uint8_t availableForWrite(void);
|
||||
static void flushTX(void);
|
||||
#endif
|
||||
static void writeNoHandshake(const uint8_t c);
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
|
||||
#endif
|
||||
|
||||
#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
|
||||
FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
static void printNumber(unsigned long, const uint8_t);
|
||||
static void printFloat(double, uint8_t);
|
||||
|
||||
public:
|
||||
static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
|
||||
static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
static FORCE_INLINE void print(const char* str) { write(str); }
|
||||
FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
|
||||
FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
|
||||
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
|
||||
FORCE_INLINE static void print(const char* str) { write(str); }
|
||||
|
||||
static void print(char, int = BYTE);
|
||||
static void print(unsigned char, int = BYTE);
|
||||
|
||||
+4763
-2975
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,349 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This module is off by default, but can be enabled to facilitate the display of
|
||||
* extra debug information during code development. It assumes the existence of a
|
||||
* Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
|
||||
* http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
|
||||
*
|
||||
* Just connect up +5v and GND to give it power, then connect up the pins assigned
|
||||
* in Configuration_adv.h. For example, on the Re-ARM you could use:
|
||||
*
|
||||
* #define MAX7219_CLK_PIN 77
|
||||
* #define MAX7219_DIN_PIN 78
|
||||
* #define MAX7219_LOAD_PIN 79
|
||||
*
|
||||
* Max7219_init() is called automatically at startup, and then there are a number of
|
||||
* support functions available to control the LEDs in the 8x8 grid.
|
||||
*
|
||||
* void Max7219_init();
|
||||
* void Max7219_PutByte(uint8_t data);
|
||||
* void Max7219(uint8_t reg, uint8_t data);
|
||||
* void Max7219_LED_On(uint8_t col, uint8_t row);
|
||||
* void Max7219_LED_Off(uint8_t col, uint8_t row);
|
||||
* void Max7219_LED_Toggle(uint8_t col, uint8_t row);
|
||||
* void Max7219_Clear_Row(uint8_t row);
|
||||
* void Max7219_Clear_Column(uint8_t col);
|
||||
* void Max7219_Set_Row(uint8_t row, uint8_t val);
|
||||
* void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
|
||||
* void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
|
||||
* void Max7219_Set_Column(uint8_t col, uint8_t val);
|
||||
* void Max7219_idle_tasks();
|
||||
*/
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(MAX7219_DEBUG)
|
||||
|
||||
#include "Max7219_Debug_LEDs.h"
|
||||
|
||||
#include "planner.h"
|
||||
#include "stepper.h"
|
||||
#include "Marlin.h"
|
||||
|
||||
static uint8_t LEDs[8] = { 0 };
|
||||
|
||||
#ifdef CPU_32_BIT
|
||||
#define MS_DELAY() delayMicroseconds(5) // 32-bit processors need a delay to stabilize the signal
|
||||
#else
|
||||
#define MS_DELAY() NOOP
|
||||
#endif
|
||||
|
||||
void Max7219_PutByte(uint8_t data) {
|
||||
CRITICAL_SECTION_START
|
||||
for (uint8_t i = 8; i--;) {
|
||||
MS_DELAY();
|
||||
WRITE(MAX7219_CLK_PIN, LOW); // tick
|
||||
MS_DELAY();
|
||||
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
|
||||
MS_DELAY();
|
||||
WRITE(MAX7219_CLK_PIN, HIGH); // tock
|
||||
MS_DELAY();
|
||||
data <<= 1;
|
||||
}
|
||||
CRITICAL_SECTION_END
|
||||
}
|
||||
|
||||
void Max7219(const uint8_t reg, const uint8_t data) {
|
||||
MS_DELAY();
|
||||
CRITICAL_SECTION_START
|
||||
WRITE(MAX7219_LOAD_PIN, LOW); // begin
|
||||
MS_DELAY();
|
||||
Max7219_PutByte(reg); // specify register
|
||||
MS_DELAY();
|
||||
Max7219_PutByte(data); // put data
|
||||
MS_DELAY();
|
||||
WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
|
||||
MS_DELAY();
|
||||
WRITE(MAX7219_LOAD_PIN, HIGH);
|
||||
CRITICAL_SECTION_END
|
||||
MS_DELAY();
|
||||
}
|
||||
|
||||
void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
|
||||
if (row > 7 || col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_LED_Set(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (int)col);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
|
||||
if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
|
||||
Max7219(8 - row, LEDs[row]);
|
||||
}
|
||||
|
||||
void Max7219_LED_On(const uint8_t col, const uint8_t row) {
|
||||
if (row > 7 || col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_LED_On(", (int)col);
|
||||
SERIAL_ECHOPAIR(",", (int)row);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
Max7219_LED_Set(col, row, true);
|
||||
}
|
||||
|
||||
void Max7219_LED_Off(const uint8_t col, const uint8_t row) {
|
||||
if (row > 7 || col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_LED_Off(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (int)col);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
Max7219_LED_Set(col, row, false);
|
||||
}
|
||||
|
||||
void Max7219_LED_Toggle(const uint8_t col, const uint8_t row) {
|
||||
if (row > 7 || col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_LED_Toggle(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (int)col);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
if (TEST(LEDs[row], col))
|
||||
Max7219_LED_Off(col, row);
|
||||
else
|
||||
Max7219_LED_On(col, row);
|
||||
}
|
||||
|
||||
void Max7219_Clear_Column(const uint8_t col) {
|
||||
if (col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Clear_Column(", (int)col);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
LEDs[col] = 0;
|
||||
Max7219(8 - col, LEDs[col]);
|
||||
}
|
||||
|
||||
void Max7219_Clear_Row(const uint8_t row) {
|
||||
if (row > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Clear_Row(", (int)row);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
for (uint8_t c = 0; c <= 7; c++)
|
||||
Max7219_LED_Off(c, row);
|
||||
}
|
||||
|
||||
void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
|
||||
if (row > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Set_Row(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (int)val);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
for (uint8_t b = 0; b <= 7; b++)
|
||||
if (TEST(val, b))
|
||||
Max7219_LED_On(7 - b, row);
|
||||
else
|
||||
Max7219_LED_Off(7 - b, row);
|
||||
}
|
||||
|
||||
void Max7219_Set_2_Rows(const uint8_t row, const uint16_t val) {
|
||||
if (row > 6) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Set_2_Rows(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (int)val);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
|
||||
Max7219_Set_Row(row + 0, (val ) & 0xFF);
|
||||
}
|
||||
|
||||
void Max7219_Set_4_Rows(const uint8_t row, const uint32_t val) {
|
||||
if (row > 4) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Set_4_Rows(", (int)row);
|
||||
SERIAL_ECHOPAIR(",", (long)val);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
Max7219_Set_Row(row + 3, (val >> 24) & 0xFF);
|
||||
Max7219_Set_Row(row + 2, (val >> 16) & 0xFF);
|
||||
Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
|
||||
Max7219_Set_Row(row + 0, (val ) & 0xFF);
|
||||
}
|
||||
|
||||
void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
|
||||
if (col > 7) {
|
||||
SERIAL_ECHOPAIR("??? Max7219_Column(", (int)col);
|
||||
SERIAL_ECHOPAIR(",", (int)val);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
return;
|
||||
}
|
||||
LEDs[col] = val;
|
||||
Max7219(8 - col, LEDs[col]);
|
||||
}
|
||||
|
||||
void Max7219_init() {
|
||||
uint8_t i, x, y;
|
||||
|
||||
SET_OUTPUT(MAX7219_DIN_PIN);
|
||||
SET_OUTPUT(MAX7219_CLK_PIN);
|
||||
|
||||
OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
|
||||
delay(1);
|
||||
|
||||
//initiation of the max 7219
|
||||
Max7219(max7219_reg_scanLimit, 0x07);
|
||||
Max7219(max7219_reg_decodeMode, 0x00); // using an led matrix (not digits)
|
||||
Max7219(max7219_reg_shutdown, 0x01); // not in shutdown mode
|
||||
Max7219(max7219_reg_displayTest, 0x00); // no display test
|
||||
Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
|
||||
// range: 0x00 to 0x0F
|
||||
for (i = 0; i <= 7; i++) { // empty registers, turn all LEDs off
|
||||
LEDs[i] = 0x00;
|
||||
Max7219(i + 1, 0);
|
||||
}
|
||||
|
||||
for (x = 0; x <= 7; x++) // Do an aesthetically pleasing pattern to fully test
|
||||
for (y = 0; y <= 7; y++) { // the Max7219 module and LEDs. First, turn them
|
||||
Max7219_LED_On(x, y); // all on.
|
||||
delay(3);
|
||||
}
|
||||
|
||||
for (x = 0; x <= 7; x++) // Now, turn them all off.
|
||||
for (y = 0; y <= 7; y++) {
|
||||
Max7219_LED_Off(x, y);
|
||||
delay(3); // delay() is OK here. Max7219_init() is only called from
|
||||
} // setup() and nothing is running yet.
|
||||
|
||||
delay(150);
|
||||
|
||||
for (x = 8; x--;) // Now, do the same thing from the opposite direction
|
||||
for (y = 0; y <= 7; y++) {
|
||||
Max7219_LED_On(x, y);
|
||||
delay(2);
|
||||
}
|
||||
|
||||
for (x = 8; x--;)
|
||||
for (y = 0; y <= 7; y++) {
|
||||
Max7219_LED_Off(x, y);
|
||||
delay(2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
|
||||
* There is very little CPU burden added to the system by displaying information within the idle()
|
||||
* task.
|
||||
*
|
||||
* But with that said, if your debugging can be facilitated by making calls into the library from
|
||||
* other places in the code, feel free to do it. The CPU burden for a few calls to toggle an LED
|
||||
* or clear a row is not very significant.
|
||||
*/
|
||||
void Max7219_idle_tasks() {
|
||||
#if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
|
||||
CRITICAL_SECTION_START
|
||||
#if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_QUEUE
|
||||
const uint8_t head = planner.block_buffer_head;
|
||||
#endif
|
||||
#if MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
|
||||
const uint8_t tail = planner.block_buffer_tail;
|
||||
#endif
|
||||
CRITICAL_SECTION_END
|
||||
#endif
|
||||
|
||||
#if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
|
||||
static millis_t next_blink = 0;
|
||||
if (ELAPSED(millis(), next_blink)) {
|
||||
Max7219_LED_Toggle(7, 7);
|
||||
next_blink = millis() + 750;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_DEBUG_STEPPER_HEAD
|
||||
static int16_t last_head_cnt = 0;
|
||||
if (last_head_cnt != head) {
|
||||
if (last_head_cnt < 8)
|
||||
Max7219_LED_Off(last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
|
||||
else
|
||||
Max7219_LED_Off(last_head_cnt - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
|
||||
|
||||
last_head_cnt = head;
|
||||
if (head < 8)
|
||||
Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
|
||||
else
|
||||
Max7219_LED_On(head - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_DEBUG_STEPPER_TAIL
|
||||
static int16_t last_tail_cnt = 0;
|
||||
if (last_tail_cnt != tail) {
|
||||
if (last_tail_cnt < 8)
|
||||
Max7219_LED_Off(last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
|
||||
else
|
||||
Max7219_LED_Off(last_tail_cnt - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
|
||||
|
||||
last_tail_cnt = tail;
|
||||
if (tail < 8)
|
||||
Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
|
||||
else
|
||||
Max7219_LED_On(tail - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_DEBUG_STEPPER_QUEUE
|
||||
static int16_t last_depth = 0;
|
||||
int16_t current_depth = head - tail;
|
||||
if (current_depth != last_depth) { // usually, no update will be needed.
|
||||
if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
|
||||
NOMORE(current_depth, BLOCK_BUFFER_SIZE);
|
||||
NOMORE(current_depth, 16); // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
|
||||
// of LEDs is enough to see if the buffer is draining
|
||||
|
||||
const uint8_t st = min(current_depth, last_depth),
|
||||
en = max(current_depth, last_depth);
|
||||
if (current_depth < last_depth)
|
||||
for (uint8_t i = st; i <= en; i++) // clear the highest order LEDs
|
||||
Max7219_LED_Off(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
|
||||
else
|
||||
for (uint8_t i = st; i <= en; i++) // set the LEDs to current depth
|
||||
Max7219_LED_On(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
|
||||
|
||||
last_depth = current_depth;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // MAX7219_DEBUG
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This module is off by default, but can be enabled to facilitate the display of
|
||||
* extra debug information during code development. It assumes the existence of a
|
||||
* Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
|
||||
* http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
|
||||
*
|
||||
* Just connect up +5v and GND to give it power, then connect up the pins assigned
|
||||
* in Configuration_adv.h. For example, on the Re-ARM you could use:
|
||||
*
|
||||
* #define MAX7219_CLK_PIN 77
|
||||
* #define MAX7219_DIN_PIN 78
|
||||
* #define MAX7219_LOAD_PIN 79
|
||||
*
|
||||
* Max7219_init() is called automatically at startup, and then there are a number of
|
||||
* support functions available to control the LEDs in the 8x8 grid.
|
||||
*
|
||||
* void Max7219_init();
|
||||
* void Max7219_PutByte(uint8_t data);
|
||||
* void Max7219(uint8_t reg, uint8_t data);
|
||||
* void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
|
||||
* void Max7219_LED_On(uint8_t col, uint8_t row);
|
||||
* void Max7219_LED_Off(uint8_t col, uint8_t row);
|
||||
* void Max7219_LED_Toggle(uint8_t row, uint8_t col);
|
||||
* void Max7219_Clear_Row(uint8_t row);
|
||||
* void Max7219_Clear_Column(uint8_t col);
|
||||
* void Max7219_Set_Row(uint8_t row, uint8_t val);
|
||||
* void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
|
||||
* void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
|
||||
* void Max7219_Set_Column(uint8_t col, uint8_t val);
|
||||
* void Max7219_idle_tasks();
|
||||
*/
|
||||
|
||||
#ifndef __MAX7219_DEBUG_LEDS_H__
|
||||
#define __MAX7219_DEBUG_LEDS_H__
|
||||
|
||||
//
|
||||
// define max7219 registers
|
||||
//
|
||||
#define max7219_reg_noop 0x00
|
||||
#define max7219_reg_digit0 0x01
|
||||
#define max7219_reg_digit1 0x02
|
||||
#define max7219_reg_digit2 0x03
|
||||
#define max7219_reg_digit3 0x04
|
||||
#define max7219_reg_digit4 0x05
|
||||
#define max7219_reg_digit5 0x06
|
||||
#define max7219_reg_digit6 0x07
|
||||
#define max7219_reg_digit7 0x08
|
||||
|
||||
#define max7219_reg_intensity 0x0A
|
||||
#define max7219_reg_displayTest 0x0F
|
||||
#define max7219_reg_decodeMode 0x09
|
||||
#define max7219_reg_scanLimit 0x0B
|
||||
#define max7219_reg_shutdown 0x0C
|
||||
|
||||
void Max7219_init();
|
||||
void Max7219_PutByte(uint8_t data);
|
||||
void Max7219(const uint8_t reg, const uint8_t data);
|
||||
void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
|
||||
void Max7219_LED_On(const uint8_t row, const uint8_t col);
|
||||
void Max7219_LED_Off(const uint8_t row, const uint8_t col);
|
||||
void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
|
||||
void Max7219_Clear_Row(const uint8_t row);
|
||||
void Max7219_Clear_Column(const uint8_t col);
|
||||
void Max7219_Set_Row(const uint8_t row, const uint8_t val);
|
||||
void Max7219_Set_Column(const uint8_t col, const uint8_t val);
|
||||
void Max7219_idle_tasks();
|
||||
|
||||
#endif // __MAX7219_DEBUG_LEDS_H__
|
||||
+656
-284
File diff suppressed because it is too large
Load Diff
+161
-175
@@ -26,19 +26,19 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#include "Sd2Card.h"
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
#include "watchdog.h"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#if DISABLED(SOFTWARE_SPI)
|
||||
// functions for hardware SPI
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// make sure SPCR rate is in expected bits
|
||||
#if (SPR0 != 0 || SPR1 != 1)
|
||||
#error "unexpected SPCR bits"
|
||||
@@ -52,34 +52,34 @@
|
||||
SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
|
||||
SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** SPI receive a byte */
|
||||
static uint8_t spiRec() {
|
||||
SPDR = 0XFF;
|
||||
SPDR = 0xFF;
|
||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||
return SPDR;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** SPI read data - only one call so force inline */
|
||||
static inline __attribute__((always_inline))
|
||||
void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||
if (nbyte-- == 0) return;
|
||||
SPDR = 0XFF;
|
||||
SPDR = 0xFF;
|
||||
for (uint16_t i = 0; i < nbyte; i++) {
|
||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||
buf[i] = SPDR;
|
||||
SPDR = 0XFF;
|
||||
SPDR = 0xFF;
|
||||
}
|
||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||
buf[nbyte] = SPDR;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** SPI send a byte */
|
||||
static void spiSend(uint8_t b) {
|
||||
SPDR = b;
|
||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** SPI send block - only one call so force inline */
|
||||
static inline __attribute__((always_inline))
|
||||
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||
@@ -95,15 +95,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
#else // SOFTWARE_SPI
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** nop to tune soft SPI timing */
|
||||
#define nop asm volatile ("nop\n\t")
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Soft SPI receive byte */
|
||||
static uint8_t spiRec() {
|
||||
uint8_t data = 0;
|
||||
// no interrupts during byte receive - about 8 us
|
||||
cli();
|
||||
// output pin high - like sending 0XFF
|
||||
// output pin high - like sending 0xFF
|
||||
WRITE(SPI_MOSI_PIN, HIGH);
|
||||
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
@@ -123,13 +124,13 @@
|
||||
sei();
|
||||
return data;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Soft SPI read data */
|
||||
static void spiRead(uint8_t* buf, uint16_t nbyte) {
|
||||
for (uint16_t i = 0; i < nbyte; i++)
|
||||
buf[i] = spiRec();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Soft SPI send byte */
|
||||
static void spiSend(uint8_t data) {
|
||||
// no interrupts during byte send - about 8 us
|
||||
@@ -137,7 +138,7 @@
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
WRITE(SPI_SCK_PIN, LOW);
|
||||
|
||||
WRITE(SPI_MOSI_PIN, data & 0X80);
|
||||
WRITE(SPI_MOSI_PIN, data & 0x80);
|
||||
|
||||
data <<= 1;
|
||||
|
||||
@@ -153,7 +154,7 @@
|
||||
// enable interrupts
|
||||
sei();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Soft SPI send block */
|
||||
void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
||||
spiSend(token);
|
||||
@@ -161,7 +162,7 @@
|
||||
spiSend(buf[i]);
|
||||
}
|
||||
#endif // SOFTWARE_SPI
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// send command and return error code. Return zero for OK
|
||||
uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
|
||||
// select card
|
||||
@@ -177,19 +178,19 @@ uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
|
||||
for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s);
|
||||
|
||||
// send CRC
|
||||
uint8_t crc = 0XFF;
|
||||
if (cmd == CMD0) crc = 0X95; // correct crc for CMD0 with arg 0
|
||||
if (cmd == CMD8) crc = 0X87; // correct crc for CMD8 with arg 0X1AA
|
||||
uint8_t crc = 0xFF;
|
||||
if (cmd == CMD0) crc = 0x95; // correct crc for CMD0 with arg 0
|
||||
if (cmd == CMD8) crc = 0x87; // correct crc for CMD8 with arg 0x1AA
|
||||
spiSend(crc);
|
||||
|
||||
// skip stuff byte for stop read
|
||||
if (cmd == CMD12) spiRec();
|
||||
|
||||
// wait for response
|
||||
for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++) { /* Intentionally left empty */ }
|
||||
for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
|
||||
return status_;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Determine the size of an SD flash memory card.
|
||||
*
|
||||
@@ -217,19 +218,20 @@ uint32_t Sd2Card::cardSize() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void Sd2Card::chipSelectHigh() {
|
||||
digitalWrite(chipSelectPin_, HIGH);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void Sd2Card::chipSelectLow() {
|
||||
#if DISABLED(SOFTWARE_SPI)
|
||||
spiInit(spiRate_);
|
||||
#endif // SOFTWARE_SPI
|
||||
digitalWrite(chipSelectPin_, LOW);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Erase a range of blocks.
|
||||
|
||||
/**
|
||||
* Erase a range of blocks.
|
||||
*
|
||||
* \param[in] firstBlock The address of the first block in the range.
|
||||
* \param[in] lastBlock The address of the last block in the range.
|
||||
@@ -239,12 +241,11 @@ void Sd2Card::chipSelectLow() {
|
||||
* either 0 or 1, depends on the card vendor. The card must support
|
||||
* single block erase.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
|
||||
csd_t csd;
|
||||
if (!readCSD(&csd)) goto fail;
|
||||
if (!readCSD(&csd)) goto FAIL;
|
||||
// check for single block erase
|
||||
if (!csd.v1.erase_blk_en) {
|
||||
// erase size mask
|
||||
@@ -252,7 +253,7 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
|
||||
if ((firstBlock & m) != 0 || ((lastBlock + 1) & m) != 0) {
|
||||
// error card can't erase specified area
|
||||
error(SD_CARD_ERROR_ERASE_SINGLE_BLOCK);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
if (type_ != SD_CARD_TYPE_SDHC) {
|
||||
@@ -263,38 +264,38 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
|
||||
|| cardCommand(CMD33, lastBlock)
|
||||
|| cardCommand(CMD38, 0)) {
|
||||
error(SD_CARD_ERROR_ERASE);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
if (!waitNotBusy(SD_ERASE_TIMEOUT)) {
|
||||
error(SD_CARD_ERROR_ERASE_TIMEOUT);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
FAIL:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Determine if card supports single block erase.
|
||||
|
||||
/**
|
||||
* Determine if card supports single block erase.
|
||||
*
|
||||
* \return The value one, true, is returned if single block erase is supported.
|
||||
* The value zero, false, is returned if single block erase is not supported.
|
||||
* \return true if single block erase is supported.
|
||||
* false if single block erase is not supported.
|
||||
*/
|
||||
bool Sd2Card::eraseSingleBlockEnable() {
|
||||
csd_t csd;
|
||||
return readCSD(&csd) ? csd.v1.erase_blk_en : false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Initialize an SD flash memory card.
|
||||
*
|
||||
* \param[in] sckRateID SPI clock rate selector. See setSckRate().
|
||||
* \param[in] chipSelectPin SD chip select pin number.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure. The reason for failure
|
||||
* can be determined by calling errorCode() and errorData().
|
||||
* \return true for success, false for failure.
|
||||
* The reason for failure can be determined by calling errorCode() and errorData().
|
||||
*/
|
||||
bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
|
||||
errorCode_ = type_ = 0;
|
||||
@@ -329,13 +330,13 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
|
||||
#endif // SOFTWARE_SPI
|
||||
|
||||
// must supply min of 74 clock cycles with CS high.
|
||||
for (uint8_t i = 0; i < 10; i++) spiSend(0XFF);
|
||||
for (uint8_t i = 0; i < 10; i++) spiSend(0xFF);
|
||||
|
||||
// command to go idle in SPI mode
|
||||
while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) {
|
||||
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
|
||||
error(SD_CARD_ERROR_CMD0);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
// check SD version
|
||||
@@ -345,29 +346,29 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
|
||||
else {
|
||||
// only need last byte of r7 response
|
||||
for (uint8_t i = 0; i < 4; i++) status_ = spiRec();
|
||||
if (status_ != 0XAA) {
|
||||
if (status_ != 0xAA) {
|
||||
error(SD_CARD_ERROR_CMD8);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
type(SD_CARD_TYPE_SD2);
|
||||
}
|
||||
// initialize card and send host supports SDHC if SD2
|
||||
arg = type() == SD_CARD_TYPE_SD2 ? 0X40000000 : 0;
|
||||
arg = type() == SD_CARD_TYPE_SD2 ? 0x40000000 : 0;
|
||||
|
||||
while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
|
||||
// check for timeout
|
||||
if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
|
||||
error(SD_CARD_ERROR_ACMD41);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
// if SD2 read OCR register to check for SDHC card
|
||||
if (type() == SD_CARD_TYPE_SD2) {
|
||||
if (cardCommand(CMD58, 0)) {
|
||||
error(SD_CARD_ERROR_CMD58);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
if ((spiRec() & 0XC0) == 0XC0) type(SD_CARD_TYPE_SDHC);
|
||||
if ((spiRec() & 0xC0) == 0xC0) type(SD_CARD_TYPE_SDHC);
|
||||
// discard rest of ocr - contains allowed voltage range
|
||||
for (uint8_t i = 0; i < 3; i++) spiRec();
|
||||
}
|
||||
@@ -380,18 +381,17 @@ bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
|
||||
return true;
|
||||
#endif // SOFTWARE_SPI
|
||||
|
||||
fail:
|
||||
FAIL:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Read a 512 byte block from an SD card.
|
||||
*
|
||||
* \param[in] blockNumber Logical block to be read.
|
||||
* \param[out] dst Pointer to the location that will receive the data.
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
|
||||
// use address if not SDHC card
|
||||
@@ -399,19 +399,18 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
|
||||
|
||||
#if ENABLED(SD_CHECK_AND_RETRY)
|
||||
uint8_t retryCnt = 3;
|
||||
do {
|
||||
if (!cardCommand(CMD17, blockNumber)) {
|
||||
if (readData(dst, 512)) return true;
|
||||
}
|
||||
else
|
||||
for(;;) {
|
||||
if (cardCommand(CMD17, blockNumber))
|
||||
error(SD_CARD_ERROR_CMD17);
|
||||
else if (readData(dst, 512))
|
||||
return true;
|
||||
|
||||
if (!--retryCnt) break;
|
||||
|
||||
chipSelectHigh();
|
||||
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
|
||||
errorCode_ = 0;
|
||||
} while (true);
|
||||
}
|
||||
#else
|
||||
if (cardCommand(CMD17, blockNumber))
|
||||
error(SD_CARD_ERROR_CMD17);
|
||||
@@ -422,13 +421,13 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Read one data block in a multiple block read sequence
|
||||
|
||||
/**
|
||||
* Read one data block in a multiple block read sequence
|
||||
*
|
||||
* \param[in] dst Pointer to the location for the data to be read.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::readData(uint8_t* dst) {
|
||||
chipSelectLow();
|
||||
@@ -436,62 +435,61 @@ bool Sd2Card::readData(uint8_t* dst) {
|
||||
}
|
||||
|
||||
#if ENABLED(SD_CHECK_AND_RETRY)
|
||||
static const uint16_t crctab[] PROGMEM = {
|
||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
||||
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
|
||||
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
|
||||
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
|
||||
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
|
||||
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
|
||||
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
|
||||
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
|
||||
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
|
||||
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
|
||||
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
|
||||
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
|
||||
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
|
||||
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
|
||||
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
|
||||
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
|
||||
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
|
||||
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
|
||||
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
|
||||
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
|
||||
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
|
||||
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
|
||||
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
|
||||
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
|
||||
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
|
||||
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
|
||||
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
|
||||
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
|
||||
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
|
||||
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
|
||||
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
|
||||
};
|
||||
static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
|
||||
uint16_t crc = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0XFF]) ^ (crc << 8);
|
||||
static const uint16_t crctab[] PROGMEM = {
|
||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
||||
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
|
||||
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
|
||||
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
|
||||
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
|
||||
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
|
||||
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
|
||||
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
|
||||
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
|
||||
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
|
||||
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
|
||||
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
|
||||
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
|
||||
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
|
||||
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
|
||||
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
|
||||
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
|
||||
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
|
||||
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
|
||||
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
|
||||
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
|
||||
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
|
||||
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
|
||||
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
|
||||
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
|
||||
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
|
||||
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
|
||||
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
|
||||
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
|
||||
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
|
||||
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
|
||||
};
|
||||
static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
|
||||
uint16_t crc = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
#endif
|
||||
#endif // SD_CHECK_AND_RETRY
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
|
||||
// wait for start block token
|
||||
uint16_t t0 = millis();
|
||||
while ((status_ = spiRec()) == 0XFF) {
|
||||
if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) {
|
||||
error(SD_CARD_ERROR_READ_TIMEOUT);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
if (status_ != DATA_START_BLOCK) {
|
||||
error(SD_CARD_ERROR_READ);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
// transfer data
|
||||
spiRead(dst, count);
|
||||
@@ -503,7 +501,7 @@ bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
|
||||
recvCrc |= spiRec();
|
||||
if (calcCrc != recvCrc) {
|
||||
error(SD_CARD_ERROR_CRC);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -515,67 +513,61 @@ bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
|
||||
// Send an additional dummy byte, required by Toshiba Flash Air SD Card
|
||||
spiSend(0XFF);
|
||||
return true;
|
||||
fail:
|
||||
FAIL:
|
||||
chipSelectHigh();
|
||||
// Send an additional dummy byte, required by Toshiba Flash Air SD Card
|
||||
spiSend(0XFF);
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** read CID or CSR register */
|
||||
bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
|
||||
uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
|
||||
if (cardCommand(cmd, 0)) {
|
||||
error(SD_CARD_ERROR_READ_REG);
|
||||
goto fail;
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
return readData(dst, 16);
|
||||
fail:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Start a read multiple blocks sequence.
|
||||
|
||||
/**
|
||||
* Start a read multiple blocks sequence.
|
||||
*
|
||||
* \param[in] blockNumber Address of first block in sequence.
|
||||
*
|
||||
* \note This function is used with readData() and readStop() for optimized
|
||||
* multiple block reads. SPI chipSelect must be low for the entire sequence.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::readStart(uint32_t blockNumber) {
|
||||
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
|
||||
if (cardCommand(CMD18, blockNumber)) {
|
||||
error(SD_CARD_ERROR_CMD18);
|
||||
goto fail;
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** End a read multiple blocks sequence.
|
||||
|
||||
/**
|
||||
* End a read multiple blocks sequence.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::readStop() {
|
||||
chipSelectLow();
|
||||
if (cardCommand(CMD12, 0)) {
|
||||
error(SD_CARD_ERROR_CMD12);
|
||||
goto fail;
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set the SPI clock rate.
|
||||
*
|
||||
@@ -596,70 +588,66 @@ bool Sd2Card::setSckRate(uint8_t sckRateID) {
|
||||
spiRate_ = sckRateID;
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// wait for card to go not busy
|
||||
bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
|
||||
uint16_t t0 = millis();
|
||||
while (spiRec() != 0XFF) {
|
||||
if (((uint16_t)millis() - t0) >= timeoutMillis) goto fail;
|
||||
}
|
||||
while (spiRec() != 0XFF)
|
||||
if (((uint16_t)millis() - t0) >= timeoutMillis) return false;
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Writes a 512 byte block to an SD card.
|
||||
*
|
||||
* \param[in] blockNumber Logical block to be written.
|
||||
* \param[in] src Pointer to the location of the data to be written.
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
|
||||
// use address if not SDHC card
|
||||
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
|
||||
if (cardCommand(CMD24, blockNumber)) {
|
||||
error(SD_CARD_ERROR_CMD24);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
if (!writeData(DATA_START_BLOCK, src)) goto fail;
|
||||
if (!writeData(DATA_START_BLOCK, src)) goto FAIL;
|
||||
|
||||
// wait for flash programming to complete
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) {
|
||||
error(SD_CARD_ERROR_WRITE_TIMEOUT);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
// response is r2 so get and check two bytes for nonzero
|
||||
if (cardCommand(CMD13, 0) || spiRec()) {
|
||||
error(SD_CARD_ERROR_WRITE_PROGRAMMING);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
FAIL:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write one data block in a multiple block write sequence
|
||||
|
||||
/**
|
||||
* Write one data block in a multiple block write sequence
|
||||
* \param[in] src Pointer to the location of the data to be written.
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::writeData(const uint8_t* src) {
|
||||
chipSelectLow();
|
||||
// wait for previous write to finish
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail;
|
||||
if (!writeData(WRITE_MULTIPLE_TOKEN, src)) goto fail;
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT) || !writeData(WRITE_MULTIPLE_TOKEN, src)) {
|
||||
error(SD_CARD_ERROR_WRITE_MULTIPLE);
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
error(SD_CARD_ERROR_WRITE_MULTIPLE);
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// send one block of data for write block or write multiple blocks
|
||||
bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
|
||||
spiSendBlock(token, src);
|
||||
@@ -670,15 +658,14 @@ bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
|
||||
status_ = spiRec();
|
||||
if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
|
||||
error(SD_CARD_ERROR_WRITE);
|
||||
goto fail;
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
fail:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Start a write multiple blocks sequence.
|
||||
|
||||
/**
|
||||
* Start a write multiple blocks sequence.
|
||||
*
|
||||
* \param[in] blockNumber Address of first block in sequence.
|
||||
* \param[in] eraseCount The number of blocks to be pre-erased.
|
||||
@@ -686,44 +673,43 @@ fail:
|
||||
* \note This function is used with writeData() and writeStop()
|
||||
* for optimized multiple block writes.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
|
||||
// send pre-erase count
|
||||
if (cardAcmd(ACMD23, eraseCount)) {
|
||||
error(SD_CARD_ERROR_ACMD23);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
// use address if not SDHC card
|
||||
if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
|
||||
if (cardCommand(CMD25, blockNumber)) {
|
||||
error(SD_CARD_ERROR_CMD25);
|
||||
goto fail;
|
||||
goto FAIL;
|
||||
}
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
FAIL:
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** End a write multiple blocks sequence.
|
||||
|
||||
/**
|
||||
* End a write multiple blocks sequence.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
* \return true for success, false for failure.
|
||||
*/
|
||||
bool Sd2Card::writeStop() {
|
||||
chipSelectLow();
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail;
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
|
||||
spiSend(STOP_TRAN_TOKEN);
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail;
|
||||
if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
|
||||
chipSelectHigh();
|
||||
return true;
|
||||
fail:
|
||||
FAIL:
|
||||
error(SD_CARD_ERROR_STOP_TRAN);
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // SDSUPPORT
|
||||
|
||||
+86
-133
@@ -20,165 +20,119 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief Sd2Card class for V2 SD/SDHC cards
|
||||
*/
|
||||
|
||||
/**
|
||||
* Arduino Sd2Card Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#ifndef _SD2CARD_H_
|
||||
#define _SD2CARD_H_
|
||||
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#ifndef Sd2Card_h
|
||||
#define Sd2Card_h
|
||||
/**
|
||||
* \file
|
||||
* \brief Sd2Card class for V2 SD/SDHC cards
|
||||
*/
|
||||
#include "SdFatConfig.h"
|
||||
#include "SdInfo.h"
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
|
||||
/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */
|
||||
uint8_t const SPI_FULL_SPEED = 0;
|
||||
/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */
|
||||
uint8_t const SPI_HALF_SPEED = 1;
|
||||
/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */
|
||||
uint8_t const SPI_QUARTER_SPEED = 2;
|
||||
/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */
|
||||
uint8_t const SPI_EIGHTH_SPEED = 3;
|
||||
/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */
|
||||
uint8_t const SPI_SIXTEENTH_SPEED = 4;
|
||||
//------------------------------------------------------------------------------
|
||||
/** init timeout ms */
|
||||
uint16_t const SD_INIT_TIMEOUT = 2000;
|
||||
/** erase timeout ms */
|
||||
uint16_t const SD_ERASE_TIMEOUT = 10000;
|
||||
/** read timeout ms */
|
||||
uint16_t const SD_READ_TIMEOUT = 300;
|
||||
/** write time out ms */
|
||||
uint16_t const SD_WRITE_TIMEOUT = 600;
|
||||
//------------------------------------------------------------------------------
|
||||
uint8_t const SPI_FULL_SPEED = 0, // Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().
|
||||
SPI_HALF_SPEED = 1, // Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().
|
||||
SPI_QUARTER_SPEED = 2, // Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().
|
||||
SPI_EIGHTH_SPEED = 3, // Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().
|
||||
SPI_SIXTEENTH_SPEED = 4; // Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().
|
||||
|
||||
uint16_t const SD_INIT_TIMEOUT = 2000, // init timeout ms
|
||||
SD_ERASE_TIMEOUT = 10000, // erase timeout ms
|
||||
SD_READ_TIMEOUT = 300, // read timeout ms
|
||||
SD_WRITE_TIMEOUT = 600; // write time out ms
|
||||
|
||||
// SD card errors
|
||||
/** timeout error for command CMD0 (initialize card in SPI mode) */
|
||||
uint8_t const SD_CARD_ERROR_CMD0 = 0X1;
|
||||
/** CMD8 was not accepted - not a valid SD card*/
|
||||
uint8_t const SD_CARD_ERROR_CMD8 = 0X2;
|
||||
/** card returned an error response for CMD12 (write stop) */
|
||||
uint8_t const SD_CARD_ERROR_CMD12 = 0X3;
|
||||
/** card returned an error response for CMD17 (read block) */
|
||||
uint8_t const SD_CARD_ERROR_CMD17 = 0X4;
|
||||
/** card returned an error response for CMD18 (read multiple block) */
|
||||
uint8_t const SD_CARD_ERROR_CMD18 = 0X5;
|
||||
/** card returned an error response for CMD24 (write block) */
|
||||
uint8_t const SD_CARD_ERROR_CMD24 = 0X6;
|
||||
/** WRITE_MULTIPLE_BLOCKS command failed */
|
||||
uint8_t const SD_CARD_ERROR_CMD25 = 0X7;
|
||||
/** card returned an error response for CMD58 (read OCR) */
|
||||
uint8_t const SD_CARD_ERROR_CMD58 = 0X8;
|
||||
/** SET_WR_BLK_ERASE_COUNT failed */
|
||||
uint8_t const SD_CARD_ERROR_ACMD23 = 0X9;
|
||||
/** ACMD41 initialization process timeout */
|
||||
uint8_t const SD_CARD_ERROR_ACMD41 = 0XA;
|
||||
/** card returned a bad CSR version field */
|
||||
uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB;
|
||||
/** erase block group command failed */
|
||||
uint8_t const SD_CARD_ERROR_ERASE = 0XC;
|
||||
/** card not capable of single block erase */
|
||||
uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD;
|
||||
/** Erase sequence timed out */
|
||||
uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE;
|
||||
/** card returned an error token instead of read data */
|
||||
uint8_t const SD_CARD_ERROR_READ = 0XF;
|
||||
/** read CID or CSD failed */
|
||||
uint8_t const SD_CARD_ERROR_READ_REG = 0X10;
|
||||
/** timeout while waiting for start of read data */
|
||||
uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11;
|
||||
/** card did not accept STOP_TRAN_TOKEN */
|
||||
uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12;
|
||||
/** card returned an error token as a response to a write operation */
|
||||
uint8_t const SD_CARD_ERROR_WRITE = 0X13;
|
||||
/** attempt to write protected block zero */
|
||||
uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14; // REMOVE - not used
|
||||
/** card did not go ready for a multiple block write */
|
||||
uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15;
|
||||
/** card returned an error to a CMD13 status check after a write */
|
||||
uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16;
|
||||
/** timeout occurred during write programming */
|
||||
uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17;
|
||||
/** incorrect rate selected */
|
||||
uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18;
|
||||
/** init() not called */
|
||||
uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19;
|
||||
/** crc check error */
|
||||
uint8_t const SD_CARD_ERROR_CRC = 0X20;
|
||||
//------------------------------------------------------------------------------
|
||||
uint8_t const SD_CARD_ERROR_CMD0 = 0X1, // timeout error for command CMD0 (initialize card in SPI mode)
|
||||
SD_CARD_ERROR_CMD8 = 0X2, // CMD8 was not accepted - not a valid SD card
|
||||
SD_CARD_ERROR_CMD12 = 0X3, // card returned an error response for CMD12 (write stop)
|
||||
SD_CARD_ERROR_CMD17 = 0X4, // card returned an error response for CMD17 (read block)
|
||||
SD_CARD_ERROR_CMD18 = 0X5, // card returned an error response for CMD18 (read multiple block)
|
||||
SD_CARD_ERROR_CMD24 = 0X6, // card returned an error response for CMD24 (write block)
|
||||
SD_CARD_ERROR_CMD25 = 0X7, // WRITE_MULTIPLE_BLOCKS command failed
|
||||
SD_CARD_ERROR_CMD58 = 0X8, // card returned an error response for CMD58 (read OCR)
|
||||
SD_CARD_ERROR_ACMD23 = 0X9, // SET_WR_BLK_ERASE_COUNT failed
|
||||
SD_CARD_ERROR_ACMD41 = 0XA, // ACMD41 initialization process timeout
|
||||
SD_CARD_ERROR_BAD_CSD = 0XB, // card returned a bad CSR version field
|
||||
SD_CARD_ERROR_ERASE = 0XC, // erase block group command failed
|
||||
SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD, // card not capable of single block erase
|
||||
SD_CARD_ERROR_ERASE_TIMEOUT = 0XE, // Erase sequence timed out
|
||||
SD_CARD_ERROR_READ = 0XF, // card returned an error token instead of read data
|
||||
SD_CARD_ERROR_READ_REG = 0x10, // read CID or CSD failed
|
||||
SD_CARD_ERROR_READ_TIMEOUT = 0x11, // timeout while waiting for start of read data
|
||||
SD_CARD_ERROR_STOP_TRAN = 0x12, // card did not accept STOP_TRAN_TOKEN
|
||||
SD_CARD_ERROR_WRITE = 0x13, // card returned an error token as a response to a write operation
|
||||
SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14, // REMOVE - not used ... attempt to write protected block zero
|
||||
SD_CARD_ERROR_WRITE_MULTIPLE = 0x15, // card did not go ready for a multiple block write
|
||||
SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16, // card returned an error to a CMD13 status check after a write
|
||||
SD_CARD_ERROR_WRITE_TIMEOUT = 0x17, // timeout occurred during write programming
|
||||
SD_CARD_ERROR_SCK_RATE = 0x18, // incorrect rate selected
|
||||
SD_CARD_ERROR_INIT_NOT_CALLED = 0x19, // init() not called
|
||||
SD_CARD_ERROR_CRC = 0x20; // crc check error
|
||||
|
||||
// card types
|
||||
/** Standard capacity V1 SD card */
|
||||
uint8_t const SD_CARD_TYPE_SD1 = 1;
|
||||
/** Standard capacity V2 SD card */
|
||||
uint8_t const SD_CARD_TYPE_SD2 = 2;
|
||||
/** High Capacity SD card */
|
||||
uint8_t const SD_CARD_TYPE_SDHC = 3;
|
||||
uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card
|
||||
SD_CARD_TYPE_SD2 = 2, // Standard capacity V2 SD card
|
||||
SD_CARD_TYPE_SDHC = 3; // High Capacity SD card
|
||||
|
||||
/**
|
||||
* define SOFTWARE_SPI to use bit-bang SPI
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
#if MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__))
|
||||
#if MEGA_SOFT_SPI
|
||||
#define SOFTWARE_SPI
|
||||
#elif USE_SOFTWARE_SPI
|
||||
#define SOFTWARE_SPI
|
||||
#endif // MEGA_SOFT_SPI
|
||||
//------------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
// SPI pin definitions - do not edit here - change in SdFatConfig.h
|
||||
//
|
||||
#if DISABLED(SOFTWARE_SPI)
|
||||
// hardware pin defs
|
||||
/** The default chip select pin for the SD card is SS. */
|
||||
#define SD_CHIP_SELECT_PIN SS_PIN
|
||||
#define SD_CHIP_SELECT_PIN SS_PIN // The default chip select pin for the SD card is SS.
|
||||
// The following three pins must not be redefined for hardware SPI.
|
||||
/** SPI Master Out Slave In pin */
|
||||
#define SPI_MOSI_PIN MOSI_PIN
|
||||
/** SPI Master In Slave Out pin */
|
||||
#define SPI_MISO_PIN MISO_PIN
|
||||
/** SPI Clock pin */
|
||||
#define SPI_SCK_PIN SCK_PIN
|
||||
|
||||
#define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
|
||||
#define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
|
||||
#define SPI_SCK_PIN SCK_PIN // SPI Clock pin
|
||||
#else // SOFTWARE_SPI
|
||||
|
||||
/** SPI chip select pin */
|
||||
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN
|
||||
/** SPI Master Out Slave In pin */
|
||||
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN
|
||||
/** SPI Master In Slave Out pin */
|
||||
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN
|
||||
/** SPI Clock pin */
|
||||
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN
|
||||
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN // SPI chip select pin
|
||||
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN // SPI Master Out Slave In pin
|
||||
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN // SPI Master In Slave Out pin
|
||||
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN // SPI Clock pin
|
||||
#endif // SOFTWARE_SPI
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \class Sd2Card
|
||||
* \brief Raw access to SD and SDHC flash memory cards.
|
||||
*/
|
||||
class Sd2Card {
|
||||
public:
|
||||
/** Construct an instance of Sd2Card. */
|
||||
public:
|
||||
|
||||
Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
|
||||
|
||||
uint32_t cardSize();
|
||||
bool erase(uint32_t firstBlock, uint32_t lastBlock);
|
||||
bool eraseSingleBlockEnable();
|
||||
|
||||
/**
|
||||
* Set SD error code.
|
||||
* \param[in] code value for error code.
|
||||
*/
|
||||
void error(uint8_t code) {errorCode_ = code;}
|
||||
|
||||
/**
|
||||
* \return error code for last error. See Sd2Card.h for a list of error codes.
|
||||
*/
|
||||
int errorCode() const {return errorCode_;}
|
||||
|
||||
/** \return error data for last error. */
|
||||
int errorData() const {return status_;}
|
||||
|
||||
/**
|
||||
* Initialize an SD flash memory card with default clock rate and chip
|
||||
* select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
|
||||
@@ -188,6 +142,7 @@ class Sd2Card {
|
||||
bool init(uint8_t sckRateID = SPI_FULL_SPEED,
|
||||
uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
|
||||
bool readBlock(uint32_t block, uint8_t* dst);
|
||||
|
||||
/**
|
||||
* Read a card's CID register. The CID contains card identification
|
||||
* information such as Manufacturer ID, Product name, Product serial
|
||||
@@ -197,9 +152,8 @@ class Sd2Card {
|
||||
*
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool readCID(cid_t* cid) {
|
||||
return readRegister(CMD10, cid);
|
||||
}
|
||||
bool readCID(cid_t* cid) { return readRegister(CMD10, cid); }
|
||||
|
||||
/**
|
||||
* Read a card's CSD register. The CSD contains Card-Specific Data that
|
||||
* provides information regarding access to the card's contents.
|
||||
@@ -208,14 +162,14 @@ class Sd2Card {
|
||||
*
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool readCSD(csd_t* csd) {
|
||||
return readRegister(CMD9, csd);
|
||||
}
|
||||
bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
|
||||
|
||||
bool readData(uint8_t* dst);
|
||||
bool readStart(uint32_t blockNumber);
|
||||
bool readStop();
|
||||
bool setSckRate(uint8_t sckRateID);
|
||||
/** Return the card type: SD V1, SD V2 or SDHC
|
||||
/**
|
||||
* Return the card type: SD V1, SD V2 or SDHC
|
||||
* \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
|
||||
*/
|
||||
int type() const {return type_;}
|
||||
@@ -223,13 +177,14 @@ class Sd2Card {
|
||||
bool writeData(const uint8_t* src);
|
||||
bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
|
||||
bool writeStop();
|
||||
private:
|
||||
//----------------------------------------------------------------------------
|
||||
uint8_t chipSelectPin_;
|
||||
uint8_t errorCode_;
|
||||
uint8_t spiRate_;
|
||||
uint8_t status_;
|
||||
uint8_t type_;
|
||||
|
||||
private:
|
||||
uint8_t chipSelectPin_,
|
||||
errorCode_,
|
||||
spiRate_,
|
||||
status_,
|
||||
type_;
|
||||
|
||||
// private functions
|
||||
uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
|
||||
cardCommand(CMD55, 0);
|
||||
@@ -241,11 +196,9 @@ class Sd2Card {
|
||||
bool readRegister(uint8_t cmd, void* buf);
|
||||
void chipSelectHigh();
|
||||
void chipSelectLow();
|
||||
void type(uint8_t value) {type_ = value;}
|
||||
void type(uint8_t value) { type_ = value; }
|
||||
bool waitNotBusy(uint16_t timeoutMillis);
|
||||
bool writeData(uint8_t token, const uint8_t* src);
|
||||
};
|
||||
#endif // Sd2Card_h
|
||||
|
||||
|
||||
#endif
|
||||
#endif // _SD2CARD_H_
|
||||
|
||||
+340
-437
File diff suppressed because it is too large
Load Diff
+229
-220
@@ -20,208 +20,196 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief SdBaseFile class
|
||||
*/
|
||||
|
||||
/**
|
||||
* Arduino SdFat Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#ifndef _SDBASEFILE_H_
|
||||
#define _SDBASEFILE_H_
|
||||
|
||||
#ifndef SdBaseFile_h
|
||||
#define SdBaseFile_h
|
||||
/**
|
||||
* \file
|
||||
* \brief SdBaseFile class
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#include "SdFatConfig.h"
|
||||
#include "SdVolume.h"
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \struct filepos_t
|
||||
* \brief internal type for istream
|
||||
* do not use in user apps
|
||||
*/
|
||||
struct filepos_t {
|
||||
/** stream position */
|
||||
uint32_t position;
|
||||
/** cluster for position */
|
||||
uint32_t cluster;
|
||||
uint32_t position; // stream byte position
|
||||
uint32_t cluster; // cluster of position
|
||||
filepos_t() : position(0), cluster(0) {}
|
||||
};
|
||||
|
||||
// use the gnu style oflag in open()
|
||||
/** open() oflag for reading */
|
||||
uint8_t const O_READ = 0X01;
|
||||
/** open() oflag - same as O_IN */
|
||||
uint8_t const O_RDONLY = O_READ;
|
||||
/** open() oflag for write */
|
||||
uint8_t const O_WRITE = 0X02;
|
||||
/** open() oflag - same as O_WRITE */
|
||||
uint8_t const O_WRONLY = O_WRITE;
|
||||
/** open() oflag for reading and writing */
|
||||
uint8_t const O_RDWR = (O_READ | O_WRITE);
|
||||
/** open() oflag mask for access modes */
|
||||
uint8_t const O_ACCMODE = (O_READ | O_WRITE);
|
||||
/** The file offset shall be set to the end of the file prior to each write. */
|
||||
uint8_t const O_APPEND = 0X04;
|
||||
/** synchronous writes - call sync() after each write */
|
||||
uint8_t const O_SYNC = 0X08;
|
||||
/** truncate the file to zero length */
|
||||
uint8_t const O_TRUNC = 0X10;
|
||||
/** set the initial position at the end of the file */
|
||||
uint8_t const O_AT_END = 0X20;
|
||||
/** create the file if nonexistent */
|
||||
uint8_t const O_CREAT = 0X40;
|
||||
/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */
|
||||
uint8_t const O_EXCL = 0X80;
|
||||
uint8_t const O_READ = 0x01, // open() oflag for reading
|
||||
O_RDONLY = O_READ, // open() oflag - same as O_IN
|
||||
O_WRITE = 0x02, // open() oflag for write
|
||||
O_WRONLY = O_WRITE, // open() oflag - same as O_WRITE
|
||||
O_RDWR = (O_READ | O_WRITE), // open() oflag for reading and writing
|
||||
O_ACCMODE = (O_READ | O_WRITE), // open() oflag mask for access modes
|
||||
O_APPEND = 0x04, // The file offset shall be set to the end of the file prior to each write.
|
||||
O_SYNC = 0x08, // Synchronous writes - call sync() after each write
|
||||
O_TRUNC = 0x10, // Truncate the file to zero length
|
||||
O_AT_END = 0x20, // Set the initial position at the end of the file
|
||||
O_CREAT = 0x40, // Create the file if nonexistent
|
||||
O_EXCL = 0x80; // If O_CREAT and O_EXCL are set, open() shall fail if the file exists
|
||||
|
||||
// SdBaseFile class static and const definitions
|
||||
|
||||
// flags for ls()
|
||||
/** ls() flag to print modify date */
|
||||
uint8_t const LS_DATE = 1;
|
||||
/** ls() flag to print file size */
|
||||
uint8_t const LS_SIZE = 2;
|
||||
/** ls() flag for recursive list of subdirectories */
|
||||
uint8_t const LS_R = 4;
|
||||
uint8_t const LS_DATE = 1, // ls() flag to print modify date
|
||||
LS_SIZE = 2, // ls() flag to print file size
|
||||
LS_R = 4; // ls() flag for recursive list of subdirectories
|
||||
|
||||
|
||||
// flags for timestamp
|
||||
/** set the file's last access date */
|
||||
uint8_t const T_ACCESS = 1;
|
||||
/** set the file's creation date and time */
|
||||
uint8_t const T_CREATE = 2;
|
||||
/** Set the file's write date and time */
|
||||
uint8_t const T_WRITE = 4;
|
||||
// values for type_
|
||||
/** This file has not been opened. */
|
||||
uint8_t const FAT_FILE_TYPE_CLOSED = 0;
|
||||
/** A normal file */
|
||||
uint8_t const FAT_FILE_TYPE_NORMAL = 1;
|
||||
/** A FAT12 or FAT16 root directory */
|
||||
uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2;
|
||||
/** A FAT32 root directory */
|
||||
uint8_t const FAT_FILE_TYPE_ROOT32 = 3;
|
||||
/** A subdirectory file*/
|
||||
uint8_t const FAT_FILE_TYPE_SUBDIR = 4;
|
||||
/** Test value for directory type */
|
||||
uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED;
|
||||
uint8_t const T_ACCESS = 1, // Set the file's last access date
|
||||
T_CREATE = 2, // Set the file's creation date and time
|
||||
T_WRITE = 4; // Set the file's write date and time
|
||||
|
||||
/** date field for FAT directory entry
|
||||
// values for type_
|
||||
uint8_t const FAT_FILE_TYPE_CLOSED = 0, // This file has not been opened.
|
||||
FAT_FILE_TYPE_NORMAL = 1, // A normal file
|
||||
FAT_FILE_TYPE_ROOT_FIXED = 2, // A FAT12 or FAT16 root directory
|
||||
FAT_FILE_TYPE_ROOT32 = 3, // A FAT32 root directory
|
||||
FAT_FILE_TYPE_SUBDIR = 4, // A subdirectory file
|
||||
FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED; // Test value for directory type
|
||||
|
||||
/**
|
||||
* date field for FAT directory entry
|
||||
* \param[in] year [1980,2107]
|
||||
* \param[in] month [1,12]
|
||||
* \param[in] day [1,31]
|
||||
*
|
||||
* \return Packed date for dir_t entry.
|
||||
*/
|
||||
static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) {
|
||||
return (year - 1980) << 9 | month << 5 | day;
|
||||
}
|
||||
/** year part of FAT directory date field
|
||||
static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
|
||||
|
||||
/**
|
||||
* year part of FAT directory date field
|
||||
* \param[in] fatDate Date in packed dir format.
|
||||
*
|
||||
* \return Extracted year [1980,2107]
|
||||
*/
|
||||
static inline uint16_t FAT_YEAR(uint16_t fatDate) {
|
||||
return 1980 + (fatDate >> 9);
|
||||
}
|
||||
/** month part of FAT directory date field
|
||||
static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); }
|
||||
|
||||
/**
|
||||
* month part of FAT directory date field
|
||||
* \param[in] fatDate Date in packed dir format.
|
||||
*
|
||||
* \return Extracted month [1,12]
|
||||
*/
|
||||
static inline uint8_t FAT_MONTH(uint16_t fatDate) {
|
||||
return (fatDate >> 5) & 0XF;
|
||||
}
|
||||
/** day part of FAT directory date field
|
||||
static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0XF; }
|
||||
|
||||
/**
|
||||
* day part of FAT directory date field
|
||||
* \param[in] fatDate Date in packed dir format.
|
||||
*
|
||||
* \return Extracted day [1,31]
|
||||
*/
|
||||
static inline uint8_t FAT_DAY(uint16_t fatDate) {
|
||||
return fatDate & 0X1F;
|
||||
}
|
||||
/** time field for FAT directory entry
|
||||
static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
|
||||
|
||||
/**
|
||||
* time field for FAT directory entry
|
||||
* \param[in] hour [0,23]
|
||||
* \param[in] minute [0,59]
|
||||
* \param[in] second [0,59]
|
||||
*
|
||||
* \return Packed time for dir_t entry.
|
||||
*/
|
||||
static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) {
|
||||
return hour << 11 | minute << 5 | second >> 1;
|
||||
}
|
||||
/** hour part of FAT directory time field
|
||||
static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
|
||||
|
||||
/**
|
||||
* hour part of FAT directory time field
|
||||
* \param[in] fatTime Time in packed dir format.
|
||||
*
|
||||
* \return Extracted hour [0,23]
|
||||
*/
|
||||
static inline uint8_t FAT_HOUR(uint16_t fatTime) {
|
||||
return fatTime >> 11;
|
||||
}
|
||||
/** minute part of FAT directory time field
|
||||
static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
|
||||
|
||||
/**
|
||||
* minute part of FAT directory time field
|
||||
* \param[in] fatTime Time in packed dir format.
|
||||
*
|
||||
* \return Extracted minute [0,59]
|
||||
*/
|
||||
static inline uint8_t FAT_MINUTE(uint16_t fatTime) {
|
||||
return (fatTime >> 5) & 0X3F;
|
||||
}
|
||||
/** second part of FAT directory time field
|
||||
static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
|
||||
|
||||
/**
|
||||
* second part of FAT directory time field
|
||||
* Note second/2 is stored in packed time.
|
||||
*
|
||||
* \param[in] fatTime Time in packed dir format.
|
||||
*
|
||||
* \return Extracted second [0,58]
|
||||
*/
|
||||
static inline uint8_t FAT_SECOND(uint16_t fatTime) {
|
||||
return 2 * (fatTime & 0X1F);
|
||||
}
|
||||
/** Default date for file timestamps is 1 Jan 2000 */
|
||||
static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
|
||||
|
||||
// Default date for file timestamps is 1 Jan 2000
|
||||
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
|
||||
/** Default time for file timestamp is 1 am */
|
||||
// Default time for file timestamp is 1 am
|
||||
uint16_t const FAT_DEFAULT_TIME = (1 << 11);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \class SdBaseFile
|
||||
* \brief Base class for SdFile with Print and C++ streams.
|
||||
*/
|
||||
class SdBaseFile {
|
||||
public:
|
||||
/** Create an instance. */
|
||||
SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
|
||||
SdBaseFile(const char* path, uint8_t oflag);
|
||||
~SdBaseFile() {if (isOpen()) close();}
|
||||
~SdBaseFile() { if (isOpen()) close(); }
|
||||
|
||||
/**
|
||||
* writeError is set to true if an error occurs during a write().
|
||||
* Set writeError to false before calling print() and/or write() and check
|
||||
* for true after calls to print() and/or write().
|
||||
*/
|
||||
bool writeError;
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// helpers for stream classes
|
||||
/** get position for streams
|
||||
|
||||
/**
|
||||
* get position for streams
|
||||
* \param[out] pos struct to receive position
|
||||
*/
|
||||
void getpos(filepos_t* pos);
|
||||
/** set position for streams
|
||||
|
||||
/**
|
||||
* set position for streams
|
||||
* \param[out] pos struct with value for new position
|
||||
*/
|
||||
void setpos(filepos_t* pos);
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
bool close();
|
||||
bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
|
||||
bool createContiguous(SdBaseFile* dirFile,
|
||||
const char* path, uint32_t size);
|
||||
/** \return The current cluster number for a file or directory. */
|
||||
uint32_t curCluster() const {return curCluster_;}
|
||||
/** \return The current position for a file or directory. */
|
||||
uint32_t curPosition() const {return curPosition_;}
|
||||
/** \return Current working directory */
|
||||
static SdBaseFile* cwd() {return cwd_;}
|
||||
/** Set the date/time callback function
|
||||
/**
|
||||
* \return The current cluster number for a file or directory.
|
||||
*/
|
||||
uint32_t curCluster() const { return curCluster_; }
|
||||
|
||||
/**
|
||||
* \return The current position for a file or directory.
|
||||
*/
|
||||
uint32_t curPosition() const { return curPosition_; }
|
||||
|
||||
/**
|
||||
* \return Current working directory
|
||||
*/
|
||||
static SdBaseFile* cwd() { return cwd_; }
|
||||
|
||||
/**
|
||||
* Set the date/time callback function
|
||||
*
|
||||
* \param[in] dateTime The user's call back function. The callback
|
||||
* function is of the form:
|
||||
@@ -252,35 +240,55 @@ class SdBaseFile {
|
||||
void (*dateTime)(uint16_t* date, uint16_t* time)) {
|
||||
dateTime_ = dateTime;
|
||||
}
|
||||
/** Cancel the date/time callback function. */
|
||||
static void dateTimeCallbackCancel() {dateTime_ = 0;}
|
||||
|
||||
/**
|
||||
* Cancel the date/time callback function.
|
||||
*/
|
||||
static void dateTimeCallbackCancel() { dateTime_ = 0; }
|
||||
bool dirEntry(dir_t* dir);
|
||||
static void dirName(const dir_t& dir, char* name);
|
||||
bool exists(const char* name);
|
||||
int16_t fgets(char* str, int16_t num, char* delim = 0);
|
||||
/** \return The total number of bytes in a file or directory. */
|
||||
uint32_t fileSize() const {return fileSize_;}
|
||||
/** \return The first cluster number for a file or directory. */
|
||||
uint32_t firstCluster() const {return firstCluster_;}
|
||||
bool getFilename(char* name);
|
||||
/** \return True if this is a directory else false. */
|
||||
bool isDir() const {return type_ >= FAT_FILE_TYPE_MIN_DIR;}
|
||||
/** \return True if this is a normal file else false. */
|
||||
bool isFile() const {return type_ == FAT_FILE_TYPE_NORMAL;}
|
||||
/** \return True if this is an open file/directory else false. */
|
||||
bool isOpen() const {return type_ != FAT_FILE_TYPE_CLOSED;}
|
||||
/** \return True if this is a subdirectory else false. */
|
||||
bool isSubDir() const {return type_ == FAT_FILE_TYPE_SUBDIR;}
|
||||
/** \return True if this is the root directory. */
|
||||
bool isRoot() const {
|
||||
return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32;
|
||||
}
|
||||
|
||||
/**
|
||||
* \return The total number of bytes in a file or directory.
|
||||
*/
|
||||
uint32_t fileSize() const { return fileSize_; }
|
||||
|
||||
/**
|
||||
* \return The first cluster number for a file or directory.
|
||||
*/
|
||||
uint32_t firstCluster() const { return firstCluster_; }
|
||||
|
||||
/**
|
||||
* \return True if this is a directory else false.
|
||||
*/
|
||||
bool isDir() const { return type_ >= FAT_FILE_TYPE_MIN_DIR; }
|
||||
|
||||
/**
|
||||
* \return True if this is a normal file else false.
|
||||
*/
|
||||
bool isFile() const { return type_ == FAT_FILE_TYPE_NORMAL; }
|
||||
|
||||
/**
|
||||
* \return True if this is an open file/directory else false.
|
||||
*/
|
||||
bool isOpen() const { return type_ != FAT_FILE_TYPE_CLOSED; }
|
||||
|
||||
/**
|
||||
* \return True if this is a subdirectory else false.
|
||||
*/
|
||||
bool isSubDir() const { return type_ == FAT_FILE_TYPE_SUBDIR; }
|
||||
|
||||
/**
|
||||
* \return True if this is the root directory.
|
||||
*/
|
||||
bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
|
||||
|
||||
bool getFilename(char * const name);
|
||||
void ls(uint8_t flags = 0, uint8_t indent = 0);
|
||||
|
||||
bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
|
||||
// alias for backward compactability
|
||||
bool makeDir(SdBaseFile* dir, const char* path) {
|
||||
return mkdir(dir, path, false);
|
||||
}
|
||||
bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
|
||||
bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
|
||||
bool open(const char* path, uint8_t oflag = O_READ);
|
||||
@@ -295,53 +303,58 @@ class SdBaseFile {
|
||||
int8_t readDir(dir_t* dir, char* longFilename);
|
||||
static bool remove(SdBaseFile* dirFile, const char* path);
|
||||
bool remove();
|
||||
/** Set the file's current position to zero. */
|
||||
void rewind() {seekSet(0);}
|
||||
|
||||
/**
|
||||
* Set the file's current position to zero.
|
||||
*/
|
||||
void rewind() { seekSet(0); }
|
||||
bool rename(SdBaseFile* dirFile, const char* newPath);
|
||||
bool rmdir();
|
||||
// for backward compatibility
|
||||
bool rmDir() {return rmdir();}
|
||||
bool rmRfStar();
|
||||
/** Set the files position to current position + \a pos. See seekSet().
|
||||
|
||||
/**
|
||||
* Set the files position to current position + \a pos. See seekSet().
|
||||
* \param[in] offset The new position in bytes from the current position.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool seekCur(int32_t offset) {
|
||||
return seekSet(curPosition_ + offset);
|
||||
}
|
||||
/** Set the files position to end-of-file + \a offset. See seekSet().
|
||||
bool seekCur(const int32_t offset) { return seekSet(curPosition_ + offset); }
|
||||
|
||||
/**
|
||||
* Set the files position to end-of-file + \a offset. See seekSet().
|
||||
* \param[in] offset The new position in bytes from end-of-file.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);}
|
||||
bool seekSet(uint32_t pos);
|
||||
bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); }
|
||||
bool seekSet(const uint32_t pos);
|
||||
bool sync();
|
||||
bool timestamp(SdBaseFile* file);
|
||||
bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
|
||||
uint8_t hour, uint8_t minute, uint8_t second);
|
||||
/** Type of file. You should use isFile() or isDir() instead of type()
|
||||
* if possible.
|
||||
|
||||
/**
|
||||
* Type of file. Use isFile() or isDir() instead of type() if possible.
|
||||
*
|
||||
* \return The file or directory type.
|
||||
*/
|
||||
uint8_t type() const {return type_;}
|
||||
uint8_t type() const { return type_; }
|
||||
bool truncate(uint32_t size);
|
||||
/** \return SdVolume that contains this file. */
|
||||
SdVolume* volume() const {return vol_;}
|
||||
|
||||
/**
|
||||
* \return SdVolume that contains this file.
|
||||
*/
|
||||
SdVolume* volume() const { return vol_; }
|
||||
int16_t write(const void* buf, uint16_t nbyte);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
// allow SdFat to set cwd_
|
||||
friend class SdFat;
|
||||
// global pointer to cwd dir
|
||||
static SdBaseFile* cwd_;
|
||||
friend class SdFat; // allow SdFat to set cwd_
|
||||
static SdBaseFile* cwd_; // global pointer to cwd dir
|
||||
|
||||
// data time callback function
|
||||
static void (*dateTime_)(uint16_t* date, uint16_t* time);
|
||||
|
||||
// bits defined in flags_
|
||||
// should be 0X0F
|
||||
static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC);
|
||||
// sync of directory entry required
|
||||
static uint8_t const F_FILE_DIR_DIRTY = 0X80;
|
||||
static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC), // should be 0x0F
|
||||
F_FILE_DIR_DIRTY = 0x80; // sync of directory entry required
|
||||
|
||||
// private data
|
||||
uint8_t flags_; // See above for definition of flags_ bits
|
||||
@@ -355,8 +368,11 @@ class SdBaseFile {
|
||||
uint32_t firstCluster_; // first cluster of file
|
||||
SdVolume* vol_; // volume where file is located
|
||||
|
||||
/** experimental don't use */
|
||||
bool openParent(SdBaseFile* dir);
|
||||
/**
|
||||
* EXPERIMENTAL - Don't use!
|
||||
*/
|
||||
//bool openParent(SdBaseFile* dir);
|
||||
|
||||
// private functions
|
||||
bool addCluster();
|
||||
bool addDirCluster();
|
||||
@@ -367,61 +383,48 @@ class SdBaseFile {
|
||||
bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
|
||||
bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
|
||||
dir_t* readDirCache();
|
||||
//------------------------------------------------------------------------------
|
||||
// to be deleted
|
||||
static void printDirName(const dir_t& dir,
|
||||
uint8_t width, bool printSlash);
|
||||
//------------------------------------------------------------------------------
|
||||
// Deprecated functions - suppress cpplint warnings with NOLINT comment
|
||||
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
|
||||
|
||||
// Deprecated functions
|
||||
#if ALLOW_DEPRECATED_FUNCTIONS
|
||||
public:
|
||||
/** \deprecated Use:
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
|
||||
* \param[out] bgnBlock the first block address for the file.
|
||||
* \param[out] endBlock the last block address for the file.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) { // NOLINT
|
||||
bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) {
|
||||
return contiguousRange(&bgnBlock, &endBlock);
|
||||
}
|
||||
/** \deprecated Use:
|
||||
* bool createContiguous(SdBaseFile* dirFile,
|
||||
* const char* path, uint32_t size)
|
||||
* \param[in] dirFile The directory where the file will be created.
|
||||
* \param[in] path A path with a valid DOS 8.3 file name.
|
||||
* \param[in] size The desired file size.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool createContiguous(SdBaseFile& dirFile, // NOLINT
|
||||
const char* path, uint32_t size) {
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* bool createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size)
|
||||
* \param[in] dirFile The directory where the file will be created.
|
||||
* \param[in] path A path with a valid DOS 8.3 file name.
|
||||
* \param[in] size The desired file size.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool createContiguous(SdBaseFile& dirFile, const char* path, uint32_t size) {
|
||||
return createContiguous(&dirFile, path, size);
|
||||
}
|
||||
/** \deprecated Use:
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* static void dateTimeCallback(
|
||||
* void (*dateTime)(uint16_t* date, uint16_t* time));
|
||||
* \param[in] dateTime The user's call back function.
|
||||
*/
|
||||
static void dateTimeCallback(
|
||||
void (*dateTime)(uint16_t &date, uint16_t &time)) { // NOLINT
|
||||
void (*dateTime)(uint16_t &date, uint16_t &time)) {
|
||||
oldDateTime_ = dateTime;
|
||||
dateTime_ = dateTime ? oldToNew : 0;
|
||||
}
|
||||
/** \deprecated Use: bool dirEntry(dir_t* dir);
|
||||
* \param[out] dir Location for return of the file's directory entry.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool dirEntry(dir_t& dir) {return dirEntry(&dir);} // NOLINT
|
||||
/** \deprecated Use:
|
||||
* bool mkdir(SdBaseFile* dir, const char* path);
|
||||
* \param[in] dir An open SdFat instance for the directory that will contain
|
||||
* the new directory.
|
||||
* \param[in] path A path with a valid 8.3 DOS name for the new directory.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool mkdir(SdBaseFile& dir, const char* path) { // NOLINT
|
||||
return mkdir(&dir, path);
|
||||
}
|
||||
/** \deprecated Use:
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
|
||||
* \param[in] dirFile An open SdFat instance for the directory containing the
|
||||
* file to be opened.
|
||||
@@ -430,20 +433,23 @@ class SdBaseFile {
|
||||
* OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool open(SdBaseFile& dirFile, // NOLINT
|
||||
const char* path, uint8_t oflag) {
|
||||
bool open(SdBaseFile& dirFile, const char* path, uint8_t oflag) {
|
||||
return open(&dirFile, path, oflag);
|
||||
}
|
||||
/** \deprecated Do not use in new apps
|
||||
|
||||
/**
|
||||
* \deprecated Do not use in new apps
|
||||
* \param[in] dirFile An open SdFat instance for the directory containing the
|
||||
* file to be opened.
|
||||
* \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool open(SdBaseFile& dirFile, const char* path) { // NOLINT
|
||||
bool open(SdBaseFile& dirFile, const char* path) {
|
||||
return open(dirFile, path, O_RDWR);
|
||||
}
|
||||
/** \deprecated Use:
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
|
||||
* \param[in] dirFile An open SdFat instance for the directory.
|
||||
* \param[in] index The \a index of the directory entry for the file to be
|
||||
@@ -452,35 +458,39 @@ class SdBaseFile {
|
||||
* OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) { // NOLINT
|
||||
bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) {
|
||||
return open(&dirFile, index, oflag);
|
||||
}
|
||||
/** \deprecated Use: bool openRoot(SdVolume* vol);
|
||||
|
||||
/**
|
||||
* \deprecated Use: bool openRoot(SdVolume* vol);
|
||||
* \param[in] vol The FAT volume containing the root directory to be opened.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool openRoot(SdVolume& vol) {return openRoot(&vol);} // NOLINT
|
||||
/** \deprecated Use: int8_t readDir(dir_t* dir);
|
||||
bool openRoot(SdVolume& vol) { return openRoot(&vol); }
|
||||
|
||||
/**
|
||||
* \deprecated Use: int8_t readDir(dir_t* dir);
|
||||
* \param[out] dir The dir_t struct that will receive the data.
|
||||
* \return bytes read for success zero for eof or -1 for failure.
|
||||
*/
|
||||
int8_t readDir(dir_t& dir, char* longFilename) {return readDir(&dir, longFilename);} // NOLINT
|
||||
/** \deprecated Use:
|
||||
int8_t readDir(dir_t& dir, char* longFilename) {
|
||||
return readDir(&dir, longFilename);
|
||||
}
|
||||
|
||||
/**
|
||||
* \deprecated Use:
|
||||
* static uint8_t remove(SdBaseFile* dirFile, const char* path);
|
||||
* \param[in] dirFile The directory that contains the file.
|
||||
* \param[in] path The name of the file to be removed.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
static bool remove(SdBaseFile& dirFile, const char* path) { // NOLINT
|
||||
return remove(&dirFile, path);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// rest are private
|
||||
static bool remove(SdBaseFile& dirFile, const char* path) { return remove(&dirFile, path); }
|
||||
|
||||
private:
|
||||
static void (*oldDateTime_)(uint16_t &date, uint16_t &time); // NOLINT
|
||||
static void oldToNew(uint16_t* date, uint16_t* time) {
|
||||
uint16_t d;
|
||||
uint16_t t;
|
||||
static void (*oldDateTime_)(uint16_t &date, uint16_t &time);
|
||||
static void oldToNew(uint16_t * const date, uint16_t * const time) {
|
||||
uint16_t d, t;
|
||||
oldDateTime_(d, t);
|
||||
*date = d;
|
||||
*time = t;
|
||||
@@ -488,5 +498,4 @@ class SdBaseFile {
|
||||
#endif // ALLOW_DEPRECATED_FUNCTIONS
|
||||
};
|
||||
|
||||
#endif // SdBaseFile_h
|
||||
#endif
|
||||
#endif // _SDBASEFILE_H_
|
||||
|
||||
+86
-99
@@ -21,114 +21,101 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* SdFatConfig.h
|
||||
* Arduino SdFat Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
|
||||
#ifndef _SDFATCONFIG_H_
|
||||
#define _SDFATCONFIG_H_
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief configuration definitions
|
||||
* To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
|
||||
*
|
||||
* Using multiple cards costs 400 - 500 bytes of flash.
|
||||
*
|
||||
* Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define USE_MULTIPLE_CARDS 0
|
||||
|
||||
#ifndef SdFatConfig_h
|
||||
#define SdFatConfig_h
|
||||
#include <stdint.h>
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
|
||||
*
|
||||
* Using multiple cards costs 400 - 500 bytes of flash.
|
||||
*
|
||||
* Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
|
||||
*/
|
||||
#define USE_MULTIPLE_CARDS 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Call flush for endl if ENDL_CALLS_FLUSH is nonzero
|
||||
*
|
||||
* The standard for iostreams is to call flush. This is very costly for
|
||||
* SdFat. Each call to flush causes 2048 bytes of I/O to the SD.
|
||||
*
|
||||
* SdFat has a single 512 byte buffer for SD I/O so it must write the current
|
||||
* data block to the SD, read the directory block from the SD, update the
|
||||
* directory entry, write the directory block to the SD and read the data
|
||||
* block back into the buffer.
|
||||
*
|
||||
* The SD flash memory controller is not designed for this many rewrites
|
||||
* so performance may be reduced by more than a factor of 100.
|
||||
*
|
||||
* If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
|
||||
* all data to be written to the SD.
|
||||
*/
|
||||
#define ENDL_CALLS_FLUSH 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
|
||||
*/
|
||||
#define ALLOW_DEPRECATED_FUNCTIONS 1
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
|
||||
* FAT12 has not been well tested.
|
||||
*/
|
||||
#define FAT12_SUPPORT 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
|
||||
* or 6 (F_CPU/128).
|
||||
*/
|
||||
#define SPI_SD_INIT_RATE 5
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set the SS pin high for hardware SPI. If SS is chip select for another SPI
|
||||
* device this will disable that device during the SD init phase.
|
||||
*/
|
||||
#define SET_SPI_SS_HIGH 1
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
|
||||
* Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
|
||||
*
|
||||
* MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
|
||||
* on Mega Arduinos. Software SPI works well with GPS Shield V1.1
|
||||
* but many SD cards will fail with GPS Shield V1.0.
|
||||
*/
|
||||
#define MEGA_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set USE_SOFTWARE_SPI nonzero to always use software SPI.
|
||||
*/
|
||||
#define USE_SOFTWARE_SPI 0
|
||||
// define software SPI pins so Mega can use unmodified 168/328 shields
|
||||
/** Software SPI chip select pin for the SD */
|
||||
#define SOFT_SPI_CS_PIN 10
|
||||
/** Software SPI Master Out Slave In pin */
|
||||
#define SOFT_SPI_MOSI_PIN 11
|
||||
/** Software SPI Master In Slave Out pin */
|
||||
#define SOFT_SPI_MISO_PIN 12
|
||||
/** Software SPI Clock pin */
|
||||
#define SOFT_SPI_SCK_PIN 13
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* The __cxa_pure_virtual function is an error handler that is invoked when
|
||||
* a pure virtual function is called.
|
||||
*/
|
||||
#define USE_CXA_PURE_VIRTUAL 1
|
||||
/**
|
||||
* Call flush for endl if ENDL_CALLS_FLUSH is nonzero
|
||||
*
|
||||
* The standard for iostreams is to call flush. This is very costly for
|
||||
* SdFat. Each call to flush causes 2048 bytes of I/O to the SD.
|
||||
*
|
||||
* SdFat has a single 512 byte buffer for SD I/O so it must write the current
|
||||
* data block to the SD, read the directory block from the SD, update the
|
||||
* directory entry, write the directory block to the SD and read the data
|
||||
* block back into the buffer.
|
||||
*
|
||||
* The SD flash memory controller is not designed for this many rewrites
|
||||
* so performance may be reduced by more than a factor of 100.
|
||||
*
|
||||
* If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
|
||||
* all data to be written to the SD.
|
||||
*/
|
||||
#define ENDL_CALLS_FLUSH 0
|
||||
|
||||
/** Number of UTF-16 characters per entry */
|
||||
#define FILENAME_LENGTH 13
|
||||
/**
|
||||
* Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
|
||||
*/
|
||||
#define ALLOW_DEPRECATED_FUNCTIONS 1
|
||||
|
||||
/**
|
||||
* Defines for long (vfat) filenames
|
||||
*/
|
||||
/** Number of VFAT entries used. Every entry has 13 UTF-16 characters */
|
||||
#define MAX_VFAT_ENTRIES (2)
|
||||
/** Total size of the buffer used to store the long filenames */
|
||||
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1)
|
||||
#endif // SdFatConfig_h
|
||||
/**
|
||||
* Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
|
||||
* FAT12 has not been well tested.
|
||||
*/
|
||||
#define FAT12_SUPPORT 0
|
||||
|
||||
/**
|
||||
* SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
|
||||
* or 6 (F_CPU/128).
|
||||
*/
|
||||
#define SPI_SD_INIT_RATE 5
|
||||
|
||||
#endif
|
||||
/**
|
||||
* Set the SS pin high for hardware SPI. If SS is chip select for another SPI
|
||||
* device this will disable that device during the SD init phase.
|
||||
*/
|
||||
#define SET_SPI_SS_HIGH 1
|
||||
|
||||
/**
|
||||
* Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
|
||||
* Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
|
||||
*
|
||||
* MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
|
||||
* on Mega Arduinos. Software SPI works well with GPS Shield V1.1
|
||||
* but many SD cards will fail with GPS Shield V1.0.
|
||||
*/
|
||||
#define MEGA_SOFT_SPI 0
|
||||
|
||||
// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
|
||||
#define USE_SOFTWARE_SPI 0
|
||||
|
||||
// Define software SPI pins so Mega can use unmodified 168/328 shields
|
||||
#define SOFT_SPI_CS_PIN 10 // Software SPI chip select pin for the SD
|
||||
#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
|
||||
#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
|
||||
#define SOFT_SPI_SCK_PIN 13 // Software SPI Clock pin
|
||||
|
||||
/**
|
||||
* The __cxa_pure_virtual function is an error handler that is invoked when
|
||||
* a pure virtual function is called.
|
||||
*/
|
||||
#define USE_CXA_PURE_VIRTUAL 1
|
||||
|
||||
/**
|
||||
* Defines for 8.3 and long (vfat) filenames
|
||||
*/
|
||||
|
||||
#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
|
||||
|
||||
// Total bytes needed to store a single long filename
|
||||
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
|
||||
|
||||
#endif // _SDFATCONFIG_H_
|
||||
|
||||
+384
-424
@@ -20,35 +20,31 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief FAT file structures
|
||||
*/
|
||||
|
||||
/**
|
||||
* Arduino SdFat Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#ifndef SdFatStructs_h
|
||||
#define SdFatStructs_h
|
||||
#ifndef SDFATSTRUCTS_H
|
||||
#define SDFATSTRUCTS_H
|
||||
|
||||
#define PACKED __attribute__((__packed__))
|
||||
/**
|
||||
* \file
|
||||
* \brief FAT file structures
|
||||
*/
|
||||
|
||||
/**
|
||||
* mostly from Microsoft document fatgen103.doc
|
||||
* http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
/** Value for byte 510 of boot block or MBR */
|
||||
uint8_t const BOOTSIG0 = 0X55;
|
||||
/** Value for byte 511 of boot block or MBR */
|
||||
uint8_t const BOOTSIG1 = 0XAA;
|
||||
/** Value for bootSignature field int FAT/FAT32 boot sector */
|
||||
uint8_t const EXTENDED_BOOT_SIG = 0X29;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uint8_t const BOOTSIG0 = 0x55, // Value for byte 510 of boot block or MBR
|
||||
BOOTSIG1 = 0xAA, // Value for byte 511 of boot block or MBR
|
||||
EXTENDED_BOOT_SIG = 0x29; // Value for bootSignature field int FAT/FAT32 boot sector
|
||||
|
||||
/**
|
||||
* \struct partitionTable
|
||||
* \brief MBR partition table entry
|
||||
@@ -57,59 +53,58 @@ uint8_t const EXTENDED_BOOT_SIG = 0X29;
|
||||
* The MBR partition table has four entries.
|
||||
*/
|
||||
struct partitionTable {
|
||||
/**
|
||||
* Boot Indicator . Indicates whether the volume is the active
|
||||
* partition. Legal values include: 0X00. Do not use for booting.
|
||||
* 0X80 Active partition.
|
||||
*/
|
||||
/**
|
||||
* Boot Indicator . Indicates whether the volume is the active
|
||||
* partition. Legal values include: 0x00. Do not use for booting.
|
||||
* 0x80 Active partition.
|
||||
*/
|
||||
uint8_t boot;
|
||||
/**
|
||||
* Head part of Cylinder-head-sector address of the first block in
|
||||
* the partition. Legal values are 0-255. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* Head part of Cylinder-head-sector address of the first block in
|
||||
* the partition. Legal values are 0-255. Only used in old PC BIOS.
|
||||
*/
|
||||
uint8_t beginHead;
|
||||
/**
|
||||
* Sector part of Cylinder-head-sector address of the first block in
|
||||
* the partition. Legal values are 1-63. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* Sector part of Cylinder-head-sector address of the first block in
|
||||
* the partition. Legal values are 1-63. Only used in old PC BIOS.
|
||||
*/
|
||||
unsigned beginSector : 6;
|
||||
/** High bits cylinder for first block in partition. */
|
||||
/** High bits cylinder for first block in partition. */
|
||||
unsigned beginCylinderHigh : 2;
|
||||
/**
|
||||
* Combine beginCylinderLow with beginCylinderHigh. Legal values
|
||||
* are 0-1023. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* Combine beginCylinderLow with beginCylinderHigh. Legal values
|
||||
* are 0-1023. Only used in old PC BIOS.
|
||||
*/
|
||||
uint8_t beginCylinderLow;
|
||||
/**
|
||||
* Partition type. See defines that begin with PART_TYPE_ for
|
||||
* some Microsoft partition types.
|
||||
*/
|
||||
/**
|
||||
* Partition type. See defines that begin with PART_TYPE_ for
|
||||
* some Microsoft partition types.
|
||||
*/
|
||||
uint8_t type;
|
||||
/**
|
||||
* head part of cylinder-head-sector address of the last sector in the
|
||||
* partition. Legal values are 0-255. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* head part of cylinder-head-sector address of the last sector in the
|
||||
* partition. Legal values are 0-255. Only used in old PC BIOS.
|
||||
*/
|
||||
uint8_t endHead;
|
||||
/**
|
||||
* Sector part of cylinder-head-sector address of the last sector in
|
||||
* the partition. Legal values are 1-63. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* Sector part of cylinder-head-sector address of the last sector in
|
||||
* the partition. Legal values are 1-63. Only used in old PC BIOS.
|
||||
*/
|
||||
unsigned endSector : 6;
|
||||
/** High bits of end cylinder */
|
||||
/** High bits of end cylinder */
|
||||
unsigned endCylinderHigh : 2;
|
||||
/**
|
||||
* Combine endCylinderLow with endCylinderHigh. Legal values
|
||||
* are 0-1023. Only used in old PC BIOS.
|
||||
*/
|
||||
/**
|
||||
* Combine endCylinderLow with endCylinderHigh. Legal values
|
||||
* are 0-1023. Only used in old PC BIOS.
|
||||
*/
|
||||
uint8_t endCylinderLow;
|
||||
/** Logical block address of the first block in the partition. */
|
||||
uint32_t firstSector;
|
||||
/** Length of the partition, in blocks. */
|
||||
uint32_t totalSectors;
|
||||
|
||||
uint32_t firstSector; // Logical block address of the first block in the partition.
|
||||
uint32_t totalSectors; // Length of the partition, in blocks.
|
||||
} PACKED;
|
||||
/** Type name for partitionTable */
|
||||
typedef struct partitionTable part_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef struct partitionTable part_t; // Type name for partitionTable
|
||||
|
||||
/**
|
||||
* \struct masterBootRecord
|
||||
*
|
||||
@@ -118,22 +113,16 @@ typedef struct partitionTable part_t;
|
||||
* The first block of a storage device that is formatted with a MBR.
|
||||
*/
|
||||
struct masterBootRecord {
|
||||
/** Code Area for master boot program. */
|
||||
uint8_t codeArea[440];
|
||||
/** Optional Windows NT disk signature. May contain boot code. */
|
||||
uint32_t diskSignature;
|
||||
/** Usually zero but may be more boot code. */
|
||||
uint16_t usuallyZero;
|
||||
/** Partition tables. */
|
||||
part_t part[4];
|
||||
/** First MBR signature byte. Must be 0X55 */
|
||||
uint8_t mbrSig0;
|
||||
/** Second MBR signature byte. Must be 0XAA */
|
||||
uint8_t mbrSig1;
|
||||
uint8_t codeArea[440]; // Code Area for master boot program.
|
||||
uint32_t diskSignature; // Optional Windows NT disk signature. May contain boot code.
|
||||
uint16_t usuallyZero; // Usually zero but may be more boot code.
|
||||
part_t part[4]; // Partition tables.
|
||||
uint8_t mbrSig0; // First MBR signature byte. Must be 0x55
|
||||
uint8_t mbrSig1; // Second MBR signature byte. Must be 0xAA
|
||||
} PACKED;
|
||||
/** Type name for masterBootRecord */
|
||||
typedef struct masterBootRecord mbr_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \struct fat_boot
|
||||
*
|
||||
@@ -141,285 +130,280 @@ typedef struct masterBootRecord mbr_t;
|
||||
*
|
||||
*/
|
||||
struct fat_boot {
|
||||
/**
|
||||
* The first three bytes of the boot sector must be valid,
|
||||
* executable x 86-based CPU instructions. This includes a
|
||||
* jump instruction that skips the next nonexecutable bytes.
|
||||
*/
|
||||
/**
|
||||
* The first three bytes of the boot sector must be valid,
|
||||
* executable x 86-based CPU instructions. This includes a
|
||||
* jump instruction that skips the next nonexecutable bytes.
|
||||
*/
|
||||
uint8_t jump[3];
|
||||
/**
|
||||
* This is typically a string of characters that identifies
|
||||
* the operating system that formatted the volume.
|
||||
*/
|
||||
/**
|
||||
* This is typically a string of characters that identifies
|
||||
* the operating system that formatted the volume.
|
||||
*/
|
||||
char oemId[8];
|
||||
/**
|
||||
* The size of a hardware sector. Valid decimal values for this
|
||||
* field are 512, 1024, 2048, and 4096. For most disks used in
|
||||
* the United States, the value of this field is 512.
|
||||
*/
|
||||
/**
|
||||
* The size of a hardware sector. Valid decimal values for this
|
||||
* field are 512, 1024, 2048, and 4096. For most disks used in
|
||||
* the United States, the value of this field is 512.
|
||||
*/
|
||||
uint16_t bytesPerSector;
|
||||
/**
|
||||
* Number of sectors per allocation unit. This value must be a
|
||||
* power of 2 that is greater than 0. The legal values are
|
||||
* 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.
|
||||
*/
|
||||
/**
|
||||
* Number of sectors per allocation unit. This value must be a
|
||||
* power of 2 that is greater than 0. The legal values are
|
||||
* 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.
|
||||
*/
|
||||
uint8_t sectorsPerCluster;
|
||||
/**
|
||||
* The number of sectors preceding the start of the first FAT,
|
||||
* including the boot sector. The value of this field is always 1.
|
||||
*/
|
||||
/**
|
||||
* The number of sectors preceding the start of the first FAT,
|
||||
* including the boot sector. The value of this field is always 1.
|
||||
*/
|
||||
uint16_t reservedSectorCount;
|
||||
/**
|
||||
* The number of copies of the FAT on the volume.
|
||||
* The value of this field is always 2.
|
||||
*/
|
||||
/**
|
||||
* The number of copies of the FAT on the volume.
|
||||
* The value of this field is always 2.
|
||||
*/
|
||||
uint8_t fatCount;
|
||||
/**
|
||||
* For FAT12 and FAT16 volumes, this field contains the count of
|
||||
* 32-byte directory entries in the root directory. For FAT32 volumes,
|
||||
* this field must be set to 0. For FAT12 and FAT16 volumes, this
|
||||
* value should always specify a count that when multiplied by 32
|
||||
* results in a multiple of bytesPerSector. FAT16 volumes should
|
||||
* use the value 512.
|
||||
*/
|
||||
/**
|
||||
* For FAT12 and FAT16 volumes, this field contains the count of
|
||||
* 32-byte directory entries in the root directory. For FAT32 volumes,
|
||||
* this field must be set to 0. For FAT12 and FAT16 volumes, this
|
||||
* value should always specify a count that when multiplied by 32
|
||||
* results in a multiple of bytesPerSector. FAT16 volumes should
|
||||
* use the value 512.
|
||||
*/
|
||||
uint16_t rootDirEntryCount;
|
||||
/**
|
||||
* This field is the old 16-bit total count of sectors on the volume.
|
||||
* This count includes the count of all sectors in all four regions
|
||||
* of the volume. This field can be 0; if it is 0, then totalSectors32
|
||||
* must be nonzero. For FAT32 volumes, this field must be 0. For
|
||||
* FAT12 and FAT16 volumes, this field contains the sector count, and
|
||||
* totalSectors32 is 0 if the total sector count fits
|
||||
* (is less than 0x10000).
|
||||
*/
|
||||
/**
|
||||
* This field is the old 16-bit total count of sectors on the volume.
|
||||
* This count includes the count of all sectors in all four regions
|
||||
* of the volume. This field can be 0; if it is 0, then totalSectors32
|
||||
* must be nonzero. For FAT32 volumes, this field must be 0. For
|
||||
* FAT12 and FAT16 volumes, this field contains the sector count, and
|
||||
* totalSectors32 is 0 if the total sector count fits
|
||||
* (is less than 0x10000).
|
||||
*/
|
||||
uint16_t totalSectors16;
|
||||
/**
|
||||
* This dates back to the old MS-DOS 1.x media determination and is
|
||||
* no longer usually used for anything. 0xF8 is the standard value
|
||||
* for fixed (nonremovable) media. For removable media, 0xF0 is
|
||||
* frequently used. Legal values are 0xF0 or 0xF8-0xFF.
|
||||
*/
|
||||
/**
|
||||
* This dates back to the old MS-DOS 1.x media determination and is
|
||||
* no longer usually used for anything. 0xF8 is the standard value
|
||||
* for fixed (nonremovable) media. For removable media, 0xF0 is
|
||||
* frequently used. Legal values are 0xF0 or 0xF8-0xFF.
|
||||
*/
|
||||
uint8_t mediaType;
|
||||
/**
|
||||
* Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
|
||||
* On FAT32 volumes this field must be 0, and sectorsPerFat32
|
||||
* contains the FAT size count.
|
||||
*/
|
||||
/**
|
||||
* Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
|
||||
* On FAT32 volumes this field must be 0, and sectorsPerFat32
|
||||
* contains the FAT size count.
|
||||
*/
|
||||
uint16_t sectorsPerFat16;
|
||||
/** Sectors per track for interrupt 0x13. Not used otherwise. */
|
||||
uint16_t sectorsPerTrack;
|
||||
/** Number of heads for interrupt 0x13. Not used otherwise. */
|
||||
uint16_t headCount;
|
||||
/**
|
||||
* Count of hidden sectors preceding the partition that contains this
|
||||
* FAT volume. This field is generally only relevant for media
|
||||
* visible on interrupt 0x13.
|
||||
*/
|
||||
|
||||
uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
|
||||
uint16_t headCount; // Number of heads for interrupt 0x13. Not used otherwise.
|
||||
|
||||
/**
|
||||
* Count of hidden sectors preceding the partition that contains this
|
||||
* FAT volume. This field is generally only relevant for media
|
||||
* visible on interrupt 0x13.
|
||||
*/
|
||||
uint32_t hidddenSectors;
|
||||
/**
|
||||
* This field is the new 32-bit total count of sectors on the volume.
|
||||
* This count includes the count of all sectors in all four regions
|
||||
* of the volume. This field can be 0; if it is 0, then
|
||||
* totalSectors16 must be nonzero.
|
||||
*/
|
||||
/**
|
||||
* This field is the new 32-bit total count of sectors on the volume.
|
||||
* This count includes the count of all sectors in all four regions
|
||||
* of the volume. This field can be 0; if it is 0, then
|
||||
* totalSectors16 must be nonzero.
|
||||
*/
|
||||
uint32_t totalSectors32;
|
||||
/**
|
||||
* Related to the BIOS physical drive number. Floppy drives are
|
||||
* identified as 0x00 and physical hard disks are identified as
|
||||
* 0x80, regardless of the number of physical disk drives.
|
||||
* Typically, this value is set prior to issuing an INT 13h BIOS
|
||||
* call to specify the device to access. The value is only
|
||||
* relevant if the device is a boot device.
|
||||
*/
|
||||
/**
|
||||
* Related to the BIOS physical drive number. Floppy drives are
|
||||
* identified as 0x00 and physical hard disks are identified as
|
||||
* 0x80, regardless of the number of physical disk drives.
|
||||
* Typically, this value is set prior to issuing an INT 13h BIOS
|
||||
* call to specify the device to access. The value is only
|
||||
* relevant if the device is a boot device.
|
||||
*/
|
||||
uint8_t driveNumber;
|
||||
/** used by Windows NT - should be zero for FAT */
|
||||
uint8_t reserved1;
|
||||
/** 0X29 if next three fields are valid */
|
||||
uint8_t bootSignature;
|
||||
/**
|
||||
* A random serial number created when formatting a disk,
|
||||
* which helps to distinguish between disks.
|
||||
* Usually generated by combining date and time.
|
||||
*/
|
||||
|
||||
uint8_t reserved1; // used by Windows NT - should be zero for FAT
|
||||
uint8_t bootSignature; // 0x29 if next three fields are valid
|
||||
|
||||
/**
|
||||
* A random serial number created when formatting a disk,
|
||||
* which helps to distinguish between disks.
|
||||
* Usually generated by combining date and time.
|
||||
*/
|
||||
uint32_t volumeSerialNumber;
|
||||
/**
|
||||
* A field once used to store the volume label. The volume label
|
||||
* is now stored as a special file in the root directory.
|
||||
*/
|
||||
/**
|
||||
* A field once used to store the volume label. The volume label
|
||||
* is now stored as a special file in the root directory.
|
||||
*/
|
||||
char volumeLabel[11];
|
||||
/**
|
||||
* A field with a value of either FAT, FAT12 or FAT16,
|
||||
* depending on the disk format.
|
||||
*/
|
||||
/**
|
||||
* A field with a value of either FAT, FAT12 or FAT16,
|
||||
* depending on the disk format.
|
||||
*/
|
||||
char fileSystemType[8];
|
||||
/** X86 boot code */
|
||||
uint8_t bootCode[448];
|
||||
/** must be 0X55 */
|
||||
uint8_t bootSectorSig0;
|
||||
/** must be 0XAA */
|
||||
uint8_t bootSectorSig1;
|
||||
|
||||
uint8_t bootCode[448]; // X86 boot code
|
||||
uint8_t bootSectorSig0; // must be 0x55
|
||||
uint8_t bootSectorSig1; // must be 0xAA
|
||||
} PACKED;
|
||||
/** Type name for FAT Boot Sector */
|
||||
typedef struct fat_boot fat_boot_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef struct fat_boot fat_boot_t; // Type name for FAT Boot Sector
|
||||
|
||||
/**
|
||||
* \struct fat32_boot
|
||||
*
|
||||
* \brief Boot sector for a FAT32 volume.
|
||||
*
|
||||
*/
|
||||
struct fat32_boot {
|
||||
/**
|
||||
* The first three bytes of the boot sector must be valid,
|
||||
* executable x 86-based CPU instructions. This includes a
|
||||
* jump instruction that skips the next nonexecutable bytes.
|
||||
*/
|
||||
/**
|
||||
* The first three bytes of the boot sector must be valid,
|
||||
* executable x 86-based CPU instructions. This includes a
|
||||
* jump instruction that skips the next nonexecutable bytes.
|
||||
*/
|
||||
uint8_t jump[3];
|
||||
/**
|
||||
* This is typically a string of characters that identifies
|
||||
* the operating system that formatted the volume.
|
||||
*/
|
||||
/**
|
||||
* This is typically a string of characters that identifies
|
||||
* the operating system that formatted the volume.
|
||||
*/
|
||||
char oemId[8];
|
||||
/**
|
||||
* The size of a hardware sector. Valid decimal values for this
|
||||
* field are 512, 1024, 2048, and 4096. For most disks used in
|
||||
* the United States, the value of this field is 512.
|
||||
*/
|
||||
/**
|
||||
* The size of a hardware sector. Valid decimal values for this
|
||||
* field are 512, 1024, 2048, and 4096. For most disks used in
|
||||
* the United States, the value of this field is 512.
|
||||
*/
|
||||
uint16_t bytesPerSector;
|
||||
/**
|
||||
* Number of sectors per allocation unit. This value must be a
|
||||
* power of 2 that is greater than 0. The legal values are
|
||||
* 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.
|
||||
*/
|
||||
/**
|
||||
* Number of sectors per allocation unit. This value must be a
|
||||
* power of 2 that is greater than 0. The legal values are
|
||||
* 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided.
|
||||
*/
|
||||
uint8_t sectorsPerCluster;
|
||||
/**
|
||||
* The number of sectors preceding the start of the first FAT,
|
||||
* including the boot sector. Must not be zero
|
||||
*/
|
||||
/**
|
||||
* The number of sectors preceding the start of the first FAT,
|
||||
* including the boot sector. Must not be zero
|
||||
*/
|
||||
uint16_t reservedSectorCount;
|
||||
/**
|
||||
* The number of copies of the FAT on the volume.
|
||||
* The value of this field is always 2.
|
||||
*/
|
||||
/**
|
||||
* The number of copies of the FAT on the volume.
|
||||
* The value of this field is always 2.
|
||||
*/
|
||||
uint8_t fatCount;
|
||||
/**
|
||||
* FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
|
||||
*/
|
||||
/**
|
||||
* FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
|
||||
*/
|
||||
uint16_t rootDirEntryCount;
|
||||
/**
|
||||
* For FAT32 volumes, this field must be 0.
|
||||
*/
|
||||
/**
|
||||
* For FAT32 volumes, this field must be 0.
|
||||
*/
|
||||
uint16_t totalSectors16;
|
||||
/**
|
||||
* This dates back to the old MS-DOS 1.x media determination and is
|
||||
* no longer usually used for anything. 0xF8 is the standard value
|
||||
* for fixed (nonremovable) media. For removable media, 0xF0 is
|
||||
* frequently used. Legal values are 0xF0 or 0xF8-0xFF.
|
||||
*/
|
||||
/**
|
||||
* This dates back to the old MS-DOS 1.x media determination and is
|
||||
* no longer usually used for anything. 0xF8 is the standard value
|
||||
* for fixed (nonremovable) media. For removable media, 0xF0 is
|
||||
* frequently used. Legal values are 0xF0 or 0xF8-0xFF.
|
||||
*/
|
||||
uint8_t mediaType;
|
||||
/**
|
||||
* On FAT32 volumes this field must be 0, and sectorsPerFat32
|
||||
* contains the FAT size count.
|
||||
*/
|
||||
/**
|
||||
* On FAT32 volumes this field must be 0, and sectorsPerFat32
|
||||
* contains the FAT size count.
|
||||
*/
|
||||
uint16_t sectorsPerFat16;
|
||||
/** Sectors per track for interrupt 0x13. Not used otherwise. */
|
||||
uint16_t sectorsPerTrack;
|
||||
/** Number of heads for interrupt 0x13. Not used otherwise. */
|
||||
uint16_t headCount;
|
||||
/**
|
||||
* Count of hidden sectors preceding the partition that contains this
|
||||
* FAT volume. This field is generally only relevant for media
|
||||
* visible on interrupt 0x13.
|
||||
*/
|
||||
|
||||
uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
|
||||
uint16_t headCount; // Number of heads for interrupt 0x13. Not used otherwise.
|
||||
|
||||
/**
|
||||
* Count of hidden sectors preceding the partition that contains this
|
||||
* FAT volume. This field is generally only relevant for media
|
||||
* visible on interrupt 0x13.
|
||||
*/
|
||||
uint32_t hidddenSectors;
|
||||
/**
|
||||
* Contains the total number of sectors in the FAT32 volume.
|
||||
*/
|
||||
/**
|
||||
* Contains the total number of sectors in the FAT32 volume.
|
||||
*/
|
||||
uint32_t totalSectors32;
|
||||
/**
|
||||
* Count of sectors occupied by one FAT on FAT32 volumes.
|
||||
*/
|
||||
/**
|
||||
* Count of sectors occupied by one FAT on FAT32 volumes.
|
||||
*/
|
||||
uint32_t sectorsPerFat32;
|
||||
/**
|
||||
* This field is only defined for FAT32 media and does not exist on
|
||||
* FAT12 and FAT16 media.
|
||||
* Bits 0-3 -- Zero-based number of active FAT.
|
||||
* Only valid if mirroring is disabled.
|
||||
* Bits 4-6 -- Reserved.
|
||||
* Bit 7 -- 0 means the FAT is mirrored at runtime into all FATs.
|
||||
* -- 1 means only one FAT is active; it is the one referenced
|
||||
* in bits 0-3.
|
||||
* Bits 8-15 -- Reserved.
|
||||
*/
|
||||
/**
|
||||
* This field is only defined for FAT32 media and does not exist on
|
||||
* FAT12 and FAT16 media.
|
||||
* Bits 0-3 -- Zero-based number of active FAT.
|
||||
* Only valid if mirroring is disabled.
|
||||
* Bits 4-6 -- Reserved.
|
||||
* Bit 7 -- 0 means the FAT is mirrored at runtime into all FATs.
|
||||
* -- 1 means only one FAT is active; it is the one referenced
|
||||
* in bits 0-3.
|
||||
* Bits 8-15 -- Reserved.
|
||||
*/
|
||||
uint16_t fat32Flags;
|
||||
/**
|
||||
* FAT32 version. High byte is major revision number.
|
||||
* Low byte is minor revision number. Only 0.0 define.
|
||||
*/
|
||||
/**
|
||||
* FAT32 version. High byte is major revision number.
|
||||
* Low byte is minor revision number. Only 0.0 define.
|
||||
*/
|
||||
uint16_t fat32Version;
|
||||
/**
|
||||
* Cluster number of the first cluster of the root directory for FAT32.
|
||||
* This usually 2 but not required to be 2.
|
||||
*/
|
||||
/**
|
||||
* Cluster number of the first cluster of the root directory for FAT32.
|
||||
* This usually 2 but not required to be 2.
|
||||
*/
|
||||
uint32_t fat32RootCluster;
|
||||
/**
|
||||
* Sector number of FSINFO structure in the reserved area of the
|
||||
* FAT32 volume. Usually 1.
|
||||
*/
|
||||
/**
|
||||
* Sector number of FSINFO structure in the reserved area of the
|
||||
* FAT32 volume. Usually 1.
|
||||
*/
|
||||
uint16_t fat32FSInfo;
|
||||
/**
|
||||
* If nonzero, indicates the sector number in the reserved area
|
||||
* of the volume of a copy of the boot record. Usually 6.
|
||||
* No value other than 6 is recommended.
|
||||
*/
|
||||
/**
|
||||
* If nonzero, indicates the sector number in the reserved area
|
||||
* of the volume of a copy of the boot record. Usually 6.
|
||||
* No value other than 6 is recommended.
|
||||
*/
|
||||
uint16_t fat32BackBootBlock;
|
||||
/**
|
||||
* Reserved for future expansion. Code that formats FAT32 volumes
|
||||
* should always set all of the bytes of this field to 0.
|
||||
*/
|
||||
/**
|
||||
* Reserved for future expansion. Code that formats FAT32 volumes
|
||||
* should always set all of the bytes of this field to 0.
|
||||
*/
|
||||
uint8_t fat32Reserved[12];
|
||||
/**
|
||||
* Related to the BIOS physical drive number. Floppy drives are
|
||||
* identified as 0x00 and physical hard disks are identified as
|
||||
* 0x80, regardless of the number of physical disk drives.
|
||||
* Typically, this value is set prior to issuing an INT 13h BIOS
|
||||
* call to specify the device to access. The value is only
|
||||
* relevant if the device is a boot device.
|
||||
*/
|
||||
/**
|
||||
* Related to the BIOS physical drive number. Floppy drives are
|
||||
* identified as 0x00 and physical hard disks are identified as
|
||||
* 0x80, regardless of the number of physical disk drives.
|
||||
* Typically, this value is set prior to issuing an INT 13h BIOS
|
||||
* call to specify the device to access. The value is only
|
||||
* relevant if the device is a boot device.
|
||||
*/
|
||||
uint8_t driveNumber;
|
||||
/** used by Windows NT - should be zero for FAT */
|
||||
uint8_t reserved1;
|
||||
/** 0X29 if next three fields are valid */
|
||||
uint8_t bootSignature;
|
||||
/**
|
||||
* A random serial number created when formatting a disk,
|
||||
* which helps to distinguish between disks.
|
||||
* Usually generated by combining date and time.
|
||||
*/
|
||||
|
||||
uint8_t reserved1; // Used by Windows NT - should be zero for FAT
|
||||
uint8_t bootSignature; // 0x29 if next three fields are valid
|
||||
|
||||
/**
|
||||
* A random serial number created when formatting a disk,
|
||||
* which helps to distinguish between disks.
|
||||
* Usually generated by combining date and time.
|
||||
*/
|
||||
uint32_t volumeSerialNumber;
|
||||
/**
|
||||
* A field once used to store the volume label. The volume label
|
||||
* is now stored as a special file in the root directory.
|
||||
*/
|
||||
/**
|
||||
* A field once used to store the volume label. The volume label
|
||||
* is now stored as a special file in the root directory.
|
||||
*/
|
||||
char volumeLabel[11];
|
||||
/**
|
||||
* A text field with a value of FAT32.
|
||||
*/
|
||||
/**
|
||||
* A text field with a value of FAT32.
|
||||
*/
|
||||
char fileSystemType[8];
|
||||
/** X86 boot code */
|
||||
uint8_t bootCode[420];
|
||||
/** must be 0X55 */
|
||||
uint8_t bootSectorSig0;
|
||||
/** must be 0XAA */
|
||||
uint8_t bootSectorSig1;
|
||||
|
||||
uint8_t bootCode[420]; // X86 boot code
|
||||
uint8_t bootSectorSig0; // must be 0x55
|
||||
uint8_t bootSectorSig1; // must be 0xAA
|
||||
|
||||
} PACKED;
|
||||
/** Type name for FAT32 Boot Sector */
|
||||
typedef struct fat32_boot fat32_boot_t;
|
||||
//------------------------------------------------------------------------------
|
||||
/** Lead signature for a FSINFO sector */
|
||||
uint32_t const FSINFO_LEAD_SIG = 0x41615252;
|
||||
/** Struct signature for a FSINFO sector */
|
||||
uint32_t const FSINFO_STRUCT_SIG = 0x61417272;
|
||||
|
||||
typedef struct fat32_boot fat32_boot_t; // Type name for FAT32 Boot Sector
|
||||
|
||||
uint32_t const FSINFO_LEAD_SIG = 0x41615252, // 'AaRR' Lead signature for a FSINFO sector
|
||||
FSINFO_STRUCT_SIG = 0x61417272; // 'aArr' Struct signature for a FSINFO sector
|
||||
|
||||
/**
|
||||
* \struct fat32_fsinfo
|
||||
*
|
||||
@@ -427,12 +411,9 @@ uint32_t const FSINFO_STRUCT_SIG = 0x61417272;
|
||||
*
|
||||
*/
|
||||
struct fat32_fsinfo {
|
||||
/** must be 0X52, 0X52, 0X61, 0X41 */
|
||||
uint32_t leadSignature;
|
||||
/** must be zero */
|
||||
uint8_t reserved1[480];
|
||||
/** must be 0X72, 0X72, 0X41, 0X61 */
|
||||
uint32_t structSignature;
|
||||
uint32_t leadSignature; // must be 0x52, 0x52, 0x61, 0x41 'RRaA'
|
||||
uint8_t reserved1[480]; // must be zero
|
||||
uint32_t structSignature; // must be 0x72, 0x72, 0x41, 0x61 'rrAa'
|
||||
/**
|
||||
* Contains the last known free cluster count on the volume.
|
||||
* If the value is 0xFFFFFFFF, then the free count is unknown
|
||||
@@ -448,30 +429,22 @@ struct fat32_fsinfo {
|
||||
* should start looking at cluster 2.
|
||||
*/
|
||||
uint32_t nextFree;
|
||||
/** must be zero */
|
||||
uint8_t reserved2[12];
|
||||
/** must be 0X00, 0X00, 0X55, 0XAA */
|
||||
uint8_t tailSignature[4];
|
||||
|
||||
uint8_t reserved2[12]; // must be zero
|
||||
uint8_t tailSignature[4]; // must be 0x00, 0x00, 0x55, 0xAA
|
||||
} PACKED;
|
||||
/** Type name for FAT32 FSINFO Sector */
|
||||
typedef struct fat32_fsinfo fat32_fsinfo_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef struct fat32_fsinfo fat32_fsinfo_t; // Type name for FAT32 FSINFO Sector
|
||||
|
||||
// End Of Chain values for FAT entries
|
||||
/** FAT12 end of chain value used by Microsoft. */
|
||||
uint16_t const FAT12EOC = 0XFFF;
|
||||
/** Minimum value for FAT12 EOC. Use to test for EOC. */
|
||||
uint16_t const FAT12EOC_MIN = 0XFF8;
|
||||
/** FAT16 end of chain value used by Microsoft. */
|
||||
uint16_t const FAT16EOC = 0XFFFF;
|
||||
/** Minimum value for FAT16 EOC. Use to test for EOC. */
|
||||
uint16_t const FAT16EOC_MIN = 0XFFF8;
|
||||
/** FAT32 end of chain value used by Microsoft. */
|
||||
uint32_t const FAT32EOC = 0X0FFFFFFF;
|
||||
/** Minimum value for FAT32 EOC. Use to test for EOC. */
|
||||
uint32_t const FAT32EOC_MIN = 0X0FFFFFF8;
|
||||
/** Mask a for FAT32 entry. Entries are 28 bits. */
|
||||
uint32_t const FAT32MASK = 0X0FFFFFFF;
|
||||
//------------------------------------------------------------------------------
|
||||
uint16_t const FAT12EOC = 0xFFF, // FAT12 end of chain value used by Microsoft.
|
||||
FAT12EOC_MIN = 0xFF8, // Minimum value for FAT12 EOC. Use to test for EOC.
|
||||
FAT16EOC = 0xFFFF, // FAT16 end of chain value used by Microsoft.
|
||||
FAT16EOC_MIN = 0xFFF8; // Minimum value for FAT16 EOC. Use to test for EOC.
|
||||
uint32_t const FAT32EOC = 0x0FFFFFFF, // FAT32 end of chain value used by Microsoft.
|
||||
FAT32EOC_MIN = 0x0FFFFFF8, // Minimum value for FAT32 EOC. Use to test for EOC.
|
||||
FAT32MASK = 0x0FFFFFFF; // Mask a for FAT32 entry. Entries are 28 bits.
|
||||
|
||||
/**
|
||||
* \struct directoryEntry
|
||||
* \brief FAT short directory entry
|
||||
@@ -503,54 +476,54 @@ uint32_t const FAT32MASK = 0X0FFFFFFF;
|
||||
* The valid time range is from Midnight 00:00:00 to 23:59:58.
|
||||
*/
|
||||
struct directoryEntry {
|
||||
/** Short 8.3 name.
|
||||
*
|
||||
* The first eight bytes contain the file name with blank fill.
|
||||
* The last three bytes contain the file extension with blank fill.
|
||||
*/
|
||||
/**
|
||||
* Short 8.3 name.
|
||||
*
|
||||
* The first eight bytes contain the file name with blank fill.
|
||||
* The last three bytes contain the file extension with blank fill.
|
||||
*/
|
||||
uint8_t name[11];
|
||||
/** Entry attributes.
|
||||
*
|
||||
* The upper two bits of the attribute byte are reserved and should
|
||||
* always be set to 0 when a file is created and never modified or
|
||||
* looked at after that. See defines that begin with DIR_ATT_.
|
||||
*/
|
||||
/**
|
||||
* Entry attributes.
|
||||
*
|
||||
* The upper two bits of the attribute byte are reserved and should
|
||||
* always be set to 0 when a file is created and never modified or
|
||||
* looked at after that. See defines that begin with DIR_ATT_.
|
||||
*/
|
||||
uint8_t attributes;
|
||||
/**
|
||||
* Reserved for use by Windows NT. Set value to 0 when a file is
|
||||
* created and never modify or look at it after that.
|
||||
*/
|
||||
/**
|
||||
* Reserved for use by Windows NT. Set value to 0 when a file is
|
||||
* created and never modify or look at it after that.
|
||||
*/
|
||||
uint8_t reservedNT;
|
||||
/**
|
||||
* The granularity of the seconds part of creationTime is 2 seconds
|
||||
* so this field is a count of tenths of a second and its valid
|
||||
* value range is 0-199 inclusive. (WHG note - seems to be hundredths)
|
||||
*/
|
||||
/**
|
||||
* The granularity of the seconds part of creationTime is 2 seconds
|
||||
* so this field is a count of tenths of a second and it's valid
|
||||
* value range is 0-199 inclusive. (WHG note - seems to be hundredths)
|
||||
*/
|
||||
uint8_t creationTimeTenths;
|
||||
/** Time file was created. */
|
||||
uint16_t creationTime;
|
||||
/** Date file was created. */
|
||||
uint16_t creationDate;
|
||||
/**
|
||||
* Last access date. Note that there is no last access time, only
|
||||
* a date. This is the date of last read or write. In the case of
|
||||
* a write, this should be set to the same date as lastWriteDate.
|
||||
*/
|
||||
|
||||
uint16_t creationTime; // Time file was created.
|
||||
uint16_t creationDate; // Date file was created.
|
||||
|
||||
/**
|
||||
* Last access date. Note that there is no last access time, only
|
||||
* a date. This is the date of last read or write. In the case of
|
||||
* a write, this should be set to the same date as lastWriteDate.
|
||||
*/
|
||||
uint16_t lastAccessDate;
|
||||
/**
|
||||
* High word of this entry's first cluster number (always 0 for a
|
||||
* FAT12 or FAT16 volume).
|
||||
*/
|
||||
/**
|
||||
* High word of this entry's first cluster number (always 0 for a
|
||||
* FAT12 or FAT16 volume).
|
||||
*/
|
||||
uint16_t firstClusterHigh;
|
||||
/** Time of last write. File creation is considered a write. */
|
||||
uint16_t lastWriteTime;
|
||||
/** Date of last write. File creation is considered a write. */
|
||||
uint16_t lastWriteDate;
|
||||
/** Low word of this entry's first cluster number. */
|
||||
uint16_t firstClusterLow;
|
||||
/** 32-bit unsigned holding this file's size in bytes. */
|
||||
uint32_t fileSize;
|
||||
|
||||
uint16_t lastWriteTime; // Time of last write. File creation is considered a write.
|
||||
uint16_t lastWriteDate; // Date of last write. File creation is considered a write.
|
||||
uint16_t firstClusterLow; // Low word of this entry's first cluster number.
|
||||
uint32_t fileSize; // 32-bit unsigned holding this file's size in bytes.
|
||||
} PACKED;
|
||||
|
||||
/**
|
||||
* \struct directoryVFATEntry
|
||||
* \brief VFAT long filename directory entry
|
||||
@@ -568,54 +541,36 @@ struct directoryVFATEntry {
|
||||
* bit 0-4: the position of this long filename block (first block is 1)
|
||||
*/
|
||||
uint8_t sequenceNumber;
|
||||
/** First set of UTF-16 characters */
|
||||
uint16_t name1[5];//UTF-16
|
||||
/** attributes (at the same location as in directoryEntry), always 0x0F */
|
||||
uint8_t attributes;
|
||||
/** Reserved for use by Windows NT. Always 0. */
|
||||
uint8_t reservedNT;
|
||||
/** Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation. */
|
||||
uint8_t checksum;
|
||||
/** Second set of UTF-16 characters */
|
||||
uint16_t name2[6];//UTF-16
|
||||
/** firstClusterLow is always zero for longFilenames */
|
||||
uint16_t firstClusterLow;
|
||||
/** Third set of UTF-16 characters */
|
||||
uint16_t name3[2];//UTF-16
|
||||
|
||||
uint16_t name1[5]; // First set of UTF-16 characters
|
||||
uint8_t attributes; // attributes (at the same location as in directoryEntry), always 0x0F
|
||||
uint8_t reservedNT; // Reserved for use by Windows NT. Always 0.
|
||||
uint8_t checksum; // Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation.
|
||||
uint16_t name2[6]; // Second set of UTF-16 characters
|
||||
uint16_t firstClusterLow; // firstClusterLow is always zero for longFilenames
|
||||
uint16_t name3[2]; // Third set of UTF-16 characters
|
||||
} PACKED;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Definitions for directory entries
|
||||
//
|
||||
/** Type name for directoryEntry */
|
||||
typedef struct directoryEntry dir_t;
|
||||
/** Type name for directoryVFATEntry */
|
||||
typedef struct directoryVFATEntry vfat_t;
|
||||
/** escape for name[0] = 0XE5 */
|
||||
uint8_t const DIR_NAME_0XE5 = 0X05;
|
||||
/** name[0] value for entry that is free after being "deleted" */
|
||||
uint8_t const DIR_NAME_DELETED = 0XE5;
|
||||
/** name[0] value for entry that is free and no allocated entries follow */
|
||||
uint8_t const DIR_NAME_FREE = 0X00;
|
||||
/** file is read-only */
|
||||
uint8_t const DIR_ATT_READ_ONLY = 0X01;
|
||||
/** File should hidden in directory listings */
|
||||
uint8_t const DIR_ATT_HIDDEN = 0X02;
|
||||
/** Entry is for a system file */
|
||||
uint8_t const DIR_ATT_SYSTEM = 0X04;
|
||||
/** Directory entry contains the volume label */
|
||||
uint8_t const DIR_ATT_VOLUME_ID = 0X08;
|
||||
/** Entry is for a directory */
|
||||
uint8_t const DIR_ATT_DIRECTORY = 0X10;
|
||||
/** Old DOS archive bit for backup support */
|
||||
uint8_t const DIR_ATT_ARCHIVE = 0X20;
|
||||
/** Test value for long name entry. Test is
|
||||
(d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME. */
|
||||
uint8_t const DIR_ATT_LONG_NAME = 0X0F;
|
||||
/** Test mask for long name entry */
|
||||
uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F;
|
||||
/** defined attribute bits */
|
||||
uint8_t const DIR_ATT_DEFINED_BITS = 0X3F;
|
||||
/** Directory entry is part of a long name
|
||||
typedef struct directoryEntry dir_t; // Type name for directoryEntry
|
||||
typedef struct directoryVFATEntry vfat_t; // Type name for directoryVFATEntry
|
||||
|
||||
uint8_t const DIR_NAME_0xE5 = 0x05, // escape for name[0] = 0xE5
|
||||
DIR_NAME_DELETED = 0xE5, // name[0] value for entry that is free after being "deleted"
|
||||
DIR_NAME_FREE = 0x00, // name[0] value for entry that is free and no allocated entries follow
|
||||
DIR_ATT_READ_ONLY = 0x01, // file is read-only
|
||||
DIR_ATT_HIDDEN = 0x02, // File should hidden in directory listings
|
||||
DIR_ATT_SYSTEM = 0x04, // Entry is for a system file
|
||||
DIR_ATT_VOLUME_ID = 0x08, // Directory entry contains the volume label
|
||||
DIR_ATT_DIRECTORY = 0x10, // Entry is for a directory
|
||||
DIR_ATT_ARCHIVE = 0x20, // Old DOS archive bit for backup support
|
||||
DIR_ATT_LONG_NAME = 0x0F, // Test value for long name entry. Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.
|
||||
DIR_ATT_LONG_NAME_MASK = 0x3F, // Test mask for long name entry
|
||||
DIR_ATT_DEFINED_BITS = 0x3F; // defined attribute bits
|
||||
|
||||
/**
|
||||
* Directory entry is part of a long name
|
||||
* \param[in] dir Pointer to a directory entry.
|
||||
*
|
||||
* \return true if the entry is for part of a long name else false.
|
||||
@@ -623,9 +578,12 @@ uint8_t const DIR_ATT_DEFINED_BITS = 0X3F;
|
||||
static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
|
||||
return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
|
||||
}
|
||||
|
||||
/** Mask for file/subdirectory tests */
|
||||
uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
|
||||
/** Directory entry is for a file
|
||||
|
||||
/**
|
||||
* Directory entry is for a file
|
||||
* \param[in] dir Pointer to a directory entry.
|
||||
*
|
||||
* \return true if the entry is for a normal file else false.
|
||||
@@ -633,7 +591,9 @@ uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
|
||||
static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
|
||||
return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
|
||||
}
|
||||
/** Directory entry is for a subdirectory
|
||||
|
||||
/**
|
||||
* Directory entry is for a subdirectory
|
||||
* \param[in] dir Pointer to a directory entry.
|
||||
*
|
||||
* \return true if the entry is for a subdirectory else false.
|
||||
@@ -641,7 +601,9 @@ static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
|
||||
static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
|
||||
return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
|
||||
}
|
||||
/** Directory entry is for a file or subdirectory
|
||||
|
||||
/**
|
||||
* Directory entry is for a file or subdirectory
|
||||
* \param[in] dir Pointer to a directory entry.
|
||||
*
|
||||
* \return true if the entry is for a normal file or subdirectory else false.
|
||||
@@ -649,7 +611,5 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
|
||||
static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
|
||||
return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
|
||||
}
|
||||
#endif // SdFatStructs_h
|
||||
|
||||
|
||||
#endif
|
||||
#endif // SDFATSTRUCTS_H
|
||||
|
||||
+24
-24
@@ -26,13 +26,15 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "SdFatUtil.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** Amount of free RAM
|
||||
#include "SdFatUtil.h"
|
||||
#include "serial.h"
|
||||
|
||||
/**
|
||||
* Amount of free RAM
|
||||
* \return The number of free bytes.
|
||||
*/
|
||||
#ifdef __arm__
|
||||
@@ -44,7 +46,8 @@ int SdFatUtil::FreeRam() {
|
||||
#else // __arm__
|
||||
extern char* __brkval;
|
||||
extern char __bss_end;
|
||||
/** Amount of free RAM
|
||||
/**
|
||||
* Amount of free RAM
|
||||
* \return The number of free bytes.
|
||||
*/
|
||||
int SdFatUtil::FreeRam() {
|
||||
@@ -53,8 +56,8 @@ int SdFatUtil::FreeRam() {
|
||||
}
|
||||
#endif // __arm
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** %Print a string in flash memory.
|
||||
/**
|
||||
* %Print a string in flash memory.
|
||||
*
|
||||
* \param[in] pr Print object for output.
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
@@ -62,30 +65,27 @@ int SdFatUtil::FreeRam() {
|
||||
void SdFatUtil::print_P(PGM_P str) {
|
||||
for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** %Print a string in flash memory followed by a CR/LF.
|
||||
|
||||
/**
|
||||
* %Print a string in flash memory followed by a CR/LF.
|
||||
*
|
||||
* \param[in] pr Print object for output.
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::println_P(PGM_P str) {
|
||||
print_P(str);
|
||||
MYSERIAL.println();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** %Print a string in flash memory to Serial.
|
||||
void SdFatUtil::println_P(PGM_P str) { print_P(str); MYSERIAL.println(); }
|
||||
|
||||
/**
|
||||
* %Print a string in flash memory to Serial.
|
||||
*
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::SerialPrint_P(PGM_P str) {
|
||||
print_P(str);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** %Print a string in flash memory to Serial followed by a CR/LF.
|
||||
void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
|
||||
|
||||
/**
|
||||
* %Print a string in flash memory to Serial followed by a CR/LF.
|
||||
*
|
||||
* \param[in] str Pointer to string stored in flash memory.
|
||||
*/
|
||||
void SdFatUtil::SerialPrintln_P(PGM_P str) {
|
||||
println_P(str);
|
||||
}
|
||||
#endif
|
||||
void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
+3
-8
@@ -26,11 +26,8 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#ifndef SdFatUtil_h
|
||||
#define SdFatUtil_h
|
||||
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#ifndef _SDFATUTIL_H_
|
||||
#define _SDFATUTIL_H_
|
||||
|
||||
/**
|
||||
* \file
|
||||
@@ -51,6 +48,4 @@ namespace SdFatUtil {
|
||||
|
||||
using namespace SdFatUtil; // NOLINT
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
#endif // SdFatUtil_h
|
||||
#endif // _SDFATUTIL_H_
|
||||
|
||||
+26
-28
@@ -26,21 +26,24 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#include "SdFile.h"
|
||||
/** Create a file object and open it in the current working directory.
|
||||
|
||||
/**
|
||||
* Create a file object and open it in the current working directory.
|
||||
*
|
||||
* \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
|
||||
*
|
||||
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
|
||||
* OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
|
||||
*/
|
||||
SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write data to an open file.
|
||||
SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { }
|
||||
|
||||
/**
|
||||
* Write data to an open file.
|
||||
*
|
||||
* \note Data is moved to the cache but may not be written to the
|
||||
* storage device until sync() is called.
|
||||
@@ -55,41 +58,37 @@ SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
|
||||
* for a read-only file, device is full, a corrupt file system or an I/O error.
|
||||
*
|
||||
*/
|
||||
int16_t SdFile::write(const void* buf, uint16_t nbyte) {
|
||||
return SdBaseFile::write(buf, nbyte);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write a byte to a file. Required by the Arduino Print class.
|
||||
int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
|
||||
|
||||
/**
|
||||
* Write a byte to a file. Required by the Arduino Print class.
|
||||
* \param[in] b the byte to be written.
|
||||
* Use writeError to check for errors.
|
||||
*/
|
||||
#if ARDUINO >= 100
|
||||
size_t SdFile::write(uint8_t b) {
|
||||
return SdBaseFile::write(&b, 1);
|
||||
}
|
||||
size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); }
|
||||
#else
|
||||
void SdFile::write(uint8_t b) {
|
||||
SdBaseFile::write(&b, 1);
|
||||
}
|
||||
void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); }
|
||||
#endif
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write a string to a file. Used by the Arduino Print class.
|
||||
|
||||
/**
|
||||
* Write a string to a file. Used by the Arduino Print class.
|
||||
* \param[in] str Pointer to the string.
|
||||
* Use writeError to check for errors.
|
||||
*/
|
||||
void SdFile::write(const char* str) {
|
||||
SdBaseFile::write(str, strlen(str));
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write a PROGMEM string to a file.
|
||||
void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); }
|
||||
|
||||
/**
|
||||
* Write a PROGMEM string to a file.
|
||||
* \param[in] str Pointer to the PROGMEM string.
|
||||
* Use writeError to check for errors.
|
||||
*/
|
||||
void SdFile::write_P(PGM_P str) {
|
||||
for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Write a PROGMEM string followed by CR/LF to a file.
|
||||
|
||||
/**
|
||||
* Write a PROGMEM string followed by CR/LF to a file.
|
||||
* \param[in] str Pointer to the PROGMEM string.
|
||||
* Use writeError to check for errors.
|
||||
*/
|
||||
@@ -98,5 +97,4 @@ void SdFile::writeln_P(PGM_P str) {
|
||||
write_P(PSTR("\r\n"));
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif // SDSUPPORT
|
||||
|
||||
+9
-12
@@ -20,24 +20,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief SdFile class
|
||||
*/
|
||||
|
||||
/**
|
||||
* Arduino SdFat Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
* \brief SdFile class
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#ifndef _SDFILE_H_
|
||||
#define _SDFILE_H_
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "SdBaseFile.h"
|
||||
#include <Print.h>
|
||||
#ifndef SdFile_h
|
||||
#define SdFile_h
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \class SdFile
|
||||
* \brief SdBaseFile with Print.
|
||||
@@ -57,7 +56,5 @@ class SdFile : public SdBaseFile, public Print {
|
||||
void write_P(PGM_P str);
|
||||
void writeln_P(PGM_P str);
|
||||
};
|
||||
#endif // SdFile_h
|
||||
|
||||
|
||||
#endif
|
||||
#endif // _SDFILE_H_
|
||||
|
||||
+36
-58
@@ -26,12 +26,11 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#ifndef _SDINFO_H_
|
||||
#define _SDINFO_H_
|
||||
|
||||
#ifndef SdInfo_h
|
||||
#define SdInfo_h
|
||||
#include <stdint.h>
|
||||
|
||||
// Based on the document:
|
||||
//
|
||||
// SD Specifications
|
||||
@@ -42,63 +41,43 @@
|
||||
// May 18, 2010
|
||||
//
|
||||
// http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// SD card commands
|
||||
/** GO_IDLE_STATE - init card in spi mode if CS low */
|
||||
uint8_t const CMD0 = 0X00;
|
||||
/** SEND_IF_COND - verify SD Memory Card interface operating condition.*/
|
||||
uint8_t const CMD8 = 0X08;
|
||||
/** SEND_CSD - read the Card Specific Data (CSD register) */
|
||||
uint8_t const CMD9 = 0X09;
|
||||
/** SEND_CID - read the card identification information (CID register) */
|
||||
uint8_t const CMD10 = 0X0A;
|
||||
/** STOP_TRANSMISSION - end multiple block read sequence */
|
||||
uint8_t const CMD12 = 0X0C;
|
||||
/** SEND_STATUS - read the card status register */
|
||||
uint8_t const CMD13 = 0X0D;
|
||||
/** READ_SINGLE_BLOCK - read a single data block from the card */
|
||||
uint8_t const CMD17 = 0X11;
|
||||
/** READ_MULTIPLE_BLOCK - read a multiple data blocks from the card */
|
||||
uint8_t const CMD18 = 0X12;
|
||||
/** WRITE_BLOCK - write a single data block to the card */
|
||||
uint8_t const CMD24 = 0X18;
|
||||
/** WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION */
|
||||
uint8_t const CMD25 = 0X19;
|
||||
/** ERASE_WR_BLK_START - sets the address of the first block to be erased */
|
||||
uint8_t const CMD32 = 0X20;
|
||||
/** ERASE_WR_BLK_END - sets the address of the last block of the continuous
|
||||
range to be erased*/
|
||||
uint8_t const CMD33 = 0X21;
|
||||
/** ERASE - erase all previously selected blocks */
|
||||
uint8_t const CMD38 = 0X26;
|
||||
/** APP_CMD - escape for application specific command */
|
||||
uint8_t const CMD55 = 0X37;
|
||||
/** READ_OCR - read the OCR register of a card */
|
||||
uint8_t const CMD58 = 0X3A;
|
||||
/** SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be
|
||||
pre-erased before writing */
|
||||
uint8_t const ACMD23 = 0X17;
|
||||
/** SD_SEND_OP_COMD - Sends host capacity support information and
|
||||
activates the card's initialization process */
|
||||
uint8_t const ACMD41 = 0X29;
|
||||
//------------------------------------------------------------------------------
|
||||
uint8_t const CMD0 = 0x00, // GO_IDLE_STATE - init card in spi mode if CS low
|
||||
CMD8 = 0x08, // SEND_IF_COND - verify SD Memory Card interface operating condition
|
||||
CMD9 = 0x09, // SEND_CSD - read the Card Specific Data (CSD register)
|
||||
CMD10 = 0x0A, // SEND_CID - read the card identification information (CID register)
|
||||
CMD12 = 0x0C, // STOP_TRANSMISSION - end multiple block read sequence
|
||||
CMD13 = 0x0D, // SEND_STATUS - read the card status register
|
||||
CMD17 = 0x11, // READ_SINGLE_BLOCK - read a single data block from the card
|
||||
CMD18 = 0x12, // READ_MULTIPLE_BLOCK - read a multiple data blocks from the card
|
||||
CMD24 = 0x18, // WRITE_BLOCK - write a single data block to the card
|
||||
CMD25 = 0x19, // WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
|
||||
CMD32 = 0x20, // ERASE_WR_BLK_START - sets the address of the first block to be erased
|
||||
CMD33 = 0x21, // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased*/
|
||||
CMD38 = 0x26, // ERASE - erase all previously selected blocks */
|
||||
CMD55 = 0x37, // APP_CMD - escape for application specific command */
|
||||
CMD58 = 0x3A, // READ_OCR - read the OCR register of a card */
|
||||
ACMD23 = 0x17, // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */
|
||||
ACMD41 = 0x29; // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process */
|
||||
|
||||
/** status for card in the ready state */
|
||||
uint8_t const R1_READY_STATE = 0X00;
|
||||
uint8_t const R1_READY_STATE = 0x00;
|
||||
/** status for card in the idle state */
|
||||
uint8_t const R1_IDLE_STATE = 0X01;
|
||||
uint8_t const R1_IDLE_STATE = 0x01;
|
||||
/** status bit for illegal command */
|
||||
uint8_t const R1_ILLEGAL_COMMAND = 0X04;
|
||||
uint8_t const R1_ILLEGAL_COMMAND = 0x04;
|
||||
/** start data token for read or write single block*/
|
||||
uint8_t const DATA_START_BLOCK = 0XFE;
|
||||
uint8_t const DATA_START_BLOCK = 0xFE;
|
||||
/** stop token for write multiple blocks*/
|
||||
uint8_t const STOP_TRAN_TOKEN = 0XFD;
|
||||
uint8_t const STOP_TRAN_TOKEN = 0xFD;
|
||||
/** start data token for write multiple blocks*/
|
||||
uint8_t const WRITE_MULTIPLE_TOKEN = 0XFC;
|
||||
uint8_t const WRITE_MULTIPLE_TOKEN = 0xFC;
|
||||
/** mask for data response tokens after a write block operation */
|
||||
uint8_t const DATA_RES_MASK = 0X1F;
|
||||
uint8_t const DATA_RES_MASK = 0x1F;
|
||||
/** write data accepted token */
|
||||
uint8_t const DATA_RES_ACCEPTED = 0X05;
|
||||
//------------------------------------------------------------------------------
|
||||
uint8_t const DATA_RES_ACCEPTED = 0x05;
|
||||
|
||||
/** Card IDentification (CID) register */
|
||||
typedef struct CID {
|
||||
// byte 0
|
||||
@@ -134,7 +113,7 @@ typedef struct CID {
|
||||
/** CRC7 checksum */
|
||||
unsigned char crc : 7;
|
||||
} cid_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** CSD for version 1.00 cards */
|
||||
typedef struct CSDV1 {
|
||||
// byte 0
|
||||
@@ -196,14 +175,14 @@ typedef struct CSDV1 {
|
||||
unsigned char always1 : 1;
|
||||
unsigned char crc : 7;
|
||||
} csd1_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** CSD for version 2.00 cards */
|
||||
typedef struct CSDV2 {
|
||||
// byte 0
|
||||
unsigned char reserved1 : 6;
|
||||
unsigned char csd_ver : 2;
|
||||
// byte 1
|
||||
/** fixed to 0X0E */
|
||||
/** fixed to 0x0E */
|
||||
unsigned char taac;
|
||||
// byte 2
|
||||
/** fixed to 0 */
|
||||
@@ -278,12 +257,11 @@ typedef struct CSDV2 {
|
||||
/** checksum */
|
||||
unsigned char crc : 7;
|
||||
} csd2_t;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** union of old and new style CSD register */
|
||||
union csd_t {
|
||||
csd1_t v1;
|
||||
csd2_t v2;
|
||||
};
|
||||
#endif // SdInfo_h
|
||||
|
||||
#endif
|
||||
#endif // _SDINFO_H_
|
||||
|
||||
+82
-118
@@ -26,11 +26,12 @@
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#include "SdVolume.h"
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if !USE_MULTIPLE_CARDS
|
||||
// raw block cache
|
||||
uint32_t SdVolume::cacheBlockNumber_; // current block number
|
||||
@@ -39,7 +40,7 @@
|
||||
bool SdVolume::cacheDirty_; // cacheFlush() will write block if true
|
||||
uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT
|
||||
#endif // USE_MULTIPLE_CARDS
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// find a contiguous group of clusters
|
||||
bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
|
||||
// start of group
|
||||
@@ -73,14 +74,14 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
|
||||
// search the FAT for free clusters
|
||||
for (uint32_t n = 0;; n++, endCluster++) {
|
||||
// can't find space checked all clusters
|
||||
if (n >= clusterCount_) goto fail;
|
||||
if (n >= clusterCount_) return false;
|
||||
|
||||
// past end - start from beginning of FAT
|
||||
if (endCluster > fatEnd) {
|
||||
bgnCluster = endCluster = 2;
|
||||
}
|
||||
uint32_t f;
|
||||
if (!fatGet(endCluster, &f)) goto fail;
|
||||
if (!fatGet(endCluster, &f)) return false;
|
||||
|
||||
if (f != 0) {
|
||||
// cluster in use try next cluster as bgnCluster
|
||||
@@ -92,16 +93,16 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
|
||||
}
|
||||
}
|
||||
// mark end of chain
|
||||
if (!fatPutEOC(endCluster)) goto fail;
|
||||
if (!fatPutEOC(endCluster)) return false;
|
||||
|
||||
// link clusters
|
||||
while (endCluster > bgnCluster) {
|
||||
if (!fatPut(endCluster - 1, endCluster)) goto fail;
|
||||
if (!fatPut(endCluster - 1, endCluster)) return false;
|
||||
endCluster--;
|
||||
}
|
||||
if (*curCluster != 0) {
|
||||
// connect chains
|
||||
if (!fatPut(*curCluster, bgnCluster)) goto fail;
|
||||
if (!fatPut(*curCluster, bgnCluster)) return false;
|
||||
}
|
||||
// return first cluster number to caller
|
||||
*curCluster = bgnCluster;
|
||||
@@ -110,114 +111,97 @@ bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
|
||||
if (setStart) allocSearchStart_ = bgnCluster + 1;
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
bool SdVolume::cacheFlush() {
|
||||
if (cacheDirty_) {
|
||||
if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data)) {
|
||||
goto fail;
|
||||
}
|
||||
if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data))
|
||||
return false;
|
||||
|
||||
// mirror FAT tables
|
||||
if (cacheMirrorBlock_) {
|
||||
if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data)) {
|
||||
goto fail;
|
||||
}
|
||||
if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data))
|
||||
return false;
|
||||
cacheMirrorBlock_ = 0;
|
||||
}
|
||||
cacheDirty_ = 0;
|
||||
}
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
|
||||
if (cacheBlockNumber_ != blockNumber) {
|
||||
if (!cacheFlush()) goto fail;
|
||||
if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) goto fail;
|
||||
if (!cacheFlush()) return false;
|
||||
if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false;
|
||||
cacheBlockNumber_ = blockNumber;
|
||||
}
|
||||
if (dirty) cacheDirty_ = true;
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// return the size in bytes of a cluster chain
|
||||
bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
|
||||
uint32_t s = 0;
|
||||
do {
|
||||
if (!fatGet(cluster, &cluster)) goto fail;
|
||||
if (!fatGet(cluster, &cluster)) return false;
|
||||
s += 512UL << clusterSizeShift_;
|
||||
} while (!isEOC(cluster));
|
||||
*size = s;
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Fetch a FAT entry
|
||||
bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
|
||||
uint32_t lba;
|
||||
if (cluster > (clusterCount_ + 1)) goto fail;
|
||||
if (cluster > (clusterCount_ + 1)) return false;
|
||||
if (FAT12_SUPPORT && fatType_ == 12) {
|
||||
uint16_t index = cluster;
|
||||
index += index >> 1;
|
||||
lba = fatStartBlock_ + (index >> 9);
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail;
|
||||
index &= 0X1FF;
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_READ)) return false;
|
||||
index &= 0x1FF;
|
||||
uint16_t tmp = cacheBuffer_.data[index];
|
||||
index++;
|
||||
if (index == 512) {
|
||||
if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) goto fail;
|
||||
if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) return false;
|
||||
index = 0;
|
||||
}
|
||||
tmp |= cacheBuffer_.data[index] << 8;
|
||||
*value = cluster & 1 ? tmp >> 4 : tmp & 0XFFF;
|
||||
*value = cluster & 1 ? tmp >> 4 : tmp & 0xFFF;
|
||||
return true;
|
||||
}
|
||||
if (fatType_ == 16) {
|
||||
|
||||
if (fatType_ == 16)
|
||||
lba = fatStartBlock_ + (cluster >> 8);
|
||||
}
|
||||
else if (fatType_ == 32) {
|
||||
else if (fatType_ == 32)
|
||||
lba = fatStartBlock_ + (cluster >> 7);
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
if (lba != cacheBlockNumber_) {
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail;
|
||||
}
|
||||
if (fatType_ == 16) {
|
||||
*value = cacheBuffer_.fat16[cluster & 0XFF];
|
||||
}
|
||||
else {
|
||||
*value = cacheBuffer_.fat32[cluster & 0X7F] & FAT32MASK;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
if (lba != cacheBlockNumber_ && !cacheRawBlock(lba, CACHE_FOR_READ))
|
||||
return false;
|
||||
|
||||
*value = (fatType_ == 16) ? cacheBuffer_.fat16[cluster & 0xFF] : (cacheBuffer_.fat32[cluster & 0x7F] & FAT32MASK);
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Store a FAT entry
|
||||
bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
|
||||
uint32_t lba;
|
||||
// error if reserved cluster
|
||||
if (cluster < 2) goto fail;
|
||||
if (cluster < 2) return false;
|
||||
|
||||
// error if not in FAT
|
||||
if (cluster > (clusterCount_ + 1)) goto fail;
|
||||
if (cluster > (clusterCount_ + 1)) return false;
|
||||
|
||||
if (FAT12_SUPPORT && fatType_ == 12) {
|
||||
uint16_t index = cluster;
|
||||
index += index >> 1;
|
||||
lba = fatStartBlock_ + (index >> 9);
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail;
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
|
||||
// mirror second FAT
|
||||
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
|
||||
index &= 0X1FF;
|
||||
index &= 0x1FF;
|
||||
uint8_t tmp = value;
|
||||
if (cluster & 1) {
|
||||
tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4;
|
||||
@@ -227,62 +211,56 @@ bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
|
||||
if (index == 512) {
|
||||
lba++;
|
||||
index = 0;
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail;
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
|
||||
// mirror second FAT
|
||||
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
|
||||
}
|
||||
tmp = value >> 4;
|
||||
if (!(cluster & 1)) {
|
||||
tmp = ((cacheBuffer_.data[index] & 0XF0)) | tmp >> 4;
|
||||
tmp = ((cacheBuffer_.data[index] & 0xF0)) | tmp >> 4;
|
||||
}
|
||||
cacheBuffer_.data[index] = tmp;
|
||||
return true;
|
||||
}
|
||||
if (fatType_ == 16) {
|
||||
|
||||
if (fatType_ == 16)
|
||||
lba = fatStartBlock_ + (cluster >> 8);
|
||||
}
|
||||
else if (fatType_ == 32) {
|
||||
else if (fatType_ == 32)
|
||||
lba = fatStartBlock_ + (cluster >> 7);
|
||||
}
|
||||
else {
|
||||
goto fail;
|
||||
}
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail;
|
||||
else
|
||||
return false;
|
||||
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
|
||||
|
||||
// store entry
|
||||
if (fatType_ == 16) {
|
||||
cacheBuffer_.fat16[cluster & 0XFF] = value;
|
||||
}
|
||||
else {
|
||||
cacheBuffer_.fat32[cluster & 0X7F] = value;
|
||||
}
|
||||
if (fatType_ == 16)
|
||||
cacheBuffer_.fat16[cluster & 0xFF] = value;
|
||||
else
|
||||
cacheBuffer_.fat32[cluster & 0x7F] = value;
|
||||
|
||||
// mirror second FAT
|
||||
if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// free a cluster chain
|
||||
bool SdVolume::freeChain(uint32_t cluster) {
|
||||
uint32_t next;
|
||||
|
||||
// clear free cluster location
|
||||
allocSearchStart_ = 2;
|
||||
|
||||
do {
|
||||
if (!fatGet(cluster, &next)) goto fail;
|
||||
uint32_t next;
|
||||
if (!fatGet(cluster, &next)) return false;
|
||||
|
||||
// free cluster
|
||||
if (!fatPut(cluster, 0)) goto fail;
|
||||
if (!fatPut(cluster, 0)) return false;
|
||||
|
||||
cluster = next;
|
||||
} while (!isEOC(cluster));
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Volume free space in clusters.
|
||||
*
|
||||
* \return Count of free clusters for success or -1 if an error occurs.
|
||||
@@ -292,34 +270,28 @@ int32_t SdVolume::freeClusterCount() {
|
||||
uint16_t n;
|
||||
uint32_t todo = clusterCount_ + 2;
|
||||
|
||||
if (fatType_ == 16) {
|
||||
if (fatType_ == 16)
|
||||
n = 256;
|
||||
}
|
||||
else if (fatType_ == 32) {
|
||||
else if (fatType_ == 32)
|
||||
n = 128;
|
||||
}
|
||||
else {
|
||||
// put FAT12 here
|
||||
else // put FAT12 here
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
|
||||
if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
|
||||
NOMORE(n, todo);
|
||||
if (fatType_ == 16) {
|
||||
for (uint16_t i = 0; i < n; i++) {
|
||||
for (uint16_t i = 0; i < n; i++)
|
||||
if (cacheBuffer_.fat16[i] == 0) free++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint16_t i = 0; i < n; i++) {
|
||||
for (uint16_t i = 0; i < n; i++)
|
||||
if (cacheBuffer_.fat32[i] == 0) free++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return free;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Initialize a FAT volume.
|
||||
*
|
||||
* \param[in] dev The SD card where the volume is located.
|
||||
@@ -329,14 +301,12 @@ int32_t SdVolume::freeClusterCount() {
|
||||
* a MBR, Master Boot Record, or zero if the device is formatted as
|
||||
* a super floppy with the FAT boot sector in block zero.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure. Reasons for
|
||||
* failure include not finding a valid partition, not finding a valid
|
||||
* \return true for success, false for failure.
|
||||
* Reasons for failure include not finding a valid partition, not finding a valid
|
||||
* FAT file system in the specified partition or an I/O error.
|
||||
*/
|
||||
bool SdVolume::init(Sd2Card* dev, uint8_t part) {
|
||||
uint32_t totalBlocks;
|
||||
uint32_t volumeStartBlock = 0;
|
||||
uint32_t totalBlocks, volumeStartBlock = 0;
|
||||
fat32_boot_t* fbs;
|
||||
|
||||
sdCard_ = dev;
|
||||
@@ -344,30 +314,26 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
|
||||
allocSearchStart_ = 2;
|
||||
cacheDirty_ = 0; // cacheFlush() will write block if true
|
||||
cacheMirrorBlock_ = 0;
|
||||
cacheBlockNumber_ = 0XFFFFFFFF;
|
||||
cacheBlockNumber_ = 0xFFFFFFFF;
|
||||
|
||||
// if part == 0 assume super floppy with FAT boot sector in block zero
|
||||
// if part > 0 assume mbr volume with partition table
|
||||
if (part) {
|
||||
if (part > 4)goto fail;
|
||||
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail;
|
||||
if (part > 4) return false;
|
||||
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
|
||||
part_t* p = &cacheBuffer_.mbr.part[part - 1];
|
||||
if ((p->boot & 0X7F) != 0 ||
|
||||
p->totalSectors < 100 ||
|
||||
p->firstSector == 0) {
|
||||
// not a valid partition
|
||||
goto fail;
|
||||
}
|
||||
if ((p->boot & 0x7F) != 0 || p->totalSectors < 100 || p->firstSector == 0)
|
||||
return false; // not a valid partition
|
||||
volumeStartBlock = p->firstSector;
|
||||
}
|
||||
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail;
|
||||
if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
|
||||
fbs = &cacheBuffer_.fbs32;
|
||||
if (fbs->bytesPerSector != 512 ||
|
||||
fbs->fatCount == 0 ||
|
||||
fbs->reservedSectorCount == 0 ||
|
||||
fbs->sectorsPerCluster == 0) {
|
||||
// not valid FAT volume
|
||||
goto fail;
|
||||
return false;
|
||||
}
|
||||
fatCount_ = fbs->fatCount;
|
||||
blocksPerCluster_ = fbs->sectorsPerCluster;
|
||||
@@ -375,7 +341,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
|
||||
clusterSizeShift_ = 0;
|
||||
while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
|
||||
// error if not power of 2
|
||||
if (clusterSizeShift_++ > 7) goto fail;
|
||||
if (clusterSizeShift_++ > 7) return false;
|
||||
}
|
||||
blocksPerFat_ = fbs->sectorsPerFat16 ?
|
||||
fbs->sectorsPerFat16 : fbs->sectorsPerFat32;
|
||||
@@ -404,17 +370,15 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
|
||||
// FAT type is determined by cluster count
|
||||
if (clusterCount_ < 4085) {
|
||||
fatType_ = 12;
|
||||
if (!FAT12_SUPPORT) goto fail;
|
||||
if (!FAT12_SUPPORT) return false;
|
||||
}
|
||||
else if (clusterCount_ < 65525) {
|
||||
else if (clusterCount_ < 65525)
|
||||
fatType_ = 16;
|
||||
}
|
||||
else {
|
||||
rootDirStart_ = fbs->fat32RootCluster;
|
||||
fatType_ = 32;
|
||||
}
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
+106
-122
@@ -20,20 +20,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \brief SdVolume class
|
||||
*/
|
||||
|
||||
/**
|
||||
* Arduino SdFat Library
|
||||
* Copyright (C) 2009 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino Sd2Card Library
|
||||
*/
|
||||
#include "Marlin.h"
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#ifndef SdVolume_h
|
||||
#define SdVolume_h
|
||||
/**
|
||||
* \file
|
||||
* \brief SdVolume class
|
||||
*/
|
||||
#ifndef _SDVOLUME_H_
|
||||
#define _SDVOLUME_H_
|
||||
|
||||
#include "SdFatConfig.h"
|
||||
#include "Sd2Card.h"
|
||||
#include "SdFatStructs.h"
|
||||
@@ -44,89 +44,81 @@
|
||||
* \brief Cache for an SD data block
|
||||
*/
|
||||
union cache_t {
|
||||
/** Used to access cached file data blocks. */
|
||||
uint8_t data[512];
|
||||
/** Used to access cached FAT16 entries. */
|
||||
uint16_t fat16[256];
|
||||
/** Used to access cached FAT32 entries. */
|
||||
uint32_t fat32[128];
|
||||
/** Used to access cached directory entries. */
|
||||
dir_t dir[16];
|
||||
/** Used to access a cached Master Boot Record. */
|
||||
mbr_t mbr;
|
||||
/** Used to access to a cached FAT boot sector. */
|
||||
fat_boot_t fbs;
|
||||
/** Used to access to a cached FAT32 boot sector. */
|
||||
fat32_boot_t fbs32;
|
||||
/** Used to access to a cached FAT32 FSINFO sector. */
|
||||
fat32_fsinfo_t fsinfo;
|
||||
uint8_t data[512]; // Used to access cached file data blocks.
|
||||
uint16_t fat16[256]; // Used to access cached FAT16 entries.
|
||||
uint32_t fat32[128]; // Used to access cached FAT32 entries.
|
||||
dir_t dir[16]; // Used to access cached directory entries.
|
||||
mbr_t mbr; // Used to access a cached Master Boot Record.
|
||||
fat_boot_t fbs; // Used to access to a cached FAT boot sector.
|
||||
fat32_boot_t fbs32; // Used to access to a cached FAT32 boot sector.
|
||||
fat32_fsinfo_t fsinfo; // Used to access to a cached FAT32 FSINFO sector.
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \class SdVolume
|
||||
* \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
|
||||
*/
|
||||
class SdVolume {
|
||||
public:
|
||||
/** Create an instance of SdVolume */
|
||||
// Create an instance of SdVolume
|
||||
SdVolume() : fatType_(0) {}
|
||||
/** Clear the cache and returns a pointer to the cache. Used by the WaveRP
|
||||
/**
|
||||
* Clear the cache and returns a pointer to the cache. Used by the WaveRP
|
||||
* recorder to do raw write to the SD card. Not for normal apps.
|
||||
* \return A pointer to the cache buffer or zero if an error occurs.
|
||||
*/
|
||||
cache_t* cacheClear() {
|
||||
if (!cacheFlush()) return 0;
|
||||
cacheBlockNumber_ = 0XFFFFFFFF;
|
||||
cacheBlockNumber_ = 0xFFFFFFFF;
|
||||
return &cacheBuffer_;
|
||||
}
|
||||
/** Initialize a FAT volume. Try partition one first then try super
|
||||
|
||||
/**
|
||||
* Initialize a FAT volume. Try partition one first then try super
|
||||
* floppy format.
|
||||
*
|
||||
* \param[in] dev The Sd2Card where the volume is located.
|
||||
*
|
||||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure. Reasons for
|
||||
* failure include not finding a valid partition, not finding a valid
|
||||
* FAT file system or an I/O error.
|
||||
* \return true for success, false for failure.
|
||||
* Reasons for failure include not finding a valid partition, not finding
|
||||
* a valid FAT file system or an I/O error.
|
||||
*/
|
||||
bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0);}
|
||||
bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); }
|
||||
bool init(Sd2Card* dev, uint8_t part);
|
||||
|
||||
// inline functions that return volume info
|
||||
/** \return The volume's cluster size in blocks. */
|
||||
uint8_t blocksPerCluster() const {return blocksPerCluster_;}
|
||||
/** \return The number of blocks in one FAT. */
|
||||
uint32_t blocksPerFat() const {return blocksPerFat_;}
|
||||
/** \return The total number of clusters in the volume. */
|
||||
uint32_t clusterCount() const {return clusterCount_;}
|
||||
/** \return The shift count required to multiply by blocksPerCluster. */
|
||||
uint8_t clusterSizeShift() const {return clusterSizeShift_;}
|
||||
/** \return The logical block number for the start of file data. */
|
||||
uint32_t dataStartBlock() const {return dataStartBlock_;}
|
||||
/** \return The number of FAT structures on the volume. */
|
||||
uint8_t fatCount() const {return fatCount_;}
|
||||
/** \return The logical block number for the start of the first FAT. */
|
||||
uint32_t fatStartBlock() const {return fatStartBlock_;}
|
||||
/** \return The FAT type of the volume. Values are 12, 16 or 32. */
|
||||
uint8_t fatType() const {return fatType_;}
|
||||
uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks.
|
||||
uint32_t blocksPerFat() const { return blocksPerFat_; } //> \return The number of blocks in one FAT.
|
||||
uint32_t clusterCount() const { return clusterCount_; } //> \return The total number of clusters in the volume.
|
||||
uint8_t clusterSizeShift() const { return clusterSizeShift_; } //> \return The shift count required to multiply by blocksPerCluster.
|
||||
uint32_t dataStartBlock() const { return dataStartBlock_; } //> \return The logical block number for the start of file data.
|
||||
uint8_t fatCount() const { return fatCount_; } //> \return The number of FAT structures on the volume.
|
||||
uint32_t fatStartBlock() const { return fatStartBlock_; } //> \return The logical block number for the start of the first FAT.
|
||||
uint8_t fatType() const { return fatType_; } //> \return The FAT type of the volume. Values are 12, 16 or 32.
|
||||
int32_t freeClusterCount();
|
||||
/** \return The number of entries in the root directory for FAT16 volumes. */
|
||||
uint32_t rootDirEntryCount() const {return rootDirEntryCount_;}
|
||||
/** \return The logical block number for the start of the root directory
|
||||
on FAT16 volumes or the first cluster number on FAT32 volumes. */
|
||||
uint32_t rootDirStart() const {return rootDirStart_;}
|
||||
/** Sd2Card object for this volume
|
||||
uint32_t rootDirEntryCount() const { return rootDirEntryCount_; } /** \return The number of entries in the root directory for FAT16 volumes. */
|
||||
|
||||
/**
|
||||
* \return The logical block number for the start of the root directory
|
||||
* on FAT16 volumes or the first cluster number on FAT32 volumes.
|
||||
*/
|
||||
uint32_t rootDirStart() const { return rootDirStart_; }
|
||||
|
||||
/**
|
||||
* Sd2Card object for this volume
|
||||
* \return pointer to Sd2Card object.
|
||||
*/
|
||||
Sd2Card* sdCard() {return sdCard_;}
|
||||
/** Debug access to FAT table
|
||||
Sd2Card* sdCard() { return sdCard_; }
|
||||
|
||||
/**
|
||||
* Debug access to FAT table
|
||||
*
|
||||
* \param[in] n cluster number.
|
||||
* \param[out] v value of entry
|
||||
* \return true for success or false for failure
|
||||
*/
|
||||
bool dbgFat(uint32_t n, uint32_t* v) {return fatGet(n, v);}
|
||||
//------------------------------------------------------------------------------
|
||||
bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); }
|
||||
|
||||
private:
|
||||
// Allow SdBaseFile access to SdVolume private data.
|
||||
friend class SdBaseFile;
|
||||
@@ -136,19 +128,20 @@ class SdVolume {
|
||||
// value for dirty argument in cacheRawBlock to indicate write to cache
|
||||
static bool const CACHE_FOR_WRITE = true;
|
||||
|
||||
#if USE_MULTIPLE_CARDS
|
||||
cache_t cacheBuffer_; // 512 byte cache for device blocks
|
||||
uint32_t cacheBlockNumber_; // Logical number of block in the cache
|
||||
Sd2Card* sdCard_; // Sd2Card object for cache
|
||||
bool cacheDirty_; // cacheFlush() will write block if true
|
||||
uint32_t cacheMirrorBlock_; // block number for mirror FAT
|
||||
#else // USE_MULTIPLE_CARDS
|
||||
static cache_t cacheBuffer_; // 512 byte cache for device blocks
|
||||
static uint32_t cacheBlockNumber_; // Logical number of block in the cache
|
||||
static Sd2Card* sdCard_; // Sd2Card object for cache
|
||||
static bool cacheDirty_; // cacheFlush() will write block if true
|
||||
static uint32_t cacheMirrorBlock_; // block number for mirror FAT
|
||||
#endif // USE_MULTIPLE_CARDS
|
||||
#if USE_MULTIPLE_CARDS
|
||||
cache_t cacheBuffer_; // 512 byte cache for device blocks
|
||||
uint32_t cacheBlockNumber_; // Logical number of block in the cache
|
||||
Sd2Card* sdCard_; // Sd2Card object for cache
|
||||
bool cacheDirty_; // cacheFlush() will write block if true
|
||||
uint32_t cacheMirrorBlock_; // block number for mirror FAT
|
||||
#else
|
||||
static cache_t cacheBuffer_; // 512 byte cache for device blocks
|
||||
static uint32_t cacheBlockNumber_; // Logical number of block in the cache
|
||||
static Sd2Card* sdCard_; // Sd2Card object for cache
|
||||
static bool cacheDirty_; // cacheFlush() will write block if true
|
||||
static uint32_t cacheMirrorBlock_; // block number for mirror FAT
|
||||
#endif
|
||||
|
||||
uint32_t allocSearchStart_; // start cluster for alloc search
|
||||
uint8_t blocksPerCluster_; // cluster size in blocks
|
||||
uint32_t blocksPerFat_; // FAT size in blocks
|
||||
@@ -160,68 +153,59 @@ class SdVolume {
|
||||
uint8_t fatType_; // volume type (12, 16, OR 32)
|
||||
uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir
|
||||
uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
bool allocContiguous(uint32_t count, uint32_t* curCluster);
|
||||
uint8_t blockOfCluster(uint32_t position) const {
|
||||
return (position >> 9) & (blocksPerCluster_ - 1);
|
||||
}
|
||||
uint32_t clusterStartBlock(uint32_t cluster) const {
|
||||
return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_);
|
||||
}
|
||||
uint32_t blockNumber(uint32_t cluster, uint32_t position) const {
|
||||
return clusterStartBlock(cluster) + blockOfCluster(position);
|
||||
}
|
||||
cache_t* cache() {return &cacheBuffer_;}
|
||||
uint32_t cacheBlockNumber() {return cacheBlockNumber_;}
|
||||
#if USE_MULTIPLE_CARDS
|
||||
bool cacheFlush();
|
||||
bool cacheRawBlock(uint32_t blockNumber, bool dirty);
|
||||
#else // USE_MULTIPLE_CARDS
|
||||
static bool cacheFlush();
|
||||
static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
|
||||
#endif // USE_MULTIPLE_CARDS
|
||||
uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
|
||||
uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
|
||||
uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
|
||||
|
||||
cache_t* cache() { return &cacheBuffer_; }
|
||||
uint32_t cacheBlockNumber() const { return cacheBlockNumber_; }
|
||||
|
||||
#if USE_MULTIPLE_CARDS
|
||||
bool cacheFlush();
|
||||
bool cacheRawBlock(uint32_t blockNumber, bool dirty);
|
||||
#else
|
||||
static bool cacheFlush();
|
||||
static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
|
||||
#endif
|
||||
|
||||
// used by SdBaseFile write to assign cache to SD location
|
||||
void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
|
||||
cacheDirty_ = dirty;
|
||||
cacheBlockNumber_ = blockNumber;
|
||||
}
|
||||
void cacheSetDirty() {cacheDirty_ |= CACHE_FOR_WRITE;}
|
||||
void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; }
|
||||
bool chainSize(uint32_t beginCluster, uint32_t* size);
|
||||
bool fatGet(uint32_t cluster, uint32_t* value);
|
||||
bool fatPut(uint32_t cluster, uint32_t value);
|
||||
bool fatPutEOC(uint32_t cluster) {
|
||||
return fatPut(cluster, 0x0FFFFFFF);
|
||||
}
|
||||
bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
|
||||
bool freeChain(uint32_t cluster);
|
||||
bool isEOC(uint32_t cluster) const {
|
||||
if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN;
|
||||
if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
|
||||
return cluster >= FAT32EOC_MIN;
|
||||
}
|
||||
bool readBlock(uint32_t block, uint8_t* dst) {
|
||||
return sdCard_->readBlock(block, dst);
|
||||
}
|
||||
bool writeBlock(uint32_t block, const uint8_t* dst) {
|
||||
return sdCard_->writeBlock(block, dst);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// Deprecated functions - suppress cpplint warnings with NOLINT comment
|
||||
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
|
||||
public:
|
||||
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev);
|
||||
* \param[in] dev The SD card where the volume is located.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool init(Sd2Card& dev) {return init(&dev);} // NOLINT
|
||||
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
|
||||
* \param[in] dev The SD card where the volume is located.
|
||||
* \param[in] part The partition to be used.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool init(Sd2Card& dev, uint8_t part) { // NOLINT
|
||||
return init(&dev, part);
|
||||
}
|
||||
#endif // ALLOW_DEPRECATED_FUNCTIONS
|
||||
bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
|
||||
bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
|
||||
|
||||
// Deprecated functions
|
||||
#if ALLOW_DEPRECATED_FUNCTIONS
|
||||
public:
|
||||
/**
|
||||
* \deprecated Use: bool SdVolume::init(Sd2Card* dev);
|
||||
* \param[in] dev The SD card where the volume is located.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool init(Sd2Card& dev) { return init(&dev); }
|
||||
/**
|
||||
* \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
|
||||
* \param[in] dev The SD card where the volume is located.
|
||||
* \param[in] part The partition to be used.
|
||||
* \return true for success or false for failure.
|
||||
*/
|
||||
bool init(Sd2Card& dev, uint8_t part) { return init(&dev, part); }
|
||||
#endif // ALLOW_DEPRECATED_FUNCTIONS
|
||||
};
|
||||
#endif // SdVolume
|
||||
#endif
|
||||
|
||||
#endif // _SDVOLUME_H_
|
||||
|
||||
+4
-4
@@ -35,7 +35,7 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
#define SHORT_BUILD_VERSION "1.1.3"
|
||||
#define SHORT_BUILD_VERSION "1.1.8"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
@@ -48,7 +48,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2017-06-04 12:00"
|
||||
#define STRING_DISTRIBUTION_DATE "2017-12-25 12:00"
|
||||
|
||||
/**
|
||||
* Required minimum Configuration.h and Configuration_adv.h file versions.
|
||||
@@ -57,8 +57,8 @@
|
||||
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
|
||||
* the configuration files.
|
||||
*/
|
||||
#define REQUIRED_CONFIGURATION_H_VERSION 010100
|
||||
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
|
||||
#define REQUIRED_CONFIGURATION_H_VERSION 010107
|
||||
#define REQUIRED_CONFIGURATION_ADV_H_VERSION 010107
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016, 2017 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BITMAP_FLAGS_H_
|
||||
#define _BITMAP_FLAGS_H_
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
/**
|
||||
* These support functions allow the use of large bit arrays of flags that take very
|
||||
* little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
|
||||
* to unsigned long will allow us to go to 32x32 if higher resolution meshes are needed
|
||||
* in the future.
|
||||
*/
|
||||
FORCE_INLINE void bitmap_clear(uint16_t bits[16], const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
|
||||
FORCE_INLINE void bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
|
||||
FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
|
||||
|
||||
#endif // _BITMAP_FLAGS_H_
|
||||
+8
-8
@@ -21,26 +21,26 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* blinkm.cpp - Library for controlling a BlinkM over i2c
|
||||
* Created by Tim Koster, August 21 2013.
|
||||
* blinkm.cpp - Control a BlinkM over i2c
|
||||
*/
|
||||
|
||||
#include "Marlin.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(BLINKM)
|
||||
|
||||
#include "blinkm.h"
|
||||
#include "leds.h"
|
||||
#include <Wire.h>
|
||||
|
||||
void SendColors(byte red, byte grn, byte blu) {
|
||||
void blinkm_set_led_color(const LEDColor &color) {
|
||||
Wire.begin();
|
||||
Wire.beginTransmission(0x09);
|
||||
Wire.write('o'); //to disable ongoing script, only needs to be used once
|
||||
Wire.write('n');
|
||||
Wire.write(red);
|
||||
Wire.write(grn);
|
||||
Wire.write(blu);
|
||||
Wire.write(color.r);
|
||||
Wire.write(color.g);
|
||||
Wire.write(color.b);
|
||||
Wire.endTransmission();
|
||||
}
|
||||
|
||||
#endif // BLINKM
|
||||
|
||||
|
||||
+9
-5
@@ -21,11 +21,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* blinkm.h - Library for controlling a BlinkM over i2c
|
||||
* Created by Tim Koster, August 21 2013.
|
||||
* blinkm.h - Control a BlinkM over i2c
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Wire.h"
|
||||
#ifndef _BLINKM_H_
|
||||
#define _BLINKM_H_
|
||||
|
||||
void SendColors(byte red, byte grn, byte blu);
|
||||
struct LEDColor;
|
||||
typedef LEDColor LEDColor;
|
||||
|
||||
void blinkm_set_led_color(const LEDColor &color);
|
||||
|
||||
#endif // _BLINKM_H_
|
||||
|
||||
+121
-71
@@ -25,77 +25,127 @@
|
||||
|
||||
#define BOARD_UNKNOWN -1
|
||||
|
||||
#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
|
||||
#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2
|
||||
#define BOARD_GEN7_13 12 // Gen7 v1.3
|
||||
#define BOARD_GEN7_14 13 // Gen7 v1.4
|
||||
#define BOARD_CNCONTROLS_11 111 // Cartesio CN Controls V11
|
||||
#define BOARD_CNCONTROLS_12 112 // Cartesio CN Controls V12
|
||||
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
|
||||
#define BOARD_CHEAPTRONIC_V2 21 // Cheaptronic v2.0
|
||||
#define BOARD_SETHI 20 // Sethi 3D_1
|
||||
#define BOARD_MIGHTYBOARD_REVE 200 // Makerbot Mightyboard Revision E
|
||||
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
|
||||
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
||||
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
||||
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
||||
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
||||
#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
||||
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||
#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard
|
||||
#define BOARD_RIGIDBOARD_V2 52 // Invent-A-Part RigidBoard V2
|
||||
#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
||||
#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
||||
#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
||||
#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
||||
#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
||||
#define BOARD_GEN6 5 // Gen6
|
||||
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
|
||||
#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2
|
||||
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above
|
||||
#define BOARD_MELZI 63 // Melzi
|
||||
#define BOARD_STB_11 64 // STB V1.1
|
||||
#define BOARD_AZTEEG_X1 65 // Azteeg X1
|
||||
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
|
||||
#define BOARD_AZTEEG_X3 67 // Azteeg X3
|
||||
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro
|
||||
#define BOARD_ULTIMAKER 7 // Ultimaker
|
||||
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
#define BOARD_3DRAG 77 // 3Drag Controller
|
||||
#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 3Drag Controller)
|
||||
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
|
||||
#define BOARD_TEENSYLU 8 // Teensylu
|
||||
#define BOARD_RUMBA 80 // Rumba
|
||||
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
|
||||
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)
|
||||
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
|
||||
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
|
||||
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
|
||||
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
|
||||
#define BOARD_GEN3_PLUS 9 // Gen3+
|
||||
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
|
||||
#define BOARD_MEGATRONICS 70 // Megatronics
|
||||
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
|
||||
#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1
|
||||
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
|
||||
#define BOARD_MEGATRONICS_31 704 // Megatronics v3.1
|
||||
#define BOARD_OMCA_A 90 // Alpha OMCA board
|
||||
#define BOARD_OMCA 91 // Final OMCA board
|
||||
#define BOARD_RAMBO 301 // Rambo
|
||||
#define BOARD_MINIRAMBO 302 // Mini-Rambo
|
||||
#define BOARD_SCOOVO_X9H 303 // abee Scoovo X9H
|
||||
#define BOARD_MEGACONTROLLER 310 // Mega controller
|
||||
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
|
||||
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
|
||||
#define BOARD_LEAPFROG 999 // Leapfrog
|
||||
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
|
||||
#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
|
||||
#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board
|
||||
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
|
||||
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
|
||||
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
|
||||
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||
//
|
||||
// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
|
||||
|
||||
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
|
||||
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
|
||||
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
|
||||
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
|
||||
#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
|
||||
|
||||
#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
||||
#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
|
||||
#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
|
||||
#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
|
||||
#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
|
||||
|
||||
#define BOARD_RAMPS_PLUS_EFB 143 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
|
||||
#define BOARD_RAMPS_PLUS_EEB 144 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
|
||||
#define BOARD_RAMPS_PLUS_EFF 145 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
|
||||
#define BOARD_RAMPS_PLUS_EEF 146 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
|
||||
#define BOARD_RAMPS_PLUS_SF 148 // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
|
||||
|
||||
//
|
||||
// RAMPS Derivatives - ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#define BOARD_3DRAG 77 // 3Drag Controller
|
||||
#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 3Drag Controller)
|
||||
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
|
||||
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
|
||||
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
|
||||
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
|
||||
#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
|
||||
#define BOARD_MKS_GEN_L 53 // MKS GEN L
|
||||
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
|
||||
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
|
||||
#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard
|
||||
#define BOARD_RIGIDBOARD_V2 52 // Invent-A-Part RigidBoard V2
|
||||
#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board
|
||||
#define BOARD_ULTIMAKER 7 // Ultimaker
|
||||
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
#define BOARD_AZTEEG_X3 67 // Azteeg X3
|
||||
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro
|
||||
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
#define BOARD_RUMBA 80 // Rumba
|
||||
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
|
||||
#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
|
||||
|
||||
//
|
||||
// Other ATmega1280, ATmega2560
|
||||
//
|
||||
|
||||
#define BOARD_CNCONTROLS_11 111 // Cartesio CN Controls V11
|
||||
#define BOARD_CNCONTROLS_12 112 // Cartesio CN Controls V12
|
||||
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
|
||||
#define BOARD_CHEAPTRONIC_V2 21 // Cheaptronic v2.0
|
||||
#define BOARD_MIGHTYBOARD_REVE 200 // Makerbot Mightyboard Revision E
|
||||
#define BOARD_MEGATRONICS 70 // Megatronics
|
||||
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
|
||||
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
|
||||
#define BOARD_MEGATRONICS_31 704 // Megatronics v3.1
|
||||
#define BOARD_RAMBO 301 // Rambo
|
||||
#define BOARD_MINIRAMBO 302 // Mini-Rambo
|
||||
#define BOARD_MINIRAMBO_10A 303 // Mini-Rambo 1.0a
|
||||
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
|
||||
#define BOARD_LEAPFROG 999 // Leapfrog
|
||||
#define BOARD_MEGACONTROLLER 310 // Mega controller
|
||||
#define BOARD_SCOOVO_X9H 321 // abee Scoovo X9H
|
||||
#define BOARD_GT2560_REV_A 74 // Geeetech GT2560 Rev. A
|
||||
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)
|
||||
|
||||
//
|
||||
// ATmega1281, ATmega2561
|
||||
//
|
||||
|
||||
#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1
|
||||
#define BOARD_SILVER_GATE 25 // Silvergate v1.0
|
||||
|
||||
//
|
||||
// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
|
||||
//
|
||||
|
||||
#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2
|
||||
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above
|
||||
#define BOARD_MELZI 63 // Melzi
|
||||
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
|
||||
#define BOARD_MELZI_CREALITY 89 // Melzi Creality3D board (for CR-10 etc)
|
||||
#define BOARD_STB_11 64 // STB V1.1
|
||||
#define BOARD_AZTEEG_X1 65 // Azteeg X1
|
||||
|
||||
//
|
||||
// Other ATmega644P, ATmega644, ATmega1284P
|
||||
//
|
||||
|
||||
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
|
||||
#define BOARD_GEN3_PLUS 9 // Gen3+
|
||||
#define BOARD_GEN6 5 // Gen6
|
||||
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
|
||||
#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
|
||||
#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2
|
||||
#define BOARD_GEN7_13 12 // Gen7 v1.3
|
||||
#define BOARD_GEN7_14 13 // Gen7 v1.4
|
||||
#define BOARD_OMCA_A 90 // Alpha OMCA board
|
||||
#define BOARD_OMCA 91 // Final OMCA board
|
||||
#define BOARD_SETHI 20 // Sethi 3D_1
|
||||
#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)
|
||||
|
||||
//
|
||||
// Teensyduino - AT90USB1286, AT90USB1286P
|
||||
//
|
||||
|
||||
#define BOARD_TEENSYLU 8 // Teensylu
|
||||
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
|
||||
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)
|
||||
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
|
||||
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
|
||||
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
|
||||
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
|
||||
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
|
||||
|
||||
#define MB(board) (MOTHERBOARD==BOARD_##board)
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ class Buzzer {
|
||||
* @param duration Duration of the tone in milliseconds
|
||||
* @param frequency Frequency of the tone in hertz
|
||||
*/
|
||||
void tone(uint16_t const &duration, uint16_t const &frequency = 0) {
|
||||
void tone(const uint16_t &duration, const uint16_t &frequency = 0) {
|
||||
while (buffer.isFull()) {
|
||||
this->tick();
|
||||
thermalManager.manage_heater();
|
||||
|
||||
+117
-92
@@ -20,16 +20,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#include "cardreader.h"
|
||||
|
||||
#include "ultralcd.h"
|
||||
#include "stepper.h"
|
||||
#include "language.h"
|
||||
|
||||
#include "Marlin.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
#define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
|
||||
|
||||
CardReader::CardReader() {
|
||||
@@ -44,8 +44,9 @@ CardReader::CardReader() {
|
||||
sdprinting = cardOK = saving = logging = false;
|
||||
filesize = 0;
|
||||
sdpos = 0;
|
||||
workDirDepth = 0;
|
||||
file_subcall_ctr = 0;
|
||||
|
||||
workDirDepth = 0;
|
||||
ZERO(workDirParents);
|
||||
|
||||
autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
|
||||
@@ -73,9 +74,12 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
|
||||
/**
|
||||
* Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
|
||||
* LS_Count - Add +1 to nrFiles for every file within the parent
|
||||
* LS_GetFilename - Get the filename of the file indexed by nrFiles
|
||||
* LS_GetFilename - Get the filename of the file indexed by nrFile_index
|
||||
* LS_SerialPrint - Print the full path and size of each file to serial output
|
||||
*/
|
||||
|
||||
uint16_t nrFile_index;
|
||||
|
||||
void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
|
||||
dir_t p;
|
||||
uint8_t cnt = 0;
|
||||
@@ -109,7 +113,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
SdFile dir;
|
||||
if (!dir.open(parent, lfilename, O_READ)) {
|
||||
if (lsAction == LS_SerialPrint) {
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
|
||||
SERIAL_ECHOLN(lfilename);
|
||||
}
|
||||
@@ -129,7 +133,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
|
||||
if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
|
||||
|
||||
switch (lsAction) {
|
||||
switch (lsAction) { // 1 based file count
|
||||
case LS_Count:
|
||||
nrFiles++;
|
||||
break;
|
||||
@@ -147,7 +151,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
||||
if (match != NULL) {
|
||||
if (strcasecmp(match, filename) == 0) return;
|
||||
}
|
||||
else if (cnt == nrFiles) return;
|
||||
else if (cnt == nrFile_index) return; // 0 based index
|
||||
cnt++;
|
||||
break;
|
||||
}
|
||||
@@ -208,8 +212,8 @@ void CardReader::ls() {
|
||||
// Open the sub-item as the new dive parent
|
||||
SdFile dir;
|
||||
if (!dir.open(diveDir, segment, O_READ)) {
|
||||
SERIAL_EOL;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
|
||||
SERIAL_ECHO(segment);
|
||||
break;
|
||||
@@ -220,7 +224,7 @@ void CardReader::ls() {
|
||||
|
||||
} // while i<pathLen
|
||||
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
#endif // LONG_FILENAME_HOST_SUPPORT
|
||||
@@ -239,32 +243,23 @@ void CardReader::initsd() {
|
||||
#endif
|
||||
) {
|
||||
//if (!card.init(SPI_HALF_SPEED,SDSS))
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
|
||||
}
|
||||
else if (!volume.init(&card)) {
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
|
||||
}
|
||||
else if (!root.openRoot(&volume)) {
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
|
||||
}
|
||||
else {
|
||||
cardOK = true;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
|
||||
}
|
||||
workDir = root;
|
||||
curDir = &root;
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
presort();
|
||||
#endif
|
||||
/**
|
||||
if (!workDir.openRoot(&volume)) {
|
||||
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
||||
}
|
||||
*/
|
||||
setroot();
|
||||
}
|
||||
|
||||
void CardReader::setroot() {
|
||||
@@ -310,57 +305,67 @@ void CardReader::openLogFile(char* name) {
|
||||
openFile(name, false);
|
||||
}
|
||||
|
||||
void CardReader::getAbsFilename(char *t) {
|
||||
uint8_t cnt = 0;
|
||||
*t = '/'; t++; cnt++;
|
||||
for (uint8_t i = 0; i < workDirDepth; i++) {
|
||||
workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
|
||||
while (*t && cnt < MAXPATHNAMELENGTH) { t++; cnt++; } //crawl counter forward.
|
||||
}
|
||||
if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH))
|
||||
file.getFilename(t);
|
||||
else
|
||||
t[0] = 0;
|
||||
void appendAtom(SdFile &file, char *& dst, uint8_t &cnt) {
|
||||
file.getFilename(dst);
|
||||
while (*dst && cnt < MAXPATHNAMELENGTH) { dst++; cnt++; }
|
||||
if (cnt < MAXPATHNAMELENGTH) { *dst = '/'; dst++; cnt++; }
|
||||
}
|
||||
|
||||
void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
|
||||
void CardReader::getAbsFilename(char *t) {
|
||||
*t++ = '/'; // Root folder
|
||||
uint8_t cnt = 1;
|
||||
|
||||
for (uint8_t i = 0; i < workDirDepth; i++) // Loop to current work dir
|
||||
appendAtom(workDirParents[i], t, cnt);
|
||||
|
||||
if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH)) {
|
||||
appendAtom(file, t, cnt);
|
||||
--t;
|
||||
}
|
||||
*t = '\0';
|
||||
}
|
||||
|
||||
void CardReader::openFile(char* name, const bool read, const bool subcall/*=false*/) {
|
||||
|
||||
if (!cardOK) return;
|
||||
|
||||
uint8_t doing = 0;
|
||||
if (isFileOpen()) { //replacing current file by new file, or subfile call
|
||||
if (push_current) {
|
||||
if (isFileOpen()) { // Replacing current file or doing a subroutine
|
||||
if (subcall) {
|
||||
if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
|
||||
SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
|
||||
kill(PSTR(MSG_KILLED));
|
||||
return;
|
||||
}
|
||||
|
||||
// Store current filename and position
|
||||
// Store current filename (based on workDirParents) and position
|
||||
getAbsFilename(proc_filenames[file_subcall_ctr]);
|
||||
filespos[file_subcall_ctr] = sdpos;
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", name);
|
||||
SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
|
||||
SERIAL_ECHOLNPAIR("\" pos", sdpos);
|
||||
filespos[file_subcall_ctr] = sdpos;
|
||||
file_subcall_ctr++;
|
||||
}
|
||||
else {
|
||||
else
|
||||
doing = 1;
|
||||
}
|
||||
}
|
||||
else { // Opening fresh file
|
||||
else if (subcall) { // Returning from a subcall?
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("END SUBROUTINE");
|
||||
}
|
||||
else { // Opening fresh file
|
||||
doing = 2;
|
||||
file_subcall_ctr = 0; // Reset procedure depth in case user cancels print while in procedure
|
||||
}
|
||||
|
||||
if (doing) {
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Now ");
|
||||
SERIAL_ECHO(doing == 1 ? "doing" : "fresh");
|
||||
serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
|
||||
SERIAL_ECHOLNPAIR(" file: ", name);
|
||||
}
|
||||
|
||||
@@ -380,8 +385,7 @@ void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
|
||||
if (dirname_end != NULL && dirname_end > dirname_start) {
|
||||
char subdirname[FILENAME_LENGTH];
|
||||
strncpy(subdirname, dirname_start, dirname_end - dirname_start);
|
||||
subdirname[dirname_end - dirname_start] = 0;
|
||||
SERIAL_ECHOLN(subdirname);
|
||||
subdirname[dirname_end - dirname_start] = '\0';
|
||||
if (!myDir.open(curDir, subdirname, O_READ)) {
|
||||
SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
|
||||
SERIAL_PROTOCOL(subdirname);
|
||||
@@ -403,17 +407,15 @@ void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else { //relative path
|
||||
curDir = &workDir;
|
||||
}
|
||||
else
|
||||
curDir = &workDir; // Relative paths start in current directory
|
||||
|
||||
if (read) {
|
||||
if (file.open(curDir, fname, O_READ)) {
|
||||
filesize = file.fileSize();
|
||||
sdpos = 0;
|
||||
SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
|
||||
SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
|
||||
sdpos = 0;
|
||||
|
||||
SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
|
||||
getfilename(0, fname);
|
||||
lcd_setstatus(longFilename[0] ? longFilename : fname);
|
||||
@@ -421,14 +423,14 @@ void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
|
||||
else {
|
||||
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
|
||||
SERIAL_PROTOCOLCHAR('.');
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
else { //write
|
||||
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
|
||||
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
|
||||
SERIAL_PROTOCOLCHAR('.');
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
}
|
||||
else {
|
||||
saving = true;
|
||||
@@ -438,14 +440,14 @@ void CardReader::openFile(char* name, bool read, bool push_current/*=false*/) {
|
||||
}
|
||||
}
|
||||
|
||||
void CardReader::removeFile(char* name) {
|
||||
void CardReader::removeFile(const char * const name) {
|
||||
if (!cardOK) return;
|
||||
|
||||
stopSDPrint();
|
||||
|
||||
SdFile myDir;
|
||||
curDir = &root;
|
||||
char *fname = name;
|
||||
const char *fname = name;
|
||||
|
||||
char *dirname_start, *dirname_end;
|
||||
if (name[0] == '/') {
|
||||
@@ -460,29 +462,23 @@ void CardReader::removeFile(char* name) {
|
||||
subdirname[dirname_end - dirname_start] = 0;
|
||||
SERIAL_ECHOLN(subdirname);
|
||||
if (!myDir.open(curDir, subdirname, O_READ)) {
|
||||
SERIAL_PROTOCOLPAIR("open failed, File: ", subdirname);
|
||||
SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, subdirname);
|
||||
SERIAL_PROTOCOLCHAR('.');
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//SERIAL_ECHOLNPGM("dive ok");
|
||||
}
|
||||
|
||||
curDir = &myDir;
|
||||
dirname_start = dirname_end + 1;
|
||||
}
|
||||
else { // the remainder after all /fsa/fdsa/ is the filename
|
||||
else {
|
||||
fname = dirname_start;
|
||||
//SERIAL_ECHOLNPGM("remainder");
|
||||
//SERIAL_ECHOLN(fname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // relative path
|
||||
else // Relative paths are rooted in the current directory
|
||||
curDir = &workDir;
|
||||
}
|
||||
|
||||
if (file.remove(curDir, fname)) {
|
||||
SERIAL_PROTOCOLPGM("File deleted:");
|
||||
@@ -506,14 +502,13 @@ void CardReader::getStatus() {
|
||||
SERIAL_PROTOCOLCHAR('/');
|
||||
SERIAL_PROTOCOLLN(filesize);
|
||||
}
|
||||
else {
|
||||
else
|
||||
SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
|
||||
}
|
||||
}
|
||||
|
||||
void CardReader::write_command(char *buf) {
|
||||
char* begin = buf;
|
||||
char* npos = 0;
|
||||
char* npos = NULL;
|
||||
char* end = buf + strlen(buf) - 1;
|
||||
|
||||
file.writeError = false;
|
||||
@@ -526,13 +521,13 @@ void CardReader::write_command(char *buf) {
|
||||
end[3] = '\0';
|
||||
file.write(begin);
|
||||
if (file.writeError) {
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
void CardReader::checkautostart(bool force) {
|
||||
if (!force && (!autostart_stilltocheck || ELAPSED(millis(), next_autostart_ms)))
|
||||
if (!force && (!autostart_stilltocheck || PENDING(millis(), next_autostart_ms)))
|
||||
return;
|
||||
|
||||
autostart_stilltocheck = false;
|
||||
@@ -595,7 +590,7 @@ void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
|
||||
#endif // SDSORT_CACHE_NAMES
|
||||
curDir = &workDir;
|
||||
lsAction = LS_GetFilename;
|
||||
nrFiles = nr;
|
||||
nrFile_index = nr;
|
||||
curDir->rewind();
|
||||
lsDive("", *curDir, match);
|
||||
}
|
||||
@@ -611,33 +606,34 @@ uint16_t CardReader::getnrfilenames() {
|
||||
}
|
||||
|
||||
void CardReader::chdir(const char * relpath) {
|
||||
SdFile newfile;
|
||||
SdFile newDir;
|
||||
SdFile *parent = &root;
|
||||
|
||||
if (workDir.isOpen()) parent = &workDir;
|
||||
|
||||
if (!newfile.open(*parent, relpath, O_READ)) {
|
||||
SERIAL_ECHO_START;
|
||||
if (!newDir.open(*parent, relpath, O_READ)) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
|
||||
SERIAL_ECHOLN(relpath);
|
||||
}
|
||||
else {
|
||||
workDir = newDir;
|
||||
if (workDirDepth < MAX_DIR_DEPTH)
|
||||
workDirParents[workDirDepth++] = *parent;
|
||||
workDir = newfile;
|
||||
workDirParents[workDirDepth++] = workDir;
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
presort();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void CardReader::updir() {
|
||||
if (workDirDepth > 0) {
|
||||
workDir = workDirParents[--workDirDepth];
|
||||
int8_t CardReader::updir() {
|
||||
if (workDirDepth > 0) { // At least 1 dir has been saved
|
||||
workDir = --workDirDepth ? workDirParents[workDirDepth - 1] : root; // Use parent, or root if none
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
presort();
|
||||
#endif
|
||||
}
|
||||
return workDirDepth;
|
||||
}
|
||||
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
@@ -696,7 +692,7 @@ void CardReader::updir() {
|
||||
sortnames = new char*[fileCnt];
|
||||
#endif
|
||||
#elif ENABLED(SDSORT_USES_STACK)
|
||||
char sortnames[fileCnt][LONG_FILENAME_LENGTH];
|
||||
char sortnames[fileCnt][SORTED_LONGNAME_MAXLEN];
|
||||
#endif
|
||||
|
||||
// Folder sorting needs 1 bit per entry for flags.
|
||||
@@ -735,7 +731,12 @@ void CardReader::updir() {
|
||||
#endif
|
||||
#else
|
||||
// Copy filenames into the static array
|
||||
strcpy(sortnames[i], LONGEST_FILENAME);
|
||||
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
|
||||
strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
|
||||
sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
|
||||
#else
|
||||
strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
|
||||
#endif
|
||||
#if ENABLED(SDSORT_CACHE_NAMES)
|
||||
strcpy(sortshort[i], filename);
|
||||
#endif
|
||||
@@ -826,12 +827,21 @@ void CardReader::updir() {
|
||||
#if ENABLED(SDSORT_DYNAMIC_RAM)
|
||||
sortnames = new char*[1];
|
||||
sortnames[0] = strdup(LONGEST_FILENAME); // malloc
|
||||
sortshort = new char*[1];
|
||||
sortshort[0] = strdup(filename); // malloc
|
||||
#if ENABLED(SDSORT_CACHE_NAMES)
|
||||
sortshort = new char*[1];
|
||||
sortshort[0] = strdup(filename); // malloc
|
||||
#endif
|
||||
isDir = new uint8_t[1];
|
||||
#else
|
||||
strcpy(sortnames[0], LONGEST_FILENAME);
|
||||
strcpy(sortshort[0], filename);
|
||||
#if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
|
||||
strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
|
||||
sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
|
||||
#else
|
||||
strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
|
||||
#endif
|
||||
#if ENABLED(SDSORT_CACHE_NAMES)
|
||||
strcpy(sortshort[0], filename);
|
||||
#endif
|
||||
#endif
|
||||
isDir[0] = filenameIsDir ? 0x01 : 0x00;
|
||||
#endif
|
||||
@@ -860,6 +870,16 @@ void CardReader::updir() {
|
||||
|
||||
#endif // SDCARD_SORT_ALPHA
|
||||
|
||||
uint16_t CardReader::get_num_Files() {
|
||||
return
|
||||
#if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
|
||||
nrFiles // no need to access the SD card for filenames
|
||||
#else
|
||||
getnrfilenames()
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
void CardReader::printingHasFinished() {
|
||||
stepper.synchronize();
|
||||
file.close();
|
||||
@@ -871,14 +891,19 @@ void CardReader::printingHasFinished() {
|
||||
}
|
||||
else {
|
||||
sdprinting = false;
|
||||
if (SD_FINISHED_STEPPERRELEASE)
|
||||
enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
|
||||
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
|
||||
stepper.cleaning_buffer_counter = 1; // The command will fire from the Stepper ISR
|
||||
#endif
|
||||
print_job_timer.stop();
|
||||
if (print_job_timer.duration() > 60)
|
||||
enqueue_and_echo_commands_P(PSTR("M31"));
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
presort();
|
||||
#endif
|
||||
|
||||
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
|
||||
lcd_reselect_last_file();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+33
-23
@@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CARDREADER_H
|
||||
#define CARDREADER_H
|
||||
#ifndef _CARDREADER_H_
|
||||
#define _CARDREADER_H_
|
||||
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#define MAX_DIR_DEPTH 10 // Maximum folder depth
|
||||
|
||||
#include "SdFile.h"
|
||||
|
||||
#include "types.h"
|
||||
#include "enum.h"
|
||||
|
||||
@@ -40,13 +39,15 @@ public:
|
||||
|
||||
void initsd();
|
||||
void write_command(char *buf);
|
||||
//files auto[0-9].g on the sd card are performed in a row
|
||||
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
|
||||
// Files auto[0-9].g on the sd card are performed in sequence.
|
||||
// This is to delay autostart and hence the initialisation of
|
||||
// the sd card to some seconds after the normal init, so the
|
||||
// device is available soon after a reset.
|
||||
|
||||
void checkautostart(bool x);
|
||||
void openFile(char* name, bool read, bool push_current=false);
|
||||
void openFile(char* name, const bool read, const bool subcall=false);
|
||||
void openLogFile(char* name);
|
||||
void removeFile(char* name);
|
||||
void removeFile(const char * const name);
|
||||
void closefile(bool store_location=false);
|
||||
void release();
|
||||
void openAndPrintFile(const char *name);
|
||||
@@ -66,9 +67,11 @@ public:
|
||||
|
||||
void ls();
|
||||
void chdir(const char *relpath);
|
||||
void updir();
|
||||
int8_t updir();
|
||||
void setroot();
|
||||
|
||||
uint16_t get_num_Files();
|
||||
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
void presort();
|
||||
void getfilename_sorted(const uint16_t nr);
|
||||
@@ -111,6 +114,12 @@ private:
|
||||
uint8_t sort_order[SDSORT_LIMIT];
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
|
||||
#define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1)
|
||||
#else
|
||||
#define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH
|
||||
#endif
|
||||
|
||||
// Cache filenames to speed up SD menus.
|
||||
#if ENABLED(SDSORT_USES_RAM)
|
||||
|
||||
@@ -120,10 +129,10 @@ private:
|
||||
char **sortshort, **sortnames;
|
||||
#else
|
||||
char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
|
||||
char sortnames[SDSORT_LIMIT][FILENAME_LENGTH];
|
||||
char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
|
||||
#endif
|
||||
#elif DISABLED(SDSORT_USES_STACK)
|
||||
char sortnames[SDSORT_LIMIT][FILENAME_LENGTH];
|
||||
char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
|
||||
#endif
|
||||
|
||||
// Folder sorting uses an isDir array when caching items.
|
||||
@@ -148,8 +157,7 @@ private:
|
||||
uint8_t file_subcall_ctr;
|
||||
uint32_t filespos[SD_PROCEDURE_DEPTH];
|
||||
char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
|
||||
uint32_t filesize;
|
||||
uint32_t sdpos;
|
||||
uint32_t filesize, sdpos;
|
||||
|
||||
millis_t next_autostart_ms;
|
||||
bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
|
||||
@@ -164,25 +172,27 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
extern CardReader card;
|
||||
|
||||
#define IS_SD_PRINTING (card.sdprinting)
|
||||
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
#if ENABLED(SD_DETECT_INVERTED)
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) != 0)
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == HIGH)
|
||||
#else
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == 0)
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == LOW)
|
||||
#endif
|
||||
#else
|
||||
//No card detect line? Assume the card is inserted.
|
||||
// No card detect line? Assume the card is inserted.
|
||||
#define IS_SD_INSERTED true
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define IS_SD_PRINTING (false)
|
||||
extern CardReader card;
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
#endif // __CARDREADER_H
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define IS_SD_PRINTING (card.sdprinting)
|
||||
#define IS_SD_FILE_OPEN (card.isFileOpen())
|
||||
#else
|
||||
#define IS_SD_PRINTING (false)
|
||||
#define IS_SD_FILE_OPEN (false)
|
||||
#endif
|
||||
|
||||
#endif // _CARDREADER_H_
|
||||
|
||||
+853
-486
File diff suppressed because it is too large
Load Diff
@@ -37,11 +37,11 @@ class MarlinSettings {
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
|
||||
// That can store is enabled
|
||||
FORCE_INLINE static int get_start_of_meshes() { return meshes_begin; }
|
||||
FORCE_INLINE static int get_end_of_meshes() { return meshes_end; }
|
||||
static int calc_num_meshes();
|
||||
static void store_mesh(int8_t slot);
|
||||
static void load_mesh(int8_t slot, void *into = 0);
|
||||
FORCE_INLINE static int16_t get_start_of_meshes() { return meshes_begin; }
|
||||
FORCE_INLINE static int16_t get_end_of_meshes() { return meshes_end; }
|
||||
static uint16_t calc_num_meshes();
|
||||
static void store_mesh(const int8_t slot);
|
||||
static void load_mesh(const int8_t slot, void * const into=NULL);
|
||||
|
||||
//static void delete_mesh(); // necessary if we have a MAT
|
||||
//static void defrag_meshes(); // "
|
||||
@@ -52,10 +52,10 @@ class MarlinSettings {
|
||||
#endif
|
||||
|
||||
#if DISABLED(DISABLE_M503)
|
||||
static void report(bool forReplay=false);
|
||||
static void report(const bool forReplay=false);
|
||||
#else
|
||||
FORCE_INLINE
|
||||
static void report(bool forReplay=false) { }
|
||||
static void report(const bool forReplay=false) { UNUSED(forReplay); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -66,9 +66,9 @@ class MarlinSettings {
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
|
||||
// That can store is enabled
|
||||
static int meshes_begin;
|
||||
const static int meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
|
||||
// live at the very end of the eeprom
|
||||
static int16_t meshes_begin;
|
||||
const static int16_t meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
|
||||
// live at the very end of the eeprom
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -114,13 +114,13 @@ uint16_t mcp4728_getVout(uint8_t channel) {
|
||||
/**
|
||||
* Returns DAC values as a 0-100 percentage of drive strength
|
||||
*/
|
||||
uint16_t mcp4728_getDrvPct(uint8_t channel) { return uint16_t(100.0 * mcp4728_values[channel] / (DAC_STEPPER_MAX) + 0.5); }
|
||||
uint8_t mcp4728_getDrvPct(uint8_t channel) { return uint8_t(100.0 * mcp4728_values[channel] / (DAC_STEPPER_MAX) + 0.5); }
|
||||
|
||||
/**
|
||||
* Receives all Drive strengths as 0-100 percent values, updates
|
||||
* DAC Values array and calls fastwrite to update the DAC.
|
||||
*/
|
||||
void mcp4728_setDrvPct(uint16_t pct[XYZE]) {
|
||||
void mcp4728_setDrvPct(uint8_t pct[XYZE]) {
|
||||
LOOP_XYZE(i) mcp4728_values[i] = 0.01 * pct[i] * (DAC_STEPPER_MAX);
|
||||
mcp4728_fastWrite();
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ uint8_t mcp4728_setGain_all(uint8_t value);
|
||||
uint16_t mcp4728_getValue(uint8_t channel);
|
||||
uint8_t mcp4728_fastWrite();
|
||||
uint8_t mcp4728_simpleCommand(byte simpleCommand);
|
||||
uint16_t mcp4728_getDrvPct(uint8_t channel);
|
||||
void mcp4728_setDrvPct(uint16_t pct[XYZE]);
|
||||
uint8_t mcp4728_getDrvPct(uint8_t channel);
|
||||
void mcp4728_setDrvPct(uint8_t pct[XYZE]);
|
||||
|
||||
#endif
|
||||
#endif // DAC_MCP4728_H
|
||||
|
||||
+39
-24
@@ -24,6 +24,7 @@
|
||||
|
||||
#if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018)
|
||||
|
||||
#include "enum.h"
|
||||
#include "Stream.h"
|
||||
#include "utility/twi.h"
|
||||
#include <SlowSoftI2CMaster.h> //https://github.com/stawel/SlowSoftI2CMaster
|
||||
@@ -33,36 +34,52 @@
|
||||
#define DIGIPOT_I2C_ADDRESS 0x2F
|
||||
|
||||
#define DIGIPOT_A4988_Rsx 0.250
|
||||
#define DIGIPOT_A4988_Vrefmax 5.0
|
||||
#define DIGIPOT_A4988_Vrefmax 1.666
|
||||
#define DIGIPOT_A4988_MAX_VALUE 127
|
||||
|
||||
#define DIGIPOT_A4988_Itripmax(Vref) ((Vref)/(8.0*DIGIPOT_A4988_Rsx))
|
||||
|
||||
#define DIGIPOT_A4988_FACTOR (DIGIPOT_A4988_MAX_VALUE/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax))
|
||||
//TODO: MAX_CURRENT -0.5A ?? (currently set to 2A, max possible current 2.5A)
|
||||
#define DIGIPOT_A4988_MAX_CURRENT (DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax) - 0.5)
|
||||
#define DIGIPOT_A4988_FACTOR ((DIGIPOT_A4988_MAX_VALUE)/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax))
|
||||
#define DIGIPOT_A4988_MAX_CURRENT 2.0
|
||||
|
||||
static byte current_to_wiper(float current) {
|
||||
return byte(ceil(float((DIGIPOT_A4988_FACTOR * current))));
|
||||
static byte current_to_wiper(const float current) {
|
||||
const int16_t value = ceil(float(DIGIPOT_A4988_FACTOR) * current);
|
||||
return byte(constrain(value, 0, DIGIPOT_A4988_MAX_VALUE));
|
||||
}
|
||||
|
||||
static uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = {
|
||||
DIGIPOTS_I2C_SDA_X,
|
||||
DIGIPOTS_I2C_SDA_Y,
|
||||
DIGIPOTS_I2C_SDA_Z,
|
||||
DIGIPOTS_I2C_SDA_E0,
|
||||
DIGIPOTS_I2C_SDA_E1,
|
||||
const uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = {
|
||||
DIGIPOTS_I2C_SDA_X
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 1
|
||||
, DIGIPOTS_I2C_SDA_Y
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 2
|
||||
, DIGIPOTS_I2C_SDA_Z
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 3
|
||||
, DIGIPOTS_I2C_SDA_E0
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 4
|
||||
, DIGIPOTS_I2C_SDA_E1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = {
|
||||
SlowSoftI2CMaster { sda_pins[0], DIGIPOTS_I2C_SCL },
|
||||
SlowSoftI2CMaster { sda_pins[1], DIGIPOTS_I2C_SCL },
|
||||
SlowSoftI2CMaster { sda_pins[2], DIGIPOTS_I2C_SCL },
|
||||
SlowSoftI2CMaster { sda_pins[3], DIGIPOTS_I2C_SCL },
|
||||
SlowSoftI2CMaster { sda_pins[4], DIGIPOTS_I2C_SCL }
|
||||
SlowSoftI2CMaster { sda_pins[X_AXIS], DIGIPOTS_I2C_SCL }
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 1
|
||||
, SlowSoftI2CMaster { sda_pins[Y_AXIS], DIGIPOTS_I2C_SCL }
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 2
|
||||
, SlowSoftI2CMaster { sda_pins[Z_AXIS], DIGIPOTS_I2C_SCL }
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 3
|
||||
, SlowSoftI2CMaster { sda_pins[E_AXIS], DIGIPOTS_I2C_SCL }
|
||||
#if DIGIPOT_I2C_NUM_CHANNELS > 4
|
||||
, SlowSoftI2CMaster { sda_pins[E_AXIS + 1], DIGIPOTS_I2C_SCL }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
static void i2c_send(int channel, byte v) {
|
||||
static void i2c_send(const uint8_t channel, const byte v) {
|
||||
if (WITHIN(channel, 0, DIGIPOT_I2C_NUM_CHANNELS - 1)) {
|
||||
pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS) << 1) | I2C_WRITE);
|
||||
pots[channel].i2c_write(v);
|
||||
@@ -71,21 +88,19 @@ static void i2c_send(int channel, byte v) {
|
||||
}
|
||||
|
||||
// This is for the MCP4018 I2C based digipot
|
||||
void digipot_i2c_set_current(int channel, float current) {
|
||||
current = min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT));
|
||||
|
||||
i2c_send(channel, current_to_wiper(current));
|
||||
void digipot_i2c_set_current(uint8_t channel, float current) {
|
||||
i2c_send(channel, current_to_wiper(min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT))));
|
||||
}
|
||||
|
||||
void digipot_i2c_init() {
|
||||
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
|
||||
for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
|
||||
pots[i].i2c_init();
|
||||
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
|
||||
digipot_i2c_set_current(i, digipot_motor_current[i]);
|
||||
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
||||
}
|
||||
|
||||
#endif // DIGIPOT_I2C && DIGIPOT_MCP4018
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
#define DIGIPOT_I2C_MAX_CURRENT 2.5
|
||||
#endif
|
||||
|
||||
static byte current_to_wiper(float current) {
|
||||
return byte(ceil(float((DIGIPOT_I2C_FACTOR * current))));
|
||||
static byte current_to_wiper(const float current) {
|
||||
return byte(CEIL(float((DIGIPOT_I2C_FACTOR * current))));
|
||||
}
|
||||
|
||||
static void i2c_send(byte addr, byte a, byte b) {
|
||||
static void i2c_send(const byte addr, const byte a, const byte b) {
|
||||
Wire.beginTransmission(addr);
|
||||
Wire.write(a);
|
||||
Wire.write(b);
|
||||
@@ -49,7 +49,7 @@ static void i2c_send(byte addr, byte a, byte b) {
|
||||
}
|
||||
|
||||
// This is for the MCP4451 I2C based digipot
|
||||
void digipot_i2c_set_current(int channel, float current) {
|
||||
void digipot_i2c_set_current(uint8_t channel, float current) {
|
||||
current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT);
|
||||
// these addresses are specific to Azteeg X3 Pro, can be set to others,
|
||||
// In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
|
||||
@@ -69,11 +69,11 @@ void digipot_i2c_set_current(int channel, float current) {
|
||||
}
|
||||
|
||||
void digipot_i2c_init() {
|
||||
const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
|
||||
Wire.begin();
|
||||
// setup initial currents as defined in Configuration_adv.h
|
||||
for (int i = 0; i < COUNT(digipot_motor_current); i++)
|
||||
digipot_i2c_set_current(i, digipot_motor_current[i]);
|
||||
for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
|
||||
digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
|
||||
}
|
||||
|
||||
#endif // DIGIPOT_I2C
|
||||
|
||||
+199
-58
@@ -38,10 +38,8 @@
|
||||
#if ENABLED(START_BMPHIGH)
|
||||
#define START_BMPWIDTH 112
|
||||
#define START_BMPHEIGHT 38
|
||||
#define START_BMPBYTEWIDTH 14
|
||||
#define START_BMPBYTES 532 // START_BMPWIDTH * START_BMPHEIGHT / 8
|
||||
|
||||
const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
|
||||
const unsigned char start_bmp[] PROGMEM = {
|
||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
|
||||
@@ -83,10 +81,8 @@
|
||||
#else
|
||||
#define START_BMPWIDTH 56
|
||||
#define START_BMPHEIGHT 19
|
||||
#define START_BMPBYTEWIDTH 7
|
||||
#define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8
|
||||
|
||||
const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
|
||||
const unsigned char start_bmp[] PROGMEM = {
|
||||
0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
|
||||
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
@@ -115,12 +111,55 @@
|
||||
// When only one extruder is selected, the "1" on the symbol will not
|
||||
// be displayed.
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 // Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 // Height in pixels
|
||||
|
||||
#if HAS_TEMP_BED
|
||||
#if HOTENDS == 1
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
#if HOTENDS == 0
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
#elif HOTENDS == 1
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -142,10 +181,7 @@
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -167,10 +203,7 @@
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
#elif HOTENDS == 2
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -192,10 +225,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -217,10 +247,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
#else
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -242,10 +269,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -266,13 +290,53 @@
|
||||
0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // Extruders
|
||||
#endif // HOTENDS
|
||||
#else
|
||||
#if HOTENDS == 1
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
#if HOTENDS == 0
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
|
||||
0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
|
||||
0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
|
||||
0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
|
||||
0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#elif HOTENDS == 1
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -294,10 +358,7 @@
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -319,10 +380,7 @@
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#elif HOTENDS == 2
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -344,10 +402,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -369,10 +424,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#else
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen0_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
|
||||
@@ -394,10 +446,7 @@
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
#define STATUS_SCREENWIDTH 115 //Width in pixels
|
||||
#define STATUS_SCREENHEIGHT 19 //Height in pixels
|
||||
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
|
||||
const unsigned char status_screen1_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
|
||||
@@ -418,5 +467,97 @@
|
||||
0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
|
||||
0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif // Extruders
|
||||
#endif // HOTENDS
|
||||
#endif // HAS_TEMP_BED
|
||||
|
||||
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
|
||||
|
||||
const unsigned char cw_bmp[] PROGMEM = {
|
||||
0x03,0xF8,0x00, // 000000111111100000000000
|
||||
0x0F,0xF7,0x00, // 000011111111111000000000
|
||||
0x17,0x0F,0x00, // 000111100000111100000000
|
||||
0x38,0x07,0x00, // 001110000000011100000000
|
||||
0x38,0x03,0x80, // 001110000000001110000000
|
||||
0x70,0x03,0x80, // 011100000000001110000000
|
||||
0x70,0x0F,0xE0, // 011100000000111111100000
|
||||
0x70,0x07,0xC0, // 011100000000011111000000
|
||||
0x70,0x03,0x80, // 011100000000001110000000
|
||||
0x70,0x01,0x00, // 011100000000000100000000
|
||||
0x70,0x00,0x00, // 011100000000000000000000
|
||||
0x68,0x00,0x00, // 001110000000000000000000
|
||||
0x38,0x07,0x00, // 001110000000011100000000
|
||||
0x17,0x0F,0x00, // 000111100000111100000000
|
||||
0x0F,0xFE,0x00, // 000011111111111000000000
|
||||
0x03,0xF8,0x00 // 000000111111100000000000
|
||||
};
|
||||
|
||||
const unsigned char ccw_bmp[] PROGMEM = {
|
||||
0x00,0xFE,0x00, // 000000001111111000000000
|
||||
0x03,0xFF,0x80, // 000000111111111110000000
|
||||
0x07,0x83,0xC0, // 000001111000001111000000
|
||||
0x0E,0x01,0xC0, // 000011100000000111000000
|
||||
0x0E,0x00,0xE0, // 000011100000000011100000
|
||||
0x1C,0x00,0xE0, // 000111000000000011100000
|
||||
0x7F,0x00,0xE0, // 011111110000000011100000
|
||||
0x3E,0x00,0xE0, // 001111100000000011100000
|
||||
0x1C,0x00,0xE0, // 000111000000000011100000
|
||||
0x08,0x00,0xE0, // 000010000000000011100000
|
||||
0x00,0x00,0xE0, // 000000000000000011100000
|
||||
0x00,0x01,0xC0, // 000000000000000111000000
|
||||
0x0E,0x01,0xC0, // 000011100000000111000000
|
||||
0x0F,0x07,0x80, // 000011110000011110000000
|
||||
0x07,0xFF,0x00, // 000001111111111100000000
|
||||
0x01,0xFC,0x00 // 000000011111110000000000
|
||||
};
|
||||
|
||||
const unsigned char up_arrow_bmp[] PROGMEM = {
|
||||
0x04,0x00, // 000001000000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x1F,0x00, // 000111110000
|
||||
0x3F,0x80, // 001111111000
|
||||
0x7F,0xC0, // 011111111100
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00 // 000011100000
|
||||
};
|
||||
|
||||
const unsigned char down_arrow_bmp[] PROGMEM = {
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x7F,0xC0, // 011111111100
|
||||
0x3F,0x80, // 001111111000
|
||||
0x1F,0x00, // 000111110000
|
||||
0x0E,0x00, // 000011100000
|
||||
0x04,0x00 // 000001000000
|
||||
};
|
||||
|
||||
const unsigned char offset_bedline_bmp[] PROGMEM = {
|
||||
0xFF,0xFF,0xFF // 111111111111111111111111
|
||||
};
|
||||
|
||||
const unsigned char nozzle_bmp[] PROGMEM = {
|
||||
0x7F,0x80, // 0111111110000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0x7F,0x80, // 0111111110000000
|
||||
0x7F,0x80, // 0111111110000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0xFF,0xC0, // 1111111111000000
|
||||
0x3F,0x00, // 0011111100000000
|
||||
0x1E,0x00, // 0001111000000000
|
||||
0x0C,0x00 // 0000110000000000
|
||||
};
|
||||
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
||||
|
||||
+252
-164
@@ -32,167 +32,255 @@
|
||||
Max Font ascent = 8 descent=-1
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
|
||||
0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
|
||||
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
|
||||
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
|
||||
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
|
||||
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
|
||||
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
|
||||
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
|
||||
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
|
||||
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
|
||||
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
|
||||
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
|
||||
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
|
||||
0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
|
||||
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
|
||||
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
|
||||
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
|
||||
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
|
||||
112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
|
||||
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
|
||||
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
|
||||
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
|
||||
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
|
||||
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
|
||||
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
|
||||
8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
|
||||
168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
|
||||
7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
|
||||
0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
|
||||
136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
|
||||
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
|
||||
5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
|
||||
6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
|
||||
128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
|
||||
16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
|
||||
136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
|
||||
7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
|
||||
0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
|
||||
136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
|
||||
128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
|
||||
7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
|
||||
0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
|
||||
32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
|
||||
136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
|
||||
5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
|
||||
6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
|
||||
136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
|
||||
32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
|
||||
224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
|
||||
1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
|
||||
80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
|
||||
64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
|
||||
0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
|
||||
128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
|
||||
120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
|
||||
0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
|
||||
136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
|
||||
136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
|
||||
8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
|
||||
6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
|
||||
192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
|
||||
168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
|
||||
6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
|
||||
136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
|
||||
5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
|
||||
0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
|
||||
64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
|
||||
5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
|
||||
136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
|
||||
6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
|
||||
0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
|
||||
64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
|
||||
3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
|
||||
6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
|
||||
7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
|
||||
0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
|
||||
80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
|
||||
1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
|
||||
6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
|
||||
7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
|
||||
7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
|
||||
0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
|
||||
2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
|
||||
168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
|
||||
0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
|
||||
32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
|
||||
5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
|
||||
128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
|
||||
7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
|
||||
2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
|
||||
0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
|
||||
136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
|
||||
7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
|
||||
0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
|
||||
64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
|
||||
64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
|
||||
136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
|
||||
5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
|
||||
8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
|
||||
0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
|
||||
32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
|
||||
160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
|
||||
112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
|
||||
248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
|
||||
8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
|
||||
6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
|
||||
128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
|
||||
0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
|
||||
64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
|
||||
224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
|
||||
8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
|
||||
0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
|
||||
16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
|
||||
0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
|
||||
136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
|
||||
136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
|
||||
6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
|
||||
0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
|
||||
32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
|
||||
136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
|
||||
136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
|
||||
32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
|
||||
4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
|
||||
8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
|
||||
0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
|
||||
32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
|
||||
0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
|
||||
120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
|
||||
120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
|
||||
6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
|
||||
32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
|
||||
112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
|
||||
248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
|
||||
3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
|
||||
8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
|
||||
1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
|
||||
160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
|
||||
16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
|
||||
136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
|
||||
5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
|
||||
8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
|
||||
0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
|
||||
80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
|
||||
0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
|
||||
8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
|
||||
6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
|
||||
0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
|
||||
0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
|
||||
136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
|
||||
64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
|
||||
};
|
||||
|
||||
#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
|
||||
|
||||
//
|
||||
// Reduced font (only symbols 32 - 127) - About 1400 bytes smaller
|
||||
//
|
||||
const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
|
||||
0,6,9,0,254,7,1,146,3,33,32,127,255,7,255,7,
|
||||
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
|
||||
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
|
||||
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
|
||||
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
|
||||
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
|
||||
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
|
||||
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
|
||||
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
|
||||
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
|
||||
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
|
||||
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
|
||||
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
|
||||
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
|
||||
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
|
||||
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
|
||||
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
|
||||
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
|
||||
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
|
||||
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
|
||||
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
|
||||
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
|
||||
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
|
||||
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
|
||||
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
|
||||
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
|
||||
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
|
||||
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
|
||||
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
|
||||
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
|
||||
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
|
||||
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
|
||||
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
|
||||
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
|
||||
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
|
||||
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
|
||||
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
|
||||
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
|
||||
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
|
||||
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
|
||||
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
|
||||
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
|
||||
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
|
||||
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
|
||||
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
|
||||
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
|
||||
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
|
||||
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
|
||||
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
|
||||
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
|
||||
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
|
||||
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
|
||||
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
|
||||
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
|
||||
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
|
||||
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
|
||||
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
|
||||
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
|
||||
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
|
||||
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
|
||||
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
|
||||
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
|
||||
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
|
||||
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
|
||||
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
|
||||
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
|
||||
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
|
||||
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
|
||||
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
|
||||
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
|
||||
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
|
||||
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
|
||||
6,0,2,104,144,0,0,0,6,0,0};
|
||||
|
||||
#else
|
||||
|
||||
//
|
||||
// Extended (original) font (symbols 32 - 255)
|
||||
//
|
||||
const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
|
||||
0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
|
||||
255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
|
||||
128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
|
||||
0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
|
||||
120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
|
||||
64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
|
||||
2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
|
||||
64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
|
||||
32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
|
||||
5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
|
||||
64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
|
||||
192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
|
||||
0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
|
||||
192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
|
||||
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
|
||||
5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
|
||||
6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
|
||||
112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
|
||||
32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
|
||||
112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
|
||||
5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
|
||||
192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
|
||||
32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
|
||||
0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
|
||||
8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
|
||||
168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
|
||||
7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
|
||||
0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
|
||||
136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
|
||||
128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
|
||||
5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
|
||||
6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
|
||||
128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
|
||||
16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
|
||||
136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
|
||||
7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
|
||||
0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
|
||||
136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
|
||||
128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
|
||||
7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
|
||||
0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
|
||||
32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
|
||||
136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
|
||||
5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
|
||||
6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
|
||||
136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
|
||||
32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
|
||||
224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
|
||||
1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
|
||||
80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
|
||||
64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
|
||||
0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
|
||||
128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
|
||||
120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
|
||||
0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
|
||||
136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
|
||||
136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
|
||||
8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
|
||||
6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
|
||||
192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
|
||||
168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
|
||||
6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
|
||||
136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
|
||||
5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
|
||||
0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
|
||||
64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
|
||||
5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
|
||||
136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
|
||||
6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
|
||||
0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
|
||||
64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
|
||||
3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
|
||||
6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
|
||||
0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
|
||||
7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
|
||||
0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
|
||||
80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
|
||||
1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
|
||||
6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
|
||||
7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
|
||||
7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
|
||||
0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
|
||||
2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
|
||||
168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
|
||||
0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
|
||||
32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
|
||||
5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
|
||||
128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
|
||||
7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
|
||||
2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
|
||||
0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
|
||||
136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
|
||||
7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
|
||||
0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
|
||||
64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
|
||||
64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
|
||||
136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
|
||||
5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
|
||||
8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
|
||||
0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
|
||||
32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
|
||||
160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
|
||||
112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
|
||||
248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
|
||||
8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
|
||||
6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
|
||||
128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
|
||||
0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
|
||||
64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
|
||||
224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
|
||||
8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
|
||||
0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
|
||||
16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
|
||||
0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
|
||||
136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
|
||||
136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
|
||||
6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
|
||||
0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
|
||||
32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
|
||||
136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
|
||||
136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
|
||||
32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
|
||||
4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
|
||||
8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
|
||||
0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
|
||||
32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
|
||||
0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
|
||||
120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
|
||||
120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
|
||||
6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
|
||||
32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
|
||||
112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
|
||||
248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
|
||||
3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
|
||||
8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
|
||||
1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
|
||||
160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
|
||||
16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
|
||||
136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
|
||||
5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
|
||||
8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
|
||||
0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
|
||||
80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
|
||||
0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
|
||||
8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
|
||||
6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
|
||||
0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
|
||||
0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
|
||||
136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
|
||||
64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Fontname: ISO10646_CZ
|
||||
Copyright: A. Hardtung, public domain
|
||||
Modified for Czech accents by Petr Zahradnik, http://www.zahradniksebavi.cz
|
||||
Capital A Height: 7, '1' Height: 7
|
||||
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
|
||||
Font Bounding box w= 6 h= 9 x= 0 y=-2
|
||||
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
|
||||
Pure Font ascent = 7 descent=-1
|
||||
X Font ascent = 7 descent=-1
|
||||
Max Font ascent = 8 descent=-1
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
const u8g_fntpgm_uint8_t ISO10646_CZ[2832] U8G_SECTION(".progmem.ISO10646_CZ") = {
|
||||
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
|
||||
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
|
||||
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
|
||||
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
|
||||
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
|
||||
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
|
||||
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
|
||||
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
|
||||
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
|
||||
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
|
||||
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
|
||||
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
|
||||
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
|
||||
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
|
||||
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
|
||||
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
|
||||
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
|
||||
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
|
||||
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
|
||||
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
|
||||
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
|
||||
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
|
||||
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
|
||||
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
|
||||
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
|
||||
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
|
||||
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
|
||||
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
|
||||
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
|
||||
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
|
||||
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
|
||||
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
|
||||
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
|
||||
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
|
||||
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
|
||||
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
|
||||
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
|
||||
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
|
||||
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
|
||||
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
|
||||
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
|
||||
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
|
||||
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
|
||||
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
|
||||
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
|
||||
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
|
||||
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
|
||||
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
|
||||
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
|
||||
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
|
||||
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
|
||||
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
|
||||
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
|
||||
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
|
||||
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
|
||||
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
|
||||
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
|
||||
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
|
||||
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
|
||||
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
|
||||
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
|
||||
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
|
||||
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
|
||||
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
|
||||
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
|
||||
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
|
||||
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
|
||||
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
|
||||
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
|
||||
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
|
||||
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
|
||||
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
|
||||
6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
|
||||
0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,8,
|
||||
16,248,128,128,240,128,248,3,8,8,6,1,0,32,64,224,
|
||||
64,64,64,64,224,5,8,8,6,0,0,16,32,112,136,136,
|
||||
136,136,112,5,8,8,6,0,0,16,32,136,136,136,136,136,
|
||||
112,5,8,8,6,0,0,16,32,136,136,80,32,32,32,5,
|
||||
8,8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,
|
||||
6,0,0,16,32,0,112,136,248,128,112,2,8,8,6,2,
|
||||
0,64,128,0,128,128,128,128,128,5,8,8,6,0,0,16,
|
||||
32,0,112,136,136,136,112,5,8,8,6,0,0,16,32,0,
|
||||
136,136,136,152,104,5,9,9,6,0,255,16,32,0,136,136,
|
||||
136,120,8,112,5,8,8,6,0,0,80,32,112,136,128,128,
|
||||
136,112,5,8,8,6,0,0,80,32,0,112,128,128,136,112,
|
||||
5,8,8,6,0,0,80,32,240,136,136,136,136,240,6,8,
|
||||
8,6,0,0,4,20,24,112,144,144,144,112,5,8,8,6,
|
||||
0,0,80,32,248,128,128,240,128,248,5,8,8,6,0,0,
|
||||
80,32,0,112,136,248,128,112,5,8,8,6,0,0,80,32,
|
||||
136,200,168,152,136,136,5,8,8,6,0,0,80,32,0,176,
|
||||
200,136,136,136,5,8,8,6,0,0,80,32,240,136,240,160,
|
||||
144,136,5,8,8,6,0,0,80,32,0,176,200,128,128,128,
|
||||
5,8,8,6,0,0,80,32,120,128,128,112,8,240,5,8,
|
||||
8,6,0,0,80,32,0,112,128,112,8,240,5,8,8,6,
|
||||
0,0,80,32,248,32,32,32,32,32,6,8,8,6,0,0,
|
||||
4,68,72,224,64,64,64,48,5,8,8,6,0,0,32,80,
|
||||
168,136,136,136,136,112,5,8,8,6,0,0,32,80,32,136,
|
||||
136,136,152,104,5,8,8,6,0,0,80,32,248,8,48,64,
|
||||
128,248,5,8,8,6,0,0,80,32,0,248,16,32,64,248,
|
||||
0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
|
||||
0,0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,
|
||||
7,7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,
|
||||
0,0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,
|
||||
112,80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,
|
||||
32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,
|
||||
8,6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,
|
||||
1,7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,
|
||||
5,7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,
|
||||
6,0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,
|
||||
8,2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,
|
||||
136,168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,
|
||||
6,0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,
|
||||
32,32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,
|
||||
5,5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,
|
||||
64,128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,
|
||||
5,7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,
|
||||
6,2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,
|
||||
6,0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,
|
||||
136,136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,
|
||||
5,7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,
|
||||
6,0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,
|
||||
192,64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,
|
||||
32,64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,
|
||||
248,136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,
|
||||
136,5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,
|
||||
8,8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,
|
||||
6,0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,
|
||||
0,32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,
|
||||
96,160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,
|
||||
136,112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,
|
||||
128,248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,
|
||||
5,8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,
|
||||
7,6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,
|
||||
0,128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,
|
||||
64,0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,
|
||||
224,64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,
|
||||
64,224,5,9,9,6,0,255,80,32,112,136,128,184,136,136,
|
||||
112,5,8,8,6,0,0,104,144,0,136,200,168,152,136,5,
|
||||
8,8,6,0,0,64,32,112,136,136,136,136,112,5,8,8,
|
||||
6,0,0,16,32,112,136,136,136,136,112,5,8,8,6,0,
|
||||
0,32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,
|
||||
144,0,112,136,136,136,112,5,8,8,6,0,0,80,0,112,
|
||||
136,136,136,136,112,5,5,5,6,0,1,136,80,32,80,136,
|
||||
5,8,8,6,0,255,16,112,168,168,168,168,112,64,5,8,
|
||||
8,6,0,0,64,32,136,136,136,136,136,112,5,8,8,6,
|
||||
0,0,16,32,136,136,136,136,136,112,5,8,8,6,0,0,
|
||||
32,80,0,136,136,136,136,112,5,8,8,6,0,0,80,0,
|
||||
136,136,136,136,136,112,1,7,7,6,2,0,128,0,128,128,
|
||||
128,128,128,5,9,9,6,0,255,120,128,128,112,8,8,240,
|
||||
32,96,4,8,8,6,1,255,96,144,144,160,144,144,224,128,
|
||||
5,8,8,6,0,0,64,32,0,112,8,120,136,120,5,8,
|
||||
8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,6,
|
||||
0,0,32,80,0,112,8,120,136,120,5,8,8,6,0,0,
|
||||
104,144,0,112,8,120,136,120,5,7,7,6,0,0,80,0,
|
||||
112,8,120,136,120,5,8,8,6,0,0,32,80,32,112,8,
|
||||
120,136,120,5,6,6,6,0,0,208,40,120,160,168,80,5,
|
||||
7,7,6,0,255,112,128,128,136,112,32,96,5,8,8,6,
|
||||
0,0,64,32,0,112,136,248,128,112,5,8,8,6,0,0,
|
||||
16,32,0,112,136,248,128,112,5,8,8,6,0,0,32,80,
|
||||
0,112,136,248,128,112,5,7,7,6,0,0,80,0,112,136,
|
||||
248,128,112,3,8,8,6,1,0,128,64,0,64,192,64,64,
|
||||
224,3,8,8,6,1,0,32,64,0,64,192,64,64,224,3,
|
||||
8,8,6,1,0,64,160,0,64,192,64,64,224,3,7,7,
|
||||
6,1,0,160,0,64,192,64,64,224,5,8,8,6,0,255,
|
||||
80,32,112,136,136,120,8,112,5,8,8,6,0,0,104,144,
|
||||
0,176,200,136,136,136,5,8,8,6,0,0,64,32,0,112,
|
||||
136,136,136,112,5,8,8,6,0,0,16,32,0,112,136,136,
|
||||
136,112,5,8,8,6,0,0,32,80,0,112,136,136,136,112,
|
||||
5,8,8,6,0,0,104,144,0,112,136,136,136,112,5,7,
|
||||
7,6,0,0,80,0,112,136,136,136,112,5,5,5,6,0,
|
||||
1,32,0,248,0,32,5,7,7,6,0,255,16,112,168,168,
|
||||
168,112,64,5,8,8,6,0,0,64,32,0,136,136,136,152,
|
||||
104,5,8,8,6,0,0,16,32,0,136,136,136,152,104,5,
|
||||
8,8,6,0,0,32,80,0,136,136,136,152,104,5,7,7,
|
||||
6,0,0,80,0,136,136,136,152,104,1,5,5,6,2,0,
|
||||
128,128,128,128,128,5,7,7,6,0,255,112,128,112,8,240,
|
||||
32,96,5,8,8,6,0,255,80,0,136,136,136,120,8,112
|
||||
};
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
Fontname: ISO10646_SK
|
||||
Copyright: A. Hardtung, modified by Roman Moravcik
|
||||
Capital A Height: 7, '1' Height: 7
|
||||
Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
|
||||
Font Bounding box w= 6 h= 9 x= 0 y=-2
|
||||
Calculated Min Values x= 0 y=-1 dx= 0 dy= 0
|
||||
Pure Font ascent = 7 descent=-1
|
||||
X Font ascent = 7 descent=-1
|
||||
Max Font ascent = 8 descent=-1
|
||||
*/
|
||||
#include <U8glib.h>
|
||||
const u8g_fntpgm_uint8_t ISO10646_SK[2203] U8G_SECTION(".progmem.ISO10646_SK") = {
|
||||
0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
|
||||
255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
|
||||
128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
|
||||
0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
|
||||
120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
|
||||
64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
|
||||
2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
|
||||
64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
|
||||
32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
|
||||
5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
|
||||
64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
|
||||
192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
|
||||
0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
|
||||
192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
|
||||
128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
|
||||
5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
|
||||
6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
|
||||
112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
|
||||
32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
|
||||
112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
|
||||
5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
|
||||
192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
|
||||
32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
|
||||
0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
|
||||
8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
|
||||
168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
|
||||
7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
|
||||
0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
|
||||
136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
|
||||
128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
|
||||
5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
|
||||
6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
|
||||
128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
|
||||
16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
|
||||
136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
|
||||
7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
|
||||
0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
|
||||
136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
|
||||
128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
|
||||
7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
|
||||
0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
|
||||
32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
|
||||
136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
|
||||
5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
|
||||
6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
|
||||
136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
|
||||
32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
|
||||
224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
|
||||
1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
|
||||
80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
|
||||
64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
|
||||
0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
|
||||
128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
|
||||
120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
|
||||
0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
|
||||
136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
|
||||
136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
|
||||
8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
|
||||
6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
|
||||
192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
|
||||
168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
|
||||
6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
|
||||
136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
|
||||
5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
|
||||
0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
|
||||
64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
|
||||
5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
|
||||
136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
|
||||
6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
|
||||
0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
|
||||
64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
|
||||
3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
|
||||
6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
|
||||
0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,80,
|
||||
0,112,136,136,248,136,136,5,8,8,6,0,0,8,16,248,
|
||||
128,128,240,128,248,3,8,8,6,1,0,32,64,224,64,64,
|
||||
64,64,224,5,8,8,6,0,0,16,32,112,136,136,136,136,
|
||||
112,5,8,8,6,0,0,32,80,112,136,136,136,136,112,5,
|
||||
8,8,6,0,0,16,32,136,136,136,136,136,112,5,8,8,
|
||||
6,0,0,16,32,136,136,80,32,32,32,5,8,8,6,0,
|
||||
0,16,32,0,112,8,120,136,120,5,7,7,6,0,0,80,
|
||||
0,112,8,120,136,120,5,8,8,6,0,0,16,32,0,112,
|
||||
136,248,128,112,2,8,8,6,2,0,64,128,0,128,128,128,
|
||||
128,128,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
|
||||
5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,8,
|
||||
8,6,0,0,16,32,0,136,136,136,152,104,5,9,9,6,
|
||||
0,255,16,32,0,136,136,136,120,8,112,5,8,8,6,0,
|
||||
0,80,32,112,136,128,128,136,112,5,8,8,6,0,0,80,
|
||||
32,0,112,128,128,136,112,5,8,8,6,0,0,80,32,240,
|
||||
136,136,136,136,240,6,8,8,6,0,0,4,20,24,112,144,
|
||||
144,144,112,5,8,8,6,0,0,16,32,128,128,128,128,128,
|
||||
248,3,8,8,6,1,0,32,64,0,192,64,64,64,224,5,
|
||||
8,8,6,0,0,16,144,160,128,128,128,128,248,5,8,8,
|
||||
6,1,0,8,200,80,64,64,64,64,224,5,8,8,6,0,
|
||||
0,80,32,136,200,168,152,136,136,5,8,8,6,0,0,80,
|
||||
32,0,176,200,136,136,136,5,8,8,6,0,0,16,32,240,
|
||||
136,240,160,144,136,5,8,8,6,0,0,16,32,0,176,200,
|
||||
128,128,128,5,8,8,6,0,0,80,32,120,128,128,112,8,
|
||||
240,5,8,8,6,0,0,80,32,0,112,128,112,8,240,5,
|
||||
8,8,6,0,0,80,32,248,32,32,32,32,32,6,8,8,
|
||||
6,0,0,4,68,72,224,64,64,64,48,5,8,8,6,0,
|
||||
0,80,32,248,8,48,64,128,248,5,8,8,6,0,0,80,
|
||||
32,0,248,16,32,64,248,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
|
||||
0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
|
||||
6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
|
||||
0,0,6,0,0,0,0,0,6,0,0};
|
||||
@@ -111,7 +111,7 @@ void endstop_ISR(void) { endstop_ISR_worker(); }
|
||||
void setup_endstop_interrupts( void ) {
|
||||
|
||||
#if HAS_X_MAX
|
||||
#if (digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT) // if pin has an external interrupt
|
||||
#if digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT // if pin has an external interrupt
|
||||
attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -121,7 +121,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_X_MIN
|
||||
#if (digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -131,7 +131,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Y_MAX
|
||||
#if (digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -141,7 +141,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Y_MIN
|
||||
#if (digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -151,7 +151,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MAX
|
||||
#if (digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -161,7 +161,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN
|
||||
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -170,8 +170,48 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_X2_MAX
|
||||
#if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable");
|
||||
pciSetup(X2_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_X2_MIN
|
||||
#if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable");
|
||||
pciSetup(X2_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y2_MAX
|
||||
#if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable");
|
||||
pciSetup(Y2_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y2_MIN
|
||||
#if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable");
|
||||
pciSetup(Y2_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z2_MAX
|
||||
#if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -181,7 +221,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Z2_MIN
|
||||
#if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
@@ -191,7 +231,7 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||
#if digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
|
||||
+139
-63
@@ -38,17 +38,10 @@ Endstops endstops;
|
||||
|
||||
// public:
|
||||
|
||||
bool Endstops::enabled = true,
|
||||
Endstops::enabled_globally =
|
||||
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
|
||||
(true)
|
||||
#else
|
||||
(false)
|
||||
#endif
|
||||
;
|
||||
bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
|
||||
volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
uint16_t
|
||||
#else
|
||||
byte
|
||||
@@ -74,6 +67,14 @@ void Endstops::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_X2_MIN
|
||||
#if ENABLED(ENDSTOPPULLUP_XMIN)
|
||||
SET_INPUT_PULLUP(X2_MIN_PIN);
|
||||
#else
|
||||
SET_INPUT(X2_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y_MIN
|
||||
#if ENABLED(ENDSTOPPULLUP_YMIN)
|
||||
SET_INPUT_PULLUP(Y_MIN_PIN);
|
||||
@@ -82,6 +83,14 @@ void Endstops::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y2_MIN
|
||||
#if ENABLED(ENDSTOPPULLUP_YMIN)
|
||||
SET_INPUT_PULLUP(Y2_MIN_PIN);
|
||||
#else
|
||||
SET_INPUT(Y2_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN
|
||||
#if ENABLED(ENDSTOPPULLUP_ZMIN)
|
||||
SET_INPUT_PULLUP(Z_MIN_PIN);
|
||||
@@ -106,6 +115,14 @@ void Endstops::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_X2_MAX
|
||||
#if ENABLED(ENDSTOPPULLUP_XMAX)
|
||||
SET_INPUT_PULLUP(X2_MAX_PIN);
|
||||
#else
|
||||
SET_INPUT(X2_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y_MAX
|
||||
#if ENABLED(ENDSTOPPULLUP_YMAX)
|
||||
SET_INPUT_PULLUP(Y_MAX_PIN);
|
||||
@@ -114,6 +131,14 @@ void Endstops::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Y2_MAX
|
||||
#if ENABLED(ENDSTOPPULLUP_YMAX)
|
||||
SET_INPUT_PULLUP(Y2_MAX_PIN);
|
||||
#else
|
||||
SET_INPUT(Y2_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MAX
|
||||
#if ENABLED(ENDSTOPPULLUP_ZMAX)
|
||||
SET_INPUT_PULLUP(Z_MAX_PIN);
|
||||
@@ -161,7 +186,7 @@ void Endstops::report_state() {
|
||||
#define ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y')
|
||||
#define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z')
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
||||
ENDSTOP_HIT_TEST_X();
|
||||
ENDSTOP_HIT_TEST_Y();
|
||||
@@ -171,7 +196,7 @@ void Endstops::report_state() {
|
||||
#define P_AXIS Z_AXIS
|
||||
if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
|
||||
#endif
|
||||
SERIAL_EOL;
|
||||
SERIAL_EOL();
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
lcd_status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
|
||||
@@ -192,37 +217,45 @@ void Endstops::report_state() {
|
||||
|
||||
void Endstops::M119() {
|
||||
SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
|
||||
#define ES_REPORT(AXIS) do{ \
|
||||
SERIAL_PROTOCOLPGM(MSG_##AXIS); \
|
||||
SERIAL_PROTOCOLLN(((READ(AXIS##_PIN)^AXIS##_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); \
|
||||
}while(0)
|
||||
#if HAS_X_MIN
|
||||
SERIAL_PROTOCOLPGM(MSG_X_MIN);
|
||||
SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(X_MIN);
|
||||
#endif
|
||||
#if HAS_X2_MIN
|
||||
ES_REPORT(X2_MIN);
|
||||
#endif
|
||||
#if HAS_X_MAX
|
||||
SERIAL_PROTOCOLPGM(MSG_X_MAX);
|
||||
SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(X_MAX);
|
||||
#endif
|
||||
#if HAS_X2_MAX
|
||||
ES_REPORT(X2_MAX);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
SERIAL_PROTOCOLPGM(MSG_Y_MIN);
|
||||
SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Y_MIN);
|
||||
#endif
|
||||
#if HAS_Y2_MIN
|
||||
ES_REPORT(Y2_MIN);
|
||||
#endif
|
||||
#if HAS_Y_MAX
|
||||
SERIAL_PROTOCOLPGM(MSG_Y_MAX);
|
||||
SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Y_MAX);
|
||||
#endif
|
||||
#if HAS_Y2_MAX
|
||||
ES_REPORT(Y2_MAX);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
SERIAL_PROTOCOLPGM(MSG_Z_MIN);
|
||||
SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Z_MIN);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
SERIAL_PROTOCOLPGM(MSG_Z2_MIN);
|
||||
SERIAL_PROTOCOLLN(((READ(Z2_MIN_PIN)^Z2_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Z2_MIN);
|
||||
#endif
|
||||
#if HAS_Z_MAX
|
||||
SERIAL_PROTOCOLPGM(MSG_Z_MAX);
|
||||
SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Z_MAX);
|
||||
#endif
|
||||
#if HAS_Z2_MAX
|
||||
SERIAL_PROTOCOLPGM(MSG_Z2_MAX);
|
||||
SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
|
||||
ES_REPORT(Z2_MAX);
|
||||
#endif
|
||||
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
||||
SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
|
||||
@@ -234,9 +267,27 @@ void Endstops::M119() {
|
||||
#endif
|
||||
} // Endstops::M119
|
||||
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
void Endstops::test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2) {
|
||||
byte x_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for X, bit 1 for X2
|
||||
if (x_test && stepper.current_block->steps[X_AXIS] > 0) {
|
||||
SBI(endstop_hit_bits, X_MIN);
|
||||
if (!stepper.performing_homing || (x_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
|
||||
stepper.kill_current_block();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
void Endstops::test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2) {
|
||||
byte y_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Y, bit 1 for Y2
|
||||
if (y_test && stepper.current_block->steps[Y_AXIS] > 0) {
|
||||
SBI(endstop_hit_bits, Y_MIN);
|
||||
if (!stepper.performing_homing || (y_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
|
||||
stepper.kill_current_block();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
// Pass the result of the endstop test
|
||||
void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
|
||||
byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
|
||||
if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
|
||||
@@ -245,7 +296,6 @@ void Endstops::M119() {
|
||||
stepper.kill_current_block();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Check endstops - Called from ISR!
|
||||
@@ -254,7 +304,7 @@ void Endstops::update() {
|
||||
#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
|
||||
#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
|
||||
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
|
||||
#define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN))
|
||||
#define _ENDSTOP_HIT(AXIS, MINMAX) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MINMAX))
|
||||
|
||||
// UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
|
||||
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
|
||||
@@ -264,19 +314,19 @@ void Endstops::update() {
|
||||
#define UPDATE_ENDSTOP(AXIS,MINMAX) do { \
|
||||
UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \
|
||||
if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \
|
||||
_ENDSTOP_HIT(AXIS); \
|
||||
_ENDSTOP_HIT(AXIS, MINMAX); \
|
||||
stepper.endstop_triggered(_AXIS(AXIS)); \
|
||||
} \
|
||||
} while(0)
|
||||
}while(0)
|
||||
|
||||
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
|
||||
// If G38 command is active check Z_MIN_PROBE for ALL movement
|
||||
if (G38_move) {
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
||||
if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
|
||||
if (stepper.current_block->steps[_AXIS(X)] > 0) { _ENDSTOP_HIT(X); stepper.endstop_triggered(_AXIS(X)); }
|
||||
else if (stepper.current_block->steps[_AXIS(Y)] > 0) { _ENDSTOP_HIT(Y); stepper.endstop_triggered(_AXIS(Y)); }
|
||||
else if (stepper.current_block->steps[_AXIS(Z)] > 0) { _ENDSTOP_HIT(Z); stepper.endstop_triggered(_AXIS(Z)); }
|
||||
if (stepper.current_block->steps[_AXIS(X)] > 0) { _ENDSTOP_HIT(X, MIN); stepper.endstop_triggered(_AXIS(X)); }
|
||||
else if (stepper.current_block->steps[_AXIS(Y)] > 0) { _ENDSTOP_HIT(Y, MIN); stepper.endstop_triggered(_AXIS(Y)); }
|
||||
else if (stepper.current_block->steps[_AXIS(Z)] > 0) { _ENDSTOP_HIT(Z, MIN); stepper.endstop_triggered(_AXIS(Z)); }
|
||||
G38_endstop_hit = true;
|
||||
}
|
||||
}
|
||||
@@ -364,18 +414,36 @@ void Endstops::update() {
|
||||
/**
|
||||
* Check and update endstops according to conditions
|
||||
*/
|
||||
|
||||
if (X_MOVE_TEST) {
|
||||
if (stepper.motor_direction(X_AXIS_HEAD)) {
|
||||
if (X_MIN_TEST) { // -direction
|
||||
#if HAS_X_MIN
|
||||
UPDATE_ENDSTOP(X, MIN);
|
||||
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
|
||||
#if HAS_X_MIN
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
UPDATE_ENDSTOP_BIT(X, MIN);
|
||||
#if HAS_X2_MIN
|
||||
UPDATE_ENDSTOP_BIT(X2, MIN);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, X_MIN, X2_MIN);
|
||||
#endif
|
||||
test_dual_x_endstops(X_MIN, X2_MIN);
|
||||
#else
|
||||
if (X_MIN_TEST) UPDATE_ENDSTOP(X, MIN);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (X_MAX_TEST) { // +direction
|
||||
else { // +direction
|
||||
#if HAS_X_MAX
|
||||
UPDATE_ENDSTOP(X, MAX);
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
UPDATE_ENDSTOP_BIT(X, MAX);
|
||||
#if HAS_X2_MAX
|
||||
UPDATE_ENDSTOP_BIT(X2, MAX);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, X_MAX, X2_MAX);
|
||||
#endif
|
||||
test_dual_x_endstops(X_MAX, X2_MAX);
|
||||
#else
|
||||
if (X_MIN_TEST) UPDATE_ENDSTOP(X, MAX);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -383,12 +451,32 @@ void Endstops::update() {
|
||||
if (Y_MOVE_TEST) {
|
||||
if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
|
||||
#if HAS_Y_MIN
|
||||
UPDATE_ENDSTOP(Y, MIN);
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
UPDATE_ENDSTOP_BIT(Y, MIN);
|
||||
#if HAS_Y2_MIN
|
||||
UPDATE_ENDSTOP_BIT(Y2, MIN);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, Y_MIN, Y2_MIN);
|
||||
#endif
|
||||
test_dual_y_endstops(Y_MIN, Y2_MIN);
|
||||
#else
|
||||
UPDATE_ENDSTOP(Y, MIN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else { // +direction
|
||||
#if HAS_Y_MAX
|
||||
UPDATE_ENDSTOP(Y, MAX);
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
UPDATE_ENDSTOP_BIT(Y, MAX);
|
||||
#if HAS_Y2_MAX
|
||||
UPDATE_ENDSTOP_BIT(Y2, MAX);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, Y_MAX, Y2_MAX);
|
||||
#endif
|
||||
test_dual_y_endstops(Y_MAX, Y2_MAX);
|
||||
#else
|
||||
UPDATE_ENDSTOP(Y, MAX);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -397,27 +485,21 @@ void Endstops::update() {
|
||||
if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
|
||||
#if HAS_Z_MIN
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
UPDATE_ENDSTOP_BIT(Z, MIN);
|
||||
#if HAS_Z2_MIN
|
||||
UPDATE_ENDSTOP_BIT(Z2, MIN);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
|
||||
#endif
|
||||
|
||||
test_dual_z_endstops(Z_MIN, Z2_MIN);
|
||||
|
||||
#else // !Z_DUAL_ENDSTOPS
|
||||
|
||||
#else
|
||||
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
|
||||
#else
|
||||
UPDATE_ENDSTOP(Z, MIN);
|
||||
#endif
|
||||
|
||||
#endif // !Z_DUAL_ENDSTOPS
|
||||
|
||||
#endif // HAS_Z_MIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// When closing the gap check the enabled probe
|
||||
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
||||
@@ -429,27 +511,21 @@ void Endstops::update() {
|
||||
}
|
||||
else { // Z +direction. Gantry up, bed down.
|
||||
#if HAS_Z_MAX
|
||||
|
||||
// Check both Z dual endstops
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
|
||||
UPDATE_ENDSTOP_BIT(Z, MAX);
|
||||
#if HAS_Z2_MAX
|
||||
UPDATE_ENDSTOP_BIT(Z2, MAX);
|
||||
#else
|
||||
COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
|
||||
#endif
|
||||
|
||||
test_dual_z_endstops(Z_MAX, Z2_MAX);
|
||||
|
||||
// If this pin is not hijacked for the bed probe
|
||||
// then it belongs to the Z endstop
|
||||
#elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
|
||||
|
||||
UPDATE_ENDSTOP(Z, MAX);
|
||||
|
||||
#endif // !Z_MIN_PROBE_PIN...
|
||||
#endif // Z_MAX_PIN
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-2
@@ -28,6 +28,7 @@
|
||||
#define ENDSTOPS_H
|
||||
|
||||
#include "enum.h"
|
||||
#include "MarlinConfig.h"
|
||||
|
||||
class Endstops {
|
||||
|
||||
@@ -36,14 +37,22 @@ class Endstops {
|
||||
static bool enabled, enabled_globally;
|
||||
static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||
static uint16_t
|
||||
#else
|
||||
static byte
|
||||
#endif
|
||||
current_endstop_bits, old_endstop_bits;
|
||||
|
||||
Endstops() {};
|
||||
Endstops() {
|
||||
enable_globally(
|
||||
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize the endstop pins
|
||||
@@ -85,6 +94,12 @@ class Endstops {
|
||||
|
||||
private:
|
||||
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
static void test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2);
|
||||
#endif
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
static void test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2);
|
||||
#endif
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
|
||||
#endif
|
||||
|
||||
+38
-17
@@ -34,23 +34,29 @@
|
||||
* between X_AXIS and X Head movement, like CoreXY bots
|
||||
*/
|
||||
enum AxisEnum {
|
||||
NO_AXIS = -1,
|
||||
X_AXIS = 0,
|
||||
A_AXIS = 0,
|
||||
Y_AXIS = 1,
|
||||
B_AXIS = 1,
|
||||
Z_AXIS = 2,
|
||||
C_AXIS = 2,
|
||||
E_AXIS = 3,
|
||||
X_HEAD = 4,
|
||||
Y_HEAD = 5,
|
||||
Z_HEAD = 6,
|
||||
ALL_AXES = 100
|
||||
NO_AXIS = -1,
|
||||
X_AXIS = 0,
|
||||
A_AXIS = 0,
|
||||
Y_AXIS = 1,
|
||||
B_AXIS = 1,
|
||||
Z_AXIS = 2,
|
||||
C_AXIS = 2,
|
||||
E_AXIS = 3,
|
||||
X_HEAD = 4,
|
||||
Y_HEAD = 5,
|
||||
Z_HEAD = 6,
|
||||
ALL_AXES = 100
|
||||
};
|
||||
|
||||
#define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
|
||||
#define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
|
||||
#define LOOP_XYZE_N(VAR) for (uint8_t VAR=X_AXIS; VAR<XYZE_N; VAR++)
|
||||
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
|
||||
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
|
||||
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
|
||||
#define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
|
||||
|
||||
#define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
|
||||
#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
|
||||
#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
|
||||
#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
|
||||
|
||||
typedef enum {
|
||||
LINEARUNIT_MM,
|
||||
@@ -87,6 +93,10 @@ enum EndstopEnum {
|
||||
X_MAX,
|
||||
Y_MAX,
|
||||
Z_MAX,
|
||||
X2_MIN,
|
||||
X2_MAX,
|
||||
Y2_MIN,
|
||||
Y2_MAX,
|
||||
Z2_MIN,
|
||||
Z2_MAX
|
||||
};
|
||||
@@ -161,12 +171,23 @@ enum LCDViewAction {
|
||||
LCDVIEW_CALL_NO_REDRAW
|
||||
};
|
||||
|
||||
/**
|
||||
* Dual X Carriage modes. A Dual Nozzle can also do duplication.
|
||||
*/
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
||||
enum DualXMode {
|
||||
DXC_FULL_CONTROL_MODE,
|
||||
DXC_AUTO_PARK_MODE,
|
||||
DXC_FULL_CONTROL_MODE, // DUAL_X_CARRIAGE only
|
||||
DXC_AUTO_PARK_MODE, // DUAL_X_CARRIAGE only
|
||||
DXC_DUPLICATION_MODE
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Workspace planes only apply to G2/G3 moves
|
||||
* (and "canned cycles" - not a current feature)
|
||||
*/
|
||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||
enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
|
||||
#endif
|
||||
|
||||
#endif // __ENUM_H__
|
||||
|
||||
+312
-123
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -74,7 +74,7 @@
|
||||
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||
// build by the user have been successfully uploaded into firmware.
|
||||
#define STRING_CONFIG_H_AUTHOR "(Aleph Objects, Inc, TAZ config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(Aleph Objects Inc, TAZ)" // Who made the changes.
|
||||
#define SHOW_BOOTSCREEN
|
||||
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
|
||||
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -288,6 +329,7 @@
|
||||
#define HEATER_1_MAXTEMP 250
|
||||
#define HEATER_2_MAXTEMP 250
|
||||
#define HEATER_3_MAXTEMP 250
|
||||
#define HEATER_4_MAXTEMP 250
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
//===========================================================================
|
||||
@@ -297,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 70 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX 74 // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -308,7 +351,6 @@
|
||||
// Set/get with gcode: M301 E[extruder number, 0-2]
|
||||
#define PID_FUNCTIONAL_RANGE 16 // 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.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
// Buda 2.0 on 24V
|
||||
@@ -409,12 +451,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -459,13 +502,13 @@
|
||||
|
||||
#if DISABLED(ENDSTOPPULLUPS)
|
||||
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
|
||||
#define ENDSTOPPULLUP_XMAX
|
||||
#define ENDSTOPPULLUP_YMAX
|
||||
#define ENDSTOPPULLUP_ZMAX
|
||||
#define ENDSTOPPULLUP_XMIN
|
||||
#define ENDSTOPPULLUP_YMIN
|
||||
#define ENDSTOPPULLUP_ZMIN
|
||||
#define ENDSTOPPULLUP_ZMIN_PROBE
|
||||
//#define ENDSTOPPULLUP_XMAX
|
||||
//#define ENDSTOPPULLUP_YMAX
|
||||
//#define ENDSTOPPULLUP_ZMAX
|
||||
//#define ENDSTOPPULLUP_XMIN
|
||||
//#define ENDSTOPPULLUP_YMIN
|
||||
//#define ENDSTOPPULLUP_ZMIN
|
||||
//#define ENDSTOPPULLUP_ZMIN_PROBE
|
||||
#endif
|
||||
|
||||
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
|
||||
@@ -545,7 +588,7 @@
|
||||
*/
|
||||
#define DEFAULT_XJERK 8.0
|
||||
#define DEFAULT_YJERK 8.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 10.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -554,7 +597,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -584,7 +627,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -621,14 +663,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -667,14 +710,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -741,6 +786,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -752,18 +799,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 298
|
||||
#define Y_BED_SIZE 275
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 298
|
||||
#define Y_MAX_POS 275
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 250
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -783,7 +854,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -809,12 +880,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -841,6 +907,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -896,17 +980,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -933,6 +1021,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -959,17 +1050,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (8*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -983,13 +1132,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -999,11 +1145,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1027,7 +1174,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1042,6 +1189,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1148,10 +1297,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1173,7 +1323,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1279,8 +1429,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1299,12 +1449,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1387,6 +1531,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1403,6 +1570,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1455,6 +1625,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1493,12 +1698,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1508,16 +1716,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1525,6 +1739,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1536,68 +1761,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
+501
-181
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
This is an example configuration for the CL-260 Ultimaker 2 clone.
|
||||
Change Z_MAX_POS to 300 for the CL-260MAX.
|
||||
|
||||
(The printer is available on AliExpress; be aware that this is not a beginner's
|
||||
printer -- it needs tweaking and some parts replaced before being decent.)
|
||||
|
||||
The printer comes with a quite old Marlin, the sources are available here:
|
||||
http://www.thingiverse.com/thing:1635830/ and I recommend replacing them.
|
||||
|
||||
The setting "works" for my printer and the extruder using my calibration value.
|
||||
You might want to tweak some settings, e.g enable EEPROM, increase default Z speed, adjust homing speeds,...
|
||||
|
||||
Have fun!
|
||||
--
|
||||
tobi
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+306
-117
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -138,14 +139,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -156,6 +182,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -291,6 +332,7 @@
|
||||
#define HEATER_1_MAXTEMP 260
|
||||
#define HEATER_2_MAXTEMP 260
|
||||
#define HEATER_3_MAXTEMP 260
|
||||
#define HEATER_4_MAXTEMP 260
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
//===========================================================================
|
||||
@@ -300,8 +342,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -311,7 +354,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// Hephestos i3
|
||||
#define DEFAULT_Kp 23.05
|
||||
@@ -380,12 +422,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -502,7 +545,7 @@
|
||||
* M204 R Retract Acceleration
|
||||
* M204 T Travel Acceleration
|
||||
*/
|
||||
#define DEFAULT_ACCELERATION 650 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_ACCELERATION 650 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts
|
||||
#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves
|
||||
|
||||
@@ -516,7 +559,7 @@
|
||||
*/
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -525,7 +568,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -555,7 +598,6 @@
|
||||
*
|
||||
*/
|
||||
#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -592,14 +634,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -638,14 +681,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -712,6 +757,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -723,18 +770,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 215
|
||||
#define Y_BED_SIZE 210
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 215
|
||||
#define Y_MAX_POS 210
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 180
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -754,7 +825,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -780,12 +851,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -812,6 +878,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -867,17 +951,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -904,6 +992,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -930,17 +1021,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY 2000
|
||||
#define HOMING_FEEDRATE_Z 150
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -954,13 +1103,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -970,11 +1116,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -998,7 +1145,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1013,6 +1160,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1119,12 +1268,13 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
//#define LCD_LANGUAGE en
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
/**
|
||||
* LCD Character Set
|
||||
@@ -1144,7 +1294,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1250,8 +1400,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1270,12 +1420,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1358,6 +1502,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1374,6 +1541,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1426,6 +1596,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1464,12 +1669,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1479,16 +1687,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1496,6 +1710,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1507,68 +1732,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
+501
-181
File diff suppressed because it is too large
Load Diff
+347
-151
@@ -20,24 +20,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration.h
|
||||
*
|
||||
* Basic settings such as:
|
||||
*
|
||||
* - Type of electronics
|
||||
* - Type of temperature sensor
|
||||
* - Printer geometry
|
||||
* - Endstop configuration
|
||||
* - LCD controller
|
||||
* - Extra features
|
||||
*
|
||||
* Advanced settings can be found in Configuration_adv.h
|
||||
*
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//================================= README ==================================
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* BQ Hephestos 2 Configuration
|
||||
*
|
||||
* This configuration supports the standard Hephestos 2 with or without the
|
||||
* heated bed kit featured at https://store.bq.com/en/heated-bed-kit-hephestos2
|
||||
*
|
||||
* Enable the following option to activate all functionality related to the heated bed.
|
||||
*/
|
||||
//#define HEPHESTOS2_HEATED_BED_KIT
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +57,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +106,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -135,14 +135,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +178,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -250,7 +290,13 @@
|
||||
#define TEMP_SENSOR_2 0
|
||||
#define TEMP_SENSOR_3 0
|
||||
#define TEMP_SENSOR_4 0
|
||||
#define TEMP_SENSOR_BED 0
|
||||
|
||||
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
|
||||
#define TEMP_SENSOR_BED 70
|
||||
#define HEATER_BED_INVERTING true
|
||||
#else
|
||||
#define TEMP_SENSOR_BED 0
|
||||
#endif
|
||||
|
||||
// Dummy thermistor constant temperature readings, for use with 998 and 999
|
||||
#define DUMMY_THERMISTOR_998_VALUE 25
|
||||
@@ -274,7 +320,7 @@
|
||||
// The minimal temperature defines the temperature below which the heater will not be enabled It is used
|
||||
// to check that the wiring to the thermistor is not broken.
|
||||
// Otherwise this would lead to the heater being powered on all the time.
|
||||
#define HEATER_0_MINTEMP 15
|
||||
#define HEATER_0_MINTEMP 5
|
||||
#define HEATER_1_MINTEMP 5
|
||||
#define HEATER_2_MINTEMP 5
|
||||
#define HEATER_3_MINTEMP 5
|
||||
@@ -284,12 +330,12 @@
|
||||
// When temperature exceeds max temp, your heater will be switched off.
|
||||
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
|
||||
// You should use MINTEMP for thermistor short/failure protection.
|
||||
#define HEATER_0_MAXTEMP 250
|
||||
#define HEATER_0_MAXTEMP 275
|
||||
#define HEATER_1_MAXTEMP 275
|
||||
#define HEATER_2_MAXTEMP 275
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define HEATER_4_MAXTEMP 275
|
||||
#define BED_MAXTEMP 150
|
||||
#define BED_MAXTEMP 110
|
||||
|
||||
//===========================================================================
|
||||
//============================= PID Settings ================================
|
||||
@@ -298,8 +344,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +356,6 @@
|
||||
// Set/get with gcode: M301 E[extruder number, 0-2]
|
||||
#define PID_FUNCTIONAL_RANGE 50 // 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.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// Tuned PID values using M303
|
||||
#define DEFAULT_Kp 19.18
|
||||
@@ -343,7 +389,10 @@
|
||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||
//#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
|
||||
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
|
||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
#endif
|
||||
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
|
||||
@@ -383,19 +432,20 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
*/
|
||||
|
||||
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
|
||||
//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
|
||||
|
||||
//===========================================================================
|
||||
//============================= Mechanical Settings =========================
|
||||
@@ -480,14 +530,14 @@
|
||||
* Override with M92
|
||||
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
|
||||
*/
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 204 }
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 210.02 }
|
||||
|
||||
/**
|
||||
* Default Max Feed Rate (mm/s)
|
||||
* Override with M203
|
||||
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
|
||||
*/
|
||||
#define DEFAULT_MAX_FEEDRATE { 250, 250, 2, 200 }
|
||||
#define DEFAULT_MAX_FEEDRATE { 167, 167, 3.3, 167 }
|
||||
|
||||
/**
|
||||
* Default Max Acceleration (change/s) change = mm/s
|
||||
@@ -495,7 +545,7 @@
|
||||
* Override with M201
|
||||
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
|
||||
*/
|
||||
#define DEFAULT_MAX_ACCELERATION { 800, 800, 20, 1000 }
|
||||
#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 3000 }
|
||||
|
||||
/**
|
||||
* Default Acceleration (change/s) change = mm/s
|
||||
@@ -505,8 +555,8 @@
|
||||
* M204 R Retract Acceleration
|
||||
* M204 T Travel Acceleration
|
||||
*/
|
||||
#define DEFAULT_ACCELERATION 800 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts
|
||||
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
|
||||
#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves
|
||||
|
||||
/**
|
||||
@@ -519,7 +569,7 @@
|
||||
*/
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 1.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -528,7 +578,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -558,7 +608,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -595,14 +644,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -636,19 +686,21 @@
|
||||
*/
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER 34 // X offset: -left +right [of the nozzle]
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // Y offset: -front +behind [the nozzle]
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
|
||||
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -672,7 +724,7 @@
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 0
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
//#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
// :{ 0:'Low', 1:'High' }
|
||||
@@ -715,6 +767,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
#define Z_HOMING_HEIGHT 5 // (in 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.
|
||||
|
||||
@@ -726,18 +780,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 210
|
||||
#define Y_BED_SIZE 297
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 210
|
||||
#define Y_MAX_POS 297
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 210
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -757,7 +835,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -783,12 +861,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -799,7 +872,7 @@
|
||||
*/
|
||||
//#define AUTO_BED_LEVELING_3POINT
|
||||
//#define AUTO_BED_LEVELING_LINEAR
|
||||
//#define AUTO_BED_LEVELING_BILINEAR
|
||||
#define AUTO_BED_LEVELING_BILINEAR
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
//#define MESH_BED_LEVELING
|
||||
|
||||
@@ -815,18 +888,36 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
// Set the number of grid points per dimension.
|
||||
#define GRID_MAX_POINTS_X 3
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define GRID_MAX_POINTS_Y 4
|
||||
|
||||
// Set the boundaries for probing (where the probe can reach).
|
||||
#define LEFT_PROBE_BED_POSITION X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
|
||||
#define LEFT_PROBE_BED_POSITION X_MIN_POS + (X_PROBE_OFFSET_FROM_EXTRUDER)
|
||||
#define RIGHT_PROBE_BED_POSITION X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
|
||||
#define FRONT_PROBE_BED_POSITION Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
|
||||
#define FRONT_PROBE_BED_POSITION Y_MIN_POS + (Y_PROBE_OFFSET_FROM_EXTRUDER)
|
||||
#define BACK_PROBE_BED_POSITION Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
|
||||
|
||||
// The Z probe minimum outer margin (to validate G29 parameters).
|
||||
@@ -870,17 +961,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -907,6 +1002,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -933,17 +1031,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (60*60)
|
||||
#define HOMING_FEEDRATE_Z 120
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -957,13 +1113,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -973,11 +1126,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 10 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -992,16 +1146,16 @@
|
||||
// @section temperature
|
||||
|
||||
// Preheat Constants
|
||||
#define PREHEAT_1_TEMP_HOTEND 210
|
||||
#define PREHEAT_1_TEMP_BED 70
|
||||
#define PREHEAT_1_TEMP_HOTEND 205
|
||||
#define PREHEAT_1_TEMP_BED 50
|
||||
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
#define PREHEAT_2_TEMP_HOTEND 240
|
||||
#define PREHEAT_2_TEMP_BED 110
|
||||
#define PREHEAT_2_TEMP_HOTEND 245
|
||||
#define PREHEAT_2_TEMP_BED 50
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1016,6 +1170,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 10 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1122,10 +1278,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1147,7 +1304,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1253,8 +1410,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1273,12 +1430,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1361,6 +1512,29 @@
|
||||
//
|
||||
#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1377,6 +1551,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1429,6 +1606,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1467,12 +1679,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1482,16 +1697,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1499,6 +1720,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1510,68 +1742,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 2.00 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.60 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
+524
-188
File diff suppressed because it is too large
Load Diff
+7
@@ -5,11 +5,18 @@ NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will ch
|
||||
|
||||
## Changelog
|
||||
* 2016/03/01 - Initial release
|
||||
|
||||
* 2016/03/21 - Activated 4-point auto leveling by default
|
||||
Updated miscellaneous z-probe values
|
||||
|
||||
* 2016/06/21 - Disabled hot bed related options
|
||||
Activated software endstops
|
||||
SD printing now disables the heater when finished
|
||||
|
||||
* 2016/07/13 - Update the `DEFAULT_AXIS_STEPS_PER_UNIT` for the Z axis
|
||||
Increased the `DEFAULT_XYJERK`
|
||||
|
||||
* 2016/12/13 - Configuration updated.
|
||||
|
||||
* 2017/07/06 - Configuration updated to the latest Marlin version.
|
||||
Added support for the official BQ heated bed kit.
|
||||
+305
-116
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -138,14 +139,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -156,6 +182,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -291,6 +332,7 @@
|
||||
#define HEATER_1_MAXTEMP 260
|
||||
#define HEATER_2_MAXTEMP 260
|
||||
#define HEATER_3_MAXTEMP 260
|
||||
#define HEATER_4_MAXTEMP 260
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
//===========================================================================
|
||||
@@ -300,8 +342,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -311,7 +354,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// Witbox
|
||||
#define DEFAULT_Kp 22.2
|
||||
@@ -380,12 +422,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -516,7 +559,7 @@
|
||||
*/
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -525,7 +568,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -555,7 +598,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -592,14 +634,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -638,14 +681,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -712,6 +757,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -723,18 +770,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 297
|
||||
#define Y_BED_SIZE 210
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 297
|
||||
#define Y_MAX_POS 210
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -754,7 +825,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -780,12 +851,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -812,6 +878,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -867,17 +951,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -904,6 +992,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -930,17 +1021,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (120*60)
|
||||
#define HOMING_FEEDRATE_Z 432
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -954,13 +1103,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -970,11 +1116,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -998,7 +1145,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1013,6 +1160,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1119,12 +1268,13 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
//#define LCD_LANGUAGE en
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
/**
|
||||
* LCD Character Set
|
||||
@@ -1144,7 +1294,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1250,8 +1400,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1270,12 +1420,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1358,6 +1502,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1374,6 +1541,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1426,6 +1596,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1464,12 +1669,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1479,16 +1687,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1496,6 +1710,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1507,68 +1732,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
+501
-181
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -136,14 +137,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 3
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -154,6 +180,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -289,6 +330,7 @@
|
||||
#define HEATER_1_MAXTEMP 415
|
||||
#define HEATER_2_MAXTEMP 415
|
||||
#define HEATER_3_MAXTEMP 415
|
||||
#define HEATER_4_MAXTEMP 415
|
||||
#define BED_MAXTEMP 165
|
||||
|
||||
//===========================================================================
|
||||
@@ -298,8 +340,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +352,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -388,12 +430,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -524,7 +567,7 @@
|
||||
*/
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -533,7 +576,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -563,7 +606,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -600,14 +642,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -646,14 +689,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -720,6 +765,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -731,18 +778,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 435
|
||||
#define Y_BED_SIZE 270
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 435
|
||||
#define Y_MAX_POS 270
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 400
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -762,7 +833,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -788,12 +859,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -820,6 +886,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -875,17 +959,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -912,6 +1000,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -938,17 +1029,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (10*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -962,13 +1111,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -978,11 +1124,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1006,7 +1153,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1021,6 +1168,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1127,10 +1276,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1152,7 +1302,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1278,12 +1428,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1366,6 +1510,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1382,6 +1549,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1434,6 +1604,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1472,12 +1677,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1487,16 +1695,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1504,6 +1718,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1515,68 +1740,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1782
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+100
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tongue-in-cheek placeholder for a more Marlin-specific bitmap
|
||||
* The joke is that every "CR-10" has different branding!
|
||||
* Made using The Gimp and...
|
||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
*/
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 54
|
||||
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
|
||||
|
||||
const unsigned char custom_start_bmp[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x01, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3F, 0xF8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0F, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x0F, 0xF0,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0xF8,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
|
||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
|
||||
0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
|
||||
0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00,
|
||||
0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x7F, 0xFC, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x1F, 0x80, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFE, 0x3F, 0xF8,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
|
||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
|
||||
0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xC0,
|
||||
0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFE, 0x00,
|
||||
0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00,
|
||||
0x00, 0x00, 0x07, 0xFF, 0xFC, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00
|
||||
};
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -74,7 +74,7 @@
|
||||
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||
// build by the user have been successfully uploaded into firmware.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, Felix)" // Who made the changes.
|
||||
#define SHOW_BOOTSCREEN
|
||||
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
|
||||
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -298,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +351,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// Felix 2.0+ electronics with v4 Hotend
|
||||
#define DEFAULT_Kp 12
|
||||
@@ -371,12 +412,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -517,7 +559,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -547,7 +589,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -584,14 +625,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -630,14 +672,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -704,29 +748,55 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
// Direction of endstops when homing; 1=MAX, -1=MIN
|
||||
// :[-1, 1]
|
||||
// :[-1,1]
|
||||
#define X_HOME_DIR -1
|
||||
#define Y_HOME_DIR -1
|
||||
#define Z_HOME_DIR -1
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 255
|
||||
#define Y_BED_SIZE 205
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 255
|
||||
#define Y_MAX_POS 205
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 235
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -746,7 +816,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -772,12 +842,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -804,6 +869,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -859,17 +942,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -896,6 +983,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -922,17 +1012,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -946,13 +1094,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -962,11 +1107,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -990,7 +1136,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1005,6 +1151,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1111,12 +1259,13 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
//#define LCD_LANGUAGE en
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
/**
|
||||
* LCD Character Set
|
||||
@@ -1136,7 +1285,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1242,8 +1391,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1262,12 +1411,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1350,6 +1493,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1366,6 +1532,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1418,6 +1587,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1456,12 +1660,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1471,16 +1678,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1488,6 +1701,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1499,68 +1723,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -74,7 +74,7 @@
|
||||
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||
// build by the user have been successfully uploaded into firmware.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, Felix/DUAL)" // Who made the changes.
|
||||
#define SHOW_BOOTSCREEN
|
||||
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
|
||||
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 2
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -298,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +351,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// Felix 2.0+ electronics with v4 Hotend
|
||||
#define DEFAULT_Kp 12
|
||||
@@ -371,12 +412,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -517,7 +559,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -547,7 +589,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -584,14 +625,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -630,14 +672,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -704,6 +748,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -715,18 +761,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 255
|
||||
#define Y_BED_SIZE 205
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 255
|
||||
#define Y_MAX_POS 205
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 235
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -746,7 +816,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -772,12 +842,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -804,6 +869,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -859,17 +942,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -896,6 +983,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -922,17 +1012,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -946,13 +1094,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -962,11 +1107,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -990,7 +1136,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1005,6 +1151,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1111,12 +1259,13 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
//#define LCD_LANGUAGE en
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
/**
|
||||
* LCD Character Set
|
||||
@@ -1136,7 +1285,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1242,8 +1391,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1262,12 +1411,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1350,6 +1493,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1366,6 +1532,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1418,6 +1587,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1456,12 +1660,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1471,16 +1678,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1488,6 +1701,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1499,68 +1723,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
+311
-122
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/delta directory.
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -298,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +351,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -395,12 +436,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -529,19 +571,18 @@
|
||||
* When changing speed and direction, if the difference is less than the
|
||||
* value set here, it may happen instantaneously.
|
||||
*/
|
||||
#define DEFAULT_XJERK 17.0
|
||||
#define DEFAULT_YJERK 17.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_XJERK 8.5
|
||||
#define DEFAULT_YJERK 8.5
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 4.0
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//============================= Z Probe Options =============================
|
||||
//===========================================================================
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -571,7 +612,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -608,14 +648,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -649,18 +690,20 @@
|
||||
*/
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER 38 // X offset: -left +right [of the nozzle]
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -7 // Y offset: -front +behind [the nozzle]
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.1 // Z offset: -below +above [the nozzle]
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER -10.4 // Z offset: -below +above [the nozzle]
|
||||
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 7500
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -679,7 +722,8 @@
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 3 // Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
|
||||
|
||||
// For M851 give a range for adjusting the Z probe offset#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||
// For M851 give a range for adjusting the Z probe offset
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
@@ -725,6 +769,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
#define Z_HOMING_HEIGHT 2 // (in 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.
|
||||
|
||||
@@ -736,17 +782,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 207
|
||||
#define Y_BED_SIZE 182
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 6
|
||||
#define Y_MIN_POS 3
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 207
|
||||
#define Y_MAX_POS 182
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 175
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
//#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -766,7 +837,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -792,12 +863,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -824,6 +890,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -881,17 +965,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y 10
|
||||
#define UBL_PROBE_PT_1_X 45 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 170 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 45 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 170
|
||||
#define UBL_PROBE_PT_2_X 45
|
||||
#define UBL_PROBE_PT_2_Y 25
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 25
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -918,6 +1006,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -944,17 +1035,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (40*60)
|
||||
#define HOMING_FEEDRATE_Z (55)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -968,13 +1117,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -984,11 +1130,12 @@
|
||||
//
|
||||
//#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1012,7 +1159,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1022,11 +1169,13 @@
|
||||
* P1 Raise the nozzle always to Z-park height.
|
||||
* P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
|
||||
*/
|
||||
//#define NOZZLE_PARK_FEATURE
|
||||
#define NOZZLE_PARK_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1133,10 +1282,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1158,7 +1308,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1264,8 +1414,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1284,12 +1434,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1372,6 +1516,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1388,6 +1555,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1440,6 +1610,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1478,12 +1683,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1493,16 +1701,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1510,6 +1724,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1521,68 +1746,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
#define NUM_SERVOS 2 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 500
|
||||
#define SERVO_DELAY { 500, 500 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
+498
-191
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+310
-121
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -63,15 +63,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Delta printer replace the configuration files with the files in the
|
||||
// example_configurations/delta directory.
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -112,8 +112,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -140,14 +141,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -158,6 +184,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -286,6 +327,7 @@
|
||||
#define HEATER_1_MINTEMP 5
|
||||
#define HEATER_2_MINTEMP 5
|
||||
#define HEATER_3_MINTEMP 5
|
||||
#define HEATER_4_MINTEMP 5
|
||||
#define BED_MINTEMP 5
|
||||
|
||||
// When temperature exceeds max temp, your heater will be switched off.
|
||||
@@ -295,6 +337,7 @@
|
||||
#define HEATER_1_MAXTEMP 275
|
||||
#define HEATER_2_MAXTEMP 275
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define HEATER_4_MAXTEMP 275
|
||||
#define BED_MAXTEMP 150
|
||||
|
||||
//===========================================================================
|
||||
@@ -304,8 +347,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -315,7 +359,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -396,12 +439,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -542,11 +586,10 @@
|
||||
* When changing speed and direction, if the difference is less than the
|
||||
* value set here, it may happen instantaneously.
|
||||
*/
|
||||
#define DEFAULT_XJERK 8.0
|
||||
#define DEFAULT_YJERK 8.0
|
||||
#define DEFAULT_ZJERK 0.40
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
#define DEFAULT_XJERK 8.0
|
||||
#define DEFAULT_YJERK 8.0
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
//============================= Z Probe Options =============================
|
||||
@@ -554,7 +597,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -584,13 +627,12 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
*
|
||||
* Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
|
||||
* You must activate one of these to use Auto Bed Leveling below.
|
||||
* Activate one of these to use Auto Bed Leveling below.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -621,14 +663,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -671,14 +714,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
//#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
//#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
//#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -745,6 +790,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -756,18 +803,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 200
|
||||
#define Y_BED_SIZE 200
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 200
|
||||
#define Y_MAX_POS 200
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 180
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -787,7 +858,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -813,12 +884,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -849,6 +915,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -904,17 +988,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -941,6 +1029,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -967,17 +1058,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -991,13 +1140,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -1007,11 +1153,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1035,7 +1182,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1050,6 +1197,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1156,10 +1305,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1181,7 +1331,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1287,8 +1437,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1307,12 +1457,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1395,6 +1539,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1411,6 +1578,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1463,6 +1633,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1501,12 +1706,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1516,16 +1724,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1533,6 +1747,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1544,68 +1769,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
# Micromake C1
|
||||
|
||||
### In the folder "basic"
|
||||
Configuration files for Micromake C1 without mods
|
||||
- English LCD 2X16 Characters
|
||||
- Motors 16 STEPS
|
||||
- No heated bed
|
||||
- No probe, etc.
|
||||
- Like a standard C1 as shipped by Micromake.
|
||||
|
||||
### In the folder "enhanced"
|
||||
Configuration files for Micromake C1 with…
|
||||
- 128 STEPS configured with jumper on the motherboard (all open for 128 Steps).
|
||||
- Capacitive Probe (Adjust offsets at your convenience)
|
||||
- French language with no accents for Japanese LCD.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
|
||||
@@ -135,14 +136,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -153,6 +179,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -298,8 +339,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -309,7 +351,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -390,12 +431,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -524,9 +566,9 @@
|
||||
* When changing speed and direction, if the difference is less than the
|
||||
* value set here, it may happen instantaneously.
|
||||
*/
|
||||
#define DEFAULT_XJERK 20.0
|
||||
#define DEFAULT_YJERK 20.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
@@ -535,7 +577,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -565,7 +607,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -602,14 +643,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -648,14 +690,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -722,6 +766,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -733,18 +779,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 200
|
||||
#define Y_BED_SIZE 200
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 200
|
||||
#define Y_MAX_POS 200
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -764,7 +834,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -790,12 +860,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -822,6 +887,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -877,17 +960,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -914,6 +1001,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -940,17 +1030,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -964,13 +1112,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
//#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -980,11 +1125,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1008,7 +1154,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1023,6 +1169,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1129,10 +1277,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1154,7 +1303,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1260,8 +1409,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1280,12 +1429,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1368,6 +1511,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1384,6 +1550,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1436,6 +1605,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1474,12 +1678,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1489,16 +1696,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1506,6 +1719,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1517,68 +1741,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
*/
|
||||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
#define CONFIGURATION_H_VERSION 010100
|
||||
#define CONFIGURATION_H_VERSION 010107
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -58,15 +58,15 @@
|
||||
//===========================================================================
|
||||
//============================= DELTA Printer ===============================
|
||||
//===========================================================================
|
||||
// For Delta printers start with one of the configuration files in the
|
||||
// For a Delta printer start with one of the configuration files in the
|
||||
// example_configurations/delta directory and customize for your machine.
|
||||
//
|
||||
|
||||
//===========================================================================
|
||||
//============================= SCARA Printer ===============================
|
||||
//===========================================================================
|
||||
// For a Scara printer replace the configuration files with the files in the
|
||||
// example_configurations/SCARA directory.
|
||||
// For a SCARA printer start with the configuration files in
|
||||
// example_configurations/SCARA and customize for your machine.
|
||||
//
|
||||
|
||||
// @section info
|
||||
@@ -74,7 +74,7 @@
|
||||
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
|
||||
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
|
||||
// build by the user have been successfully uploaded into firmware.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, RigidBot)" // Who made the changes.
|
||||
#define SHOW_BOOTSCREEN
|
||||
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
|
||||
#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
|
||||
@@ -107,8 +107,9 @@
|
||||
*
|
||||
* 250000 works in most cases, but you might try a lower speed if
|
||||
* you commonly experience drop-outs during host printing.
|
||||
* You may try up to 1000000 to speed up SD file transfer.
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
|
||||
@@ -138,14 +139,39 @@
|
||||
// :[1, 2, 3, 4, 5]
|
||||
#define EXTRUDERS 1 // Single extruder. Set to 2 for dual extruders
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
|
||||
|
||||
// For Cyclops or any "multi-extruder" that shares a single nozzle.
|
||||
//#define SINGLENOZZLE
|
||||
|
||||
/**
|
||||
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
|
||||
*
|
||||
* This device allows one stepper driver on a control board to drive
|
||||
* two to eight stepper motors, one at a time, in a manner suitable
|
||||
* for extruders.
|
||||
*
|
||||
* This option only allows the multiplexer to switch on tool-change.
|
||||
* Additional options to configure custom E moves are pending.
|
||||
*/
|
||||
//#define MK2_MULTIPLEXER
|
||||
#if ENABLED(MK2_MULTIPLEXER)
|
||||
// Override the default DIO selector pins here, if needed.
|
||||
// Some pins files may provide defaults for these pins.
|
||||
//#define E_MUX0_PIN 40 // Always Required
|
||||
//#define E_MUX1_PIN 42 // Needed for 3 to 8 steppers
|
||||
//#define E_MUX2_PIN 44 // Needed for 5 to 8 steppers
|
||||
#endif
|
||||
|
||||
// A dual extruder that uses a single stepper motor
|
||||
//#define SWITCHING_EXTRUDER
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#define SWITCHING_EXTRUDER_SERVO_NR 0
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
|
||||
#define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
|
||||
#if EXTRUDERS > 3
|
||||
#define SWITCHING_EXTRUDER_E23_SERVO_NR 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
|
||||
@@ -156,6 +182,21 @@
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Two separate X-carriages with extruders that connect to a moving part
|
||||
* via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
|
||||
*/
|
||||
//#define PARKING_EXTRUDER
|
||||
#if ENABLED(PARKING_EXTRUDER)
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
|
||||
#define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
|
||||
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
|
||||
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
|
||||
#define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
|
||||
#define HOTEND_OFFSET_Z { 0.0, 1.3 } // Z-offsets of the two hotends. The first must be 0.
|
||||
#endif
|
||||
|
||||
/**
|
||||
* "Mixing Extruder"
|
||||
* - Adds a new code, M165, to set the current mix factors.
|
||||
@@ -301,8 +342,9 @@
|
||||
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
|
||||
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
|
||||
#define PID_K1 0.95 // Smoothing factor within the PID
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
@@ -312,7 +354,6 @@
|
||||
// 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
|
||||
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
|
||||
#define K1 0.95 //smoothing factor within the PID
|
||||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
|
||||
@@ -386,12 +427,13 @@
|
||||
//===========================================================================
|
||||
|
||||
/**
|
||||
* Thermal Protection protects your printer from damage and fire if a
|
||||
* thermistor falls out or temperature sensors fail in any way.
|
||||
* Thermal Protection provides additional protection to your printer from damage
|
||||
* and fire. Marlin always includes safe min and max temperature ranges which
|
||||
* protect against a broken or disconnected thermistor wire.
|
||||
*
|
||||
* The issue: If a thermistor falls out or a temperature sensor fails,
|
||||
* Marlin can no longer sense the actual temperature. Since a disconnected
|
||||
* thermistor reads as a low temperature, the firmware will keep the heater on.
|
||||
* The issue: If a thermistor falls out, it will report the much lower
|
||||
* temperature of the air in the room, and the the firmware will keep
|
||||
* the heater on.
|
||||
*
|
||||
* If you get "Thermal Runaway" or "Heating failed" errors the
|
||||
* details can be tuned in Configuration_adv.h
|
||||
@@ -522,10 +564,10 @@
|
||||
* When changing speed and direction, if the difference is less than the
|
||||
* value set here, it may happen instantaneously.
|
||||
*/
|
||||
#define DEFAULT_XJERK 8.0
|
||||
#define DEFAULT_YJERK 8.0
|
||||
#define DEFAULT_ZJERK 0.4
|
||||
#define DEFAULT_EJERK 5.0
|
||||
#define DEFAULT_XJERK 8.0
|
||||
#define DEFAULT_YJERK 8.0
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
|
||||
//===========================================================================
|
||||
//============================= Z Probe Options =============================
|
||||
@@ -533,7 +575,7 @@
|
||||
// @section probes
|
||||
|
||||
//
|
||||
// See http://marlinfw.org/configuration/probes.html
|
||||
// See http://marlinfw.org/docs/configuration/probes.html
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -563,7 +605,6 @@
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_ENDSTOP
|
||||
//#define Z_MIN_PROBE_PIN Z_MAX_PIN
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -600,14 +641,15 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable if probing seems unreliable. Heaters and/or fans - consistent with the
|
||||
* options selected below - will be disabled during probing so as to minimize
|
||||
* potential EM interference by quieting/silencing the source of the 'noise' (the change
|
||||
* in current flowing through the wires). This is likely most useful to users of the
|
||||
* BLTouch probe, but may also help those with inductive or other probe types.
|
||||
* Enable one or more of the following if probing seems unreliable.
|
||||
* Heaters and/or fans can be disabled during probing to minimize electrical
|
||||
* noise. A delay can also be added to allow noise and vibration to settle.
|
||||
* These options are most useful for the BLTouch probe, but may also improve
|
||||
* readings with inductive probes and piezo sensors.
|
||||
*/
|
||||
//#define PROBING_HEATERS_OFF // Turn heaters off when probing
|
||||
//#define PROBING_FANS_OFF // Turn fans off when probing
|
||||
//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
|
||||
|
||||
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
|
||||
//#define SOLENOID_PROBE
|
||||
@@ -646,14 +688,16 @@
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
|
||||
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
|
||||
// Speed for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
|
||||
// Speed for the "accurate" probe of each point
|
||||
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
|
||||
|
||||
// Use double touch for probing
|
||||
//#define PROBE_DOUBLE_TOUCH
|
||||
// The number of probes to perform at each point.
|
||||
// Set to 2 for a fast/slow probe, using the second probe result.
|
||||
// Set to 3 or more for slow probes, averaging the results.
|
||||
//#define MULTIPLE_PROBING 2
|
||||
|
||||
/**
|
||||
* Z probes require clearance when deploying, stowing, and moving between
|
||||
@@ -720,6 +764,8 @@
|
||||
|
||||
// @section homing
|
||||
|
||||
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
|
||||
|
||||
//#define Z_HOMING_HEIGHT 4 // (in 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.
|
||||
|
||||
@@ -731,18 +777,42 @@
|
||||
|
||||
// @section machine
|
||||
|
||||
// Travel limits after homing (units are in mm)
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 254 // RigidBot regular is 254mm, RigitBot Big is 406mm
|
||||
#define Y_BED_SIZE 248 // RigidBot regular is 248mm, RigitBot Big is 304mm
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS 254 // RigidBot regular is 254mm, RigitBot Big is 406mm
|
||||
#define Y_MAX_POS 248 // RigidBot regular is 248mm, RigitBot Big is 304mm
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 254 // RigidBot regular and Big are 254mm
|
||||
|
||||
// If enabled, axes won't move below MIN_POS in response to movement commands.
|
||||
/**
|
||||
* Software Endstops
|
||||
*
|
||||
* - Prevent moves outside the set machine bounds.
|
||||
* - Individual axes can be disabled, if desired.
|
||||
* - X and Y only apply to Cartesian robots.
|
||||
* - Use 'M211' to set software endstops on/off or report current state
|
||||
*/
|
||||
|
||||
// Min software endstops curtail movement below minimum coordinate bounds
|
||||
#define MIN_SOFTWARE_ENDSTOPS
|
||||
// If enabled, axes won't move above MAX_POS in response to movement commands.
|
||||
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
|
||||
#define MIN_SOFTWARE_ENDSTOP_X
|
||||
#define MIN_SOFTWARE_ENDSTOP_Y
|
||||
#define MIN_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
// Max software endstops curtail movement above maximum coordinate bounds
|
||||
#define MAX_SOFTWARE_ENDSTOPS
|
||||
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
|
||||
#define MAX_SOFTWARE_ENDSTOP_X
|
||||
#define MAX_SOFTWARE_ENDSTOP_Y
|
||||
#define MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Filament Runout Sensor
|
||||
@@ -762,7 +832,7 @@
|
||||
//===========================================================================
|
||||
//=============================== Bed Leveling ==============================
|
||||
//===========================================================================
|
||||
// @section bedlevel
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Choose one of the options below to enable G29 Bed Leveling. The parameters
|
||||
@@ -788,12 +858,7 @@
|
||||
* - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
|
||||
* A comprehensive bed leveling system combining the features and benefits
|
||||
* of other systems. UBL also includes integrated Mesh Generation, Mesh
|
||||
* Validation and Mesh Editing systems. Currently, UBL is only checked out
|
||||
* for Cartesian Printers. That said, it was primarily designed to correct
|
||||
* poor quality Delta Printers. If you feel adventurous and have a Delta,
|
||||
* please post an issue if something doesn't work correctly. Initially,
|
||||
* you will need to set a reduced bed size so you have a rectangular area
|
||||
* to test on.
|
||||
* Validation and Mesh Editing systems.
|
||||
*
|
||||
* - MESH_BED_LEVELING
|
||||
* Probe a grid manually
|
||||
@@ -820,6 +885,24 @@
|
||||
// at which point movement will be level to the machine's XY plane.
|
||||
// The height can be set with M420 Z<height>
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
// For Cartesian machines, instead of dividing moves on mesh boundaries,
|
||||
// split up moves into short segments like a Delta. This follows the
|
||||
// contours of the bed more closely than edge-to-edge straight moves.
|
||||
#define SEGMENT_LEVELED_MOVES
|
||||
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
|
||||
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
|
||||
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
@@ -875,17 +958,21 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
#define UBL_MESH_INSET 1 // Mesh inset margin on print area
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // Mesh inset margin on print area
|
||||
#define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
#define UBL_PROBE_PT_1_X 39 // These set the probe locations for when UBL does a 3-Point leveling
|
||||
#define UBL_PROBE_PT_1_Y 180 // of the mesh.
|
||||
|
||||
#define UBL_PROBE_PT_1_X 39 // Probing points for 3-Point leveling of the mesh
|
||||
#define UBL_PROBE_PT_1_Y 180
|
||||
#define UBL_PROBE_PT_2_X 39
|
||||
#define UBL_PROBE_PT_2_Y 20
|
||||
#define UBL_PROBE_PT_3_X 180
|
||||
#define UBL_PROBE_PT_3_Y 20
|
||||
#define UBL_G26_MESH_VALIDATION // Enable G26 mesh validation
|
||||
|
||||
#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
|
||||
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
|
||||
@@ -912,6 +999,9 @@
|
||||
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
|
||||
#endif
|
||||
|
||||
// Add a menu item to move between bed corners for manual bed adjustment
|
||||
//#define LEVEL_BED_CORNERS
|
||||
|
||||
/**
|
||||
* Commands to execute at the end of G29 probing.
|
||||
* Useful to retract or move the Z probe out of the way.
|
||||
@@ -938,17 +1028,75 @@
|
||||
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
|
||||
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
|
||||
// - Prevent Z homing when the Z probe is outside bed area.
|
||||
//
|
||||
//#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (50*60)
|
||||
#define HOMING_FEEDRATE_Z (15*60)
|
||||
|
||||
// @section calibrate
|
||||
|
||||
/**
|
||||
* Bed Skew Compensation
|
||||
*
|
||||
* This feature corrects for misalignment in the XYZ axes.
|
||||
*
|
||||
* Take the following steps to get the bed skew in the XY plane:
|
||||
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
|
||||
* 2. For XY_DIAG_AC measure the diagonal A to C
|
||||
* 3. For XY_DIAG_BD measure the diagonal B to D
|
||||
* 4. For XY_SIDE_AD measure the edge A to D
|
||||
*
|
||||
* Marlin automatically computes skew factors from these measurements.
|
||||
* Skew factors may also be computed and set manually:
|
||||
*
|
||||
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
|
||||
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
|
||||
*
|
||||
* If desired, follow the same procedure for XZ and YZ.
|
||||
* Use these diagrams for reference:
|
||||
*
|
||||
* Y Z Z
|
||||
* ^ B-------C ^ B-------C ^ B-------C
|
||||
* | / / | / / | / /
|
||||
* | / / | / / | / /
|
||||
* | A-------D | A-------D | A-------D
|
||||
* +-------------->X +-------------->X +-------------->Y
|
||||
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
|
||||
*/
|
||||
//#define SKEW_CORRECTION
|
||||
|
||||
#if ENABLED(SKEW_CORRECTION)
|
||||
// Input all length measurements here:
|
||||
#define XY_DIAG_AC 282.8427124746
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
#define XZ_DIAG_AC 282.8427124746
|
||||
#define XZ_DIAG_BD 282.8427124746
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
//#define SKEW_CORRECTION_GCODE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
@@ -962,13 +1110,10 @@
|
||||
// M500 - stores parameters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
//define this to enable EEPROM support
|
||||
#define EEPROM_SETTINGS
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
// To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
|
||||
#define EEPROM_CHITCHAT // Please keep turned on if you can.
|
||||
#endif
|
||||
//
|
||||
#define EEPROM_SETTINGS // Enable for M500 and M501 commands
|
||||
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
|
||||
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
@@ -978,11 +1123,12 @@
|
||||
//
|
||||
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
|
||||
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
|
||||
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
|
||||
|
||||
//
|
||||
// M100 Free Memory Watcher
|
||||
//
|
||||
//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
|
||||
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
|
||||
|
||||
//
|
||||
// G20/G21 Inch mode support
|
||||
@@ -1006,7 +1152,7 @@
|
||||
#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
* Nozzle Park -- EXPERIMENTAL
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
*
|
||||
@@ -1021,6 +1167,8 @@
|
||||
#if ENABLED(NOZZLE_PARK_FEATURE)
|
||||
// Specify a park position as { X, Y, Z }
|
||||
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
|
||||
#define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
|
||||
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1127,10 +1275,11 @@
|
||||
*
|
||||
* Select the language to display on the LCD. These languages are available:
|
||||
*
|
||||
* en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
|
||||
* kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
|
||||
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, fr_utf8, gl,
|
||||
* hr, it, kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8,
|
||||
* tr, uk, zh_CN, zh_TW, test
|
||||
*
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
|
||||
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', test':'TEST' }
|
||||
*/
|
||||
#define LCD_LANGUAGE en
|
||||
|
||||
@@ -1152,7 +1301,7 @@
|
||||
* - Click the controller to view the LCD menu
|
||||
* - The LCD will display Japanese, Western, or Cyrillic text
|
||||
*
|
||||
* See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
|
||||
* See http://marlinfw.org/docs/development/lcd_language.html
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
@@ -1258,8 +1407,8 @@
|
||||
// Note: Test audio output with the G-Code:
|
||||
// M300 S<frequency Hz> P<duration ms>
|
||||
//
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000
|
||||
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
|
||||
//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: Standard
|
||||
@@ -1278,12 +1427,6 @@
|
||||
//
|
||||
//#define ULTIPANEL
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||
// http://reprap.org/wiki/PanelOne
|
||||
@@ -1368,6 +1511,29 @@
|
||||
//
|
||||
//#define BQ_LCD_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
//
|
||||
// ANET and Tronxy Controller supported displays.
|
||||
//
|
||||
//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
|
||||
// This LCD is known to be susceptible to electrical interference
|
||||
// which scrambles the display. Pressing any button clears it up.
|
||||
// This is a LCD2004 display with 5 analog buttons.
|
||||
|
||||
//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
|
||||
// A clone of the RepRapDiscount full graphics display but with
|
||||
// different pins/wiring (see pins_ANET_10.h).
|
||||
|
||||
//
|
||||
// LCD for Melzi Card with Graphical LCD
|
||||
//
|
||||
//#define LCD_FOR_MELZI
|
||||
|
||||
//
|
||||
// CONTROLLER TYPE: I2C
|
||||
//
|
||||
@@ -1384,6 +1550,9 @@
|
||||
//
|
||||
// Sainsmart YW Robot (LCM1602) LCD Display
|
||||
//
|
||||
// Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
|
||||
//
|
||||
//#define LCD_I2C_SAINSMART_YWROBOT
|
||||
|
||||
//
|
||||
@@ -1436,6 +1605,41 @@
|
||||
//
|
||||
//#define OLED_PANEL_TINYBOY2
|
||||
|
||||
//
|
||||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
|
||||
// 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
|
||||
|
||||
//
|
||||
// MKS MINI12864 with graphic controller and SD support
|
||||
// http://reprap.org/wiki/MKS_MINI_12864
|
||||
//
|
||||
//#define MKS_MINI_12864
|
||||
|
||||
//
|
||||
// Factory display for Creality CR-10
|
||||
// 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.
|
||||
// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
|
||||
//
|
||||
//#define CR10_STOCKDISPLAY
|
||||
|
||||
//
|
||||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
|
||||
// http://reprap.org/wiki/MKS_12864OLED
|
||||
//
|
||||
// Tiny, but very sharp OLED display
|
||||
//
|
||||
//#define MKS_12864OLED // Uses the SH1106 controller (default)
|
||||
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
|
||||
|
||||
// Silvergate GLCD controller
|
||||
// http://github.com/android444/Silvergate
|
||||
//
|
||||
//#define SILVER_GATE_GLCD_CONTROLLER
|
||||
|
||||
//=============================================================================
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
@@ -1474,12 +1678,15 @@
|
||||
// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
|
||||
//#define SF_ARC_FIX
|
||||
|
||||
// Support for the BariCUDA Paste Extruder.
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
//define BlinkM/CyzRgb Support
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
// Support for PCA9632 PWM LED driver
|
||||
//#define PCA9632
|
||||
|
||||
/**
|
||||
* RGB LED / LED Strip Control
|
||||
*
|
||||
@@ -1489,16 +1696,22 @@
|
||||
* Adds the M150 command to set the LED (or LED strip) color.
|
||||
* If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For Neopixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* LED Strips require a MOFSET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
* NOTE: A separate 5V power supply is required! The Neopixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
*
|
||||
*/
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#define RGB_LED_R_PIN 34
|
||||
#define RGB_LED_G_PIN 43
|
||||
@@ -1506,6 +1719,17 @@
|
||||
#define RGB_LED_W_PIN -1
|
||||
#endif
|
||||
|
||||
// Support for Adafruit Neopixel LED driver
|
||||
//#define NEOPIXEL_LED
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||
#define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
|
||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
|
||||
#define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
|
||||
#define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
|
||||
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Printer Event LEDs
|
||||
*
|
||||
@@ -1517,68 +1741,32 @@
|
||||
* - Change to green once print has finished
|
||||
* - Turn off after the print has finished and the user has pushed a button
|
||||
*/
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
|
||||
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
/**
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
*/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
* For some servo-related options NUM_SERVOS will be set automatically.
|
||||
* Set this manually if there are extra servos needing manual control.
|
||||
* Leave undefined or set to 0 to entirely disable the servo subsystem.
|
||||
*/
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
|
||||
// 300ms is a good value but you can try less delay.
|
||||
// If the servo can't reach the requested position, increase it.
|
||||
#define SERVO_DELAY 300
|
||||
#define SERVO_DELAY { 300 }
|
||||
|
||||
// Servo deactivation
|
||||
//
|
||||
// With this option servos are powered only during movement, then turned off to prevent jitter.
|
||||
//#define DEACTIVATE_SERVOS_AFTER_MOVE
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
* Measures the filament width in real-time and adjusts
|
||||
* flow rate to compensate for any irregularities.
|
||||
*
|
||||
* Also allows the measured filament diameter to set the
|
||||
* extrusion rate, so the slicer only has to specify the
|
||||
* volume.
|
||||
*
|
||||
* Only a single extruder is supported at this time.
|
||||
*
|
||||
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
|
||||
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
|
||||
* 301 RAMBO : Analog input 3
|
||||
*
|
||||
* Note: May require analog pins to be defined for other boards.
|
||||
*/
|
||||
//#define FILAMENT_WIDTH_SENSOR
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor (0,1,2,3)
|
||||
#define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
|
||||
|
||||
#define MEASURED_UPPER_LIMIT 3.30 // (mm) Upper limit used to validate sensor reading
|
||||
#define MEASURED_LOWER_LIMIT 1.90 // (mm) Lower limit used to validate sensor reading
|
||||
#define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
|
||||
|
||||
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
|
||||
|
||||
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
#endif // CONFIGURATION_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user