Compare commits
1727 Commits
bugfix-2.1
...
2.0.8.2
Author | SHA1 | Date | |
---|---|---|---|
|
5b7b065b96 | ||
|
a739af823f | ||
|
493eb446b7 | ||
|
1b45b3802a | ||
|
7898307d78 | ||
|
8da8aa140f | ||
|
4572af2bce | ||
|
6dc17f0e6e | ||
|
3fcf3f69ca | ||
|
a9fd2769f3 | ||
|
9adaf92674 | ||
|
e75c3b6c54 | ||
|
61f2bb1228 | ||
|
d1502f74ea | ||
|
83f9413196 | ||
|
cdc3e18d99 | ||
|
55a6315862 | ||
|
cf447a5442 | ||
|
7597b4fb40 | ||
|
7cd0f2a32a | ||
|
4dae5890e9 | ||
|
738ae4be33 | ||
|
e573611021 | ||
|
f60965a107 | ||
|
3995e8373c | ||
|
ddc82b84e2 | ||
|
87a943756a | ||
|
8e28731f96 | ||
|
cdbd438a04 | ||
|
3220c49f1b | ||
|
94e67a036a | ||
|
c977e82074 | ||
|
9878a5ab58 | ||
|
2de914c38c | ||
|
49b05ba989 | ||
|
85fa8c55c9 | ||
|
57eef65d9c | ||
|
894c954e8f | ||
|
046bac6769 | ||
|
765720e98b | ||
|
26a244325b | ||
|
f7d28ce1d6 | ||
|
c85633b47f | ||
|
6861b1ec82 | ||
|
003cb20b9f | ||
|
f1f622de01 | ||
|
dbb8f3db09 | ||
|
5d7c72db5a | ||
|
755adb8973 | ||
|
0977429138 | ||
|
1dfa6cbc80 | ||
|
e3998dc3df | ||
|
b6e1838fa6 | ||
|
908caba735 | ||
|
121f3b1096 | ||
|
9e373617dc | ||
|
5298fa357c | ||
|
2c15bc5d39 | ||
|
159f9c85a6 | ||
|
1d1f318752 | ||
|
40a9d82ae9 | ||
|
72c28d3462 | ||
|
ed224ca7d8 | ||
|
02e131b5fd | ||
|
5afb5e03b0 | ||
|
52a23b969b | ||
|
afcc7ea22b | ||
|
c463b81819 | ||
|
f688c7d20d | ||
|
0167bba371 | ||
|
7004fb702d | ||
|
2f2dd3322d | ||
|
31d3a781a8 | ||
|
a7fd6b68be | ||
|
6a1e78e614 | ||
|
770edea577 | ||
|
08a51b2820 | ||
|
ac11c689f7 | ||
|
f3e199fcd2 | ||
|
ffcbe68570 | ||
|
06e965e29c | ||
|
e865cc0249 | ||
|
5d8d03da03 | ||
|
0b3da61ac7 | ||
|
a24eb691fb | ||
|
c5c8ef436c | ||
|
83309c1ac8 | ||
|
ec2f4f512e | ||
|
ad991734c4 | ||
|
03184e1c31 | ||
|
cca5844ba9 | ||
|
45d3866f97 | ||
|
94edfc0a8f | ||
|
9fa9eebe51 | ||
|
4518506559 | ||
|
c1fb84e1a6 | ||
|
ea34aa2d3e | ||
|
d6cb657c85 | ||
|
0df9f30f14 | ||
|
d3e902af76 | ||
|
0b3420a012 | ||
|
5cf0975913 | ||
|
db90a180c2 | ||
|
d174d610bd | ||
|
e69e56ea52 | ||
|
0c66c713b6 | ||
|
95230c9792 | ||
|
7eea0ac6de | ||
|
b19a1f602a | ||
|
789235b925 | ||
|
00722c3294 | ||
|
cb4e3889ec | ||
|
76ec7040f1 | ||
|
b41365b495 | ||
|
6e18af6f81 | ||
|
12bc28bc8c | ||
|
3fa3be1f31 | ||
|
a468701511 | ||
|
f67cd07328 | ||
|
5cbdf51b4a | ||
|
7378afc6d8 | ||
|
7957408497 | ||
|
53fc13ba7f | ||
|
a0ea7cbf26 | ||
|
6310e023a7 | ||
|
5f594ce5d3 | ||
|
64a7dfbe7d | ||
|
5d0e94c11c | ||
|
0ca1170b6d | ||
|
addc91a409 | ||
|
450f329f05 | ||
|
1f72b4f65b | ||
|
50195ec990 | ||
|
2d9557cf40 | ||
|
5625ceec7d | ||
|
888e9cb60b | ||
|
d00f6cbe12 | ||
|
8abef30a75 | ||
|
158b26b875 | ||
|
d92decb774 | ||
|
af9d3c027e | ||
|
47c148628e | ||
|
e7c2a3a1da | ||
|
d32575ee74 | ||
|
f6b0398ca8 | ||
|
d5c6762332 | ||
|
a1154b226d | ||
|
731a018905 | ||
|
f45f4a8d54 | ||
|
e306abaf8a | ||
|
bc28aed5b1 | ||
|
93afb02994 | ||
|
0db64af9b2 | ||
|
4da3f45f41 | ||
|
8a8aeba17c | ||
|
e640d9246d | ||
|
81d7a6b81d | ||
|
08537dc891 | ||
|
c2741affe9 | ||
|
301cc85fec | ||
|
3433bfc3bd | ||
|
62ec696cae | ||
|
0d0ec3ec89 | ||
|
1d4c2454bc | ||
|
0fb606fa0a | ||
|
0ec489d6f2 | ||
|
7e3cf82a40 | ||
|
84e8d4c603 | ||
|
8373bd1b71 | ||
|
6202b2d324 | ||
|
e46f81af22 | ||
|
888cabff27 | ||
|
c6b6437761 | ||
|
1830629472 | ||
|
12ca73947b | ||
|
c39c17c1b5 | ||
|
27a26fcfeb | ||
|
48d5fae514 | ||
|
3153080301 | ||
|
309d82b6aa | ||
|
b9715c5a03 | ||
|
3ae0557258 | ||
|
02b6c0e881 | ||
|
cf5ea1ccdc | ||
|
011a344500 | ||
|
1570005683 | ||
|
899fcf51e6 | ||
|
7d5714fedd | ||
|
9f22aaea2f | ||
|
4ab19e7882 | ||
|
ecc419fce0 | ||
|
d5e62a8255 | ||
|
5859860a02 | ||
|
b8aeaa3bf4 | ||
|
a866a8f2fb | ||
|
214324aaa2 | ||
|
181e1280af | ||
|
2316fb2d05 | ||
|
81ab756759 | ||
|
c50a9ef055 | ||
|
3d3c0591e8 | ||
|
e0f60c3811 | ||
|
59e55ea6fb | ||
|
df36d759fc | ||
|
fe24aa2254 | ||
|
1a44270284 | ||
|
a860f7f5f7 | ||
|
e5fc3f3a62 | ||
|
276fd6b077 | ||
|
27754a76dc | ||
|
b586b64119 | ||
|
9c86eef98b | ||
|
db054ba757 | ||
|
2e726c46c8 | ||
|
791edd0cec | ||
|
e4760ea2b0 | ||
|
61ee5b1d76 | ||
|
b6ce7a9f74 | ||
|
99fa641a24 | ||
|
c67e115f61 | ||
|
027a5a872d | ||
|
973f65f80c | ||
|
643f04681c | ||
|
713e606b28 | ||
|
ce18713f57 | ||
|
761d283d6d | ||
|
4512bcd72c | ||
|
47dbea9334 | ||
|
326b1c1225 | ||
|
e26eebfb2f | ||
|
107dd313bd | ||
|
02a99e3f0b | ||
|
896123513e | ||
|
562f3e43bc | ||
|
ed477abbd5 | ||
|
21518fbd4e | ||
|
52f928700a | ||
|
c96340980a | ||
|
8384582116 | ||
|
ac5b39b354 | ||
|
0f7161785e | ||
|
49fba5a82a | ||
|
fb7bdabb70 | ||
|
5ab64708c5 | ||
|
f14d0e0983 | ||
|
ca84e5b1f2 | ||
|
c66cbf0d69 | ||
|
f69ce3e02b | ||
|
2251038ab8 | ||
|
42d63258e9 | ||
|
d34a143d82 | ||
|
4e9eb95830 | ||
|
9a31702a75 | ||
|
34f7142323 | ||
|
00ea75ce82 | ||
|
6d9aaf8de5 | ||
|
a82b3955bb | ||
|
c9a7fd1722 | ||
|
1bd35072cb | ||
|
c8c83e9f52 | ||
|
ab2441c088 | ||
|
2c73964b2b | ||
|
ee21e31a17 | ||
|
93dfd411fc | ||
|
c197ecc99b | ||
|
c2c73215b2 | ||
|
1ba0ed8121 | ||
|
c5ab0a66b7 | ||
|
f3510db367 | ||
|
c46c2c4f3c | ||
|
0b5c25aa7c | ||
|
ba5644376c | ||
|
c4379db8fc | ||
|
cdd2450a97 | ||
|
84445b82e4 | ||
|
05d7d37872 | ||
|
a8f8201c90 | ||
|
7297cc13b0 | ||
|
4f174afc1a | ||
|
96bdc4c830 | ||
|
9fbce867ee | ||
|
fea4835941 | ||
|
47a13263f6 | ||
|
82e6a2ed62 | ||
|
b1be96e40e | ||
|
a4d5f96e9a | ||
|
a4f1623012 | ||
|
fe99bb4b9b | ||
|
259115bb3f | ||
|
a572e2ed12 | ||
|
5ad7118aea | ||
|
16af2148b9 | ||
|
e787cdd1cb | ||
|
2b0fcc79c5 | ||
|
4e77fe50a4 | ||
|
9902e6fb9f | ||
|
f18da95d38 | ||
|
368fcaee54 | ||
|
badbb4a500 | ||
|
b96c3a063f | ||
|
84a2746d05 | ||
|
2059c6e4d0 | ||
|
bf3fce3550 | ||
|
19078966d9 | ||
|
f734f79f5b | ||
|
627331aa68 | ||
|
3ed4503c30 | ||
|
f1986545da | ||
|
9f48314cb4 | ||
|
7c275285ea | ||
|
4ffb95a736 | ||
|
943a8ebdc6 | ||
|
8d73a6c4e2 | ||
|
e817db62a4 | ||
|
85eb179acf | ||
|
3d70b645b6 | ||
|
c83b6217f9 | ||
|
a97f6c4c74 | ||
|
710b1bcb6d | ||
|
b4617e7904 | ||
|
a9f022dacf | ||
|
5ff4476ccb | ||
|
98a6015d3a | ||
|
05b281ad9e | ||
|
3c9ffa77f9 | ||
|
2a32d14dc4 | ||
|
e087271d48 | ||
|
375404290d | ||
|
5c8f7c7ea3 | ||
|
c6774812fa | ||
|
af13128430 | ||
|
6b7a92035c | ||
|
9e8b158ee1 | ||
|
3226e12037 | ||
|
2a011779e9 | ||
|
faa1118ca7 | ||
|
3341e4f88c | ||
|
976403d10d | ||
|
ff729744e5 | ||
|
d924adef75 | ||
|
dca4c2904e | ||
|
e806c3376a | ||
|
c9674cd809 | ||
|
259d8f19b3 | ||
|
9a1c4f91fe | ||
|
4bdc303f6c | ||
|
5b0dc4d325 | ||
|
39c30d6fd6 | ||
|
e50af65a1b | ||
|
c4d757c6f7 | ||
|
ac4f3c0c7e | ||
|
107cc1f6a1 | ||
|
f49dc90655 | ||
|
7cfaa50148 | ||
|
dec9b9ad2f | ||
|
7973b954b4 | ||
|
e0711d87a0 | ||
|
3bbcfb0185 | ||
|
86a8e8970a | ||
|
f5d612b213 | ||
|
a2d2e19f84 | ||
|
35c32602f4 | ||
|
0d04dcd9ae | ||
|
f6f5ed166f | ||
|
b644aca98c | ||
|
e5ab4a7283 | ||
|
f36eb4646b | ||
|
0c3eb04a37 | ||
|
09233129a8 | ||
|
2480c82d76 | ||
|
7fb04b3656 | ||
|
166d4a26f3 | ||
|
b6169a957d | ||
|
ead6d99069 | ||
|
59a9be5f5a | ||
|
d81838e9fa | ||
|
894688c547 | ||
|
059e6514ca | ||
|
a729999f55 | ||
|
f332cca4a7 | ||
|
242ef2b2b4 | ||
|
5c0f909949 | ||
|
633491833c | ||
|
b713ca2638 | ||
|
46246c8db6 | ||
|
e1cca6d97b | ||
|
01f3dc6d41 | ||
|
0e1a1959de | ||
|
6c70402161 | ||
|
6652c7c435 | ||
|
7f3208ba79 | ||
|
b680ddc66c | ||
|
7a5a6ca53f | ||
|
b80ec493ed | ||
|
d4a6014578 | ||
|
6ee61c8380 | ||
|
db4d9b7fcf | ||
|
95136abc47 | ||
|
5b586ea4d8 | ||
|
05a124930e | ||
|
423c4e4636 | ||
|
6c6beeee70 | ||
|
74457dc989 | ||
|
34b76c6f80 | ||
|
35355d1f1b | ||
|
7c37a82821 | ||
|
5a01cdb81c | ||
|
6cfd190107 | ||
|
10ec13b2c3 | ||
|
8a3d0b23cf | ||
|
c90927cf54 | ||
|
f187a5304b | ||
|
d5b09fdbf5 | ||
|
c8b73b00be | ||
|
ee74cee5d4 | ||
|
99eedf77b5 | ||
|
d61e7dd685 | ||
|
864d27d460 | ||
|
3c86eb18a5 | ||
|
c4fe072751 | ||
|
0e61b4a982 | ||
|
92da7659f4 | ||
|
be8b547261 | ||
|
ef57a3e585 | ||
|
b71f1e1edd | ||
|
f3db2551a6 | ||
|
7eace53eb7 | ||
|
c6e82160e4 | ||
|
c8cd824be2 | ||
|
854ab04ee4 | ||
|
4e6ed43198 | ||
|
2d4a1cd428 | ||
|
fd5f1f1f5d | ||
|
fbb30a2570 | ||
|
043bd34e2b | ||
|
e4a67c8496 | ||
|
0a097b7a1e | ||
|
4343de3ee2 | ||
|
3f34916c57 | ||
|
0e6e7b0608 | ||
|
334bafc9c1 | ||
|
8eedec04a1 | ||
|
5aa9cc82a8 | ||
|
6183cd0731 | ||
|
971fb8729a | ||
|
124fb331cc | ||
|
d20375c185 | ||
|
fff95b7173 | ||
|
130dfbe11c | ||
|
68e50a725a | ||
|
3f9fe2dac4 | ||
|
e1283b8a86 | ||
|
653608e931 | ||
|
80aac1b711 | ||
|
b428a53b7a | ||
|
94d1637221 | ||
|
3a5ac12321 | ||
|
c9d757fc0e | ||
|
532dbb8064 | ||
|
adf26fd69e | ||
|
13dee4d059 | ||
|
fc09581aa3 | ||
|
52c539eced | ||
|
5fdab77cc2 | ||
|
00ceeeae7a | ||
|
7240c2172b | ||
|
f3d15b995c | ||
|
b71af6a50f | ||
|
362776c38d | ||
|
e6bf89e82b | ||
|
19c38f1a8a | ||
|
ac5f2a9300 | ||
|
088b5cfec2 | ||
|
b33afb790e | ||
|
73332f4df1 | ||
|
7cb286bb6e | ||
|
e9d62822bd | ||
|
8d05a823e9 | ||
|
c051a2ecae | ||
|
dc0247c57e | ||
|
8fca59f63b | ||
|
1ab1c62f03 | ||
|
a19c79d714 | ||
|
dc11874abe | ||
|
61753bb5e3 | ||
|
3f1a8c2a1c | ||
|
bdb67b4397 | ||
|
c4fcf8bfd7 | ||
|
7e8b02145c | ||
|
a09d7a59b4 | ||
|
27721c564f | ||
|
2e040d03df | ||
|
2724816152 | ||
|
03396922ab | ||
|
b4a3013c28 | ||
|
903c2915ed | ||
|
3ca2195ed0 | ||
|
c759b2d2a6 | ||
|
adbe152256 | ||
|
3883853817 | ||
|
ead41ac491 | ||
|
8a35c9a1a0 | ||
|
10da0f92a0 | ||
|
ca79af7a46 | ||
|
ba4ce63858 | ||
|
f31a8f4086 | ||
|
9c47a9256d | ||
|
8ec86b810d | ||
|
69fcd9210f | ||
|
b95e60dbbd | ||
|
8bca8e5ba0 | ||
|
92b5f06bf9 | ||
|
4316522146 | ||
|
c0d1fd14f8 | ||
|
f740226a82 | ||
|
54f401506b | ||
|
4d75c2e0f9 | ||
|
7361fbfe28 | ||
|
897291c470 | ||
|
6320928795 | ||
|
9acd2e176d | ||
|
c7efb2d964 | ||
|
41ab63897f | ||
|
77f48d2bad | ||
|
897d29ea31 | ||
|
13f0e4729c | ||
|
86fd38ef42 | ||
|
127a4ada93 | ||
|
1aae6395c6 | ||
|
1bf469411a | ||
|
47b872f5d0 | ||
|
80c1be919f | ||
|
243c8b4e1a | ||
|
d7fbb1512a | ||
|
8416edd127 | ||
|
77966135e8 | ||
|
6054052248 | ||
|
bbb49c43e1 | ||
|
9437c72ef6 | ||
|
bb511195b8 | ||
|
582458998f | ||
|
bb5c643dfb | ||
|
bf631046c0 | ||
|
0d7c02d2c6 | ||
|
129e9151da | ||
|
4771379302 | ||
|
62a65d3fdc | ||
|
032152c41d | ||
|
da80fd782c | ||
|
460cdf4c09 | ||
|
0badef42d5 | ||
|
811b3d0f08 | ||
|
8de850fd07 | ||
|
1e5995335c | ||
|
4153b6a30b | ||
|
c631fb79d5 | ||
|
9ae204df9c | ||
|
e7658ec5f5 | ||
|
b3656c387f | ||
|
164199614c | ||
|
219f92c4ca | ||
|
0e37370b0c | ||
|
845b99feb7 | ||
|
4b9f2f13b1 | ||
|
b44de74b91 | ||
|
59d16eb189 | ||
|
c7004d100c | ||
|
07a3ed1d7e | ||
|
cc545a73a1 | ||
|
efa1e56369 | ||
|
8da8e7d17b | ||
|
b10b76e882 | ||
|
be058430b4 | ||
|
7a559e4733 | ||
|
5fb8818ae5 | ||
|
cdefc19129 | ||
|
918894fd84 | ||
|
1bc65be70f | ||
|
b9d19291fe | ||
|
2aaff47c9d | ||
|
a582d1dc2f | ||
|
5acd8f36a4 | ||
|
efaff24145 | ||
|
b059c9e5c0 | ||
|
82122fe9cd | ||
|
3beb6a9df3 | ||
|
a576ab83e9 | ||
|
70ee5e94fd | ||
|
69da8719cf | ||
|
4ce87eeb91 | ||
|
24a801b660 | ||
|
786bba39ff | ||
|
bed027f41f | ||
|
17a4ef6730 | ||
|
56383d3ca0 | ||
|
60c9a9e654 | ||
|
5398bfab36 | ||
|
a8a6040b78 | ||
|
22db4c0448 | ||
|
7bbf958e5c | ||
|
0b7de80a6f | ||
|
de37fbffa3 | ||
|
f4a3db8db8 | ||
|
c409a6df5e | ||
|
71be210795 | ||
|
67942622f1 | ||
|
5252a32de4 | ||
|
5e5c0d65f3 | ||
|
3dde2722bd | ||
|
befcdeb74d | ||
|
0c62fd02b0 | ||
|
8d2f1851eb | ||
|
b355f4605e | ||
|
f6c4c26937 | ||
|
c334151294 | ||
|
faf4cb1b74 | ||
|
ccbff12d6a | ||
|
a02e884415 | ||
|
1fdf283e5d | ||
|
910059adcb | ||
|
a8bd376fd4 | ||
|
c69f9b9883 | ||
|
69b873b766 | ||
|
6162560b69 | ||
|
f101e19257 | ||
|
7836b85c96 | ||
|
522c78b5e6 | ||
|
aabd40a7a2 | ||
|
e351ea2ee8 | ||
|
efc396bd05 | ||
|
ae53998a88 | ||
|
d814d8f954 | ||
|
63e3117510 | ||
|
cab93c2ad8 | ||
|
3acf86510d | ||
|
418524b1be | ||
|
a5d2180bf5 | ||
|
0364ae4908 | ||
|
a7c97182f7 | ||
|
1e7426e549 | ||
|
fd6501207f | ||
|
7f8188ccb6 | ||
|
f5341da94d | ||
|
a588f69f16 | ||
|
86bf374fc4 | ||
|
a3d6442d02 | ||
|
62d20c8b37 | ||
|
726e2e9bc0 | ||
|
eedd9c2bda | ||
|
5c181562f6 | ||
|
104aceb44a | ||
|
bee794e598 | ||
|
483804bafd | ||
|
55709b9d2c | ||
|
8eb32cef24 | ||
|
92f847c8f7 | ||
|
be3caa4686 | ||
|
fa6a2f52e2 | ||
|
7e188c48e1 | ||
|
928cd1b8ab | ||
|
4145d85ef1 | ||
|
9901b4e9f1 | ||
|
4e46de66d3 | ||
|
7c7d28345e | ||
|
8690f4862d | ||
|
c9a9c00f61 | ||
|
6a60d47b90 | ||
|
f19a1833bd | ||
|
074d3f6266 | ||
|
92eee0386f | ||
|
32caeecffb | ||
|
5ef0475dc5 | ||
|
aa5ac6c3b2 | ||
|
fd7e34312a | ||
|
d10c734730 | ||
|
c64a5a4b8f | ||
|
e3cd293f4e | ||
|
d324f3b16a | ||
|
01c9d49f09 | ||
|
cc1b8c2d0b | ||
|
ed7698efaa | ||
|
efe2859227 | ||
|
4b4498be93 | ||
|
eff2330ce1 | ||
|
8884b1f9a6 | ||
|
bb747bcd62 | ||
|
b1f0671541 | ||
|
abeefaac7f | ||
|
90c04ee15d | ||
|
d3d8fd6d9b | ||
|
c6c5cc7246 | ||
|
d5465f1ad8 | ||
|
3f8a83b285 | ||
|
385152b3d2 | ||
|
66c69aef6a | ||
|
f4f152bd01 | ||
|
eaeb9d1b20 | ||
|
a42755a061 | ||
|
5d35e3ccf5 | ||
|
7ef03a761b | ||
|
f570791e19 | ||
|
25152a8cef | ||
|
14b7eb1c5a | ||
|
3b4c5f982c | ||
|
2c58d0881b | ||
|
7a748bd565 | ||
|
cf996949fa | ||
|
79672d51f6 | ||
|
c3dc74bba0 | ||
|
f539e319f0 | ||
|
eda5a884c6 | ||
|
7b33ceebbb | ||
|
8aa453d75b | ||
|
ed1c0b71df | ||
|
63f083db96 | ||
|
a74d4609af | ||
|
427a2fca4d | ||
|
910908fb32 | ||
|
a8800d5b0a | ||
|
adca49e432 | ||
|
214f6cb6e3 | ||
|
3395d10e82 | ||
|
2e93923e24 | ||
|
892e83e872 | ||
|
10482ca49c | ||
|
9947072d2d | ||
|
6d3e22dd4a | ||
|
e3d7603d54 | ||
|
f9dd484381 | ||
|
48bf80d190 | ||
|
089bfad490 | ||
|
f1bf1e1835 | ||
|
35e1917655 | ||
|
121d4bf52a | ||
|
fadc8a1944 | ||
|
a5dd4028ac | ||
|
a510c16838 | ||
|
156b5f4749 | ||
|
fa89a7b0bc | ||
|
a24298f625 | ||
|
ec83a96484 | ||
|
a03ebfda52 | ||
|
323bf47738 | ||
|
ad15890a81 | ||
|
60aeed99c6 | ||
|
c529209c8f | ||
|
be3e45d759 | ||
|
7c8cff0d3c | ||
|
256e94980e | ||
|
aa65c6e477 | ||
|
59b5cb6fe2 | ||
|
a33c689c40 | ||
|
30d9839631 | ||
|
f0b7f27029 | ||
|
a1313c7066 | ||
|
31c84d4559 | ||
|
076f12e82d | ||
|
231e5a5eed | ||
|
350dc4ca05 | ||
|
ff2f6cb110 | ||
|
b667722184 | ||
|
bc3f2f246f | ||
|
28548e7ea2 | ||
|
023ef753b9 | ||
|
b799d0d073 | ||
|
be6e1ccba2 | ||
|
2a58aa2181 | ||
|
525cdeae19 | ||
|
c831aabe14 | ||
|
642110b072 | ||
|
56e2f39175 | ||
|
3e26e23e60 | ||
|
588fec6474 | ||
|
87fbb89330 | ||
|
a4701fbd3e | ||
|
e02fd232ba | ||
|
f7f531e59d | ||
|
51e3d8f08b | ||
|
02b65de6a2 | ||
|
c3a1cd10ab | ||
|
e5d094d2bd | ||
|
d6efe75251 | ||
|
f50abfcb1b | ||
|
bee6b8af8f | ||
|
1b6db623a7 | ||
|
a45603a344 | ||
|
fa9463528d | ||
|
82b6044dbb | ||
|
be7aab204f | ||
|
f82b3f0f51 | ||
|
3d7680a426 | ||
|
878305671b | ||
|
46d2dc9bee | ||
|
e188b3e28c | ||
|
a59164d5c8 | ||
|
0b0eb6a119 | ||
|
e6b3c74069 | ||
|
20bd54f6d3 | ||
|
6599e4ea53 | ||
|
5617d64119 | ||
|
b81a9e54a3 | ||
|
cbe27daafb | ||
|
430855fdca | ||
|
e9bde7e6fc | ||
|
5aebc9fb0c | ||
|
d0c2b643f8 | ||
|
c0ad4718a4 | ||
|
8f188adc32 | ||
|
74042d368e | ||
|
2a5b32f109 | ||
|
0c383b858f | ||
|
aecfd95592 | ||
|
9f740d1872 | ||
|
70d393b5cd | ||
|
f193cda03b | ||
|
e3e9982fec | ||
|
4ca3c0bc86 | ||
|
38bb3b86d2 | ||
|
ad7fe15154 | ||
|
91e9599554 | ||
|
47fd7fcaea | ||
|
50247fc894 | ||
|
37dd0fd2d6 | ||
|
1932e70e72 | ||
|
ea81790d48 | ||
|
2384e5c9c9 | ||
|
72eda1d3ae | ||
|
3a73f04fd3 | ||
|
107834f899 | ||
|
b6cd7aaf17 | ||
|
4b6fa1b54d | ||
|
284cc8f62d | ||
|
ef35fc60c1 | ||
|
ec2843bcf3 | ||
|
8a18bb8440 | ||
|
21b15a0a09 | ||
|
c400c54b86 | ||
|
1a618b1b31 | ||
|
a09d096b87 | ||
|
c88a7935d6 | ||
|
43bbf04764 | ||
|
10b8737c7d | ||
|
dab29dddc3 | ||
|
20ea00e7f6 | ||
|
6a8ab8f1e6 | ||
|
eba2937715 | ||
|
07954edadc | ||
|
1c695e130e | ||
|
f42d15437b | ||
|
564e2e865c | ||
|
c76f179487 | ||
|
29a962320c | ||
|
e927ef94a6 | ||
|
f929123a7b | ||
|
d34bbee304 | ||
|
74c509d36e | ||
|
448cf2c357 | ||
|
f22b677906 | ||
|
272265c636 | ||
|
a8ba3c4e2e | ||
|
523bc7d355 | ||
|
1dd17d857e | ||
|
a54b07d3ae | ||
|
f63a7b978d | ||
|
04483dd307 | ||
|
3c5c36de50 | ||
|
deb8df8eff | ||
|
3231741cd2 | ||
|
747bde7e64 | ||
|
7c9c897dac | ||
|
fc1deea2b8 | ||
|
7421282d9a | ||
|
9d5a391b54 | ||
|
6ec6d1d39d | ||
|
e2c57f6d47 | ||
|
664e9d6dfe | ||
|
0c24347cdb | ||
|
c86ede8cfb | ||
|
38a62f0d5b | ||
|
27b2e2d3e7 | ||
|
4e940ffcc2 | ||
|
109c08e9e5 | ||
|
03cdfafc2a | ||
|
6cca5a9f92 | ||
|
629f0e21c9 | ||
|
a711e22b17 | ||
|
82663c7d11 | ||
|
8cd25f35c2 | ||
|
300a944af6 | ||
|
5e57e60692 | ||
|
28cd6eca88 | ||
|
82c1bac4e3 | ||
|
08717ef117 | ||
|
56c0608e4d | ||
|
9c9fd8714e | ||
|
69b61fef67 | ||
|
add6b836df | ||
|
a95a41ef73 | ||
|
f3805edbd6 | ||
|
7f91ff07c4 | ||
|
d5e13f255d | ||
|
9ebe050646 | ||
|
7f84a7a85e | ||
|
264e921d3f | ||
|
7ad127668d | ||
|
35d3e74267 | ||
|
2abde8a068 | ||
|
afd3ee264b | ||
|
2e193b9a29 | ||
|
48c2065a17 | ||
|
7729a0c3bb | ||
|
f1b32b808f | ||
|
5ef1d053eb | ||
|
0264841dc4 | ||
|
40071c3fb9 | ||
|
d92f69f137 | ||
|
15febdfe07 | ||
|
1040f14da4 | ||
|
11f08804d1 | ||
|
29d45b1144 | ||
|
bd38e59479 | ||
|
b6d2671260 | ||
|
5f9ccb361a | ||
|
ef51bd16dc | ||
|
125ad2003d | ||
|
ccac37613b | ||
|
292e83466e | ||
|
172cc0dd03 | ||
|
26d3caf97c | ||
|
7848096acb | ||
|
18869c666f | ||
|
1c81a126c5 | ||
|
180fe914b6 | ||
|
dc644df9bc | ||
|
550306d1b6 | ||
|
78eb12958a | ||
|
cc9df782ce | ||
|
562c41af4e | ||
|
b5e7b8e29e | ||
|
2979504b9c | ||
|
a01fab662c | ||
|
daa2a04fc9 | ||
|
983bb89063 | ||
|
3d9b453000 | ||
|
90f647b6be | ||
|
7f7c27be30 | ||
|
2b63a1b4e1 | ||
|
90f3d1f7a6 | ||
|
65a5eb47b3 | ||
|
6b5ddfe235 | ||
|
2f57b1d529 | ||
|
7e535022ab | ||
|
cb1d2de838 | ||
|
96acbb2506 | ||
|
030f745b08 | ||
|
dc949f5488 | ||
|
7b745345f7 | ||
|
3ee61e2084 | ||
|
26a1cd9a00 | ||
|
27c74d2f72 | ||
|
a5ee22baa2 | ||
|
02c3c314fe | ||
|
012745b218 | ||
|
d4b86322a9 | ||
|
ac74786c2b | ||
|
cf43c9901f | ||
|
3030bf4274 | ||
|
dc144fb910 | ||
|
45b242d5f7 | ||
|
42b37da1e7 | ||
|
8eb5950ebd | ||
|
ccb5e34052 | ||
|
ee48fc6544 | ||
|
2365df532f | ||
|
24c2ce6a87 | ||
|
791fba3187 | ||
|
367c447ff8 | ||
|
ca730314e7 | ||
|
b2d6b8c567 | ||
|
170ba87648 | ||
|
44f689320b | ||
|
7da62cc9f7 | ||
|
841f0d5778 | ||
|
367e717aeb | ||
|
5bf82b34c6 | ||
|
734dd1c293 | ||
|
4052ef7097 | ||
|
dfb6dd2ad2 | ||
|
426d555f6e | ||
|
b129652597 | ||
|
ec5b2aab15 | ||
|
af5cf823ea | ||
|
7e94079b5b | ||
|
d81c1961c2 | ||
|
45e0dd1966 | ||
|
a1ec49feda | ||
|
3afa6e526b | ||
|
ecabbb6974 | ||
|
989ef47bde | ||
|
5a918e2b2e | ||
|
2dd1522e30 | ||
|
e49f267c4a | ||
|
afed97bf0e | ||
|
9ba113bc05 | ||
|
35d7618117 | ||
|
10c8647c1b | ||
|
1767a3bd70 | ||
|
5082106145 | ||
|
b643a07b66 | ||
|
dd92c79339 | ||
|
b767a82bd8 | ||
|
67d58ccb98 | ||
|
bbfac75f19 | ||
|
930aad6d31 | ||
|
65383dd616 | ||
|
2ae8014da7 | ||
|
b79e2d1e8d | ||
|
172996f2b3 | ||
|
3c512648da | ||
|
e335e74379 | ||
|
5c90d0d0ae | ||
|
95fb749923 | ||
|
d9a47ec075 | ||
|
c9c17b8863 | ||
|
2a61ce80b8 | ||
|
3eaeaa8af3 | ||
|
261e8df837 | ||
|
d18ab2d206 | ||
|
08f2735e86 | ||
|
aec215aaf3 | ||
|
4b08e06fa6 | ||
|
2774b70fbf | ||
|
3dbe4ac593 | ||
|
ba28660acb | ||
|
cec9075361 | ||
|
176cb29eab | ||
|
3cb7128116 | ||
|
88e88743b9 | ||
|
e6092ad146 | ||
|
59914df5b7 | ||
|
67fbee389e | ||
|
b590cee35a | ||
|
0c81d86cd4 | ||
|
d6e93bb9c7 | ||
|
2bb94b4329 | ||
|
fa0614516a | ||
|
d08511c5dc | ||
|
2a4cdf5a5d | ||
|
f5f6170858 | ||
|
d7d1ef8228 | ||
|
d4669dbf6a | ||
|
f43f71646e | ||
|
aecf545446 | ||
|
3b42e0263a | ||
|
5a74114e23 | ||
|
3bab0fccc2 | ||
|
2a8fdb8ee4 | ||
|
6c103b72a2 | ||
|
ea9e28bb69 | ||
|
c94afc7592 | ||
|
80909e4424 | ||
|
c59f64ce49 | ||
|
e232f93018 | ||
|
62d578de9e | ||
|
a625fee035 | ||
|
b586a30e7b | ||
|
676354f1d1 | ||
|
e44a97a096 | ||
|
35597ae336 | ||
|
c3e8b46284 | ||
|
d3ee5d7dfe | ||
|
2fed3982d6 | ||
|
f9b04af650 | ||
|
b1b2ecba6c | ||
|
6601ca7a22 | ||
|
1b51000736 | ||
|
994cda3b6b | ||
|
2becb5ebf7 | ||
|
32433fae61 | ||
|
99ce660aed | ||
|
01b9badb51 | ||
|
f27b61cb0f | ||
|
52bc509fcf | ||
|
2984960793 | ||
|
e32bdf6a93 | ||
|
35d75c354e | ||
|
9f85a15955 | ||
|
b1b8161447 | ||
|
c6f17ac01e | ||
|
53a4b8fa33 | ||
|
a90b90e98d | ||
|
ff9a27ee9f | ||
|
cf0a817db1 | ||
|
e00745c548 | ||
|
af956bbb32 | ||
|
4343a96fac | ||
|
9124f1d7c8 | ||
|
32ca42ead3 | ||
|
25bb249ac6 | ||
|
332adafa23 | ||
|
a44aae268a | ||
|
52c090dfbe | ||
|
141f6825ce | ||
|
fff5649b6a | ||
|
34c16bb395 | ||
|
cedc5d340f | ||
|
3becc3ad63 | ||
|
19498040ef | ||
|
060b2f4989 | ||
|
2ecc3bb560 | ||
|
d5340675ae | ||
|
dea995e19f | ||
|
473abe8eb4 | ||
|
386e643179 | ||
|
1fa19e1fc2 | ||
|
13720ce6b2 | ||
|
02b668baf5 | ||
|
57dc1a0649 | ||
|
8ae8e1e455 | ||
|
7905aa64fa | ||
|
d81abf1d50 | ||
|
6a5799fc7d | ||
|
3e4d9aa9bb | ||
|
2004080c9d | ||
|
70dc2ee9bb | ||
|
7825fc63a0 | ||
|
33b2f0700e | ||
|
647981ef44 | ||
|
252fd66b76 | ||
|
1ef1ea0b3e | ||
|
14fe7ee414 | ||
|
bd22194438 | ||
|
ea65e10dc7 | ||
|
48a24202ef | ||
|
9b1ed45b3e | ||
|
f163f1940d | ||
|
fdcd28a0ec | ||
|
d2863466ac | ||
|
5047979340 | ||
|
7ab74d22c4 | ||
|
c1729330c5 | ||
|
2dafba1ad2 | ||
|
67e0e6d5ad | ||
|
8b4f82cd07 | ||
|
2c7b5fe1f2 | ||
|
a30e8baf3e | ||
|
2e01eb9189 | ||
|
2adac87c45 | ||
|
72f9fdc05f | ||
|
cbed6f4241 | ||
|
50de8bd6fb | ||
|
7e09160ba3 | ||
|
3facf34f5f | ||
|
2553a18f40 | ||
|
0b13608bad | ||
|
8143d70829 | ||
|
92bbf3ba18 | ||
|
5441ee5a7a | ||
|
fde169d3ef | ||
|
3516c3f936 | ||
|
e6de60d04e | ||
|
cd839a251f | ||
|
fadee1b46b | ||
|
3e9c6c6297 | ||
|
45385e737c | ||
|
c86e14c6ff | ||
|
b5da52007b | ||
|
22ef4fe26c | ||
|
ebca2efb24 | ||
|
61d500462c | ||
|
6002dc634e | ||
|
563bd01789 | ||
|
cc863ba378 | ||
|
fb28e0cba9 | ||
|
cd33062a81 | ||
|
1ac7cf2ab6 | ||
|
53b7ad3a92 | ||
|
01c161d380 | ||
|
af4c2dab8d | ||
|
2a755d68d9 | ||
|
770f2b1e02 | ||
|
85c6ffb364 | ||
|
bf3f7ae5b9 | ||
|
9804677669 | ||
|
c5614c8529 | ||
|
6bafa69f8f | ||
|
a2c4c4a916 | ||
|
de42ef017f | ||
|
69917690f3 | ||
|
02b17886c9 | ||
|
0507df61b2 | ||
|
0af95b188a | ||
|
bf3b36ae6a | ||
|
58ce9a85c1 | ||
|
dc5f86e039 | ||
|
46c8775542 | ||
|
059d966d7b | ||
|
2069ab3a15 | ||
|
bb90bc6165 | ||
|
de4f882a22 | ||
|
9aff5cb095 | ||
|
782b9ce69e | ||
|
806c908091 | ||
|
04a712dacc | ||
|
3453d2d17a | ||
|
25bf561aed | ||
|
ad3c475dd1 | ||
|
85573909d1 | ||
|
63e6437d66 | ||
|
58deab1915 | ||
|
ac900b17e0 | ||
|
a11ba51389 | ||
|
5cd004defe | ||
|
03a5c7f52a | ||
|
717de1e703 | ||
|
33f291d769 | ||
|
7f93173659 | ||
|
4648351270 | ||
|
4bd1ecf8a7 | ||
|
584c836918 | ||
|
ac0511f02a | ||
|
32b854a98b | ||
|
943a594ba0 | ||
|
def328eec1 | ||
|
e26edbc623 | ||
|
d06e526dc2 | ||
|
9a2de1570c | ||
|
3065e4f941 | ||
|
0fedd76819 | ||
|
fd83407991 | ||
|
3d521a2e34 | ||
|
affb5e53df | ||
|
d6b1563655 | ||
|
9d02cedfed | ||
|
449a31dea9 | ||
|
bfa6cd3693 | ||
|
f588d50d57 | ||
|
27c067612c | ||
|
a3a5b334c4 | ||
|
cbaba010f2 | ||
|
8b69d697dd | ||
|
632ac54440 | ||
|
873b5db13d | ||
|
1978a29678 | ||
|
f34ea44d73 | ||
|
bc081473f2 | ||
|
0b18034055 | ||
|
d1eeb692c1 | ||
|
05680a4662 | ||
|
a08217a33c | ||
|
5ccb2c62a9 | ||
|
9dd49b6c6a | ||
|
b52a2176fe | ||
|
d2a36b38ca | ||
|
33788c8405 | ||
|
32cd5a3dc4 | ||
|
ee1232051c | ||
|
b3890d385c | ||
|
5a35595a3a | ||
|
584a8cd1a8 | ||
|
7a0d655292 | ||
|
2f483a25e9 | ||
|
7735be367f | ||
|
a50633d8e0 | ||
|
dc7e2965d6 | ||
|
9065a8da89 | ||
|
9d60047018 | ||
|
9d5f978d00 | ||
|
23376b8a31 | ||
|
70c5871910 | ||
|
9d1b1cf073 | ||
|
90dea98a14 | ||
|
9cdb8ca244 | ||
|
7e56e6c4ea | ||
|
c407c08b0b | ||
|
08a7dedbc9 | ||
|
68c98811a1 | ||
|
07f13c28ee | ||
|
fbd812ebb3 | ||
|
34d0b5de90 | ||
|
d3f88a2482 | ||
|
8debad803c | ||
|
9aceb3711b | ||
|
8e3ac54de3 | ||
|
2877dc9794 | ||
|
c6e35ce066 | ||
|
7742e70865 | ||
|
4fdfdaf2e6 | ||
|
2396b4e27f | ||
|
a941faccb0 | ||
|
196a72b29e | ||
|
c1dcbab932 | ||
|
4d14667266 | ||
|
c517c2ea65 | ||
|
ee32e3eb40 | ||
|
09d1bf37e7 | ||
|
bf6ce68ed1 | ||
|
ad5e73d772 | ||
|
26492ff0ea | ||
|
ade9476721 | ||
|
a2a53406c8 | ||
|
5e3d051b6a | ||
|
e48b283e39 | ||
|
3adb07aa00 | ||
|
136b7a5305 | ||
|
d6bbcd020b | ||
|
42619a3a81 | ||
|
8393c6a63d | ||
|
13f2915b65 | ||
|
f7885bbdde | ||
|
ba6659f6be | ||
|
2af9e2f759 | ||
|
e6cf959170 | ||
|
ea39d3c45e | ||
|
a8904d25ba | ||
|
784016a25e | ||
|
5fcfecc56e | ||
|
09a5014b3c | ||
|
f5dc18730c | ||
|
0bd7a2fc7e | ||
|
b186ab90a2 | ||
|
c360705e6a | ||
|
9172271c7f | ||
|
a1860ed680 | ||
|
643f192515 | ||
|
a8db9f52ec | ||
|
83dba77955 | ||
|
e79af802b1 | ||
|
3a1145b999 | ||
|
24fbfae0fd | ||
|
563bd5b5bc | ||
|
c1d9e8d571 | ||
|
f7cb9455c8 | ||
|
d94b5b5ad0 | ||
|
e2625db1dd | ||
|
47753d8a01 | ||
|
94809feac7 | ||
|
6a511b6ea7 | ||
|
ffba220ae8 | ||
|
43e40524c4 | ||
|
4f1a14532b | ||
|
c113984b32 | ||
|
edba363d54 | ||
|
919ea2a76d | ||
|
755a4440e7 | ||
|
c7335bcd4d | ||
|
881bb7bf0a | ||
|
2212bf85b7 | ||
|
0c85e2838c | ||
|
7967590682 | ||
|
df7e35ccd7 | ||
|
414136f33a | ||
|
ee572856e9 | ||
|
7d2e4481c7 | ||
|
d10f7eae31 | ||
|
757ab484ac | ||
|
d62933fba5 | ||
|
a6829838c6 | ||
|
fd1731a7b9 | ||
|
9419331500 | ||
|
8a24c33151 | ||
|
f5e94cd7f1 | ||
|
7769f19bf5 | ||
|
3b4779fa15 | ||
|
5059586fc3 | ||
|
8670f475b8 | ||
|
1b129ede4e | ||
|
6844ef21d4 | ||
|
6043f5d5d0 | ||
|
0070a0642b | ||
|
9bf6ddd4f1 | ||
|
0decb50fcd | ||
|
40b89456af | ||
|
008362cd77 | ||
|
9d2241efe7 | ||
|
f473145d42 | ||
|
b93a4bae45 | ||
|
42604cf4b2 | ||
|
19a237bbb0 | ||
|
ba3b995e58 | ||
|
e7b730528e | ||
|
db04bcb727 | ||
|
f3d0b49928 | ||
|
fe89f5fdff | ||
|
05d2bb0df5 | ||
|
98ec7b61a9 | ||
|
8565f1e681 | ||
|
3aa5b45768 | ||
|
e02fb4a862 | ||
|
ee19e1d3ff | ||
|
fe1e880ffe | ||
|
a5dc42c47c | ||
|
070412a6a5 | ||
|
0ffd5aa743 | ||
|
744f74506f | ||
|
46744e8433 | ||
|
038945110f | ||
|
7852b06038 | ||
|
dded56c4bb | ||
|
7dea6c53ed | ||
|
fd0a3df315 | ||
|
a1bdc1974a | ||
|
24636eb7f1 | ||
|
737a5453d9 | ||
|
f860152a35 | ||
|
87d2c471db | ||
|
ca54d67814 | ||
|
615af841f0 | ||
|
c43d264d3e | ||
|
d1aed52280 | ||
|
7e7e870eae | ||
|
f7dade8c2c | ||
|
24139c6ff0 | ||
|
16c1e80491 | ||
|
5a7979b435 | ||
|
349bddc652 | ||
|
acc90ad09f | ||
|
7a750156ef | ||
|
8075eafe91 | ||
|
58975fc8b5 | ||
|
8320c43589 | ||
|
73d1a98ce6 | ||
|
f9f514a46c | ||
|
16f2f2bce7 | ||
|
8258a76c9b | ||
|
c9ddbaa2c0 | ||
|
a99c844296 | ||
|
492f49c06a | ||
|
80480ae919 | ||
|
1327eaa83b | ||
|
eee101b9dd | ||
|
77ab354a5a | ||
|
1801eb6393 | ||
|
28d6dc38af | ||
|
dc6e3d083e | ||
|
4e7c5f19fe | ||
|
3dfbdbc66c | ||
|
95f373448d | ||
|
648b253f41 | ||
|
3e2b272239 | ||
|
489143f160 | ||
|
3eafce4683 | ||
|
b23da503fa | ||
|
cae4c76b56 | ||
|
069993e880 | ||
|
a13834b9f9 | ||
|
c82ff17d3b | ||
|
ca8fbbc2be | ||
|
b94b3e6315 | ||
|
ab61bcafa3 | ||
|
9e44df9c5f | ||
|
438a9bb4aa | ||
|
6f686b1801 | ||
|
d7d3827f47 | ||
|
ad30383b46 | ||
|
9af3b06fc2 | ||
|
f395960741 | ||
|
02eb4bd806 | ||
|
24f0c9da11 | ||
|
3dc0f9c0b4 | ||
|
8af8ef4404 | ||
|
7a8e99de7d | ||
|
8d6a263c1c | ||
|
cb18b858d4 | ||
|
cd977c70ca | ||
|
57c3b0e0b7 | ||
|
0e70d8bacb | ||
|
8f0cd470ae | ||
|
48ddaf35fb | ||
|
9493682e49 | ||
|
da6e5ce3db | ||
|
f4894b7140 | ||
|
7d3be90159 | ||
|
76eff24718 | ||
|
e8dc7cad18 | ||
|
4201a48ecf | ||
|
c0d031cd1e | ||
|
1a50260ebd | ||
|
38a24ce6c9 | ||
|
a0a87c2b81 | ||
|
a100306b00 | ||
|
17bbcce52b | ||
|
0b2bd123ef | ||
|
ea53abbca7 | ||
|
7f69f8e680 | ||
|
301569bee6 | ||
|
e82e94be5b | ||
|
0c07e7a96f | ||
|
7dd7d6dda6 | ||
|
3bb1f0a7df | ||
|
a0d25379b2 | ||
|
643b31a6a1 | ||
|
0e2013d244 | ||
|
e6c95762ba | ||
|
b66df5fa3c | ||
|
afb51d1de3 | ||
|
db290201ea | ||
|
ed5ae0a2f7 | ||
|
8f8b0d84ae | ||
|
3fbc002bad | ||
|
60cc56b31c | ||
|
fc12ffcb30 | ||
|
0c1bf01cf7 | ||
|
bb21d79321 | ||
|
c63c069d58 | ||
|
513d3172cb | ||
|
5c699ab406 | ||
|
a87114fbfa | ||
|
29e900977f | ||
|
796471a7c6 | ||
|
524613b610 | ||
|
b765bfa5a5 | ||
|
c0d8542a85 | ||
|
36ef9327ef | ||
|
f2205b1725 | ||
|
25c7577779 | ||
|
9ece3cfdaf | ||
|
c5108687c5 | ||
|
e52bfeb491 | ||
|
dd1503d5a8 | ||
|
e9618f1ba2 | ||
|
0f9e096d6e | ||
|
392d01555d | ||
|
89f7a19691 | ||
|
c0673dbdf1 | ||
|
3e1b9e11d7 | ||
|
dda2f58588 | ||
|
e3a12c3c28 | ||
|
b9065195f1 | ||
|
aba28ef0bc | ||
|
e9f7003b70 | ||
|
d3d1f82f73 | ||
|
2439c44779 | ||
|
19b94ec325 | ||
|
b9fa72d582 | ||
|
b26516b3ac | ||
|
2f97505b93 | ||
|
5ee1087959 | ||
|
6596a50c90 | ||
|
730833f96c | ||
|
f74015b4e5 | ||
|
eb254ef70b | ||
|
3327568142 | ||
|
65983b4288 | ||
|
1d631b7280 | ||
|
072b15784f | ||
|
ba2939b1dc | ||
|
ee7476a0bf | ||
|
88a2ac92d5 | ||
|
3ccb3801f2 | ||
|
cc7fbabc96 | ||
|
28a9708ddb | ||
|
d896dedf9b | ||
|
00709017e2 | ||
|
b7d9b05952 | ||
|
f7f1224941 | ||
|
fd8d83b7c8 | ||
|
52fc0b896d | ||
|
ba045d6852 | ||
|
54bdcb4691 | ||
|
2a2666326b | ||
|
3bba5d55bf | ||
|
5d07d83e78 | ||
|
37f97bc013 | ||
|
6d31bbe2bf | ||
|
e2e1776a14 | ||
|
bd196e7efc | ||
|
dffe7b9072 | ||
|
2b326ebc84 | ||
|
f4ff6a673f | ||
|
cc915a25ed | ||
|
600870f22b | ||
|
04882e2f34 | ||
|
c6cf3da276 | ||
|
8a5c3782b8 | ||
|
beb17d8855 | ||
|
4ee717f7c4 | ||
|
e680196c59 | ||
|
ce92abfe47 | ||
|
50410aaeaa | ||
|
35c40bc376 | ||
|
aae644c507 | ||
|
ce830f8a71 | ||
|
d3d423a322 | ||
|
8b060a3902 | ||
|
faae900747 | ||
|
11662bf2b6 | ||
|
887e2637c0 | ||
|
958f05e4b4 | ||
|
9126a2e654 | ||
|
5070fae231 | ||
|
454f9d6319 | ||
|
59b6b32e6e | ||
|
6d9709e20d | ||
|
7a484959d5 | ||
|
78060f55e6 | ||
|
3fca19fbab | ||
|
b8700e0aa8 | ||
|
d66bc5cec2 | ||
|
fb28c6041a | ||
|
0f9d57e03a | ||
|
32377849da | ||
|
0975c487f0 | ||
|
d07ad63016 | ||
|
1a5a3cf253 | ||
|
6f6901180c | ||
|
9cc6297292 | ||
|
cf53bc2dd2 | ||
|
f4f4ea05e1 | ||
|
2b845e5a75 | ||
|
6fcbf11454 | ||
|
8a69147adf | ||
|
f8ceedea5c | ||
|
a4e4226578 | ||
|
e76fd6bd33 | ||
|
437bee418b | ||
|
31238de937 | ||
|
cb8c99c4f8 | ||
|
2fe81d0cb2 | ||
|
fb7d7ee7b4 | ||
|
d99fdcf526 | ||
|
e4d2234a04 | ||
|
bea919da6e | ||
|
2fb22cc116 | ||
|
d4b6542ce1 | ||
|
7d47ee732e | ||
|
6ceacd62f9 | ||
|
2ce6741731 | ||
|
2213eb3317 | ||
|
b947590082 | ||
|
20bcaa78f6 | ||
|
9834a36a17 | ||
|
90801f8815 | ||
|
4d1357e318 | ||
|
8d090cbdbb | ||
|
ec5b78d18b | ||
|
d33317eadb | ||
|
f8375a3ea2 | ||
|
5a02959d18 | ||
|
cc123bc657 | ||
|
4f6a0605bf | ||
|
b89700ed35 | ||
|
ca853fbe19 | ||
|
1ba2548fb2 | ||
|
1332be77a5 | ||
|
a7f334387c | ||
|
e8177735a0 | ||
|
aac0326f7f | ||
|
a52afd2aeb | ||
|
9913333c33 | ||
|
ca194ca52e | ||
|
b90e7c421f | ||
|
96e29cd7e5 | ||
|
fd9c6983d3 | ||
|
da144dcf3b | ||
|
1d92badecd | ||
|
242064fa99 | ||
|
ad2d1b6e31 | ||
|
978e0e49c7 | ||
|
02a500dc93 | ||
|
fa5ca8678c | ||
|
01359cff6b | ||
|
37b56d6347 | ||
|
ad59adfe24 | ||
|
121cd42c41 | ||
|
cf1c57a04d | ||
|
5804761b5d | ||
|
3dd21a2770 | ||
|
b160e8b93f | ||
|
de37196760 | ||
|
84b96d3d47 | ||
|
92076c6560 | ||
|
5e5daf1ff2 | ||
|
8b637e436c | ||
|
b73ac40fa3 | ||
|
7ed66d06a0 | ||
|
c1b2379204 | ||
|
5e0958edbf | ||
|
5513e67512 | ||
|
354a9e5970 | ||
|
ee4910c5d7 | ||
|
697ef2636e | ||
|
481b8ff2d9 | ||
|
7bf89f2b9f | ||
|
ed7110838e | ||
|
842dea4bd5 | ||
|
a73e61078d | ||
|
c352aeb32e | ||
|
e4d8336175 | ||
|
0518dec60d | ||
|
015c4e6fbd | ||
|
0f9a14dfda | ||
|
7124b2164d | ||
|
efc19260a7 | ||
|
d37bfa3b4e | ||
|
129b1bb8d4 | ||
|
8dbbcfd382 | ||
|
fa48fbb9b8 | ||
|
d6e767e36b | ||
|
b29aae6c0c | ||
|
1955eea1b8 | ||
|
42fa9fc570 | ||
|
130d0395d0 | ||
|
c5f1ff9ee1 | ||
|
089cc68a04 | ||
|
2b759b9e8d | ||
|
5f27f7de47 | ||
|
282f4678cd | ||
|
c41f3f8582 | ||
|
8670df08a2 | ||
|
730690ea03 | ||
|
3543873da7 | ||
|
c505626c42 | ||
|
7e8505fc11 | ||
|
f9aec2685c | ||
|
dd6a7ca197 | ||
|
62b9d7dc73 | ||
|
d83382eb55 | ||
|
4c76314c26 | ||
|
64ab254f26 | ||
|
e6a7be922b | ||
|
1525c2530e | ||
|
016e4c0193 | ||
|
be642610ae | ||
|
ee17051933 | ||
|
0673f335e1 | ||
|
ac7ee4b94a |
157
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
157
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
name: 🪲 Report a bug
|
||||||
|
description: Create a bug report to help improve Marlin Firmware
|
||||||
|
title: "[BUG] (bug summary)"
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >
|
||||||
|
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose).
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
**Thank you for reporting a bug in Marlin Firmware!**
|
||||||
|
|
||||||
|
## Before Reporting a Bug
|
||||||
|
|
||||||
|
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect.
|
||||||
|
|
||||||
|
- Test with the [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see whether the issue still exists.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
Please follow the instructions below. Failure to do so may result in your issue being closed. See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines.
|
||||||
|
|
||||||
|
1. Provide a good title starting with [BUG].
|
||||||
|
2. Fill out all sections of this bug report form.
|
||||||
|
3. Always attach configuration files so we can build and test your setup.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Did you test the latest `bugfix-2.0.x` code?
|
||||||
|
description: >-
|
||||||
|
Always try the latest code to make sure the issue you are reporting is not already fixed. To download
|
||||||
|
the latest code just [click this link](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip).
|
||||||
|
options:
|
||||||
|
- Yes, and the problem still exists.
|
||||||
|
- No, but I will test it now!
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# Bug Details
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Bug Description
|
||||||
|
description: >-
|
||||||
|
Describe the bug in this section. Tell us what you were trying to do and what
|
||||||
|
happened that you did not expect. Provide a clear and concise description of the
|
||||||
|
problem and include as many details as possible.
|
||||||
|
placeholder: |
|
||||||
|
Marlin doesn't work.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Bug Timeline
|
||||||
|
description: Is this a new bug or an old issue? When did it first start?
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Expected behavior
|
||||||
|
description: >-
|
||||||
|
What did you expect to happen?
|
||||||
|
placeholder: I expected it to move left.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Actual behavior
|
||||||
|
description: What actually happened instead?
|
||||||
|
placeholder: It moved right instead of left.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps to Reproduce
|
||||||
|
description: >-
|
||||||
|
Please describe the steps needed to reproduce the issue.
|
||||||
|
placeholder: |
|
||||||
|
1. [First Step] ...
|
||||||
|
2. [Second Step] ...
|
||||||
|
3. [and so on] ...
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# Your Setup
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Version of Marlin Firmware
|
||||||
|
description: "See the About Menu on the LCD or the output of `M115`. NOTE: For older releases we only patch critical bugs."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Printer model
|
||||||
|
description: Creality Ender 3, Prusa mini, or Kossel Delta?
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Electronics
|
||||||
|
description: Stock electronics, upgrade board, or something else?
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Add-ons
|
||||||
|
description: Please list any hardware add-ons that could be involved.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Your Slicer
|
||||||
|
description: Do you use Slic3r, Prusa Slicer, Simplify3D, IdeaMaker...?
|
||||||
|
options:
|
||||||
|
- Slic3r
|
||||||
|
- Simplify3D
|
||||||
|
- Prusa Slicer
|
||||||
|
- IdeaMaker
|
||||||
|
- Cura
|
||||||
|
- Other (explain below)
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Host Software
|
||||||
|
description: Do you use OctoPrint, Repetier Host, Pronterface...?
|
||||||
|
options:
|
||||||
|
- SD Card (headless)
|
||||||
|
- Repetier Host
|
||||||
|
- OctoPrint
|
||||||
|
- Pronterface
|
||||||
|
- Cura
|
||||||
|
- Same as my slicer
|
||||||
|
- Other (explain below)
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >-
|
||||||
|
## Other things to include
|
||||||
|
|
||||||
|
Please also be sure to include these items to help with troubleshooting:
|
||||||
|
|
||||||
|
* **A ZIP file** containing your `Configuration.h` and `Configuration_adv.h`.
|
||||||
|
(Please don't paste lengthy configuration text here.)
|
||||||
|
* **Log output** from the host. (`M111 S247` for maximum logging.)
|
||||||
|
* **Images or videos** demonstrating the problem, if it helps to make it clear.
|
||||||
|
* **A G-Code file** that exposes the problem, if not affecting _all_ G-code.
|
||||||
|
|
||||||
|
If you've made any other modifications to the firmware, please describe them in detail in the space provided.
|
||||||
|
|
||||||
|
When pasting formatted text into the box below don't forget to put ` ``` ` (on its own line) before and after to make it readable.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional information & file uploads
|
20
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
20
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: 📖 Marlin Documentation
|
||||||
|
url: http://marlinfw.org/
|
||||||
|
about: Lots of documentation on installing and using Marlin.
|
||||||
|
- name: 👤 MarlinFirmware Facebook group
|
||||||
|
url: https://www.facebook.com/groups/1049718498464482
|
||||||
|
about: Please ask and answer questions here.
|
||||||
|
- name: 🕹 Marlin on Discord
|
||||||
|
url: https://discord.gg/n5NJ59y
|
||||||
|
about: Join the Discord server for support and discussion.
|
||||||
|
- name: 🔗 Marlin Discussion Forum
|
||||||
|
url: http://forums.reprap.org/list.php?415
|
||||||
|
about: A searchable web forum hosted by RepRap dot org.
|
||||||
|
- name: 📺 Marlin Videos on YouTube
|
||||||
|
url: https://www.youtube.com/results?search_query=marlin+firmware
|
||||||
|
about: Tutorials and more from Marlin users all around the world. Great for new users!
|
||||||
|
- name: 💸 Want to donate?
|
||||||
|
url: https://www.thinkyhead.com/donate-to-marlin
|
||||||
|
about: Please take a look at the various options to support Marlin Firmware's development financially!
|
44
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
44
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: ✨ Request a feature
|
||||||
|
description: Request a new Marlin Firmware feature
|
||||||
|
title: "[FR] (feature summary)"
|
||||||
|
labels: 'T: Feature Request'
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >
|
||||||
|
Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose).
|
||||||
|
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: >
|
||||||
|
**Thank you for requesting a new Marlin Firmware feature!**
|
||||||
|
|
||||||
|
## Before Requesting a Feature
|
||||||
|
|
||||||
|
- Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect.
|
||||||
|
|
||||||
|
- Check the latest [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see if the feature already exists.
|
||||||
|
|
||||||
|
- Before you proceed with your request, please consider if it is necessary to make it into a firmware feature, or if it may be better suited for a slicer or host feature.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Is your feature request related to a problem? Please describe.
|
||||||
|
description: A clear description of the problem (e.g., "I need X but Marlin can't do it [...]").
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Are you looking for hardware support?
|
||||||
|
description: Tell us the printer, board, or peripheral that needs support.
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe the feature you want
|
||||||
|
description: A clear description of the feature and how you think it should work.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context or screenshots about the feature request here.
|
22
.github/pull_request_template.md
vendored
22
.github/pull_request_template.md
vendored
@@ -1,23 +1,33 @@
|
|||||||
### Requirements
|
<!--
|
||||||
|
|
||||||
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
|
Submitting a Pull Request
|
||||||
|
|
||||||
|
- Please fill out all sections of this form. You can delete the helpful comments.
|
||||||
|
- Pull Requests without clear information will take longer and may even be rejected.
|
||||||
|
- We get a high volume of submissions so please be patient during review.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
### Description
|
### 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.
|
Clearly describe the submitted changes with lots of details. Include images where helpful. Initial reviewers may not be familiar with the subject, so be as thorough as possible. You can use MarkDown syntax to improve readability with bullet lists, code blocks, and so on. PREVIEW and fix up formatting before submitting.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
<!-- Does this PR require a specific board, LCD, etc.? -->
|
||||||
|
|
||||||
### Benefits
|
### Benefits
|
||||||
|
|
||||||
<!-- What does this fix or improve? -->
|
<!-- What does this PR fix or improve? -->
|
||||||
|
|
||||||
### Configurations
|
### Configurations
|
||||||
|
|
||||||
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
|
<!-- Attach Configurations ZIP and any other files needed to test this PR. -->
|
||||||
|
|
||||||
### Related Issues
|
### Related Issues
|
||||||
|
|
||||||
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->
|
<!-- Does this PR fix a bug or fulfill a Feature Request? Link related Issues here. -->
|
||||||
|
35
.github/workflows/bump-date.yml
vendored
Normal file
35
.github/workflows/bump-date.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# bump-date.yml
|
||||||
|
# Bump the distribution date once per day
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Bump Distribution Date
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bump_date:
|
||||||
|
name: Bump Distribution Date
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Check out bugfix-2.0.x
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: bugfix-2.0.x
|
||||||
|
|
||||||
|
- name: Bump Distribution Date
|
||||||
|
run: |
|
||||||
|
# Inline Bump Script
|
||||||
|
DIST=$( date +"%Y-%m-%d" )
|
||||||
|
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
||||||
|
git config user.name "${GITHUB_ACTOR}" && \
|
||||||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
||||||
|
git add . && \
|
||||||
|
git commit -m "[cron] Bump distribution date ($DIST)" && \
|
||||||
|
git push
|
32
.github/workflows/check-pr.yml
vendored
Normal file
32
.github/workflows/check-pr.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# check-pr.yml
|
||||||
|
# Close PRs directed at release branches
|
||||||
|
#
|
||||||
|
|
||||||
|
name: PR Bad Target
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 1.0.x
|
||||||
|
- 1.1.x
|
||||||
|
- 2.0.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bad_target:
|
||||||
|
name: PR Bad Target
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: superbrothers/close-pull-request@v3
|
||||||
|
with:
|
||||||
|
comment: >
|
||||||
|
Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
|
||||||
|
|
||||||
|
Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
|
||||||
|
|
||||||
|
It may help to set your fork's default branch to `bugfix-2.0.x`.
|
||||||
|
|
||||||
|
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
|
39
.github/workflows/clean-closed.yml
vendored
Normal file
39
.github/workflows/clean-closed.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#
|
||||||
|
# clean-closed.yml
|
||||||
|
# Remove obsolete labels when an Issue or PR is closed
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Clean Closed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
issues:
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
remove_label:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
label:
|
||||||
|
- "S: Don't Merge"
|
||||||
|
- "S: Hold for 2.1"
|
||||||
|
- "S: Please Merge"
|
||||||
|
- "S: Please Test"
|
||||||
|
- "help wanted"
|
||||||
|
- "Needs: Discussion"
|
||||||
|
- "Needs: Documentation"
|
||||||
|
- "Needs: More Data"
|
||||||
|
- "Needs: Patch"
|
||||||
|
- "Needs: Testing"
|
||||||
|
- "Needs: Work"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Remove Labels
|
||||||
|
uses: actions-ecosystem/action-remove-labels@v1
|
||||||
|
with:
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
labels: ${{ matrix.label }}
|
28
.github/workflows/close-stale.yml
vendored
Normal file
28
.github/workflows/close-stale.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# close-stale.yml
|
||||||
|
# Close open issues after a period of inactivity
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Close Stale Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "22 1 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
name: Close Stale Issues
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v3
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
stale-issue-message: 'This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.'
|
||||||
|
days-before-stale: 60
|
||||||
|
days-before-close: 10
|
||||||
|
stale-issue-label: 'stale-closing-soon'
|
||||||
|
exempt-all-assignees: true
|
||||||
|
exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: Discussion,Needs: Documentation,Needs: More Data,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking'
|
32
.github/workflows/lock-closed.yml
vendored
Normal file
32
.github/workflows/lock-closed.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# lock-closed.yml
|
||||||
|
# Lock closed issues after a period of inactivity
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Lock Closed Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1/13 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lock:
|
||||||
|
name: Lock Closed Issues
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v2
|
||||||
|
with:
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
process-only: 'issues'
|
||||||
|
issue-lock-inactive-days: '60'
|
||||||
|
issue-exclude-created-before: '2017-07-01T00:00:00Z'
|
||||||
|
issue-exclude-labels: 'no-locking'
|
||||||
|
issue-lock-labels: ''
|
||||||
|
issue-lock-comment: >
|
||||||
|
This issue has been automatically locked since there
|
||||||
|
has not been any recent activity after it was closed.
|
||||||
|
Please open a new issue for related bugs.
|
||||||
|
issue-lock-reason: ''
|
2
.github/workflows/test-builds.yml
vendored
2
.github/workflows/test-builds.yml
vendored
@@ -72,6 +72,7 @@ jobs:
|
|||||||
|
|
||||||
# STM32 (ST) Environments
|
# STM32 (ST) Environments
|
||||||
|
|
||||||
|
- STM32F103RC_btt_stm32
|
||||||
- STM32F407VE_black
|
- STM32F407VE_black
|
||||||
- STM32F401VE_STEVAL
|
- STM32F401VE_STEVAL
|
||||||
- BIGTREE_BTT002
|
- BIGTREE_BTT002
|
||||||
@@ -86,6 +87,7 @@ jobs:
|
|||||||
- FLYF407ZG
|
- FLYF407ZG
|
||||||
- rumba32
|
- rumba32
|
||||||
- LERDGEX
|
- LERDGEX
|
||||||
|
- LERDGEK
|
||||||
- mks_robin_nano35_stm32
|
- mks_robin_nano35_stm32
|
||||||
- NUCLEO_F767ZI
|
- NUCLEO_F767ZI
|
||||||
- REMRAM_V1
|
- REMRAM_V1
|
||||||
|
22
.github/workflows/unlock-reopened.yml
vendored
Normal file
22
.github/workflows/unlock-reopened.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#
|
||||||
|
# unlock-reopened.yml
|
||||||
|
# Unlock an issue whenever it is re-opened
|
||||||
|
#
|
||||||
|
|
||||||
|
name: "Unlock reopened issue"
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
unlock:
|
||||||
|
name: Unlock Reopened
|
||||||
|
if: github.repository == 'MarlinFirmware/Marlin'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: OSDKDev/unlock-issues@v1.1
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
@@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
* Advanced settings can be found in Configuration_adv.h
|
* Advanced settings can be found in Configuration_adv.h
|
||||||
*/
|
*/
|
||||||
#define CONFIGURATION_H_VERSION 020008
|
#define CONFIGURATION_H_VERSION 02000801
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= Getting Started =============================
|
//============================= Getting Started =============================
|
||||||
@@ -105,14 +105,9 @@
|
|||||||
#define SERIAL_PORT 0
|
#define SERIAL_PORT 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select a secondary serial port on the board to use for communication with the host.
|
* Serial Port Baud Rate
|
||||||
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
* This is the default communication speed for all serial ports.
|
||||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
* Set the baud rate defaults for additional serial ports below.
|
||||||
*/
|
|
||||||
//#define SERIAL_PORT_2 -1
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This setting determines the communication speed of the printer.
|
|
||||||
*
|
*
|
||||||
* 250000 works in most cases, but you might try a lower speed if
|
* 250000 works in most cases, but you might try a lower speed if
|
||||||
* you commonly experience drop-outs during host printing.
|
* you commonly experience drop-outs during host printing.
|
||||||
@@ -121,6 +116,23 @@
|
|||||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||||
*/
|
*/
|
||||||
#define BAUDRATE 250000
|
#define BAUDRATE 250000
|
||||||
|
//#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select a secondary serial port on the board to use for communication with the host.
|
||||||
|
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
||||||
|
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||||
|
*/
|
||||||
|
//#define SERIAL_PORT_2 -1
|
||||||
|
//#define BAUDRATE_2 250000 // Enable to override BAUDRATE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Select a third serial port on the board to use for communication with the host.
|
||||||
|
* Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1
|
||||||
|
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||||
|
*/
|
||||||
|
//#define SERIAL_PORT_3 1
|
||||||
|
//#define BAUDRATE_3 250000 // Enable to override BAUDRATE
|
||||||
|
|
||||||
// Enable the Bluetooth serial interface on AT90USB devices
|
// Enable the Bluetooth serial interface on AT90USB devices
|
||||||
//#define BLUETOOTH
|
//#define BLUETOOTH
|
||||||
@@ -1491,6 +1503,8 @@
|
|||||||
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
|
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
|
||||||
// as the Z-Height correction value.
|
// as the Z-Height correction value.
|
||||||
|
|
||||||
|
//#define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh
|
||||||
|
|
||||||
#elif ENABLED(MESH_BED_LEVELING)
|
#elif ENABLED(MESH_BED_LEVELING)
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@@ -2258,7 +2272,8 @@
|
|||||||
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
|
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
|
||||||
// https://www.aliexpress.com/item/33018110072.html
|
// https://www.aliexpress.com/item/33018110072.html
|
||||||
//
|
//
|
||||||
//#define MKS_LCD12864
|
//#define MKS_LCD12864A
|
||||||
|
//#define MKS_LCD12864B
|
||||||
|
|
||||||
//
|
//
|
||||||
// FYSETC variant of the MINI12864 graphic controller with SD support
|
// FYSETC variant of the MINI12864 graphic controller with SD support
|
||||||
@@ -2561,7 +2576,7 @@
|
|||||||
//#define DWIN_CREALITY_LCD
|
//#define DWIN_CREALITY_LCD
|
||||||
|
|
||||||
//
|
//
|
||||||
// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
|
// Touch Screen Settings
|
||||||
//
|
//
|
||||||
//#define TOUCH_SCREEN
|
//#define TOUCH_SCREEN
|
||||||
#if ENABLED(TOUCH_SCREEN)
|
#if ENABLED(TOUCH_SCREEN)
|
||||||
@@ -2675,7 +2690,7 @@
|
|||||||
//#define NEOPIXEL_LED
|
//#define NEOPIXEL_LED
|
||||||
#if ENABLED(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_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
|
||||||
#define NEOPIXEL_PIN 4 // LED driving pin
|
//#define NEOPIXEL_PIN 4 // LED driving pin
|
||||||
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
//#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
|
||||||
//#define NEOPIXEL2_PIN 5
|
//#define NEOPIXEL2_PIN 5
|
||||||
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
|
#define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
|
||||||
@@ -2693,10 +2708,11 @@
|
|||||||
//#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
|
//#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use a single NeoPixel LED for static (background) lighting
|
// Use some of the NeoPixel LEDs for static (background) lighting
|
||||||
//#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use
|
//#define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED
|
||||||
//#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
|
//#define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED
|
||||||
//#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off
|
//#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
|
||||||
|
//#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
*
|
*
|
||||||
* Basic settings can be found in Configuration.h
|
* Basic settings can be found in Configuration.h
|
||||||
*/
|
*/
|
||||||
#define CONFIGURATION_ADV_H_VERSION 020008
|
#define CONFIGURATION_ADV_H_VERSION 02000801
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= Thermal Settings ============================
|
//============================= Thermal Settings ============================
|
||||||
@@ -1301,6 +1301,8 @@
|
|||||||
|
|
||||||
//#define BROWSE_MEDIA_ON_INSERT // Open the file browser when media is inserted
|
//#define BROWSE_MEDIA_ON_INSERT // Open the file browser when media is inserted
|
||||||
|
|
||||||
|
//#define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu
|
||||||
|
|
||||||
#define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
|
#define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
|
||||||
|
|
||||||
#if ENABLED(PRINTER_EVENT_LEDS)
|
#if ENABLED(PRINTER_EVENT_LEDS)
|
||||||
@@ -1486,8 +1488,8 @@
|
|||||||
#if ENABLED(MULTI_VOLUME)
|
#if ENABLED(MULTI_VOLUME)
|
||||||
#define VOLUME_SD_ONBOARD
|
#define VOLUME_SD_ONBOARD
|
||||||
#define VOLUME_USB_FLASH_DRIVE
|
#define VOLUME_USB_FLASH_DRIVE
|
||||||
#define DEFAULT_VOLUME SD_ONBOARD
|
#define DEFAULT_VOLUME SV_SD_ONBOARD
|
||||||
#define DEFAULT_SHARED_VOLUME USB_FLASH_DRIVE
|
#define DEFAULT_SHARED_VOLUME SV_USB_FLASH_DRIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // SDSUPPORT
|
#endif // SDSUPPORT
|
||||||
@@ -2114,9 +2116,6 @@
|
|||||||
//#define SERIAL_XON_XOFF
|
//#define SERIAL_XON_XOFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add M575 G-code to change the baud rate
|
|
||||||
//#define BAUD_RATE_GCODE
|
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
// Enable this option to collect and display the maximum
|
// Enable this option to collect and display the maximum
|
||||||
// RX queue usage after transferring a file to SD.
|
// RX queue usage after transferring a file to SD.
|
||||||
@@ -2301,14 +2300,15 @@
|
|||||||
#endif // HAS_MULTI_EXTRUDER
|
#endif // HAS_MULTI_EXTRUDER
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advanced Pause
|
* Advanced Pause for Filament Change
|
||||||
* Experimental feature for filament change support and for parking the nozzle when paused.
|
* - Adds the G-code M600 Filament Change to initiate a filament change.
|
||||||
* Adds the GCode M600 for initiating filament change.
|
* - This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
|
||||||
* If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
|
|
||||||
*
|
*
|
||||||
* Requires an LCD display.
|
* Requirements:
|
||||||
* Requires NOZZLE_PARK_FEATURE.
|
* - For Filament Change parking enable and configure NOZZLE_PARK_FEATURE.
|
||||||
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
|
* - For user interaction enable an LCD display, HOST_PROMPT_SUPPORT, or EMERGENCY_PARSER.
|
||||||
|
*
|
||||||
|
* Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
|
||||||
*/
|
*/
|
||||||
//#define ADVANCED_PAUSE_FEATURE
|
//#define ADVANCED_PAUSE_FEATURE
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
@@ -3166,13 +3166,19 @@
|
|||||||
//#define AIR_EVACUATION // Cutter Vacuum / Laser Blower motor control with G-codes M10-M11
|
//#define AIR_EVACUATION // Cutter Vacuum / Laser Blower motor control with G-codes M10-M11
|
||||||
#if ENABLED(AIR_EVACUATION)
|
#if ENABLED(AIR_EVACUATION)
|
||||||
#define AIR_EVACUATION_ACTIVE LOW // Set to "HIGH" if the on/off function is active HIGH
|
#define AIR_EVACUATION_ACTIVE LOW // Set to "HIGH" if the on/off function is active HIGH
|
||||||
#define AIR_EVACUATION_PIN 42 // Override the default Cutter Vacuum or Laser Blower pin
|
//#define AIR_EVACUATION_PIN 42 // Override the default Cutter Vacuum or Laser Blower pin
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define SPINDLE_SERVO // A servo converting an angle to spindle power
|
//#define AIR_ASSIST // Air Assist control with G-codes M8-M9
|
||||||
|
#if ENABLED(AIR_ASSIST)
|
||||||
|
#define AIR_ASSIST_ACTIVE LOW // Active state on air assist pin
|
||||||
|
//#define AIR_ASSIST_PIN 44 // Override the default Air Assist pin
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#define SPINDLE_SERVO // A servo converting an angle to spindle power
|
||||||
#ifdef SPINDLE_SERVO
|
#ifdef SPINDLE_SERVO
|
||||||
#define SPINDLE_SERVO_NR 0 // Index of servo used for spindle control
|
#define SPINDLE_SERVO_NR 0 // Index of servo used for spindle control
|
||||||
#define SPINDLE_SERVO_MIN 10 // Minimum angle for servo spindle
|
#define SPINDLE_SERVO_MIN 10 // Minimum angle for servo spindle
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3409,6 +3415,11 @@
|
|||||||
*/
|
*/
|
||||||
#define AUTO_REPORT_TEMPERATURES
|
#define AUTO_REPORT_TEMPERATURES
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-report position with M154 S<seconds>
|
||||||
|
*/
|
||||||
|
//#define AUTO_REPORT_POSITION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Include capabilities in M115 output
|
* Include capabilities in M115 output
|
||||||
*/
|
*/
|
||||||
@@ -3478,7 +3489,7 @@
|
|||||||
#define PROPORTIONAL_FONT_RATIO 1.0
|
#define PROPORTIONAL_FONT_RATIO 1.0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spend 28 bytes of SRAM to optimize the GCode parser
|
* Spend 28 bytes of SRAM to optimize the G-code parser
|
||||||
*/
|
*/
|
||||||
#define FASTER_GCODE_PARSER
|
#define FASTER_GCODE_PARSER
|
||||||
|
|
||||||
@@ -3774,6 +3785,16 @@
|
|||||||
#define GANTRY_CALIBRATION_COMMANDS_POST "G28" // G28 highly recommended to ensure an accurate position
|
#define GANTRY_CALIBRATION_COMMANDS_POST "G28" // G28 highly recommended to ensure an accurate position
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instant freeze / unfreeze functionality
|
||||||
|
* Specified pin has pullup and connecting to ground will instantly pause motion.
|
||||||
|
* Potentially useful for emergency stop that allows being resumed.
|
||||||
|
*/
|
||||||
|
//#define FREEZE_FEATURE
|
||||||
|
#if ENABLED(FREEZE_FEATURE)
|
||||||
|
//#define FREEZE_PIN 41 // Override the default (KILL) pin here
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MAX7219 Debug Matrix
|
* MAX7219 Debug Matrix
|
||||||
*
|
*
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
/**
|
/**
|
||||||
* Marlin release version identifier
|
* Marlin release version identifier
|
||||||
*/
|
*/
|
||||||
//#define SHORT_BUILD_VERSION "bugfix-2.0.x"
|
//#define SHORT_BUILD_VERSION "2.0.8.2"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verbose version identifier which should contain a reference to the location
|
* Verbose version identifier which should contain a reference to the location
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
//#define STRING_DISTRIBUTION_DATE "2019-07-10"
|
//#define STRING_DISTRIBUTION_DATE "2021-05-29"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||||
|
@@ -93,28 +93,35 @@ typedef int8_t pin_t;
|
|||||||
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
|
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
|
||||||
#else
|
#else
|
||||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||||
#error "SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
#define MYSERIAL1 customizedSerial1
|
#define MYSERIAL1 customizedSerial1
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||||
#error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
#define MYSERIAL2 customizedSerial2
|
#define MYSERIAL2 customizedSerial2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
#if !WITHIN(SERIAL_PORT_3, -1, 3)
|
||||||
|
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
||||||
|
#endif
|
||||||
|
#define MYSERIAL3 customizedSerial3
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU2_SERIAL_PORT
|
||||||
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
|
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
|
||||||
#error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
#define MMU2_SERIAL mmuSerial
|
#define MMU2_SERIAL mmuSerial
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
||||||
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
#define LCD_SERIAL lcdSerial
|
#define LCD_SERIAL lcdSerial
|
||||||
#if HAS_DGUS_LCD
|
#if HAS_DGUS_LCD
|
||||||
|
@@ -567,7 +567,7 @@ ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _UDRE_vect)) {
|
|||||||
|
|
||||||
// Because of the template definition above, it's required to instantiate the template to have all methods generated
|
// Because of the template definition above, it's required to instantiate the template to have all methods generated
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
||||||
MSerialT customizedSerial1(MSerialT::HasEmergencyParser);
|
MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
|
|
||||||
@@ -582,7 +582,24 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser);
|
|||||||
|
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> >;
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> >;
|
||||||
MSerialT2 customizedSerial2(MSerialT2::HasEmergencyParser);
|
MSerialT2 customizedSerial2(MSerialT2::HasEmergencyParser);
|
||||||
#endif
|
|
||||||
|
#endif // SERIAL_PORT_2
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
|
||||||
|
// Hookup ISR handlers
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _RX_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_3>>::store_rxd_char();
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _UDRE_vect)) {
|
||||||
|
MarlinSerial<MarlinSerialCfg<SERIAL_PORT_3>>::_tx_udr_empty_irq();
|
||||||
|
}
|
||||||
|
|
||||||
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> >;
|
||||||
|
MSerialT3 customizedSerial3(MSerialT3::HasEmergencyParser);
|
||||||
|
|
||||||
|
#endif // SERIAL_PORT_3
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU2_SERIAL_PORT
|
||||||
|
|
||||||
@@ -595,8 +612,9 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser);
|
|||||||
}
|
}
|
||||||
|
|
||||||
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
template class MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> >;
|
||||||
MSerialT3 mmuSerial(MSerialT3::HasEmergencyParser);
|
MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser);
|
||||||
#endif
|
|
||||||
|
#endif // MMU2_SERIAL_PORT
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
|
|
||||||
@@ -609,7 +627,7 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser);
|
|||||||
}
|
}
|
||||||
|
|
||||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||||
MSerialT4 lcdSerial(MSerialT4::HasEmergencyParser);
|
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||||
|
|
||||||
#if HAS_DGUS_LCD
|
#if HAS_DGUS_LCD
|
||||||
template<typename Cfg>
|
template<typename Cfg>
|
||||||
@@ -622,13 +640,13 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // LCD_SERIAL_PORT
|
||||||
|
|
||||||
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
|
||||||
|
|
||||||
// For AT90USB targets use the UART for BT interfacing
|
// For AT90USB targets use the UART for BT interfacing
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||||
MSerialT5 bluetoothSerial(false);
|
MSerialBT bluetoothSerial(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __AVR__
|
#endif // __AVR__
|
||||||
|
@@ -238,14 +238,19 @@
|
|||||||
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT1;
|
||||||
extern MSerialT customizedSerial1;
|
extern MSerialT1 customizedSerial1;
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
||||||
extern MSerialT2 customizedSerial2;
|
extern MSerialT2 customizedSerial2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> > > MSerialT3;
|
||||||
|
extern MSerialT3 customizedSerial3;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // !USBCON
|
#endif // !USBCON
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU2_SERIAL_PORT
|
||||||
@@ -262,8 +267,8 @@
|
|||||||
static constexpr bool RX_OVERRUNS = false;
|
static constexpr bool RX_OVERRUNS = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialT3;
|
typedef Serial1Class< MarlinSerial< MMU2SerialCfg<MMU2_SERIAL_PORT> > > MSerialMMU2;
|
||||||
extern MSerialT3 mmuSerial;
|
extern MSerialMMU2 mmuSerial;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
@@ -281,12 +286,12 @@
|
|||||||
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialT4;
|
typedef Serial1Class< MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> > > MSerialLCD;
|
||||||
extern MSerialT4 lcdSerial;
|
extern MSerialLCD lcdSerial;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use the UART for Bluetooth in AT90USB configurations
|
// Use the UART for Bluetooth in AT90USB configurations
|
||||||
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
#if defined(USBCON) && ENABLED(BLUETOOTH)
|
||||||
typedef Serial1Class<HardwareSerial> MSerialT5;
|
typedef Serial1Class<HardwareSerial> MSerialBT;
|
||||||
extern MSerialT5 bluetoothSerial;
|
extern MSerialBT bluetoothSerial;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
// portModeRegister takes a different argument
|
// portModeRegister takes a different argument
|
||||||
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
#define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p)
|
||||||
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
#define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p)
|
||||||
#define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
|
#define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
|
||||||
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
#define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin))
|
||||||
|
|
||||||
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
#elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70
|
||||||
|
@@ -50,13 +50,12 @@ extern DefaultSerial4 MSerial3;
|
|||||||
#define _MSERIAL(X) MSerial##X
|
#define _MSERIAL(X) MSerial##X
|
||||||
#define MSERIAL(X) _MSERIAL(X)
|
#define MSERIAL(X) _MSERIAL(X)
|
||||||
|
|
||||||
// Define MYSERIAL1/2 before MarlinSerial includes!
|
|
||||||
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
#if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
#define MYSERIAL1 customizedSerial1
|
#define MYSERIAL1 customizedSerial1
|
||||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
#elif WITHIN(SERIAL_PORT, 0, 3)
|
||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||||
#else
|
#else
|
||||||
#error "The required SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "The required SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
@@ -65,7 +64,17 @@ extern DefaultSerial4 MSerial3;
|
|||||||
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
#elif WITHIN(SERIAL_PORT_2, 0, 3)
|
||||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||||
#else
|
#else
|
||||||
#error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
#if SERIAL_PORT_3 == -1 || ENABLED(EMERGENCY_PARSER)
|
||||||
|
#define MYSERIAL3 customizedSerial3
|
||||||
|
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
||||||
|
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||||
|
#else
|
||||||
|
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -78,12 +87,10 @@ extern DefaultSerial4 MSerial3;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LCD_SERIAL_PORT
|
#ifdef LCD_SERIAL_PORT
|
||||||
#if LCD_SERIAL_PORT == -1
|
#if WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||||
#define LCD_SERIAL lcdSerial
|
|
||||||
#elif WITHIN(LCD_SERIAL_PORT, 0, 3)
|
|
||||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||||
#else
|
#else
|
||||||
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -478,7 +478,7 @@ void MarlinSerial<Cfg>::flushTX() {
|
|||||||
// If not using the USB port as serial port
|
// If not using the USB port as serial port
|
||||||
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
||||||
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
|
||||||
MSerialT customizedSerial1(MarlinSerialCfg<SERIAL_PORT>::EMERGENCYPARSER);
|
MSerialT1 customizedSerial1(MarlinSerialCfg<SERIAL_PORT>::EMERGENCYPARSER);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
@@ -486,4 +486,9 @@ void MarlinSerial<Cfg>::flushTX() {
|
|||||||
MSerialT2 customizedSerial2(MarlinSerialCfg<SERIAL_PORT_2>::EMERGENCYPARSER);
|
MSerialT2 customizedSerial2(MarlinSerialCfg<SERIAL_PORT_2>::EMERGENCYPARSER);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SERIAL_PORT_3) && SERIAL_PORT_3 >= 0
|
||||||
|
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> >;
|
||||||
|
MSerialT3 customizedSerial3(MarlinSerialCfg<SERIAL_PORT_3>::EMERGENCYPARSER);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // ARDUINO_ARCH_SAM
|
#endif // ARDUINO_ARCH_SAM
|
||||||
|
@@ -141,11 +141,16 @@ struct MarlinSerialCfg {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT;
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT> > > MSerialT1;
|
||||||
extern MSerialT customizedSerial1;
|
extern MSerialT1 customizedSerial1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0
|
||||||
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_2> > > MSerialT2;
|
||||||
extern MSerialT2 customizedSerial2;
|
extern MSerialT2 customizedSerial2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SERIAL_PORT_3) && SERIAL_PORT_3 >= 0
|
||||||
|
typedef Serial1Class< MarlinSerial< MarlinSerialCfg<SERIAL_PORT_3> > > MSerialT3;
|
||||||
|
extern MSerialT3 customizedSerial3;
|
||||||
|
#endif
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#ifdef ARDUINO_ARCH_SAM
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MarlinSerial_Due.cpp - Hardware serial library for Arduino DUE
|
* MarlinSerial_Due.cpp - Hardware serial library for Arduino DUE
|
||||||
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
* Copyright (c) 2017 Eduardo José Tagle. All right reserved
|
||||||
* Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
* Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved.
|
||||||
*/
|
*/
|
||||||
#ifdef ARDUINO_ARCH_SAM
|
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ int MarlinSerialUSB::peek() {
|
|||||||
|
|
||||||
pending_char = udi_cdc_getc();
|
pending_char = udi_cdc_getc();
|
||||||
|
|
||||||
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT*>(this)->emergency_state, (char)pending_char));
|
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT1*>(this)->emergency_state, (char)pending_char));
|
||||||
|
|
||||||
return pending_char;
|
return pending_char;
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ int MarlinSerialUSB::read() {
|
|||||||
|
|
||||||
int c = udi_cdc_getc();
|
int c = udi_cdc_getc();
|
||||||
|
|
||||||
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT*>(this)->emergency_state, (char)c));
|
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast<MSerialT1*>(this)->emergency_state, (char)c));
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@@ -129,10 +129,13 @@ size_t MarlinSerialUSB::write(const uint8_t c) {
|
|||||||
|
|
||||||
// Preinstantiate
|
// Preinstantiate
|
||||||
#if SERIAL_PORT == -1
|
#if SERIAL_PORT == -1
|
||||||
MSerialT customizedSerial1(TERN0(EMERGENCY_PARSER, true));
|
MSerialT1 customizedSerial1(TERN0(EMERGENCY_PARSER, true));
|
||||||
#endif
|
#endif
|
||||||
#if SERIAL_PORT_2 == -1
|
#if SERIAL_PORT_2 == -1
|
||||||
MSerialT customizedSerial2(TERN0(EMERGENCY_PARSER, true));
|
MSerialT2 customizedSerial2(TERN0(EMERGENCY_PARSER, true));
|
||||||
|
#endif
|
||||||
|
#if SERIAL_PORT_3 == -1
|
||||||
|
MSerialT3 customizedSerial3(TERN0(EMERGENCY_PARSER, true));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_USB_SERIAL
|
#endif // HAS_USB_SERIAL
|
||||||
|
@@ -27,11 +27,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
#if HAS_USB_SERIAL
|
|
||||||
|
|
||||||
#include <WString.h>
|
|
||||||
#include "../../core/serial_hook.h"
|
#include "../../core/serial_hook.h"
|
||||||
|
|
||||||
|
#include <WString.h>
|
||||||
|
|
||||||
struct MarlinSerialUSB {
|
struct MarlinSerialUSB {
|
||||||
void begin(const long);
|
void begin(const long);
|
||||||
@@ -50,14 +48,18 @@ struct MarlinSerialUSB {
|
|||||||
FORCE_INLINE int rxMaxEnqueued() { return 0; }
|
FORCE_INLINE int rxMaxEnqueued() { return 0; }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
typedef Serial1Class<MarlinSerialUSB> MSerialT;
|
|
||||||
|
|
||||||
#if SERIAL_PORT == -1
|
#if SERIAL_PORT == -1
|
||||||
extern MSerialT customizedSerial1;
|
typedef Serial1Class<MarlinSerialUSB> MSerialT1;
|
||||||
|
extern MSerialT1 customizedSerial1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SERIAL_PORT_2 == -1
|
#if SERIAL_PORT_2 == -1
|
||||||
extern MSerialT customizedSerial2;
|
typedef Serial1Class<MarlinSerialUSB> MSerialT2;
|
||||||
|
extern MSerialT2 customizedSerial2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAS_USB_SERIAL
|
#if SERIAL_PORT_3 == -1
|
||||||
|
typedef Serial1Class<MarlinSerialUSB> MSerialT3;
|
||||||
|
extern MSerialT3 customizedSerial3;
|
||||||
|
#endif
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
* For ARDUINO_ARCH_SAM
|
* For ARDUINO_ARCH_SAM
|
||||||
* Note the code here was specifically crafted by disassembling what GCC produces
|
* Note the code here was specifically crafted by disassembling what GCC produces
|
||||||
* out of it, so GCC is able to optimize it out as much as possible to the least
|
* out of it, so GCC is able to optimize it out as much as possible to the least
|
||||||
* amount of instructions. Be very carefull if you modify them, as "clean code"
|
* amount of instructions. Be very careful if you modify them, as "clean code"
|
||||||
* leads to less efficient compiled code!!
|
* leads to less efficient compiled code!!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include "wifi.h"
|
#include "wifi.h"
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
|
|
||||||
MSerialT webSocketSerial(false);
|
MSerialWebSocketT webSocketSerial(false);
|
||||||
AsyncWebSocket ws("/ws"); // TODO Move inside the class.
|
AsyncWebSocket ws("/ws"); // TODO Move inside the class.
|
||||||
|
|
||||||
// RingBuffer impl
|
// RingBuffer impl
|
||||||
|
@@ -81,5 +81,5 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serial1Class<WebSocketSerial> MSerialT;
|
typedef Serial1Class<WebSocketSerial> MSerialWebSocketT;
|
||||||
extern MSerialT webSocketSerial;
|
extern MSerialWebSocketT webSocketSerial;
|
||||||
|
@@ -84,6 +84,16 @@ extern DefaultSerial1 USBSerial;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
#if SERIAL_PORT_3 == -1
|
||||||
|
#define MYSERIAL3 USBSerial
|
||||||
|
#elif WITHIN(SERIAL_PORT_3, 0, 3)
|
||||||
|
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||||
|
#else
|
||||||
|
#error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU2_SERIAL_PORT
|
||||||
#if MMU2_SERIAL_PORT == -1
|
#if MMU2_SERIAL_PORT == -1
|
||||||
#define MMU2_SERIAL USBSerial
|
#define MMU2_SERIAL USBSerial
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifdef TARGET_LPC1768
|
#ifdef TARGET_LPC1768
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#if ENABLED(POSTMORTEM_DEBUGGING)
|
#if ENABLED(POSTMORTEM_DEBUGGING)
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if USING_HW_SERIAL0
|
#if USING_HW_SERIAL0
|
||||||
MarlinSerial _MSerial(LPC_UART0);
|
MarlinSerial _MSerial0(LPC_UART0);
|
||||||
MSerialT MSerial0(true, _MSerial);
|
MSerialT MSerial0(true, _MSerial0);
|
||||||
extern "C" void UART0_IRQHandler() { _MSerial.IRQHandler(); }
|
extern "C" void UART0_IRQHandler() { _MSerial0.IRQHandler(); }
|
||||||
#endif
|
#endif
|
||||||
#if USING_HW_SERIAL1
|
#if USING_HW_SERIAL1
|
||||||
MarlinSerial _MSerial1((LPC_UART_TypeDef *) LPC_UART1);
|
MarlinSerial _MSerial1((LPC_UART_TypeDef *) LPC_UART1);
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
// Need to figure out which serial port we are and react in consequence (Marlin does not have CONTAINER_OF macro)
|
// Need to figure out which serial port we are and react in consequence (Marlin does not have CONTAINER_OF macro)
|
||||||
if (false) {}
|
if (false) {}
|
||||||
#if USING_HW_SERIAL0
|
#if USING_HW_SERIAL0
|
||||||
else if (this == &_MSerial) emergency_parser.update(MSerial0.emergency_state, c);
|
else if (this == &_MSerial0) emergency_parser.update(MSerial0.emergency_state, c);
|
||||||
#endif
|
#endif
|
||||||
#if USING_HW_SERIAL1
|
#if USING_HW_SERIAL1
|
||||||
else if (this == &_MSerial1) emergency_parser.update(MSerial1.emergency_state, c);
|
else if (this == &_MSerial1) emergency_parser.update(MSerial1.emergency_state, c);
|
||||||
|
@@ -60,8 +60,8 @@ extern MSerialT MSerial1;
|
|||||||
extern MSerialT MSerial2;
|
extern MSerialT MSerial2;
|
||||||
extern MSerialT MSerial3;
|
extern MSerialT MSerial3;
|
||||||
|
|
||||||
// Consequently, we can't use a RuntimeSerial either. The workaround would be to use a RuntimeSerial<ForwardSerial<MarlinSerial>> type here
|
// Consequently, we can't use a RuntimeSerial either. The workaround would be to use
|
||||||
// Right now, let's ignore this until it's actually required.
|
// a RuntimeSerial<ForwardSerial<MarlinSerial>> type here. Ignore for now until it's actually required.
|
||||||
#if ENABLED(SERIAL_RUNTIME_HOOK)
|
#if ENABLED(SERIAL_RUNTIME_HOOK)
|
||||||
#error "SERIAL_RUNTIME_HOOK is not yet supported for LPC176x."
|
#error "SERIAL_RUNTIME_HOOK is not yet supported for LPC176x."
|
||||||
#endif
|
#endif
|
||||||
|
@@ -144,7 +144,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o
|
|||||||
#error "Serial port pins (2) conflict with Z4 pins!"
|
#error "Serial port pins (2) conflict with Z4 pins!"
|
||||||
#elif ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
|
#elif ANY_RX(2, X_DIR_PIN, Y_DIR_PIN)
|
||||||
#error "Serial port pins (2) conflict with other pins!"
|
#error "Serial port pins (2) conflict with other pins!"
|
||||||
#elif Y_HOME_DIR < 0 && IS_TX2(Y_STOP_PIN)
|
#elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN)
|
||||||
#error "Serial port pins (2) conflict with Y endstop pin!"
|
#error "Serial port pins (2) conflict with Y endstop pin!"
|
||||||
#elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
|
#elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN)
|
||||||
#error "Serial port pins (2) conflict with probe pin!"
|
#error "Serial port pins (2) conflict with probe pin!"
|
||||||
|
@@ -117,7 +117,7 @@ void HAL_init() {
|
|||||||
PinCfg.Pinmode = 2; // no pull-up/pull-down
|
PinCfg.Pinmode = 2; // no pull-up/pull-down
|
||||||
PINSEL_ConfigPin(&PinCfg);
|
PINSEL_ConfigPin(&PinCfg);
|
||||||
// now set CLKOUT_EN bit
|
// now set CLKOUT_EN bit
|
||||||
LPC_SC->CLKOUTCFG |= (1<<8);
|
SBI(LPC_SC->CLKOUTCFG, 8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
USB_Init(); // USB Initialization
|
USB_Init(); // USB Initialization
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS
|
#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
|
||||||
|
|
||||||
#include "xpt2046.h"
|
#include "xpt2046.h"
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
|
@@ -20,101 +20,104 @@ def print_error(e):
|
|||||||
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
|
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
|
||||||
%(e, env.get('PIOENV')))
|
%(e, env.get('PIOENV')))
|
||||||
|
|
||||||
try:
|
def before_upload(source, target, env):
|
||||||
#
|
try:
|
||||||
# Find a disk for upload
|
|
||||||
#
|
|
||||||
upload_disk = 'Disk not found'
|
|
||||||
target_file_found = False
|
|
||||||
target_drive_found = False
|
|
||||||
if current_OS == 'Windows':
|
|
||||||
#
|
#
|
||||||
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
|
# Find a disk for upload
|
||||||
# Windows - doesn't care about the disk's name, only cares about the drive letter
|
#
|
||||||
import subprocess,string
|
upload_disk = 'Disk not found'
|
||||||
from ctypes import windll
|
target_file_found = False
|
||||||
|
target_drive_found = False
|
||||||
|
if current_OS == 'Windows':
|
||||||
|
#
|
||||||
|
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
|
||||||
|
# Windows - doesn't care about the disk's name, only cares about the drive letter
|
||||||
|
import subprocess,string
|
||||||
|
from ctypes import windll
|
||||||
|
|
||||||
# getting list of drives
|
# getting list of drives
|
||||||
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
|
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
|
||||||
drives = []
|
drives = []
|
||||||
bitmask = windll.kernel32.GetLogicalDrives()
|
bitmask = windll.kernel32.GetLogicalDrives()
|
||||||
for letter in string.ascii_uppercase:
|
for letter in string.ascii_uppercase:
|
||||||
if bitmask & 1:
|
if bitmask & 1:
|
||||||
drives.append(letter)
|
drives.append(letter)
|
||||||
bitmask >>= 1
|
bitmask >>= 1
|
||||||
|
|
||||||
for drive in drives:
|
for drive in drives:
|
||||||
final_drive_name = drive + ':\\'
|
final_drive_name = drive + ':\\'
|
||||||
# print ('disc check: {}'.format(final_drive_name))
|
# print ('disc check: {}'.format(final_drive_name))
|
||||||
try:
|
try:
|
||||||
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print ('error:{}'.format(e))
|
print ('error:{}'.format(e))
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
|
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
|
||||||
target_drive_found = True
|
target_drive_found = True
|
||||||
upload_disk = final_drive_name
|
|
||||||
if target_filename in volume_info:
|
|
||||||
if not target_file_found:
|
|
||||||
upload_disk = final_drive_name
|
upload_disk = final_drive_name
|
||||||
target_file_found = True
|
if target_filename in volume_info:
|
||||||
|
if not target_file_found:
|
||||||
|
upload_disk = final_drive_name
|
||||||
|
target_file_found = True
|
||||||
|
|
||||||
elif current_OS == 'Linux':
|
elif current_OS == 'Linux':
|
||||||
#
|
#
|
||||||
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
|
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
|
||||||
#
|
#
|
||||||
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
|
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
|
||||||
if target_drive in drives: # If target drive is found, use it.
|
if target_drive in drives: # If target drive is found, use it.
|
||||||
target_drive_found = True
|
target_drive_found = True
|
||||||
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
|
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
|
||||||
else:
|
else:
|
||||||
|
for drive in drives:
|
||||||
|
try:
|
||||||
|
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
if target_filename in files:
|
||||||
|
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
|
||||||
|
target_file_found = True
|
||||||
|
break
|
||||||
|
#
|
||||||
|
# set upload_port to drive if found
|
||||||
|
#
|
||||||
|
|
||||||
|
if target_file_found or target_drive_found:
|
||||||
|
env.Replace(
|
||||||
|
UPLOAD_FLAGS="-P$UPLOAD_PORT"
|
||||||
|
)
|
||||||
|
|
||||||
|
elif current_OS == 'Darwin': # MAC
|
||||||
|
#
|
||||||
|
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
|
||||||
|
#
|
||||||
|
drives = os.listdir('/Volumes') # human readable names
|
||||||
|
if target_drive in drives and not target_file_found: # set upload if not found target file yet
|
||||||
|
target_drive_found = True
|
||||||
|
upload_disk = '/Volumes/' + target_drive + '/'
|
||||||
for drive in drives:
|
for drive in drives:
|
||||||
try:
|
try:
|
||||||
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
|
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if target_filename in files:
|
if target_filename in filenames:
|
||||||
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
|
if not target_file_found:
|
||||||
|
upload_disk = '/Volumes/' + drive + '/'
|
||||||
target_file_found = True
|
target_file_found = True
|
||||||
break
|
|
||||||
#
|
|
||||||
# set upload_port to drive if found
|
|
||||||
#
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set upload_port to drive if found
|
||||||
|
#
|
||||||
if target_file_found or target_drive_found:
|
if target_file_found or target_drive_found:
|
||||||
env.Replace(
|
env.Replace(UPLOAD_PORT=upload_disk)
|
||||||
UPLOAD_FLAGS="-P$UPLOAD_PORT"
|
print('\nUpload disk: ', upload_disk, '\n')
|
||||||
)
|
else:
|
||||||
|
print_error('Autodetect Error')
|
||||||
|
|
||||||
elif current_OS == 'Darwin': # MAC
|
except Exception as e:
|
||||||
#
|
print_error(str(e))
|
||||||
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
|
|
||||||
#
|
|
||||||
drives = os.listdir('/Volumes') # human readable names
|
|
||||||
if target_drive in drives and not target_file_found: # set upload if not found target file yet
|
|
||||||
target_drive_found = True
|
|
||||||
upload_disk = '/Volumes/' + target_drive + '/'
|
|
||||||
for drive in drives:
|
|
||||||
try:
|
|
||||||
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
|
|
||||||
except:
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
if target_filename in filenames:
|
|
||||||
if not target_file_found:
|
|
||||||
upload_disk = '/Volumes/' + drive + '/'
|
|
||||||
target_file_found = True
|
|
||||||
|
|
||||||
#
|
env.AddPreAction("upload", before_upload)
|
||||||
# Set upload_port to drive if found
|
|
||||||
#
|
|
||||||
if target_file_found or target_drive_found:
|
|
||||||
env.Replace(UPLOAD_PORT=upload_disk)
|
|
||||||
print('\nUpload disk: ', upload_disk, '\n')
|
|
||||||
else:
|
|
||||||
print_error('Autodetect Error')
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print_error(str(e))
|
|
||||||
|
@@ -43,8 +43,6 @@
|
|||||||
extern DefaultSerial4 MSerial3;
|
extern DefaultSerial4 MSerial3;
|
||||||
extern DefaultSerial5 MSerial4;
|
extern DefaultSerial5 MSerial4;
|
||||||
|
|
||||||
// MYSERIAL1 required before MarlinSerial includes!
|
|
||||||
|
|
||||||
#define __MSERIAL(X) MSerial##X
|
#define __MSERIAL(X) MSerial##X
|
||||||
#define _MSERIAL(X) __MSERIAL(X)
|
#define _MSERIAL(X) __MSERIAL(X)
|
||||||
#define MSERIAL(X) _MSERIAL(INCREMENT(X))
|
#define MSERIAL(X) _MSERIAL(INCREMENT(X))
|
||||||
|
@@ -96,6 +96,12 @@ void HAL_init() {
|
|||||||
#if HAS_SD_HOST_DRIVE
|
#if HAS_SD_HOST_DRIVE
|
||||||
MSC_SD_init(); // Enable USB SD card access
|
MSC_SD_init(); // Enable USB SD card access
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if PIN_EXISTS(USB_CONNECT)
|
||||||
|
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
|
||||||
|
delay(1000); // Give OS time to notice
|
||||||
|
WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// HAL idle task
|
// HAL idle task
|
||||||
|
@@ -37,6 +37,9 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// Serial Ports
|
||||||
|
//
|
||||||
#ifdef USBCON
|
#ifdef USBCON
|
||||||
#include <USBSerial.h>
|
#include <USBSerial.h>
|
||||||
#include "../../core/serial_hook.h"
|
#include "../../core/serial_hook.h"
|
||||||
@@ -44,9 +47,6 @@
|
|||||||
extern DefaultSerial1 MSerial0;
|
extern DefaultSerial1 MSerial0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// Defines
|
|
||||||
// ------------------------
|
|
||||||
#define _MSERIAL(X) MSerial##X
|
#define _MSERIAL(X) MSerial##X
|
||||||
#define MSERIAL(X) _MSERIAL(X)
|
#define MSERIAL(X) _MSERIAL(X)
|
||||||
|
|
||||||
@@ -68,6 +68,16 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
#if SERIAL_PORT_3 == -1
|
||||||
|
#define MYSERIAL3 MSerial0
|
||||||
|
#elif WITHIN(SERIAL_PORT_3, 1, 6)
|
||||||
|
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||||
|
#else
|
||||||
|
#error "SERIAL_PORT_3 must be from 1 to 6. You can also use -1 if the board supports Native USB."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MMU2_SERIAL_PORT
|
#ifdef MMU2_SERIAL_PORT
|
||||||
#if MMU2_SERIAL_PORT == -1
|
#if MMU2_SERIAL_PORT == -1
|
||||||
#define MMU2_SERIAL MSerial0
|
#define MMU2_SERIAL MSerial0
|
||||||
|
@@ -71,8 +71,8 @@ static void TXBegin() {
|
|||||||
volatile uint32_t ICER[32];
|
volatile uint32_t ICER[32];
|
||||||
};
|
};
|
||||||
|
|
||||||
NVICMin * nvicBase = (NVICMin*)0xE000E100;
|
NVICMin *nvicBase = (NVICMin*)0xE000E100;
|
||||||
nvicBase->ICER[nvicIndex / 32] |= _BV32(nvicIndex % 32);
|
SBI32(nvicBase->ICER[nvicIndex >> 5], nvicIndex & 0x1F);
|
||||||
|
|
||||||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
return &card.media_usbFlashDrive;
|
return &card.media_usbFlashDrive;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
return diskIODriver();
|
return card.diskIODriver();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
202
Marlin/src/HAL/STM32/tft/gt911.cpp
Normal file
202
Marlin/src/HAL/STM32/tft/gt911.cpp
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#if ENABLED(TFT_TOUCH_DEVICE_GT911)
|
||||||
|
|
||||||
|
#include "gt911.h"
|
||||||
|
#include "pinconfig.h"
|
||||||
|
|
||||||
|
SW_IIC::SW_IIC(uint16_t sda, uint16_t scl) {
|
||||||
|
scl_pin = scl;
|
||||||
|
sda_pin = sda;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Software I2C hardware io init
|
||||||
|
void SW_IIC::init() {
|
||||||
|
OUT_WRITE(scl_pin, HIGH);
|
||||||
|
OUT_WRITE(sda_pin, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Software I2C start signal
|
||||||
|
void SW_IIC::start() {
|
||||||
|
write_sda(HIGH); // SDA = 1
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
iic_delay(2);
|
||||||
|
write_sda(LOW); // SDA = 0
|
||||||
|
iic_delay(1);
|
||||||
|
write_scl(LOW); // SCL = 0 // keep SCL low, avoid false stop caused by level jump caused by SDA switching IN/OUT
|
||||||
|
}
|
||||||
|
|
||||||
|
// Software I2C stop signal
|
||||||
|
void SW_IIC::stop() {
|
||||||
|
write_scl(LOW); // SCL = 0
|
||||||
|
iic_delay(2);
|
||||||
|
write_sda(LOW); // SDA = 0
|
||||||
|
iic_delay(2);
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
iic_delay(2);
|
||||||
|
write_sda(HIGH); // SDA = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// Software I2C sends ACK or NACK signal
|
||||||
|
void SW_IIC::send_ack(bool ack) {
|
||||||
|
write_sda(ack ? LOW : HIGH); // SDA = !ack
|
||||||
|
iic_delay(2);
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
iic_delay(2);
|
||||||
|
write_scl(LOW); // SCL = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// Software I2C read ACK or NACK signal
|
||||||
|
bool SW_IIC::read_ack() {
|
||||||
|
bool error = 0;
|
||||||
|
set_sda_in();
|
||||||
|
|
||||||
|
iic_delay(2);
|
||||||
|
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
error = read_sda();
|
||||||
|
|
||||||
|
iic_delay(2);
|
||||||
|
|
||||||
|
write_scl(LOW); // SCL = 0
|
||||||
|
|
||||||
|
set_sda_out();
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SW_IIC::send_byte(uint8_t txd) {
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
write_sda(txd & 0x80); // write data bit
|
||||||
|
txd <<= 1;
|
||||||
|
iic_delay(1);
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
iic_delay(2);
|
||||||
|
write_scl(LOW); // SCL = 0
|
||||||
|
iic_delay(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
read_ack(); // wait ack
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t SW_IIC::read_byte(bool ack) {
|
||||||
|
uint8_t data = 0;
|
||||||
|
|
||||||
|
set_sda_in();
|
||||||
|
LOOP_L_N(i, 8) {
|
||||||
|
write_scl(HIGH); // SCL = 1
|
||||||
|
iic_delay(1);
|
||||||
|
data <<= 1;
|
||||||
|
if (read_sda()) data++;
|
||||||
|
write_scl(LOW); // SCL = 0
|
||||||
|
iic_delay(2);
|
||||||
|
}
|
||||||
|
set_sda_out();
|
||||||
|
|
||||||
|
send_ack(ack);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
GT911_REG_MAP GT911::reg;
|
||||||
|
SW_IIC GT911::sw_iic = SW_IIC(GT911_SW_I2C_SDA_PIN, GT911_SW_I2C_SCL_PIN);
|
||||||
|
|
||||||
|
void GT911::write_reg(uint16_t reg, uint8_t reg_len, uint8_t* w_data, uint8_t w_len) {
|
||||||
|
sw_iic.start();
|
||||||
|
sw_iic.send_byte(gt911_slave_address); // Set IIC Slave address
|
||||||
|
LOOP_L_N(i, reg_len) { // Set reg address
|
||||||
|
uint8_t r = (reg >> (8 * (reg_len - 1 - i))) & 0xFF;
|
||||||
|
sw_iic.send_byte(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOOP_L_N(i, w_len) { // Write data to reg
|
||||||
|
sw_iic.send_byte(w_data[i]);
|
||||||
|
}
|
||||||
|
sw_iic.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GT911::read_reg(uint16_t reg, uint8_t reg_len, uint8_t* r_data, uint8_t r_len) {
|
||||||
|
sw_iic.start();
|
||||||
|
sw_iic.send_byte(gt911_slave_address); // Set IIC Slave address
|
||||||
|
LOOP_L_N(i, reg_len) { // Set reg address
|
||||||
|
uint8_t r = (reg >> (8 * (reg_len - 1 - i))) & 0xFF;
|
||||||
|
sw_iic.send_byte(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
sw_iic.start();
|
||||||
|
sw_iic.send_byte(gt911_slave_address + 1); // Set read mode
|
||||||
|
|
||||||
|
LOOP_L_N(i, r_len) {
|
||||||
|
r_data[i] = sw_iic.read_byte(1); // Read data from reg
|
||||||
|
}
|
||||||
|
sw_iic.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GT911::Init() {
|
||||||
|
OUT_WRITE(GT911_RST_PIN, LOW);
|
||||||
|
OUT_WRITE(GT911_INT_PIN, LOW);
|
||||||
|
delay(20);
|
||||||
|
WRITE(GT911_RST_PIN, HIGH);
|
||||||
|
SET_INPUT(GT911_INT_PIN);
|
||||||
|
|
||||||
|
sw_iic.init();
|
||||||
|
|
||||||
|
uint8_t clear_reg = 0x0000;
|
||||||
|
write_reg(0x814E, 2, &clear_reg, 2); // Reset to 0 for start
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GT911::getFirstTouchPoint(int16_t *x, int16_t *y) {
|
||||||
|
read_reg(0x814E, 2, ®.REG.status, 1);
|
||||||
|
|
||||||
|
if (reg.REG.status & 0x80) {
|
||||||
|
uint8_t clear_reg = 0x00;
|
||||||
|
write_reg(0x814E, 2, &clear_reg, 1); // Reset to 0 for start
|
||||||
|
read_reg(0x8150, 2, reg.map + 2, 8 * (reg.REG.status & 0x0F));
|
||||||
|
|
||||||
|
// First touch point
|
||||||
|
*x = ((reg.REG.point[0].xh & 0x0F) << 8) | reg.REG.point[0].xl;
|
||||||
|
*y = ((reg.REG.point[0].yh & 0x0F) << 8) | reg.REG.point[0].yl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GT911::getPoint(int16_t *x, int16_t *y) {
|
||||||
|
static bool touched = 0;
|
||||||
|
static int16_t read_x = 0, read_y = 0;
|
||||||
|
static millis_t next_time = 0;
|
||||||
|
|
||||||
|
if (ELAPSED(millis(), next_time)) {
|
||||||
|
touched = getFirstTouchPoint(&read_x, &read_y);
|
||||||
|
next_time = millis() + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
*x = read_x;
|
||||||
|
*y = read_y;
|
||||||
|
return touched;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TFT_TOUCH_DEVICE_GT911
|
||||||
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
120
Marlin/src/HAL/STM32/tft/gt911.h
Normal file
120
Marlin/src/HAL/STM32/tft/gt911.h
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/**
|
||||||
|
* Marlin 3D Printer Firmware
|
||||||
|
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||||
|
*
|
||||||
|
* Based on Sprinter and grbl.
|
||||||
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
|
#define GT911_SLAVE_ADDRESS 0xBA
|
||||||
|
|
||||||
|
#if !PIN_EXISTS(GT911_RST)
|
||||||
|
#error "GT911_RST_PIN is not defined."
|
||||||
|
#elif !PIN_EXISTS(GT911_INT)
|
||||||
|
#error "GT911_INT_PIN is not defined."
|
||||||
|
#elif !PIN_EXISTS(GT911_SW_I2C_SCL)
|
||||||
|
#error "GT911_SW_I2C_SCL_PIN is not defined."
|
||||||
|
#elif !PIN_EXISTS(GT911_SW_I2C_SDA)
|
||||||
|
#error "GT911_SW_I2C_SDA_PIN is not defined."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class SW_IIC {
|
||||||
|
private:
|
||||||
|
uint16_t scl_pin;
|
||||||
|
uint16_t sda_pin;
|
||||||
|
void write_scl(bool level)
|
||||||
|
{
|
||||||
|
WRITE(scl_pin, level);
|
||||||
|
}
|
||||||
|
void write_sda(bool level)
|
||||||
|
{
|
||||||
|
WRITE(sda_pin, level);
|
||||||
|
}
|
||||||
|
bool read_sda()
|
||||||
|
{
|
||||||
|
return READ(sda_pin);
|
||||||
|
}
|
||||||
|
void set_sda_out()
|
||||||
|
{
|
||||||
|
SET_OUTPUT(sda_pin);
|
||||||
|
}
|
||||||
|
void set_sda_in()
|
||||||
|
{
|
||||||
|
SET_INPUT_PULLUP(sda_pin);
|
||||||
|
}
|
||||||
|
static void iic_delay(uint8_t t)
|
||||||
|
{
|
||||||
|
delayMicroseconds(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
SW_IIC(uint16_t sda, uint16_t scl);
|
||||||
|
// setSCL/SDA have to be called before begin()
|
||||||
|
void setSCL(uint16_t scl)
|
||||||
|
{
|
||||||
|
scl_pin = scl;
|
||||||
|
};
|
||||||
|
void setSDA(uint16_t sda)
|
||||||
|
{
|
||||||
|
sda_pin = sda;
|
||||||
|
};
|
||||||
|
void init(); // Initialize the IO port of IIC
|
||||||
|
void start(); // Send IIC start signal
|
||||||
|
void stop(); // Send IIC stop signal
|
||||||
|
void send_byte(uint8_t txd); // IIC sends a byte
|
||||||
|
uint8_t read_byte(bool ack); // IIC reads a byte
|
||||||
|
void send_ack(bool ack); // IIC sends ACK or NACK signal
|
||||||
|
bool read_ack();
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct __attribute__((__packed__)) {
|
||||||
|
uint8_t xl;
|
||||||
|
uint8_t xh;
|
||||||
|
uint8_t yl;
|
||||||
|
uint8_t yh;
|
||||||
|
uint8_t sizel;
|
||||||
|
uint8_t sizeh;
|
||||||
|
uint8_t reserved;
|
||||||
|
uint8_t track_id;
|
||||||
|
} GT911_POINT;
|
||||||
|
|
||||||
|
typedef union __attribute__((__packed__)) {
|
||||||
|
uint8_t map[42];
|
||||||
|
struct {
|
||||||
|
uint8_t status; // 0x814E
|
||||||
|
uint8_t track_id; // 0x814F
|
||||||
|
|
||||||
|
GT911_POINT point[5]; // [0]:0x8150 - 0x8157 / [1]:0x8158 - 0x815F / [2]:0x8160 - 0x8167 / [3]:0x8168 - 0x816F / [4]:0x8170 - 0x8177
|
||||||
|
} REG;
|
||||||
|
} GT911_REG_MAP;
|
||||||
|
|
||||||
|
class GT911 {
|
||||||
|
private:
|
||||||
|
static const uint8_t gt911_slave_address = GT911_SLAVE_ADDRESS;
|
||||||
|
static GT911_REG_MAP reg;
|
||||||
|
static SW_IIC sw_iic;
|
||||||
|
static void write_reg(uint16_t reg, uint8_t reg_len, uint8_t* w_data, uint8_t w_len);
|
||||||
|
static void read_reg(uint16_t reg, uint8_t reg_len, uint8_t* r_data, uint8_t r_len);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void Init();
|
||||||
|
static bool getFirstTouchPoint(int16_t *x, int16_t *y);
|
||||||
|
static bool getPoint(int16_t *x, int16_t *y);
|
||||||
|
};
|
@@ -45,7 +45,6 @@
|
|||||||
#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
|
#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
|
||||||
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
|
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
|
||||||
|
|
||||||
|
|
||||||
void SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command) {
|
void SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command) {
|
||||||
|
|
||||||
__IO uint32_t tmpmrd =0;
|
__IO uint32_t tmpmrd =0;
|
||||||
@@ -192,7 +191,7 @@ void LTDC_Config() {
|
|||||||
|
|
||||||
hltdc_F.Instance = LTDC;
|
hltdc_F.Instance = LTDC;
|
||||||
|
|
||||||
/* Layer0 Configuration ------------------------------------------------------*/
|
/* Layer0 Configuration ------------------------------------------------------*/
|
||||||
|
|
||||||
/* Windowing configuration */
|
/* Windowing configuration */
|
||||||
pLayerCfg.WindowX0 = 0;
|
pLayerCfg.WindowX0 = 0;
|
||||||
@@ -289,22 +288,21 @@ void TFT_LTDC::DrawRect(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint
|
|||||||
uint16_t offline = TFT_WIDTH - (ex - sx);
|
uint16_t offline = TFT_WIDTH - (ex - sx);
|
||||||
uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx];
|
uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx];
|
||||||
|
|
||||||
DMA2D->CR &= ~(1 << 0);
|
CBI(DMA2D->CR, 0);
|
||||||
DMA2D->CR = 3 << 16;
|
DMA2D->CR = 3 << 16;
|
||||||
DMA2D->OPFCCR = 0X02;
|
DMA2D->OPFCCR = 0X02;
|
||||||
DMA2D->OOR = offline;
|
DMA2D->OOR = offline;
|
||||||
DMA2D->OMAR = addr;
|
DMA2D->OMAR = addr;
|
||||||
DMA2D->NLR = (ey - sy) | ((ex - sx) << 16);
|
DMA2D->NLR = (ey - sy) | ((ex - sx) << 16);
|
||||||
DMA2D->OCOLR = color;
|
DMA2D->OCOLR = color;
|
||||||
DMA2D->CR |= 1<<0;
|
SBI(DMA2D->CR, 0);
|
||||||
|
|
||||||
uint32_t timeout = 0;
|
uint32_t timeout = 0;
|
||||||
while((DMA2D->ISR & (1<<1)) == 0)
|
while (!TEST(DMA2D->ISR, 1)) {
|
||||||
{
|
|
||||||
timeout++;
|
timeout++;
|
||||||
if(timeout>0X1FFFFF)break;
|
if (timeout > 0x1FFFFF) break;
|
||||||
}
|
}
|
||||||
DMA2D->IFCR |= 1<<1;
|
SBI(DMA2D->IFCR, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFT_LTDC::DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t *colors) {
|
void TFT_LTDC::DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t *colors) {
|
||||||
@@ -314,7 +312,7 @@ void TFT_LTDC::DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uin
|
|||||||
uint16_t offline = TFT_WIDTH - (ex - sx);
|
uint16_t offline = TFT_WIDTH - (ex - sx);
|
||||||
uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx];
|
uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx];
|
||||||
|
|
||||||
DMA2D->CR &= ~(1 << 0);
|
CBI(DMA2D->CR, 0);
|
||||||
DMA2D->CR = 0 << 16;
|
DMA2D->CR = 0 << 16;
|
||||||
DMA2D->FGPFCCR = 0X02;
|
DMA2D->FGPFCCR = 0X02;
|
||||||
DMA2D->FGOR = 0;
|
DMA2D->FGOR = 0;
|
||||||
@@ -322,15 +320,14 @@ void TFT_LTDC::DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uin
|
|||||||
DMA2D->FGMAR = (uint32_t)colors;
|
DMA2D->FGMAR = (uint32_t)colors;
|
||||||
DMA2D->OMAR = addr;
|
DMA2D->OMAR = addr;
|
||||||
DMA2D->NLR = (ey - sy) | ((ex - sx) << 16);
|
DMA2D->NLR = (ey - sy) | ((ex - sx) << 16);
|
||||||
DMA2D->CR |= 1<<0;
|
SBI(DMA2D->CR, 0);
|
||||||
|
|
||||||
uint32_t timeout = 0;
|
uint32_t timeout = 0;
|
||||||
while((DMA2D->ISR & (1<<1)) == 0)
|
while (!TEST(DMA2D->ISR, 1)) {
|
||||||
{
|
|
||||||
timeout++;
|
timeout++;
|
||||||
if(timeout>0X1FFFFF)break;
|
if (timeout > 0x1FFFFF) break;
|
||||||
}
|
}
|
||||||
DMA2D->IFCR |= 1<<1;
|
SBI(DMA2D->IFCR, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TFT_LTDC::WriteData(uint16_t data) {
|
void TFT_LTDC::WriteData(uint16_t data) {
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS
|
#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
|
||||||
|
|
||||||
#include "xpt2046.h"
|
#include "xpt2046.h"
|
||||||
#include "pinconfig.h"
|
#include "pinconfig.h"
|
||||||
|
@@ -21,15 +21,12 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Defines
|
// Defines
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
|
||||||
|
|
||||||
// STM32 timers may be 16 or 32 bit. Limiting HAL_TIMER_TYPE_MAX to 16 bits
|
// STM32 timers may be 16 or 32 bit. Limiting HAL_TIMER_TYPE_MAX to 16 bits
|
||||||
// avoids issues with STM32F0 MCUs, which seem to pause timers if UINT32_MAX
|
// avoids issues with STM32F0 MCUs, which seem to pause timers if UINT32_MAX
|
||||||
// is written to the register. STM32F4 timers do not manifest this issue,
|
// is written to the register. STM32F4 timers do not manifest this issue,
|
||||||
|
@@ -293,7 +293,7 @@ void HAL_init() {
|
|||||||
#if PIN_EXISTS(USB_CONNECT)
|
#if PIN_EXISTS(USB_CONNECT)
|
||||||
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
|
OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection
|
||||||
delay(1000); // Give OS time to notice
|
delay(1000); // Give OS time to notice
|
||||||
OUT_WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
|
WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING);
|
||||||
#endif
|
#endif
|
||||||
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the minimal serial handler
|
TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the minimal serial handler
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,6 @@
|
|||||||
#include "fastio.h"
|
#include "fastio.h"
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <util/atomic.h>
|
#include <util/atomic.h>
|
||||||
|
|
||||||
@@ -63,11 +62,10 @@
|
|||||||
#ifdef SERIAL_USB
|
#ifdef SERIAL_USB
|
||||||
typedef ForwardSerial1Class< USBSerial > DefaultSerial1;
|
typedef ForwardSerial1Class< USBSerial > DefaultSerial1;
|
||||||
extern DefaultSerial1 MSerial0;
|
extern DefaultSerial1 MSerial0;
|
||||||
|
#if HAS_SD_HOST_DRIVE
|
||||||
#if !HAS_SD_HOST_DRIVE
|
|
||||||
#define UsbSerial MSerial0
|
|
||||||
#else
|
|
||||||
#define UsbSerial MarlinCompositeSerial
|
#define UsbSerial MarlinCompositeSerial
|
||||||
|
#else
|
||||||
|
#define UsbSerial MSerial0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -86,11 +84,7 @@
|
|||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||||
#else
|
#else
|
||||||
#define MYSERIAL1 MSERIAL(1) // dummy port
|
#define MYSERIAL1 MSERIAL(1) // dummy port
|
||||||
#if NUM_UARTS == 5
|
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||||
#error "SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB."
|
|
||||||
#else
|
|
||||||
#error "SERIAL_PORT must be from 1 to 3. You can also use -1 if the board supports Native USB."
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SERIAL_PORT_2
|
#ifdef SERIAL_PORT_2
|
||||||
@@ -100,11 +94,18 @@
|
|||||||
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
|
||||||
#else
|
#else
|
||||||
#define MYSERIAL2 MSERIAL(1) // dummy port
|
#define MYSERIAL2 MSERIAL(1) // dummy port
|
||||||
#if NUM_UARTS == 5
|
static_assert(false, "SERIAL_PORT_2 must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||||
#error "SERIAL_PORT_2 must be from 1 to 5. You can also use -1 if the board supports Native USB."
|
#endif
|
||||||
#else
|
#endif
|
||||||
#error "SERIAL_PORT_2 must be from 1 to 3. You can also use -1 if the board supports Native USB."
|
|
||||||
#endif
|
#ifdef SERIAL_PORT_3
|
||||||
|
#if SERIAL_PORT_3 == -1
|
||||||
|
#define MYSERIAL3 UsbSerial
|
||||||
|
#elif WITHIN(SERIAL_PORT_3, 1, NUM_UARTS)
|
||||||
|
#define MYSERIAL3 MSERIAL(SERIAL_PORT_3)
|
||||||
|
#else
|
||||||
|
#define MYSERIAL3 MSERIAL(1) // dummy port
|
||||||
|
static_assert(false, "SERIAL_PORT_3 must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -115,11 +116,7 @@
|
|||||||
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
#define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT)
|
||||||
#else
|
#else
|
||||||
#define MMU2_SERIAL MSERIAL(1) // dummy port
|
#define MMU2_SERIAL MSERIAL(1) // dummy port
|
||||||
#if NUM_UARTS == 5
|
static_assert(false, "MMU2_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||||
#error "MMU2_SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB."
|
|
||||||
#else
|
|
||||||
#error "MMU2_SERIAL_PORT must be from 1 to 3. You can also use -1 if the board supports Native USB."
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -130,11 +127,7 @@
|
|||||||
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
#define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT)
|
||||||
#else
|
#else
|
||||||
#define LCD_SERIAL MSERIAL(1) // dummy port
|
#define LCD_SERIAL MSERIAL(1) // dummy port
|
||||||
#if NUM_UARTS == 5
|
static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||||
#error "LCD_SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB."
|
|
||||||
#else
|
|
||||||
#error "LCD_SERIAL_PORT must be from 1 to 3. You can also use -1 if the board supports Native USB."
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if HAS_DGUS_LCD
|
#if HAS_DGUS_LCD
|
||||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||||
|
@@ -55,7 +55,7 @@ static void TXBegin() {
|
|||||||
nvic_irq_disable(dev->irq_num);
|
nvic_irq_disable(dev->irq_num);
|
||||||
|
|
||||||
// Use this if removing libmaple
|
// Use this if removing libmaple
|
||||||
//NVIC_BASE->ICER[1] |= _BV(irq - 32);
|
//SBI(NVIC_BASE->ICER[1], irq - 32);
|
||||||
|
|
||||||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS
|
#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
|
||||||
|
|
||||||
#include "xpt2046.h"
|
#include "xpt2046.h"
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
|
@@ -25,9 +25,10 @@
|
|||||||
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
* HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
#include "HAL.h"
|
||||||
|
|
||||||
#include <libmaple/timer.h>
|
#include <libmaple/timer.h>
|
||||||
#include "../../core/boards.h"
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Defines
|
// Defines
|
||||||
@@ -37,7 +38,6 @@
|
|||||||
* TODO: Check and confirm what timer we will use for each Temps and stepper driving.
|
* TODO: Check and confirm what timer we will use for each Temps and stepper driving.
|
||||||
* We should probable drive temps with PWM.
|
* We should probable drive temps with PWM.
|
||||||
*/
|
*/
|
||||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
|
||||||
|
|
||||||
typedef uint16_t hal_timer_t;
|
typedef uint16_t hal_timer_t;
|
||||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||||
@@ -80,7 +80,7 @@ typedef uint16_t hal_timer_t;
|
|||||||
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
//#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE, MKS_ROBIN_E3D, MKS_ROBIN_E3)
|
||||||
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
||||||
#ifdef STM32_HIGH_DENSITY
|
#ifdef STM32_HIGH_DENSITY
|
||||||
#define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4
|
#define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4
|
||||||
|
@@ -68,6 +68,8 @@ extern USBSerialType USBSerial;
|
|||||||
#elif WITHIN(SERIAL_PORT, 0, 3)
|
#elif WITHIN(SERIAL_PORT, 0, 3)
|
||||||
DECLARE_SERIAL(SERIAL_PORT);
|
DECLARE_SERIAL(SERIAL_PORT);
|
||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
|
||||||
|
#else
|
||||||
|
#error "The required SERIAL_PORT must be from 0 to 3, or -1 for Native USB."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAL_SERVO_LIB libServo
|
#define HAL_SERVO_LIB libServo
|
||||||
|
@@ -21,11 +21,12 @@
|
|||||||
*/
|
*/
|
||||||
#ifdef __MK20DX256__
|
#ifdef __MK20DX256__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <pins_arduino.h>
|
#include <pins_arduino.h>
|
||||||
#include "spi_pins.h"
|
#include "spi_pins.h"
|
||||||
#include "../../core/macros.h"
|
|
||||||
|
|
||||||
static SPISettings spiConfig;
|
static SPISettings spiConfig;
|
||||||
|
|
||||||
|
@@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <pins_arduino.h>
|
#include <pins_arduino.h>
|
||||||
#include "spi_pins.h"
|
#include "spi_pins.h"
|
||||||
#include "../../core/macros.h"
|
|
||||||
|
|
||||||
static SPISettings spiConfig;
|
static SPISettings spiConfig;
|
||||||
|
|
||||||
|
@@ -26,10 +26,11 @@
|
|||||||
|
|
||||||
#ifdef __IMXRT1062__
|
#ifdef __IMXRT1062__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#include "../shared/Delay.h"
|
#include "../shared/Delay.h"
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
|
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
|
||||||
#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X)
|
#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X)
|
||||||
|
@@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
#ifdef __IMXRT1062__
|
#ifdef __IMXRT1062__
|
||||||
|
|
||||||
|
#include "../../inc/MarlinConfig.h"
|
||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
|
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <pins_arduino.h>
|
#include <pins_arduino.h>
|
||||||
#include "spi_pins.h"
|
#include "spi_pins.h"
|
||||||
#include "../../core/macros.h"
|
|
||||||
|
|
||||||
static SPISettings spiConfig;
|
static SPISettings spiConfig;
|
||||||
|
|
||||||
|
@@ -82,4 +82,8 @@
|
|||||||
#define UNUSED(x) ((void)(x))
|
#define UNUSED(x) ((void)(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef FORCE_INLINE
|
||||||
|
#define FORCE_INLINE inline __attribute__((always_inline))
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
|
@@ -30,11 +30,17 @@
|
|||||||
#if ENABLED(I2C_EEPROM)
|
#if ENABLED(I2C_EEPROM)
|
||||||
|
|
||||||
#include "eeprom_if.h"
|
#include "eeprom_if.h"
|
||||||
#include <Wire.h>
|
|
||||||
|
#if ENABLED(SOFT_I2C_EEPROM)
|
||||||
|
#include <SlowSoftWire.h>
|
||||||
|
SlowSoftWire Wire = SlowSoftWire(I2C_SDA_PIN, I2C_SCL_PIN, true);
|
||||||
|
#else
|
||||||
|
#include <Wire.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void eeprom_init() {
|
void eeprom_init() {
|
||||||
Wire.begin(
|
Wire.begin(
|
||||||
#if PINS_EXIST(I2C_SCL, I2C_SDA)
|
#if PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
|
||||||
uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN)
|
uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
@@ -68,9 +68,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
#if HAS_TFT_LVGL_UI
|
||||||
#include "lcd/extui/lib/mks_ui/tft_lvgl_configuration.h"
|
#include "lcd/extui/mks_ui/tft_lvgl_configuration.h"
|
||||||
#include "lcd/extui/lib/mks_ui/draw_ui.h"
|
#include "lcd/extui/mks_ui/draw_ui.h"
|
||||||
#include "lcd/extui/lib/mks_ui/mks_hardware_test.h"
|
#include "lcd/extui/mks_ui/mks_hardware_test.h"
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DGUS_LCD_UI_MKS)
|
#if ENABLED(DGUS_LCD_UI_MKS)
|
||||||
#include "lcd/extui/lib/dgus/DGUSScreenHandler.h"
|
#include "lcd/extui/dgus/DGUSScreenHandler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_DRIVER_SAFE_POWER_PROTECT
|
#if HAS_DRIVER_SAFE_POWER_PROTECT
|
||||||
@@ -331,18 +331,14 @@ void disable_all_steppers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Print Job exists when the timer is running or SD printing
|
* A Print Job exists when the timer is running or SD is printing
|
||||||
*/
|
*/
|
||||||
bool printJobOngoing() {
|
bool printJobOngoing() { return print_job_timer.isRunning() || IS_SD_PRINTING(); }
|
||||||
return print_job_timer.isRunning() || IS_SD_PRINTING();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Printing is active when the print job timer is running
|
* Printing is active when a job is underway but not paused
|
||||||
*/
|
*/
|
||||||
bool printingIsActive() {
|
bool printingIsActive() { return !did_pause_print && printJobOngoing(); }
|
||||||
return !did_pause_print && (print_job_timer.isRunning() || IS_SD_PRINTING());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Printing is paused according to SD or host indicators
|
* Printing is paused according to SD or host indicators
|
||||||
@@ -367,7 +363,7 @@ void startOrResumeJob() {
|
|||||||
|
|
||||||
inline void abortSDPrinting() {
|
inline void abortSDPrinting() {
|
||||||
IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel());
|
IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel());
|
||||||
card.endFilePrint(TERN_(SD_RESORT, true));
|
card.abortFilePrintNow(TERN_(SD_RESORT, true));
|
||||||
|
|
||||||
queue.clear();
|
queue.clear();
|
||||||
quickstop_stepper();
|
quickstop_stepper();
|
||||||
@@ -390,8 +386,8 @@ void startOrResumeJob() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void finishSDPrinting() {
|
inline void finishSDPrinting() {
|
||||||
if (queue.enqueue_one_P(PSTR("M1001"))) {
|
if (queue.enqueue_one_P(PSTR("M1001"))) { // Keep trying until it gets queued
|
||||||
marlin_state = MF_RUNNING;
|
marlin_state = MF_RUNNING; // Signal to stop trying
|
||||||
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
||||||
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
|
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
|
||||||
}
|
}
|
||||||
@@ -487,6 +483,10 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_FREEZE_PIN
|
||||||
|
Stepper::frozen = !READ(FREEZE_PIN);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_HOME
|
#if HAS_HOME
|
||||||
// Handle a standalone HOME button
|
// Handle a standalone HOME button
|
||||||
constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL;
|
constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL;
|
||||||
@@ -748,7 +748,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
|
|||||||
|
|
||||||
// Handle Power-Loss Recovery
|
// Handle Power-Loss Recovery
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS)
|
#if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS)
|
||||||
if (printJobOngoing()) recovery.outage();
|
if (IS_SD_PRINTING()) recovery.outage();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Run StallGuard endstop checks
|
// Run StallGuard endstop checks
|
||||||
@@ -796,6 +796,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
|
|||||||
if (!gcode.autoreport_paused) {
|
if (!gcode.autoreport_paused) {
|
||||||
TERN_(AUTO_REPORT_TEMPERATURES, thermalManager.auto_reporter.tick());
|
TERN_(AUTO_REPORT_TEMPERATURES, thermalManager.auto_reporter.tick());
|
||||||
TERN_(AUTO_REPORT_SD_STATUS, card.auto_reporter.tick());
|
TERN_(AUTO_REPORT_SD_STATUS, card.auto_reporter.tick());
|
||||||
|
TERN_(AUTO_REPORT_POSITION, position_auto_reporter.tick());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -825,18 +826,19 @@ void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr
|
|||||||
|
|
||||||
TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control
|
TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control
|
||||||
|
|
||||||
SERIAL_ERROR_MSG(STR_ERR_KILLED);
|
// Echo the LCD message to serial for extra context
|
||||||
|
if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLNPGM_P(lcd_error); }
|
||||||
|
|
||||||
#if HAS_DISPLAY
|
#if HAS_DISPLAY
|
||||||
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
|
ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
|
||||||
#else
|
#else
|
||||||
UNUSED(lcd_error);
|
UNUSED(lcd_error); UNUSED(lcd_component);
|
||||||
UNUSED(lcd_component);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TFT_LVGL_UI
|
TERN_(HAS_TFT_LVGL_UI, lv_draw_error_message(lcd_error));
|
||||||
lv_draw_error_message(lcd_error);
|
|
||||||
#endif
|
// "Error:Printer halted. kill() called!"
|
||||||
|
SERIAL_ERROR_MSG(STR_ERR_KILLED);
|
||||||
|
|
||||||
#ifdef ACTION_ON_KILL
|
#ifdef ACTION_ON_KILL
|
||||||
host_action_kill();
|
host_action_kill();
|
||||||
@@ -900,7 +902,7 @@ void stop() {
|
|||||||
thermalManager.set_fans_paused(false); // Un-pause fans for safety
|
thermalManager.set_fans_paused(false); // Un-pause fans for safety
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (IsRunning()) {
|
if (!IsStopped()) {
|
||||||
SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
||||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||||
safe_delay(350); // allow enough time for messages to get out before stopping
|
safe_delay(350); // allow enough time for messages to get out before stopping
|
||||||
@@ -1071,9 +1073,20 @@ void setup() {
|
|||||||
while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||||
|
|
||||||
#if HAS_MULTI_SERIAL && !HAS_ETHERNET
|
#if HAS_MULTI_SERIAL && !HAS_ETHERNET
|
||||||
MYSERIAL2.begin(BAUDRATE);
|
#ifndef BAUDRATE_2
|
||||||
|
#define BAUDRATE_2 BAUDRATE
|
||||||
|
#endif
|
||||||
|
MYSERIAL2.begin(BAUDRATE_2);
|
||||||
serial_connect_timeout = millis() + 1000UL;
|
serial_connect_timeout = millis() + 1000UL;
|
||||||
while (!MYSERIAL2.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
while (!MYSERIAL2.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||||
|
#ifdef SERIAL_PORT_3
|
||||||
|
#ifndef BAUDRATE_3
|
||||||
|
#define BAUDRATE_3 BAUDRATE
|
||||||
|
#endif
|
||||||
|
MYSERIAL3.begin(BAUDRATE_3);
|
||||||
|
serial_connect_timeout = millis() + 1000UL;
|
||||||
|
while (!MYSERIAL3.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
SERIAL_ECHOLNPGM("start");
|
SERIAL_ECHOLNPGM("start");
|
||||||
|
|
||||||
@@ -1087,6 +1100,10 @@ void setup() {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_FREEZE_PIN
|
||||||
|
SET_INPUT_PULLUP(FREEZE_PIN);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_SUICIDE
|
#if HAS_SUICIDE
|
||||||
SETUP_LOG("SUICIDE_PIN");
|
SETUP_LOG("SUICIDE_PIN");
|
||||||
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
||||||
@@ -1477,7 +1494,7 @@ void setup() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
|
#if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF)
|
||||||
SETUP_RUN(test_tmc_connection(true, true, true, true));
|
SETUP_RUN(test_tmc_connection());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_DRIVER_SAFE_POWER_PROTECT
|
#if HAS_DRIVER_SAFE_POWER_PROTECT
|
||||||
|
@@ -56,20 +56,21 @@ void minkill(const bool steppers_off=false);
|
|||||||
|
|
||||||
// Global State of the firmware
|
// Global State of the firmware
|
||||||
enum MarlinState : uint8_t {
|
enum MarlinState : uint8_t {
|
||||||
MF_INITIALIZING = 0,
|
MF_INITIALIZING = 0,
|
||||||
MF_RUNNING = _BV(0),
|
MF_STOPPED,
|
||||||
MF_PAUSED = _BV(1),
|
MF_KILLED,
|
||||||
MF_WAITING = _BV(2),
|
MF_RUNNING,
|
||||||
MF_STOPPED = _BV(3),
|
MF_SD_COMPLETE,
|
||||||
MF_SD_COMPLETE = _BV(4),
|
MF_PAUSED,
|
||||||
MF_KILLED = _BV(7)
|
MF_WAITING,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern MarlinState marlin_state;
|
extern MarlinState marlin_state;
|
||||||
inline bool IsRunning() { return marlin_state == MF_RUNNING; }
|
inline bool IsRunning() { return marlin_state >= MF_RUNNING; }
|
||||||
inline bool IsStopped() { return marlin_state != MF_RUNNING; }
|
inline bool IsStopped() { return marlin_state == MF_STOPPED; }
|
||||||
|
|
||||||
bool printingIsActive();
|
bool printingIsActive();
|
||||||
|
bool printJobOngoing();
|
||||||
bool printingIsPaused();
|
bool printingIsPaused();
|
||||||
void startOrResumeJob();
|
void startOrResumeJob();
|
||||||
|
|
||||||
|
@@ -159,6 +159,7 @@
|
|||||||
#define BOARD_PICA_REVB 1324 // PICA Shield (original version)
|
#define BOARD_PICA_REVB 1324 // PICA Shield (original version)
|
||||||
#define BOARD_PICA 1325 // PICA Shield (rev C or later)
|
#define BOARD_PICA 1325 // PICA Shield (rev C or later)
|
||||||
#define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT)
|
#define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT)
|
||||||
|
#define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct gcode only)
|
||||||
|
|
||||||
//
|
//
|
||||||
// ATmega1281, ATmega2561
|
// ATmega1281, ATmega2561
|
||||||
@@ -367,22 +368,25 @@
|
|||||||
#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZGT6)
|
#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZGT6)
|
||||||
#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VGT6)
|
#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VGT6)
|
||||||
#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VGT6)
|
#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VGT6)
|
||||||
#define BOARD_BTT_SKR_V2_0 4211 // BigTreeTech SKR v2.0 (STM32F407VGT6)
|
#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VGT6)
|
||||||
#define BOARD_BTT_GTR_V1_0 4212 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VGT6)
|
||||||
#define BOARD_LERDGE_K 4213 // Lerdge K (STM32F407ZG)
|
#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
||||||
#define BOARD_LERDGE_S 4214 // Lerdge S (STM32F407VE)
|
#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZET6)
|
||||||
#define BOARD_LERDGE_X 4215 // Lerdge X (STM32F407VE)
|
#define BOARD_LERDGE_K 4215 // Lerdge K (STM32F407ZG)
|
||||||
#define BOARD_VAKE403D 4216 // VAkE 403D (STM32F446VET6)
|
#define BOARD_LERDGE_S 4216 // Lerdge S (STM32F407VE)
|
||||||
#define BOARD_FYSETC_S6 4217 // FYSETC S6 (STM32F446VET6)
|
#define BOARD_LERDGE_X 4217 // Lerdge X (STM32F407VE)
|
||||||
#define BOARD_FYSETC_S6_V2_0 4218 // FYSETC S6 v2.0 (STM32F446VET6)
|
#define BOARD_VAKE403D 4218 // VAkE 403D (STM32F446VET6)
|
||||||
#define BOARD_FYSETC_SPIDER 4219 // FYSETC Spider (STM32F446VET6)
|
#define BOARD_FYSETC_S6 4219 // FYSETC S6 (STM32F446VET6)
|
||||||
#define BOARD_FLYF407ZG 4220 // FLYF407ZG (STM32F407ZG)
|
#define BOARD_FYSETC_S6_V2_0 4220 // FYSETC S6 v2.0 (STM32F446VET6)
|
||||||
#define BOARD_MKS_ROBIN2 4221 // MKS_ROBIN2 (STM32F407ZE)
|
#define BOARD_FYSETC_SPIDER 4221 // FYSETC Spider (STM32F446VET6)
|
||||||
#define BOARD_MKS_ROBIN_PRO_V2 4222 // MKS Robin Pro V2 (STM32F407VE)
|
#define BOARD_FLYF407ZG 4222 // FLYF407ZG (STM32F407ZG)
|
||||||
#define BOARD_MKS_ROBIN_NANO_V3 4223 // MKS Robin Nano V3 (STM32F407VG)
|
#define BOARD_MKS_ROBIN2 4223 // MKS_ROBIN2 (STM32F407ZE)
|
||||||
#define BOARD_ANET_ET4 4224 // ANET ET4 V1.x (STM32F407VGT6)
|
#define BOARD_MKS_ROBIN_PRO_V2 4224 // MKS Robin Pro V2 (STM32F407VE)
|
||||||
#define BOARD_ANET_ET4P 4225 // ANET ET4P V1.x (STM32F407VGT6)
|
#define BOARD_MKS_ROBIN_NANO_V3 4225 // MKS Robin Nano V3 (STM32F407VG)
|
||||||
#define BOARD_FYSETC_CHEETAH_V20 4226 // FYSETC Cheetah V2.0
|
#define BOARD_ANET_ET4 4226 // ANET ET4 V1.x (STM32F407VGT6)
|
||||||
|
#define BOARD_ANET_ET4P 4227 // ANET ET4P V1.x (STM32F407VGT6)
|
||||||
|
#define BOARD_FYSETC_CHEETAH_V20 4228 // FYSETC Cheetah V2.0
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARM Cortex M7
|
// ARM Cortex M7
|
||||||
|
@@ -44,6 +44,6 @@ private:
|
|||||||
SERIAL_ECHOPGM_P(the_msg);
|
SERIAL_ECHOPGM_P(the_msg);
|
||||||
}
|
}
|
||||||
SERIAL_CHAR(' ');
|
SERIAL_CHAR(' ');
|
||||||
print_xyz(current_position);
|
print_pos(current_position);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -140,25 +140,7 @@
|
|||||||
#define STR_RESEND "Resend: "
|
#define STR_RESEND "Resend: "
|
||||||
#define STR_UNKNOWN_COMMAND "Unknown command: \""
|
#define STR_UNKNOWN_COMMAND "Unknown command: \""
|
||||||
#define STR_ACTIVE_EXTRUDER "Active Extruder: "
|
#define STR_ACTIVE_EXTRUDER "Active Extruder: "
|
||||||
#define STR_X_MIN "x_min"
|
|
||||||
#define STR_X_MAX "x_max"
|
|
||||||
#define STR_X2_MIN "x2_min"
|
|
||||||
#define STR_X2_MAX "x2_max"
|
|
||||||
#define STR_Y_MIN "y_min"
|
|
||||||
#define STR_Y_MAX "y_max"
|
|
||||||
#define STR_Y2_MIN "y2_min"
|
|
||||||
#define STR_Y2_MAX "y2_max"
|
|
||||||
#define STR_Z_MIN "z_min"
|
|
||||||
#define STR_Z_MAX "z_max"
|
|
||||||
#define STR_Z2_MIN "z2_min"
|
|
||||||
#define STR_Z2_MAX "z2_max"
|
|
||||||
#define STR_Z3_MIN "z3_min"
|
|
||||||
#define STR_Z3_MAX "z3_max"
|
|
||||||
#define STR_Z4_MIN "z4_min"
|
|
||||||
#define STR_Z4_MAX "z4_max"
|
|
||||||
#define STR_Z_PROBE "z_probe"
|
|
||||||
#define STR_PROBE_EN "probe_en"
|
|
||||||
#define STR_FILAMENT_RUNOUT_SENSOR "filament"
|
|
||||||
#define STR_PROBE_OFFSET "Probe Offset"
|
#define STR_PROBE_OFFSET "Probe Offset"
|
||||||
#define STR_SKEW_MIN "min_skew_factor: "
|
#define STR_SKEW_MIN "min_skew_factor: "
|
||||||
#define STR_SKEW_MAX "max_skew_factor: "
|
#define STR_SKEW_MAX "max_skew_factor: "
|
||||||
@@ -277,14 +259,30 @@
|
|||||||
#define STR_REMINDER_SAVE_SETTINGS "Remember to save!"
|
#define STR_REMINDER_SAVE_SETTINGS "Remember to save!"
|
||||||
#define STR_PASSWORD_SET "Password is "
|
#define STR_PASSWORD_SET "Password is "
|
||||||
|
|
||||||
// LCD Menu Messages
|
//
|
||||||
|
// Endstop Names used by Endstops::report_states
|
||||||
#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
|
//
|
||||||
#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
|
#define STR_X_MIN "x_min"
|
||||||
|
#define STR_X_MAX "x_max"
|
||||||
#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
|
#define STR_X2_MIN "x2_min"
|
||||||
#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
|
#define STR_X2_MAX "x2_max"
|
||||||
|
#define STR_Y_MIN "y_min"
|
||||||
|
#define STR_Y_MAX "y_max"
|
||||||
|
#define STR_Y2_MIN "y2_min"
|
||||||
|
#define STR_Y2_MAX "y2_max"
|
||||||
|
#define STR_Z_MIN "z_min"
|
||||||
|
#define STR_Z_MAX "z_max"
|
||||||
|
#define STR_Z2_MIN "z2_min"
|
||||||
|
#define STR_Z2_MAX "z2_max"
|
||||||
|
#define STR_Z3_MIN "z3_min"
|
||||||
|
#define STR_Z3_MAX "z3_max"
|
||||||
|
#define STR_Z4_MIN "z4_min"
|
||||||
|
#define STR_Z4_MAX "z4_max"
|
||||||
|
#define STR_Z_PROBE "z_probe"
|
||||||
|
#define STR_PROBE_EN "probe_en"
|
||||||
|
#define STR_FILAMENT_RUNOUT_SENSOR "filament"
|
||||||
|
|
||||||
|
// General axis names
|
||||||
#define STR_X "X"
|
#define STR_X "X"
|
||||||
#define STR_Y "Y"
|
#define STR_Y "Y"
|
||||||
#define STR_Z "Z"
|
#define STR_Z "Z"
|
||||||
@@ -386,6 +384,14 @@
|
|||||||
#define LCD_STR_E6 "E" LCD_STR_N6
|
#define LCD_STR_E6 "E" LCD_STR_N6
|
||||||
#define LCD_STR_E7 "E" LCD_STR_N7
|
#define LCD_STR_E7 "E" LCD_STR_N7
|
||||||
|
|
||||||
|
// Include localized LCD Menu Messages
|
||||||
|
|
||||||
|
#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
|
||||||
|
#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
|
||||||
|
|
||||||
|
#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
|
||||||
|
#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
|
||||||
|
|
||||||
// Use superscripts, if possible. Evaluated at point of use.
|
// Use superscripts, if possible. Evaluated at point of use.
|
||||||
#define SUPERSCRIPT_TWO TERN(NOT_EXTENDED_ISO10646_1_5X7, "^2", "²")
|
#define SUPERSCRIPT_TWO TERN(NOT_EXTENDED_ISO10646_1_5X7, "^2", "²")
|
||||||
#define SUPERSCRIPT_THREE TERN(NOT_EXTENDED_ISO10646_1_5X7, "^3", "³")
|
#define SUPERSCRIPT_THREE TERN(NOT_EXTENDED_ISO10646_1_5X7, "^3", "³")
|
||||||
|
@@ -195,6 +195,11 @@
|
|||||||
#define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
|
#define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
|
||||||
#define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B.
|
#define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B.
|
||||||
|
|
||||||
|
#define _OPTARG(A) , A
|
||||||
|
#define OPTARG(O,A) TERN_(O,DEFER4(_OPTARG)(A))
|
||||||
|
#define _OPTCODE(A) A;
|
||||||
|
#define OPTCODE(O,A) TERN_(O,DEFER4(_OPTCODE)(A))
|
||||||
|
|
||||||
// Macros to avoid 'f + 0.0' which is not always optimized away. Minus included for symmetry.
|
// Macros to avoid 'f + 0.0' which is not always optimized away. Minus included for symmetry.
|
||||||
// Compiler flags -fno-signed-zeros -ffinite-math-only also cover 'f * 1.0', 'f - f', etc.
|
// Compiler flags -fno-signed-zeros -ffinite-math-only also cover 'f * 1.0', 'f - f', etc.
|
||||||
#define PLUS_TERN0(O,A) _TERN(_ENA_1(O),,+ (A)) // OPTION ? '+ (A)' : '<nul>'
|
#define PLUS_TERN0(O,A) _TERN(_ENA_1(O),,+ (A)) // OPTION ? '+ (A)' : '<nul>'
|
||||||
@@ -237,6 +242,38 @@
|
|||||||
memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \
|
memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \
|
||||||
}while(0)
|
}while(0)
|
||||||
|
|
||||||
|
#define CODE_9( A,B,C,D,E,F,G,H,I,...) A; B; C; D; E; F; G; H; I
|
||||||
|
#define CODE_8( A,B,C,D,E,F,G,H,...) A; B; C; D; E; F; G; H
|
||||||
|
#define CODE_7( A,B,C,D,E,F,G,...) A; B; C; D; E; F; G
|
||||||
|
#define CODE_6( A,B,C,D,E,F,...) A; B; C; D; E; F
|
||||||
|
#define CODE_5( A,B,C,D,E,...) A; B; C; D; E
|
||||||
|
#define CODE_4( A,B,C,D,...) A; B; C; D
|
||||||
|
#define CODE_3( A,B,C,...) A; B; C
|
||||||
|
#define CODE_2( A,B,...) A; B
|
||||||
|
#define CODE_1( A,...) A
|
||||||
|
#define _CODE_N(N,V...) CODE_##N(V)
|
||||||
|
#define CODE_N(N,V...) _CODE_N(N,V)
|
||||||
|
|
||||||
|
#define GANG_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A B C D E F G H I J K L M N O P
|
||||||
|
#define GANG_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A B C D E F G H I J K L M N O
|
||||||
|
#define GANG_14(A,B,C,D,E,F,G,H,I,J,K,L,M,N,...) A B C D E F G H I J K L M N
|
||||||
|
#define GANG_13(A,B,C,D,E,F,G,H,I,J,K,L,M...) A B C D E F G H I J K L M
|
||||||
|
#define GANG_12(A,B,C,D,E,F,G,H,I,J,K,L...) A B C D E F G H I J K L
|
||||||
|
#define GANG_11(A,B,C,D,E,F,G,H,I,J,K,...) A B C D E F G H I J K
|
||||||
|
#define GANG_10(A,B,C,D,E,F,G,H,I,J,...) A B C D E F G H I J
|
||||||
|
#define GANG_9( A,B,C,D,E,F,G,H,I,...) A B C D E F G H I
|
||||||
|
#define GANG_8( A,B,C,D,E,F,G,H,...) A B C D E F G H
|
||||||
|
#define GANG_7( A,B,C,D,E,F,G,...) A B C D E F G
|
||||||
|
#define GANG_6( A,B,C,D,E,F,...) A B C D E F
|
||||||
|
#define GANG_5( A,B,C,D,E,...) A B C D E
|
||||||
|
#define GANG_4( A,B,C,D,...) A B C D
|
||||||
|
#define GANG_3( A,B,C,...) A B C
|
||||||
|
#define GANG_2( A,B,...) A B
|
||||||
|
#define GANG_1( A,...) A
|
||||||
|
#define _GANG_N(N,V...) GANG_##N(V)
|
||||||
|
#define GANG_N(N,V...) _GANG_N(N,V)
|
||||||
|
#define GANG_N_1(N,K) _GANG_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K)
|
||||||
|
|
||||||
// Macros for initializing arrays
|
// Macros for initializing arrays
|
||||||
#define LIST_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P
|
#define LIST_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P
|
||||||
#define LIST_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O
|
#define LIST_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O
|
||||||
@@ -254,10 +291,13 @@
|
|||||||
#define LIST_3( A,B,C,...) A,B,C
|
#define LIST_3( A,B,C,...) A,B,C
|
||||||
#define LIST_2( A,B,...) A,B
|
#define LIST_2( A,B,...) A,B
|
||||||
#define LIST_1( A,...) A
|
#define LIST_1( A,...) A
|
||||||
|
#define LIST_0(...)
|
||||||
|
|
||||||
#define _LIST_N(N,V...) LIST_##N(V)
|
#define _LIST_N(N,V...) LIST_##N(V)
|
||||||
#define LIST_N(N,V...) _LIST_N(N,V)
|
#define LIST_N(N,V...) _LIST_N(N,V)
|
||||||
|
#define LIST_N_1(N,K) _LIST_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K)
|
||||||
#define ARRAY_N(N,V...) { _LIST_N(N,V) }
|
#define ARRAY_N(N,V...) { _LIST_N(N,V) }
|
||||||
|
#define ARRAY_N_1(N,K) { LIST_N_1(N,K) }
|
||||||
|
|
||||||
#define _JOIN_1(O) (O)
|
#define _JOIN_1(O) (O)
|
||||||
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
|
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
|
||||||
@@ -301,8 +341,12 @@
|
|||||||
#define HYPOT(x,y) SQRT(HYPOT2(x,y))
|
#define HYPOT(x,y) SQRT(HYPOT2(x,y))
|
||||||
|
|
||||||
// Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments
|
// Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments
|
||||||
#define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT
|
#define _NUM_ARGS(_,n,m,l,k,j,i,h,g,f,e,d,c,b,a,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT
|
||||||
#define NUM_ARGS(V...) _NUM_ARGS(0,V,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
|
#define NUM_ARGS(V...) _NUM_ARGS(0,V,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
|
||||||
|
|
||||||
|
// Use TWO_ARGS(__VA_ARGS__) to get whether there are 1, 2, or >2 arguments
|
||||||
|
#define _TWO_ARGS(_,n,m,l,k,j,i,h,g,f,e,d,c,b,a,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT
|
||||||
|
#define TWO_ARGS(V...) _TWO_ARGS(0,V,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,1,0)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
@@ -414,31 +458,19 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define MIN_2(a,b) ((a)<(b)?(a):(b))
|
|
||||||
#define MIN_3(a,V...) MIN_2(a,MIN_2(V))
|
|
||||||
#define MIN_4(a,V...) MIN_2(a,MIN_3(V))
|
|
||||||
#define MIN_5(a,V...) MIN_2(a,MIN_4(V))
|
|
||||||
#define MIN_6(a,V...) MIN_2(a,MIN_5(V))
|
|
||||||
#define MIN_7(a,V...) MIN_2(a,MIN_6(V))
|
|
||||||
#define MIN_8(a,V...) MIN_2(a,MIN_7(V))
|
|
||||||
#define MIN_9(a,V...) MIN_2(a,MIN_8(V))
|
|
||||||
#define MIN_10(a,V...) MIN_2(a,MIN_9(V))
|
|
||||||
#define __MIN_N(N,V...) MIN_##N(V)
|
#define __MIN_N(N,V...) MIN_##N(V)
|
||||||
#define _MIN_N(N,V...) __MIN_N(N,V)
|
#define _MIN_N(N,V...) __MIN_N(N,V)
|
||||||
#define _MIN(V...) _MIN_N(NUM_ARGS(V), V)
|
#define _MIN_N_REF() _MIN_N
|
||||||
|
#define _MIN(V...) EVAL(_MIN_N(TWO_ARGS(V),V))
|
||||||
|
#define MIN_2(a,b) ((a)<(b)?(a):(b))
|
||||||
|
#define MIN_3(a,V...) MIN_2(a,DEFER2(_MIN_N_REF)()(TWO_ARGS(V),V))
|
||||||
|
|
||||||
#define MAX_2(a,b) ((a)>(b)?(a):(b))
|
|
||||||
#define MAX_3(a,V...) MAX_2(a,MAX_2(V))
|
|
||||||
#define MAX_4(a,V...) MAX_2(a,MAX_3(V))
|
|
||||||
#define MAX_5(a,V...) MAX_2(a,MAX_4(V))
|
|
||||||
#define MAX_6(a,V...) MAX_2(a,MAX_5(V))
|
|
||||||
#define MAX_7(a,V...) MAX_2(a,MAX_6(V))
|
|
||||||
#define MAX_8(a,V...) MAX_2(a,MAX_7(V))
|
|
||||||
#define MAX_9(a,V...) MAX_2(a,MAX_8(V))
|
|
||||||
#define MAX_10(a,V...) MAX_2(a,MAX_9(V))
|
|
||||||
#define __MAX_N(N,V...) MAX_##N(V)
|
#define __MAX_N(N,V...) MAX_##N(V)
|
||||||
#define _MAX_N(N,V...) __MAX_N(N,V)
|
#define _MAX_N(N,V...) __MAX_N(N,V)
|
||||||
#define _MAX(V...) _MAX_N(NUM_ARGS(V), V)
|
#define _MAX_N_REF() _MAX_N
|
||||||
|
#define _MAX(V...) EVAL(_MAX_N(TWO_ARGS(V),V))
|
||||||
|
#define MAX_2(a,b) ((a)>(b)?(a):(b))
|
||||||
|
#define MAX_3(a,V...) MAX_2(a,DEFER2(_MAX_N_REF)()(TWO_ARGS(V),V))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -473,6 +505,9 @@
|
|||||||
#define ADD8(N) ADD4(ADD4(N))
|
#define ADD8(N) ADD4(ADD4(N))
|
||||||
#define ADD9(N) ADD4(ADD5(N))
|
#define ADD9(N) ADD4(ADD5(N))
|
||||||
#define ADD10(N) ADD5(ADD5(N))
|
#define ADD10(N) ADD5(ADD5(N))
|
||||||
|
#define SUM(A,B) _CAT(ADD,A)(B)
|
||||||
|
#define DOUBLE_(n) ADD##n(n)
|
||||||
|
#define DOUBLE(n) DOUBLE_(n)
|
||||||
|
|
||||||
// Macros for subtracting
|
// Macros for subtracting
|
||||||
#define DEC_0 0
|
#define DEC_0 0
|
||||||
@@ -581,6 +616,7 @@
|
|||||||
// Repeat a macro passing S...N-1.
|
// Repeat a macro passing S...N-1.
|
||||||
#define REPEAT_S(S,N,OP) EVAL(_REPEAT(S,SUB##S(N),OP))
|
#define REPEAT_S(S,N,OP) EVAL(_REPEAT(S,SUB##S(N),OP))
|
||||||
#define REPEAT(N,OP) REPEAT_S(0,N,OP)
|
#define REPEAT(N,OP) REPEAT_S(0,N,OP)
|
||||||
|
#define REPEAT_1(N,OP) REPEAT_S(1,INCREMENT(N),OP)
|
||||||
|
|
||||||
// Repeat a macro passing 0...N-1 plus additional arguments.
|
// Repeat a macro passing 0...N-1 plus additional arguments.
|
||||||
#define REPEAT2_S(S,N,OP,V...) EVAL(_REPEAT2(S,SUB##S(N),OP,V))
|
#define REPEAT2_S(S,N,OP,V...) EVAL(_REPEAT2(S,SUB##S(N),OP,V))
|
||||||
|
@@ -44,6 +44,9 @@ PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMST
|
|||||||
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2)
|
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2)
|
||||||
SerialLeafT2 mpSerial2(false, _SERIAL_LEAF_2);
|
SerialLeafT2 mpSerial2(false, _SERIAL_LEAF_2);
|
||||||
#endif
|
#endif
|
||||||
|
#if ENABLED(MEATPACK_ON_SERIAL_PORT_3)
|
||||||
|
SerialLeafT3 mpSerial3(false, _SERIAL_LEAF_3);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Step 2: For multiserial, handle the second serial port as well
|
// Step 2: For multiserial, handle the second serial port as well
|
||||||
#if HAS_MULTI_SERIAL
|
#if HAS_MULTI_SERIAL
|
||||||
@@ -52,7 +55,14 @@ PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMST
|
|||||||
SerialLeafT2 msSerial2(ethernet.have_telnet_client, MYSERIAL2, false);
|
SerialLeafT2 msSerial2(ethernet.have_telnet_client, MYSERIAL2, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SerialOutputT multiSerial(SERIAL_LEAF_1, SERIAL_LEAF_2);
|
#define __S_LEAF(N) ,SERIAL_LEAF_##N
|
||||||
|
#define _S_LEAF(N) __S_LEAF(N)
|
||||||
|
|
||||||
|
SerialOutputT multiSerial( SERIAL_LEAF_1 REPEAT_S(2, INCREMENT(NUM_SERIAL), _S_LEAF) );
|
||||||
|
|
||||||
|
#undef __S_LEAF
|
||||||
|
#undef _S_LEAF
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void serialprintPGM(PGM_P str) {
|
void serialprintPGM(PGM_P str) {
|
||||||
@@ -91,7 +101,7 @@ void print_bin(uint16_t val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_xyz(const_float_t x, const_float_t y, const_float_t z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
|
void print_pos(const_float_t x, const_float_t y, const_float_t z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
|
||||||
if (prefix) serialprintPGM(prefix);
|
if (prefix) serialprintPGM(prefix);
|
||||||
SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
|
SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
|
||||||
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
|
||||||
|
@@ -62,11 +62,11 @@ extern uint8_t marlin_debug_flags;
|
|||||||
//
|
//
|
||||||
// Serial redirection
|
// Serial redirection
|
||||||
//
|
//
|
||||||
// Step 1: Find what's the first serial leaf
|
// Step 1: Find out what the first serial leaf is
|
||||||
#if BOTH(HAS_MULTI_SERIAL, SERIAL_CATCHALL)
|
#if BOTH(HAS_MULTI_SERIAL, SERIAL_CATCHALL)
|
||||||
#define _SERIAL_LEAF_1 MYSERIAL
|
#define _SERIAL_LEAF_1 MYSERIAL
|
||||||
#else
|
#else
|
||||||
#define _SERIAL_LEAF_1 MYSERIAL1
|
#define _SERIAL_LEAF_1 MYSERIAL1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Hook Meatpack if it's enabled on the first leaf
|
// Hook Meatpack if it's enabled on the first leaf
|
||||||
@@ -78,7 +78,8 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define SERIAL_LEAF_1 _SERIAL_LEAF_1
|
#define SERIAL_LEAF_1 _SERIAL_LEAF_1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Step 2: For multiserial, handle the second serial port as well
|
// Step 2: For multiserial wrap all serial ports in a single
|
||||||
|
// interface with the ability to output to multiple serial ports.
|
||||||
#if HAS_MULTI_SERIAL
|
#if HAS_MULTI_SERIAL
|
||||||
#define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p)
|
#define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p)
|
||||||
#define _PORT_RESTORE(n,p) RESTORE(n)
|
#define _PORT_RESTORE(n,p) RESTORE(n)
|
||||||
@@ -86,18 +87,17 @@ extern uint8_t marlin_debug_flags;
|
|||||||
// If we have a catchall, use that directly
|
// If we have a catchall, use that directly
|
||||||
#ifdef SERIAL_CATCHALL
|
#ifdef SERIAL_CATCHALL
|
||||||
#define _SERIAL_LEAF_2 SERIAL_CATCHALL
|
#define _SERIAL_LEAF_2 SERIAL_CATCHALL
|
||||||
|
#elif HAS_ETHERNET
|
||||||
|
typedef ConditionalSerial<decltype(MYSERIAL2)> SerialLeafT2; // We need to create an instance here
|
||||||
|
extern SerialLeafT2 msSerial2;
|
||||||
|
#define _SERIAL_LEAF_2 msSerial2
|
||||||
#else
|
#else
|
||||||
#if HAS_ETHERNET
|
#define _SERIAL_LEAF_2 MYSERIAL2 // Don't create a useless instance here, directly use the existing instance
|
||||||
// We need to create an instance here
|
|
||||||
typedef ConditionalSerial<decltype(MYSERIAL2)> SerialLeafT2;
|
|
||||||
extern SerialLeafT2 msSerial2;
|
|
||||||
#define _SERIAL_LEAF_2 msSerial2
|
|
||||||
#else
|
|
||||||
// Don't create a useless instance here, directly use the existing instance
|
|
||||||
#define _SERIAL_LEAF_2 MYSERIAL2
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Nothing complicated here
|
||||||
|
#define _SERIAL_LEAF_3 MYSERIAL3
|
||||||
|
|
||||||
// Hook Meatpack if it's enabled on the second leaf
|
// Hook Meatpack if it's enabled on the second leaf
|
||||||
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2)
|
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2)
|
||||||
typedef MeatpackSerial<decltype(_SERIAL_LEAF_2)> SerialLeafT2;
|
typedef MeatpackSerial<decltype(_SERIAL_LEAF_2)> SerialLeafT2;
|
||||||
@@ -107,7 +107,23 @@ extern uint8_t marlin_debug_flags;
|
|||||||
#define SERIAL_LEAF_2 _SERIAL_LEAF_2
|
#define SERIAL_LEAF_2 _SERIAL_LEAF_2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef MultiSerial<decltype(SERIAL_LEAF_1), decltype(SERIAL_LEAF_2), 0> SerialOutputT;
|
// Hook Meatpack if it's enabled on the third leaf
|
||||||
|
#if ENABLED(MEATPACK_ON_SERIAL_PORT_3)
|
||||||
|
typedef MeatpackSerial<decltype(_SERIAL_LEAF_3)> SerialLeafT3;
|
||||||
|
extern SerialLeafT3 mpSerial3;
|
||||||
|
#define SERIAL_LEAF_3 mpSerial3
|
||||||
|
#else
|
||||||
|
#define SERIAL_LEAF_3 _SERIAL_LEAF_3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __S_MULTI(N) decltype(SERIAL_LEAF_##N),
|
||||||
|
#define _S_MULTI(N) __S_MULTI(N)
|
||||||
|
|
||||||
|
typedef MultiSerial< REPEAT_1(NUM_SERIAL, _S_MULTI) 0> SerialOutputT;
|
||||||
|
|
||||||
|
#undef __S_MULTI
|
||||||
|
#undef _S_MULTI
|
||||||
|
|
||||||
extern SerialOutputT multiSerial;
|
extern SerialOutputT multiSerial;
|
||||||
#define SERIAL_IMPL multiSerial
|
#define SERIAL_IMPL multiSerial
|
||||||
#else
|
#else
|
||||||
@@ -166,139 +182,45 @@ inline void SERIAL_FLUSHTX() { SERIAL_IMPL.flushTX(); }
|
|||||||
// Print a single PROGMEM string to serial
|
// Print a single PROGMEM string to serial
|
||||||
void serialprintPGM(PGM_P str);
|
void serialprintPGM(PGM_P str);
|
||||||
|
|
||||||
// SERIAL_ECHOPAIR / SERIAL_ECHOPAIR_P is used to output a key value pair. The key must be a string and the value can be anything
|
//
|
||||||
// Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR().
|
// SERIAL_ECHOPAIR... macros are used to output string-value pairs.
|
||||||
#define __SEP_N(N,V...) _SEP_##N(V)
|
//
|
||||||
#define _SEP_N(N,V...) __SEP_N(N,V)
|
|
||||||
#define _SEP_1(PRE) SERIAL_ECHOPGM(PRE)
|
|
||||||
#define _SEP_2(PRE,V) serial_echopair_PGM(PSTR(PRE),V)
|
|
||||||
#define _SEP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOPGM(c); }while(0)
|
|
||||||
#define _SEP_4(a,b,V...) do{ _SEP_2(a,b); _SEP_2(V); }while(0)
|
|
||||||
#define _SEP_5(a,b,V...) do{ _SEP_2(a,b); _SEP_3(V); }while(0)
|
|
||||||
#define _SEP_6(a,b,V...) do{ _SEP_2(a,b); _SEP_4(V); }while(0)
|
|
||||||
#define _SEP_7(a,b,V...) do{ _SEP_2(a,b); _SEP_5(V); }while(0)
|
|
||||||
#define _SEP_8(a,b,V...) do{ _SEP_2(a,b); _SEP_6(V); }while(0)
|
|
||||||
#define _SEP_9(a,b,V...) do{ _SEP_2(a,b); _SEP_7(V); }while(0)
|
|
||||||
#define _SEP_10(a,b,V...) do{ _SEP_2(a,b); _SEP_8(V); }while(0)
|
|
||||||
#define _SEP_11(a,b,V...) do{ _SEP_2(a,b); _SEP_9(V); }while(0)
|
|
||||||
#define _SEP_12(a,b,V...) do{ _SEP_2(a,b); _SEP_10(V); }while(0)
|
|
||||||
#define _SEP_13(a,b,V...) do{ _SEP_2(a,b); _SEP_11(V); }while(0)
|
|
||||||
#define _SEP_14(a,b,V...) do{ _SEP_2(a,b); _SEP_12(V); }while(0)
|
|
||||||
#define _SEP_15(a,b,V...) do{ _SEP_2(a,b); _SEP_13(V); }while(0)
|
|
||||||
#define _SEP_16(a,b,V...) do{ _SEP_2(a,b); _SEP_14(V); }while(0)
|
|
||||||
#define _SEP_17(a,b,V...) do{ _SEP_2(a,b); _SEP_15(V); }while(0)
|
|
||||||
#define _SEP_18(a,b,V...) do{ _SEP_2(a,b); _SEP_16(V); }while(0)
|
|
||||||
#define _SEP_19(a,b,V...) do{ _SEP_2(a,b); _SEP_17(V); }while(0)
|
|
||||||
#define _SEP_20(a,b,V...) do{ _SEP_2(a,b); _SEP_18(V); }while(0)
|
|
||||||
#define _SEP_21(a,b,V...) do{ _SEP_2(a,b); _SEP_19(V); }while(0)
|
|
||||||
#define _SEP_22(a,b,V...) do{ _SEP_2(a,b); _SEP_20(V); }while(0)
|
|
||||||
#define _SEP_23(a,b,V...) do{ _SEP_2(a,b); _SEP_21(V); }while(0)
|
|
||||||
#define _SEP_24(a,b,V...) do{ _SEP_2(a,b); _SEP_22(V); }while(0)
|
|
||||||
|
|
||||||
#define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V)
|
// Print up to 20 pairs of values. Odd elements must be literal strings.
|
||||||
|
#define __SEP_N(N,V...) _SEP_##N(V)
|
||||||
|
#define _SEP_N(N,V...) __SEP_N(N,V)
|
||||||
|
#define _SEP_N_REF() _SEP_N
|
||||||
|
#define _SEP_1(s) SERIAL_ECHOPGM(s);
|
||||||
|
#define _SEP_2(s,v) serial_echopair_PGM(PSTR(s),v);
|
||||||
|
#define _SEP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SEP_N_REF)()(TWO_ARGS(V),V);
|
||||||
|
#define SERIAL_ECHOPAIR(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0)
|
||||||
|
|
||||||
// Print up to 12 pairs of values. Odd elements must be PSTR pointers.
|
// Print up to 20 pairs of values followed by newline. Odd elements must be literal strings.
|
||||||
#define __SEP_N_P(N,V...) _SEP_##N##_P(V)
|
#define __SELP_N(N,V...) _SELP_##N(V)
|
||||||
#define _SEP_N_P(N,V...) __SEP_N_P(N,V)
|
#define _SELP_N(N,V...) __SELP_N(N,V)
|
||||||
#define _SEP_1_P(PRE) serialprintPGM(PRE)
|
#define _SELP_N_REF() _SELP_N
|
||||||
#define _SEP_2_P(PRE,V) serial_echopair_PGM(PRE,V)
|
#define _SELP_1(s) SERIAL_ECHOLNPGM(s);
|
||||||
#define _SEP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
|
#define _SELP_2(s,v) serial_echopair_PGM(PSTR(s),v); SERIAL_EOL();
|
||||||
#define _SEP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_2_P(V); }while(0)
|
#define _SELP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SELP_N_REF)()(TWO_ARGS(V),V);
|
||||||
#define _SEP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_3_P(V); }while(0)
|
#define SERIAL_ECHOLNPAIR(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
|
||||||
#define _SEP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_4_P(V); }while(0)
|
|
||||||
#define _SEP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_5_P(V); }while(0)
|
|
||||||
#define _SEP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_6_P(V); }while(0)
|
|
||||||
#define _SEP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_7_P(V); }while(0)
|
|
||||||
#define _SEP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_8_P(V); }while(0)
|
|
||||||
#define _SEP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_9_P(V); }while(0)
|
|
||||||
#define _SEP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_10_P(V); }while(0)
|
|
||||||
#define _SEP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_11_P(V); }while(0)
|
|
||||||
#define _SEP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_12_P(V); }while(0)
|
|
||||||
#define _SEP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_13_P(V); }while(0)
|
|
||||||
#define _SEP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_14_P(V); }while(0)
|
|
||||||
#define _SEP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_15_P(V); }while(0)
|
|
||||||
#define _SEP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_16_P(V); }while(0)
|
|
||||||
#define _SEP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_17_P(V); }while(0)
|
|
||||||
#define _SEP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_18_P(V); }while(0)
|
|
||||||
#define _SEP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_19_P(V); }while(0)
|
|
||||||
#define _SEP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_20_P(V); }while(0)
|
|
||||||
#define _SEP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_21_P(V); }while(0)
|
|
||||||
#define _SEP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_22_P(V); }while(0)
|
|
||||||
|
|
||||||
// SERIAL_ECHOPAIR_P is used to output a key value pair. Unlike SERIAL_ECHOPAIR, the key must be a PGM string already and the value can be anything
|
// Print up to 20 pairs of values. Odd elements must be PSTR pointers.
|
||||||
#define SERIAL_ECHOPAIR_P(V...) _SEP_N_P(NUM_ARGS(V),V)
|
#define __SEP_N_P(N,V...) _SEP_##N##_P(V)
|
||||||
|
#define _SEP_N_P(N,V...) __SEP_N_P(N,V)
|
||||||
|
#define _SEP_N_P_REF() _SEP_N_P
|
||||||
|
#define _SEP_1_P(s) serialprintPGM(s);
|
||||||
|
#define _SEP_2_P(s,v) serial_echopair_PGM(s,v);
|
||||||
|
#define _SEP_3_P(s,v,V...) _SEP_2_P(s,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V);
|
||||||
|
#define SERIAL_ECHOPAIR_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0)
|
||||||
|
|
||||||
// Print up to 12 pairs of values followed by newline
|
// Print up to 20 pairs of values followed by newline. Odd elements must be PSTR pointers.
|
||||||
#define __SELP_N(N,V...) _SELP_##N(V)
|
#define __SELP_N_P(N,V...) _SELP_##N##_P(V)
|
||||||
#define _SELP_N(N,V...) __SELP_N(N,V)
|
#define _SELP_N_P(N,V...) __SELP_N_P(N,V)
|
||||||
#define _SELP_1(PRE) SERIAL_ECHOLNPGM(PRE)
|
#define _SELP_N_P_REF() _SELP_N_P
|
||||||
#define _SELP_2(PRE,V) do{ serial_echopair_PGM(PSTR(PRE),V); SERIAL_EOL(); }while(0)
|
#define _SELP_1_P(s) { serialprintPGM(s); SERIAL_EOL(); }
|
||||||
#define _SELP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOLNPGM(c); }while(0)
|
#define _SELP_2_P(s,v) { serial_echopair_PGM(s,v); SERIAL_EOL(); }
|
||||||
#define _SELP_4(a,b,V...) do{ _SEP_2(a,b); _SELP_2(V); }while(0)
|
#define _SELP_3_P(s,v,V...) { _SEP_2_P(s,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); }
|
||||||
#define _SELP_5(a,b,V...) do{ _SEP_2(a,b); _SELP_3(V); }while(0)
|
#define SERIAL_ECHOLNPAIR_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0)
|
||||||
#define _SELP_6(a,b,V...) do{ _SEP_2(a,b); _SELP_4(V); }while(0)
|
|
||||||
#define _SELP_7(a,b,V...) do{ _SEP_2(a,b); _SELP_5(V); }while(0)
|
|
||||||
#define _SELP_8(a,b,V...) do{ _SEP_2(a,b); _SELP_6(V); }while(0)
|
|
||||||
#define _SELP_9(a,b,V...) do{ _SEP_2(a,b); _SELP_7(V); }while(0)
|
|
||||||
#define _SELP_10(a,b,V...) do{ _SEP_2(a,b); _SELP_8(V); }while(0)
|
|
||||||
#define _SELP_11(a,b,V...) do{ _SEP_2(a,b); _SELP_9(V); }while(0)
|
|
||||||
#define _SELP_12(a,b,V...) do{ _SEP_2(a,b); _SELP_10(V); }while(0)
|
|
||||||
#define _SELP_13(a,b,V...) do{ _SEP_2(a,b); _SELP_11(V); }while(0)
|
|
||||||
#define _SELP_14(a,b,V...) do{ _SEP_2(a,b); _SELP_12(V); }while(0)
|
|
||||||
#define _SELP_15(a,b,V...) do{ _SEP_2(a,b); _SELP_13(V); }while(0)
|
|
||||||
#define _SELP_16(a,b,V...) do{ _SEP_2(a,b); _SELP_14(V); }while(0)
|
|
||||||
#define _SELP_17(a,b,V...) do{ _SEP_2(a,b); _SELP_15(V); }while(0)
|
|
||||||
#define _SELP_18(a,b,V...) do{ _SEP_2(a,b); _SELP_16(V); }while(0)
|
|
||||||
#define _SELP_19(a,b,V...) do{ _SEP_2(a,b); _SELP_17(V); }while(0)
|
|
||||||
#define _SELP_20(a,b,V...) do{ _SEP_2(a,b); _SELP_18(V); }while(0)
|
|
||||||
#define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0)
|
|
||||||
#define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0)
|
|
||||||
#define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0)
|
|
||||||
#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0)
|
|
||||||
#define _SELP_25(a,b,V...) do{ _SEP_2(a,b); _SELP_23(V); }while(0)
|
|
||||||
#define _SELP_26(a,b,V...) do{ _SEP_2(a,b); _SELP_24(V); }while(0)
|
|
||||||
#define _SELP_27(a,b,V...) do{ _SEP_2(a,b); _SELP_25(V); }while(0)
|
|
||||||
#define _SELP_28(a,b,V...) do{ _SEP_2(a,b); _SELP_26(V); }while(0)
|
|
||||||
#define _SELP_29(a,b,V...) do{ _SEP_2(a,b); _SELP_27(V); }while(0)
|
|
||||||
#define _SELP_30(a,b,V...) do{ _SEP_2(a,b); _SELP_28(V); }while(0) // Eat two args, pass the rest up
|
|
||||||
|
|
||||||
#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
|
|
||||||
|
|
||||||
// Print up to 12 pairs of values followed by newline
|
|
||||||
#define __SELP_N_P(N,V...) _SELP_##N##_P(V)
|
|
||||||
#define _SELP_N_P(N,V...) __SELP_N_P(N,V)
|
|
||||||
#define _SELP_1_P(PRE) serialprintPGM(PRE)
|
|
||||||
#define _SELP_2_P(PRE,V) do{ serial_echopair_PGM(PRE,V); SERIAL_EOL(); }while(0)
|
|
||||||
#define _SELP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0)
|
|
||||||
#define _SELP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_2_P(V); }while(0)
|
|
||||||
#define _SELP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_3_P(V); }while(0)
|
|
||||||
#define _SELP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_4_P(V); }while(0)
|
|
||||||
#define _SELP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_5_P(V); }while(0)
|
|
||||||
#define _SELP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_6_P(V); }while(0)
|
|
||||||
#define _SELP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_7_P(V); }while(0)
|
|
||||||
#define _SELP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_8_P(V); }while(0)
|
|
||||||
#define _SELP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_9_P(V); }while(0)
|
|
||||||
#define _SELP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_10_P(V); }while(0)
|
|
||||||
#define _SELP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_11_P(V); }while(0)
|
|
||||||
#define _SELP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_12_P(V); }while(0)
|
|
||||||
#define _SELP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_13_P(V); }while(0)
|
|
||||||
#define _SELP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_14_P(V); }while(0)
|
|
||||||
#define _SELP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_15_P(V); }while(0)
|
|
||||||
#define _SELP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_16_P(V); }while(0)
|
|
||||||
#define _SELP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_17_P(V); }while(0)
|
|
||||||
#define _SELP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_18_P(V); }while(0)
|
|
||||||
#define _SELP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_19_P(V); }while(0)
|
|
||||||
#define _SELP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_20_P(V); }while(0)
|
|
||||||
#define _SELP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_21_P(V); }while(0)
|
|
||||||
#define _SELP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_22_P(V); }while(0)
|
|
||||||
#define _SELP_25_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_23_P(V); }while(0)
|
|
||||||
#define _SELP_26_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_24_P(V); }while(0)
|
|
||||||
#define _SELP_27_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_25_P(V); }while(0)
|
|
||||||
#define _SELP_28_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_26_P(V); }while(0)
|
|
||||||
#define _SELP_29_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_27_P(V); }while(0)
|
|
||||||
#define _SELP_30_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_28_P(V); }while(0) // Eat two args, pass the rest up
|
|
||||||
|
|
||||||
#define SERIAL_ECHOLNPAIR_P(V...) _SELP_N_P(NUM_ARGS(V),V)
|
|
||||||
|
|
||||||
#ifdef AllowDifferentTypeInList
|
#ifdef AllowDifferentTypeInList
|
||||||
|
|
||||||
@@ -388,11 +310,11 @@ void serialprint_truefalse(const bool tf);
|
|||||||
void serial_spaces(uint8_t count);
|
void serial_spaces(uint8_t count);
|
||||||
|
|
||||||
void print_bin(const uint16_t val);
|
void print_bin(const uint16_t val);
|
||||||
void print_xyz(const_float_t x, const_float_t y, const_float_t z, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr);
|
void print_pos(const_float_t x, const_float_t y, const_float_t z, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr);
|
||||||
|
|
||||||
inline void print_xyz(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) {
|
inline void print_pos(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) {
|
||||||
print_xyz(xyz.x, xyz.y, xyz.z, prefix, suffix);
|
print_pos(xyz.x, xyz.y, xyz.z, prefix, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(VAR, PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n")); }while(0)
|
#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n")); }while(0)
|
||||||
#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(V, PSTR(PREFIX), nullptr); }while(0)
|
#define SERIAL_XYZ(PREFIX,V...) do { print_pos(V, PSTR(PREFIX), nullptr); }while(0)
|
||||||
|
@@ -67,7 +67,7 @@ struct BaseSerial : public SerialBase< BaseSerial<SerialT> >, public SerialT {
|
|||||||
|
|
||||||
SerialFeature features(serial_index_t index) const { return CALL_IF_EXISTS(SerialFeature, static_cast<const SerialT*>(this), features, index); }
|
SerialFeature features(serial_index_t index) const { return CALL_IF_EXISTS(SerialFeature, static_cast<const SerialT*>(this), features, index); }
|
||||||
|
|
||||||
// We have 2 implementation of the same method in both base class, let's say which one we want
|
// Two implementations of the same method exist in both base classes so indicate the right one
|
||||||
using SerialT::available;
|
using SerialT::available;
|
||||||
using SerialT::read;
|
using SerialT::read;
|
||||||
using SerialT::begin;
|
using SerialT::begin;
|
||||||
@@ -134,7 +134,7 @@ struct ForwardSerial : public SerialBase< ForwardSerial<SerialT> > {
|
|||||||
ForwardSerial(const bool e, SerialT & out) : BaseClassT(e), out(out) {}
|
ForwardSerial(const bool e, SerialT & out) : BaseClassT(e), out(out) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// A class that's can be hooked and unhooked at runtime, useful to capturing the output of the serial interface
|
// A class that can be hooked and unhooked at runtime, useful to capture the output of the serial interface
|
||||||
template <class SerialT>
|
template <class SerialT>
|
||||||
struct RuntimeSerial : public SerialBase< RuntimeSerial<SerialT> >, public SerialT {
|
struct RuntimeSerial : public SerialBase< RuntimeSerial<SerialT> >, public SerialT {
|
||||||
typedef SerialBase< RuntimeSerial<SerialT> > BaseClassT;
|
typedef SerialBase< RuntimeSerial<SerialT> > BaseClassT;
|
||||||
@@ -195,54 +195,71 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial<SerialT> >, public Seria
|
|||||||
RuntimeSerial(const bool e, Args... args) : BaseClassT(e), SerialT(args...), writeHook(0), eofHook(0), userPointer(0) {}
|
RuntimeSerial(const bool e, Args... args) : BaseClassT(e), SerialT(args...), writeHook(0), eofHook(0), userPointer(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// A class that duplicates its output conditionally to 2 serial interfaces
|
#define _S_CLASS(N) class Serial##N##T,
|
||||||
template <class Serial0T, class Serial1T, const uint8_t offset = 0, const uint8_t step = 1>
|
#define _S_NAME(N) Serial##N##T,
|
||||||
struct MultiSerial : public SerialBase< MultiSerial<Serial0T, Serial1T, offset, step> > {
|
|
||||||
typedef SerialBase< MultiSerial<Serial0T, Serial1T, offset, step> > BaseClassT;
|
template < REPEAT(NUM_SERIAL, _S_CLASS) const uint8_t offset=0, const uint8_t step=1 >
|
||||||
|
struct MultiSerial : public SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME) offset, step > > {
|
||||||
|
typedef SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME) offset, step > > BaseClassT;
|
||||||
|
|
||||||
|
#undef _S_CLASS
|
||||||
|
#undef _S_NAME
|
||||||
|
|
||||||
SerialMask portMask;
|
SerialMask portMask;
|
||||||
Serial0T & serial0;
|
|
||||||
Serial1T & serial1;
|
|
||||||
|
|
||||||
static constexpr uint8_t Usage = ((1 << step) - 1); // A bit mask containing as many bits as step
|
#define _S_DECLARE(N) Serial##N##T & serial##N;
|
||||||
static constexpr uint8_t FirstOutput = (Usage << offset);
|
REPEAT(NUM_SERIAL, _S_DECLARE);
|
||||||
static constexpr uint8_t SecondOutput = (Usage << (offset + step));
|
#undef _S_DECLARE
|
||||||
static constexpr uint8_t Both = FirstOutput | SecondOutput;
|
|
||||||
|
static constexpr uint8_t Usage = _BV(step) - 1; // A bit mask containing 'step' bits
|
||||||
|
|
||||||
|
#define _OUT_PORT(N) (Usage << (offset + (step * N))),
|
||||||
|
static constexpr uint8_t output[] = { REPEAT(NUM_SERIAL, _OUT_PORT) };
|
||||||
|
#undef _OUT_PORT
|
||||||
|
|
||||||
|
#define _OUT_MASK(N) | output[N]
|
||||||
|
static constexpr uint8_t ALL = 0 REPEAT(NUM_SERIAL, _OUT_MASK);
|
||||||
|
#undef _OUT_MASK
|
||||||
|
|
||||||
NO_INLINE void write(uint8_t c) {
|
NO_INLINE void write(uint8_t c) {
|
||||||
if (portMask.enabled(FirstOutput)) serial0.write(c);
|
#define _S_WRITE(N) if (portMask.enabled(output[N])) serial##N.write(c);
|
||||||
if (portMask.enabled(SecondOutput)) serial1.write(c);
|
REPEAT(NUM_SERIAL, _S_WRITE);
|
||||||
|
#undef _S_WRITE
|
||||||
}
|
}
|
||||||
NO_INLINE void msgDone() {
|
NO_INLINE void msgDone() {
|
||||||
if (portMask.enabled(FirstOutput)) serial0.msgDone();
|
#define _S_DONE(N) if (portMask.enabled(output[N])) serial##N.msgDone();
|
||||||
if (portMask.enabled(SecondOutput)) serial1.msgDone();
|
REPEAT(NUM_SERIAL, _S_DONE);
|
||||||
|
#undef _S_DONE
|
||||||
}
|
}
|
||||||
int available(serial_index_t index) {
|
int available(serial_index_t index) {
|
||||||
if (index.within(0 + offset, step + offset - 1))
|
uint8_t pos = offset;
|
||||||
return serial0.available(index);
|
#define _S_AVAILABLE(N) if (index.within(pos, pos + step - 1)) return serial##N.available(index); else pos += step;
|
||||||
else if (index.within(step + offset, 2 * step + offset - 1))
|
REPEAT(NUM_SERIAL, _S_AVAILABLE);
|
||||||
return serial1.available(index);
|
#undef _S_AVAILABLE
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int read(serial_index_t index) {
|
int read(serial_index_t index) {
|
||||||
if (index.within(0 + offset, step + offset - 1))
|
uint8_t pos = offset;
|
||||||
return serial0.read(index);
|
#define _S_READ(N) if (index.within(pos, pos + step - 1)) return serial##N.read(index); else pos += step;
|
||||||
else if (index.within(step + offset, 2 * step + offset - 1))
|
REPEAT(NUM_SERIAL, _S_READ);
|
||||||
return serial1.read(index);
|
#undef _S_READ
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
void begin(const long br) {
|
void begin(const long br) {
|
||||||
if (portMask.enabled(FirstOutput)) serial0.begin(br);
|
#define _S_BEGIN(N) if (portMask.enabled(output[N])) serial##N.begin(br);
|
||||||
if (portMask.enabled(SecondOutput)) serial1.begin(br);
|
REPEAT(NUM_SERIAL, _S_BEGIN);
|
||||||
|
#undef _S_BEGIN
|
||||||
}
|
}
|
||||||
void end() {
|
void end() {
|
||||||
if (portMask.enabled(FirstOutput)) serial0.end();
|
#define _S_END(N) if (portMask.enabled(output[N])) serial##N.end();
|
||||||
if (portMask.enabled(SecondOutput)) serial1.end();
|
REPEAT(NUM_SERIAL, _S_END);
|
||||||
|
#undef _S_END
|
||||||
}
|
}
|
||||||
bool connected() {
|
bool connected() {
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
if (portMask.enabled(FirstOutput)) ret = CALL_IF_EXISTS(bool, &serial0, connected);
|
#define _S_CONNECTED(N) if (portMask.enabled(output[N]) && !CALL_IF_EXISTS(bool, &serial##N, connected)) ret = false;
|
||||||
if (portMask.enabled(SecondOutput)) ret = ret && CALL_IF_EXISTS(bool, &serial1, connected);
|
REPEAT(NUM_SERIAL, _S_CONNECTED);
|
||||||
|
#undef _S_CONNECTED
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,27 +267,32 @@ struct MultiSerial : public SerialBase< MultiSerial<Serial0T, Serial1T, offset,
|
|||||||
using BaseClassT::read;
|
using BaseClassT::read;
|
||||||
|
|
||||||
// Redirect flush
|
// Redirect flush
|
||||||
NO_INLINE void flush() {
|
NO_INLINE void flush() {
|
||||||
if (portMask.enabled(FirstOutput)) serial0.flush();
|
#define _S_FLUSH(N) if (portMask.enabled(output[N])) serial##N.flush();
|
||||||
if (portMask.enabled(SecondOutput)) serial1.flush();
|
REPEAT(NUM_SERIAL, _S_FLUSH);
|
||||||
|
#undef _S_FLUSH
|
||||||
}
|
}
|
||||||
NO_INLINE void flushTX() {
|
NO_INLINE void flushTX() {
|
||||||
if (portMask.enabled(FirstOutput)) CALL_IF_EXISTS(void, &serial0, flushTX);
|
#define _S_FLUSHTX(N) if (portMask.enabled(output[N])) CALL_IF_EXISTS(void, &serial0, flushTX);
|
||||||
if (portMask.enabled(SecondOutput)) CALL_IF_EXISTS(void, &serial1, flushTX);
|
REPEAT(NUM_SERIAL, _S_FLUSHTX);
|
||||||
|
#undef _S_FLUSHTX
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward feature queries
|
// Forward feature queries
|
||||||
SerialFeature features(serial_index_t index) const {
|
SerialFeature features(serial_index_t index) const {
|
||||||
if (index.within(0 + offset, step + offset - 1))
|
uint8_t pos = offset;
|
||||||
return serial0.features(index);
|
#define _S_FEATURES(N) if (index.within(pos, pos + step - 1)) return serial##N.features(index); else pos += step;
|
||||||
else if (index.within(step + offset, 2 * step + offset - 1))
|
REPEAT(NUM_SERIAL, _S_FEATURES);
|
||||||
return serial1.features(index);
|
#undef _S_FEATURES
|
||||||
return SerialFeature::None;
|
return SerialFeature::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiSerial(Serial0T & serial0, Serial1T & serial1, const SerialMask mask = Both, const bool e = false) :
|
#define _S_REFS(N) Serial##N##T & serial##N,
|
||||||
BaseClassT(e),
|
#define _S_INIT(N) ,serial##N (serial##N)
|
||||||
portMask(mask), serial0(serial0), serial1(serial1) {}
|
|
||||||
|
MultiSerial(REPEAT(NUM_SERIAL, _S_REFS) const SerialMask mask = ALL, const bool e = false)
|
||||||
|
: BaseClassT(e), portMask(mask) REPEAT(NUM_SERIAL, _S_INIT) {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Build the actual serial object depending on current configuration
|
// Build the actual serial object depending on current configuration
|
||||||
@@ -278,4 +300,7 @@ struct MultiSerial : public SerialBase< MultiSerial<Serial0T, Serial1T, offset,
|
|||||||
#define ForwardSerial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, ForwardSerial)
|
#define ForwardSerial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, ForwardSerial)
|
||||||
#ifdef HAS_MULTI_SERIAL
|
#ifdef HAS_MULTI_SERIAL
|
||||||
#define Serial2Class ConditionalSerial
|
#define Serial2Class ConditionalSerial
|
||||||
|
#if NUM_SERIAL >= 3
|
||||||
|
#define Serial3Class ConditionalSerial
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,34 +29,6 @@
|
|||||||
class __FlashStringHelper;
|
class __FlashStringHelper;
|
||||||
typedef const __FlashStringHelper *progmem_str;
|
typedef const __FlashStringHelper *progmem_str;
|
||||||
|
|
||||||
//
|
|
||||||
// Enumerated axis indices
|
|
||||||
//
|
|
||||||
// - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
|
|
||||||
// - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
|
|
||||||
// - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
|
|
||||||
//
|
|
||||||
enum AxisEnum : uint8_t {
|
|
||||||
X_AXIS = 0, A_AXIS = 0,
|
|
||||||
Y_AXIS = 1, B_AXIS = 1,
|
|
||||||
Z_AXIS = 2, C_AXIS = 2,
|
|
||||||
E_AXIS = 3,
|
|
||||||
X_HEAD = 4, Y_HEAD = 5, Z_HEAD = 6,
|
|
||||||
E0_AXIS = 3,
|
|
||||||
E1_AXIS, E2_AXIS, E3_AXIS, E4_AXIS, E5_AXIS, E6_AXIS, E7_AXIS,
|
|
||||||
ALL_AXES = 0xFE, NO_AXIS = 0xFF
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// Loop over XYZE axes
|
|
||||||
//
|
|
||||||
#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
|
|
||||||
#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
|
|
||||||
#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
|
|
||||||
#define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
|
|
||||||
#define LOOP_ABCE(VAR) LOOP_S_LE_N(VAR, A_AXIS, E_AXIS)
|
|
||||||
#define LOOP_ABCE_N(VAR) LOOP_S_L_N(VAR, A_AXIS, XYZE_N)
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Conditional type assignment magic. For example...
|
// Conditional type assignment magic. For example...
|
||||||
//
|
//
|
||||||
@@ -67,6 +39,32 @@ struct IF { typedef R type; };
|
|||||||
template <class L, class R>
|
template <class L, class R>
|
||||||
struct IF<true, L, R> { typedef L type; };
|
struct IF<true, L, R> { typedef L type; };
|
||||||
|
|
||||||
|
//
|
||||||
|
// Enumerated axis indices
|
||||||
|
//
|
||||||
|
// - X_AXIS, Y_AXIS, and Z_AXIS should be used for axes in Cartesian space
|
||||||
|
// - A_AXIS, B_AXIS, and C_AXIS should be used for Steppers, corresponding to XYZ on Cartesians
|
||||||
|
// - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics
|
||||||
|
//
|
||||||
|
enum AxisEnum : uint8_t {
|
||||||
|
X_AXIS = 0, A_AXIS = X_AXIS,
|
||||||
|
Y_AXIS = 1, B_AXIS = Y_AXIS,
|
||||||
|
Z_AXIS = 2, C_AXIS = Z_AXIS,
|
||||||
|
E_AXIS,
|
||||||
|
X_HEAD, Y_HEAD, Z_HEAD,
|
||||||
|
E0_AXIS = E_AXIS,
|
||||||
|
E1_AXIS, E2_AXIS, E3_AXIS, E4_AXIS, E5_AXIS, E6_AXIS, E7_AXIS,
|
||||||
|
ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Loop over axes
|
||||||
|
//
|
||||||
|
#define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
|
||||||
|
#define LOOP_LINEAR_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LINEAR_AXES)
|
||||||
|
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
|
||||||
|
#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES)
|
||||||
|
|
||||||
//
|
//
|
||||||
// feedRate_t is just a humble float
|
// feedRate_t is just a humble float
|
||||||
//
|
//
|
||||||
@@ -201,8 +199,8 @@ struct XYval {
|
|||||||
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
||||||
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; }
|
||||||
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; }
|
||||||
#if XYZE_N > XYZE
|
#if DISTINCT_AXES > LOGICAL_AXES
|
||||||
FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[DISTINCT_AXES]) { x = arr[0]; y = arr[1]; }
|
||||||
#endif
|
#endif
|
||||||
FI void reset() { x = y = 0; }
|
FI void reset() { x = y = 0; }
|
||||||
FI T magnitude() const { return (T)sqrtf(x*x + y*y); }
|
FI T magnitude() const { return (T)sqrtf(x*x + y*y); }
|
||||||
@@ -312,8 +310,8 @@ struct XYZval {
|
|||||||
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
||||||
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
||||||
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
||||||
#if XYZE_N > XYZE
|
#if DISTINCT_AXES > XYZE
|
||||||
FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
FI void set(const T (&arr)[DISTINCT_AXES]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
||||||
#endif
|
#endif
|
||||||
FI void reset() { x = y = z = 0; }
|
FI void reset() { x = y = z = 0; }
|
||||||
FI T magnitude() const { return (T)sqrtf(x*x + y*y + z*z); }
|
FI T magnitude() const { return (T)sqrtf(x*x + y*y + z*z); }
|
||||||
@@ -427,8 +425,8 @@ struct XYZEval {
|
|||||||
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
|
||||||
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; }
|
||||||
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; }
|
FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; }
|
||||||
#if XYZE_N > XYZE
|
#if DISTINCT_AXES > XYZE
|
||||||
FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; }
|
FI void set(const T (&arr)[DISTINCT_AXES]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; }
|
||||||
#endif
|
#endif
|
||||||
FI XYZEval<T> copy() const { return *this; }
|
FI XYZEval<T> copy() const { return *this; }
|
||||||
FI XYZEval<T> ABS() const { return { T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(e)) }; }
|
FI XYZEval<T> ABS() const { return { T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(e)) }; }
|
||||||
@@ -518,4 +516,4 @@ struct XYZEval {
|
|||||||
#undef FI
|
#undef FI
|
||||||
|
|
||||||
const xyze_char_t axis_codes { 'X', 'Y', 'Z', 'E' };
|
const xyze_char_t axis_codes { 'X', 'Y', 'Z', 'E' };
|
||||||
#define XYZ_CHAR(A) ((char)('X' + A))
|
#define AXIS_CHAR(A) ((char)('X' + A))
|
||||||
|
@@ -35,18 +35,6 @@ void safe_delay(millis_t ms) {
|
|||||||
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
|
thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(MARLIN_DEV_MODE)
|
|
||||||
void early_safe_delay(millis_t ms) {
|
|
||||||
while (ms > 50) {
|
|
||||||
ms -= 50;
|
|
||||||
delay(50);
|
|
||||||
watchdog_refresh();
|
|
||||||
}
|
|
||||||
delay(ms);
|
|
||||||
watchdog_refresh();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A delay to provide brittle hosts time to receive bytes
|
// A delay to provide brittle hosts time to receive bytes
|
||||||
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
||||||
|
|
||||||
@@ -135,9 +123,9 @@ void safe_delay(millis_t ms) {
|
|||||||
#endif
|
#endif
|
||||||
#if ABL_PLANAR
|
#if ABL_PLANAR
|
||||||
SERIAL_ECHOPGM("ABL Adjustment X");
|
SERIAL_ECHOPGM("ABL Adjustment X");
|
||||||
LOOP_XYZ(a) {
|
LOOP_LINEAR_AXES(a) {
|
||||||
const float v = planner.get_axis_position_mm(AxisEnum(a)) - current_position[a];
|
const float v = planner.get_axis_position_mm(AxisEnum(a)) - current_position[a];
|
||||||
SERIAL_CHAR(' ', XYZ_CHAR(a));
|
SERIAL_CHAR(' ', AXIS_CHAR(a));
|
||||||
if (v > 0) SERIAL_CHAR('+');
|
if (v > 0) SERIAL_CHAR('+');
|
||||||
SERIAL_DECIMAL(v);
|
SERIAL_DECIMAL(v);
|
||||||
}
|
}
|
||||||
|
@@ -26,11 +26,6 @@
|
|||||||
#include "../core/millis_t.h"
|
#include "../core/millis_t.h"
|
||||||
|
|
||||||
void safe_delay(millis_t ms); // Delay ensuring that temperatures are updated and the watchdog is kept alive.
|
void safe_delay(millis_t ms); // Delay ensuring that temperatures are updated and the watchdog is kept alive.
|
||||||
#if ENABLED(MARLIN_DEV_MODE)
|
|
||||||
void early_safe_delay(millis_t ms); // Delay ensuring that the watchdog is kept alive. Can be used before the Temperature ISR starts.
|
|
||||||
#else
|
|
||||||
inline void early_safe_delay(millis_t ms) { safe_delay(ms); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
#if ENABLED(SERIAL_OVERRUN_PROTECTION)
|
||||||
void serial_delay(const millis_t ms);
|
void serial_delay(const millis_t ms);
|
||||||
|
@@ -104,7 +104,7 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
|
|||||||
|
|
||||||
const float f_corr = float(correction) / 255.0f;
|
const float f_corr = float(correction) / 255.0f;
|
||||||
|
|
||||||
LOOP_XYZ(axis) {
|
LOOP_LINEAR_AXES(axis) {
|
||||||
if (distance_mm[axis]) {
|
if (distance_mm[axis]) {
|
||||||
const bool reversing = TEST(dm,axis);
|
const bool reversing = TEST(dm,axis);
|
||||||
|
|
||||||
|
@@ -103,9 +103,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static float get_z(const xy_pos_t &pos
|
static float get_z(const xy_pos_t &pos
|
||||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
OPTARG(ENABLE_LEVELING_FADE_HEIGHT, const_float_t factor=1.0f)
|
||||||
, const_float_t factor=1.0f
|
|
||||||
#endif
|
|
||||||
) {
|
) {
|
||||||
#if DISABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
#if DISABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||||
constexpr float factor = 1.0f;
|
constexpr float factor = 1.0f;
|
||||||
|
@@ -35,6 +35,7 @@ unified_bed_leveling ubl;
|
|||||||
#include "../../../module/planner.h"
|
#include "../../../module/planner.h"
|
||||||
#include "../../../module/motion.h"
|
#include "../../../module/motion.h"
|
||||||
#include "../../../module/probe.h"
|
#include "../../../module/probe.h"
|
||||||
|
#include "../../../module/temperature.h"
|
||||||
|
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
#include "../../../lcd/extui/ui_api.h"
|
#include "../../../lcd/extui/ui_api.h"
|
||||||
@@ -254,4 +255,48 @@ bool unified_bed_leveling::sanity_check() {
|
|||||||
return !!error_flag;
|
return !!error_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLED(UBL_MESH_WIZARD)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* M1004: UBL Mesh Wizard - One-click mesh creation with or without a probe
|
||||||
|
*/
|
||||||
|
void GcodeSuite::M1004() {
|
||||||
|
|
||||||
|
#define ALIGN_GCODE TERN(Z_STEPPER_AUTO_ALIGN, "G34", "")
|
||||||
|
#define PROBE_GCODE TERN(HAS_BED_PROBE, "G29P1\nG29P3", "G29P4R255")
|
||||||
|
|
||||||
|
#if HAS_HOTEND
|
||||||
|
if (parser.seenval('H')) { // Handle H# parameter to set Hotend temp
|
||||||
|
const celsius_t hotend_temp = parser.value_int(); // Marlin never sends itself F or K, always C
|
||||||
|
thermalManager.setTargetHotend(hotend_temp, 0);
|
||||||
|
thermalManager.wait_for_hotend(false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_HEATED_BED
|
||||||
|
if (parser.seenval('B')) { // Handle B# parameter to set Bed temp
|
||||||
|
const celsius_t bed_temp = parser.value_int(); // Marlin never sends itself F or K, always C
|
||||||
|
thermalManager.setTargetBed(bed_temp);
|
||||||
|
thermalManager.wait_for_bed(false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
process_subcommands_now_P(G28_STR); // Home
|
||||||
|
process_subcommands_now_P(PSTR(ALIGN_GCODE "\n" // Align multi z axis if available
|
||||||
|
PROBE_GCODE "\n" // Build mesh with available hardware
|
||||||
|
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
||||||
|
|
||||||
|
if (parser.seenval('S')) {
|
||||||
|
char umw_gcode[32];
|
||||||
|
sprintf_P(umw_gcode, PSTR("G29S%i"), parser.value_int());
|
||||||
|
queue.inject(umw_gcode);
|
||||||
|
}
|
||||||
|
|
||||||
|
process_subcommands_now_P(PSTR("G29A\nG29F10\n" // Set UBL Active & Fade 10
|
||||||
|
"M140S0\nM104S0\n" // Turn off heaters
|
||||||
|
"M500")); // Store settings
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // UBL_MESH_WIZARD
|
||||||
|
|
||||||
#endif // AUTO_BED_LEVELING_UBL
|
#endif // AUTO_BED_LEVELING_UBL
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#define UBL_OK false
|
#define UBL_OK false
|
||||||
#define UBL_ERR true
|
#define UBL_ERR true
|
||||||
|
|
||||||
enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP };
|
enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST };
|
||||||
|
|
||||||
// External references
|
// External references
|
||||||
|
|
||||||
|
@@ -306,7 +306,7 @@ void unified_bed_leveling::G29() {
|
|||||||
if (G29_parse_parameters()) return; // Abort on parameter error
|
if (G29_parse_parameters()) return; // Abort on parameter error
|
||||||
|
|
||||||
const int8_t p_val = parser.intval('P', -1);
|
const int8_t p_val = parser.intval('P', -1);
|
||||||
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
|
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
|
||||||
#if ENABLED(HAS_MULTI_HOTEND)
|
#if ENABLED(HAS_MULTI_HOTEND)
|
||||||
const uint8_t old_tool_index = active_extruder;
|
const uint8_t old_tool_index = active_extruder;
|
||||||
#endif
|
#endif
|
||||||
@@ -315,7 +315,7 @@ void unified_bed_leveling::G29() {
|
|||||||
if (may_move) {
|
if (may_move) {
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
// Send 'N' to force homing before G29 (internal only)
|
// Send 'N' to force homing before G29 (internal only)
|
||||||
if (axes_should_home() || parser.seen('N')) gcode.home_all_axes();
|
if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
|
||||||
TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0));
|
TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ void unified_bed_leveling::G29() {
|
|||||||
// Allow the user to specify the height because 10mm is a little extreme in some cases.
|
// Allow the user to specify the height because 10mm is a little extreme in some cases.
|
||||||
for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in
|
for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in
|
||||||
for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed
|
for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed
|
||||||
z_values[x][y] += parser.seen('C') ? param.C_constant : 9.99f;
|
z_values[x][y] += parser.seen_test('C') ? param.C_constant : 9.99f;
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y]));
|
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y]));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -389,7 +389,7 @@ void unified_bed_leveling::G29() {
|
|||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
|
|
||||||
if (parser.seen('J')) {
|
if (parser.seen_test('J')) {
|
||||||
save_ubl_active_state_and_disable();
|
save_ubl_active_state_and_disable();
|
||||||
tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
|
tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
|
||||||
restore_ubl_active_state_and_leave();
|
restore_ubl_active_state_and_leave();
|
||||||
@@ -402,7 +402,7 @@ void unified_bed_leveling::G29() {
|
|||||||
|
|
||||||
#endif // HAS_BED_PROBE
|
#endif // HAS_BED_PROBE
|
||||||
|
|
||||||
if (parser.seen('P')) {
|
if (parser.seen_test('P')) {
|
||||||
if (WITHIN(param.P_phase, 0, 1) && storage_slot == -1) {
|
if (WITHIN(param.P_phase, 0, 1) && storage_slot == -1) {
|
||||||
storage_slot = 0;
|
storage_slot = 0;
|
||||||
SERIAL_ECHOLNPGM("Default storage slot 0 selected.");
|
SERIAL_ECHOLNPGM("Default storage slot 0 selected.");
|
||||||
@@ -423,7 +423,7 @@ void unified_bed_leveling::G29() {
|
|||||||
//
|
//
|
||||||
// Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
|
// Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
|
||||||
//
|
//
|
||||||
if (!parser.seen('C')) {
|
if (!parser.seen_test('C')) {
|
||||||
invalidate();
|
invalidate();
|
||||||
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
|
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
|
||||||
}
|
}
|
||||||
@@ -433,7 +433,7 @@ void unified_bed_leveling::G29() {
|
|||||||
SERIAL_DECIMAL(param.XY_pos.y);
|
SERIAL_DECIMAL(param.XY_pos.y);
|
||||||
SERIAL_ECHOLNPGM(").\n");
|
SERIAL_ECHOLNPGM(").\n");
|
||||||
}
|
}
|
||||||
probe_entire_mesh(param.XY_pos, parser.seen('T'), parser.seen('E'), parser.seen('U'));
|
probe_entire_mesh(param.XY_pos, parser.seen_test('T'), parser.seen_test('E'), parser.seen_test('U'));
|
||||||
|
|
||||||
report_current_position();
|
report_current_position();
|
||||||
probe_deployed = true;
|
probe_deployed = true;
|
||||||
@@ -449,7 +449,7 @@ void unified_bed_leveling::G29() {
|
|||||||
SERIAL_ECHOLNPGM("Manually probing unreachable points.");
|
SERIAL_ECHOLNPGM("Manually probing unreachable points.");
|
||||||
do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
|
do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
|
||||||
|
|
||||||
if (parser.seen('C') && !param.XY_seen) {
|
if (parser.seen_test('C') && !param.XY_seen) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use a good default location for the path.
|
* Use a good default location for the path.
|
||||||
@@ -483,7 +483,7 @@ void unified_bed_leveling::G29() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES);
|
const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES);
|
||||||
manually_probe_remaining_mesh(param.XY_pos, height, param.B_shim_thickness, parser.seen('T'));
|
manually_probe_remaining_mesh(param.XY_pos, height, param.B_shim_thickness, parser.seen_test('T'));
|
||||||
|
|
||||||
SERIAL_ECHOLNPGM("G29 P2 finished.");
|
SERIAL_ECHOLNPGM("G29 P2 finished.");
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ void unified_bed_leveling::G29() {
|
|||||||
|
|
||||||
case 4: // Fine Tune (i.e., Edit) the Mesh
|
case 4: // Fine Tune (i.e., Edit) the Mesh
|
||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
fine_tune_mesh(param.XY_pos, parser.seen('T'));
|
fine_tune_mesh(param.XY_pos, parser.seen_test('T'));
|
||||||
#else
|
#else
|
||||||
SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present.");
|
SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present.");
|
||||||
return;
|
return;
|
||||||
@@ -574,7 +574,7 @@ void unified_bed_leveling::G29() {
|
|||||||
// Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
|
// Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
|
||||||
// good to have the extra information. Soon... we prune this to just a few items
|
// good to have the extra information. Soon... we prune this to just a few items
|
||||||
//
|
//
|
||||||
if (parser.seen('W')) g29_what_command();
|
if (parser.seen_test('W')) g29_what_command();
|
||||||
|
|
||||||
//
|
//
|
||||||
// When we are fully debugged, this may go away. But there are some valid
|
// When we are fully debugged, this may go away. But there are some valid
|
||||||
@@ -640,7 +640,7 @@ void unified_bed_leveling::G29() {
|
|||||||
SERIAL_ECHOLNPGM("Done.");
|
SERIAL_ECHOLNPGM("Done.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parser.seen('T'))
|
if (parser.seen_test('T'))
|
||||||
display_map(param.T_map_type);
|
display_map(param.T_map_type);
|
||||||
|
|
||||||
LEAVE:
|
LEAVE:
|
||||||
@@ -915,7 +915,7 @@ void set_message_with_feedback(PGM_P const msg_P) {
|
|||||||
|
|
||||||
if (do_ubl_mesh_map) display_map(param.T_map_type); // Show user where we're probing
|
if (do_ubl_mesh_map) display_map(param.T_map_type); // Show user where we're probing
|
||||||
|
|
||||||
if (parser.seen('B')) {
|
if (parser.seen_test('B')) {
|
||||||
SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
|
SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
|
||||||
LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
|
LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
|
||||||
}
|
}
|
||||||
@@ -954,7 +954,7 @@ void set_message_with_feedback(PGM_P const msg_P) {
|
|||||||
* NOTE: Blocks the G-code queue and captures Marlin UI during use.
|
* NOTE: Blocks the G-code queue and captures Marlin UI during use.
|
||||||
*/
|
*/
|
||||||
void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) {
|
void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) {
|
||||||
if (!parser.seen('R')) // fine_tune_mesh() is special. If no repetition count flag is specified
|
if (!parser.seen_test('R')) // fine_tune_mesh() is special. If no repetition count flag is specified
|
||||||
param.R_repetition = 1; // do exactly one mesh location. Otherwise use what the parser decided.
|
param.R_repetition = 1; // do exactly one mesh location. Otherwise use what the parser decided.
|
||||||
|
|
||||||
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
|
#if ENABLED(UBL_MESH_EDIT_MOVES_Z)
|
||||||
@@ -1091,7 +1091,7 @@ bool unified_bed_leveling::G29_parse_parameters() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
param.V_verbosity = parser.seen('V') ? parser.value_int() : 0;
|
param.V_verbosity = parser.intval('V');
|
||||||
if (!WITHIN(param.V_verbosity, 0, 4)) {
|
if (!WITHIN(param.V_verbosity, 0, 4)) {
|
||||||
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n");
|
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n");
|
||||||
err_flag = true;
|
err_flag = true;
|
||||||
@@ -1153,15 +1153,15 @@ bool unified_bed_leveling::G29_parse_parameters() {
|
|||||||
* Leveling is being enabled here with old data, possibly
|
* Leveling is being enabled here with old data, possibly
|
||||||
* none. Error handling should disable for safety...
|
* none. Error handling should disable for safety...
|
||||||
*/
|
*/
|
||||||
if (parser.seen('A')) {
|
if (parser.seen_test('A')) {
|
||||||
if (parser.seen('D')) {
|
if (parser.seen_test('D')) {
|
||||||
SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n");
|
SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n");
|
||||||
return UBL_ERR;
|
return UBL_ERR;
|
||||||
}
|
}
|
||||||
set_bed_leveling_enabled(true);
|
set_bed_leveling_enabled(true);
|
||||||
report_state();
|
report_state();
|
||||||
}
|
}
|
||||||
else if (parser.seen('D')) {
|
else if (parser.seen_test('D')) {
|
||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
report_state();
|
report_state();
|
||||||
}
|
}
|
||||||
@@ -1282,7 +1282,7 @@ mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {
|
|||||||
|
|
||||||
static bool test_func(uint8_t i, uint8_t j, void *data) {
|
static bool test_func(uint8_t i, uint8_t j, void *data) {
|
||||||
find_closest_t *d = (find_closest_t*)data;
|
find_closest_t *d = (find_closest_t*)data;
|
||||||
if ( (d->type == (isnan(ubl.z_values[i][j]) ? INVALID : REAL))
|
if ( d->type == CLOSEST || d->type == (isnan(ubl.z_values[i][j]) ? INVALID : REAL)
|
||||||
|| (d->type == SET_IN_BITMAP && !d->done_flags->marked(i, j))
|
|| (d->type == SET_IN_BITMAP && !d->done_flags->marked(i, j))
|
||||||
) {
|
) {
|
||||||
// Found a Mesh Point of the specified type!
|
// Found a Mesh Point of the specified type!
|
||||||
@@ -1326,7 +1326,7 @@ mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const Mesh
|
|||||||
float best_so_far = 99999.99f;
|
float best_so_far = 99999.99f;
|
||||||
|
|
||||||
GRID_LOOP(i, j) {
|
GRID_LOOP(i, j) {
|
||||||
if ( (type == (isnan(z_values[i][j]) ? INVALID : REAL))
|
if ( type == CLOSEST || type == (isnan(z_values[i][j]) ? INVALID : REAL)
|
||||||
|| (type == SET_IN_BITMAP && !done_flags->marked(i, j))
|
|| (type == SET_IN_BITMAP && !done_flags->marked(i, j))
|
||||||
) {
|
) {
|
||||||
// Found a Mesh Point of the specified type!
|
// Found a Mesh Point of the specified type!
|
||||||
@@ -1520,7 +1520,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
|||||||
SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
|
SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
|
||||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
|
TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
|
||||||
|
|
||||||
measured_z = probe.probe_at_point(rpos, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
|
measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
|
||||||
|
|
||||||
abort_flag = isnan(measured_z);
|
abort_flag = isnan(measured_z);
|
||||||
|
|
||||||
|
@@ -362,15 +362,11 @@
|
|||||||
while (--segments) {
|
while (--segments) {
|
||||||
raw += diff;
|
raw += diff;
|
||||||
planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, segment_xyz_mm
|
planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, segment_xyz_mm
|
||||||
#if ENABLED(SCARA_FEEDRATE_SCALING)
|
OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)
|
||||||
, inv_duration
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
planner.buffer_line(destination, scaled_fr_mm_s, active_extruder, segment_xyz_mm
|
planner.buffer_line(destination, scaled_fr_mm_s, active_extruder, segment_xyz_mm
|
||||||
#if ENABLED(SCARA_FEEDRATE_SCALING)
|
OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)
|
||||||
, inv_duration
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
return false; // Did not set current from destination
|
return false; // Did not set current from destination
|
||||||
}
|
}
|
||||||
|
@@ -28,10 +28,6 @@
|
|||||||
|
|
||||||
CaseLight caselight;
|
CaseLight caselight;
|
||||||
|
|
||||||
#if CASE_LIGHT_IS_COLOR_LED
|
|
||||||
#include "leds/leds.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CASELIGHT_USES_BRIGHTNESS && !defined(CASE_LIGHT_DEFAULT_BRIGHTNESS)
|
#if CASELIGHT_USES_BRIGHTNESS && !defined(CASE_LIGHT_DEFAULT_BRIGHTNESS)
|
||||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 0 // For use on PWM pin as non-PWM just sets a default
|
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 0 // For use on PWM pin as non-PWM just sets a default
|
||||||
#endif
|
#endif
|
||||||
@@ -43,17 +39,9 @@ CaseLight caselight;
|
|||||||
bool CaseLight::on = CASE_LIGHT_DEFAULT_ON;
|
bool CaseLight::on = CASE_LIGHT_DEFAULT_ON;
|
||||||
|
|
||||||
#if CASE_LIGHT_IS_COLOR_LED
|
#if CASE_LIGHT_IS_COLOR_LED
|
||||||
LEDColor CaseLight::color =
|
#include "leds/leds.h"
|
||||||
#ifdef CASE_LIGHT_DEFAULT_COLOR
|
constexpr uint8_t init_case_light[] = CASE_LIGHT_DEFAULT_COLOR;
|
||||||
CASE_LIGHT_DEFAULT_COLOR
|
LEDColor CaseLight::color = { init_case_light[0], init_case_light[1], init_case_light[2] OPTARG(HAS_WHITE_LED, init_case_light[3]) };
|
||||||
#else
|
|
||||||
{ 255, 255, 255, 255 }
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef INVERT_CASE_LIGHT
|
|
||||||
#define INVERT_CASE_LIGHT false
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void CaseLight::update(const bool sflag) {
|
void CaseLight::update(const bool sflag) {
|
||||||
@@ -72,16 +60,12 @@ void CaseLight::update(const bool sflag) {
|
|||||||
if (sflag && on)
|
if (sflag && on)
|
||||||
brightness = brightness_sav; // Restore last brightness for M355 S1
|
brightness = brightness_sav; // Restore last brightness for M355 S1
|
||||||
|
|
||||||
const uint8_t i = on ? brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i;
|
const uint8_t i = on ? brightness : 0, n10ct = ENABLED(INVERT_CASE_LIGHT) ? 255 - i : i;
|
||||||
|
UNUSED(n10ct);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CASE_LIGHT_IS_COLOR_LED
|
#if CASE_LIGHT_IS_COLOR_LED
|
||||||
|
leds.set_color(LEDColor(color.r, color.g, color.b OPTARG(HAS_WHITE_LED, color.w), n10ct));
|
||||||
leds.set_color(
|
|
||||||
MakeLEDColor(color.r, color.g, color.b, color.w, n10ct),
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
#else // !CASE_LIGHT_IS_COLOR_LED
|
#else // !CASE_LIGHT_IS_COLOR_LED
|
||||||
|
|
||||||
#if CASELIGHT_USES_BRIGHTNESS
|
#if CASELIGHT_USES_BRIGHTNESS
|
||||||
@@ -96,7 +80,7 @@ void CaseLight::update(const bool sflag) {
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
const bool s = on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT;
|
const bool s = on ? TERN(INVERT_CASE_LIGHT, LOW, HIGH) : TERN(INVERT_CASE_LIGHT, HIGH, LOW);
|
||||||
WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW);
|
WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include "leds/leds.h" // for LEDColor
|
#include "leds/leds.h" // for LEDColor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) || ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
#if NONE(CASE_LIGHT_NO_BRIGHTNESS, CASE_LIGHT_IS_COLOR_LED) || ENABLED(CASE_LIGHT_USE_NEOPIXEL)
|
||||||
#define CASELIGHT_USES_BRIGHTNESS 1
|
#define CASELIGHT_USES_BRIGHTNESS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -78,10 +78,8 @@ public:
|
|||||||
|
|
||||||
// Get the total flow (in liters per minute) since the last reading
|
// Get the total flow (in liters per minute) since the last reading
|
||||||
static void calc_flowrate() {
|
static void calc_flowrate() {
|
||||||
//flowmeter_interrupt_disable();
|
// flowrate = (litres) * (seconds) = litres per minute
|
||||||
// const uint16_t pulses = flowpulses;
|
flowrate = (flowpulses / (float)FLOWMETER_PPL) * ((1000.0f / (float)FLOWMETER_INTERVAL) * 60.0f);
|
||||||
//flowmeter_interrupt_enable();
|
|
||||||
flowrate = flowpulses * 60.0f * (1000.0f / (FLOWMETER_INTERVAL)) * (1000.0f / (FLOWMETER_PPL));
|
|
||||||
flowpulses = 0;
|
flowpulses = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -66,14 +66,14 @@ uint8_t MCP4728::analogWrite(const uint8_t channel, const uint16_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write all input resistor values to EEPROM using SequencialWrite method.
|
* Write all input resistor values to EEPROM using SequentialWrite method.
|
||||||
* This will update both input register and EEPROM value
|
* This will update both input register and EEPROM value
|
||||||
* This will also write current Vref, PowerDown, Gain settings to EEPROM
|
* This will also write current Vref, PowerDown, Gain settings to EEPROM
|
||||||
*/
|
*/
|
||||||
uint8_t MCP4728::eepromWrite() {
|
uint8_t MCP4728::eepromWrite() {
|
||||||
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
|
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
|
||||||
Wire.write(SEQWRITE);
|
Wire.write(SEQWRITE);
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(dac_values[i]));
|
Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(dac_values[i]));
|
||||||
Wire.write(lowByte(dac_values[i]));
|
Wire.write(lowByte(dac_values[i]));
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ void MCP4728::setDrvPct(xyze_uint_t &pct) {
|
|||||||
*/
|
*/
|
||||||
uint8_t MCP4728::fastWrite() {
|
uint8_t MCP4728::fastWrite() {
|
||||||
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
|
Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS));
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
Wire.write(highByte(dac_values[i]));
|
Wire.write(highByte(dac_values[i]));
|
||||||
Wire.write(lowByte(dac_values[i]));
|
Wire.write(lowByte(dac_values[i]));
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ int StepperDAC::init() {
|
|||||||
mcp4728.setVref_all(DAC_STEPPER_VREF);
|
mcp4728.setVref_all(DAC_STEPPER_VREF);
|
||||||
mcp4728.setGain_all(DAC_STEPPER_GAIN);
|
mcp4728.setGain_all(DAC_STEPPER_GAIN);
|
||||||
|
|
||||||
if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1 ) {
|
if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1) {
|
||||||
mcp4728.setDrvPct(dac_channel_pct);
|
mcp4728.setDrvPct(dac_channel_pct);
|
||||||
mcp4728.eepromWrite();
|
mcp4728.eepromWrite();
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ static float dac_amps(int8_t n) { return mcp4728.getValue(dac_order[n]) * 0.125
|
|||||||
|
|
||||||
uint8_t StepperDAC::get_current_percent(const AxisEnum axis) { return mcp4728.getDrvPct(dac_order[axis]); }
|
uint8_t StepperDAC::get_current_percent(const AxisEnum axis) { return mcp4728.getDrvPct(dac_order[axis]); }
|
||||||
void StepperDAC::set_current_percents(xyze_uint8_t &pct) {
|
void StepperDAC::set_current_percents(xyze_uint8_t &pct) {
|
||||||
LOOP_XYZE(i) dac_channel_pct[i] = pct[dac_order[i]];
|
LOOP_LOGICAL_AXES(i) dac_channel_pct[i] = pct[dac_order[i]];
|
||||||
mcp4728.setDrvPct(dac_channel_pct);
|
mcp4728.setDrvPct(dac_channel_pct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -337,7 +337,7 @@ bool I2CPositionEncoder::test_axis() {
|
|||||||
ec = false;
|
ec = false;
|
||||||
|
|
||||||
xyze_pos_t startCoord, endCoord;
|
xyze_pos_t startCoord, endCoord;
|
||||||
LOOP_XYZ(a) {
|
LOOP_LINEAR_AXES(a) {
|
||||||
startCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
startCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
||||||
endCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
endCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
||||||
}
|
}
|
||||||
@@ -392,7 +392,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
|
|||||||
travelDistance = endDistance - startDistance;
|
travelDistance = endDistance - startDistance;
|
||||||
|
|
||||||
xyze_pos_t startCoord, endCoord;
|
xyze_pos_t startCoord, endCoord;
|
||||||
LOOP_XYZ(a) {
|
LOOP_LINEAR_AXES(a) {
|
||||||
startCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
startCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
||||||
endCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
endCoord[a] = planner.get_axis_position_mm((AxisEnum)a);
|
||||||
}
|
}
|
||||||
@@ -819,11 +819,11 @@ int8_t I2CPositionEncodersMgr::parse() {
|
|||||||
void I2CPositionEncodersMgr::M860() {
|
void I2CPositionEncodersMgr::M860() {
|
||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
const bool hasU = parser.seen('U'), hasO = parser.seen('O');
|
const bool hasU = parser.seen_test('U'), hasO = parser.seen_test('O');
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen_test(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) report_position(idx, hasU, hasO);
|
if ((int8_t)idx >= 0) report_position(idx, hasU, hasO);
|
||||||
}
|
}
|
||||||
@@ -849,7 +849,7 @@ void I2CPositionEncodersMgr::M861() {
|
|||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) report_status(idx);
|
if ((int8_t)idx >= 0) report_status(idx);
|
||||||
@@ -877,7 +877,7 @@ void I2CPositionEncodersMgr::M862() {
|
|||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) test_axis(idx);
|
if ((int8_t)idx >= 0) test_axis(idx);
|
||||||
@@ -908,7 +908,7 @@ void I2CPositionEncodersMgr::M863() {
|
|||||||
const uint8_t iterations = constrain(parser.byteval('P', 1), 1, 10);
|
const uint8_t iterations = constrain(parser.byteval('P', 1), 1, 10);
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) calibrate_steps_mm(idx, iterations);
|
if ((int8_t)idx >= 0) calibrate_steps_mm(idx, iterations);
|
||||||
@@ -956,10 +956,10 @@ void I2CPositionEncodersMgr::M864() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (parser.seen('X')) newAddress = I2CPE_PRESET_ADDR_X;
|
if (parser.seen_test('X')) newAddress = I2CPE_PRESET_ADDR_X;
|
||||||
else if (parser.seen('Y')) newAddress = I2CPE_PRESET_ADDR_Y;
|
else if (parser.seen_test('Y')) newAddress = I2CPE_PRESET_ADDR_Y;
|
||||||
else if (parser.seen('Z')) newAddress = I2CPE_PRESET_ADDR_Z;
|
else if (parser.seen_test('Z')) newAddress = I2CPE_PRESET_ADDR_Z;
|
||||||
else if (parser.seen('E')) newAddress = I2CPE_PRESET_ADDR_E;
|
else if (parser.seen_test('E')) newAddress = I2CPE_PRESET_ADDR_E;
|
||||||
else return;
|
else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -984,7 +984,7 @@ void I2CPositionEncodersMgr::M865() {
|
|||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
if (!I2CPE_addr) {
|
if (!I2CPE_addr) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) report_module_firmware(encoders[idx].get_address());
|
if ((int8_t)idx >= 0) report_module_firmware(encoders[idx].get_address());
|
||||||
@@ -1012,10 +1012,10 @@ void I2CPositionEncodersMgr::M865() {
|
|||||||
void I2CPositionEncodersMgr::M866() {
|
void I2CPositionEncodersMgr::M866() {
|
||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
const bool hasR = parser.seen('R');
|
const bool hasR = parser.seen_test('R');
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) {
|
if ((int8_t)idx >= 0) {
|
||||||
@@ -1053,7 +1053,7 @@ void I2CPositionEncodersMgr::M867() {
|
|||||||
const int8_t onoff = parser.seenval('S') ? parser.value_int() : -1;
|
const int8_t onoff = parser.seenval('S') ? parser.value_int() : -1;
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) {
|
if ((int8_t)idx >= 0) {
|
||||||
@@ -1089,7 +1089,7 @@ void I2CPositionEncodersMgr::M868() {
|
|||||||
const float newThreshold = parser.seenval('T') ? parser.value_float() : -9999;
|
const float newThreshold = parser.seenval('T') ? parser.value_float() : -9999;
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) {
|
if ((int8_t)idx >= 0) {
|
||||||
@@ -1123,7 +1123,7 @@ void I2CPositionEncodersMgr::M869() {
|
|||||||
if (parse()) return;
|
if (parse()) return;
|
||||||
|
|
||||||
if (I2CPE_idx == 0xFF) {
|
if (I2CPE_idx == 0xFF) {
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
|
||||||
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
const uint8_t idx = idx_from_axis(AxisEnum(i));
|
||||||
if ((int8_t)idx >= 0) report_error(idx);
|
if ((int8_t)idx >= 0) report_error(idx);
|
||||||
|
@@ -91,11 +91,7 @@ void FWRetract::reset() {
|
|||||||
* Note: Auto-retract will apply the set Z hop in addition to any Z hop
|
* Note: Auto-retract will apply the set Z hop in addition to any Z hop
|
||||||
* included in the G-code. Use M207 Z0 to to prevent double hop.
|
* included in the G-code. Use M207 Z0 to to prevent double hop.
|
||||||
*/
|
*/
|
||||||
void FWRetract::retract(const bool retracting
|
void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool swapping/*=false*/)) {
|
||||||
#if HAS_MULTI_EXTRUDER
|
|
||||||
, bool swapping/*=false*/
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
// Prevent two retracts or recovers in a row
|
// Prevent two retracts or recovers in a row
|
||||||
if (retracted[active_extruder] == retracting) return;
|
if (retracted[active_extruder] == retracting) return;
|
||||||
|
|
||||||
@@ -212,10 +208,10 @@ void FWRetract::retract(const bool retracting
|
|||||||
*/
|
*/
|
||||||
void FWRetract::M207() {
|
void FWRetract::M207() {
|
||||||
if (!parser.seen("FSWZ")) return M207_report();
|
if (!parser.seen("FSWZ")) return M207_report();
|
||||||
if (parser.seen('S')) settings.retract_length = parser.value_axis_units(E_AXIS);
|
if (parser.seenval('S')) settings.retract_length = parser.value_axis_units(E_AXIS);
|
||||||
if (parser.seen('F')) settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
if (parser.seenval('F')) settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
||||||
if (parser.seen('Z')) settings.retract_zraise = parser.value_linear_units();
|
if (parser.seenval('Z')) settings.retract_zraise = parser.value_linear_units();
|
||||||
if (parser.seen('W')) settings.swap_retract_length = parser.value_axis_units(E_AXIS);
|
if (parser.seenval('W')) settings.swap_retract_length = parser.value_axis_units(E_AXIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FWRetract::M207_report(const bool forReplay/*=false*/) {
|
void FWRetract::M207_report(const bool forReplay/*=false*/) {
|
||||||
@@ -238,10 +234,10 @@ void FWRetract::M207_report(const bool forReplay/*=false*/) {
|
|||||||
*/
|
*/
|
||||||
void FWRetract::M208() {
|
void FWRetract::M208() {
|
||||||
if (!parser.seen("FSRW")) return M208_report();
|
if (!parser.seen("FSRW")) return M208_report();
|
||||||
if (parser.seen('S')) settings.retract_recover_extra = parser.value_axis_units(E_AXIS);
|
if (parser.seen('S')) settings.retract_recover_extra = parser.value_axis_units(E_AXIS);
|
||||||
if (parser.seen('F')) settings.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
if (parser.seen('F')) settings.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
||||||
if (parser.seen('R')) settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
if (parser.seen('R')) settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
|
||||||
if (parser.seen('W')) settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS);
|
if (parser.seen('W')) settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FWRetract::M208_report(const bool forReplay/*=false*/) {
|
void FWRetract::M208_report(const bool forReplay/*=false*/) {
|
||||||
|
@@ -74,11 +74,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void retract(const bool retracting
|
static void retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool swapping = false));
|
||||||
#if HAS_MULTI_EXTRUDER
|
|
||||||
, bool swapping = false
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
static void M207();
|
static void M207();
|
||||||
static void M207_report(const bool forReplay=false);
|
static void M207_report(const bool forReplay=false);
|
||||||
|
@@ -163,13 +163,8 @@ Joystick joystick;
|
|||||||
// norm_jog values of [-1 .. 1] maps linearly to [-feedrate .. feedrate]
|
// norm_jog values of [-1 .. 1] maps linearly to [-feedrate .. feedrate]
|
||||||
xyz_float_t move_dist{0};
|
xyz_float_t move_dist{0};
|
||||||
float hypot2 = 0;
|
float hypot2 = 0;
|
||||||
LOOP_XYZ(i) if (norm_jog[i]) {
|
LOOP_LINEAR_AXES(i) if (norm_jog[i]) {
|
||||||
move_dist[i] = seg_time * norm_jog[i] *
|
move_dist[i] = seg_time * norm_jog[i] * TERN(EXTENSIBLE_UI, manual_feedrate_mm_s, planner.settings.max_feedrate_mm_s)[i];
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
|
||||||
manual_feedrate_mm_s[i];
|
|
||||||
#else
|
|
||||||
planner.settings.max_feedrate_mm_s[i];
|
|
||||||
#endif
|
|
||||||
hypot2 += sq(move_dist[i]);
|
hypot2 += sq(move_dist[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,13 +47,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(LED_COLOR_PRESETS)
|
#if ENABLED(LED_COLOR_PRESETS)
|
||||||
const LEDColor LEDLights::defaultLEDColor = MakeLEDColor(
|
const LEDColor LEDLights::defaultLEDColor = LEDColor(
|
||||||
LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE,
|
LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE
|
||||||
LED_USER_PRESET_WHITE, LED_USER_PRESET_BRIGHTNESS
|
OPTARG(HAS_WHITE_LED, LED_USER_PRESET_WHITE)
|
||||||
|
OPTARG(NEOPIXEL_LED, LED_USER_PRESET_BRIGHTNESS)
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS)
|
#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
|
||||||
LEDColor LEDLights::color;
|
LEDColor LEDLights::color;
|
||||||
bool LEDLights::lights_on;
|
bool LEDLights::lights_on;
|
||||||
#endif
|
#endif
|
||||||
@@ -75,36 +76,35 @@ void LEDLights::setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LEDLights::set_color(const LEDColor &incol
|
void LEDLights::set_color(const LEDColor &incol
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence/*=false*/)
|
||||||
, bool isSequence/*=false*/
|
|
||||||
#endif
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
|
||||||
const uint32_t neocolor = LEDColorWhite() == incol
|
const uint32_t neocolor = LEDColorWhite() == incol
|
||||||
? neo.Color(NEO_WHITE)
|
? neo.Color(NEO_WHITE)
|
||||||
: neo.Color(incol.r, incol.g, incol.b, incol.w);
|
: neo.Color(incol.r, incol.g, incol.b OPTARG(HAS_WHITE_LED, incol.w));
|
||||||
static uint16_t nextLed = 0;
|
|
||||||
|
|
||||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||||
if (NEOPIXEL_BKGD_LED_INDEX == nextLed) {
|
static uint16_t nextLed = 0;
|
||||||
neo.set_color_background();
|
#ifdef NEOPIXEL_BKGD_INDEX_FIRST
|
||||||
if (++nextLed >= neo.pixels()) {
|
while (WITHIN(nextLed, NEOPIXEL_BKGD_INDEX_FIRST, NEOPIXEL_BKGD_INDEX_LAST)) {
|
||||||
nextLed = 0;
|
neo.reset_background_color();
|
||||||
return;
|
if (++nextLed >= neo.pixels()) { nextLed = 0; return; }
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
neo.set_brightness(incol.i);
|
neo.set_brightness(incol.i);
|
||||||
|
|
||||||
if (isSequence) {
|
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
||||||
neo.set_pixel_color(nextLed, neocolor);
|
if (isSequence) {
|
||||||
neo.show();
|
neo.set_pixel_color(nextLed, neocolor);
|
||||||
if (++nextLed >= neo.pixels()) nextLed = 0;
|
neo.show();
|
||||||
return;
|
if (++nextLed >= neo.pixels()) nextLed = 0;
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
neo.set_color(neocolor);
|
neo.set_color(neocolor);
|
||||||
|
|
||||||
@@ -169,9 +169,10 @@ void LEDLights::set_color(const LEDColor &incol
|
|||||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
#if ENABLED(NEOPIXEL2_SEPARATE)
|
||||||
|
|
||||||
#if ENABLED(NEO2_COLOR_PRESETS)
|
#if ENABLED(NEO2_COLOR_PRESETS)
|
||||||
const LEDColor LEDLights2::defaultLEDColor = MakeLEDColor(
|
const LEDColor LEDLights2::defaultLEDColor = LEDColor(
|
||||||
NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE,
|
LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE
|
||||||
NEO2_USER_PRESET_WHITE, NEO2_USER_PRESET_BRIGHTNESS
|
OPTARG(HAS_WHITE_LED2, LED_USER_PRESET_WHITE)
|
||||||
|
OPTARG(NEOPIXEL_LED, LED_USER_PRESET_BRIGHTNESS)
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -190,7 +191,7 @@ void LEDLights::set_color(const LEDColor &incol
|
|||||||
void LEDLights2::set_color(const LEDColor &incol) {
|
void LEDLights2::set_color(const LEDColor &incol) {
|
||||||
const uint32_t neocolor = LEDColorWhite() == incol
|
const uint32_t neocolor = LEDColorWhite() == incol
|
||||||
? neo2.Color(NEO2_WHITE)
|
? neo2.Color(NEO2_WHITE)
|
||||||
: neo2.Color(incol.r, incol.g, incol.b, incol.w);
|
: neo2.Color(incol.r, incol.g, incol.b OPTARG(HAS_WHITE_LED2, incol.w));
|
||||||
neo2.set_brightness(incol.i);
|
neo2.set_brightness(incol.i);
|
||||||
neo2.set_color(neocolor);
|
neo2.set_color(neocolor);
|
||||||
|
|
||||||
|
@@ -29,13 +29,15 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
// A white component can be passed
|
||||||
#include "neopixel.h"
|
#if EITHER(RGBW_LED, PCA9632_RGBW)
|
||||||
|
#define HAS_WHITE_LED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// A white component can be passed
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
#if ANY(RGBW_LED, NEOPIXEL_LED, PCA9632_RGBW)
|
#define _NEOPIXEL_INCLUDE_
|
||||||
#define HAS_WHITE_LED 1
|
#include "neopixel.h"
|
||||||
|
#undef _NEOPIXEL_INCLUDE_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,46 +45,21 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct LEDColor {
|
typedef struct LEDColor {
|
||||||
uint8_t r, g, b
|
uint8_t r, g, b
|
||||||
#if HAS_WHITE_LED
|
OPTARG(HAS_WHITE_LED, w)
|
||||||
, w
|
OPTARG(NEOPIXEL_LED, i)
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, i
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
;
|
;
|
||||||
|
|
||||||
LEDColor() : r(255), g(255), b(255)
|
LEDColor() : r(255), g(255), b(255)
|
||||||
#if HAS_WHITE_LED
|
OPTARG(HAS_WHITE_LED, w(255))
|
||||||
, w(255)
|
OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS))
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, i(NEOPIXEL_BRIGHTNESS)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
LEDColor(uint8_t r, uint8_t g, uint8_t b
|
LEDColor(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w=0) OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS))
|
||||||
#if HAS_WHITE_LED
|
: r(r), g(g), b(b) OPTARG(HAS_WHITE_LED, w(w)) OPTARG(NEOPIXEL_LED, i(i)) {}
|
||||||
, uint8_t w=0
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, uint8_t i=NEOPIXEL_BRIGHTNESS
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
) : r(r), g(g), b(b)
|
|
||||||
#if HAS_WHITE_LED
|
|
||||||
, w(w)
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, i(i)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
{}
|
|
||||||
|
|
||||||
LEDColor(const uint8_t (&rgbw)[4]) : r(rgbw[0]), g(rgbw[1]), b(rgbw[2])
|
LEDColor(const uint8_t (&rgbw)[4]) : r(rgbw[0]), g(rgbw[1]), b(rgbw[2])
|
||||||
#if HAS_WHITE_LED
|
OPTARG(HAS_WHITE_LED, w(rgbw[3]))
|
||||||
, w(rgbw[3])
|
OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS))
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, i(NEOPIXEL_BRIGHTNESS)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
LEDColor& operator=(const uint8_t (&rgbw)[4]) {
|
LEDColor& operator=(const uint8_t (&rgbw)[4]) {
|
||||||
@@ -109,17 +86,8 @@ typedef struct LEDColor {
|
|||||||
} LEDColor;
|
} LEDColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Color helpers and presets
|
* Color presets
|
||||||
*/
|
*/
|
||||||
#if HAS_WHITE_LED
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W, I)
|
|
||||||
#else
|
|
||||||
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W)
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LEDColorOff() LEDColor( 0, 0, 0)
|
#define LEDColorOff() LEDColor( 0, 0, 0)
|
||||||
#define LEDColorRed() LEDColor(255, 0, 0)
|
#define LEDColorRed() LEDColor(255, 0, 0)
|
||||||
@@ -147,25 +115,15 @@ public:
|
|||||||
static void setup(); // init()
|
static void setup(); // init()
|
||||||
|
|
||||||
static void set_color(const LEDColor &color
|
static void set_color(const LEDColor &color
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence=false)
|
||||||
, bool isSequence=false
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static inline void set_color(uint8_t r, uint8_t g, uint8_t b
|
static inline void set_color(uint8_t r, uint8_t g, uint8_t b
|
||||||
#if HAS_WHITE_LED
|
OPTARG(HAS_WHITE_LED, uint8_t w=0)
|
||||||
, uint8_t w=0
|
OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS)
|
||||||
#endif
|
OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence=false)
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, uint8_t i=NEOPIXEL_BRIGHTNESS
|
|
||||||
, bool isSequence=false
|
|
||||||
#endif
|
|
||||||
) {
|
) {
|
||||||
set_color(MakeLEDColor(r, g, b, w, i)
|
set_color(LEDColor(r, g, b OPTARG(HAS_WHITE_LED, w) OPTARG(NEOPIXEL_LED, i)) OPTARG(NEOPIXEL_IS_SEQUENTIAL, isSequence));
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
|
||||||
, isSequence
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_off() { set_color(LEDColorOff()); }
|
static inline void set_off() { set_color(LEDColorOff()); }
|
||||||
@@ -187,7 +145,7 @@ public:
|
|||||||
static inline LEDColor get_color() { return lights_on ? color : LEDColorOff(); }
|
static inline LEDColor get_color() { return lights_on ? color : LEDColorOff(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS)
|
#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
|
||||||
static LEDColor color; // last non-off color
|
static LEDColor color; // last non-off color
|
||||||
static bool lights_on; // the last set color was "on"
|
static bool lights_on; // the last set color was "on"
|
||||||
#endif
|
#endif
|
||||||
@@ -223,8 +181,14 @@ extern LEDLights leds;
|
|||||||
|
|
||||||
static void set_color(const LEDColor &color);
|
static void set_color(const LEDColor &color);
|
||||||
|
|
||||||
inline void set_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w=0, uint8_t i=NEOPIXEL2_BRIGHTNESS) {
|
static inline void set_color(uint8_t r, uint8_t g, uint8_t b
|
||||||
set_color(MakeLEDColor(r, g, b, w, i));
|
OPTARG(HAS_WHITE_LED, uint8_t w=0)
|
||||||
|
OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS)
|
||||||
|
) {
|
||||||
|
set_color(LEDColor(r, g, b
|
||||||
|
OPTARG(HAS_WHITE_LED, w)
|
||||||
|
OPTARG(NEOPIXEL_LED, i)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_off() { set_color(LEDColorOff()); }
|
static inline void set_off() { set_color(LEDColorOff()); }
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#if ENABLED(NEOPIXEL_LED)
|
#if ENABLED(NEOPIXEL_LED)
|
||||||
|
|
||||||
#include "neopixel.h"
|
#include "leds.h"
|
||||||
|
|
||||||
#if EITHER(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST)
|
#if EITHER(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST)
|
||||||
#include "../../core/utility.h"
|
#include "../../core/utility.h"
|
||||||
@@ -37,17 +37,21 @@
|
|||||||
Marlin_NeoPixel neo;
|
Marlin_NeoPixel neo;
|
||||||
int8_t Marlin_NeoPixel::neoindex;
|
int8_t Marlin_NeoPixel::neoindex;
|
||||||
|
|
||||||
Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800)
|
Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800);
|
||||||
#if CONJOINED_NEOPIXEL
|
#if CONJOINED_NEOPIXEL
|
||||||
, Marlin_NeoPixel::adaneo2(NEOPIXEL_PIXELS, NEOPIXEL2_PIN, NEOPIXEL2_TYPE + NEO_KHZ800)
|
Adafruit_NeoPixel Marlin_NeoPixel::adaneo2(NEOPIXEL_PIXELS, NEOPIXEL2_PIN, NEOPIXEL2_TYPE + NEO_KHZ800);
|
||||||
#endif
|
#endif
|
||||||
;
|
|
||||||
|
|
||||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
#ifdef NEOPIXEL_BKGD_INDEX_FIRST
|
||||||
|
|
||||||
void Marlin_NeoPixel::set_color_background() {
|
void Marlin_NeoPixel::set_background_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
|
||||||
uint8_t background_color[4] = NEOPIXEL_BKGD_COLOR;
|
for (int background_led = NEOPIXEL_BKGD_INDEX_FIRST; background_led <= NEOPIXEL_BKGD_INDEX_LAST; background_led++)
|
||||||
set_pixel_color(NEOPIXEL_BKGD_LED_INDEX, adaneo1.Color(background_color[0], background_color[1], background_color[2], background_color[3]));
|
set_pixel_color(background_led, adaneo1.Color(r, g, b, w));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Marlin_NeoPixel::reset_background_color() {
|
||||||
|
constexpr uint8_t background_color[4] = NEOPIXEL_BKGD_COLOR;
|
||||||
|
set_background_color(background_color[0], background_color[1], background_color[2], background_color[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -59,9 +63,10 @@ void Marlin_NeoPixel::set_color(const uint32_t color) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (uint16_t i = 0; i < pixels(); ++i) {
|
for (uint16_t i = 0; i < pixels(); ++i) {
|
||||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
#ifdef NEOPIXEL_BKGD_INDEX_FIRST
|
||||||
if (i == NEOPIXEL_BKGD_LED_INDEX && TERN(NEOPIXEL_BKGD_ALWAYS_ON, true, color != 0x000000)) {
|
if (i == NEOPIXEL_BKGD_INDEX_FIRST && TERN(NEOPIXEL_BKGD_ALWAYS_ON, true, color != 0x000000)) {
|
||||||
set_color_background();
|
reset_background_color();
|
||||||
|
i += NEOPIXEL_BKGD_INDEX_LAST - (NEOPIXEL_BKGD_INDEX_FIRST);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -90,36 +95,23 @@ void Marlin_NeoPixel::init() {
|
|||||||
safe_delay(500);
|
safe_delay(500);
|
||||||
set_color_startup(adaneo1.Color(0, 0, 255, 0)); // blue
|
set_color_startup(adaneo1.Color(0, 0, 255, 0)); // blue
|
||||||
safe_delay(500);
|
safe_delay(500);
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
set_color_startup(adaneo1.Color(0, 0, 0, 255)); // white
|
||||||
|
safe_delay(500);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
#ifdef NEOPIXEL_BKGD_INDEX_FIRST
|
||||||
set_color_background();
|
reset_background_color();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(LED_USER_PRESET_STARTUP)
|
set_color(adaneo1.Color
|
||||||
set_color(adaneo1.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE));
|
TERN(LED_USER_PRESET_STARTUP,
|
||||||
#else
|
(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE),
|
||||||
set_color(adaneo1.Color(0, 0, 0, 0));
|
(0, 0, 0, 0))
|
||||||
#endif
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool Marlin_NeoPixel::set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) {
|
|
||||||
const uint32_t color = adaneo1.Color(r, g, b, w);
|
|
||||||
set_brightness(p);
|
|
||||||
#if DISABLED(NEOPIXEL_IS_SEQUENTIAL)
|
|
||||||
set_color(color);
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
static uint16_t nextLed = 0;
|
|
||||||
set_pixel_color(nextLed, color);
|
|
||||||
show();
|
|
||||||
if (++nextLed >= pixels()) nextLed = 0;
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
#if ENABLED(NEOPIXEL2_SEPARATE)
|
||||||
|
|
||||||
Marlin_NeoPixel2 neo2;
|
Marlin_NeoPixel2 neo2;
|
||||||
@@ -158,13 +150,17 @@ bool Marlin_NeoPixel::set_led_color(const uint8_t r, const uint8_t g, const uint
|
|||||||
safe_delay(500);
|
safe_delay(500);
|
||||||
set_color_startup(adaneo.Color(0, 0, 255, 0)); // blue
|
set_color_startup(adaneo.Color(0, 0, 255, 0)); // blue
|
||||||
safe_delay(500);
|
safe_delay(500);
|
||||||
|
#if HAS_WHITE_LED2
|
||||||
|
set_color_startup(adaneo.Color(0, 0, 0, 255)); // white
|
||||||
|
safe_delay(500);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(NEO2_USER_PRESET_STARTUP)
|
set_color(adaneo.Color
|
||||||
set_color(adaneo.Color(NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE, NEO2_USER_PRESET_WHITE));
|
TERN(NEO2_USER_PRESET_STARTUP,
|
||||||
#else
|
(NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE, NEO2_USER_PRESET_WHITE),
|
||||||
set_color(adaneo.Color(0, 0, 0, 0));
|
(0, 0, 0, 0))
|
||||||
#endif
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NEOPIXEL2_SEPARATE
|
#endif // NEOPIXEL2_SEPARATE
|
||||||
|
@@ -25,6 +25,10 @@
|
|||||||
* NeoPixel support
|
* NeoPixel support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _NEOPIXEL_INCLUDE_
|
||||||
|
#error "Always include 'leds.h' and not 'neopixel.h' directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Includes
|
// Includes
|
||||||
// ------------------------
|
// ------------------------
|
||||||
@@ -38,6 +42,18 @@
|
|||||||
// Defines
|
// Defines
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
|
#define _NEO_IS_RGB(N) (N == NEO_RGB || N == NEO_RBG || N == NEO_GRB || N == NEO_GBR || N == NEO_BRG || N == NEO_BGR)
|
||||||
|
|
||||||
|
#if !_NEO_IS_RGB(NEOPIXEL_TYPE)
|
||||||
|
#define HAS_WHITE_LED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_WHITE_LED
|
||||||
|
#define NEO_WHITE 0, 0, 0, 255
|
||||||
|
#else
|
||||||
|
#define NEO_WHITE 255, 255, 255
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(NEOPIXEL2_TYPE) && NEOPIXEL2_TYPE != NEOPIXEL_TYPE && DISABLED(NEOPIXEL2_SEPARATE)
|
#if defined(NEOPIXEL2_TYPE) && NEOPIXEL2_TYPE != NEOPIXEL_TYPE && DISABLED(NEOPIXEL2_SEPARATE)
|
||||||
#define MULTIPLE_NEOPIXEL_TYPES 1
|
#define MULTIPLE_NEOPIXEL_TYPES 1
|
||||||
#endif
|
#endif
|
||||||
@@ -46,29 +62,16 @@
|
|||||||
#define CONJOINED_NEOPIXEL 1
|
#define CONJOINED_NEOPIXEL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
|
|
||||||
#define NEOPIXEL_IS_RGB 1
|
|
||||||
#else
|
|
||||||
#define NEOPIXEL_IS_RGBW 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if NEOPIXEL_IS_RGB
|
|
||||||
#define NEO_WHITE 255, 255, 255, 0
|
|
||||||
#else
|
|
||||||
#define NEO_WHITE 0, 0, 0, 255
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
class Marlin_NeoPixel {
|
class Marlin_NeoPixel {
|
||||||
private:
|
private:
|
||||||
static Adafruit_NeoPixel adaneo1
|
static Adafruit_NeoPixel adaneo1;
|
||||||
#if CONJOINED_NEOPIXEL
|
#if CONJOINED_NEOPIXEL
|
||||||
, adaneo2
|
static Adafruit_NeoPixel adaneo2;
|
||||||
#endif
|
#endif
|
||||||
;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int8_t neoindex;
|
static int8_t neoindex;
|
||||||
@@ -78,8 +81,9 @@ public:
|
|||||||
|
|
||||||
static void set_color(const uint32_t c);
|
static void set_color(const uint32_t c);
|
||||||
|
|
||||||
#ifdef NEOPIXEL_BKGD_LED_INDEX
|
#ifdef NEOPIXEL_BKGD_INDEX_FIRST
|
||||||
static void set_color_background();
|
static void set_background_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
|
||||||
|
static void reset_background_color();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void begin() {
|
static inline void begin() {
|
||||||
@@ -93,9 +97,7 @@ public:
|
|||||||
else adaneo1.setPixelColor(n, c);
|
else adaneo1.setPixelColor(n, c);
|
||||||
#else
|
#else
|
||||||
adaneo1.setPixelColor(n, c);
|
adaneo1.setPixelColor(n, c);
|
||||||
#if MULTIPLE_NEOPIXEL_TYPES
|
TERN_(MULTIPLE_NEOPIXEL_TYPES, adaneo2.setPixelColor(n, c));
|
||||||
adaneo2.setPixelColor(n, c);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,15 +122,13 @@ public:
|
|||||||
TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT());
|
TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
static inline uint16_t pixels() { TERN(NEOPIXEL2_INSERIES, return adaneo1.numPixels() * 2, return adaneo1.numPixels()); }
|
static inline uint16_t pixels() { return adaneo1.numPixels() * TERN1(NEOPIXEL2_INSERIES, 2); }
|
||||||
|
|
||||||
static inline uint8_t brightness() { return adaneo1.getBrightness(); }
|
static inline uint8_t brightness() { return adaneo1.getBrightness(); }
|
||||||
static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
|
|
||||||
return adaneo1.Color(r, g, b, w);
|
static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w)) {
|
||||||
|
return adaneo1.Color(r, g, b OPTARG(HAS_WHITE_LED, w));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -137,15 +137,12 @@ extern Marlin_NeoPixel neo;
|
|||||||
// Neo pixel channel 2
|
// Neo pixel channel 2
|
||||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
#if ENABLED(NEOPIXEL2_SEPARATE)
|
||||||
|
|
||||||
#if NEOPIXEL2_TYPE == NEO_RGB || NEOPIXEL2_TYPE == NEO_RBG || NEOPIXEL2_TYPE == NEO_GRB || NEOPIXEL2_TYPE == NEO_GBR || NEOPIXEL2_TYPE == NEO_BRG || NEOPIXEL2_TYPE == NEO_BGR
|
#if _NEO_IS_RGB(NEOPIXEL2_TYPE)
|
||||||
#define NEOPIXEL2_IS_RGB 1
|
#define NEOPIXEL2_IS_RGB 1
|
||||||
|
#define NEO2_WHITE 255, 255, 255
|
||||||
#else
|
#else
|
||||||
#define NEOPIXEL2_IS_RGBW 1
|
#define NEOPIXEL2_IS_RGBW 1
|
||||||
#endif
|
#define HAS_WHITE_LED2 1 // A white component can be passed for NEOPIXEL2
|
||||||
|
|
||||||
#if NEOPIXEL2_IS_RGB
|
|
||||||
#define NEO2_WHITE 255, 255, 255, 0
|
|
||||||
#else
|
|
||||||
#define NEO2_WHITE 0, 0, 0, 255
|
#define NEO2_WHITE 0, 0, 0, 255
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -172,11 +169,13 @@ extern Marlin_NeoPixel neo;
|
|||||||
// Accessors
|
// Accessors
|
||||||
static inline uint16_t pixels() { return adaneo.numPixels();}
|
static inline uint16_t pixels() { return adaneo.numPixels();}
|
||||||
static inline uint8_t brightness() { return adaneo.getBrightness(); }
|
static inline uint8_t brightness() { return adaneo.getBrightness(); }
|
||||||
static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) {
|
static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED2, uint8_t w)) {
|
||||||
return adaneo.Color(r, g, b, w);
|
return adaneo.Color(r, g, b OPTARG(HAS_WHITE_LED2, w));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Marlin_NeoPixel2 neo2;
|
extern Marlin_NeoPixel2 neo2;
|
||||||
|
|
||||||
#endif // NEOPIXEL2_SEPARATE
|
#endif // NEOPIXEL2_SEPARATE
|
||||||
|
|
||||||
|
#undef _NEO_IS_RGB
|
||||||
|
@@ -93,9 +93,7 @@ static void PCA9632_WriteRegister(const byte addr, const byte regadd, const byte
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const byte vr, const byte vg, const byte vb
|
static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const byte vr, const byte vg, const byte vb
|
||||||
#if ENABLED(PCA9632_RGBW)
|
OPTARG(PCA9632_RGBW, const byte vw)
|
||||||
, const byte vw
|
|
||||||
#endif
|
|
||||||
) {
|
) {
|
||||||
#if DISABLED(PCA9632_NO_AUTO_INC)
|
#if DISABLED(PCA9632_NO_AUTO_INC)
|
||||||
uint8_t data[4];
|
uint8_t data[4];
|
||||||
@@ -143,9 +141,7 @@ void PCA9632_set_led_color(const LEDColor &color) {
|
|||||||
;
|
;
|
||||||
|
|
||||||
PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, color.r, color.g, color.b
|
PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, color.r, color.g, color.b
|
||||||
#if ENABLED(PCA9632_RGBW)
|
OPTARG(PCA9632_RGBW, color.w)
|
||||||
, color.w
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
|
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
|
||||||
}
|
}
|
||||||
|
@@ -45,12 +45,10 @@ PrinterEventLEDs printerEventLEDs;
|
|||||||
return (uint8_t)map(constrain(current, start, target), start, target, 0, 255);
|
return (uint8_t)map(constrain(current, start, target), start, target, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void pel_set_rgb(const uint8_t r, const uint8_t g, const uint8_t b) {
|
inline void pel_set_rgb(const uint8_t r, const uint8_t g, const uint8_t b OPTARG(HAS_WHITE_LED, const uint8_t w=0)) {
|
||||||
leds.set_color(
|
leds.set_color(
|
||||||
MakeLEDColor(r, g, b, 0, neo.brightness())
|
LEDColor(r, g, b OPTARG(HAS_WHITE_LED, w) OPTARG(NEOPIXEL_LED, neo.brightness()))
|
||||||
#if ENABLED(NEOPIXEL_IS_SEQUENTIAL)
|
OPTARG(NEOPIXEL_IS_SEQUENTIAL, true)
|
||||||
, true
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -159,7 +159,7 @@ void MMU2::mmu_loop() {
|
|||||||
MMU2_COMMAND("S1"); // Read Version
|
MMU2_COMMAND("S1"); // Read Version
|
||||||
state = -2;
|
state = -2;
|
||||||
}
|
}
|
||||||
else if (millis() > 3000000) {
|
else if (millis() > 30000) { // 30sec after reset disable MMU
|
||||||
SERIAL_ECHOLNPGM("MMU not responding - DISABLED");
|
SERIAL_ECHOLNPGM("MMU not responding - DISABLED");
|
||||||
state = 0;
|
state = 0;
|
||||||
}
|
}
|
||||||
|
@@ -316,7 +316,7 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
|
|||||||
);
|
);
|
||||||
|
|
||||||
#if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
#if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||||
constexpr float mix_multiplier = 1.0;
|
constexpr float mix_multiplier = 1.0f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!ensure_safe_temperature(false, mode)) {
|
if (!ensure_safe_temperature(false, mode)) {
|
||||||
@@ -371,7 +371,7 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
|
|||||||
*/
|
*/
|
||||||
uint8_t did_pause_print = 0;
|
uint8_t did_pause_print = 0;
|
||||||
|
|
||||||
bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float_t unload_length/*=0*/, const bool show_lcd/*=false*/ DXC_ARGS) {
|
bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool show_lcd/*=false*/, const_float_t unload_length/*=0*/ DXC_ARGS) {
|
||||||
DEBUG_SECTION(pp, "pause_print", true);
|
DEBUG_SECTION(pp, "pause_print", true);
|
||||||
DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
|
DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
|
||||||
|
|
||||||
@@ -394,7 +394,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float
|
|||||||
|
|
||||||
// Pause the print job and timer
|
// Pause the print job and timer
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
if (IS_SD_PRINTING()) {
|
const bool was_sd_printing = IS_SD_PRINTING();
|
||||||
|
if (was_sd_printing) {
|
||||||
card.pauseSDPrint();
|
card.pauseSDPrint();
|
||||||
++did_pause_print; // Indicate SD pause also
|
++did_pause_print; // Indicate SD pause also
|
||||||
}
|
}
|
||||||
@@ -405,6 +406,15 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float
|
|||||||
// Save current position
|
// Save current position
|
||||||
resume_position = current_position;
|
resume_position = current_position;
|
||||||
|
|
||||||
|
// Will the nozzle be parking?
|
||||||
|
const bool do_park = !axes_should_home();
|
||||||
|
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
|
// Save PLR info in case the power goes out while parked
|
||||||
|
const float park_raise = do_park ? nozzle.park_mode_0_height(park_point.z) - current_position.z : POWER_LOSS_ZRAISE;
|
||||||
|
if (was_sd_printing && recovery.enabled) recovery.save(true, park_raise, do_park);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Wait for buffered blocks to complete
|
// Wait for buffered blocks to complete
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
@@ -418,9 +428,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float
|
|||||||
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
|
// If axes don't need to home then the nozzle can park
|
||||||
if (!axes_should_home())
|
if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
|
||||||
nozzle.park(0, park_point);
|
|
||||||
|
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#if ENABLED(DUAL_X_CARRIAGE)
|
||||||
const int8_t saved_ext = active_extruder;
|
const int8_t saved_ext = active_extruder;
|
||||||
@@ -428,7 +437,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float
|
|||||||
set_duplication_enabled(false, DXC_ext);
|
set_duplication_enabled(false, DXC_ext);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (unload_length) // Unload the filament
|
// Unload the filament, if specified
|
||||||
|
if (unload_length)
|
||||||
unload_filament(unload_length, show_lcd, PAUSE_MODE_CHANGE_FILAMENT);
|
unload_filament(unload_length, show_lcd, PAUSE_MODE_CHANGE_FILAMENT);
|
||||||
|
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#if ENABLED(DUAL_X_CARRIAGE)
|
||||||
@@ -630,9 +640,6 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
|||||||
// Set extruder to saved position
|
// Set extruder to saved position
|
||||||
planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
|
planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
|
||||||
|
|
||||||
// Write PLR now to update the z axis value
|
|
||||||
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
|
||||||
|
|
||||||
ui.pause_show_message(PAUSE_MESSAGE_STATUS);
|
ui.pause_show_message(PAUSE_MESSAGE_STATUS);
|
||||||
|
|
||||||
#ifdef ACTION_ON_RESUMED
|
#ifdef ACTION_ON_RESUMED
|
||||||
@@ -645,8 +652,16 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
|||||||
|
|
||||||
TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR));
|
TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR));
|
||||||
|
|
||||||
|
// Resume the print job timer if it was running
|
||||||
|
if (print_job_timer.isPaused()) print_job_timer.start();
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
if (did_pause_print) { card.startFileprint(); --did_pause_print; }
|
if (did_pause_print) {
|
||||||
|
--did_pause_print;
|
||||||
|
card.startOrResumeFilePrinting();
|
||||||
|
// Write PLR now to update the z axis value
|
||||||
|
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && HAS_FAN
|
#if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && HAS_FAN
|
||||||
@@ -655,9 +670,6 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
|||||||
|
|
||||||
TERN_(HAS_FILAMENT_SENSOR, runout.reset());
|
TERN_(HAS_FILAMENT_SENSOR, runout.reset());
|
||||||
|
|
||||||
// Resume the print job timer if it was running
|
|
||||||
if (print_job_timer.isPaused()) print_job_timer.start();
|
|
||||||
|
|
||||||
TERN_(HAS_STATUS_MESSAGE, ui.reset_status());
|
TERN_(HAS_STATUS_MESSAGE, ui.reset_status());
|
||||||
TERN_(HAS_LCD_MENU, ui.return_to_status());
|
TERN_(HAS_LCD_MENU, ui.return_to_status());
|
||||||
}
|
}
|
||||||
|
@@ -85,19 +85,47 @@ extern uint8_t did_pause_print;
|
|||||||
#define DXC_SAY
|
#define DXC_SAY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const_float_t unload_length=0, const bool show_lcd=false DXC_PARAMS);
|
// Pause the print. If unload_length is set, do a Filament Unload
|
||||||
|
bool pause_print(
|
||||||
|
const_float_t retract, // (mm) Retraction length
|
||||||
|
const xyz_pos_t &park_point, // Parking XY Position and Z Raise
|
||||||
|
const bool show_lcd=false, // Set LCD status messages?
|
||||||
|
const_float_t unload_length=0 // (mm) Filament Change Unload Length - 0 to skip
|
||||||
|
DXC_PARAMS // Dual-X-Carriage extruder index
|
||||||
|
);
|
||||||
|
|
||||||
void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
|
void wait_for_confirmation(
|
||||||
|
const bool is_reload=false, // Reload Filament? (otherwise Resume Print)
|
||||||
|
const int8_t max_beep_count=0 // Beep alert for attention
|
||||||
|
DXC_PARAMS // Dual-X-Carriage extruder index
|
||||||
|
);
|
||||||
|
|
||||||
void resume_print(const_float_t slow_load_length=0, const_float_t fast_load_length=0, const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH,
|
void resume_print(
|
||||||
const int8_t max_beep_count=0, const celsius_t targetTemp=0 DXC_PARAMS);
|
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
|
||||||
|
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
|
||||||
|
const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length
|
||||||
|
const int8_t max_beep_count=0, // Beep alert for attention
|
||||||
|
const celsius_t targetTemp=0 // (°C) A target temperature for the hotend
|
||||||
|
DXC_PARAMS // Dual-X-Carriage extruder index
|
||||||
|
);
|
||||||
|
|
||||||
bool load_filament(const_float_t slow_load_length=0, const_float_t fast_load_length=0, const_float_t extrude_length=0, const int8_t max_beep_count=0,
|
bool load_filament(
|
||||||
const bool show_lcd=false, const bool pause_for_user=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT DXC_PARAMS);
|
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
|
||||||
|
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
|
||||||
|
const_float_t extrude_length=0, // (mm) Purge length
|
||||||
|
const int8_t max_beep_count=0, // Beep alert for attention
|
||||||
|
const bool show_lcd=false, // Set LCD status messages?
|
||||||
|
const bool pause_for_user=false, // Pause for user before returning?
|
||||||
|
const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply
|
||||||
|
DXC_PARAMS // Dual-X-Carriage extruder index
|
||||||
|
);
|
||||||
|
|
||||||
bool unload_filament(const_float_t unload_length, const bool show_lcd=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT
|
bool unload_filament(
|
||||||
|
const_float_t unload_length, // (mm) Filament Unload Length - 0 to skip
|
||||||
|
const bool show_lcd=false, // Set LCD status messages?
|
||||||
|
const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply
|
||||||
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||||
, const_float_t mix_multiplier=1.0
|
, const_float_t mix_multiplier=1.0f // Extrusion multiplier (for a Mixing Extruder)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -99,6 +99,10 @@ bool Power::is_power_needed() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef POWER_TIMEOUT
|
||||||
|
#define POWER_TIMEOUT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
void Power::check() {
|
void Power::check() {
|
||||||
static millis_t nextPowerCheck = 0;
|
static millis_t nextPowerCheck = 0;
|
||||||
millis_t ms = millis();
|
millis_t ms = millis();
|
||||||
@@ -106,7 +110,7 @@ void Power::check() {
|
|||||||
nextPowerCheck = ms + 2500UL;
|
nextPowerCheck = ms + 2500UL;
|
||||||
if (is_power_needed())
|
if (is_power_needed())
|
||||||
power_on();
|
power_on();
|
||||||
else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))
|
else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
|
||||||
power_off();
|
power_off();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -66,9 +66,6 @@ PrintJobRecovery recovery;
|
|||||||
#ifndef POWER_LOSS_PURGE_LEN
|
#ifndef POWER_LOSS_PURGE_LEN
|
||||||
#define POWER_LOSS_PURGE_LEN 0
|
#define POWER_LOSS_PURGE_LEN 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef POWER_LOSS_ZRAISE
|
|
||||||
#define POWER_LOSS_ZRAISE 2 // Move on loss with backup power, or on resume without it
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DISABLED(BACKUP_POWER_SUPPLY)
|
#if DISABLED(BACKUP_POWER_SUPPLY)
|
||||||
#undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power
|
#undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power
|
||||||
@@ -140,14 +137,16 @@ void PrintJobRecovery::load() {
|
|||||||
* Set info fields that won't change
|
* Set info fields that won't change
|
||||||
*/
|
*/
|
||||||
void PrintJobRecovery::prepare() {
|
void PrintJobRecovery::prepare() {
|
||||||
card.getAbsFilename(info.sd_filename); // SD filename
|
card.getAbsFilenameInCWD(info.sd_filename); // SD filename
|
||||||
cmd_sdpos = 0;
|
cmd_sdpos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the current machine state to the power-loss recovery file
|
* Save the current machine state to the power-loss recovery file
|
||||||
*/
|
*/
|
||||||
void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/) {
|
void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POWER_LOSS_ZRAISE*/, const bool raised/*=false*/) {
|
||||||
|
|
||||||
|
// We don't check IS_SD_PRINTING here so a save may occur during a pause
|
||||||
|
|
||||||
#if SAVE_INFO_INTERVAL_MS > 0
|
#if SAVE_INFO_INTERVAL_MS > 0
|
||||||
static millis_t next_save_ms; // = 0
|
static millis_t next_save_ms; // = 0
|
||||||
@@ -182,17 +181,15 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
|||||||
info.current_position = current_position;
|
info.current_position = current_position;
|
||||||
info.feedrate = uint16_t(MMS_TO_MMM(feedrate_mm_s));
|
info.feedrate = uint16_t(MMS_TO_MMM(feedrate_mm_s));
|
||||||
info.zraise = zraise;
|
info.zraise = zraise;
|
||||||
|
info.flag.raised = raised; // Was Z raised before power-off?
|
||||||
|
|
||||||
TERN_(GCODE_REPEAT_MARKERS, info.stored_repeat = repeat);
|
TERN_(GCODE_REPEAT_MARKERS, info.stored_repeat = repeat);
|
||||||
TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset);
|
TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset);
|
||||||
TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
|
TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
|
||||||
|
TERN_(HAS_MULTI_EXTRUDER, info.active_extruder = active_extruder);
|
||||||
#if HAS_MULTI_EXTRUDER
|
|
||||||
info.active_extruder = active_extruder;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DISABLED(NO_VOLUMETRICS)
|
#if DISABLED(NO_VOLUMETRICS)
|
||||||
info.volumetric_enabled = parser.volumetric_enabled;
|
info.flag.volumetric_enabled = parser.volumetric_enabled;
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if HAS_MULTI_EXTRUDER
|
||||||
for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
|
for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
|
||||||
#else
|
#else
|
||||||
@@ -200,7 +197,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
HOTEND_LOOP() info.target_temperature[e] = thermalManager.degTargetHotend(e);
|
HOTEND_LOOP() info.target_temperature[e] = thermalManager.degTargetHotend(e);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -254,7 +251,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
|||||||
// Raise the Z axis now
|
// Raise the Z axis now
|
||||||
if (zraise) {
|
if (zraise) {
|
||||||
char cmd[20], str_1[16];
|
char cmd[20], str_1[16];
|
||||||
sprintf_P(cmd, PSTR("G0 Z%s"), dtostrf(zraise, 1, 3, str_1));
|
sprintf_P(cmd, PSTR("G0Z%s"), dtostrf(zraise, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -290,8 +287,9 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/
|
|||||||
constexpr float zraise = 0;
|
constexpr float zraise = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save, including the limited Z raise
|
// Save the current position, distance that Z was (or should be) raised,
|
||||||
if (IS_SD_PRINTING()) save(true, zraise);
|
// and a flag whether the raise was already done here.
|
||||||
|
if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY));
|
||||||
|
|
||||||
// Disable all heaters to reduce power loss
|
// Disable all heaters to reduce power loss
|
||||||
thermalManager.disable_all_heaters();
|
thermalManager.disable_all_heaters();
|
||||||
@@ -346,88 +344,143 @@ void PrintJobRecovery::resume() {
|
|||||||
const celsius_t bt = info.target_temperature_bed;
|
const celsius_t bt = info.target_temperature_bed;
|
||||||
if (bt) {
|
if (bt) {
|
||||||
// Restore the bed temperature
|
// Restore the bed temperature
|
||||||
sprintf_P(cmd, PSTR("M190 S%i"), bt);
|
sprintf_P(cmd, PSTR("M190S%i"), bt);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Heat hotend enough to soften material
|
||||||
|
#if HAS_HOTEND
|
||||||
|
HOTEND_LOOP() {
|
||||||
|
const celsius_t et = _MAX(info.target_temperature[e], 180);
|
||||||
|
if (et) {
|
||||||
|
#if HAS_MULTI_HOTEND
|
||||||
|
sprintf_P(cmd, PSTR("T%iS"), e);
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
#endif
|
||||||
|
sprintf_P(cmd, PSTR("M109S%i"), et);
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Interpret the saved Z according to flags
|
||||||
|
const float z_print = info.current_position.z,
|
||||||
|
z_raised = z_print + info.zraise;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Home the axes that can safely be homed, and
|
||||||
|
// establish the current position as best we can.
|
||||||
|
//
|
||||||
|
|
||||||
|
gcode.process_subcommands_now_P(PSTR("G92.9E0")); // Reset E to 0
|
||||||
|
|
||||||
|
#if Z_HOME_TO_MAX
|
||||||
|
|
||||||
|
float z_now = z_raised;
|
||||||
|
|
||||||
|
// If Z homing goes to max then just move back to the "raised" position
|
||||||
|
sprintf_P(cmd, PSTR(
|
||||||
|
"G28R0\n" // Home all axes (no raise)
|
||||||
|
"G1Z%sF1200" // Move Z down to (raised) height
|
||||||
|
), dtostrf(z_now, 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVER_ZHOME) && defined(POWER_LOSS_ZHOME_POS)
|
||||||
|
#define HOMING_Z_DOWN 1
|
||||||
|
#else
|
||||||
|
#define HOME_XY_ONLY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
float z_now = info.flag.raised ? z_raised : z_print;
|
||||||
|
|
||||||
|
// Reset E to 0 and set Z to the real position
|
||||||
|
#if HOME_XY_ONLY
|
||||||
|
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Does Z need to be raised now? It should be raised before homing XY.
|
||||||
|
if (z_raised > z_now) {
|
||||||
|
z_now = z_raised;
|
||||||
|
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Home XY with no Z raise, and also home Z here if Z isn't homing down below.
|
||||||
|
gcode.process_subcommands_now_P(PSTR("G28R0" TERN_(HOME_XY_ONLY, "XY"))); // No raise during G28
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HOMING_Z_DOWN
|
||||||
|
// Move to a safe XY position and home Z while avoiding the print.
|
||||||
|
constexpr xy_pos_t p = POWER_LOSS_ZHOME_POS;
|
||||||
|
sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28Z"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Mark all axes as having been homed (no effect on current_position)
|
||||||
|
set_all_homed();
|
||||||
|
|
||||||
|
#if HAS_LEVELING
|
||||||
|
// Restore Z fade and possibly re-enable bed leveling compensation.
|
||||||
|
// Leveling may already be enabled due to the ENABLE_LEVELING_AFTER_G28 option.
|
||||||
|
// TODO: Add a G28 parameter to leave leveling disabled.
|
||||||
|
sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
|
#if HOME_XY_ONLY
|
||||||
|
// The physical Z was adjusted at power-off so undo the M420S1 correction to Z with G92.9.
|
||||||
|
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 1, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(POWER_LOSS_RECOVER_ZHOME)
|
||||||
|
// Z was homed down to the bed, so move up to the raised height.
|
||||||
|
z_now = z_raised;
|
||||||
|
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Recover volumetric extrusion state
|
||||||
|
#if DISABLED(NO_VOLUMETRICS)
|
||||||
|
#if HAS_MULTI_EXTRUDER
|
||||||
|
for (int8_t e = 0; e < EXTRUDERS; e++) {
|
||||||
|
sprintf_P(cmd, PSTR("M200T%iD%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
|
if (!info.flag.volumetric_enabled) {
|
||||||
|
sprintf_P(cmd, PSTR("M200T%iD0"), info.active_extruder);
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (info.flag.volumetric_enabled) {
|
||||||
|
sprintf_P(cmd, PSTR("M200D%s"), dtostrf(info.filament_size[0], 1, 3, str_1));
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Restore all hotend temperatures
|
// Restore all hotend temperatures
|
||||||
#if HAS_HOTEND
|
#if HAS_HOTEND
|
||||||
HOTEND_LOOP() {
|
HOTEND_LOOP() {
|
||||||
const celsius_t et = info.target_temperature[e];
|
const celsius_t et = info.target_temperature[e];
|
||||||
if (et) {
|
if (et) {
|
||||||
#if HAS_MULTI_HOTEND
|
#if HAS_MULTI_HOTEND
|
||||||
sprintf_P(cmd, PSTR("T%i S"), e);
|
sprintf_P(cmd, PSTR("T%iS"), e);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
#endif
|
#endif
|
||||||
sprintf_P(cmd, PSTR("M109 S%i"), et);
|
sprintf_P(cmd, PSTR("M109S%i"), et);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset E, raise Z, home XY...
|
// Restore the previously active tool (with no_move)
|
||||||
#if Z_HOME_DIR > 0
|
#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND
|
||||||
|
|
||||||
// If Z homing goes to max, just reset E and home all
|
|
||||||
gcode.process_subcommands_now_P(PSTR(
|
|
||||||
"G92.9 E0\n"
|
|
||||||
"G28R0"
|
|
||||||
));
|
|
||||||
|
|
||||||
#else // "G92.9 E0 ..."
|
|
||||||
|
|
||||||
// If a Z raise occurred at outage restore Z, otherwise raise Z now
|
|
||||||
sprintf_P(cmd, PSTR("G92.9 E0 " TERN(BACKUP_POWER_SUPPLY, "Z%s", "Z0\nG1Z%s")), dtostrf(info.zraise, 1, 3, str_1));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
|
|
||||||
// Home safely with no Z raise
|
|
||||||
gcode.process_subcommands_now_P(PSTR(
|
|
||||||
"G28R0" // No raise during G28
|
|
||||||
#if IS_CARTESIAN && (DISABLED(POWER_LOSS_RECOVER_ZHOME) || defined(POWER_LOSS_ZHOME_POS))
|
|
||||||
"XY" // Don't home Z on Cartesian unless overridden
|
|
||||||
#endif
|
|
||||||
));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef POWER_LOSS_ZHOME_POS
|
|
||||||
// If defined move to a safe Z homing position that avoids the print
|
|
||||||
constexpr xy_pos_t p = POWER_LOSS_ZHOME_POS;
|
|
||||||
sprintf_P(cmd, PSTR("G1 X%s Y%s F1000\nG28Z"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Ensure that all axes are marked as homed
|
|
||||||
set_all_homed();
|
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVER_ZHOME)
|
|
||||||
// Now move to ZsavedPos + POWER_LOSS_ZRAISE
|
|
||||||
sprintf_P(cmd, PSTR("G1 F500 Z%s"), dtostrf(info.current_position.z + POWER_LOSS_ZRAISE, 1, 3, str_1));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Recover volumetric extrusion state
|
|
||||||
#if DISABLED(NO_VOLUMETRICS)
|
|
||||||
#if HAS_MULTI_EXTRUDER
|
|
||||||
for (int8_t e = 0; e < EXTRUDERS; e++) {
|
|
||||||
sprintf_P(cmd, PSTR("M200 T%i D%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
}
|
|
||||||
if (!info.volumetric_enabled) {
|
|
||||||
sprintf_P(cmd, PSTR("M200 T%i D0"), info.active_extruder);
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (info.volumetric_enabled) {
|
|
||||||
sprintf_P(cmd, PSTR("M200 D%s"), dtostrf(info.filament_size[0], 1, 3, str_1));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Select the previously active tool (with no_move)
|
|
||||||
#if HAS_MULTI_EXTRUDER
|
|
||||||
sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
|
sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
#endif
|
#endif
|
||||||
@@ -437,13 +490,13 @@ void PrintJobRecovery::resume() {
|
|||||||
FANS_LOOP(i) {
|
FANS_LOOP(i) {
|
||||||
const int f = info.fan_speed[i];
|
const int f = info.fan_speed[i];
|
||||||
if (f) {
|
if (f) {
|
||||||
sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);
|
sprintf_P(cmd, PSTR("M106P%iS%i"), i, f);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Restore retract and hop state
|
// Restore retract and hop state from an active `G10` command
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
LOOP_L_N(e, EXTRUDERS) {
|
LOOP_L_N(e, EXTRUDERS) {
|
||||||
if (info.retract[e] != 0.0) {
|
if (info.retract[e] != 0.0) {
|
||||||
@@ -454,25 +507,16 @@ void PrintJobRecovery::resume() {
|
|||||||
fwretract.current_hop = info.retract_hop;
|
fwretract.current_hop = info.retract_hop;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_LEVELING
|
|
||||||
// Restore leveling state before 'G92 Z' to ensure
|
|
||||||
// the Z stepper count corresponds to the native Z.
|
|
||||||
if (info.fade || info.flag.leveling) {
|
|
||||||
sprintf_P(cmd, PSTR("M420 S%i Z%s"), int(info.flag.leveling), dtostrf(info.fade, 1, 1, str_1));
|
|
||||||
gcode.process_subcommands_now(cmd);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(GRADIENT_MIX)
|
#if ENABLED(GRADIENT_MIX)
|
||||||
memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient));
|
memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Un-retract if there was a retract at outage
|
// Un-retract if there was a retract at outage
|
||||||
#if POWER_LOSS_RETRACT_LEN
|
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
|
||||||
gcode.process_subcommands_now_P(PSTR("G1 E" STRINGIFY(POWER_LOSS_RETRACT_LEN) " F3000"));
|
gcode.process_subcommands_now_P(PSTR("G1E" STRINGIFY(POWER_LOSS_RETRACT_LEN) "F3000"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Additional purge if configured
|
// Additional purge on resume if configured
|
||||||
#if POWER_LOSS_PURGE_LEN
|
#if POWER_LOSS_PURGE_LEN
|
||||||
sprintf_P(cmd, PSTR("G1 E%d F3000"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN));
|
sprintf_P(cmd, PSTR("G1 E%d F3000"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN));
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
@@ -482,36 +526,30 @@ void PrintJobRecovery::resume() {
|
|||||||
gcode.process_subcommands_now_P(PSTR("G12"));
|
gcode.process_subcommands_now_P(PSTR("G12"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Move back to the saved XY
|
// Move back over to the saved XY
|
||||||
sprintf_P(cmd, PSTR("G1 X%s Y%s F3000"),
|
sprintf_P(cmd, PSTR("G1X%sY%sF3000"),
|
||||||
dtostrf(info.current_position.x, 1, 3, str_1),
|
dtostrf(info.current_position.x, 1, 3, str_1),
|
||||||
dtostrf(info.current_position.y, 1, 3, str_2)
|
dtostrf(info.current_position.y, 1, 3, str_2)
|
||||||
);
|
);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
// Move back to the saved Z
|
// Move back down to the saved Z for printing
|
||||||
dtostrf(info.current_position.z, 1, 3, str_1);
|
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1));
|
||||||
#if Z_HOME_DIR > 0 || ENABLED(POWER_LOSS_RECOVER_ZHOME)
|
|
||||||
sprintf_P(cmd, PSTR("G1 Z%s F500"), str_1);
|
|
||||||
#else
|
|
||||||
gcode.process_subcommands_now_P(PSTR("G1 Z0 F200"));
|
|
||||||
sprintf_P(cmd, PSTR("G92.9 Z%s"), str_1);
|
|
||||||
#endif
|
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
// Restore the feedrate
|
// Restore the feedrate
|
||||||
sprintf_P(cmd, PSTR("G1 F%d"), info.feedrate);
|
sprintf_P(cmd, PSTR("G1F%d"), info.feedrate);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
// Restore E position with G92.9
|
// Restore E position with G92.9
|
||||||
sprintf_P(cmd, PSTR("G92.9 E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
|
sprintf_P(cmd, PSTR("G92.9E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat);
|
TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat);
|
||||||
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
|
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
|
||||||
TERN_(HAS_POSITION_SHIFT, position_shift = info.position_shift);
|
TERN_(HAS_POSITION_SHIFT, position_shift = info.position_shift);
|
||||||
#if HAS_HOME_OFFSET || HAS_POSITION_SHIFT
|
#if HAS_HOME_OFFSET || HAS_POSITION_SHIFT
|
||||||
LOOP_XYZ(i) update_workspace_offset((AxisEnum)i);
|
LOOP_LINEAR_AXES(i) update_workspace_offset((AxisEnum)i);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Relative axis modes
|
// Relative axis modes
|
||||||
@@ -529,7 +567,7 @@ void PrintJobRecovery::resume() {
|
|||||||
char *fn = info.sd_filename;
|
char *fn = info.sd_filename;
|
||||||
sprintf_P(cmd, M23_STR, fn);
|
sprintf_P(cmd, M23_STR, fn);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
sprintf_P(cmd, PSTR("M24 S%ld T%ld"), resume_sdpos, info.print_job_elapsed);
|
sprintf_P(cmd, PSTR("M24S%ldT%ld"), resume_sdpos, info.print_job_elapsed);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
|
|
||||||
TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags);
|
TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags);
|
||||||
@@ -543,17 +581,25 @@ void PrintJobRecovery::resume() {
|
|||||||
if (info.valid_head) {
|
if (info.valid_head) {
|
||||||
if (info.valid_head == info.valid_foot) {
|
if (info.valid_head == info.valid_foot) {
|
||||||
DEBUG_ECHOPGM("current_position: ");
|
DEBUG_ECHOPGM("current_position: ");
|
||||||
LOOP_XYZE(i) {
|
LOOP_LOGICAL_AXES(i) {
|
||||||
if (i) DEBUG_CHAR(',');
|
if (i) DEBUG_CHAR(',');
|
||||||
DEBUG_DECIMAL(info.current_position[i]);
|
DEBUG_DECIMAL(info.current_position[i]);
|
||||||
}
|
}
|
||||||
DEBUG_EOL();
|
DEBUG_EOL();
|
||||||
|
|
||||||
DEBUG_ECHOLNPAIR("zraise: ", info.zraise);
|
DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
|
||||||
|
|
||||||
|
DEBUG_ECHOLNPAIR("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : "");
|
||||||
|
|
||||||
|
#if ENABLED(GCODE_REPEAT_MARKERS)
|
||||||
|
DEBUG_ECHOLNPAIR("repeat index: ", info.stored_repeat.index);
|
||||||
|
LOOP_L_N(i, info.stored_repeat.index)
|
||||||
|
DEBUG_ECHOLNPAIR("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_HOME_OFFSET
|
#if HAS_HOME_OFFSET
|
||||||
DEBUG_ECHOPGM("home_offset: ");
|
DEBUG_ECHOPGM("home_offset: ");
|
||||||
LOOP_XYZ(i) {
|
LOOP_LINEAR_AXES(i) {
|
||||||
if (i) DEBUG_CHAR(',');
|
if (i) DEBUG_CHAR(',');
|
||||||
DEBUG_DECIMAL(info.home_offset[i]);
|
DEBUG_DECIMAL(info.home_offset[i]);
|
||||||
}
|
}
|
||||||
@@ -562,19 +608,23 @@ void PrintJobRecovery::resume() {
|
|||||||
|
|
||||||
#if HAS_POSITION_SHIFT
|
#if HAS_POSITION_SHIFT
|
||||||
DEBUG_ECHOPGM("position_shift: ");
|
DEBUG_ECHOPGM("position_shift: ");
|
||||||
LOOP_XYZ(i) {
|
LOOP_LINEAR_AXES(i) {
|
||||||
if (i) DEBUG_CHAR(',');
|
if (i) DEBUG_CHAR(',');
|
||||||
DEBUG_DECIMAL(info.position_shift[i]);
|
DEBUG_DECIMAL(info.position_shift[i]);
|
||||||
}
|
}
|
||||||
DEBUG_EOL();
|
DEBUG_EOL();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
|
|
||||||
|
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if HAS_MULTI_EXTRUDER
|
||||||
DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder);
|
DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DISABLED(NO_VOLUMETRICS)
|
||||||
|
DEBUG_ECHOPGM("filament_size:");
|
||||||
|
LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPAIR(" ", info.filament_size[i]);
|
||||||
|
DEBUG_EOL();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_HOTEND
|
#if HAS_HOTEND
|
||||||
DEBUG_ECHOPGM("target_temperature: ");
|
DEBUG_ECHOPGM("target_temperature: ");
|
||||||
HOTEND_LOOP() {
|
HOTEND_LOOP() {
|
||||||
@@ -598,8 +648,9 @@ void PrintJobRecovery::resume() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling, " fade: ", info.fade);
|
DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
DEBUG_ECHOPGM("retract: ");
|
DEBUG_ECHOPGM("retract: ");
|
||||||
for (int8_t e = 0; e < EXTRUDERS; e++) {
|
for (int8_t e = 0; e < EXTRUDERS; e++) {
|
||||||
@@ -609,11 +660,28 @@ void PrintJobRecovery::resume() {
|
|||||||
DEBUG_EOL();
|
DEBUG_EOL();
|
||||||
DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop);
|
DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Mixing extruder and gradient
|
||||||
|
#if BOTH(MIXING_EXTRUDER, GRADIENT_MIX)
|
||||||
|
DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF");
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename);
|
DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename);
|
||||||
DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos);
|
DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos);
|
||||||
DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed);
|
DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed);
|
||||||
DEBUG_ECHOLNPAIR("dryrun: ", AS_DIGIT(info.flag.dryrun));
|
|
||||||
DEBUG_ECHOLNPAIR("allow_cold_extrusion: ", info.flag.allow_cold_extrusion);
|
DEBUG_ECHOPGM("axis_relative:");
|
||||||
|
if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X");
|
||||||
|
if (TEST(info.axis_relative, REL_Y)) DEBUG_ECHOPGM(" REL_Y");
|
||||||
|
if (TEST(info.axis_relative, REL_Z)) DEBUG_ECHOPGM(" REL_Z");
|
||||||
|
if (TEST(info.axis_relative, REL_E)) DEBUG_ECHOPGM(" REL_E");
|
||||||
|
if (TEST(info.axis_relative, E_MODE_ABS)) DEBUG_ECHOPGM(" E_MODE_ABS");
|
||||||
|
if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL");
|
||||||
|
DEBUG_EOL();
|
||||||
|
|
||||||
|
DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun));
|
||||||
|
DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion));
|
||||||
|
DEBUG_ECHOLNPAIR("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG_ECHOLNPGM("INVALID DATA");
|
DEBUG_ECHOLNPGM("INVALID DATA");
|
||||||
|
@@ -42,6 +42,10 @@
|
|||||||
#define POWER_LOSS_STATE HIGH
|
#define POWER_LOSS_STATE HIGH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef POWER_LOSS_ZRAISE
|
||||||
|
#define POWER_LOSS_ZRAISE 2
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define DEBUG_POWER_LOSS_RECOVERY
|
//#define DEBUG_POWER_LOSS_RECOVERY
|
||||||
//#define SAVE_EACH_CMD_MODE
|
//#define SAVE_EACH_CMD_MODE
|
||||||
//#define SAVE_INFO_INTERVAL_MS 0
|
//#define SAVE_INFO_INTERVAL_MS 0
|
||||||
@@ -52,6 +56,7 @@ typedef struct {
|
|||||||
// Machine state
|
// Machine state
|
||||||
xyze_pos_t current_position;
|
xyze_pos_t current_position;
|
||||||
uint16_t feedrate;
|
uint16_t feedrate;
|
||||||
|
|
||||||
float zraise;
|
float zraise;
|
||||||
|
|
||||||
// Repeat information
|
// Repeat information
|
||||||
@@ -70,7 +75,6 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DISABLED(NO_VOLUMETRICS)
|
#if DISABLED(NO_VOLUMETRICS)
|
||||||
bool volumetric_enabled;
|
|
||||||
float filament_size[EXTRUDERS];
|
float filament_size[EXTRUDERS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -113,10 +117,14 @@ typedef struct {
|
|||||||
|
|
||||||
// Misc. Marlin flags
|
// Misc. Marlin flags
|
||||||
struct {
|
struct {
|
||||||
|
bool raised:1; // Raised before saved
|
||||||
bool dryrun:1; // M111 S8
|
bool dryrun:1; // M111 S8
|
||||||
bool allow_cold_extrusion:1; // M302 P1
|
bool allow_cold_extrusion:1; // M302 P1
|
||||||
#if ENABLED(HAS_LEVELING)
|
#if ENABLED(HAS_LEVELING)
|
||||||
bool leveling:1;
|
bool leveling:1; // M420 S
|
||||||
|
#endif
|
||||||
|
#if DISABLED(NO_VOLUMETRICS)
|
||||||
|
bool volumetric_enabled:1; // M200 S D
|
||||||
#endif
|
#endif
|
||||||
} flag;
|
} flag;
|
||||||
|
|
||||||
@@ -175,12 +183,18 @@ class PrintJobRecovery {
|
|||||||
static inline void cancel() { purge(); IF_DISABLED(NO_SD_AUTOSTART, card.autofile_begin()); }
|
static inline void cancel() { purge(); IF_DISABLED(NO_SD_AUTOSTART, card.autofile_begin()); }
|
||||||
|
|
||||||
static void load();
|
static void load();
|
||||||
static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=0);
|
static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=POWER_LOSS_ZRAISE, const bool raised=false);
|
||||||
|
|
||||||
#if PIN_EXISTS(POWER_LOSS)
|
#if PIN_EXISTS(POWER_LOSS)
|
||||||
static inline void outage() {
|
static inline void outage() {
|
||||||
if (enabled && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE)
|
static constexpr uint8_t OUTAGE_THRESHOLD = 3;
|
||||||
_outage();
|
static uint8_t outage_counter = 0;
|
||||||
|
if (enabled && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) {
|
||||||
|
outage_counter++;
|
||||||
|
if (outage_counter >= OUTAGE_THRESHOLD) _outage();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
outage_counter = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -207,7 +207,7 @@ class FilamentSensorBase {
|
|||||||
// Return a bitmask of runout pin states
|
// Return a bitmask of runout pin states
|
||||||
static inline uint8_t poll_runout_pins() {
|
static inline uint8_t poll_runout_pins() {
|
||||||
#define _OR_RUNOUT(N) | (READ(FIL_RUNOUT##N##_PIN) ? _BV((N) - 1) : 0)
|
#define _OR_RUNOUT(N) | (READ(FIL_RUNOUT##N##_PIN) ? _BV((N) - 1) : 0)
|
||||||
return (0 REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _OR_RUNOUT));
|
return (0 REPEAT_1(NUM_RUNOUT_SENSORS, _OR_RUNOUT));
|
||||||
#undef _OR_RUNOUT
|
#undef _OR_RUNOUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,6 +71,9 @@ void SpindleLaser::init() {
|
|||||||
#if ENABLED(AIR_EVACUATION)
|
#if ENABLED(AIR_EVACUATION)
|
||||||
OUT_WRITE(AIR_EVACUATION_PIN, !AIR_EVACUATION_ACTIVE); // Init Vacuum/Blower OFF
|
OUT_WRITE(AIR_EVACUATION_PIN, !AIR_EVACUATION_ACTIVE); // Init Vacuum/Blower OFF
|
||||||
#endif
|
#endif
|
||||||
|
#if ENABLED(AIR_ASSIST)
|
||||||
|
OUT_WRITE(AIR_ASSIST_PIN, !AIR_ASSIST_ACTIVE); // Init Air Assist OFF
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(SPINDLE_LASER_PWM)
|
#if ENABLED(SPINDLE_LASER_PWM)
|
||||||
@@ -147,6 +150,17 @@ void SpindleLaser::apply_power(const uint8_t opwr) {
|
|||||||
|
|
||||||
void SpindleLaser::air_evac_toggle() { TOGGLE(AIR_EVACUATION_PIN); } // Toggle state
|
void SpindleLaser::air_evac_toggle() { TOGGLE(AIR_EVACUATION_PIN); } // Toggle state
|
||||||
|
|
||||||
#endif
|
#endif // AIR_EVACUATION
|
||||||
|
|
||||||
|
#if ENABLED(AIR_ASSIST)
|
||||||
|
|
||||||
|
// Enable / disable air assist
|
||||||
|
void SpindleLaser::air_assist_enable() { WRITE(AIR_ASSIST_PIN, AIR_ASSIST_PIN); } // Turn ON
|
||||||
|
|
||||||
|
void SpindleLaser::air_assist_disable() { WRITE(AIR_ASSIST_PIN, !AIR_ASSIST_PIN); } // Turn OFF
|
||||||
|
|
||||||
|
void SpindleLaser::air_assist_toggle() { TOGGLE(AIR_ASSIST_PIN); } // Toggle state
|
||||||
|
|
||||||
|
#endif // AIR_ASSIST
|
||||||
|
|
||||||
#endif // HAS_CUTTER
|
#endif // HAS_CUTTER
|
||||||
|
@@ -221,6 +221,15 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(AIR_ASSIST)
|
||||||
|
static void air_assist_enable(); // Turn on air assist
|
||||||
|
static void air_assist_disable(); // Turn off air assist
|
||||||
|
static void air_assist_toggle(); // Toggle air assist
|
||||||
|
static inline bool air_assist_state() { // Get current state
|
||||||
|
return (READ(AIR_ASSIST_PIN) == AIR_ASSIST_ACTIVE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void disable() { isReady = false; set_enabled(false); }
|
static inline void disable() { isReady = false; set_enabled(false); }
|
||||||
|
|
||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
|
@@ -211,7 +211,7 @@
|
|||||||
SERIAL_PRINTLN(data.drv_status, HEX);
|
SERIAL_PRINTLN(data.drv_status, HEX);
|
||||||
if (data.is_ot) SERIAL_ECHOLNPGM("overtemperature");
|
if (data.is_ot) SERIAL_ECHOLNPGM("overtemperature");
|
||||||
if (data.is_s2g) SERIAL_ECHOLNPGM("coil short circuit");
|
if (data.is_s2g) SERIAL_ECHOLNPGM("coil short circuit");
|
||||||
TERN_(TMC_DEBUG, tmc_report_all(true, true, true, true));
|
TERN_(TMC_DEBUG, tmc_report_all());
|
||||||
kill(PSTR("Driver error"));
|
kill(PSTR("Driver error"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -889,7 +889,7 @@
|
|||||||
* M122 report functions
|
* M122 report functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void tmc_report_all(bool print_x, const bool print_y, const bool print_z, const bool print_e) {
|
void tmc_report_all(const bool print_x/*=true*/, const bool print_y/*=true*/, const bool print_z/*=true*/, const bool print_e/*=true*/) {
|
||||||
#define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, print_x, print_y, print_z, print_e); }while(0)
|
#define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, print_x, print_y, print_z, print_e); }while(0)
|
||||||
#define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, print_x, print_y, print_z, print_e); }while(0)
|
#define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, print_x, print_y, print_z, print_e); }while(0)
|
||||||
TMC_REPORT("\t", TMC_CODES);
|
TMC_REPORT("\t", TMC_CODES);
|
||||||
@@ -1214,7 +1214,7 @@ static bool test_connection(TMC &st) {
|
|||||||
return test_result;
|
return test_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e) {
|
void test_tmc_connection(const bool test_x/*=true*/, const bool test_y/*=true*/, const bool test_z/*=true*/, const bool test_e/*=true*/) {
|
||||||
uint8_t axis_connection = 0;
|
uint8_t axis_connection = 0;
|
||||||
|
|
||||||
if (test_x) {
|
if (test_x) {
|
||||||
|
@@ -70,15 +70,9 @@ class TMCStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
#if ENABLED(HAS_STEALTHCHOP)
|
OPTCODE(HAS_STEALTHCHOP, bool stealthChop_enabled = false)
|
||||||
bool stealthChop_enabled = false;
|
OPTCODE(HYBRID_THRESHOLD, uint8_t hybrid_thrs = 0)
|
||||||
#endif
|
OPTCODE(USE_SENSORLESS, int16_t homing_thrs = 0)
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
|
||||||
uint8_t hybrid_thrs = 0;
|
|
||||||
#endif
|
|
||||||
#if ENABLED(USE_SENSORLESS)
|
|
||||||
int16_t homing_thrs = 0;
|
|
||||||
#endif
|
|
||||||
} stored;
|
} stored;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -341,13 +335,13 @@ void tmc_print_current(TMC &st) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void monitor_tmc_drivers();
|
void monitor_tmc_drivers();
|
||||||
void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e);
|
void test_tmc_connection(const bool test_x=true, const bool test_y=true, const bool test_z=true, const bool test_e=true);
|
||||||
|
|
||||||
#if ENABLED(TMC_DEBUG)
|
#if ENABLED(TMC_DEBUG)
|
||||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||||
void tmc_set_report_interval(const uint16_t update_interval);
|
void tmc_set_report_interval(const uint16_t update_interval);
|
||||||
#endif
|
#endif
|
||||||
void tmc_report_all(const bool print_x, const bool print_y, const bool print_z, const bool print_e);
|
void tmc_report_all(const bool print_x=true, const bool print_y=true, const bool print_z=true, const bool print_e=true);
|
||||||
void tmc_get_registers(const bool print_x, const bool print_y, const bool print_z, const bool print_e);
|
void tmc_get_registers(const bool print_x, const bool print_y, const bool print_z, const bool print_e);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user