Compare commits
934 Commits
MK3_3.13.1
...
MK3
| Author | SHA1 | Date |
|---|---|---|
|
|
f3e0dfd481 | |
|
|
7731024edb | |
|
|
f915455dae | |
|
|
295142a010 | |
|
|
242bc9d7a8 | |
|
|
88730dca2a | |
|
|
66797abf84 | |
|
|
26ed278d02 | |
|
|
6c6476cc6c | |
|
|
a7682997f4 | |
|
|
34450f52a8 | |
|
|
a29c246af1 | |
|
|
29907639ae | |
|
|
c40af0c896 | |
|
|
9fb034a985 | |
|
|
1965743ba2 | |
|
|
c798754ec2 | |
|
|
e80c9fa315 | |
|
|
1a0e0a804f | |
|
|
c21dc36507 | |
|
|
e10c8d9c5a | |
|
|
477d7ae5ef | |
|
|
ee4d8bb5e5 | |
|
|
80cb13003e | |
|
|
901f63e90f | |
|
|
3ea620c27a | |
|
|
a704b99d81 | |
|
|
d3f95592c1 | |
|
|
6b01929382 | |
|
|
4a0973941f | |
|
|
51e81217dd | |
|
|
18bda84876 | |
|
|
b7e3216944 | |
|
|
b67554eb01 | |
|
|
7a47bf30be | |
|
|
24ce71eded | |
|
|
519724b53d | |
|
|
81d124affd | |
|
|
13d12c0ffa | |
|
|
e84ade3542 | |
|
|
658df9d04d | |
|
|
1319af8a12 | |
|
|
44f9b953c5 | |
|
|
0b5afa3092 | |
|
|
a0278b2844 | |
|
|
d1470d8abc | |
|
|
d8d058a63b | |
|
|
0fb17b1643 | |
|
|
cdb6635eac | |
|
|
ef3527eb0f | |
|
|
21084af026 | |
|
|
24bfa8db59 | |
|
|
f12683f3ff | |
|
|
aa4de7ae7e | |
|
|
402b9ed93a | |
|
|
65a26e882b | |
|
|
29c920c801 | |
|
|
ab5c7ac6c6 | |
|
|
de092b35d5 | |
|
|
5aa67489da | |
|
|
7d3032c001 | |
|
|
2c621e025a | |
|
|
6ea47967da | |
|
|
4e9e20c67f | |
|
|
2fed2f00f7 | |
|
|
1c0a59f7c9 | |
|
|
3facdb4576 | |
|
|
cb502ee7bc | |
|
|
b614b9c43d | |
|
|
b58d2ecccb | |
|
|
357b68cf76 | |
|
|
d2119c24e1 | |
|
|
8196e48684 | |
|
|
d8e3c2b481 | |
|
|
83c43fba02 | |
|
|
b3a682d330 | |
|
|
312f79c5f5 | |
|
|
aa8569600c | |
|
|
a2d45e5d11 | |
|
|
f115adf894 | |
|
|
5a5c68f563 | |
|
|
7d3c416d04 | |
|
|
6c99a4463e | |
|
|
a259482b6b | |
|
|
923f926223 | |
|
|
d3c326de99 | |
|
|
af6fbb13de | |
|
|
56de4bf53b | |
|
|
b9b32b0d9f | |
|
|
6af6b402cc | |
|
|
1a717986c1 | |
|
|
6fa80045b5 | |
|
|
ff9a476121 | |
|
|
e90b536c9b | |
|
|
b353f1f008 | |
|
|
c1360d7bfb | |
|
|
f7e3195d78 | |
|
|
2b1c49dae2 | |
|
|
f5fe658728 | |
|
|
5e66e71a48 | |
|
|
4ed5b36199 | |
|
|
40d3830e6d | |
|
|
75c980c4e7 | |
|
|
b7caf36207 | |
|
|
bf72ecc3f9 | |
|
|
055f601ad3 | |
|
|
96d6192be5 | |
|
|
d3cec58a7a | |
|
|
8fe73a0dc2 | |
|
|
c27fb616e0 | |
|
|
7d66cd1ca0 | |
|
|
a2022471ce | |
|
|
a9e7f387e8 | |
|
|
64d9f201da | |
|
|
2f7715a0b0 | |
|
|
0e84d0bb41 | |
|
|
815b68678d | |
|
|
f64f2bbe68 | |
|
|
e2e6999887 | |
|
|
3da141b3a7 | |
|
|
21fc1ddf00 | |
|
|
d3f2dce430 | |
|
|
2f9dafcf97 | |
|
|
dad1e4081e | |
|
|
be6c85cf0c | |
|
|
8b2074e808 | |
|
|
80f27618c9 | |
|
|
41245b2a59 | |
|
|
835caa0230 | |
|
|
0153eb05a1 | |
|
|
a1fcb8564e | |
|
|
f628c5f912 | |
|
|
9ae8beacc6 | |
|
|
ad1e3cb12a | |
|
|
10d156b28c | |
|
|
428091b7c7 | |
|
|
80148a862d | |
|
|
bf19b34e11 | |
|
|
0a60eb435c | |
|
|
ebbd58c6e2 | |
|
|
ed3867ab09 | |
|
|
b2c17960df | |
|
|
decebab9d4 | |
|
|
c795b3956c | |
|
|
efc4cc4996 | |
|
|
15670f21bd | |
|
|
371c040e8a | |
|
|
25a11bb7d7 | |
|
|
f96cc2f400 | |
|
|
48f7cd5270 | |
|
|
a926675c35 | |
|
|
ff16bfd8fa | |
|
|
23f92b24b8 | |
|
|
04a7175cc7 | |
|
|
81f1ec4975 | |
|
|
0d45228dbd | |
|
|
396a8ca4f9 | |
|
|
eb7969441a | |
|
|
2cbbdbacd5 | |
|
|
3f650a24aa | |
|
|
d485e4fb0b | |
|
|
bb1bb4d717 | |
|
|
5119e47419 | |
|
|
8382815110 | |
|
|
faa01b5a5f | |
|
|
cea5f70974 | |
|
|
3722a17e5a | |
|
|
4dc9fd4972 | |
|
|
3cb722403b | |
|
|
a7004cd067 | |
|
|
39c8c4f560 | |
|
|
62a1c1478d | |
|
|
2ed3ee8410 | |
|
|
695ba5d5db | |
|
|
f687fe3e2e | |
|
|
d769fcc094 | |
|
|
99e306f4a3 | |
|
|
d548bb68fd | |
|
|
09f1d85e9c | |
|
|
61b4270129 | |
|
|
592fc56bfc | |
|
|
5efae44eb7 | |
|
|
72ffc28952 | |
|
|
e405e9140c | |
|
|
bc48d34a2f | |
|
|
152b290d1d | |
|
|
3c7ae1e9fc | |
|
|
ac63fafc33 | |
|
|
db64997687 | |
|
|
827c3025a4 | |
|
|
45a223a1f9 | |
|
|
e110153ee2 | |
|
|
9a56f1e4c1 | |
|
|
eaeb722adb | |
|
|
6f915ee401 | |
|
|
abdee5b7f3 | |
|
|
08d26fdee2 | |
|
|
28502a2b6e | |
|
|
2c46e1b344 | |
|
|
d22245b482 | |
|
|
e8d55486fe | |
|
|
6e40fe05fc | |
|
|
34591f0465 | |
|
|
51b119a3ec | |
|
|
1292a82f70 | |
|
|
f50e754f26 | |
|
|
5c0e014215 | |
|
|
16dfcfeb9a | |
|
|
52ac95f082 | |
|
|
361ce65e5c | |
|
|
36282aae1b | |
|
|
5b96ff6d37 | |
|
|
bc04f16906 | |
|
|
bd935db31e | |
|
|
e5d504b855 | |
|
|
02822c59ad | |
|
|
fbbcdd0808 | |
|
|
022eaa1820 | |
|
|
ed9d7f3ac1 | |
|
|
a4a7b09fe7 | |
|
|
c515038e7d | |
|
|
feebac54fc | |
|
|
b3a410abdc | |
|
|
3fa03ec1fb | |
|
|
a93cd93756 | |
|
|
97584d571e | |
|
|
af03662c8f | |
|
|
0c9bf5d435 | |
|
|
8d1be264e5 | |
|
|
9e8aadd8af | |
|
|
5f26d5f7da | |
|
|
1ac69247d7 | |
|
|
52275322a2 | |
|
|
b6e2a8875b | |
|
|
2df8a18fde | |
|
|
82d102d740 | |
|
|
9f8115639a | |
|
|
a04063f966 | |
|
|
e2823c3c35 | |
|
|
9e52b78285 | |
|
|
15ea2784c3 | |
|
|
4e032f6f11 | |
|
|
fc157d1f6c | |
|
|
5b7c583dba | |
|
|
9ec5639d29 | |
|
|
112d3c672c | |
|
|
16aa2e7834 | |
|
|
886d610524 | |
|
|
95c6ea5889 | |
|
|
47235bbf62 | |
|
|
88b77ecce2 | |
|
|
517900c3fe | |
|
|
4235f784b9 | |
|
|
9df3846ffa | |
|
|
18c7c8c55b | |
|
|
2ad76e225b | |
|
|
50ba83219f | |
|
|
84259de765 | |
|
|
b43ee3bf3d | |
|
|
ad35740092 | |
|
|
361627d91d | |
|
|
1619db5b62 | |
|
|
4bca4021c6 | |
|
|
c0284497e3 | |
|
|
2d9dbecd5d | |
|
|
f9bdb8b8aa | |
|
|
c7b5fd59ed | |
|
|
af64d446bf | |
|
|
aededa34bb | |
|
|
326019a8bf | |
|
|
692f062fee | |
|
|
0a727d8573 | |
|
|
665692b73e | |
|
|
704003295a | |
|
|
c5a036d817 | |
|
|
ccb956eae4 | |
|
|
e6a4856196 | |
|
|
f80fb4c17c | |
|
|
f9671d40c7 | |
|
|
dc3b3387ed | |
|
|
8e26a95630 | |
|
|
727a82bb3d | |
|
|
020239687a | |
|
|
794251884a | |
|
|
c999c2948e | |
|
|
bacb0b1b07 | |
|
|
6682237c7a | |
|
|
6714d4df3f | |
|
|
e7ef3d6db5 | |
|
|
52ba1b534d | |
|
|
ffeda98894 | |
|
|
d1b88e1684 | |
|
|
c9aba688e3 | |
|
|
fda30f82c8 | |
|
|
e5c5720d03 | |
|
|
abcb1017f3 | |
|
|
f022567239 | |
|
|
c0b76dd5cf | |
|
|
8fa97cffda | |
|
|
3957dc91aa | |
|
|
b80965731f | |
|
|
02b91dc2cb | |
|
|
b56330819c | |
|
|
902c2f71c9 | |
|
|
a21647e0a7 | |
|
|
8e91fb978b | |
|
|
6da1ec924b | |
|
|
339a10eb81 | |
|
|
98889cafbf | |
|
|
f3e5444d47 | |
|
|
13fb11889e | |
|
|
adf2ecabc1 | |
|
|
d5a5835059 | |
|
|
8d50d29776 | |
|
|
6424703d2b | |
|
|
f18fc2bbce | |
|
|
d6250592b2 | |
|
|
2199ef8bc4 | |
|
|
ae31c0ec31 | |
|
|
09952db139 | |
|
|
59093107fd | |
|
|
49f9d7abdc | |
|
|
db044163f9 | |
|
|
ba027dd41e | |
|
|
9bd043c83b | |
|
|
ceec54f026 | |
|
|
45d70b195d | |
|
|
8aa344ea38 | |
|
|
c9ea5fa746 | |
|
|
15a3fb998c | |
|
|
b894fcc11c | |
|
|
2c4474b1dd | |
|
|
e5d6d72d23 | |
|
|
1407f29362 | |
|
|
c384524877 | |
|
|
40786a24e0 | |
|
|
d94f263843 | |
|
|
42855f9f13 | |
|
|
e0eb8b8a24 | |
|
|
3c64874e20 | |
|
|
1868839dc6 | |
|
|
bc9e47c13e | |
|
|
69b35d37c3 | |
|
|
aa92375e62 | |
|
|
91d11a2d99 | |
|
|
dd5f2e1196 | |
|
|
18daa5a62e | |
|
|
2b18921035 | |
|
|
4684c3bc44 | |
|
|
0546566fc7 | |
|
|
e2aafc882c | |
|
|
60e311d74f | |
|
|
4d9e084cf7 | |
|
|
d267140ee6 | |
|
|
3da4407e4f | |
|
|
8ceda27cda | |
|
|
47b298782f | |
|
|
d36ea24c02 | |
|
|
4bc6bc3f90 | |
|
|
4dfc484265 | |
|
|
4d9dc11510 | |
|
|
02c5da198d | |
|
|
ce24d917e6 | |
|
|
67c7ad1c99 | |
|
|
665c01804c | |
|
|
e2d0e9a2ee | |
|
|
02a5228f5e | |
|
|
096a1c9fe0 | |
|
|
b37e39fdd9 | |
|
|
3216ef863a | |
|
|
ff42510a5c | |
|
|
ba004d2fa8 | |
|
|
67d7be2b2d | |
|
|
0462b7289a | |
|
|
e2a60be029 | |
|
|
9f9bb12eeb | |
|
|
7749cdec20 | |
|
|
d9d42a0678 | |
|
|
e1e0b0afa1 | |
|
|
30d0da4698 | |
|
|
3ad40f0206 | |
|
|
0b4af3b97f | |
|
|
73436e9351 | |
|
|
ec1c215681 | |
|
|
7130504fcf | |
|
|
f48c9e0d4f | |
|
|
242fdc863b | |
|
|
ce135a0976 | |
|
|
532a5b3e2f | |
|
|
004169034a | |
|
|
ae5fbce6e7 | |
|
|
a52d5430aa | |
|
|
7a6cfda34f | |
|
|
cb92fd5002 | |
|
|
e8a2d4c7e1 | |
|
|
8615a8dad5 | |
|
|
02459edcb6 | |
|
|
d394645b69 | |
|
|
af79ac0714 | |
|
|
d5d77ee243 | |
|
|
880d2f28bd | |
|
|
516ae1b952 | |
|
|
dfcaa330fa | |
|
|
d3b98f30a7 | |
|
|
514607318e | |
|
|
d276695ce7 | |
|
|
bbae8dd956 | |
|
|
134e892d8e | |
|
|
60cb089e96 | |
|
|
331ceaf044 | |
|
|
a2e6cda37e | |
|
|
a6de11059f | |
|
|
423f98ff6e | |
|
|
c5a885dba3 | |
|
|
8b3373b9dc | |
|
|
d3b4bfb685 | |
|
|
96094dc548 | |
|
|
0d60a82c56 | |
|
|
4a4c015ad8 | |
|
|
2e12133716 | |
|
|
498d99b84b | |
|
|
4dc87acf20 | |
|
|
43692b416b | |
|
|
af054923a7 | |
|
|
9fd478c9c2 | |
|
|
b39b83ecbf | |
|
|
53c419f52d | |
|
|
cf0e0f3718 | |
|
|
7e0df7f9d3 | |
|
|
f42d7e4ea0 | |
|
|
e758b146be | |
|
|
4922bcd7b1 | |
|
|
400722ec67 | |
|
|
38104063d4 | |
|
|
e74abb102a | |
|
|
842d029f7e | |
|
|
1e6460c344 | |
|
|
077aa0a2b8 | |
|
|
1fc1998874 | |
|
|
ddbadf4874 | |
|
|
53d7943a2c | |
|
|
4e6b649865 | |
|
|
af465da9e2 | |
|
|
45880c252b | |
|
|
342d8e92ab | |
|
|
0016b77827 | |
|
|
e3392a763a | |
|
|
b11c0024d1 | |
|
|
69cb7add26 | |
|
|
a76e1290e8 | |
|
|
bcc7a16e1c | |
|
|
890bfab946 | |
|
|
dc280b0d9e | |
|
|
4c52d92d16 | |
|
|
21d0130626 | |
|
|
dec5e2c1b4 | |
|
|
82cece95aa | |
|
|
977792961c | |
|
|
469f002179 | |
|
|
ed376009aa | |
|
|
20a2216623 | |
|
|
cdb559040c | |
|
|
fca93b00e9 | |
|
|
3ffe7bf406 | |
|
|
6be5cb3732 | |
|
|
8fcfdf31c4 | |
|
|
645b11e643 | |
|
|
287e340117 | |
|
|
3b10c6130e | |
|
|
3297429ca7 | |
|
|
e207945154 | |
|
|
e7f56118d1 | |
|
|
82e0124cb4 | |
|
|
d56f2bc57e | |
|
|
62b90fde28 | |
|
|
7b9e707709 | |
|
|
ef33db9a71 | |
|
|
cd3372dc92 | |
|
|
12a3051c50 | |
|
|
7bc7e7a7e8 | |
|
|
abd8a43cfc | |
|
|
1528294450 | |
|
|
1f608dffcf | |
|
|
5c416a1e47 | |
|
|
cd8daa88a3 | |
|
|
1f1743d7ad | |
|
|
af13d0746e | |
|
|
fe9a8cf8ac | |
|
|
323f9aaf6c | |
|
|
a5dbf4926d | |
|
|
0b999f1cc2 | |
|
|
c681dada5d | |
|
|
fa056ceb43 | |
|
|
baba1e78c7 | |
|
|
20a434dbac | |
|
|
466e562360 | |
|
|
baedd025d3 | |
|
|
6ef9e8d39c | |
|
|
07b7842212 | |
|
|
63b628d722 | |
|
|
3d7892f678 | |
|
|
47f5066fa4 | |
|
|
0b5cf404a6 | |
|
|
eb2cacc7de | |
|
|
a90086b28f | |
|
|
9148bed5b6 | |
|
|
512d7684b0 | |
|
|
b040538535 | |
|
|
fe893f8289 | |
|
|
69e06bac84 | |
|
|
f6737d2fca | |
|
|
6aae8f04df | |
|
|
415c0c79d1 | |
|
|
fab47e63bf | |
|
|
23503624d0 | |
|
|
2027a54873 | |
|
|
9aca81dc7c | |
|
|
de73edc5a3 | |
|
|
b89c62bd50 | |
|
|
8b9b63c35b | |
|
|
37af110846 | |
|
|
cc020ede35 | |
|
|
ea28584142 | |
|
|
fab62367b7 | |
|
|
e8c95c3fe4 | |
|
|
9606c4f00b | |
|
|
c479848497 | |
|
|
c8ee7bc7c2 | |
|
|
d53ba0eba2 | |
|
|
7e88e49b4e | |
|
|
32cee8b529 | |
|
|
c2c01a9a86 | |
|
|
b45a5842ca | |
|
|
3e15a24be7 | |
|
|
8a39f53e26 | |
|
|
9dbbb12a13 | |
|
|
8e25e1b164 | |
|
|
d5074129f5 | |
|
|
6703640c56 | |
|
|
e4ad14a9fb | |
|
|
9fbdbb3c7b | |
|
|
f093d431c8 | |
|
|
fcaa9c8de6 | |
|
|
4d0513007f | |
|
|
9ee71b2942 | |
|
|
dd32f7be3c | |
|
|
5466bfb500 | |
|
|
90dbaa8c51 | |
|
|
927b27615e | |
|
|
d8b75f425f | |
|
|
3817893199 | |
|
|
5ea2b881d5 | |
|
|
3305227bbc | |
|
|
6707570c6c | |
|
|
c0875f37f2 | |
|
|
a267d80fe2 | |
|
|
10e6087d6b | |
|
|
e6d7a4e432 | |
|
|
09c85796a6 | |
|
|
4a24990c75 | |
|
|
1faf919c63 | |
|
|
245a2852ac | |
|
|
64e31fd7f4 | |
|
|
1c637f8082 | |
|
|
1c260f94a0 | |
|
|
6d5e645c1f | |
|
|
c1ec8d97e6 | |
|
|
81103602f0 | |
|
|
6367172177 | |
|
|
4957544fcf | |
|
|
c514774a54 | |
|
|
8e18c83d51 | |
|
|
4736a1624f | |
|
|
e9f74b2678 | |
|
|
580b27e394 | |
|
|
c7f9a46c86 | |
|
|
60494b20e8 | |
|
|
7e0ab44d09 | |
|
|
90222747f2 | |
|
|
f392fae996 | |
|
|
100a8e3b33 | |
|
|
3eaca29b0b | |
|
|
fcd61a378d | |
|
|
0139cf6dde | |
|
|
e621d3445e | |
|
|
c97143fc2d | |
|
|
ae494b04de | |
|
|
52de576e0a | |
|
|
016db6a6e8 | |
|
|
06d34b4398 | |
|
|
4b66485f46 | |
|
|
98ae24caad | |
|
|
f4ec19d3c7 | |
|
|
20540cc61b | |
|
|
b81a440b7c | |
|
|
a6d1985742 | |
|
|
a5aab6afd9 | |
|
|
949539dfc9 | |
|
|
f8c64de505 | |
|
|
c92c0fda38 | |
|
|
1b6bdb787b | |
|
|
2a2932e66d | |
|
|
605cc5d83a | |
|
|
f7fbdadae7 | |
|
|
6ceb750999 | |
|
|
5ddac5cb6c | |
|
|
e323490659 | |
|
|
1996f977e1 | |
|
|
8bd71b7bf0 | |
|
|
039202f34b | |
|
|
0877585bd1 | |
|
|
0f1cb4f407 | |
|
|
4134bf4f40 | |
|
|
ea01012026 | |
|
|
a02ff0651c | |
|
|
59e49c80f9 | |
|
|
9b48ab729a | |
|
|
7db7250773 | |
|
|
be5523187b | |
|
|
075858c9fa | |
|
|
5235fe2480 | |
|
|
b4b0bba11c | |
|
|
eb7a73e748 | |
|
|
fd9f4ffb9e | |
|
|
ec4740fe53 | |
|
|
717281cd87 | |
|
|
f235976f26 | |
|
|
8c9b754b3f | |
|
|
6187b7eecf | |
|
|
84d353793d | |
|
|
e4a10e5fab | |
|
|
56a79f88ef | |
|
|
2951bc8af0 | |
|
|
9e794a47a4 | |
|
|
adf2cd6afc | |
|
|
21c57a1222 | |
|
|
f193251977 | |
|
|
2863c9bc01 | |
|
|
5f605012eb | |
|
|
b652bee808 | |
|
|
70d83fe4ee | |
|
|
a9c8bb7dbf | |
|
|
d3bb6e5ca5 | |
|
|
292c1acf29 | |
|
|
4c930594fc | |
|
|
ca27841d67 | |
|
|
dc129e0934 | |
|
|
2e70697fa7 | |
|
|
0aa380b931 | |
|
|
73118dd4e2 | |
|
|
f5d48cd029 | |
|
|
9781e15eff | |
|
|
b7daac3b70 | |
|
|
b75e3b5233 | |
|
|
ebc6663210 | |
|
|
ff6fd8cf4b | |
|
|
74f724b228 | |
|
|
019126778d | |
|
|
5050fd768b | |
|
|
f5259ee611 | |
|
|
ffbb720d34 | |
|
|
2b5e2dc9fe | |
|
|
f1ab89183d | |
|
|
251e4ff370 | |
|
|
c84985ec3e | |
|
|
d8f7642058 | |
|
|
2485c36391 | |
|
|
ab299e36d1 | |
|
|
916d02824e | |
|
|
7cdd175cb8 | |
|
|
3673b68356 | |
|
|
334bfe4d29 | |
|
|
80594880cd | |
|
|
2e1eb4f84a | |
|
|
c180bc85ff | |
|
|
e0269d6f6a | |
|
|
77a4b99f5e | |
|
|
4c53163068 | |
|
|
a28779b08f | |
|
|
4a4eacd8fd | |
|
|
abdfe07f3f | |
|
|
2bfd56cd30 | |
|
|
105a6b9438 | |
|
|
9e09e5014c | |
|
|
43b97275bc | |
|
|
d84e3a9cf3 | |
|
|
47775e158b | |
|
|
aefa02c1a4 | |
|
|
0bbec5626c | |
|
|
5bf9bf7507 | |
|
|
1881c5f086 | |
|
|
c4c26050d3 | |
|
|
6c0f80e680 | |
|
|
0d097d5a62 | |
|
|
7c7d6b1671 | |
|
|
a89e06a54e | |
|
|
cabc44194a | |
|
|
2a71e681db | |
|
|
94eb4d8f0a | |
|
|
cfbe74b960 | |
|
|
d2ce4cfb88 | |
|
|
fb8bf8bf58 | |
|
|
5209715c11 | |
|
|
60534738d3 | |
|
|
e6f05e7856 | |
|
|
c7360055ae | |
|
|
814169a213 | |
|
|
fc18f4c5d7 | |
|
|
ede4cc5d30 | |
|
|
45823e7336 | |
|
|
f5f09f147c | |
|
|
7740a81edb | |
|
|
a984b2e609 | |
|
|
a15f536ff4 | |
|
|
aba0450615 | |
|
|
dd1bde74dc | |
|
|
42c27cabde | |
|
|
a9d0cc5e56 | |
|
|
6b12be42d9 | |
|
|
3ccf2d60c0 | |
|
|
be3465cf18 | |
|
|
2d0b96fe6a | |
|
|
5b8c65e342 | |
|
|
67945579de | |
|
|
a5c20a1c6e | |
|
|
de98551691 | |
|
|
40db9c9258 | |
|
|
a7d3dd720b | |
|
|
36d8de0727 | |
|
|
b234560b22 | |
|
|
f94bc72235 | |
|
|
90c21425c6 | |
|
|
6c97907507 | |
|
|
6af5f5e2a2 | |
|
|
83879fd10c | |
|
|
46710c4b4e | |
|
|
07b9447ee1 | |
|
|
fbfc6bf4a5 | |
|
|
8edfff39e4 | |
|
|
a4ef72b1fc | |
|
|
7b9f2086f4 | |
|
|
11e1806e0c | |
|
|
cfc8ffe8a3 | |
|
|
c4f48a6606 | |
|
|
61ec6b8ae7 | |
|
|
14306e59c8 | |
|
|
1dada5ba81 | |
|
|
91cb01b12f | |
|
|
b2f6b77cf3 | |
|
|
58014156a0 | |
|
|
0e469c054f | |
|
|
1bf33bd1aa | |
|
|
11d8c157f6 | |
|
|
3766aadd99 | |
|
|
92b3a2443e | |
|
|
03ed675732 | |
|
|
5d9ccc59b7 | |
|
|
f0a48b11f7 | |
|
|
efd85110a3 | |
|
|
1cda696e14 | |
|
|
9e4fd08031 | |
|
|
d0f18b6fbc | |
|
|
5f60eaff85 | |
|
|
d545469e32 | |
|
|
c708456184 | |
|
|
09ab354d7a | |
|
|
d2991ce1e0 | |
|
|
ef63b57dfd | |
|
|
500a6558a5 | |
|
|
f449b06bb2 | |
|
|
b432f6c5b9 | |
|
|
a39eb92583 | |
|
|
c93685ba5b | |
|
|
c276467e51 | |
|
|
ea5bcc5eea | |
|
|
503c01aa57 | |
|
|
02332018ec | |
|
|
a1a3194985 | |
|
|
ec921eb53b | |
|
|
cf0116ea74 | |
|
|
8083cb4c2c | |
|
|
95d8711469 | |
|
|
035da6d061 | |
|
|
b9381d5278 | |
|
|
18dc28b148 | |
|
|
c8347b7e8f | |
|
|
b1da06859c | |
|
|
491d4d2a20 | |
|
|
2ab9cbcd83 | |
|
|
ce013b35c9 | |
|
|
719db8f537 | |
|
|
baacc0ec53 | |
|
|
92202249d9 | |
|
|
5ad21550c7 | |
|
|
1030a3ab1d | |
|
|
a96ee9da62 | |
|
|
7e025894d1 | |
|
|
20c6a448fa | |
|
|
940e626f3a | |
|
|
28f6cebfd2 | |
|
|
63775dfabb | |
|
|
320997a1f5 | |
|
|
07d7bfa8a4 | |
|
|
a2eafc587a | |
|
|
8d66a2864f | |
|
|
caf3f2dec6 | |
|
|
c093bac4bc | |
|
|
a73fdec4ef | |
|
|
cb8f68192a | |
|
|
ce141a2fa1 | |
|
|
cc84e326fe | |
|
|
897d05d268 | |
|
|
6feab85252 | |
|
|
8ae0e1952e | |
|
|
940b18e0b2 | |
|
|
a6b209d36d | |
|
|
78ed427166 | |
|
|
600a7a0316 | |
|
|
44ae8033eb | |
|
|
dac07d11ba | |
|
|
780f2db3d1 | |
|
|
c647e4cfa4 | |
|
|
f40defd2a9 | |
|
|
842dcc6560 | |
|
|
ec896df62a | |
|
|
6c95d340c1 | |
|
|
a8c75090b2 | |
|
|
8689a28776 | |
|
|
21faa52aab | |
|
|
ff1cd2bfb2 | |
|
|
5b8813bf18 | |
|
|
fa6aae60db | |
|
|
9d15a4e63b | |
|
|
c090868fa2 | |
|
|
53c8bfa928 | |
|
|
7029af05fa | |
|
|
6623d45af9 | |
|
|
5288d615f8 | |
|
|
3485c20464 | |
|
|
074b5d380f | |
|
|
05b536947b | |
|
|
e3fd6a4902 | |
|
|
170dddfd71 | |
|
|
dece5d268f | |
|
|
5d880919f8 | |
|
|
d5f4f6700d | |
|
|
1984091c10 | |
|
|
c067318427 | |
|
|
0ab10a9df6 | |
|
|
ed13d008d9 | |
|
|
3819f7a473 | |
|
|
a87faba2bd | |
|
|
664d4e2bbe | |
|
|
bb8ebbb5e3 | |
|
|
2d2ab6e889 | |
|
|
3842a5c98c | |
|
|
60f1c2095f | |
|
|
ae1a7898dc | |
|
|
06100e366c | |
|
|
6aff3c761b | |
|
|
5cfdceb184 | |
|
|
1fea4a7335 | |
|
|
57d780ccf9 | |
|
|
d4733664a8 | |
|
|
43c823987c | |
|
|
d67fc84b73 | |
|
|
ffb6a2ae0c | |
|
|
03e7ff1983 | |
|
|
2cd5ab2349 | |
|
|
4dc5d97ca9 | |
|
|
d5125c6b1e | |
|
|
005f9f0d24 | |
|
|
5ee7ba84e3 | |
|
|
fa843a4a9b | |
|
|
10ed195531 | |
|
|
392c46c7ad | |
|
|
6d902d6437 | |
|
|
44bedcd941 | |
|
|
62a3d179f0 | |
|
|
6ccd12c7e8 | |
|
|
97c27525d4 | |
|
|
a2ac513794 | |
|
|
b65c500f25 | |
|
|
a45e432030 | |
|
|
67403603ed | |
|
|
2902fcaa71 | |
|
|
526a1dcc63 | |
|
|
065d81ba57 | |
|
|
64c7202986 | |
|
|
5295bfa040 | |
|
|
b6572066f4 | |
|
|
2d461572dd | |
|
|
4450dbe4dd | |
|
|
d9e6dd4efe | |
|
|
5baa74a425 | |
|
|
7f95c54305 | |
|
|
6784c6919b | |
|
|
70ae3353ce | |
|
|
06c42bf85f | |
|
|
4abdb0225d | |
|
|
434386e6cc | |
|
|
f13d657c7e | |
|
|
749360db0f | |
|
|
34ef9665cd | |
|
|
9cc9af14bd | |
|
|
b0ff5f45f3 | |
|
|
ee074eb548 | |
|
|
37a73e91c6 | |
|
|
e91ee4a5db | |
|
|
8149853fc9 | |
|
|
ef4efc22c3 | |
|
|
079e4c9112 | |
|
|
9421785190 | |
|
|
7c7cbe62ca | |
|
|
3ddd691f44 | |
|
|
b872b59bd9 | |
|
|
10e2357cc5 | |
|
|
136ef9696d | |
|
|
5f9cece2da | |
|
|
bc9ea48779 | |
|
|
1f740f622c | |
|
|
b5bd9ebc63 | |
|
|
ded448dfd0 | |
|
|
a2308aea8b | |
|
|
bf8fd7ed90 | |
|
|
02859a37c8 | |
|
|
e336e2ad08 | |
|
|
ea095543b3 | |
|
|
13f7ba81ff | |
|
|
7214584723 | |
|
|
487c7d63e1 | |
|
|
6dfbdd3735 | |
|
|
d0f1caf5b8 | |
|
|
bd7b3e0c52 |
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]<Enter comprehensive title>"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
<!--
|
||||
Please, before you create a new bug report, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
-->
|
||||
**Printer type** - [e.g. MK3S, MK3, MK2.5S, MK2.5, MK2S, MK2]
|
||||
**Printer firmware version** - [e.g. 3.8.1, 3.8.1-RC1, ...]
|
||||
|
||||
**MMU upgrade** - [e.g. MMU2S, MMU2, MMU1]
|
||||
**MMU upgrade firmware version** - [e.g. 1.0.6, 1.0.6-RC2, ...]
|
||||
|
||||
**SD card or USB/Octoprint**
|
||||
Please let us know if you print via SD card or USB/Octoprint
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Please describe steps to reproduce the behavior.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**G-code**
|
||||
Please attach a G-code. This will make it easier for us to replicate the error.
|
||||
|
||||
**Video**
|
||||
Please attach a video. It usually helps to solve the problem.
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
name: Bug report
|
||||
description: File a bug report
|
||||
title: '[BUG] '
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before you create a new bug report, please check if an issue with it already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment.
|
||||
- type: dropdown
|
||||
id: printer_model
|
||||
attributes:
|
||||
label: Printer model
|
||||
description: Enter the printer model(s) where you encountered the issue
|
||||
options:
|
||||
- MK3S/+
|
||||
- MK3
|
||||
- MK2.5S
|
||||
- MK2.5
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: mmu_model
|
||||
attributes:
|
||||
label: MMU model
|
||||
description: Enter the MMU model(s) where you encountered the issue
|
||||
multiple: false
|
||||
options:
|
||||
- No-MMU
|
||||
- MMU3
|
||||
- MMU2S
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: firmware_version
|
||||
attributes:
|
||||
label: Firmware versions
|
||||
description: |
|
||||
If you're using a custom firmware (not downloaded from Prusa), please note that!
|
||||
placeholder: '3.14.0, 3.12.0-RC1, 3.14.0 and 3.0.2...'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: optional_upgrades
|
||||
attributes:
|
||||
label: Upgrades and modifications
|
||||
description: 'If your printer has upgrades or was modified, please note that! If not, please write None or leave blank.'
|
||||
placeholder: |
|
||||
None, custom extruder/hotend (which), different frame, ...
|
||||
- type: dropdown
|
||||
id: printing_from
|
||||
attributes:
|
||||
label: Printing from...
|
||||
multiple: false
|
||||
options:
|
||||
- SD Card
|
||||
- PrusaLink
|
||||
- PrusaConnect
|
||||
- OctoPrint
|
||||
- Other host software
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: Write a concise description of the bug.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: How to reproduce
|
||||
description: |
|
||||
If you are able to reproduce the issue - meaning that you can trigger it yourself by following certain steps - please describe the step-by-step process in as much detail as possible!
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: |
|
||||
If the printer did something unexpected, or if the procedure is missing a step that would resolve the issue, please provide a step-by-step process of how it should behave.
|
||||
- type: textarea
|
||||
id: files
|
||||
attributes:
|
||||
label: Files
|
||||
description: |
|
||||
Provide at least one of these (ideally as many as you can) to help developers track down the bug.
|
||||
*To upload files, compress them into a .zip file and drag them to the text area to upload.* Images and videos can be uploaded directly.
|
||||
|
||||
- **gcode** file
|
||||
- **3mf project** which includes the model and printer settings
|
||||
- **video** or **photos** of the issue happening
|
||||
|
||||
**Crash dump: Do not share the file publicly**, as the crash dump contains a raw snapshot of the printer's memory and may include unencrypted sensitive information.
|
||||
Please send the crash dump file to Prusa by emailing it to reports@prusa3d.com and referencing this issue. In reply to the email, you will be automatically assigned a reference code to be mentioned in the issue. Sharing this file is important and helps us investigate the bug.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
name: Community
|
||||
about: Related to "Community made" features
|
||||
title: "[Community made] <Enter comprehensive title>"
|
||||
labels: community_made
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Prusa Research will NOT follow up these issues!
|
||||
The maintainers of the "Community made" feature should/will react.
|
||||
|
||||
Please, before you create a new "Community made" ticket, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
|
||||
**Which Community made feature do you want to address?**
|
||||
|
||||
**What is your request/question/suggestion?**
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
name: Community
|
||||
description: Related to "Community made" features
|
||||
title: '[Community made] '
|
||||
labels:
|
||||
- community_made
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Prusa Research will NOT follow up these issues!
|
||||
The maintainers of the "Community made" feature should/will react.
|
||||
|
||||
Please, before you create a new "Community made" ticket, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
- type: textarea
|
||||
id: which_community
|
||||
attributes:
|
||||
label: Which Community made feature do you want to address?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: What_about_community
|
||||
attributes:
|
||||
label: What is your request/question/suggestion?
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
contact_links:
|
||||
- name: Do you need Support?
|
||||
url: https://help.prusa3d.com/article/customer-support_2287
|
||||
about: If you are not sure whether what you are reporting is a bug, please contact our support team first. We are providing full 24/7 customer support.
|
||||
- name: Knowledge Base
|
||||
url: https://help.prusa3d.com/
|
||||
about: We have a comprehensive help documentation that could be helpful for troubleshooting.
|
||||
- name: Prusa Forum
|
||||
url: https://forum.prusa3d.com/
|
||||
about: Please get in touch on our Prusa Forum! (Not an official support channel)
|
||||
blank_issues_enabled: false
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: Enhancement
|
||||
about: Suggest an idea for this project
|
||||
title: " [ENHANCEMENT]<Enter comprehensive title>"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please, before you create a new feature request, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
|
||||
Enter what type of printer or upgrade the enhancement applies to.
|
||||
**Printer type** - [e.g. MK3S, MK3, MK2.5S, MK2.5, MK2S, MK2]
|
||||
**MMU Upgrade** - [e.g. MMU2S, MMU2, MMU1]
|
||||
|
||||
**Is your enhancement related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
name: Enhancement
|
||||
description: Suggest an improvement of the existing functionality
|
||||
title: '[ENHANCEMENT] '
|
||||
labels:
|
||||
- enhancement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before you create a new enhancement, please check if an issue with it already exists (either open or closed) by using the search bar on the issues page.
|
||||
- type: checkboxes
|
||||
id: printer_model
|
||||
attributes:
|
||||
label: Printer model
|
||||
description: Select the printer model(s) where you would like this enhancement
|
||||
options:
|
||||
- label: MK3S/+
|
||||
- label: MK3
|
||||
- label: MK2.5S
|
||||
- label: MK2.5
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the enhancement
|
||||
description: How would this enhancement improve your experience? Do you have a specific use case where this enhancemnet is especially needed?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected_functionality
|
||||
attributes:
|
||||
label: Expected functionality
|
||||
description: |
|
||||
Describe the way the enhancement would change existing functionality. You can also describe it in a step-by-step basis if applicable.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[FEATURE REQUEST]<Enter comprehensive title>"
|
||||
labels: feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please, before you create a new feature request, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
|
||||
If it makes sense, enter what type of printer or upgrade the feature request applies to.
|
||||
**Printer type** - [e.g. MK3S, MK3, MK2.5S, MK2.5, MK2S, MK2]
|
||||
**MMU Upgrade** - [e.g. MMU2S, MMU2, MMU1]
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
name: Feature request
|
||||
description: Suggest new functionality
|
||||
title: '[FEATURE REQUEST] '
|
||||
labels:
|
||||
- feature request
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before you create a new feature request, please check if an issue with it already exists (either open or closed) by using the search bar on the issues page.
|
||||
- type: checkboxes
|
||||
id: printer_model
|
||||
attributes:
|
||||
label: Printer model
|
||||
description: Select the printer model(s) where you would like this feature
|
||||
options:
|
||||
- label: MK3S/+
|
||||
- label: MK3
|
||||
- label: MK2.5S
|
||||
- label: MK2.5
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the feature
|
||||
description: How would this feature improve the printer? Are there specific use cases where this would be beneficial? Describe how you would use it.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected_functionality
|
||||
attributes:
|
||||
label: Expected functionality
|
||||
description: |
|
||||
Describe the way the feature would work. You can also describe it in a step-by-step basis if applicable.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
name: Question
|
||||
about: What do you want to know?
|
||||
title: "[QUESTION]<Enter comprehensive title>"
|
||||
labels: question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please, before you create a new question, please make sure you searched in open and closed issues and couldn't find anything that matches.
|
||||
|
||||
**What is your question?**
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
name: Question
|
||||
description: Ask a firmware specific question
|
||||
title: '[QUESTION] '
|
||||
labels:
|
||||
- question
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before you create a new question, please check if an issue with it already exists (either open or closed) by using the search bar on the issues page.
|
||||
- type: textarea
|
||||
id: question
|
||||
attributes:
|
||||
label: Question
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-G Ninja
|
||||
ninja ALL_FIRMWARE
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-G Ninja
|
||||
|
||||
# ignore all failures in order to show as much output as possible
|
||||
ninja -k0 check_lang || true
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja
|
||||
ninja tests
|
||||
ctest
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
cp Firmware/variants/1_75mm_MK3S-EINSy10a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK3S-EINSy10a-E3Dv6full variant failed" && false; }
|
||||
bash -x build.sh EN_FARM || { echo "1_75mm_MK3S-EINSy10a-E3Dv6full EN_FARM failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
cp Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK3-EINSy10a-E3Dv6full variant failed" && false; }
|
||||
bash -x build.sh EN_FARM || { echo "1_75mm_MK3-EINSy10a-E3Dv6full EN_FARM failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
cp Firmware/variants/1_75mm_MK25S-RAMBo13a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK25S-RAMBo13a-E3Dv6full variant failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
cp Firmware/variants/1_75mm_MK25S-RAMBo10a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK25S-RAMBo10a-E3Dv6full variant failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
cp Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK25-RAMBo13a-E3Dv6full variant failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
cp Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK25-RAMBo10a-E3Dv6full variant failed" && false; }
|
||||
cp Firmware/variants/1_75mm_MK3S-EINSy10a-E3DREVO.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK3S-EINSy10a-E3DREVO variant failed" && false; }
|
||||
cp Firmware/variants/1_75mm_MK3-EINSy10a-E3DREVO.h Firmware/Configuration_prusa.h
|
||||
bash -x build.sh || { echo "1_75mm_MK3-EINSy10a-E3DREVO variant failed" && false; }
|
||||
rm Firmware/Configuration_prusa.h
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
name: ci-build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
branches: [ MK3, MK3_* ]
|
||||
tags:
|
||||
- 'v*'
|
||||
- 't*'
|
||||
- 'c*'
|
||||
|
||||
env:
|
||||
GH_ANNOTATIONS: 1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
# setup base required dependencies
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install cmake ninja-build python3-pyelftools python3-regex python3-polib
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout ${{ github.event.pull_request.head.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout ${{ github.event.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ !github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.ref }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
id: cache-pkgs
|
||||
with:
|
||||
path: ".dependencies"
|
||||
key: "build-deps-1_0_0-linux"
|
||||
|
||||
- name: Setup build dependencies
|
||||
run: |
|
||||
./utils/bootstrap.py
|
||||
|
||||
- name: Cache permissions
|
||||
run: sudo chmod -R 744 .dependencies
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ !github.event.pull_request }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Firmware
|
||||
path: build/*.hex
|
||||
|
||||
- name: RELEASE THE KRAKEN
|
||||
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/t') || startsWith(github.ref, 'refs/tags/c')
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: ${{ github.ref_name }}
|
||||
draft: true
|
||||
files: |
|
||||
${{ github.workspace }}/build/release/*.hex
|
||||
${{ github.workspace }}/build/release/*.zip
|
||||
|
||||
check-lang:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# setup base required dependencies
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-11 g++11 lcov cmake ninja-build python3-pyelftools python3-regex python3-polib
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout ${{ github.event.pull_request.head.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout ${{ github.event.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ !github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.ref }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
id: cache-pkgs
|
||||
with:
|
||||
path: ".dependencies"
|
||||
key: "build-deps-1_0_0-linux"
|
||||
|
||||
- name: Setup build dependencies
|
||||
run: |
|
||||
./utils/bootstrap.py
|
||||
|
||||
- name: Cache permissions
|
||||
run: sudo chmod -R 744 .dependencies
|
||||
|
||||
- name: Run check
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja check_lang
|
||||
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# setup base required dependencies
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-11 g++11 lcov cmake ninja-build python3-pyelftools python3-regex python3-polib
|
||||
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Checkout ${{ github.event.pull_request.head.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout ${{ github.event.ref }}
|
||||
uses: actions/checkout@v4
|
||||
if: ${{ !github.event.pull_request }}
|
||||
with:
|
||||
ref: ${{ github.event.ref }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
id: cache-pkgs
|
||||
with:
|
||||
path: ".dependencies"
|
||||
key: "build-deps-1_0_0-linux"
|
||||
|
||||
- name: Setup build dependencies
|
||||
run: |
|
||||
./utils/bootstrap.py
|
||||
|
||||
- name: Cache permissions
|
||||
run: sudo chmod -R 744 .dependencies
|
||||
|
||||
- name: Run check
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja
|
||||
ninja test_run_all
|
||||
|
|
@ -23,19 +23,34 @@ avr_ram()
|
|||
avr_size "$@" | sed -ne 's/^Data: *\([0-9]\+\).*/\1/p'
|
||||
}
|
||||
|
||||
echo "This PR will consume:" > "$MESSAGE"
|
||||
cat <<EOF > "$MESSAGE"
|
||||
All values in bytes. Δ Delta to base
|
||||
|
||||
| Target| ΔFlash | ΔSRAM | Used Flash | Used SRAM | Free Flash | Free SRAM |
|
||||
| ------| ------ | ----- | -----------| --------- | ---------- | --------- |
|
||||
EOF
|
||||
|
||||
einsy_max_upload_size=$(grep "prusa_einsy_rambo.upload.maximum_size" .dependencies/prusa3dboards-*/boards.txt | cut -d "=" -f2)
|
||||
einsy_max_upload_data_size=8192
|
||||
|
||||
for TARGET in $@
|
||||
do
|
||||
base_bin=$(echo ${BASE_DIR}/build_gen/*/$TARGET)
|
||||
# strip the multilang prefix
|
||||
variant=${TARGET%_MULTILANG}
|
||||
|
||||
base_bin=$(echo ${BASE_DIR}/build_gen/$variant/${variant}_lang_base)
|
||||
base_flash=$(avr_flash "$base_bin")
|
||||
base_ram=$(avr_ram "$base_bin")
|
||||
|
||||
pr_bin=$(echo ${PR_DIR}/build_gen/*/$TARGET)
|
||||
pr_bin=$(echo ${PR_DIR}/build_gen/$variant/${variant}_lang_base)
|
||||
pr_flash=$(avr_flash "$pr_bin")
|
||||
pr_ram=$(avr_ram "$pr_bin")
|
||||
|
||||
flash_d=$(($pr_flash - $base_flash))
|
||||
ram_d=$(($pr_ram - $base_ram))
|
||||
|
||||
echo "- \`$TARGET\`: ${flash_d}b of flash, ${ram_d}b of ram" >> "$MESSAGE"
|
||||
flash_free=$(($einsy_max_upload_size - $pr_flash))
|
||||
ram_free=$(($einsy_max_upload_data_size - $pr_ram))
|
||||
|
||||
echo "| \`$TARGET\` | $flash_d | $ram_d | $pr_flash | $pr_ram | $flash_free | $ram_free |" >> "$MESSAGE"
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,50 +1,43 @@
|
|||
name: pr-size
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
branches: [ MK3, MK3_* ]
|
||||
|
||||
env:
|
||||
TARGETS: "MK3S-EINSy10a_ENGLISH MK3-EINSy10a_ENGLISH"
|
||||
TARGETS: "MK3S_MULTILANG MK3_MULTILANG"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
|
||||
# setup base required dependencies
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install cmake ninja-build python3-pyelftools python3-regex python3-polib
|
||||
|
||||
# build the PR branch
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v3
|
||||
# build the base branch
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
id: cache-pkgs
|
||||
with:
|
||||
path: ".dependencies"
|
||||
key: "build-deps-1_0_0-linux"
|
||||
|
||||
- name: Setup build dependencies
|
||||
run: |
|
||||
./utils/bootstrap.py
|
||||
|
||||
- name: Build PR
|
||||
run: |
|
||||
rm -rf build-pr
|
||||
mkdir build-pr
|
||||
cd build-pr
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja $TARGETS
|
||||
|
||||
# save pr-size for later use
|
||||
- name: Save pr-size from PR
|
||||
run: |
|
||||
cp -f ./.github/workflows/pr-size.sh build-pr
|
||||
|
||||
# build the base branch
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
clean: false
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
- name: Cache permissions
|
||||
run: sudo chmod -R 744 .dependencies
|
||||
|
||||
- name: Build base
|
||||
run: |
|
||||
|
|
@ -54,11 +47,31 @@ jobs:
|
|||
cmake .. -DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja $TARGETS
|
||||
|
||||
# save pr-size for later use
|
||||
- name: Save base data
|
||||
run: |
|
||||
cp -f ./.github/workflows/pr-size.sh build-base
|
||||
|
||||
# build the PR branch
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: false
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Build PR
|
||||
run: |
|
||||
rm -rf build-pr
|
||||
mkdir build-pr
|
||||
cd build-pr
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE="../cmake/AvrGcc.cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja $TARGETS
|
||||
|
||||
# extract/show build differences
|
||||
- name: Calculate binary changes
|
||||
run: |
|
||||
rm -rf build-changes
|
||||
./build-pr/pr-size.sh build-changes build-base build-pr $TARGETS
|
||||
./build-base/pr-size.sh build-changes build-base build-pr $TARGETS
|
||||
|
||||
- name: Add PR Comment
|
||||
uses: mshick/add-pr-comment@v2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
name: Mark stale issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 1:30 AM on MON/THU
|
||||
- cron: "30 1 * * 1,2,3,4"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Don't ever mark PRs as stale.
|
||||
days-before-pr-stale: -1
|
||||
stale-issue-message: 'Thank you for your contribution to our project. This issue has not received any updates for 60 days and may be considered "stale." If this issue is still important to you, please add an update within the next 7 days to keep it open. Administrators can manually reopen the issue if necessary.'
|
||||
close-issue-message: 'This issue has been closed due to lack of recent activity. Please consider opening a new one if needed.'
|
||||
# Don't act on things assigned to a milestone or assigned to someone.
|
||||
exempt-all-milestones: true
|
||||
exempt-all-assignees: true
|
||||
enable-statistics: true
|
||||
# Disable this and change the operations per run back to 30 when this goes live.
|
||||
debug-only: false
|
||||
operations-per-run: 200
|
||||
stale-issue-label: 'stale-issue'
|
||||
stale-pr-label: 'stale-pr'
|
||||
ascending: true
|
||||
55
.travis.yml
55
.travis.yml
|
|
@ -1,55 +0,0 @@
|
|||
dist: focal
|
||||
language: minimal
|
||||
|
||||
cache:
|
||||
directories:
|
||||
# cmake project dependencies
|
||||
- .dependencies/
|
||||
# legacy PF-build dependencies
|
||||
- ./../PF-build-env/
|
||||
|
||||
before_install:
|
||||
# Prepare the dependencies for the old build environment
|
||||
- sudo apt-get install -y python3-polib python3-pyelftools python3-regex
|
||||
|
||||
# Undo whatever *GARBAGE* travis is doing with python and restore the system version
|
||||
- mkdir -p .dependencies/python3
|
||||
- ln -sf /usr/bin/python3 .dependencies/python3/python3
|
||||
- PATH=$PWD/.dependencies/python3:$PATH
|
||||
|
||||
# Bootstrap cmake/ninja for the new build environment
|
||||
- ./utils/bootstrap.py
|
||||
- PATH=$(./utils/bootstrap.py --print-dependency-directory "cmake")/bin:$PATH
|
||||
- PATH=$(./utils/bootstrap.py --print-dependency-directory "ninja"):$PATH
|
||||
|
||||
# Arduino IDE adds a lot of noise caused by network traffic, firewall it off
|
||||
- sudo iptables -P INPUT DROP
|
||||
- sudo iptables -P FORWARD DROP
|
||||
- sudo iptables -P OUTPUT ACCEPT
|
||||
- sudo iptables -A INPUT -i lo -j ACCEPT
|
||||
- sudo iptables -A OUTPUT -o lo -j ACCEPT
|
||||
- sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# legacy build.sh environment
|
||||
- stage: legacy
|
||||
script: ./.github/travis/legacy-build.sh
|
||||
|
||||
# cmake-based build
|
||||
- stage: cmake
|
||||
script: ./.github/travis/cmake-build.sh
|
||||
|
||||
# cmake tests
|
||||
- stage: tests
|
||||
script: ./.github/travis/cmake-test.sh
|
||||
|
||||
# language checks
|
||||
- stage: lang
|
||||
script: ./.github/travis/cmake-lang.sh
|
||||
|
||||
stages:
|
||||
- cmake
|
||||
- lang
|
||||
- legacy
|
||||
- tests
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"name": "avr-gcc",
|
||||
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
||||
"cmakeSettings": {
|
||||
"CMAKE_MAKE_PROGRAM": "${workspaceFolder}/.dependencies/ninja-1.10.2/ninja",
|
||||
"CMAKE_MAKE_PROGRAM": "${workspaceFolder}/.dependencies/ninja-1.12.1/ninja",
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
253
CMakeLists.txt
253
CMakeLists.txt
|
|
@ -2,52 +2,131 @@ cmake_minimum_required(VERSION 3.19)
|
|||
include(cmake/Utilities.cmake)
|
||||
include(cmake/GetGitRevisionDescription.cmake)
|
||||
include(cmake/ReproducibleBuild.cmake)
|
||||
|
||||
set(PROJECT_VERSION_SUFFIX
|
||||
"<auto>"
|
||||
CACHE
|
||||
STRING
|
||||
"Full version suffix to be shown on the info screen in settings (e.g. full_version=4.0.3-BETA+1035.PR111.B4, suffix=-BETA+1035.PR111.B4). Defaults to '+<commit sha>.<dirty?>.<debug?>' if set to '<auto>'."
|
||||
)
|
||||
set(PROJECT_VERSION_SUFFIX_SHORT
|
||||
"<auto>"
|
||||
CACHE
|
||||
STRING
|
||||
"Short version suffix to be shown on splash screen. Defaults to '+<BUILD_NUMBER>' if set to '<auto>'."
|
||||
)
|
||||
set(BUILD_NUMBER
|
||||
""
|
||||
CACHE STRING "Build number of the firmware. Resolved automatically if not specified."
|
||||
)
|
||||
|
||||
include(cmake/ProjectVersion.cmake)
|
||||
resolve_version_variables()
|
||||
|
||||
set(PROJECT_VERSION_FLAVOUR
|
||||
""
|
||||
CACHE STRING "Firmware flavour to build - DEBUG, DEVEL, APLHA, BETA or RC"
|
||||
OPTION(ENFORCE_VERSION_MATCH "Enforce checking that configuration.h matches any parsed git tags" OFF)
|
||||
OPTION(NO_TAG_IS_FATAL "If tag parsing fails, issue a fatal error" OFF)
|
||||
|
||||
set(PROJECT_VERSION_HASH
|
||||
"<auto>"
|
||||
CACHE
|
||||
STRING
|
||||
"Version suffix to be appended to the final filename (<ver+PROJECT_VERSION_HASH>). Overrides git hash if set."
|
||||
)
|
||||
set(PROJECT_VERSION_FLAVOUR_REVISION
|
||||
""
|
||||
CACHE STRING "Firmware flavour version, e.g. 1 for RC1, etc"
|
||||
if(PROJECT_VERSION_HASH STREQUAL "<auto>")
|
||||
set(PROJECT_VERSION_HASH "${FW_COMMIT_HASH}")
|
||||
endif()
|
||||
set(PROJECT_VERSION_FULL
|
||||
"<auto>"
|
||||
CACHE
|
||||
STRING
|
||||
"Full version string to be shown on the info screen in settings. Overrides git version if set."
|
||||
)
|
||||
if(PROJECT_VERSION_FULL STREQUAL "<auto>")
|
||||
set(PROJECT_VERSION_FULL "${FW_COMMIT_DSC}")
|
||||
endif()
|
||||
set(PROJECT_REPOSITORY
|
||||
"Unknown"
|
||||
CACHE STRING "Repository string to be shown on the info screen in settings."
|
||||
)
|
||||
|
||||
if(NOT PROJECT_VERSION_FLAVOUR STREQUAL "")
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION}-${PROJECT_VERSION_FLAVOUR}")
|
||||
add_compile_definitions(FW_FLAVOR=${PROJECT_VERSION_FLAVOUR})
|
||||
if(NOT PROJECT_VERSION_FLAVOUR_REVISION STREQUAL "")
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION}${PROJECT_VERSION_FLAVOUR_REVISION}")
|
||||
add_compile_definitions(FW_FLAVERSION=${PROJECT_VERSION_FLAVOUR_REVISION})
|
||||
endif()
|
||||
set(CUSTOM_COMPILE_OPTIONS
|
||||
""
|
||||
CACHE STRING "Allows adding custom C/C++ flags"
|
||||
)
|
||||
|
||||
#set(FN_VERSION_SUFFIX "FW${PROJECT_VERSION}+${PROJECT_VERSION_HASH}")
|
||||
set(FN_VERSION_SUFFIX "FW_${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_REV}")
|
||||
if(PROJECT_VERSION_FLV AND PROJECT_VERSION_FLV_VER)
|
||||
set (FN_VERSION_SUFFIX "${FN_VERSION_SUFFIX}-${PROJECT_VERSION_FLV}${PROJECT_VERSION_FLV_VER}")
|
||||
endif()
|
||||
set(FN_VERSION_DEBUG_SUFFIX "${FN_VERSION_SUFFIX}+${PROJECT_VERSION_COMMIT}")
|
||||
|
||||
# Inform user about the resolved settings from Configuration.h
|
||||
message(STATUS "Project version (Configuration.h): ${PROJECT_VERSION}")
|
||||
#message(STATUS "Project version major............: ${PROJECT_VERSION_MAJOR}") #For debuging
|
||||
#message(STATUS "Project version minor............: ${PROJECT_VERSION_MINOR}") #For debuging
|
||||
#message(STATUS "Project version revision.........: ${PROJECT_VERSION_REV}") #For debuging
|
||||
#message(STATUS "Project version flavor...........: ${PROJECT_VERSION_FLV}") #For debuging
|
||||
#message(STATUS "Project version fla-revison......: ${PROJECT_VERSION_FLV_VER}") #For debuging
|
||||
#message(STATUS "Project version commit number....: ${PROJECT_VERSION_COMMIT}") #For debuging
|
||||
message(STATUS "Filename suffix..................: ${FN_VERSION_SUFFIX}")
|
||||
message(STATUS "Filename debug suffix ...........: ${FN_VERSION_DEBUG_SUFFIX}")
|
||||
#message(STATUS "Host OS .........................: ${CMAKE_HOST_SYSTEM_NAME}")
|
||||
# testing
|
||||
# SET(FW_COMMIT_DSC "v3.13.0-1234")
|
||||
|
||||
if(NOT "${PROJECT_VERSION_HASH}" STREQUAL "UNKNOWN" AND NOT "${FW_COMMIT_DSC}" MATCHES ".+NOTFOUND.+") # else -> no commit hash is known... likely no git.
|
||||
string(REGEX MATCH "[v|t|c]([0-9]+)\.([0-9]+)\.([0-9]+)-?(${DEV_TAG_REGEX})?([0-9]+)?-([0-9]+)" TAG_VERSION "${FW_COMMIT_DSC}")
|
||||
|
||||
if (CMAKE_MATCH_4) # Do we have a build type?
|
||||
decode_flavor_code(PROJECT_VER_TAG_FLV "${CMAKE_MATCH_4}" "${CMAKE_MATCH_5}")
|
||||
else()
|
||||
# No dev status found, it must be a final tag.
|
||||
decode_flavor_code(PROJECT_VER_TAG_FLV "RELEASED" "0")
|
||||
endif()
|
||||
|
||||
# Inform user about the resolved settings
|
||||
message(STATUS "Project version: ${PROJECT_VERSION}")
|
||||
message(
|
||||
STATUS "Project version with short suffix: ${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}"
|
||||
)
|
||||
if(ENFORCE_VERSION_MATCH)
|
||||
if(NOT ${CMAKE_MATCH_1} STREQUAL ${PROJECT_VERSION_MAJOR})
|
||||
message(FATAL_ERROR "Major version of current tag disagrees with Configuration.h ${CMAKE_MATCH_1}!=${PROJECT_VERSION_MAJOR}")
|
||||
endif()
|
||||
|
||||
set(FN_PREFIX "FW${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}")
|
||||
if(NOT ${CMAKE_MATCH_2} STREQUAL ${PROJECT_VERSION_MINOR})
|
||||
message(FATAL_ERROR "Minor version of current tag disagrees with Configuration.h ${CMAKE_MATCH_2}!=${PROJECT_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_MATCH_3} STREQUAL ${PROJECT_VERSION_REV})
|
||||
message(FATAL_ERROR "Rev version of current tag disagrees with Configuration.h ${CMAKE_MATCH_3}!=${PROJECT_VERSION_REV}")
|
||||
endif()
|
||||
|
||||
if(NOT ${PROJECT_VER_TAG_FLV} STREQUAL ${PROJECT_VERSION_TWEAK})
|
||||
message(FATAL_ERROR "Dev status of current tag disagrees with Configuration.h ${PROJECT_VER_TAG_FLV}!=${PROJECT_VERSION_TWEAK}")
|
||||
endif()
|
||||
# Note - we don't check the commit counter, that'd be too much of a headache. Maybe it
|
||||
# should be an error only on a tagged build?
|
||||
MESSAGE(STATUS "Configuration.h and tag match: OK (${PROJECT_VERSION}/${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${PROJECT_VER_TAG_FLV})")
|
||||
else()
|
||||
MESSAGE(STATUS "Configuration.h and tag (not enforced): (${PROJECT_VERSION}/${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${PROJECT_VER_TAG_FLV})")
|
||||
endif()
|
||||
|
||||
MESSAGE(STATUS "Commit Nr: Configuration.h: ${PROJECT_VERSION_COMMIT} Tag: ${CMAKE_MATCH_6}")
|
||||
MESSAGE(STATUS "These tag values will override Configuration.h")
|
||||
SET(PROJECT_VERSION ${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${PROJECT_VER_TAG_FLV})
|
||||
SET(PROJECT_VERSION_COMMIT ${CMAKE_MATCH_6})
|
||||
|
||||
git_get_repository(PROJECT_REPOSITORY)
|
||||
else(GIT_FOUND)
|
||||
if (NO_TAG_IS_FATAL)
|
||||
MESSAGE(FATAL_ERROR "Git was not found or an error occurred parsing the tag. This is a fatal error according to the settings.")
|
||||
else()
|
||||
MESSAGE(STATUS "Git was not found or an error occurred parsing the tag. Falling back to Configuration.h values (${PROJECT_VERSION}).")
|
||||
endif()
|
||||
set(FW_COMMIT_HASH ${FW_COMMIT_HASH_UNKNOWN}) # Clear it, the code expects a binary...
|
||||
set(PROJECT_VERSION_TIMESTAMP "0")
|
||||
endif()
|
||||
|
||||
if(CMAKE_MATCH_1 AND CMAKE_MATCH_2)
|
||||
set(FN_VERSION_SUFFIX "FW_${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
|
||||
endif()
|
||||
if(CMAKE_MATCH_4 AND CMAKE_MATCH_5)
|
||||
set (FN_VERSION_SUFFIX "${FN_VERSION_SUFFIX}-${CMAKE_MATCH_4}${CMAKE_MATCH_5}")
|
||||
endif()
|
||||
if(CMAKE_MATCH_6 AND PROJECT_VERSION_HASH)
|
||||
set(FN_VERSION_DEBUG_SUFFIX "${FN_VERSION_SUFFIX}+${CMAKE_MATCH_6}_${PROJECT_VERSION_HASH}")
|
||||
endif()
|
||||
# Inform user about the resolved settings from github
|
||||
message(STATUS "Project version git..............: ${PROJECT_VERSION}")
|
||||
message(STATUS "Project version git hash.........: ${PROJECT_VERSION_HASH}")
|
||||
message(STATUS "Project version git description..: ${PROJECT_VERSION_FULL}")
|
||||
#message(STATUS "Project version git major........: ${CMAKE_MATCH_1}") #For debuging
|
||||
#message(STATUS "Project version git minor........: ${CMAKE_MATCH_2}") #For debuging
|
||||
#message(STATUS "Project version git revision.....: ${CMAKE_MATCH_3}") #For debuging
|
||||
#message(STATUS "Project version git flavor.......: ${CMAKE_MATCH_4}") #For debuging
|
||||
#message(STATUS "Project version git fla-revison..: ${CMAKE_MATCH_5}") #For debuging
|
||||
#message(STATUS "Project version git commit number: ${CMAKE_MATCH_6}") #For debuging
|
||||
message(STATUS "Filename suffix .................: ${FN_VERSION_SUFFIX}")
|
||||
message(STATUS "Filename debug suffix ...........: ${FN_VERSION_DEBUG_SUFFIX}")
|
||||
|
||||
# Language configuration
|
||||
set(MAIN_LANGUAGES
|
||||
|
|
@ -67,7 +146,7 @@ set(COMMUNITY_LANGUAGES
|
|||
set(SELECTED_LANGUAGES ${MAIN_LANGUAGES} ${COMMUNITY_LANGUAGES})
|
||||
|
||||
get_dependency_directory(prusa3dboards PRUSA_BOARDS_DIR)
|
||||
project(Prusa-Firmware)
|
||||
project(Prusa-Firmware VERSION ${PROJECT_VERSION})
|
||||
add_subdirectory(lib)
|
||||
|
||||
# Get LANG_MAX_SIZE from sources
|
||||
|
|
@ -137,6 +216,7 @@ set(FW_SOURCES
|
|||
Filament_sensor.cpp
|
||||
first_lay_cal.cpp
|
||||
heatbed_pwm.cpp
|
||||
host.cpp
|
||||
la10compat.cpp
|
||||
language.c
|
||||
lcd.cpp
|
||||
|
|
@ -163,21 +243,22 @@ set(FW_SOURCES
|
|||
optiboot_xflash.cpp
|
||||
pat9125.cpp
|
||||
planner.cpp
|
||||
power_panic.cpp
|
||||
printer_state.cpp
|
||||
Prusa_farm.cpp
|
||||
qr_solve.cpp
|
||||
rbuf.c
|
||||
Sd2Card.cpp
|
||||
SdBaseFile.cpp
|
||||
SdFatUtil.cpp
|
||||
SdFile.cpp
|
||||
SdVolume.cpp
|
||||
Servo.cpp
|
||||
sm4.c
|
||||
sm4.cpp
|
||||
sound.cpp
|
||||
speed_lookuptable.cpp
|
||||
spi.c
|
||||
SpoolJoin.cpp
|
||||
stepper.cpp
|
||||
stopwatch.cpp
|
||||
strtod.c
|
||||
swi2c.c
|
||||
Tcodes.cpp
|
||||
|
|
@ -187,10 +268,9 @@ set(FW_SOURCES
|
|||
tmc2130.cpp
|
||||
tone04.c
|
||||
twi.cpp
|
||||
uart2.c
|
||||
uart2.cpp
|
||||
ultralcd.cpp
|
||||
util.cpp
|
||||
vector_3.cpp
|
||||
xflash.c
|
||||
xflash_dump.cpp
|
||||
xyzcal.cpp
|
||||
|
|
@ -228,8 +308,7 @@ list(TRANSFORM AVR_SOURCES PREPEND ${PRUSA_BOARDS_DIR}/cores/prusa_einsy_rambo/)
|
|||
# Target configuration
|
||||
#
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
# TODO: get date from the last git commit to set as epoch
|
||||
set_source_epoch(0)
|
||||
set_source_epoch(${PROJECT_VERSION_TIMESTAMP})
|
||||
|
||||
# default optimization flags
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
|
||||
|
|
@ -318,8 +397,25 @@ function(add_base_binary variant_name)
|
|||
target_link_options(
|
||||
${variant_name} PUBLIC -Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/${variant_name}.map
|
||||
)
|
||||
|
||||
target_compile_definitions(${variant_name} PRIVATE CMAKE_CONTROL)
|
||||
decode_tweak_version(PROJECT_VERSION_FLV PROJECT_VERSION_FLV_VER)
|
||||
target_compile_definitions(
|
||||
${variant_name}
|
||||
PRIVATE CMAKE_CONTROL FW_REPOSITORY="${PROJECT_REPOSITORY}"
|
||||
FW_COMMIT_HASH="${FW_COMMIT_HASH}"
|
||||
FW_COMMIT_HASH_LENGTH=${FW_COMMIT_HASH_LENGTH}
|
||||
FW_MAJOR=${PROJECT_VERSION_MAJOR}
|
||||
FW_MINOR=${PROJECT_VERSION_MINOR}
|
||||
FW_REVISION=${PROJECT_VERSION_REV}
|
||||
FW_COMMITNR=${PROJECT_VERSION_COMMIT}
|
||||
)
|
||||
if(NOT PROJECT_VERSION_FLV STREQUAL "RELEASED")
|
||||
target_compile_definitions(
|
||||
${variant_name}
|
||||
PRIVATE
|
||||
FW_FLAVERSION=${PROJECT_VERSION_FLV_VER}
|
||||
FW_FLAVOR=${PROJECT_VERSION_FLV}
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(fw_add_variant variant_name)
|
||||
|
|
@ -329,7 +425,13 @@ function(fw_add_variant variant_name)
|
|||
|
||||
# Single-language build
|
||||
set(FW_EN "${variant_name}_ENGLISH")
|
||||
set(FW_HEX ${CMAKE_BINARY_DIR}/${FN_PREFIX}-${FW_EN}.hex)
|
||||
#MK3S_MK3S+_FW_3.13.2-RC1_ENGLISH.hex
|
||||
set(hex_variant_name "${variant_name}")
|
||||
if(hex_variant_name STRGREATER_EQUAL "MK3S")
|
||||
string(REPLACE "MK3S" "MK3S_MK3S+" hex_variant_name ${hex_variant_name})
|
||||
endif()
|
||||
set(FW_HEX "${CMAKE_BINARY_DIR}/${hex_variant_name}_${FN_VERSION_SUFFIX}_ENGLISH.hex")
|
||||
#message(STATUS "Hex filename: ${FW_HEX}")
|
||||
|
||||
add_base_binary(${FW_EN})
|
||||
target_compile_definitions(${FW_EN} PUBLIC LANG_MODE=0 FW_VARIANT="${variant_header}")
|
||||
|
|
@ -377,7 +479,7 @@ function(fw_add_variant variant_name)
|
|||
add_custom_target(
|
||||
check_lang_${variant_name}_${LANG}
|
||||
COMMENT "Checking ${variant_name} language ${LANG}"
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/lang/lang-check.py --map ${LANG_MAP} ${PO_FILE}
|
||||
COMMAND "${Python3_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/lang/lang-check.py --map ${LANG_MAP} ${PO_FILE}
|
||||
DEPENDS ${LANG_MAP} ${PO_FILE}
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
|
@ -403,7 +505,15 @@ function(fw_add_variant variant_name)
|
|||
if(${HAS_XFLASH} GREATER_EQUAL 0)
|
||||
# X-Flash based build (catalogs appended to patched binary)
|
||||
set(FW_LANG_FINAL "${variant_name}_MULTILANG")
|
||||
set(LANG_HEX ${CMAKE_BINARY_DIR}/${FN_PREFIX}-${FW_LANG_FINAL}.hex)
|
||||
set(hex_variant_name "${variant_name}")
|
||||
#MK3S_MK3S+_FW_3.13.2-RC1+7651_deadbeef_MULTILANG.hex
|
||||
if(hex_variant_name STRGREATER_EQUAL "MK3S")
|
||||
string(REPLACE "MK3S" "MK3S_MK3S+" hex_variant_name ${hex_variant_name})
|
||||
endif()
|
||||
set(LANG_HEX ${CMAKE_BINARY_DIR}/${hex_variant_name}_${FN_VERSION_SUFFIX}_MULTILANG.hex)
|
||||
set(LANG_DEBUG_HEX ${CMAKE_BINARY_DIR}/${hex_variant_name}_${FN_VERSION_DEBUG_SUFFIX}_MULTILANG.hex)
|
||||
#message(STATUS "Hex filename .....: ${LANG_HEX}")
|
||||
#message(STATUS "Hex debug filename: ${LANG_DEBUG_HEX}")
|
||||
set(LANG_CATBIN ${LANG_TMP_DIR}/${variant_name}_cat.bin)
|
||||
set(LANG_CATHEX ${LANG_TMP_DIR}/${variant_name}_cat.hex)
|
||||
|
||||
|
|
@ -431,6 +541,10 @@ function(fw_add_variant variant_name)
|
|||
COMMAND ${CMAKE_COMMAND} -E cat ${FW_LANG_PATCH}.hex ${LANG_CATHEX} > ${FW_LANG_FINAL}.hex
|
||||
COMMAND ${CMAKE_COMMAND} -E create_hardlink ${FW_LANG_FINAL}.hex ${LANG_HEX}
|
||||
BYPRODUCTS ${LANG_HEX}
|
||||
COMMAND ${CMAKE_COMMAND} -E create_hardlink ${FW_LANG_FINAL}.hex ${LANG_DEBUG_HEX}
|
||||
BYPRODUCTS ${LANG_DEBUG_HEX}
|
||||
COMMAND ${CMAKE_COMMAND} -E create_hardlink ${FW_LANG_FINAL}.hex ${CMAKE_BINARY_DIR}/release/${hex_variant_name}_${FN_VERSION_SUFFIX}_MULTILANG.hex
|
||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/release/${hex_variant_name}_${FN_VERSION_SUFFIX}_MULTILANG.hex
|
||||
DEPENDS ${FW_LANG_PATCH}.hex ${LANG_CATHEX}
|
||||
COMMENT "Generating final ${FW_LANG_FINAL}.hex"
|
||||
)
|
||||
|
|
@ -441,17 +555,18 @@ function(fw_add_variant variant_name)
|
|||
set(ALL_VARIANT_HEXES "")
|
||||
# Non-xflash, e.g. MK2.5
|
||||
foreach(LANG IN LISTS SELECTED_LANGUAGES)
|
||||
set(FW_LANG_FINAL ${variant_name}-en_${LANG})
|
||||
set(LANG_HEX ${CMAKE_BINARY_DIR}/${FN_PREFIX}-${FW_LANG_FINAL}.hex)
|
||||
set(FW_LANG_FINAL ${variant_name}_en-${LANG})
|
||||
set(LANG_HEX ${CMAKE_BINARY_DIR}/${variant_name}_${FN_VERSION_SUFFIX}_en-${LANG}.hex)
|
||||
set(LANG_DEBUG_HEX ${CMAKE_BINARY_DIR}/${variant_name}_${FN_VERSION_DEBUG_SUFFIX}_en-${LANG}.hex)
|
||||
set(LANG_BIN ${LANG_TMP_DIR}/${variant_name}_${LANG}.bin)
|
||||
|
||||
# Patched binary with pre-baked secondary language
|
||||
add_custom_command(
|
||||
OUTPUT ${FW_LANG_FINAL}.bin
|
||||
COMMAND ${CMAKE_OBJCOPY} -O binary ${FW_LANG_BASE} ${FW_LANG_FINAL}.bin
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/lang/lang-patchsec.py ${FW_LANG_BASE} ${LANG_BIN}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FW_LANG_PATCH}.bin ${FW_LANG_FINAL}.bin
|
||||
COMMAND "${Python3_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/lang/lang-patchsec.py ${FW_LANG_BASE} ${LANG_BIN}
|
||||
${FW_LANG_FINAL}.bin
|
||||
DEPENDS ${FW_LANG_BASE} ${LANG_BIN}
|
||||
DEPENDS ${FW_LANG_BASE} ${FW_LANG_PATCH}.bin ${LANG_BIN}
|
||||
COMMENT "Generating ${FW_LANG_FINAL}.bin"
|
||||
)
|
||||
|
||||
|
|
@ -461,6 +576,8 @@ function(fw_add_variant variant_name)
|
|||
COMMAND ${CMAKE_OBJCOPY} -I binary -O ihex ${FW_LANG_FINAL}.bin ${FW_LANG_FINAL}.hex
|
||||
COMMAND ${CMAKE_COMMAND} -E create_hardlink ${FW_LANG_FINAL}.hex ${LANG_HEX}
|
||||
BYPRODUCTS ${LANG_HEX}
|
||||
COMMAND ${CMAKE_COMMAND} -E create_hardlink ${FW_LANG_FINAL}.hex ${LANG_DEBUG_HEX}
|
||||
BYPRODUCTS ${LANG_DEBUG_HEX}
|
||||
DEPENDS ${FW_LANG_FINAL}.bin
|
||||
COMMENT "Creating ${FW_LANG_FINAL}.hex"
|
||||
)
|
||||
|
|
@ -469,6 +586,15 @@ function(fw_add_variant variant_name)
|
|||
list(APPEND ALL_VARIANT_HEXES ${FW_LANG_FINAL})
|
||||
endforeach()
|
||||
add_custom_target("${variant_name}-All-Languages" DEPENDS ${ALL_VARIANT_HEXES})
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_custom_command(TARGET "${variant_name}-All-Languages"
|
||||
POST_BUILD
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "release"
|
||||
COMMAND ${CMAKE_COMMAND} -E tar "cfv" "release/${variant_name}_${FN_VERSION_SUFFIX}.zip" --format=zip ${variant_name}_${FN_VERSION_SUFFIX}_en*.hex
|
||||
BYPRODUCTS "${CMAKE_BINARY_DIR}/release/${variant_name}_${FN_VERSION_SUFFIX}.zip"
|
||||
)
|
||||
endif()
|
||||
add_dependencies(ALL_MULTILANG "${variant_name}-All-Languages")
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
@ -500,18 +626,29 @@ if(CMAKE_CROSSCOMPILING)
|
|||
endif()
|
||||
|
||||
message("Variant added: ${THIS_VAR}")
|
||||
string(REPLACE "-E3Dv6full" "" DIR_NAME "${THIS_VAR}")
|
||||
string(REPLACE "1_75mm_" "" DIR_NAME "${DIR_NAME}")
|
||||
|
||||
# Generate a file in a subfolder so that we can organize things a little more neatly in VS code
|
||||
set(DIR_NAME ${THIS_VAR})
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build_gen/${DIR_NAME})
|
||||
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/build_gen/${DIR_NAME}/CMakeLists.txt
|
||||
"project(${DIR_NAME})\nfw_add_variant(${THIS_VAR})"
|
||||
"project(${DIR_NAME} VERSION ${PROJECT_VERSION})\nfw_add_variant(${THIS_VAR})"
|
||||
)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/build_gen/${DIR_NAME})
|
||||
endforeach(THIS_VAR IN LISTS FW_VARIANTS)
|
||||
endif()
|
||||
|
||||
SET(REVO_FW_ZIP_NAME "E3D_REVO_FW_MK3_MK3S_MK3S+_${FN_VERSION_SUFFIX}.zip")
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_custom_command(TARGET ALL_MULTILANG
|
||||
POST_BUILD
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/release
|
||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/release/${REVO_FW_ZIP_NAME}
|
||||
COMMAND ${CMAKE_COMMAND} -E tar "cfv" "${REVO_FW_ZIP_NAME}" --format=zip *E3DREVO*.hex
|
||||
COMMAND ${CMAKE_COMMAND} -E rm *E3DREVO*.hex
|
||||
)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Tests
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# Community made
|
||||
|
||||
Community made features aren't fully supported by Prusa and the owners are responsible to maintain them.
|
||||
In case the feature isn't maintained OR causes issues Prusa will deactivate these.
|
||||
## Prusa-Firmware build
|
||||
- `PF-build.sh`
|
||||
- Maintainers: **@3d-gussner**
|
||||
|
|
@ -15,7 +16,7 @@ Help `./PF-build.sh -h`
|
|||
|
||||
# MK404 Simulator
|
||||
|
||||
## MK404-build.sh
|
||||
## MK404-build.sh
|
||||
**MK404 is a community 3d printer simulator created by @vintagepc**
|
||||
Please checkout and support his github repository [MK404](https://github.com/vintagepc/MK404) and the [MK404 Wiki](https://github.com/vintagepc/MK404/wiki)
|
||||
|
||||
|
|
@ -32,5 +33,33 @@ After compiling with `PF-build.sh` you get the option to start the `MK404` simul
|
|||
|
||||
Help `./MK404-build.sh -h`
|
||||
|
||||
## Translations
|
||||
# Translations
|
||||
- see [/lang/Community_made_translations.md](https://github.com/prusa3d/Prusa-Firmware/blob/MK3/lang/Community_made_translations.md)
|
||||
|
||||
# Arc interpolation features
|
||||
**Arc interpolation features by @FormerLurker**
|
||||
Please read more about it [here](https://github.com/prusa3d/Prusa-Firmware/pull/2657) and [here](https://github.com/FormerLurker/ArcWelderPlugin)
|
||||
|
||||
- Maintainers: **@FormerLurker**
|
||||
- Co-maintainers:
|
||||
- Contributors:
|
||||
- [X] **Active** since January 2023
|
||||
- [X] **Maintained** since May 2020
|
||||
|
||||
# MeatPack
|
||||
**MeatPack by @scottmudge**
|
||||
Please read more about it [here](https://github.com/prusa3d/Prusa-Firmware/pull/2955), [here](https://github.com/prusa3d/Prusa-Firmware/pull/4067) and [here](https://github.com/scottmudge/OctoPrint-MeatPack/)
|
||||
|
||||
- Maintainers: **@scottmudge**
|
||||
- Co-maintainers:
|
||||
- Contributors:
|
||||
- [X] **Active** since April 2023
|
||||
- [X] **Maintained** since January 2021
|
||||
|
||||
# E3D Revo
|
||||
**The E3D REVO support is a community effort thanks to these Contributors, E3D and others.**
|
||||
- Maintainers: **E3D**
|
||||
- Co-maintainers:
|
||||
- Contributors: @alexiri @kromeninja @ulab @JWvP @snafu1282 @matthiazzz @sdh2 @jdrozdz @peschkaj @MarcelTh @zuidwijk @davejhilton @WhiterRice @NightSkySK @D-an-W
|
||||
- [X] **Active** since June 2023
|
||||
- [X] **Maintained** since April 2023
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
void SendColors(byte red, byte grn, byte blu)
|
||||
{
|
||||
Wire.begin();
|
||||
Wire.begin();
|
||||
Wire.beginTransmission(0x09);
|
||||
Wire.write('o'); //to disable ongoing script, only needs to be used once
|
||||
Wire.write('n');
|
||||
|
|
|
|||
|
|
@ -5,3 +5,5 @@ const uint16_t _nPrinterType PROGMEM=PRINTER_TYPE;
|
|||
const char _sPrinterName[] PROGMEM=PRINTER_NAME;
|
||||
const uint16_t _nPrinterMmuType PROGMEM=PRINTER_MMU_TYPE;
|
||||
const char _sPrinterMmuName[] PROGMEM=PRINTER_MMU_NAME;
|
||||
|
||||
static_assert(TEMP_HYSTERESIS > 0, "TEMP_HYSTERESIS must be greater than 0");
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
#ifndef CONFIGURATION_H
|
||||
#define CONFIGURATION_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "boards.h"
|
||||
|
||||
#define STR_HELPER(x) #x
|
||||
#define STR(x) STR_HELPER(x)
|
||||
#define _CONCAT(x,y) x##y
|
||||
#define CONCAT(x,y) _CONCAT(x,y)
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
extern const uint16_t _nPrinterType;
|
||||
|
|
@ -12,54 +15,39 @@ extern const char _sPrinterName[] PROGMEM;
|
|||
extern const uint16_t _nPrinterMmuType;
|
||||
extern const char _sPrinterMmuName[] PROGMEM;
|
||||
|
||||
// Firmware version
|
||||
// Firmware version.
|
||||
// NOTE: These are ONLY used if you are not building via cmake and/or not in a git repository.
|
||||
// Otherwise the repository information takes precedence.
|
||||
#ifndef CMAKE_CONTROL
|
||||
#define FW_MAJOR 3
|
||||
#define FW_MINOR 13
|
||||
#define FW_REVISION 0
|
||||
#define FW_FLAVOR RC //uncomment if DEBUG, DEVEL, ALPHA, BETA or RC
|
||||
#define FW_MINOR 14
|
||||
#define FW_REVISION 1
|
||||
#define FW_COMMITNR 8225
|
||||
#define FW_FLAVOR RC //uncomment if DEV, ALPHA, BETA or RC
|
||||
#define FW_FLAVERSION 1 //uncomment if FW_FLAVOR is defined and versioning is needed. Limited to max 8.
|
||||
#ifndef FW_FLAVOR
|
||||
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION)
|
||||
#else
|
||||
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION) "-" STR(FW_FLAVOR) "" STR(FW_FLAVERSION)
|
||||
#endif
|
||||
|
||||
#define FW_COMMIT_NR 6853
|
||||
#ifndef FW_FLAVOR
|
||||
#define FW_TWEAK (FIRMWARE_REVISION_RELEASED)
|
||||
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION)
|
||||
#define FW_VERSION_FULL STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION) "-" STR(FW_COMMITNR)
|
||||
#else
|
||||
// Construct the TWEAK value as it is expected from the enum.
|
||||
#define FW_TWEAK (CONCAT(FIRMWARE_REVISION_,FW_FLAVOR) + FW_FLAVERSION)
|
||||
#define FW_VERSION STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION) "-" STR(FW_FLAVOR) "" STR(FW_FLAVERSION)
|
||||
#define FW_VERSION_FULL STR(FW_MAJOR) "." STR(FW_MINOR) "." STR(FW_REVISION) "-" STR(FW_FLAVOR) "" STR(FW_FLAVERSION) "+" STR(FW_COMMITNR)
|
||||
#endif
|
||||
|
||||
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
||||
// The firmware should only be checked into github with this symbol.
|
||||
#define FW_DEV_VERSION FW_VERSION_UNKNOWN
|
||||
// The full version string and repository source are set via cmake
|
||||
#ifndef CMAKE_CONTROL
|
||||
#define FW_COMMIT_HASH_LENGTH 1
|
||||
#define FW_COMMIT_HASH "0"
|
||||
#define FW_REPOSITORY "Unknown"
|
||||
#define FW_VERSION_FULL FW_VERSION "-" STR(FW_COMMIT_NR)
|
||||
#endif
|
||||
|
||||
// G-code language level
|
||||
#define GCODE_LEVEL 1
|
||||
|
||||
// Debug version has debugging enabled (the symbol DEBUG_BUILD is set).
|
||||
// The debug build may be a bit slower than the non-debug build, therefore the debug build should
|
||||
// not be shipped to a customer.
|
||||
#define FW_VERSION_DEBUG 6
|
||||
// This is a development build. A development build is either built from an unofficial git repository,
|
||||
// or from an unofficial branch, or it does not have a label set. Only the build server should set this build type.
|
||||
#define FW_VERSION_DEVEL 5
|
||||
// This is an alpha release. Only the build server should set this build type.
|
||||
#define FW_VERSION_ALPHA 4
|
||||
// This is a beta release. Only the build server should set this build type.
|
||||
#define FW_VERSION_BETA 3
|
||||
// This is a release candidate build. Only the build server should set this build type.
|
||||
#define FW_VERSION_RC 2
|
||||
// This is a final release. Only the build server should set this build type.
|
||||
#define FW_VERSION_GOLD 1
|
||||
// This is an unofficial build. The firmware should only be checked into github with this symbol,
|
||||
// the build server shall never produce builds with this build type.
|
||||
#define FW_VERSION_UNKNOWN 0
|
||||
|
||||
#if FW_DEV_VERSION == FW_VERSION_DEBUG
|
||||
#define DEBUG_BUILD
|
||||
#else
|
||||
#undef DEBUG_BUILD
|
||||
#endif
|
||||
|
||||
#ifndef SOURCE_DATE_EPOCH
|
||||
#define SOURCE_DATE_EPOCH __DATE__
|
||||
#endif
|
||||
|
|
@ -83,7 +71,7 @@ extern const char _sPrinterMmuName[] PROGMEM;
|
|||
// build by the user have been successfully uploaded into firmware.
|
||||
|
||||
#define STRING_VERSION_CONFIG_H SOURCE_DATE_EPOCH " " SOURCE_TIME_EPOCH // build date and time
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
#define STRING_CONFIG_H_AUTHOR FW_REPOSITORY // Who made the changes.
|
||||
|
||||
// SERIAL_PORT selects which serial port should be used for communication with the host.
|
||||
// This allows the connection of wireless adapters (for instance) to non-default port pins.
|
||||
|
|
@ -134,13 +122,6 @@ extern const char _sPrinterMmuName[] PROGMEM;
|
|||
#define TEMP_HYSTERESIS 5 // (degC) range of +/- temperatures considered "close" to the target one
|
||||
#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
|
||||
|
||||
|
||||
|
||||
// If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
|
||||
// average current. The value should be an integer and the heat bed will be turned on for 1 interval of
|
||||
// HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
|
||||
//#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
|
||||
|
||||
// If you want the M105 heater power reported in watts, define the BED_WATTS, and (shared for all extruders) EXTRUDER_WATTS
|
||||
//#define EXTRUDER_WATTS (12.0*12.0/6.7) // P=I^2/R
|
||||
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
|
||||
|
|
@ -160,7 +141,7 @@ extern const char _sPrinterMmuName[] PROGMEM;
|
|||
|
||||
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
|
||||
// Ultimaker
|
||||
|
||||
|
||||
|
||||
// MakerGear
|
||||
// #define DEFAULT_Kp 7.0
|
||||
|
|
@ -196,15 +177,15 @@ The issue: If a thermistor come off, it will read a lower temperature than actua
|
|||
The system will turn the heater on forever, burning up the filament and anything
|
||||
else around.
|
||||
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
After the temperature reaches the target for the first time, this feature will
|
||||
start measuring for how long the current temperature stays below the target
|
||||
minus _HYSTERESIS (set_temperature - THERMAL_RUNAWAY_PROTECTION_HYSTERESIS).
|
||||
|
||||
If it stays longer than _PERIOD, it means the thermistor temperature
|
||||
cannot catch up with the target, so something *may be* wrong. Then, to be on the
|
||||
safe side, the system will he halt.
|
||||
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
Bear in mind the count down will just start AFTER the first time the
|
||||
thermistor temperature is over the target, so you will have no problem if
|
||||
your extruder heater takes 2 minutes to hit the target on heating.
|
||||
|
||||
|
|
@ -296,131 +277,13 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
|
||||
|
||||
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
|
||||
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
|
||||
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
|
||||
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
|
||||
|
||||
#define Z_HEIGHT_HIDE_LIVE_ADJUST_MENU 2.0f
|
||||
|
||||
#define HOME_Z_SEARCH_THRESHOLD 0.15f // Threshold of the Z height in calibration
|
||||
|
||||
//============================= Bed Auto Leveling ===========================
|
||||
|
||||
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
|
||||
#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
|
||||
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
||||
// There are 2 different ways to pick the X and Y locations to probe:
|
||||
|
||||
// - "grid" mode
|
||||
// Probe every point in a rectangular grid
|
||||
// You must specify the rectangle, and the density of sample points
|
||||
// This mode is preferred because there are more measurements.
|
||||
// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
|
||||
|
||||
// - "3-point" mode
|
||||
// Probe 3 arbitrary points on the bed (that aren't colinear)
|
||||
// You must specify the X & Y coordinates of all 3 points
|
||||
|
||||
#define AUTO_BED_LEVELING_GRID
|
||||
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
|
||||
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
|
||||
// and least squares solution is calculated
|
||||
// Note: this feature occupies 10'206 byte
|
||||
#ifdef AUTO_BED_LEVELING_GRID
|
||||
|
||||
// set the rectangle in which to probe
|
||||
#define LEFT_PROBE_BED_POSITION 15
|
||||
#define RIGHT_PROBE_BED_POSITION 170
|
||||
#define BACK_PROBE_BED_POSITION 180
|
||||
#define FRONT_PROBE_BED_POSITION 20
|
||||
|
||||
// set the number of grid points per dimension
|
||||
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
||||
|
||||
#else // not AUTO_BED_LEVELING_GRID
|
||||
// with no grid, just probe 3 arbitrary points. A simple cross-product
|
||||
// is used to esimate the plane of the print bed
|
||||
|
||||
#define ABL_PROBE_PT_1_X 15
|
||||
#define ABL_PROBE_PT_1_Y 180
|
||||
#define ABL_PROBE_PT_2_X 15
|
||||
#define ABL_PROBE_PT_2_Y 20
|
||||
#define ABL_PROBE_PT_3_X 170
|
||||
#define ABL_PROBE_PT_3_Y 20
|
||||
|
||||
#endif // AUTO_BED_LEVELING_GRID
|
||||
|
||||
|
||||
// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
|
||||
// X and Y offsets must be integers
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER -25
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
|
||||
|
||||
#define Z_RAISE_BEFORE_HOMING 5 // (in mm) Raise Z before homing (G28) for Probe Clearance.
|
||||
// Be sure you have this distance over your Z_MAX_POS in case
|
||||
|
||||
#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min
|
||||
|
||||
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
|
||||
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
|
||||
|
||||
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
|
||||
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
||||
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
|
||||
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
|
||||
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
|
||||
|
||||
// #define PROBE_SERVO_DEACTIVATION_DELAY 300
|
||||
|
||||
|
||||
//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
|
||||
//it is highly recommended you let this Z_SAFE_HOMING enabled!
|
||||
|
||||
//#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
|
||||
// When defined, it will:
|
||||
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
|
||||
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
|
||||
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
|
||||
// - Block Z homing only when the probe is outside bed area.
|
||||
|
||||
#ifdef Z_SAFE_HOMING
|
||||
|
||||
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
|
||||
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef AUTO_BED_LEVELING_GRID // Check if Probe_Offset * Grid Points is greater than Probing Range
|
||||
#if X_PROBE_OFFSET_FROM_EXTRUDER < 0
|
||||
#if (-(X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
|
||||
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#endif
|
||||
#else
|
||||
#if ((X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
|
||||
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#endif
|
||||
#endif
|
||||
#if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
|
||||
#if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
|
||||
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#endif
|
||||
#else
|
||||
#if ((Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
|
||||
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // ENABLE_AUTO_BED_LEVELING
|
||||
|
||||
|
||||
// The position of the homing switches
|
||||
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
|
||||
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
|
||||
|
|
@ -438,17 +301,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
// Custom M code points
|
||||
#define CUSTOM_M_CODES
|
||||
#ifdef CUSTOM_M_CODES
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -15
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX -5
|
||||
#endif // ENABLE_AUTO_BED_LEVELING
|
||||
#endif // CUSTOM_M_CODES
|
||||
|
||||
|
||||
// Host Keepalive
|
||||
//
|
||||
// When enabled Marlin will send a busy status message to the host
|
||||
|
|
@ -472,6 +324,10 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
#define SDSUPPORT
|
||||
#define LCD_WIDTH 20
|
||||
#define LCD_HEIGHT 4
|
||||
#define LCD_BACKLIGHT_LEVEL_HIGH 130
|
||||
#define LCD_BACKLIGHT_LEVEL_LOW 50
|
||||
#define LCD_BACKLIGHT_FORCE_ON 30
|
||||
#define LCD_BACKLIGHT_TIMEOUT 15
|
||||
|
||||
|
||||
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||
|
|
@ -502,26 +358,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
|||
//define BlinkM/CyzRgb Support
|
||||
//#define BLINKM
|
||||
|
||||
/*********************************************************************\
|
||||
* R/C SERVO support
|
||||
* Sponsored by TrinityLabs, Reworked by codexmas
|
||||
**********************************************************************/
|
||||
|
||||
// Number of servos
|
||||
//
|
||||
// If you select a configuration below, this will receive a default value and does not need to be set manually
|
||||
// set it manually if you have more servos than extruders and wish to manually control some
|
||||
// leaving it undefined or defining as 0 will disable the servo subsystem
|
||||
// If unsure, leave commented / disabled
|
||||
//
|
||||
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
|
||||
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm). Used by the volumetric extrusion.
|
||||
|
||||
// Try to maintain a minimum distance from the bed even when Z is
|
||||
// unknown when doing the following operations
|
||||
#define MIN_Z_FOR_LOAD 50 // lcd filament loading or autoload
|
||||
#define MIN_Z_FOR_UNLOAD 50 // lcd filament unloading
|
||||
#define MIN_Z_FOR_LOAD 35 // lcd filament loading or autoload (values for load and unload have been unified to prevent movement between unload & load operations!)
|
||||
#define MIN_Z_FOR_UNLOAD 35 // lcd filament unloading
|
||||
#define MIN_Z_FOR_SWAP 27 // filament change (including M600)
|
||||
#define MIN_Z_FOR_PREHEAT 10 // lcd preheat
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,9 @@
|
|||
#include "Marlin.h"
|
||||
#include "planner.h"
|
||||
#include "temperature.h"
|
||||
#include "ultralcd.h"
|
||||
#include "ConfigurationStore.h"
|
||||
#include "Configuration_var.h"
|
||||
|
||||
#ifdef MESH_BED_LEVELING
|
||||
#include "mesh_bed_leveling.h"
|
||||
#endif
|
||||
|
||||
#ifdef TMC2130
|
||||
#include "tmc2130.h"
|
||||
#endif
|
||||
|
|
@ -32,17 +27,17 @@ void Config_PrintSettings(uint8_t level)
|
|||
"%SMaximum acceleration - normal (mm/s2):\n%S M201 X%lu Y%lu Z%lu E%lu\n"
|
||||
"%SMaximum acceleration - stealth (mm/s2):\n%S M201 X%lu Y%lu Z%lu E%lu\n"
|
||||
"%SAcceleration: P=print, R=retract, T=travel\n%S M204 P%.2f R%.2f T%.2f\n"
|
||||
"%SAdvanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)\n%S M205 S%.2f T%.2f B%.2f X%.2f Y%.2f Z%.2f E%.2f\n"
|
||||
"%SAdvanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (us), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)\n%S M205 S%.2f T%.2f B%lu X%.2f Y%.2f Z%.2f E%.2f\n"
|
||||
"%SHome offset (mm):\n%S M206 X%.2f Y%.2f Z%.2f\n"
|
||||
),
|
||||
echomagic, echomagic, cs.axis_steps_per_unit[X_AXIS], cs.axis_steps_per_unit[Y_AXIS], cs.axis_steps_per_unit[Z_AXIS], cs.axis_steps_per_unit[E_AXIS],
|
||||
echomagic, echomagic, cs.axis_steps_per_mm[X_AXIS], cs.axis_steps_per_mm[Y_AXIS], cs.axis_steps_per_mm[Z_AXIS], cs.axis_steps_per_mm[E_AXIS],
|
||||
echomagic, echomagic, cs.axis_ustep_resolution[X_AXIS], cs.axis_ustep_resolution[Y_AXIS], cs.axis_ustep_resolution[Z_AXIS], cs.axis_ustep_resolution[E_AXIS],
|
||||
echomagic, echomagic, cs.max_feedrate_normal[X_AXIS], cs.max_feedrate_normal[Y_AXIS], cs.max_feedrate_normal[Z_AXIS], cs.max_feedrate_normal[E_AXIS],
|
||||
echomagic, echomagic, cs.max_feedrate_silent[X_AXIS], cs.max_feedrate_silent[Y_AXIS], cs.max_feedrate_silent[Z_AXIS], cs.max_feedrate_silent[E_AXIS],
|
||||
echomagic, echomagic, cs.max_acceleration_units_per_sq_second_normal[X_AXIS], cs.max_acceleration_units_per_sq_second_normal[Y_AXIS], cs.max_acceleration_units_per_sq_second_normal[Z_AXIS], cs.max_acceleration_units_per_sq_second_normal[E_AXIS],
|
||||
echomagic, echomagic, cs.max_acceleration_units_per_sq_second_silent[X_AXIS], cs.max_acceleration_units_per_sq_second_silent[Y_AXIS], cs.max_acceleration_units_per_sq_second_silent[Z_AXIS], cs.max_acceleration_units_per_sq_second_silent[E_AXIS],
|
||||
echomagic, echomagic, cs.max_acceleration_mm_per_s2_normal[X_AXIS], cs.max_acceleration_mm_per_s2_normal[Y_AXIS], cs.max_acceleration_mm_per_s2_normal[Z_AXIS], cs.max_acceleration_mm_per_s2_normal[E_AXIS],
|
||||
echomagic, echomagic, cs.max_acceleration_mm_per_s2_silent[X_AXIS], cs.max_acceleration_mm_per_s2_silent[Y_AXIS], cs.max_acceleration_mm_per_s2_silent[Z_AXIS], cs.max_acceleration_mm_per_s2_silent[E_AXIS],
|
||||
echomagic, echomagic, cs.acceleration, cs.retract_acceleration, cs.travel_acceleration,
|
||||
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.minsegmenttime, cs.max_jerk[X_AXIS], cs.max_jerk[Y_AXIS], cs.max_jerk[Z_AXIS], cs.max_jerk[E_AXIS],
|
||||
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.min_segment_time_us, cs.max_jerk[X_AXIS], cs.max_jerk[Y_AXIS], cs.max_jerk[Z_AXIS], cs.max_jerk[E_AXIS],
|
||||
echomagic, echomagic, cs.add_homing[X_AXIS], cs.add_homing[Y_AXIS], cs.add_homing[Z_AXIS]
|
||||
#else //TMC2130
|
||||
printf_P(PSTR(
|
||||
|
|
@ -50,14 +45,14 @@ void Config_PrintSettings(uint8_t level)
|
|||
"%SMaximum feedrates (mm/s):\n%S M203 X%.2f Y%.2f Z%.2f E%.2f\n"
|
||||
"%SMaximum acceleration (mm/s2):\n%S M201 X%lu Y%lu Z%lu E%lu\n"
|
||||
"%SAcceleration: P=print, R=retract, T=travel\n%S M204 P%.2f R%.2f T%.2f\n"
|
||||
"%SAdvanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)\n%S M205 S%.2f T%.2f B%.2f X%.2f Y%.2f Z%.2f E%.2f\n"
|
||||
"%SAdvanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (us), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)\n%S M205 S%.2f T%.2f B%lu X%.2f Y%.2f Z%.2f E%.2f\n"
|
||||
"%SHome offset (mm):\n%S M206 X%.2f Y%.2f Z%.2f\n"
|
||||
),
|
||||
echomagic, echomagic, cs.axis_steps_per_unit[X_AXIS], cs.axis_steps_per_unit[Y_AXIS], cs.axis_steps_per_unit[Z_AXIS], cs.axis_steps_per_unit[E_AXIS],
|
||||
echomagic, echomagic, cs.axis_steps_per_mm[X_AXIS], cs.axis_steps_per_mm[Y_AXIS], cs.axis_steps_per_mm[Z_AXIS], cs.axis_steps_per_mm[E_AXIS],
|
||||
echomagic, echomagic, max_feedrate[X_AXIS], max_feedrate[Y_AXIS], max_feedrate[Z_AXIS], max_feedrate[E_AXIS],
|
||||
echomagic, echomagic, max_acceleration_units_per_sq_second[X_AXIS], max_acceleration_units_per_sq_second[Y_AXIS], max_acceleration_units_per_sq_second[Z_AXIS], max_acceleration_units_per_sq_second[E_AXIS],
|
||||
echomagic, echomagic, max_acceleration_mm_per_s2[X_AXIS], max_acceleration_mm_per_s2[Y_AXIS], max_acceleration_mm_per_s2[Z_AXIS], max_acceleration_mm_per_s2[E_AXIS],
|
||||
echomagic, echomagic, cs.acceleration, cs.retract_acceleration, cs.travel_acceleration,
|
||||
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.minsegmenttime, cs.max_jerk[X_AXIS], cs.max_jerk[Y_AXIS], cs.max_jerk[Z_AXIS], cs.max_jerk[E_AXIS],
|
||||
echomagic, echomagic, cs.minimumfeedrate, cs.mintravelfeedrate, cs.min_segment_time_us, cs.max_jerk[X_AXIS], cs.max_jerk[Y_AXIS], cs.max_jerk[Z_AXIS], cs.max_jerk[E_AXIS],
|
||||
echomagic, echomagic, cs.add_homing[X_AXIS], cs.add_homing[Y_AXIS], cs.add_homing[Z_AXIS]
|
||||
#endif //TMC2130
|
||||
);
|
||||
|
|
@ -108,9 +103,12 @@ void Config_PrintSettings(uint8_t level)
|
|||
printf_P(PSTR(
|
||||
"%SArc Settings: P:Max length(mm) S:Min length (mm) N:Corrections R:Min segments F:Segments/sec.\n%S M214 P%.2f S%.2f N%d R%d F%d\n"),
|
||||
echomagic, echomagic, cs.mm_per_arc_segment, cs.min_mm_per_arc_segment, cs.n_arc_correction, cs.min_arc_segments, cs.arc_segments_per_sec);
|
||||
#ifdef TEMP_MODEL
|
||||
temp_model_report_settings();
|
||||
#ifdef THERMAL_MODEL
|
||||
thermal_model_report_settings();
|
||||
#endif
|
||||
printf_P(PSTR(
|
||||
"%SStatistics:\n%S M78 S%lu T%lu\n"),
|
||||
echomagic, echomagic, eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED), eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -119,12 +117,8 @@ void Config_PrintSettings(uint8_t level)
|
|||
|
||||
static_assert (EXTRUDERS == 1, "ConfigurationStore M500_conf not implemented for more extruders, fix filament_size array size.");
|
||||
static_assert (NUM_AXIS == 4, "ConfigurationStore M500_conf not implemented for more axis."
|
||||
"Fix axis_steps_per_unit max_feedrate_normal max_acceleration_units_per_sq_second_normal max_jerk max_feedrate_silent"
|
||||
" max_acceleration_units_per_sq_second_silent array size.");
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
static_assert (false, "zprobe_zoffset was not initialized in printers in field to -(Z_PROBE_OFFSET_FROM_EXTRUDER), so it contains"
|
||||
"0.0, if this is not acceptable, increment EEPROM_VERSION to force use default_conf");
|
||||
#endif
|
||||
"Fix axis_steps_per_mm max_feedrate_normal max_acceleration_mm_per_s2_normal max_jerk max_feedrate_silent"
|
||||
" max_acceleration_mm_per_s2_silent array size.");
|
||||
|
||||
static_assert (sizeof(M500_conf) == 209, "sizeof(M500_conf) has changed, ensure that EEPROM_VERSION has been incremented, "
|
||||
"or if you added members in the end of struct, ensure that historically uninitialized values will be initialized."
|
||||
|
|
@ -186,9 +180,9 @@ static const M500_conf default_conf PROGMEM =
|
|||
void Config_StoreSettings()
|
||||
{
|
||||
strcpy_P(cs.version, default_conf.version);
|
||||
eeprom_update_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
|
||||
#ifdef TEMP_MODEL
|
||||
temp_model_save_settings();
|
||||
eeprom_update_block_notify(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
|
||||
#ifdef THERMAL_MODEL
|
||||
thermal_model_save_settings();
|
||||
#endif
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
|
|
@ -211,13 +205,17 @@ bool Config_RetrieveSettings()
|
|||
eeprom_init_default_byte(&EEPROM_M500_base->n_arc_correction, pgm_read_byte(&default_conf.n_arc_correction));
|
||||
eeprom_init_default_word(&EEPROM_M500_base->min_arc_segments, pgm_read_word(&default_conf.min_arc_segments));
|
||||
eeprom_init_default_word(&EEPROM_M500_base->arc_segments_per_sec, pgm_read_word(&default_conf.arc_segments_per_sec));
|
||||
|
||||
|
||||
// Initialize the travel_acceleration in eeprom if not already
|
||||
eeprom_init_default_float(&EEPROM_M500_base->travel_acceleration, pgm_read_float(&default_conf.travel_acceleration));
|
||||
|
||||
// Initialize the max_feedrate_silent and max_acceleration_units_per_sq_second_silent in eeprom if not already
|
||||
// Initialize the max_feedrate_silent and max_acceleration_mm_per_s2_silent in eeprom if not already
|
||||
eeprom_init_default_block(&EEPROM_M500_base->max_feedrate_silent, sizeof(EEPROM_M500_base->max_feedrate_silent), default_conf.max_feedrate_silent);
|
||||
eeprom_init_default_block(&EEPROM_M500_base->max_acceleration_units_per_sq_second_silent, sizeof(EEPROM_M500_base->max_acceleration_units_per_sq_second_silent), default_conf.max_acceleration_units_per_sq_second_silent);
|
||||
eeprom_init_default_block(&EEPROM_M500_base->max_acceleration_mm_per_s2_silent, sizeof(EEPROM_M500_base->max_acceleration_mm_per_s2_silent), default_conf.max_acceleration_mm_per_s2_silent);
|
||||
|
||||
#ifdef TMC2130
|
||||
eeprom_init_default_block(&EEPROM_M500_base->axis_ustep_resolution, sizeof(EEPROM_M500_base->axis_ustep_resolution), default_conf.axis_ustep_resolution);
|
||||
#endif // TMC2130
|
||||
|
||||
// load the CS to RAM
|
||||
eeprom_read_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
|
||||
|
|
@ -230,16 +228,11 @@ bool Config_RetrieveSettings()
|
|||
cs.max_feedrate_normal[j] = NORMAL_MAX_FEEDRATE_XY;
|
||||
if (cs.max_feedrate_silent[j] > SILENT_MAX_FEEDRATE_XY)
|
||||
cs.max_feedrate_silent[j] = SILENT_MAX_FEEDRATE_XY;
|
||||
if (cs.max_acceleration_units_per_sq_second_normal[j] > NORMAL_MAX_ACCEL_XY)
|
||||
cs.max_acceleration_units_per_sq_second_normal[j] = NORMAL_MAX_ACCEL_XY;
|
||||
if (cs.max_acceleration_units_per_sq_second_silent[j] > SILENT_MAX_ACCEL_XY)
|
||||
cs.max_acceleration_units_per_sq_second_silent[j] = SILENT_MAX_ACCEL_XY;
|
||||
if (cs.max_acceleration_mm_per_s2_normal[j] > NORMAL_MAX_ACCEL_XY)
|
||||
cs.max_acceleration_mm_per_s2_normal[j] = NORMAL_MAX_ACCEL_XY;
|
||||
if (cs.max_acceleration_mm_per_s2_silent[j] > SILENT_MAX_ACCEL_XY)
|
||||
cs.max_acceleration_mm_per_s2_silent[j] = SILENT_MAX_ACCEL_XY;
|
||||
}
|
||||
|
||||
if(cs.axis_ustep_resolution[X_AXIS] == 0xff){ cs.axis_ustep_resolution[X_AXIS] = TMC2130_USTEPS_XY; }
|
||||
if(cs.axis_ustep_resolution[Y_AXIS] == 0xff){ cs.axis_ustep_resolution[Y_AXIS] = TMC2130_USTEPS_XY; }
|
||||
if(cs.axis_ustep_resolution[Z_AXIS] == 0xff){ cs.axis_ustep_resolution[Z_AXIS] = TMC2130_USTEPS_Z; }
|
||||
if(cs.axis_ustep_resolution[E_AXIS] == 0xff){ cs.axis_ustep_resolution[E_AXIS] = TMC2130_USTEPS_E; }
|
||||
|
||||
tmc2130_set_res(X_AXIS, cs.axis_ustep_resolution[X_AXIS]);
|
||||
tmc2130_set_res(Y_AXIS, cs.axis_ustep_resolution[Y_AXIS]);
|
||||
|
|
@ -251,8 +244,8 @@ bool Config_RetrieveSettings()
|
|||
|
||||
// Call updatePID (similar to when we have processed M301)
|
||||
updatePID();
|
||||
#ifdef TEMP_MODEL
|
||||
temp_model_load_settings();
|
||||
#ifdef THERMAL_MODEL
|
||||
thermal_model_load_settings();
|
||||
#endif
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
|
|
@ -277,12 +270,12 @@ void Config_ResetDefault()
|
|||
|
||||
// steps per sq second need to be updated to agree with the units per sq second
|
||||
reset_acceleration_rates();
|
||||
|
||||
|
||||
#ifdef PIDTEMP
|
||||
updatePID();
|
||||
#endif//PIDTEMP
|
||||
#ifdef TEMP_MODEL
|
||||
temp_model_reset_settings();
|
||||
#ifdef THERMAL_MODEL
|
||||
thermal_model_reset_settings();
|
||||
#endif
|
||||
|
||||
calculate_extruder_multipliers();
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@
|
|||
typedef struct
|
||||
{
|
||||
char version[4];
|
||||
float axis_steps_per_unit[4];
|
||||
float axis_steps_per_mm[4];
|
||||
float max_feedrate_normal[4];
|
||||
unsigned long max_acceleration_units_per_sq_second_normal[4];
|
||||
uint32_t max_acceleration_mm_per_s2_normal[4];
|
||||
float acceleration; //!< Normal acceleration mm/s^2 THIS IS THE DEFAULT ACCELERATION for all moves. M204 SXXXX
|
||||
float retract_acceleration; //!< mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX
|
||||
float minimumfeedrate;
|
||||
float mintravelfeedrate;
|
||||
unsigned long minsegmenttime;
|
||||
uint32_t min_segment_time_us; //!< (µs) M205 B
|
||||
float max_jerk[4]; //!< Jerk is a maximum immediate velocity change.
|
||||
float add_homing[3];
|
||||
float zprobe_zoffset; //!< Only used with define ENABLE_AUTO_BED_LEVELING
|
||||
float zprobe_zoffset; //!< unused
|
||||
float Kp;
|
||||
float Ki;
|
||||
float Kd;
|
||||
|
|
@ -36,7 +36,7 @@ typedef struct
|
|||
bool volumetric_enabled;
|
||||
float filament_size[1]; //!< cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
|
||||
float max_feedrate_silent[4]; //!< max speeds for silent mode
|
||||
unsigned long max_acceleration_units_per_sq_second_silent[4];
|
||||
uint32_t max_acceleration_mm_per_s2_silent[4];
|
||||
unsigned char axis_ustep_resolution[4];
|
||||
float travel_acceleration; //!< travel acceleration mm/s^2
|
||||
// Arc Interpolation Settings, configurable via M214
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
/**
|
||||
* Auto-report all at once with M155 S<seconds> C[bitmask] with single timer
|
||||
*
|
||||
*
|
||||
* bit 0 = Auto-report temperatures
|
||||
* bit 1 = Auto-report fans
|
||||
* bit 2 = Auto-report position
|
||||
|
|
@ -66,6 +66,12 @@
|
|||
*/
|
||||
#define AUTO_REPORT
|
||||
|
||||
// Keepalive period which is restarted with M79
|
||||
#define M79_TIMEOUT 30 * 1000 // ms
|
||||
|
||||
// A timer which is restarted everytime a G-command is added to the command queue.
|
||||
#define USB_TIMER_TIMEOUT 10 * 1000 // ms
|
||||
|
||||
//===========================================================================
|
||||
//=============================Mechanical Settings===========================
|
||||
//===========================================================================
|
||||
|
|
@ -119,34 +125,6 @@
|
|||
#endif //End auto min/max positions
|
||||
//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
|
||||
|
||||
|
||||
// A single Z stepper driver is usually used to drive 2 stepper motors.
|
||||
// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
|
||||
// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
|
||||
// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
|
||||
// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
|
||||
//#define Z_DUAL_STEPPER_DRIVERS
|
||||
|
||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||
#undef EXTRUDERS
|
||||
#define EXTRUDERS 1
|
||||
#endif
|
||||
|
||||
// Same again but for Y Axis.
|
||||
//#define Y_DUAL_STEPPER_DRIVERS
|
||||
|
||||
// Define if the two Y drives need to rotate in opposite directions
|
||||
#define INVERT_Y2_VS_Y_DIR 1
|
||||
|
||||
#ifdef Y_DUAL_STEPPER_DRIVERS
|
||||
#undef EXTRUDERS
|
||||
#define EXTRUDERS 1
|
||||
#endif
|
||||
|
||||
#if defined (Z_DUAL_STEPPER_DRIVERS) && defined (Y_DUAL_STEPPER_DRIVERS)
|
||||
#error "You cannot have dual drivers for both Y and Z"
|
||||
#endif
|
||||
|
||||
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
|
||||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
|
|
@ -223,7 +201,7 @@
|
|||
* limit is exceeded.
|
||||
*/
|
||||
#define SDCARD_SORT_ALPHA //Alphabetical sorting of SD files menu
|
||||
|
||||
|
||||
// SD Card Sorting options
|
||||
#ifdef SDCARD_SORT_ALPHA
|
||||
#define SD_SORT_TIME 0
|
||||
|
|
@ -232,11 +210,11 @@
|
|||
#define INSERTSORT
|
||||
// #define SORTING_DUMP
|
||||
// #define SORTING_SPEEDTEST
|
||||
|
||||
|
||||
#define SDSORT_LIMIT 100 // Maximum number of sorted items (10-256).
|
||||
#define FOLDER_SORTING -1 // -1=above 0=none 1=below
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SDCARD_SORT_ALPHA)
|
||||
#define HAS_FOLDER_SORTING (FOLDER_SORTING)
|
||||
#endif
|
||||
|
|
@ -386,7 +364,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
|||
|
||||
/**
|
||||
* Enable M120/M121 G-code commands
|
||||
*
|
||||
*
|
||||
*/
|
||||
//#define M120_M121_ENABLED //Be careful enabling and using these G-code commands.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "Configuration.h"
|
||||
#include "language.h"
|
||||
#include "cmdqueue.h"
|
||||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
|
|
@ -119,7 +120,7 @@ void write_mem(uint16_t address, uint16_t count, const uint8_t* data, const dcod
|
|||
switch (type)
|
||||
{
|
||||
case dcode_mem_t::sram: *((uint8_t*)address) = data[i]; break;
|
||||
case dcode_mem_t::eeprom: eeprom_write_byte((uint8_t*)address, data[i]); break;
|
||||
case dcode_mem_t::eeprom: eeprom_write_byte_notify((uint8_t*)address, data[i]); break;
|
||||
case dcode_mem_t::progmem: break;
|
||||
case dcode_mem_t::xflash: break;
|
||||
}
|
||||
|
|
@ -161,19 +162,19 @@ void dcode_core(daddr_t addr_start, const daddr_t addr_end, const dcode_mem_t ty
|
|||
### D3 - Read/Write EEPROM <a href="https://reprap.org/wiki/G-code#D3:_Read.2FWrite_EEPROM">D3: Read/Write EEPROM</a>
|
||||
This command can be used without any additional parameters. It will read the entire eeprom.
|
||||
#### Usage
|
||||
|
||||
|
||||
D3 [ A | C | X ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `A` - Address (x0000-x0fff)
|
||||
- `C` - Count (1-4096)
|
||||
- `X` - Data (hex)
|
||||
|
||||
|
||||
#### Notes
|
||||
- The hex address needs to be lowercase without the 0 before the x
|
||||
- Count is decimal
|
||||
- Count is decimal
|
||||
- The hex data needs to be lowercase
|
||||
|
||||
|
||||
*/
|
||||
void dcode_3()
|
||||
{
|
||||
|
|
@ -190,21 +191,14 @@ void dcode_3()
|
|||
#include <avr/wdt.h>
|
||||
#include "bootapp.h"
|
||||
|
||||
#if 0
|
||||
extern float current_temperature_pinda;
|
||||
extern float axis_steps_per_unit[NUM_AXIS];
|
||||
|
||||
|
||||
#define LOG(args...) printf(args)
|
||||
#endif //0
|
||||
#define LOG(args...)
|
||||
|
||||
/*!
|
||||
*
|
||||
### D-1 - Endless Loop <a href="https://reprap.org/wiki/G-code#G28:_Move_to_Origin_.28Home.29">D-1: Endless Loop</a>
|
||||
|
||||
|
||||
D-1
|
||||
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode__1()
|
||||
|
|
@ -219,9 +213,9 @@ void dcode__1()
|
|||
/*!
|
||||
### D0 - Reset <a href="https://reprap.org/wiki/G-code#D0:_Reset">D0: Reset</a>
|
||||
#### Usage
|
||||
|
||||
|
||||
D0 [ B ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `B` - Bootloader
|
||||
*/
|
||||
|
|
@ -244,9 +238,9 @@ void dcode_0()
|
|||
/*!
|
||||
*
|
||||
### D1 - Clear EEPROM and RESET <a href="https://reprap.org/wiki/G-code#D1:_Clear_EEPROM_and_RESET">D1: Clear EEPROM and RESET</a>
|
||||
|
||||
|
||||
D1
|
||||
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode_1()
|
||||
|
|
@ -254,7 +248,7 @@ void dcode_1()
|
|||
LOG("D1 - Clear EEPROM and RESET\n");
|
||||
cli();
|
||||
for (int i = 0; i < 8192; i++)
|
||||
eeprom_write_byte((unsigned char*)i, (unsigned char)0xff);
|
||||
eeprom_write_byte_notify((unsigned char*)i, (unsigned char)0xff);
|
||||
softReset();
|
||||
}
|
||||
#endif
|
||||
|
|
@ -286,13 +280,13 @@ void dcode_2()
|
|||
|
||||
#ifdef DEBUG_DCODES
|
||||
/*!
|
||||
|
||||
|
||||
### D4 - Read/Write PIN <a href="https://reprap.org/wiki/G-code#D4:_Read.2FWrite_PIN">D4: Read/Write PIN</a>
|
||||
To read the digital value of a pin you need only to define the pin number.
|
||||
#### Usage
|
||||
|
||||
|
||||
D4 [ P | F | V ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `P` - Pin (0-255)
|
||||
- `F` - Function in/out (0/1)
|
||||
|
|
@ -334,20 +328,19 @@ void dcode_4()
|
|||
### D5 - Read/Write FLASH <a href="https://reprap.org/wiki/G-code#D5:_Read.2FWrite_FLASH">D5: Read/Write Flash</a>
|
||||
This command can be used without any additional parameters. It will read the 1kb FLASH.
|
||||
#### Usage
|
||||
|
||||
|
||||
D5 [ A | C | X | E ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `A` - Address (x00000-x3ffff)
|
||||
- `C` - Count (1-8192)
|
||||
- `X` - Data (hex)
|
||||
- `E` - Erase
|
||||
|
||||
|
||||
#### Notes
|
||||
- The hex address needs to be lowercase without the 0 before the x
|
||||
- Count is decimal
|
||||
- Count is decimal
|
||||
- The hex data needs to be lowercase
|
||||
|
||||
*/
|
||||
void dcode_5()
|
||||
{
|
||||
|
|
@ -456,9 +449,9 @@ void dcode_7()
|
|||
/*!
|
||||
### D8 - Read/Write PINDA <a href="https://reprap.org/wiki/G-code#D8:_Read.2FWrite_PINDA">D8: Read/Write PINDA</a>
|
||||
#### Usage
|
||||
|
||||
|
||||
D8 [ ? | ! | P | Z ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `?` - Read PINDA temperature shift values
|
||||
- `!` - Reset PINDA temperature shift values to default
|
||||
|
|
@ -478,7 +471,7 @@ void dcode_8()
|
|||
{
|
||||
uint16_t offs = 0;
|
||||
if (i > 0) offs = eeprom_read_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + (i - 1));
|
||||
float foffs = ((float)offs) / cs.axis_steps_per_unit[Z_AXIS];
|
||||
float foffs = ((float)offs) / cs.axis_steps_per_mm[Z_AXIS];
|
||||
offs = 1000 * foffs;
|
||||
printf_P(PSTR("temp_pinda=%dC temp_shift=%dum\n"), 35 + i * 5, offs);
|
||||
}
|
||||
|
|
@ -486,12 +479,12 @@ void dcode_8()
|
|||
else if (strchr_pointer[1+1] == '!')
|
||||
{
|
||||
cal_status = 1;
|
||||
eeprom_write_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, cal_status);
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 0, 8); //40C - 20um - 8usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 1, 24); //45C - 60um - 24usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 2, 48); //50C - 120um - 48usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 3, 80); //55C - 200um - 80usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 4, 120); //60C - 300um - 120usteps
|
||||
eeprom_write_byte_notify((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, cal_status);
|
||||
eeprom_write_word_notify(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 0, 8); //40C - 20um - 8usteps
|
||||
eeprom_write_word_notify(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 1, 24); //45C - 60um - 24usteps
|
||||
eeprom_write_word_notify(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 2, 48); //50C - 120um - 48usteps
|
||||
eeprom_write_word_notify(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 3, 80); //55C - 200um - 80usteps
|
||||
eeprom_write_word_notify(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 4, 120); //60C - 300um - 120usteps
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -509,11 +502,11 @@ void dcode_8()
|
|||
/*!
|
||||
### D9 - Read ADC <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9: Read ADC</a>
|
||||
#### Usage
|
||||
|
||||
|
||||
D9 [ I | V ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `I` - ADC channel index
|
||||
- `I` - ADC channel index
|
||||
- `0` - Heater 0 temperature
|
||||
- `1` - Heater 1 temperature
|
||||
- `2` - Bed temperature
|
||||
|
|
@ -617,9 +610,9 @@ void dcode_12()
|
|||
### D80 - Bed check <a href="https://reprap.org/wiki/G-code#D80:_Bed_check">D80: Bed check</a>
|
||||
This command will log data to SD card file "mesh.txt".
|
||||
#### Usage
|
||||
|
||||
|
||||
D80 [ E | F | G | H | I | J ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `E` - Dimension X (default 40)
|
||||
- `F` - Dimention Y (default 40)
|
||||
|
|
@ -657,9 +650,9 @@ void dcode_80()
|
|||
### D81 - Bed analysis <a href="https://reprap.org/wiki/G-code#D81:_Bed_analysis">D80: Bed analysis</a>
|
||||
This command will log data to SD card file "wldsd.txt".
|
||||
#### Usage
|
||||
|
||||
|
||||
D81 [ E | F | G | H | I | J ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `E` - Dimension X (default 40)
|
||||
- `F` - Dimention Y (default 40)
|
||||
|
|
@ -683,9 +676,9 @@ void dcode_81()
|
|||
if (code_seen("H")) { strchr_pointer+=1; points_y = code_value(); }
|
||||
if (code_seen("I")) { strchr_pointer+=1; offset_x = code_value(); }
|
||||
if (code_seen("J")) { strchr_pointer+=1; offset_y = code_value(); }
|
||||
|
||||
|
||||
bed_analysis(dimension_x,dimension_y,points_x,points_y,offset_x,offset_y);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif //HEATBED_ANALYSIS
|
||||
|
|
@ -712,11 +705,11 @@ extern void st_synchronize();
|
|||
/*!
|
||||
### D2130 - Trinamic stepper controller <a href="https://reprap.org/wiki/G-code#D2130:_Trinamic_stepper_controller">D2130: Trinamic stepper controller</a>
|
||||
@todo Please review by owner of the code. RepRap Wiki Gcode needs to be updated after review of owner as well.
|
||||
|
||||
|
||||
#### Usage
|
||||
|
||||
|
||||
D2130 [ Axis | Command | Subcommand | Value ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- Axis
|
||||
- `X` - X stepper driver
|
||||
|
|
@ -745,21 +738,21 @@ extern void st_synchronize();
|
|||
- `0, 180 --> 250` - Off
|
||||
- `0.9 --> 1.25` - Valid values (recommended is 1.1)
|
||||
- `@` - Home calibrate axis
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
D2130E?wave
|
||||
|
||||
|
||||
Print extruder microstep linearity compensation curve
|
||||
|
||||
|
||||
D2130E!wave0
|
||||
|
||||
|
||||
Disable extruder linearity compensation curve, (sine curve is used)
|
||||
|
||||
|
||||
D2130E!wave220
|
||||
|
||||
|
||||
(sin(x))^1.1 extruder microstep compensation curve used
|
||||
|
||||
|
||||
Notes:
|
||||
For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
|
||||
*
|
||||
|
|
@ -822,7 +815,7 @@ void dcode_2130()
|
|||
}
|
||||
else if (strcmp(strchr_pointer + 7, "wave") == 0)
|
||||
{
|
||||
tmc2130_get_wave(axis, 0, stdout);
|
||||
tmc2130_get_wave(axis, 0);
|
||||
}
|
||||
}
|
||||
else if (strchr_pointer[1+5] == '!')
|
||||
|
|
@ -843,9 +836,9 @@ void dcode_2130()
|
|||
uint16_t res_new = tmc2130_mres2usteps(mres);
|
||||
tmc2130_set_res(axis, res_new);
|
||||
if (res_new > res)
|
||||
cs.axis_steps_per_unit[axis] *= (res_new / res);
|
||||
cs.axis_steps_per_mm[axis] *= (res_new / res);
|
||||
else
|
||||
cs.axis_steps_per_unit[axis] /= (res / res_new);
|
||||
cs.axis_steps_per_mm[axis] /= (res / res_new);
|
||||
}
|
||||
}
|
||||
else if (strncmp(strchr_pointer + 7, "wave", 4) == 0)
|
||||
|
|
@ -869,9 +862,9 @@ void dcode_2130()
|
|||
/*!
|
||||
### D9125 - PAT9125 filament sensor <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9125: PAT9125 filament sensor</a>
|
||||
#### Usage
|
||||
|
||||
|
||||
D9125 [ ? | ! | R | X | Y | L ]
|
||||
|
||||
|
||||
#### Parameters
|
||||
- `?` - Print values
|
||||
- `!` - Print values
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
#include "Filament_sensor.h"
|
||||
#include "Timer.h"
|
||||
#include "eeprom.h"
|
||||
#include "language.h"
|
||||
#include "menu.h"
|
||||
#include "messages.h"
|
||||
#include "mmu2.h"
|
||||
#include "planner.h"
|
||||
#include "temperature.h"
|
||||
#include "ultralcd.h"
|
||||
|
|
@ -39,7 +42,7 @@ FSensorBlockRunout::~FSensorBlockRunout() { }
|
|||
#endif // FILAMENT_SENSOR
|
||||
|
||||
void Filament_sensor::setEnabled(bool enabled) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENSOR, enabled);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENSOR, enabled);
|
||||
if (enabled) {
|
||||
fsensor.init();
|
||||
} else {
|
||||
|
|
@ -50,21 +53,21 @@ void Filament_sensor::setEnabled(bool enabled) {
|
|||
void Filament_sensor::setAutoLoadEnabled(bool state, bool updateEEPROM) {
|
||||
autoLoadEnabled = state;
|
||||
if (updateEEPROM) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENS_AUTOLOAD_ENABLED, state);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENS_AUTOLOAD_ENABLED, state);
|
||||
}
|
||||
}
|
||||
|
||||
void Filament_sensor::setRunoutEnabled(bool state, bool updateEEPROM) {
|
||||
runoutEnabled = state;
|
||||
if (updateEEPROM) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENS_RUNOUT_ENABLED, state);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENS_RUNOUT_ENABLED, state);
|
||||
}
|
||||
}
|
||||
|
||||
void Filament_sensor::setActionOnError(SensorActionOnError state, bool updateEEPROM) {
|
||||
sensorActionOnError = state;
|
||||
if (updateEEPROM) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENSOR_ACTION_NA, (uint8_t)state);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENSOR_ACTION_NA, (uint8_t)state);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,6 +149,7 @@ void Filament_sensor::triggerFilamentRemoved() {
|
|||
|
||||
void Filament_sensor::filRunout() {
|
||||
// SERIAL_ECHOLNPGM("filRunout");
|
||||
sendHostNotification_P(MSG_FILAMENT_RUNOUT_DETECTED);
|
||||
runoutEnabled = false;
|
||||
autoLoadEnabled = false;
|
||||
stop_and_save_print_to_ram(0, 0);
|
||||
|
|
@ -286,7 +290,7 @@ const char *IR_sensor_analog::getIRVersionText() {
|
|||
void IR_sensor_analog::setSensorRevision(SensorRevision rev, bool updateEEPROM) {
|
||||
sensorRevision = rev;
|
||||
if (updateEEPROM) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENSOR_PCB, (uint8_t)rev);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENSOR_PCB, (uint8_t)rev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,22 +313,7 @@ bool IR_sensor_analog::checkVoltage(uint16_t raw) {
|
|||
puts_P(PSTR("fsensor v0.4 in fault range 4.6-5V - unconnected"));
|
||||
return false;
|
||||
}
|
||||
/// newer IR sensor cannot normally produce 0-0.3V, this is considered a failure
|
||||
#if 0 // Disabled as it has to be decided if we gonna use this or not.
|
||||
if(IRsensor_Hopen_TRESHOLD <= raw && raw <= IRsensor_VMax_TRESHOLD) {
|
||||
puts_P(PSTR("fsensor v0.4 in fault range 0.0-0.3V - wrong IR sensor"));
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// If IR sensor is "uknown state" and filament is not loaded > 1.5V return false
|
||||
#if 0
|
||||
#error "I really think this code can't be enabled anymore because we are constantly checking this voltage."
|
||||
if((sensorRevision == SensorRevision::_Undef) && (raw > IRsensor_Lmax_TRESHOLD)) {
|
||||
puts_P(PSTR("Unknown IR sensor version and no filament loaded detected."));
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
// otherwise the IR fsensor is considered working correctly
|
||||
return true;
|
||||
}
|
||||
|
|
@ -377,7 +366,7 @@ void PAT9125_sensor::init() {
|
|||
|
||||
settings_init(); // also sets the state to State::initializing
|
||||
|
||||
calcChunkSteps(cs.axis_steps_per_unit[E_AXIS]); // for jam detection
|
||||
calcChunkSteps(cs.axis_steps_per_mm[E_AXIS]); // for jam detection
|
||||
|
||||
if (!pat9125_init()) {
|
||||
deinit();
|
||||
|
|
@ -444,7 +433,7 @@ void PAT9125_sensor::setJamDetectionEnabled(bool state, bool updateEEPROM) {
|
|||
resetStepCount();
|
||||
jamErrCnt = 0;
|
||||
if (updateEEPROM) {
|
||||
eeprom_update_byte((uint8_t *)EEPROM_FSENSOR_JAM_DETECTION, state);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_FSENSOR_JAM_DETECTION, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public:
|
|||
};
|
||||
|
||||
/// Base class Filament sensor
|
||||
///
|
||||
///
|
||||
/// Ideally, there could have been a nice class hierarchy of filament sensor types with common functionality
|
||||
/// extracted into this base class.
|
||||
/// But:
|
||||
|
|
@ -37,43 +37,43 @@ public:
|
|||
ready,
|
||||
error,
|
||||
};
|
||||
|
||||
|
||||
enum class SensorActionOnError : uint8_t {
|
||||
_Continue = 0,
|
||||
_Pause = 1,
|
||||
_Undef = EEPROM_EMPTY_VALUE
|
||||
};
|
||||
|
||||
|
||||
static void setEnabled(bool enabled);
|
||||
|
||||
|
||||
void setAutoLoadEnabled(bool state, bool updateEEPROM = false);
|
||||
bool getAutoLoadEnabled() const { return autoLoadEnabled; }
|
||||
|
||||
|
||||
void setRunoutEnabled(bool state, bool updateEEPROM = false);
|
||||
bool getRunoutEnabled() const { return runoutEnabled; }
|
||||
|
||||
|
||||
void setActionOnError(SensorActionOnError state, bool updateEEPROM = false);
|
||||
SensorActionOnError getActionOnError() const { return sensorActionOnError; }
|
||||
|
||||
|
||||
bool getFilamentLoadEvent() const { return postponedLoadEvent; }
|
||||
|
||||
|
||||
bool isError() const { return state == State::error; }
|
||||
bool isReady() const { return state == State::ready; }
|
||||
bool isEnabled() const { return state != State::disabled; }
|
||||
|
||||
|
||||
protected:
|
||||
void settings_init_common();
|
||||
|
||||
|
||||
bool checkFilamentEvents();
|
||||
|
||||
|
||||
void triggerFilamentInserted();
|
||||
|
||||
|
||||
void triggerFilamentRemoved();
|
||||
|
||||
void filRunout();
|
||||
|
||||
|
||||
void triggerError();
|
||||
|
||||
|
||||
State state;
|
||||
bool autoLoadEnabled;
|
||||
bool runoutEnabled;
|
||||
|
|
@ -109,37 +109,37 @@ public:
|
|||
void init();
|
||||
bool update();
|
||||
void voltUpdate(uint16_t raw);
|
||||
|
||||
|
||||
uint16_t __attribute__((noinline)) getVoltRaw();
|
||||
|
||||
|
||||
enum class SensorRevision : uint8_t {
|
||||
_Old = 0,
|
||||
_Rev04 = 1,
|
||||
_Undef = EEPROM_EMPTY_VALUE
|
||||
};
|
||||
|
||||
|
||||
SensorRevision getSensorRevision() const { return sensorRevision; }
|
||||
|
||||
|
||||
const char* __attribute__((noinline)) getIRVersionText();
|
||||
|
||||
|
||||
void setSensorRevision(SensorRevision rev, bool updateEEPROM = false);
|
||||
|
||||
|
||||
constexpr static uint16_t IRsensor_Ldiode_TRESHOLD = Voltage2Raw(0.3F); // ~0.3V, raw value=982
|
||||
constexpr static uint16_t IRsensor_Lmax_TRESHOLD = Voltage2Raw(1.5F); // ~1.5V (0.3*Vcc), raw value=4910
|
||||
constexpr static uint16_t IRsensor_Hmin_TRESHOLD = Voltage2Raw(3.0F); // ~3.0V (0.6*Vcc), raw value=9821
|
||||
constexpr static uint16_t IRsensor_Hopen_TRESHOLD = Voltage2Raw(4.6F); // ~4.6V (N.C. @ Ru~20-50k, Rd'=56k, Ru'=10k), raw value=15059
|
||||
constexpr static uint16_t IRsensor_VMax_TRESHOLD = Voltage2Raw(5.F); // ~5V, raw value=16368
|
||||
|
||||
|
||||
private:
|
||||
SensorRevision sensorRevision;
|
||||
|
||||
|
||||
bool voltReady; // set by the adc ISR, therefore avoid accessing the variable directly but use getVoltReady()
|
||||
bool getVoltReady()const;
|
||||
void clearVoltReady();
|
||||
|
||||
|
||||
uint16_t voltRaw; // set by the adc ISR, therefore avoid accessing the variable directly but use getVoltRaw()
|
||||
bool checkVoltage(uint16_t raw);
|
||||
|
||||
|
||||
uint16_t minVolt = Voltage2Raw(6.F);
|
||||
uint16_t maxVolt = 0;
|
||||
uint16_t nFSCheckCount;
|
||||
|
|
@ -165,14 +165,14 @@ public:
|
|||
#ifdef FSENSOR_PROBING
|
||||
bool probeOtherType(); //checks if the wrong fsensor type is detected.
|
||||
#endif
|
||||
|
||||
|
||||
void setJamDetectionEnabled(bool state, bool updateEEPROM = false);
|
||||
bool getJamDetectionEnabled() const { return jamDetection; }
|
||||
|
||||
|
||||
void stStep(bool rev) { //from stepper isr
|
||||
stepCount += rev ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
void settings_init();
|
||||
private:
|
||||
static constexpr uint16_t pollingPeriod = 10; //[ms]
|
||||
|
|
@ -180,23 +180,23 @@ private:
|
|||
ShortTimer pollingTimer;
|
||||
uint8_t filter;
|
||||
uint8_t filterFilPresent;
|
||||
|
||||
|
||||
bool jamDetection;
|
||||
int16_t oldPos;
|
||||
int16_t stepCount;
|
||||
int16_t chunkSteps;
|
||||
uint8_t jamErrCnt;
|
||||
|
||||
|
||||
constexpr void calcChunkSteps(float u) {
|
||||
chunkSteps = (int16_t)(1.25 * u); //[mm]
|
||||
}
|
||||
|
||||
|
||||
int16_t getStepCount();
|
||||
|
||||
|
||||
void resetStepCount();
|
||||
|
||||
|
||||
void filJam();
|
||||
|
||||
|
||||
bool updatePAT9125();
|
||||
};
|
||||
#endif //(FILAMENT_SENSOR_TYPE == FSENSOR_PAT9125)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
{0x3E, {0x0F, 0xA8, 0xAF, 0x00, }, 'H'}, // index=0x80, utf8='🄷'
|
||||
{0x00, {0x69, 0x96, 0x00, 0x00, }, '\xdf'}, // index=0x81, utf8='°'
|
||||
{0x60, {0x25, 0x55, 0x58, 0x87, }, 'h'}, // index=0x82, utf8='🌡'
|
||||
{0x04, {0x27, 0xF2, 0xE0, 0x00, }, '^'}, // index=0x83, utf8='⬏'
|
||||
{0x34, {0x03, 0xCC, 0x19, 0x60, }, '\xf3'}, // index=0x84, utf8='🔃'
|
||||
{0x3C, {0x0E, 0xF8, 0x8F, 0x00, }, '\xdb'}, // index=0x85, utf8='🗀'
|
||||
{0x08, {0x02, 0x94, 0x92, 0x00, }, '>'}, // index=0x86, utf8='»'
|
||||
{0x1C, {0x07, 0x9A, 0x87, 0x00, }, '\xe5'}, // index=0x87, utf8='🕑'
|
||||
{0x24, {0x00, 0x85, 0x28, 0x52, }, '\x7e'}, // index=0x88, utf8='⏬'
|
||||
{0x06, {0x00, 0x1B, 0xE4, 0x00, }, '\x7e'}, // index=0x89, utf8='✔'
|
||||
{0x78, {0x12, 0x70, 0x78, 0x70, }, 'a'}, // index=0x8A, utf8='á'
|
||||
{0xF8, {0x12, 0x78, 0x8F, 0x88, }, 'A'}, // index=0x8B, utf8='Á'
|
||||
{0x78, {0x42, 0x70, 0x78, 0x70, }, 'a'}, // index=0x8C, utf8='à'
|
||||
{0x78, {0x25, 0x70, 0x78, 0x70, }, 'a'}, // index=0x8D, utf8='â'
|
||||
{0xF8, {0x50, 0x78, 0x8F, 0x88, }, '\xd1'}, // index=0x8E, utf8='Ä'
|
||||
{0xF0, {0x25, 0x27, 0x07, 0x87, }, 'a'}, // index=0x8F, utf8='å'
|
||||
{0xF0, {0x25, 0x27, 0x8F, 0x88, }, 'A'}, // index=0x90, utf8='Å'
|
||||
{0x2C, {0x0D, 0x27, 0xAA, 0x50, }, '\xd1'}, // index=0x91, utf8='æ'
|
||||
{0xBC, {0x07, 0x07, 0x87, 0x11, }, 'a'}, // index=0x92, utf8='ą'
|
||||
{0xBE, {0x78, 0x8F, 0x88, 0x11, }, 'A'}, // index=0x93, utf8='Ą'
|
||||
{0x78, {0x52, 0x70, 0x78, 0x70, }, 'a'}, // index=0x94, utf8='ă'
|
||||
{0xF8, {0x52, 0x78, 0x8F, 0x88, }, 'A'}, // index=0x95, utf8='Ă'
|
||||
{0x20, {0x12, 0x78, 0x88, 0x70, }, 'c'}, // index=0x96, utf8='ć'
|
||||
{0x20, {0x52, 0x78, 0x88, 0x70, }, 'c'}, // index=0x97, utf8='č'
|
||||
{0x48, {0x52, 0x78, 0x88, 0x87, }, 'C'}, // index=0x98, utf8='Č'
|
||||
{0x03, {0x11, 0x17, 0x99, 0x70, }, 'd'}, // index=0x99, utf8='ď'
|
||||
{0x18, {0x12, 0x78, 0xF8, 0x70, }, 'e'}, // index=0x9A, utf8='é'
|
||||
{0x44, {0x12, 0xF8, 0xF8, 0xF0, }, 'E'}, // index=0x9B, utf8='É'
|
||||
{0x18, {0x42, 0x78, 0xF8, 0x70, }, 'e'}, // index=0x9C, utf8='è'
|
||||
{0x18, {0x25, 0x78, 0xF8, 0x70, }, 'e'}, // index=0x9D, utf8='ê'
|
||||
{0x18, {0x52, 0x78, 0xF8, 0x70, }, 'e'}, // index=0x9E, utf8='ě'
|
||||
{0x18, {0x50, 0x78, 0xF8, 0x70, }, 'e'}, // index=0x9F, utf8='ë'
|
||||
{0x0C, {0x07, 0x8F, 0x87, 0x23, }, 'e'}, // index=0xA0, utf8='ę'
|
||||
{0xA2, {0x0F, 0x8F, 0x8F, 0x11, }, 'E'}, // index=0xA1, utf8='Ę'
|
||||
{0x00, {0x12, 0x06, 0x22, 0x70, }, 'i'}, // index=0xA2, utf8='í'
|
||||
{0x00, {0x12, 0x07, 0x22, 0x27, }, 'I'}, // index=0xA3, utf8='Í'
|
||||
{0x00, {0x25, 0x06, 0x22, 0x70, }, 'i'}, // index=0xA4, utf8='î'
|
||||
{0x00, {0x25, 0x07, 0x22, 0x27, }, 'I'}, // index=0xA5, utf8='Î'
|
||||
{0x00, {0x12, 0x06, 0x22, 0x27, }, 'l'}, // index=0xA6, utf8='ĺ'
|
||||
{0x02, {0x62, 0x36, 0xA2, 0x70, }, 'l'}, // index=0xA7, utf8='ł'
|
||||
{0x40, {0x45, 0x6C, 0x44, 0x70, }, 'L'}, // index=0xA8, utf8='Ł'
|
||||
{0x03, {0x62, 0x22, 0x22, 0x70, }, 'l'}, // index=0xA9, utf8='ľ'
|
||||
{0x43, {0x88, 0x88, 0x88, 0xF0, }, 'L'}, // index=0xAA, utf8='Ľ'
|
||||
{0x78, {0x12, 0xBC, 0x88, 0x80, }, 'n'}, // index=0xAB, utf8='ń'
|
||||
{0x78, {0x52, 0xBC, 0x88, 0x80, }, 'n'}, // index=0xAC, utf8='ň'
|
||||
{0x38, {0x12, 0x78, 0x88, 0x70, }, 'o'}, // index=0xAD, utf8='ó'
|
||||
{0x78, {0x12, 0x78, 0x88, 0x87, }, 'O'}, // index=0xAE, utf8='Ó'
|
||||
{0x38, {0x42, 0x78, 0x88, 0x70, }, 'o'}, // index=0xAF, utf8='ò'
|
||||
{0x38, {0x25, 0x78, 0x88, 0x70, }, 'o'}, // index=0xB0, utf8='ô'
|
||||
{0x3A, {0x00, 0x79, 0xAC, 0x78, }, 'o'}, // index=0xB1, utf8='ø'
|
||||
{0x3D, {0x07, 0x9A, 0xAC, 0x78, }, 'o'}, // index=0xB2, utf8='Ø'
|
||||
{0x78, {0x50, 0x78, 0x88, 0x87, }, '\xef'}, // index=0xB3, utf8='Ö'
|
||||
{0x39, {0x49, 0x78, 0x88, 0x70, }, 'o'}, // index=0xB4, utf8='ő'
|
||||
{0x08, {0x52, 0xBC, 0x88, 0x80, }, 'r'}, // index=0xB5, utf8='ř'
|
||||
{0x98, {0x52, 0xF8, 0x8F, 0x98, }, 'R'}, // index=0xB6, utf8='Ř'
|
||||
{0x20, {0x12, 0x78, 0x70, 0xF0, }, 's'}, // index=0xB7, utf8='ś'
|
||||
{0x48, {0x12, 0x78, 0x63, 0x87, }, 'S'}, // index=0xB8, utf8='Ś'
|
||||
{0x20, {0x52, 0x78, 0x70, 0xF0, }, 's'}, // index=0xB9, utf8='š'
|
||||
{0x48, {0x52, 0x78, 0x63, 0x87, }, 'S'}, // index=0xBA, utf8='Š'
|
||||
{0x10, {0x07, 0x87, 0x0F, 0x24, }, 's'}, // index=0xBB, utf8='ș'
|
||||
{0x12, {0x78, 0x63, 0x87, 0x24, }, 'S'}, // index=0xBC, utf8='Ș'
|
||||
{0x60, {0x69, 0x9A, 0x98, 0x8B, }, '\xe2'}, // index=0xBD, utf8='ß'
|
||||
{0x23, {0x04, 0xE4, 0x44, 0x30, }, 't'}, // index=0xBE, utf8='ť'
|
||||
{0x10, {0x4E, 0x44, 0x43, 0x24, }, 't'}, // index=0xBF, utf8='ț'
|
||||
{0x7C, {0x12, 0x88, 0x89, 0x60, }, 'u'}, // index=0xC0, utf8='ú'
|
||||
{0x3C, {0x50, 0x88, 0x88, 0x70, }, 'U'}, // index=0xC1, utf8='Ü'
|
||||
{0x78, {0x25, 0x28, 0x89, 0x60, }, 'u'}, // index=0xC2, utf8='ů'
|
||||
{0x79, {0x49, 0x08, 0x89, 0x60, }, 'u'}, // index=0xC3, utf8='ű'
|
||||
{0x3C, {0x12, 0x88, 0x70, 0x70, }, 'y'}, // index=0xC4, utf8='ý'
|
||||
{0x0C, {0x12, 0x88, 0x52, 0x22, }, 'Y'}, // index=0xC5, utf8='Ý'
|
||||
{0x44, {0x12, 0xF1, 0x24, 0xF0, }, 'z'}, // index=0xC6, utf8='ź'
|
||||
{0x44, {0x52, 0xF1, 0x24, 0xF0, }, 'z'}, // index=0xC7, utf8='ž'
|
||||
{0x8C, {0x52, 0xF0, 0x36, 0x8F, }, 'Z'}, // index=0xC8, utf8='Ž'
|
||||
{0x44, {0x20, 0xF1, 0x24, 0xF0, }, 'z'}, // index=0xC9, utf8='ż'
|
||||
|
|
@ -21,8 +21,7 @@
|
|||
#include "Configuration.h"
|
||||
#include "pins.h"
|
||||
#include "Timer.h"
|
||||
#include "mmu2.h"
|
||||
extern uint8_t mbl_z_probe_nr;
|
||||
#include "printer_state.h"
|
||||
|
||||
#ifndef AT90USB
|
||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||
|
|
@ -64,18 +63,6 @@ extern uint8_t mbl_z_probe_nr;
|
|||
#define MYSERIAL MSerial
|
||||
#endif
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern FILE _uartout;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define uartout (&_uartout)
|
||||
|
||||
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
|
||||
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
|
||||
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
|
||||
|
|
@ -134,35 +121,20 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
|||
#endif
|
||||
|
||||
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
||||
#ifdef Y_DUAL_STEPPER_DRIVERS
|
||||
#define enable_y() { WRITE(Y_ENABLE_PIN, Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, Y_ENABLE_ON); }
|
||||
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); WRITE(Y2_ENABLE_PIN, !Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
||||
#else
|
||||
#define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
|
||||
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
||||
#endif
|
||||
#define enable_y() WRITE(Y_ENABLE_PIN, Y_ENABLE_ON)
|
||||
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
||||
#else
|
||||
#define enable_y() ;
|
||||
#define disable_y() ;
|
||||
#endif
|
||||
|
||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||
#if defined(Z_AXIS_ALWAYS_ON)
|
||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||
#define poweron_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); }
|
||||
#define poweroff_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
||||
#else
|
||||
#define poweron_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
||||
#define poweroff_z() {}
|
||||
#endif
|
||||
#else
|
||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||
#define poweron_z() { WRITE(Z_ENABLE_PIN, Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN, Z_ENABLE_ON); }
|
||||
#define poweroff_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); WRITE(Z2_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
||||
#else
|
||||
#define poweron_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
||||
#define poweroff_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define poweron_z() {}
|
||||
|
|
@ -173,6 +145,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
|||
#define enable_z() poweron_z()
|
||||
#define disable_z() poweroff_z()
|
||||
#else
|
||||
extern bool bEnableForce_z; // Used by ultralcd stealth toggle
|
||||
void init_force_z();
|
||||
void check_force_z();
|
||||
void enable_force_z();
|
||||
|
|
@ -206,6 +179,7 @@ void kill(const char *full_screen_message = NULL);
|
|||
void finishAndDisableSteppers();
|
||||
|
||||
void UnconditionalStop(); // Stop heaters, motion and clear current print status
|
||||
void ConditionalStop(); // Similar to UnconditionalStop, but doesn't disable heaters
|
||||
void ThermalStop(bool allow_pause = false); // Emergency stop used by overtemp functions which allows
|
||||
// recovery (with pause=true)
|
||||
bool IsStopped(); // Returns true if the print has been stopped
|
||||
|
|
@ -235,7 +209,7 @@ enum class HeatingStatus : uint8_t
|
|||
extern HeatingStatus heating_status;
|
||||
|
||||
extern bool fans_check_enabled;
|
||||
extern float homing_feedrate[];
|
||||
constexpr float homing_feedrate[] = HOMING_FEEDRATE;
|
||||
extern uint8_t axis_relative_modes;
|
||||
extern float feedrate;
|
||||
extern int feedmultiply;
|
||||
|
|
@ -261,6 +235,7 @@ uint16_t restore_interrupted_gcode();
|
|||
float __attribute__((noinline)) get_feedrate_mm_s(const float feedrate_mm_min);
|
||||
|
||||
#ifdef TMC2130
|
||||
void check_Z_crash(void);
|
||||
void homeaxis(uint8_t axis, uint8_t cnt = 1, uint8_t* pstep = 0);
|
||||
#else
|
||||
void homeaxis(uint8_t axis, uint8_t cnt = 1);
|
||||
|
|
@ -272,19 +247,13 @@ extern float retract_length_swap;
|
|||
extern float retract_recover_length_swap;
|
||||
#endif
|
||||
|
||||
extern uint32_t starttime; // milliseconds
|
||||
extern uint32_t pause_time; // milliseconds
|
||||
extern uint32_t start_pause_print; // milliseconds
|
||||
extern ShortTimer usb_timer;
|
||||
extern bool processing_tcode;
|
||||
extern bool homing_flag;
|
||||
extern bool loading_flag;
|
||||
extern uint32_t total_filament_used; // mm/100 or 10um
|
||||
|
||||
/// @brief Save print statistics to EEPROM
|
||||
/// @param _total_filament_used has unit mm/100 or 10um
|
||||
/// @param _total_print_time has unit minutes, for example 123 minutes
|
||||
void save_statistics(uint32_t _total_filament_used, uint32_t _total_print_time);
|
||||
void save_statistics();
|
||||
|
||||
extern int fan_edge_counter[2];
|
||||
extern int fan_speed[2];
|
||||
|
|
@ -294,17 +263,19 @@ extern int fan_speed[2];
|
|||
#define active_extruder 0
|
||||
|
||||
extern bool mesh_bed_leveling_flag;
|
||||
extern bool did_pause_print;
|
||||
|
||||
// save/restore printing
|
||||
extern bool saved_printing;
|
||||
extern uint32_t saved_sdpos;
|
||||
extern uint8_t saved_printing_type;
|
||||
#define PRINTING_TYPE_SD 0
|
||||
#define PRINTING_TYPE_USB 1
|
||||
#define PRINTING_TYPE_NONE 2
|
||||
|
||||
extern float saved_extruder_temperature; //!< Active extruder temperature
|
||||
extern float saved_bed_temperature; //!< Bed temperature
|
||||
extern uint16_t saved_extruder_temperature; //!< Active extruder temperature
|
||||
extern uint8_t saved_bed_temperature; //!< Bed temperature
|
||||
extern bool saved_extruder_relative_mode;
|
||||
extern uint8_t saved_fan_speed; //!< Print fan speed, ranges from 0 to 255
|
||||
extern float saved_pos[NUM_AXIS];
|
||||
extern uint16_t saved_feedrate2;
|
||||
|
||||
//estimated time to end of the print
|
||||
extern uint8_t print_percent_done_normal;
|
||||
|
|
@ -324,8 +295,18 @@ extern LongTimer safetyTimer;
|
|||
// the print is paused, that still counts as a "running" print.
|
||||
bool printJobOngoing();
|
||||
|
||||
// Make debug_printer_states available everywhere
|
||||
#ifdef DEBUG_PRINTER_STATES
|
||||
void debug_printer_states();
|
||||
#endif //DEBUG_PRINTER_STATES
|
||||
|
||||
// Printing is paused according to SD or host indicators
|
||||
bool printingIsPaused();
|
||||
|
||||
bool printer_active();
|
||||
|
||||
bool printer_recovering();
|
||||
|
||||
//! Beware - mcode_in_progress is set as soon as the command gets really processed,
|
||||
//! which is not the same as posting the M600 command into the command queue
|
||||
//! There can be a considerable lag between posting M600 and its real processing which might result
|
||||
|
|
@ -352,7 +333,7 @@ bool babystep_allowed_strict();
|
|||
|
||||
extern void calculate_extruder_multipliers();
|
||||
|
||||
// Similar to the default Arduino delay function,
|
||||
// Similar to the default Arduino delay function,
|
||||
// but it keeps the background tasks running.
|
||||
extern void delay_keep_alive(unsigned int ms);
|
||||
|
||||
|
|
@ -368,9 +349,6 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
|
|||
void bed_check(float x_dimension, float y_dimension, int x_points_num, int y_points_num, float shift_x, float shift_y);
|
||||
#endif //HEATBED_ANALYSIS
|
||||
float temp_comp_interpolation(float temperature);
|
||||
#if 0
|
||||
void show_fw_version_warnings();
|
||||
#endif
|
||||
uint8_t check_printer_version();
|
||||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
|
|
@ -380,23 +358,33 @@ float temp_compensation_pinda_thermistor_offset(float temperature_pinda);
|
|||
void serialecho_temperatures();
|
||||
bool check_commands();
|
||||
|
||||
void uvlo_();
|
||||
void uvlo_tiny();
|
||||
void recover_print(uint8_t automatic);
|
||||
void setup_uvlo_interrupt();
|
||||
|
||||
extern bool recover_machine_state_after_power_panic();
|
||||
extern void restore_print_from_eeprom(bool mbl_was_active);
|
||||
|
||||
extern void print_world_coordinates();
|
||||
extern void print_physical_coordinates();
|
||||
extern void print_mesh_bed_leveling_table();
|
||||
|
||||
void save_print_file_state();
|
||||
void restore_print_file_state();
|
||||
void save_planner_global_state();
|
||||
void refresh_print_state_in_ram();
|
||||
|
||||
/// Updates the feedrate multiplier when a print is saved such that
|
||||
/// it is not overwritten when the print is later resumed
|
||||
void refresh_saved_feedrate_multiplier_in_ram();
|
||||
void clear_print_state_in_ram();
|
||||
extern void stop_and_save_print_to_ram(float z_move, float e_move);
|
||||
void restore_file_from_sd();
|
||||
void restore_extruder_temperature_from_ram();
|
||||
extern void restore_print_from_ram_and_continue(float e_move);
|
||||
extern void cancel_saved_printing();
|
||||
|
||||
// Define some coordinates outside the clamp limits (making them invalid past the parsing stage) so
|
||||
// that they can be used later for various logical checks
|
||||
#define X_COORD_INVALID (X_MIN_POS-1)
|
||||
#define SAVED_START_POSITION_UNSET X_COORD_INVALID
|
||||
extern float saved_start_position[NUM_AXIS];
|
||||
extern uint16_t saved_segment_idx;
|
||||
extern bool isPartialBackupAvailable;
|
||||
|
||||
|
||||
//estimated time to end of the print
|
||||
extern uint8_t calc_percent_done();
|
||||
|
|
@ -408,7 +396,7 @@ extern uint8_t calc_percent_done();
|
|||
/*enum MarlinBusyState {
|
||||
NOT_BUSY, // Not in a handler
|
||||
IN_HANDLER, // Processing a GCode
|
||||
IN_PROCESS, // Known to be blocking command input (as in G29)
|
||||
IN_PROCESS, // Known to be blocking command input
|
||||
PAUSED_FOR_USER, // Blocking pending any input
|
||||
PAUSED_FOR_INPUT // Blocking pending text input (concept)
|
||||
};*/
|
||||
|
|
@ -432,6 +420,7 @@ extern int8_t busy_state;
|
|||
#define FORCE_HIGH_POWER_END force_high_power_mode(false)
|
||||
|
||||
void force_high_power_mode(bool start_high_power_section);
|
||||
void change_power_mode_live(uint8_t mode);
|
||||
|
||||
#endif //TMC2130
|
||||
|
||||
|
|
@ -447,10 +436,10 @@ void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex);
|
|||
#define UVLO !(PINE & (1<<4))
|
||||
|
||||
|
||||
void M600_load_filament();
|
||||
void M600_load_filament_movements();
|
||||
void M600_wait_for_user(float HotendTempBckp);
|
||||
void M600_check_state(float nozzle_temp);
|
||||
void M600_load_filament(const char* filament_name);
|
||||
void M600_load_filament_movements(const char* filament_name);
|
||||
void M600_wait_for_user();
|
||||
bool M600_check_state_and_repeat(const char* filament_name);
|
||||
void load_filament_final_feed();
|
||||
void marlin_wait_for_click();
|
||||
float raise_z(float delta);
|
||||
|
|
@ -460,5 +449,4 @@ extern "C" void softReset();
|
|||
void stack_error();
|
||||
|
||||
extern uint32_t IP_address;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Modified 23 November 2006 by David A. Mellis
|
||||
Modified 28 September 2010 by Mark Sproul
|
||||
*/
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
uint8_t selectedSerialPort = 0;
|
||||
|
||||
#ifndef AT90USB
|
||||
// this next line disables the entire HardwareSerial.cpp,
|
||||
// this next line disables the entire HardwareSerial.cpp,
|
||||
// this is so I can support Attiny series and any other chip without a UART
|
||||
#if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H)
|
||||
|
||||
|
|
@ -129,8 +129,8 @@ void MarlinSerial::begin(long baud)
|
|||
sbi(M_UCSRxB, M_RXENx);
|
||||
sbi(M_UCSRxB, M_TXENx);
|
||||
sbi(M_UCSRxB, M_RXCIEx);
|
||||
|
||||
if (selectedSerialPort == 1) { //set up also the second serial port
|
||||
|
||||
if (selectedSerialPort == 1) { //set up also the second serial port
|
||||
if (useU2X) {
|
||||
UCSR1A = 1 << U2X1;
|
||||
baud_setting = (F_CPU / 4 / baud - 1) / 2;
|
||||
|
|
@ -142,7 +142,7 @@ void MarlinSerial::begin(long baud)
|
|||
// assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register)
|
||||
UBRR1H = baud_setting >> 8;
|
||||
UBRR1L = baud_setting;
|
||||
|
||||
|
||||
sbi(UCSR1B, RXEN1);
|
||||
sbi(UCSR1B, TXEN1);
|
||||
sbi(UCSR1B, RXCIE1);
|
||||
|
|
@ -250,7 +250,7 @@ void MarlinSerial::print(double n, int digits)
|
|||
void MarlinSerial::println(void)
|
||||
{
|
||||
// print('\r');
|
||||
print('\n');
|
||||
print('\n');
|
||||
}
|
||||
|
||||
/*void MarlinSerial::println(const String &s)
|
||||
|
|
@ -311,13 +311,13 @@ void MarlinSerial::println(double n, int digits)
|
|||
|
||||
void MarlinSerial::printNumber(unsigned long n, uint8_t base)
|
||||
{
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
uint8_t i = 0;
|
||||
|
||||
if (n == 0) {
|
||||
print('0');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while (n > 0) {
|
||||
buf[i++] = n % base;
|
||||
|
|
@ -330,8 +330,8 @@ void MarlinSerial::printNumber(unsigned long n, uint8_t base)
|
|||
'A' + buf[i - 1] - 10));
|
||||
}
|
||||
|
||||
void MarlinSerial::printFloat(double number, uint8_t digits)
|
||||
{
|
||||
void MarlinSerial::printFloat(double number, uint8_t digits)
|
||||
{
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
{
|
||||
|
|
@ -343,7 +343,7 @@ void MarlinSerial::printFloat(double number, uint8_t digits)
|
|||
double rounding = 0.5;
|
||||
for (uint8_t i=0; i<digits; ++i)
|
||||
rounding /= 10.0;
|
||||
|
||||
|
||||
number += rounding;
|
||||
|
||||
// Extract the integer part of the number and print it
|
||||
|
|
@ -353,7 +353,7 @@ void MarlinSerial::printFloat(double number, uint8_t digits)
|
|||
|
||||
// Print the decimal point, but only if there are digits beyond
|
||||
if (digits > 0)
|
||||
print('.');
|
||||
print('.');
|
||||
|
||||
// Extract digits from the remainder one at a time
|
||||
while (digits-- > 0)
|
||||
|
|
@ -361,8 +361,8 @@ void MarlinSerial::printFloat(double number, uint8_t digits)
|
|||
remainder *= 10.0;
|
||||
int toPrint = int(remainder);
|
||||
print(toPrint);
|
||||
remainder -= toPrint;
|
||||
}
|
||||
remainder -= toPrint;
|
||||
}
|
||||
}
|
||||
// Preinstantiate Objects //////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#define MarlinSerial_h
|
||||
#include "Marlin.h"
|
||||
|
||||
#if !defined(SERIAL_PORT)
|
||||
#if !defined(SERIAL_PORT)
|
||||
#define SERIAL_PORT 0
|
||||
#endif
|
||||
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
(SERIAL_PORT == 3 && defined(UBRR3H)))
|
||||
#define HAS_UART
|
||||
#endif
|
||||
|
||||
|
||||
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
|
||||
// requires two levels of indirection to expand macro values properly)
|
||||
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
|
||||
|
|
@ -43,15 +43,15 @@
|
|||
#define SERIAL_REGNAME(registerbase,number,suffix) _REGNAME(registerbase, number, suffix)
|
||||
#endif
|
||||
|
||||
// Registers used by MarlinSerial class (these are expanded
|
||||
// Registers used by MarlinSerial class (these are expanded
|
||||
// depending on selected serial port
|
||||
#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number
|
||||
#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B)
|
||||
#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)
|
||||
#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)
|
||||
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
|
||||
#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)
|
||||
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)
|
||||
#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B)
|
||||
#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)
|
||||
#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)
|
||||
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
|
||||
#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)
|
||||
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)
|
||||
#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
|
||||
#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L)
|
||||
#define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,)
|
||||
|
|
@ -97,7 +97,7 @@ class MarlinSerial //: public Stream
|
|||
static int peek(void);
|
||||
static int read(void);
|
||||
static void flush(void);
|
||||
|
||||
|
||||
static /*FORCE_INLINE*/ int available(void)
|
||||
{
|
||||
return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;
|
||||
|
|
@ -124,7 +124,7 @@ class MarlinSerial //: public Stream
|
|||
UDR1 = c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void checkRx(void)
|
||||
{
|
||||
if (selectedSerialPort == 0) {
|
||||
|
|
@ -177,15 +177,15 @@ class MarlinSerial //: public Stream
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
static void printNumber(unsigned long, uint8_t);
|
||||
static void printFloat(double, uint8_t);
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
static /*FORCE_INLINE*/ void write(const char *str)
|
||||
{
|
||||
while (*str)
|
||||
|
|
@ -205,7 +205,7 @@ class MarlinSerial //: public Stream
|
|||
write(s[i]);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
static FORCE_INLINE void print(const char *str)
|
||||
{
|
||||
write(str);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -7,6 +7,9 @@
|
|||
#include "util.h"
|
||||
#include "ultralcd.h"
|
||||
#include "Filament_sensor.h"
|
||||
#include "language.h"
|
||||
#include "lcd.h"
|
||||
#include "stopwatch.h"
|
||||
|
||||
#ifdef PRUSA_FARM
|
||||
uint8_t farm_mode = 0;
|
||||
|
|
@ -91,8 +94,8 @@ static void prusa_stat_printinfo() {
|
|||
SERIAL_ECHOPGM("][FNM:");
|
||||
SERIAL_ECHO(card.longFilename[0] ? card.longFilename : card.filename);
|
||||
SERIAL_ECHOPGM("][TIM:");
|
||||
if (starttime != 0) {
|
||||
SERIAL_ECHO((_millis() - starttime) / 1000);
|
||||
if (print_job_timer.isRunning()) {
|
||||
SERIAL_ECHO(print_job_timer.duration());
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO(0);
|
||||
|
|
@ -130,7 +133,7 @@ static void lcd_connect_printer() {
|
|||
|
||||
int i = 0;
|
||||
int t = 0;
|
||||
lcd_puts_at_P(0, 0, PSTR("Connect printer to"));
|
||||
lcd_puts_at_P(0, 0, PSTR("Connect printer to"));
|
||||
lcd_puts_at_P(0, 1, PSTR("monitoring or hold"));
|
||||
lcd_puts_at_P(0, 2, PSTR("the knob to continue"));
|
||||
while (no_response) {
|
||||
|
|
@ -143,7 +146,7 @@ static void lcd_connect_printer() {
|
|||
t = 0;
|
||||
}
|
||||
if (READ(BTN_ENC)) { //if button is not pressed
|
||||
i = 0;
|
||||
i = 0;
|
||||
lcd_puts_at_P(0, 3, PSTR(" "));
|
||||
}
|
||||
if (i != 0)
|
||||
|
|
@ -162,9 +165,7 @@ static void trace() {
|
|||
}
|
||||
|
||||
void serial_read_stream() {
|
||||
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
|
||||
lcd_clear();
|
||||
lcd_puts_P(PSTR(" Upload in progress"));
|
||||
|
|
@ -232,16 +233,16 @@ void prusa_statistics(uint8_t _message) {
|
|||
const uint8_t _fil_nr = 0;
|
||||
if (!farm_mode)
|
||||
return;
|
||||
|
||||
|
||||
switch (_message) {
|
||||
case 0: // default message
|
||||
if (busy_state == PAUSED_FOR_USER) {
|
||||
prusa_statistics_case0(15);
|
||||
}
|
||||
else if (isPrintPaused) {
|
||||
else if (printingIsPaused()) {
|
||||
prusa_statistics_case0(14);
|
||||
}
|
||||
else if (IS_SD_PRINTING || loading_flag) {
|
||||
else if (IS_SD_PRINTING || (eFilamentAction != FilamentAction::None)) {
|
||||
prusa_statistics_case0(4);
|
||||
}
|
||||
else {
|
||||
|
|
@ -269,7 +270,7 @@ void prusa_statistics(uint8_t _message) {
|
|||
status_number = 3;
|
||||
farm_timer = 1;
|
||||
|
||||
if (IS_SD_PRINTING || loading_flag) {
|
||||
if (IS_SD_PRINTING || (eFilamentAction != FilamentAction::None)) {
|
||||
SERIAL_ECHO('{');
|
||||
prusa_stat_printerstatus(4);
|
||||
prusa_stat_farm_number();
|
||||
|
|
@ -373,7 +374,7 @@ void prusa_statistics_update_from_status_screen() {
|
|||
switch (farm_timer) {
|
||||
case 8:
|
||||
prusa_statistics(21);
|
||||
if(loading_flag)
|
||||
if(eFilamentAction != FilamentAction::None)
|
||||
prusa_statistics(22);
|
||||
break;
|
||||
case 5:
|
||||
|
|
@ -389,7 +390,7 @@ void prusa_statistics_update_from_lcd_update() {
|
|||
}
|
||||
|
||||
void farm_mode_init() {
|
||||
farm_mode = eeprom_init_default_byte((uint8_t*)EEPROM_FARM_MODE, 0);
|
||||
farm_mode = eeprom_init_default_byte((uint8_t*)EEPROM_FARM_MODE, 0);
|
||||
if (farm_mode) {
|
||||
no_response = true; //we need confirmation by recieving PRUSA thx
|
||||
prusa_statistics(8);
|
||||
|
|
@ -403,14 +404,14 @@ void farm_mode_init() {
|
|||
fsensor.setAutoLoadEnabled(false);
|
||||
#endif //FILAMENT_SENSOR
|
||||
// ~ FanCheck -> on
|
||||
eeprom_update_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED, true);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_FAN_CHECK_ENABLED, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool farm_prusa_code_seen() {
|
||||
if (!farm_mode)
|
||||
return false;
|
||||
|
||||
|
||||
if (code_seen_P(PSTR("PRN"))) { // PRUSA PRN
|
||||
printf_P(_N("%u"), status_number);
|
||||
}
|
||||
|
|
@ -441,15 +442,15 @@ bool farm_prusa_code_seen() {
|
|||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void farm_gcode_g98() {
|
||||
farm_mode = 1;
|
||||
eeprom_update_byte((unsigned char *)EEPROM_FARM_MODE, farm_mode);
|
||||
eeprom_update_byte_notify((unsigned char *)EEPROM_FARM_MODE, farm_mode);
|
||||
SilentModeMenu = SILENT_MODE_OFF;
|
||||
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
||||
eeprom_update_byte_notify((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
||||
fCheckModeInit(); // alternatively invoke printer reset
|
||||
}
|
||||
|
||||
|
|
@ -461,7 +462,7 @@ void farm_gcode_g99() {
|
|||
|
||||
void farm_disable() {
|
||||
farm_mode = false;
|
||||
eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_FARM_MODE, farm_mode);
|
||||
}
|
||||
|
||||
#else //PRUSA_FARM
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ uint8_t Sd2Card::waitStartBlock(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Toshiba FlashAir support, copied from
|
||||
// Toshiba FlashAir support, copied from
|
||||
// https://flashair-developers.com/en/documents/tutorials/arduino/
|
||||
// However, the official website was closed in September 2019.
|
||||
// There is an archived website (written in Japanese).
|
||||
|
|
@ -783,7 +783,7 @@ uint8_t Sd2Card::readExt(uint32_t arg, uint8_t* dst, uint16_t count) {
|
|||
error(SD_CARD_ERROR_CMD48);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
// wait for start block token.
|
||||
if (!waitStartBlock()) {
|
||||
goto fail;
|
||||
|
|
@ -793,7 +793,7 @@ uint8_t Sd2Card::readExt(uint32_t arg, uint8_t* dst, uint16_t count) {
|
|||
for (i = 0; i < count; ++i) {
|
||||
dst[i] = spiRec();
|
||||
}
|
||||
|
||||
|
||||
// skip dummy bytes and 16-bit crc.
|
||||
for (; i < 514; ++i) {
|
||||
spiRec();
|
||||
|
|
@ -815,19 +815,19 @@ uint8_t Sd2Card::readExt(uint32_t arg, uint8_t* dst, uint16_t count) {
|
|||
* \return The value one, true, is returned for success and
|
||||
* the value zero, false, is returned for failure.
|
||||
*/
|
||||
uint8_t Sd2Card::readExtMemory(uint8_t mio, uint8_t func,
|
||||
uint8_t Sd2Card::readExtMemory(uint8_t mio, uint8_t func,
|
||||
uint32_t addr, uint16_t count, uint8_t* dst) {
|
||||
uint32_t offset = addr & 0x1FF;
|
||||
if (offset + count > 512) count = 512 - offset;
|
||||
|
||||
|
||||
if (count == 0) return true;
|
||||
|
||||
uint32_t arg =
|
||||
(((uint32_t)mio & 0x1) << 31) |
|
||||
|
||||
uint32_t arg =
|
||||
(((uint32_t)mio & 0x1) << 31) |
|
||||
(mio ? (((uint32_t)func & 0x7) << 28) : (((uint32_t)func & 0xF) << 27)) |
|
||||
((addr & 0x1FFFF) << 9) |
|
||||
((count - 1) & 0x1FF);
|
||||
|
||||
|
||||
return readExt(arg, dst, count);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class Sd2Card {
|
|||
/**
|
||||
* Read a card's CID register. The CID contains card identification
|
||||
* information such as Manufacturer ID, Product name, Product serial
|
||||
* number and Manufacturing date.
|
||||
* number and Manufacturing date.
|
||||
*
|
||||
* \param[out] cid pointer to area for returned data.
|
||||
*
|
||||
|
|
@ -243,4 +243,4 @@ class Sd2Card {
|
|||
#endif // Sd2Card_h
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
|
|||
int16_t n;
|
||||
// if not a directory file or miss-positioned return an error
|
||||
if (!isDir() || (0X1F & curPosition_)) return -1;
|
||||
|
||||
|
||||
//If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly.
|
||||
if (longFilename != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ class SdBaseFile {
|
|||
static void printFatDate(uint16_t fatDate);
|
||||
static void printFatTime( uint16_t fatTime);
|
||||
bool printName();
|
||||
protected:
|
||||
protected:
|
||||
int16_t read();
|
||||
int16_t read(void* buf, uint16_t nbyte);
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -468,29 +468,29 @@ uint32_t const FAT32MASK = 0X0FFFFFFF;
|
|||
* \brief FAT short directory entry
|
||||
*
|
||||
* Short means short 8.3 name, not the entry size.
|
||||
*
|
||||
* Date Format. A FAT directory entry date stamp is a 16-bit field that is
|
||||
*
|
||||
* Date Format. A FAT directory entry date stamp is a 16-bit field that is
|
||||
* basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the
|
||||
* format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the
|
||||
* format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the
|
||||
* 16-bit word):
|
||||
*
|
||||
* Bits 9-15: Count of years from 1980, valid value range 0-127
|
||||
*
|
||||
* Bits 9-15: Count of years from 1980, valid value range 0-127
|
||||
* inclusive (1980-2107).
|
||||
*
|
||||
*
|
||||
* Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive.
|
||||
*
|
||||
* Bits 0-4: Day of month, valid value range 1-31 inclusive.
|
||||
*
|
||||
* Time Format. A FAT directory entry time stamp is a 16-bit field that has
|
||||
* a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the
|
||||
* a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the
|
||||
* 16-bit word, bit 15 is the MSB of the 16-bit word).
|
||||
*
|
||||
*
|
||||
* Bits 11-15: Hours, valid value range 0-23 inclusive.
|
||||
*
|
||||
*
|
||||
* Bits 5-10: Minutes, valid value range 0-59 inclusive.
|
||||
*
|
||||
*
|
||||
* Bits 0-4: 2-second count, valid value range 0-29 inclusive (0 - 58 seconds).
|
||||
*
|
||||
*
|
||||
* The valid time range is from Midnight 00:00:00 to 23:59:58.
|
||||
*/
|
||||
struct directoryEntry {
|
||||
|
|
@ -548,7 +548,7 @@ struct directoryEntry {
|
|||
*
|
||||
* directoryVFATEntries are found in the same list as normal directoryEntry.
|
||||
* But have the attribute field set to DIR_ATT_LONG_NAME.
|
||||
*
|
||||
*
|
||||
* Long filenames are saved in multiple directoryVFATEntries.
|
||||
* Each entry containing 13 UTF-16 characters.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ int SdFatUtil::FreeRam() {
|
|||
#endif // __arm
|
||||
|
||||
void SdFatUtil::set_stack_guard()
|
||||
{
|
||||
{
|
||||
uint32_t *stack_guard;
|
||||
|
||||
stack_guard = (uint32_t*)(&__bss_end + STACK_GUARD_MARGIN);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ int16_t SdFile::readFilteredGcode(){
|
|||
|
||||
// It may seem unreasonable to copy the variable into a local one and copy it back at the end of this method,
|
||||
// but there is an important point of view: the compiler is unsure whether it can optimize the reads/writes
|
||||
// to gfReadPtr within this method, because it is a class member variable.
|
||||
// to gfReadPtr within this method, because it is a class member variable.
|
||||
// The compiler cannot see, if omitting read/write won't have any incorrect side-effects to the rest of the whole FW.
|
||||
// So this trick explicitly states, that rdPtr is a local variable limited to the scope of this method,
|
||||
// therefore the compiler can omit read/write to it (keep it in registers!) as it sees fit.
|
||||
|
|
@ -96,7 +96,7 @@ int16_t SdFile::readFilteredGcode(){
|
|||
|
||||
// the same applies to gfXBegin, codesize dropped another 100B!
|
||||
const uint8_t *blockBuffBegin = gfBlockBuffBegin();
|
||||
|
||||
|
||||
uint8_t consecutiveCommentLines = 0;
|
||||
while( *rdPtr == ';' ){
|
||||
for(;;){
|
||||
|
|
@ -104,8 +104,8 @@ int16_t SdFile::readFilteredGcode(){
|
|||
//while( *(++gfReadPtr) != '\n' ); // skip until a newline is found - suboptimal code!
|
||||
// Wondering, why this "nice while cycle" is done in such a weird way using a separate find_endl() function?
|
||||
// Have a look at the ASM code GCC produced!
|
||||
|
||||
// At first - a separate find_endl() makes the compiler understand,
|
||||
|
||||
// At first - a separate find_endl() makes the compiler understand,
|
||||
// that I don't need to store gfReadPtr every time, I'm only interested in the final address where the '\n' was found
|
||||
// - the cycle can run on CPU registers only without touching memory besides reading the character being compared.
|
||||
// Not only makes the code run considerably faster, but is also 40B shorter!
|
||||
|
|
@ -118,7 +118,7 @@ int16_t SdFile::readFilteredGcode(){
|
|||
// 11c62: sbci r19, 0xFF ; 255
|
||||
// 11c64: ld r22, Z
|
||||
// 11c66: cpi r22, 0x0A ; 10
|
||||
// 11c68: brne .-12 ; 0x11c5e <get_command()+0x524>
|
||||
// 11c68: brne .-12 ; 0x11c5e <get_command()+0x524>
|
||||
|
||||
// Still, even that was suboptimal as the compiler seems not to understand the usage of ld r22, Z+ (the plus is important)
|
||||
// aka automatic increment of the Z register (R30:R31 pair)
|
||||
|
|
@ -153,7 +153,7 @@ emit_char:
|
|||
{
|
||||
gfUpdateCurrentPosition( rdPtr - start + 1 );
|
||||
int16_t rv = *rdPtr++;
|
||||
|
||||
|
||||
if( curPosition_ >= fileSize_ ){
|
||||
// past the end of file
|
||||
goto eof_or_fail;
|
||||
|
|
@ -200,7 +200,7 @@ bool SdFile::gfComputeNextFileBlock() {
|
|||
// SHR by 9 means skip the last byte and shift just 3 bytes by 1
|
||||
// -> should be 8 instructions... and not the horrible loop shifting 4 bytes at once
|
||||
// still need to get some work on this
|
||||
gfBlock = vol_->rootDirStart() + (curPosition_ >> 9);
|
||||
gfBlock = vol_->rootDirStart() + (curPosition_ >> 9);
|
||||
} else {
|
||||
uint8_t blockOfCluster = vol_->blockOfCluster(curPosition_);
|
||||
if (gfOffset == 0 && blockOfCluster == 0) {
|
||||
|
|
|
|||
|
|
@ -35,19 +35,19 @@
|
|||
*/
|
||||
class SdFile : public SdBaseFile/*, public Print*/ {
|
||||
// GCode filtering vars and methods - due to optimization reasons not wrapped in a separate class
|
||||
|
||||
|
||||
// beware - this read ptr is manipulated inside just 2 methods - readFilteredGcode and gfReset
|
||||
// If you even want to call gfReset from readFilteredGcode, you must make sure
|
||||
// to update gfReadPtr inside readFilteredGcode from a local copy (see explanation of this trick in readFilteredGcode)
|
||||
const uint8_t *gfReadPtr;
|
||||
|
||||
|
||||
uint32_t gfBlock; // remember the current file block to be kept in cache - due to reuse of the memory, the block may fall out a must be read back
|
||||
uint16_t gfOffset;
|
||||
|
||||
const uint8_t *gfBlockBuffBegin()const;
|
||||
|
||||
|
||||
void gfReset();
|
||||
|
||||
|
||||
bool gfEnsureBlock();
|
||||
bool gfComputeNextFileBlock();
|
||||
void gfUpdateCurrentPosition(uint16_t inc);
|
||||
|
|
@ -59,7 +59,7 @@ public:
|
|||
#else
|
||||
void write(uint8_t b);
|
||||
#endif
|
||||
|
||||
|
||||
bool openFilteredGcode(SdBaseFile* dirFile, const char* path);
|
||||
int16_t readFilteredGcode();
|
||||
bool seekSetFilteredGcode(uint32_t pos);
|
||||
|
|
|
|||
|
|
@ -1,344 +0,0 @@
|
|||
/*
|
||||
Servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
||||
Copyright (c) 2009 Michael Margolis. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
|
||||
The servos are pulsed in the background using the value most recently written using the write() method
|
||||
|
||||
Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
|
||||
Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
|
||||
|
||||
The methods are:
|
||||
|
||||
Servo - Class for manipulating servo motors connected to Arduino pins.
|
||||
|
||||
attach(pin ) - Attaches a servo motor to an i/o pin.
|
||||
attach(pin, min, max ) - Attaches to a pin setting min and max values in microseconds
|
||||
default min is 544, max is 2400
|
||||
|
||||
write() - Sets the servo angle in degrees. (invalid angle that is valid as pulse in microseconds is treated as microseconds)
|
||||
writeMicroseconds() - Sets the servo pulse width in microseconds
|
||||
read() - Gets the last written servo pulse width as an angle between 0 and 180.
|
||||
readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
|
||||
attached() - Returns true if there is a servo attached.
|
||||
detach() - Stops an attached servos from pulsing its i/o pin.
|
||||
|
||||
*/
|
||||
#include "Configuration.h"
|
||||
|
||||
#ifdef NUM_SERVOS
|
||||
#include <avr/interrupt.h>
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Servo.h"
|
||||
|
||||
#define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009
|
||||
#define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds
|
||||
|
||||
|
||||
#define TRIM_DURATION 2 // compensation ticks to trim adjust for digitalWrite delays // 12 August 2009
|
||||
|
||||
//#define NBR_TIMERS (MAX_SERVOS / SERVOS_PER_TIMER)
|
||||
|
||||
static servo_t servos[MAX_SERVOS]; // static array of servo structures
|
||||
static volatile int8_t Channel[_Nbr_16timers ]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
|
||||
|
||||
uint8_t ServoCount = 0; // the total number of attached servos
|
||||
|
||||
|
||||
// convenience macros
|
||||
#define SERVO_INDEX_TO_TIMER(_servo_nbr) ((timer16_Sequence_t)(_servo_nbr / SERVOS_PER_TIMER)) // returns the timer controlling this servo
|
||||
#define SERVO_INDEX_TO_CHANNEL(_servo_nbr) (_servo_nbr % SERVOS_PER_TIMER) // returns the index of the servo on this timer
|
||||
#define SERVO_INDEX(_timer,_channel) ((_timer*SERVOS_PER_TIMER) + _channel) // macro to access servo index by timer and channel
|
||||
#define SERVO(_timer,_channel) (servos[SERVO_INDEX(_timer,_channel)]) // macro to access servo class by timer and channel
|
||||
|
||||
#define SERVO_MIN() (MIN_PULSE_WIDTH - this->min * 4) // minimum value in uS for this servo
|
||||
#define SERVO_MAX() (MAX_PULSE_WIDTH - this->max * 4) // maximum value in uS for this servo
|
||||
|
||||
/************ static functions common to all instances ***********************/
|
||||
|
||||
static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t *TCNTn, volatile uint16_t* OCRnA)
|
||||
{
|
||||
if( Channel[timer] < 0 )
|
||||
*TCNTn = 0; // channel set to -1 indicated that refresh interval completed so reset the timer
|
||||
else{
|
||||
if( SERVO_INDEX(timer,Channel[timer]) < ServoCount && SERVO(timer,Channel[timer]).Pin.isActive == true )
|
||||
digitalWrite( SERVO(timer,Channel[timer]).Pin.nbr,LOW); // pulse this channel low if activated
|
||||
}
|
||||
|
||||
Channel[timer]++; // increment to the next channel
|
||||
if( SERVO_INDEX(timer,Channel[timer]) < ServoCount && Channel[timer] < SERVOS_PER_TIMER) {
|
||||
*OCRnA = *TCNTn + SERVO(timer,Channel[timer]).ticks;
|
||||
if(SERVO(timer,Channel[timer]).Pin.isActive == true) // check if activated
|
||||
digitalWrite( SERVO(timer,Channel[timer]).Pin.nbr,HIGH); // its an active channel so pulse it high
|
||||
}
|
||||
else {
|
||||
// finished all channels so wait for the refresh period to expire before starting over
|
||||
if( ((unsigned)*TCNTn) + 4 < usToTicks(REFRESH_INTERVAL) ) // allow a few ticks to ensure the next OCR1A not missed
|
||||
*OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
|
||||
else
|
||||
*OCRnA = *TCNTn + 4; // at least REFRESH_INTERVAL has elapsed
|
||||
Channel[timer] = -1; // this will get incremented at the end of the refresh period to start again at the first channel
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
|
||||
// Interrupt handlers for Arduino
|
||||
#if defined(_useTimer1)
|
||||
SIGNAL (TIMER1_COMPA_vect)
|
||||
{
|
||||
handle_interrupts(_timer1, &TCNT1, &OCR1A);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer3)
|
||||
SIGNAL (TIMER3_COMPA_vect)
|
||||
{
|
||||
handle_interrupts(_timer3, &TCNT3, &OCR3A);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer4)
|
||||
SIGNAL (TIMER4_COMPA_vect)
|
||||
{
|
||||
handle_interrupts(_timer4, &TCNT4, &OCR4A);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_useTimer5)
|
||||
SIGNAL (TIMER5_COMPA_vect)
|
||||
{
|
||||
handle_interrupts(_timer5, &TCNT5, &OCR5A);
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined WIRING
|
||||
// Interrupt handlers for Wiring
|
||||
#if defined(_useTimer1)
|
||||
void Timer1Service()
|
||||
{
|
||||
handle_interrupts(_timer1, &TCNT1, &OCR1A);
|
||||
}
|
||||
#endif
|
||||
#if defined(_useTimer3)
|
||||
void Timer3Service()
|
||||
{
|
||||
handle_interrupts(_timer3, &TCNT3, &OCR3A);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
static void initISR(timer16_Sequence_t timer)
|
||||
{
|
||||
#if defined (_useTimer1)
|
||||
if(timer == _timer1) {
|
||||
TCCR1A = 0; // normal counting mode
|
||||
TCCR1B = _BV(CS11); // set prescaler of 8
|
||||
TCNT1 = 0; // clear the timer count
|
||||
#if defined(__AVR_ATmega8__)|| defined(__AVR_ATmega128__)
|
||||
TIFR |= _BV(OCF1A); // clear any pending interrupts;
|
||||
TIMSK |= _BV(OCIE1A) ; // enable the output compare interrupt
|
||||
#else
|
||||
// here if not ATmega8 or ATmega128
|
||||
TIFR1 |= _BV(OCF1A); // clear any pending interrupts;
|
||||
TIMSK1 |= _BV(OCIE1A) ; // enable the output compare interrupt
|
||||
#endif
|
||||
#if defined(WIRING)
|
||||
timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (_useTimer3)
|
||||
if(timer == _timer3) {
|
||||
TCCR3A = 0; // normal counting mode
|
||||
TCCR3B = _BV(CS31); // set prescaler of 8
|
||||
TCNT3 = 0; // clear the timer count
|
||||
#if defined(__AVR_ATmega128__)
|
||||
TIFR |= _BV(OCF3A); // clear any pending interrupts;
|
||||
ETIMSK |= _BV(OCIE3A); // enable the output compare interrupt
|
||||
#else
|
||||
TIFR3 = _BV(OCF3A); // clear any pending interrupts;
|
||||
TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt
|
||||
#endif
|
||||
#if defined(WIRING)
|
||||
timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (_useTimer4)
|
||||
if(timer == _timer4) {
|
||||
TCCR4A = 0; // normal counting mode
|
||||
TCCR4B = _BV(CS41); // set prescaler of 8
|
||||
TCNT4 = 0; // clear the timer count
|
||||
TIFR4 = _BV(OCF4A); // clear any pending interrupts;
|
||||
TIMSK4 = _BV(OCIE4A) ; // enable the output compare interrupt
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (_useTimer5)
|
||||
if(timer == _timer5) {
|
||||
TCCR5A = 0; // normal counting mode
|
||||
TCCR5B = _BV(CS51); // set prescaler of 8
|
||||
TCNT5 = 0; // clear the timer count
|
||||
TIFR5 = _BV(OCF5A); // clear any pending interrupts;
|
||||
TIMSK5 = _BV(OCIE5A) ; // enable the output compare interrupt
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void finISR(timer16_Sequence_t timer)
|
||||
{
|
||||
//disable use of the given timer
|
||||
#if defined WIRING // Wiring
|
||||
if(timer == _timer1) {
|
||||
#if defined(__AVR_ATmega1281__)||defined(__AVR_ATmega2561__)
|
||||
TIMSK1 &= ~_BV(OCIE1A) ; // disable timer 1 output compare interrupt
|
||||
#else
|
||||
TIMSK &= ~_BV(OCIE1A) ; // disable timer 1 output compare interrupt
|
||||
#endif
|
||||
timerDetach(TIMER1OUTCOMPAREA_INT);
|
||||
}
|
||||
else if(timer == _timer3) {
|
||||
#if defined(__AVR_ATmega1281__)||defined(__AVR_ATmega2561__)
|
||||
TIMSK3 &= ~_BV(OCIE3A); // disable the timer3 output compare A interrupt
|
||||
#else
|
||||
ETIMSK &= ~_BV(OCIE3A); // disable the timer3 output compare A interrupt
|
||||
#endif
|
||||
timerDetach(TIMER3OUTCOMPAREA_INT);
|
||||
}
|
||||
#else
|
||||
//For arduino - in future: call here to a currently undefined function to reset the timer
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool isTimerActive(timer16_Sequence_t timer)
|
||||
{
|
||||
// returns true if any servo is active on this timer
|
||||
for(uint8_t channel=0; channel < SERVOS_PER_TIMER; channel++) {
|
||||
if(SERVO(timer,channel).Pin.isActive == true)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/****************** end of static functions ******************************/
|
||||
|
||||
Servo::Servo()
|
||||
{
|
||||
if( ServoCount < MAX_SERVOS) {
|
||||
this->servoIndex = ServoCount++; // assign a servo index to this instance
|
||||
servos[this->servoIndex].ticks = usToTicks(DEFAULT_PULSE_WIDTH); // store default values - 12 Aug 2009
|
||||
}
|
||||
else
|
||||
this->servoIndex = INVALID_SERVO ; // too many servos
|
||||
}
|
||||
|
||||
uint8_t Servo::attach(int pin)
|
||||
{
|
||||
return this->attach(pin, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH);
|
||||
}
|
||||
|
||||
uint8_t Servo::attach(int pin, int min, int max)
|
||||
{
|
||||
if(this->servoIndex < MAX_SERVOS ) {
|
||||
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
|
||||
if (pin > 0) this->pin = pin; else pin = this->pin;
|
||||
#endif
|
||||
pinMode( pin, OUTPUT) ; // set servo pin to output
|
||||
servos[this->servoIndex].Pin.nbr = pin;
|
||||
// todo min/max check: abs(min - MIN_PULSE_WIDTH) /4 < 128
|
||||
this->min = (MIN_PULSE_WIDTH - min)/4; //resolution of min/max is 4 uS
|
||||
this->max = (MAX_PULSE_WIDTH - max)/4;
|
||||
// initialize the timer if it has not already been initialized
|
||||
timer16_Sequence_t timer = SERVO_INDEX_TO_TIMER(servoIndex);
|
||||
if(isTimerActive(timer) == false)
|
||||
initISR(timer);
|
||||
servos[this->servoIndex].Pin.isActive = true; // this must be set after the check for isTimerActive
|
||||
}
|
||||
return this->servoIndex ;
|
||||
}
|
||||
|
||||
void Servo::detach()
|
||||
{
|
||||
servos[this->servoIndex].Pin.isActive = false;
|
||||
timer16_Sequence_t timer = SERVO_INDEX_TO_TIMER(servoIndex);
|
||||
if(isTimerActive(timer) == false) {
|
||||
finISR(timer);
|
||||
}
|
||||
}
|
||||
|
||||
void Servo::write(int value)
|
||||
{
|
||||
if(value < MIN_PULSE_WIDTH)
|
||||
{ // treat values less than 544 as angles in degrees (valid values in microseconds are handled as microseconds)
|
||||
if(value < 0) value = 0;
|
||||
if(value > 180) value = 180;
|
||||
value = map(value, 0, 180, SERVO_MIN(), SERVO_MAX());
|
||||
}
|
||||
this->writeMicroseconds(value);
|
||||
}
|
||||
|
||||
void Servo::writeMicroseconds(int value)
|
||||
{
|
||||
// calculate and store the values for the given channel
|
||||
byte channel = this->servoIndex;
|
||||
if( (channel < MAX_SERVOS) ) // ensure channel is valid
|
||||
{
|
||||
if( value < SERVO_MIN() ) // ensure pulse width is valid
|
||||
value = SERVO_MIN();
|
||||
else if( value > SERVO_MAX() )
|
||||
value = SERVO_MAX();
|
||||
|
||||
value = value - TRIM_DURATION;
|
||||
value = usToTicks(value); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009
|
||||
|
||||
uint8_t oldSREG = SREG;
|
||||
cli();
|
||||
servos[channel].ticks = value;
|
||||
SREG = oldSREG;
|
||||
}
|
||||
}
|
||||
|
||||
int Servo::read() // return the value as degrees
|
||||
{
|
||||
return map( this->readMicroseconds()+1, SERVO_MIN(), SERVO_MAX(), 0, 180);
|
||||
}
|
||||
|
||||
int Servo::readMicroseconds()
|
||||
{
|
||||
unsigned int pulsewidth;
|
||||
if( this->servoIndex != INVALID_SERVO )
|
||||
pulsewidth = ticksToUs(servos[this->servoIndex].ticks) + TRIM_DURATION ; // 12 aug 2009
|
||||
else
|
||||
pulsewidth = 0;
|
||||
|
||||
return pulsewidth;
|
||||
}
|
||||
|
||||
bool Servo::attached()
|
||||
{
|
||||
return servos[this->servoIndex].Pin.isActive ;
|
||||
}
|
||||
|
||||
#endif
|
||||
135
Firmware/Servo.h
135
Firmware/Servo.h
|
|
@ -1,135 +0,0 @@
|
|||
/*
|
||||
Servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
|
||||
Copyright (c) 2009 Michael Margolis. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method.
|
||||
The servos are pulsed in the background using the value most recently written using the write() method
|
||||
|
||||
Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached.
|
||||
Timers are seized as needed in groups of 12 servos - 24 servos use two timers, 48 servos will use four.
|
||||
The sequence used to seize timers is defined in timers.h
|
||||
|
||||
The methods are:
|
||||
|
||||
Servo - Class for manipulating servo motors connected to Arduino pins.
|
||||
|
||||
attach(pin ) - Attaches a servo motor to an i/o pin.
|
||||
attach(pin, min, max ) - Attaches to a pin setting min and max values in microseconds
|
||||
default min is 544, max is 2400
|
||||
|
||||
write() - Sets the servo angle in degrees. (invalid angle that is valid as pulse in microseconds is treated as microseconds)
|
||||
writeMicroseconds() - Sets the servo pulse width in microseconds
|
||||
read() - Gets the last written servo pulse width as an angle between 0 and 180.
|
||||
readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release)
|
||||
attached() - Returns true if there is a servo attached.
|
||||
detach() - Stops an attached servos from pulsing its i/o pin.
|
||||
*/
|
||||
|
||||
#ifndef Servo_h
|
||||
#define Servo_h
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/*
|
||||
* Defines for 16 bit timers used with Servo library
|
||||
*
|
||||
* If _useTimerX is defined then TimerX is a 16 bit timer on the current board
|
||||
* timer16_Sequence_t enumerates the sequence that the timers should be allocated
|
||||
* _Nbr_16timers indicates how many 16 bit timers are available.
|
||||
*
|
||||
*/
|
||||
|
||||
// Say which 16 bit timers can be used and in what order
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||
#define _useTimer5
|
||||
//#define _useTimer1
|
||||
#define _useTimer3
|
||||
#define _useTimer4
|
||||
//typedef enum { _timer5, _timer1, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
|
||||
typedef enum { _timer5, _timer3, _timer4, _Nbr_16timers } timer16_Sequence_t ;
|
||||
|
||||
#elif defined(__AVR_ATmega32U4__)
|
||||
//#define _useTimer1
|
||||
#define _useTimer3
|
||||
//typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
|
||||
typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
|
||||
|
||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||
#define _useTimer3
|
||||
//#define _useTimer1
|
||||
//typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
|
||||
typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
|
||||
|
||||
#elif defined(__AVR_ATmega128__) ||defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__) ||defined(__AVR_ATmega2561__)
|
||||
#define _useTimer3
|
||||
//#define _useTimer1
|
||||
//typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ;
|
||||
typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;
|
||||
|
||||
#else // everything else
|
||||
//#define _useTimer1
|
||||
//typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ;
|
||||
typedef enum { _Nbr_16timers } timer16_Sequence_t ;
|
||||
#endif
|
||||
|
||||
#define Servo_VERSION 2 // software version of this library
|
||||
|
||||
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
|
||||
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
|
||||
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
|
||||
#define REFRESH_INTERVAL 20000 // minimum time to refresh servos in microseconds
|
||||
|
||||
#define SERVOS_PER_TIMER 12 // the maximum number of servos controlled by one timer
|
||||
#define MAX_SERVOS (_Nbr_16timers * SERVOS_PER_TIMER)
|
||||
|
||||
#define INVALID_SERVO 255 // flag indicating an invalid servo index
|
||||
|
||||
typedef struct {
|
||||
uint8_t nbr :6 ; // a pin number from 0 to 63
|
||||
uint8_t isActive :1 ; // true if this channel is enabled, pin not pulsed if false
|
||||
} ServoPin_t ;
|
||||
|
||||
typedef struct {
|
||||
ServoPin_t Pin;
|
||||
unsigned int ticks;
|
||||
} servo_t;
|
||||
|
||||
class Servo
|
||||
{
|
||||
public:
|
||||
Servo();
|
||||
uint8_t attach(int pin); // attach the given pin to the next free channel, sets pinMode, returns channel number or 0 if failure
|
||||
uint8_t attach(int pin, int min, int max); // as above but also sets min and max values for writes.
|
||||
void detach();
|
||||
void write(int value); // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds
|
||||
void writeMicroseconds(int value); // Write pulse width in microseconds
|
||||
int read(); // returns current pulse width as an angle between 0 and 180 degrees
|
||||
int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release)
|
||||
bool attached(); // return true if this servo is attached, otherwise false
|
||||
#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
|
||||
int pin; // store the hardware pin of the servo
|
||||
#endif
|
||||
private:
|
||||
uint8_t servoIndex; // index into the channel data for this servo
|
||||
int8_t min; // minimum is this value times 4 added to MIN_PULSE_WIDTH
|
||||
int8_t max; // maximum is this value times 4 added to MAX_PULSE_WIDTH
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -30,9 +30,9 @@ void SpoolJoin::toggleSpoolJoin()
|
|||
{
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_SPOOL_JOIN) == (uint8_t)EEPROM::Disabled)
|
||||
{
|
||||
eeprom_write_byte((uint8_t*)EEPROM_SPOOL_JOIN, (uint8_t)EEPROM::Enabled);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_SPOOL_JOIN, (uint8_t)EEPROM::Enabled);
|
||||
} else {
|
||||
eeprom_write_byte((uint8_t*)EEPROM_SPOOL_JOIN, (uint8_t)EEPROM::Disabled);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_SPOOL_JOIN, (uint8_t)EEPROM::Disabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ uint8_t SpoolJoin::nextSlot()
|
|||
SERIAL_ECHOPGM("SpoolJoin: ");
|
||||
SERIAL_ECHO((int)currentMMUSlot);
|
||||
|
||||
if (currentMMUSlot >= 4) currentMMUSlot = 0;
|
||||
if (currentMMUSlot >= MMU_FILAMENT_COUNT-1) currentMMUSlot = 0;
|
||||
else currentMMUSlot++;
|
||||
|
||||
SERIAL_ECHOPGM(" -> ");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/// @file
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "eeprom.h"
|
||||
|
||||
// See documentation here: https://help.prusa3d.com/article/spooljoin-mmu2s_134252
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include "language.h"
|
||||
#include "messages.h"
|
||||
#include "mmu2.h"
|
||||
#include "stepper.h"
|
||||
#include "ultralcd.h"
|
||||
#include <avr/pgmspace.h>
|
||||
#include <stdint.h>
|
||||
|
|
@ -12,26 +11,15 @@
|
|||
|
||||
static const char duplicate_Tcode_ignored[] PROGMEM = "Duplicate T-code ignored.";
|
||||
|
||||
inline bool IsInvalidTCode(char *const s, uint8_t i) {
|
||||
return ((s[i] < '0' || s[i] > '4') && s[i] != '?' && s[i] != 'x' && s[i] != 'c');
|
||||
inline bool IsInvalidTCode(char *const s, uint8_t i) {
|
||||
return ((s[i] < '0' || s[i] > '4') && s[i] != '?' && s[i] != 'x' && s[i] != 'c');
|
||||
}
|
||||
|
||||
inline void TCodeInvalid() {
|
||||
SERIAL_ECHOLNPGM("Invalid T code.");
|
||||
inline void TCodeInvalid() {
|
||||
SERIAL_ECHOLNPGM("Invalid T code.");
|
||||
}
|
||||
|
||||
struct SChooseFromMenu {
|
||||
uint8_t slot:7;
|
||||
uint8_t loadToNozzle:1;
|
||||
inline constexpr SChooseFromMenu(uint8_t slot, bool loadToNozzle):slot(slot), loadToNozzle(loadToNozzle){}
|
||||
inline constexpr SChooseFromMenu():slot(0), loadToNozzle(false) { }
|
||||
};
|
||||
|
||||
SChooseFromMenu TCodeChooseFromMenu() {
|
||||
return SChooseFromMenu( choose_menu_P(_T(MSG_SELECT_FILAMENT), _T(MSG_FILAMENT)), MMU2::mmu2.Enabled() );
|
||||
}
|
||||
|
||||
void TCodes(char *const strchr_pointer, uint8_t codeValue) {
|
||||
void TCodes(char *const strchr_pointer, const uint8_t codeValue) {
|
||||
uint8_t index = 1;
|
||||
for ( /*nothing*/ ; strchr_pointer[index] == ' ' || strchr_pointer[index] == '\t'; index++)
|
||||
;
|
||||
|
|
@ -40,49 +28,34 @@ void TCodes(char *const strchr_pointer, uint8_t codeValue) {
|
|||
|
||||
if (IsInvalidTCode(strchr_pointer, index)){
|
||||
TCodeInvalid();
|
||||
} else if (strchr_pointer[index] == 'x'){
|
||||
} else if (strchr_pointer[index] == 'x' || strchr_pointer[index] == '?'){
|
||||
// load to extruder gears; if mmu is not present do nothing
|
||||
if (MMU2::mmu2.Enabled()) {
|
||||
MMU2::mmu2.tool_change(strchr_pointer[index], choose_menu_P(_T(MSG_SELECT_FILAMENT), _T(MSG_FILAMENT)));
|
||||
MMU2::mmu2.tool_change(strchr_pointer[index], choose_menu_P(_T(MSG_SELECT_FILAMENT), MSG_FILAMENT));
|
||||
}
|
||||
} else if (strchr_pointer[index] == 'c'){
|
||||
// load from extruder gears to nozzle (nozzle should be preheated)
|
||||
if (MMU2::mmu2.Enabled()) {
|
||||
MMU2::mmu2.tool_change(strchr_pointer[index], MMU2::mmu2.get_current_tool());
|
||||
}
|
||||
} else {
|
||||
SChooseFromMenu selectedSlot;
|
||||
if (strchr_pointer[index] == '?') {
|
||||
selectedSlot = TCodeChooseFromMenu();
|
||||
/*} else if (MMU2::mmu2.Enabled() && SpoolJoin::spooljoin.isSpoolJoinEnabled()) {
|
||||
// TODO: What if the next slot has no filament?
|
||||
selectedSlot.slot = SpoolJoin::spooljoin.nextSlot();*/
|
||||
} else {
|
||||
selectedSlot.slot = codeValue;
|
||||
}
|
||||
st_synchronize();
|
||||
|
||||
} else { // Process T0 ... T4
|
||||
if (MMU2::mmu2.Enabled()) {
|
||||
if (selectedSlot.slot == MMU2::mmu2.get_current_tool()){
|
||||
if (codeValue == MMU2::mmu2.get_current_tool()){
|
||||
// don't execute the same T-code twice in a row
|
||||
puts_P(duplicate_Tcode_ignored);
|
||||
} else {
|
||||
#if defined(MMU_HAS_CUTTER) && defined(MMU_ALWAYS_CUT)
|
||||
if (EEPROM_MMU_CUTTER_ENABLED_always == eeprom_read_byte((uint8_t *)EEPROM_MMU_CUTTER_ENABLED)) {
|
||||
MMU2::mmu2.cut_filament(selectedSlot.slot);
|
||||
MMU2::mmu2.cut_filament(codeValue);
|
||||
}
|
||||
#endif // defined(MMU_HAS_CUTTER) && defined(MMU_ALWAYS_CUT)
|
||||
if (selectedSlot.loadToNozzle){ // for single material usage with mmu
|
||||
MMU2::mmu2.load_filament_to_nozzle(selectedSlot.slot);
|
||||
} else {
|
||||
MMU2::mmu2.tool_change(selectedSlot.slot);
|
||||
}
|
||||
MMU2::mmu2.tool_change(codeValue);
|
||||
}
|
||||
} else {
|
||||
SERIAL_ECHO_START;
|
||||
if (selectedSlot.slot >= EXTRUDERS) {
|
||||
if (codeValue >= EXTRUDERS) {
|
||||
SERIAL_ECHO('T');
|
||||
SERIAL_ECHOLN(selectedSlot.slot + '0');
|
||||
SERIAL_ECHOLN(codeValue + '0');
|
||||
SERIAL_ECHOLNRPGM(_n("Invalid extruder")); ////MSG_INVALID_EXTRUDER
|
||||
} else {
|
||||
// @@TODO if (code_seen('F')) {
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
void TCodes(char * const strchr_pointer, uint8_t codeValue);
|
||||
void TCodes(char * const strchr_pointer, const uint8_t codeValue);
|
||||
|
|
|
|||
|
|
@ -6,17 +6,6 @@
|
|||
#include "Timer.h"
|
||||
#include "system_timer.h"
|
||||
|
||||
/**
|
||||
* @brief construct Timer
|
||||
*
|
||||
* It is guaranteed, that construction is equivalent with zeroing all members.
|
||||
* This property can be exploited in menu_data.
|
||||
*/
|
||||
template<typename T>
|
||||
Timer<T>::Timer() : m_isRunning(false), m_started()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start timer
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ template <class T>
|
|||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer();
|
||||
inline constexpr Timer()
|
||||
: m_isRunning(false)
|
||||
, m_started(0) {};
|
||||
|
||||
void start();
|
||||
void stop(){m_isRunning = false;}
|
||||
bool running()const {return m_isRunning;}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//backlight.cpp
|
||||
|
||||
#include "backlight.h"
|
||||
#include "macros.h"
|
||||
#include <avr/eeprom.h>
|
||||
#include <Arduino.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "backlight.h"
|
||||
#include "eeprom.h"
|
||||
#include "pins.h"
|
||||
#include "fastio.h"
|
||||
#include "macros.h"
|
||||
#include "pins.h"
|
||||
#include "system_timer.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#ifdef LCD_BL_PIN
|
||||
|
|
@ -17,7 +17,7 @@ bool backlightSupport = 0; //only if it's true will any of the settings be visib
|
|||
uint8_t backlightLevel_HIGH = 0;
|
||||
uint8_t backlightLevel_LOW = 0;
|
||||
uint8_t backlightMode = BACKLIGHT_MODE_BRIGHT;
|
||||
int16_t backlightTimer_period = 10;
|
||||
int16_t backlightTimer_period = LCD_BACKLIGHT_TIMEOUT;
|
||||
LongTimer backlightTimer;
|
||||
|
||||
static void backlightTimer_reset() //used for resetting the timer and waking the display. Triggered on user interactions.
|
||||
|
|
@ -32,7 +32,7 @@ void force_bl_on(bool section_start)
|
|||
if (section_start)
|
||||
{
|
||||
backlightMode = BACKLIGHT_MODE_BRIGHT;
|
||||
if (backlightLevel_HIGH < 30) backlightLevel_HIGH = 30;
|
||||
if (backlightLevel_HIGH < LCD_BACKLIGHT_FORCE_ON) backlightLevel_HIGH = LCD_BACKLIGHT_FORCE_ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -45,7 +45,7 @@ void force_bl_on(bool section_start)
|
|||
void backlight_wake(const uint8_t flashNo)
|
||||
{
|
||||
if (!backlightSupport) return;
|
||||
|
||||
|
||||
if (flashNo)
|
||||
{
|
||||
uint8_t backlightMode_bck = backlightMode;
|
||||
|
|
@ -62,16 +62,16 @@ void backlight_wake(const uint8_t flashNo)
|
|||
|
||||
void backlight_save() //saves all backlight data to eeprom.
|
||||
{
|
||||
eeprom_update_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_HIGH, backlightLevel_HIGH);
|
||||
eeprom_update_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_LOW, backlightLevel_LOW);
|
||||
eeprom_update_byte((uint8_t *)EEPROM_BACKLIGHT_MODE, backlightMode);
|
||||
eeprom_update_word((uint16_t *)EEPROM_BACKLIGHT_TIMEOUT, backlightTimer_period);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_BACKLIGHT_LEVEL_HIGH, backlightLevel_HIGH);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_BACKLIGHT_LEVEL_LOW, backlightLevel_LOW);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_BACKLIGHT_MODE, backlightMode);
|
||||
eeprom_update_word_notify((uint16_t *)EEPROM_BACKLIGHT_TIMEOUT, backlightTimer_period);
|
||||
}
|
||||
|
||||
void backlight_update()
|
||||
{
|
||||
if (!backlightSupport) return;
|
||||
|
||||
|
||||
if (backlightMode == BACKLIGHT_MODE_AUTO)
|
||||
{
|
||||
if (backlightTimer.expired((uint32_t)backlightTimer_period * 1000ul)) analogWrite(LCD_BL_PIN, backlightLevel_LOW);
|
||||
|
|
@ -93,9 +93,9 @@ void backlight_init()
|
|||
|
||||
//initialize backlight
|
||||
backlightMode = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_MODE, BACKLIGHT_MODE_AUTO);
|
||||
backlightLevel_HIGH = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_HIGH, 130);
|
||||
backlightLevel_LOW = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_LOW, 50);
|
||||
backlightTimer_period = eeprom_init_default_word((uint16_t *)EEPROM_BACKLIGHT_TIMEOUT, 10); // in seconds
|
||||
backlightLevel_HIGH = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_HIGH, LCD_BACKLIGHT_LEVEL_HIGH);
|
||||
backlightLevel_LOW = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_LEVEL_LOW, LCD_BACKLIGHT_LEVEL_LOW);
|
||||
backlightTimer_period = eeprom_init_default_word((uint16_t *)EEPROM_BACKLIGHT_TIMEOUT, LCD_BACKLIGHT_TIMEOUT); // in seconds
|
||||
|
||||
SET_OUTPUT(LCD_BL_PIN);
|
||||
backlightTimer_reset();
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
#define _BACKLIGHT_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "Marlin.h"
|
||||
#include "pins.h"
|
||||
|
||||
enum Backlight_Mode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,19 +6,17 @@
|
|||
|
||||
|
||||
#include <stdio.h>
|
||||
extern FILE _uartout;
|
||||
#define uartout (&_uartout)
|
||||
|
||||
extern void softReset();
|
||||
|
||||
void bootapp_print_vars(void)
|
||||
{
|
||||
fprintf_P(uartout, PSTR("boot_src_addr =0x%08lx\n"), boot_src_addr);
|
||||
fprintf_P(uartout, PSTR("boot_dst_addr =0x%08lx\n"), boot_dst_addr);
|
||||
fprintf_P(uartout, PSTR("boot_copy_size =0x%04x\n"), boot_copy_size);
|
||||
fprintf_P(uartout, PSTR("boot_reserved =0x%02x\n"), boot_reserved);
|
||||
fprintf_P(uartout, PSTR("boot_app_flags =0x%02x\n"), boot_app_flags);
|
||||
fprintf_P(uartout, PSTR("boot_app_magic =0x%08lx\n"), boot_app_magic);
|
||||
printf_P(PSTR("boot_src_addr =0x%08lx\n"), boot_src_addr);
|
||||
printf_P(PSTR("boot_dst_addr =0x%08lx\n"), boot_dst_addr);
|
||||
printf_P(PSTR("boot_copy_size =0x%04x\n"), boot_copy_size);
|
||||
printf_P(PSTR("boot_reserved =0x%02x\n"), boot_reserved);
|
||||
printf_P(PSTR("boot_app_flags =0x%02x\n"), boot_app_flags);
|
||||
printf_P(PSTR("boot_app_magic =0x%08lx\n"), boot_app_magic);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -26,12 +24,11 @@ void bootapp_ram2flash(uint16_t rptr, uint16_t fptr, uint16_t size)
|
|||
{
|
||||
cli();
|
||||
boot_app_magic = BOOT_APP_MAGIC;
|
||||
boot_app_flags |= BOOT_APP_FLG_COPY;
|
||||
boot_app_flags |= BOOT_APP_FLG_ERASE;
|
||||
boot_app_flags |= BOOT_APP_FLG_COPY | BOOT_APP_FLG_ERASE;
|
||||
boot_copy_size = (uint16_t)size;
|
||||
boot_src_addr = (uint32_t)rptr;
|
||||
boot_dst_addr = (uint32_t)fptr;
|
||||
bootapp_print_vars();
|
||||
// bootapp_print_vars();
|
||||
softReset();
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +37,8 @@ void bootapp_reboot_user0(uint8_t reserved)
|
|||
cli();
|
||||
boot_app_magic = BOOT_APP_MAGIC;
|
||||
boot_app_flags = BOOT_APP_FLG_USER0;
|
||||
boot_copy_size = 0;
|
||||
boot_reserved = reserved;
|
||||
bootapp_print_vars();
|
||||
// bootapp_print_vars();
|
||||
softReset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,10 @@
|
|||
#define BOOT_APP_FLG_ERASE 0x01
|
||||
#define BOOT_APP_FLG_COPY 0x02
|
||||
#define BOOT_APP_FLG_FLASH 0x04
|
||||
#define BOOT_APP_FLG_RUN 0x08
|
||||
|
||||
#define BOOT_APP_FLG_USER0 0x80
|
||||
|
||||
#define BOOT_APP_MAGIC 0x55aa55aa
|
||||
#define BOOT_APP_MAGIC 0x55aa55aaUL
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include "temperature.h"
|
||||
#include "language.h"
|
||||
#include "Prusa_farm.h"
|
||||
#include "power_panic.h"
|
||||
#include "stopwatch.h"
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
|
||||
|
|
@ -22,7 +24,7 @@ CardReader::CardReader()
|
|||
filesize = 0;
|
||||
sdpos = 0;
|
||||
sdprinting = false;
|
||||
cardOK = false;
|
||||
mounted = false;
|
||||
saving = false;
|
||||
logging = false;
|
||||
workDirDepth = 0;
|
||||
|
|
@ -33,20 +35,20 @@ CardReader::CardReader()
|
|||
lastnr=0;
|
||||
//power to SD reader
|
||||
#if SDPOWER > -1
|
||||
SET_OUTPUT(SDPOWER);
|
||||
SET_OUTPUT(SDPOWER);
|
||||
WRITE(SDPOWER,HIGH);
|
||||
#endif //SDPOWER
|
||||
|
||||
|
||||
autostart_atmillis.start(); // reset timer
|
||||
}
|
||||
|
||||
char *createFilename(char *buffer,const dir_t &p) //buffer>12characters
|
||||
{
|
||||
char *pos=buffer;
|
||||
for (uint8_t i = 0; i < 11; i++)
|
||||
for (uint8_t i = 0; i < 11; i++)
|
||||
{
|
||||
if (p.name[i] == ' ')continue;
|
||||
if (i == 8)
|
||||
if (i == 8)
|
||||
{
|
||||
*pos++='.';
|
||||
}
|
||||
|
|
@ -72,7 +74,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
_incrementer() {recursionCnt++;}
|
||||
~_incrementer() {recursionCnt--;}
|
||||
} recursionCntIncrementer;
|
||||
|
||||
|
||||
dir_t p;
|
||||
uint8_t cnt = 0;
|
||||
// Read the next entry from a directory
|
||||
|
|
@ -101,10 +103,10 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
// Serial.print(path);
|
||||
// Get a new directory object using the full path
|
||||
// and dive recursively into it.
|
||||
|
||||
|
||||
if (lsParams.LFN)
|
||||
printf_P(PSTR("DIR_ENTER: %s \"%s\"\n"), path, longFilename[0] ? longFilename : lfilename);
|
||||
|
||||
|
||||
SdFile dir;
|
||||
if (!dir.open(parent, lfilename, O_READ)) {
|
||||
//SERIAL_ECHO_START();
|
||||
|
|
@ -113,7 +115,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
}
|
||||
lsDive(path, dir, NULL, lsAction, lsParams);
|
||||
// close() is done automatically by destructor of SdFile
|
||||
|
||||
|
||||
if (lsParams.LFN)
|
||||
puts_P(PSTR("DIR_EXIT"));
|
||||
}
|
||||
|
|
@ -124,15 +126,15 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
case LS_Count:
|
||||
nrFiles++;
|
||||
break;
|
||||
|
||||
|
||||
case LS_SerialPrint:
|
||||
createFilename(filename, p);
|
||||
SERIAL_PROTOCOL(prepend);
|
||||
SERIAL_PROTOCOL(filename);
|
||||
|
||||
|
||||
MYSERIAL.write(' ');
|
||||
SERIAL_PROTOCOL(p.fileSize);
|
||||
|
||||
|
||||
if (lsParams.timestamp)
|
||||
{
|
||||
crmodDate = p.lastWriteDate;
|
||||
|
|
@ -143,14 +145,14 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
}
|
||||
printf_P(PSTR(" %#lx"), ((uint32_t)crmodDate << 16) | crmodTime);
|
||||
}
|
||||
|
||||
|
||||
if (lsParams.LFN)
|
||||
printf_P(PSTR(" \"%s\""), LONGEST_FILENAME);
|
||||
|
||||
|
||||
SERIAL_PROTOCOLLN();
|
||||
manage_heater();
|
||||
break;
|
||||
|
||||
|
||||
case LS_GetFilename:
|
||||
//SERIAL_ECHOPGM("File: ");
|
||||
createFilename(filename, p);
|
||||
|
|
@ -196,9 +198,9 @@ void CardReader::ls(ls_param params)
|
|||
}
|
||||
|
||||
|
||||
void CardReader::initsd(bool doPresort/* = true*/)
|
||||
void CardReader::mount(bool doPresort/* = true*/)
|
||||
{
|
||||
cardOK = false;
|
||||
mounted = false;
|
||||
if(root.isOpen())
|
||||
root.close();
|
||||
#ifdef SDSLOW
|
||||
|
|
@ -217,40 +219,28 @@ void CardReader::initsd(bool doPresort/* = true*/)
|
|||
SERIAL_ERROR_START;
|
||||
SERIAL_ERRORLNRPGM(_n("volume.init failed"));////MSG_SD_VOL_INIT_FAIL
|
||||
}
|
||||
else if (!root.openRoot(&volume))
|
||||
else if (!root.openRoot(&volume))
|
||||
{
|
||||
SERIAL_ERROR_START;
|
||||
SERIAL_ERRORLNRPGM(_n("openRoot failed"));////MSG_SD_OPENROOT_FAIL
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
cardOK = true;
|
||||
mounted = true;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNRPGM(_n("SD card ok"));////MSG_SD_CARD_OK
|
||||
}
|
||||
workDir=root;
|
||||
curDir=&root;
|
||||
workDirDepth = 0;
|
||||
|
||||
#ifdef SDCARD_SORT_ALPHA
|
||||
if (doPresort)
|
||||
presort();
|
||||
#endif
|
||||
|
||||
/*
|
||||
if(!workDir.openRoot(&volume))
|
||||
if (mounted)
|
||||
{
|
||||
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
||||
cdroot(doPresort);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void CardReader::setroot(bool doPresort)
|
||||
void __attribute__((noinline)) CardReader::cdroot(bool doPresort)
|
||||
{
|
||||
workDir=root;
|
||||
workDirDepth = 0;
|
||||
|
||||
curDir=&workDir;
|
||||
#ifdef SDCARD_SORT_ALPHA
|
||||
if (doPresort)
|
||||
|
|
@ -262,16 +252,17 @@ void CardReader::setroot(bool doPresort)
|
|||
void CardReader::release()
|
||||
{
|
||||
sdprinting = false;
|
||||
cardOK = false;
|
||||
mounted = false;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNRPGM(_n("SD card released"));////MSG_SD_CARD_RELEASED
|
||||
}
|
||||
|
||||
void CardReader::startFileprint()
|
||||
{
|
||||
if(cardOK)
|
||||
if(mounted)
|
||||
{
|
||||
sdprinting = true;
|
||||
SetPrinterState(PrinterState::IsSDPrinting); //set printer state to hide LCD menu
|
||||
#ifdef SDCARD_SORT_ALPHA
|
||||
//flush_presort();
|
||||
#endif
|
||||
|
|
@ -285,7 +276,7 @@ void CardReader::openLogFile(const char* name)
|
|||
}
|
||||
|
||||
void CardReader::getDirName(char* name, uint8_t level)
|
||||
{
|
||||
{
|
||||
workDirParents[level].getFilename(name);
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +291,7 @@ void CardReader::getAbsFilename(char *t)
|
|||
for(uint8_t i=0;i<workDirDepth;i++)
|
||||
{
|
||||
workDirParents[i].getFilename(t); //SDBaseFile.getfilename!
|
||||
while(*t!=0 && cnt< MAXPATHNAMELENGTH)
|
||||
while(*t!=0 && cnt< MAXPATHNAMELENGTH)
|
||||
{t++;cnt++;} //crawl counter forward.
|
||||
}
|
||||
if(cnt < MAXPATHNAMELENGTH - FILENAME_LENGTH)
|
||||
|
|
@ -343,7 +334,7 @@ bool CardReader::diveSubfolder (const char *&fileName)
|
|||
const char *dirname_start, *dirname_end;
|
||||
if (fileName[0] == '/') // absolute path
|
||||
{
|
||||
setroot(false);
|
||||
cdroot(false);
|
||||
dirname_start = fileName + 1;
|
||||
while (*dirname_start)
|
||||
{
|
||||
|
|
@ -393,9 +384,9 @@ static const char ofSDPrinting[] PROGMEM = "SD-PRINTING";
|
|||
static const char ofWritingToFile[] PROGMEM = "Writing to file: ";
|
||||
|
||||
void CardReader::openFileReadFilteredGcode(const char* name, bool replace_current/* = false*/){
|
||||
if(!cardOK)
|
||||
if(!mounted)
|
||||
return;
|
||||
|
||||
|
||||
if(file.isOpen()){ //replacing current file by new file, or subfile call
|
||||
if(!replace_current){
|
||||
if((int)file_subcall_ctr>(int)SD_PROCEDURE_DEPTH-1){
|
||||
|
|
@ -405,15 +396,15 @@ void CardReader::openFileReadFilteredGcode(const char* name, bool replace_curren
|
|||
kill(ofKill);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHORPGM(ofSubroutineCallTgt);
|
||||
SERIAL_ECHO(name);
|
||||
SERIAL_ECHORPGM(ofParent);
|
||||
|
||||
|
||||
//store current filename and position
|
||||
getAbsFilename(filenames[file_subcall_ctr]);
|
||||
|
||||
|
||||
SERIAL_ECHO(filenames[file_subcall_ctr]);
|
||||
SERIAL_ECHORPGM(ofPos);
|
||||
SERIAL_ECHOLN(sdpos);
|
||||
|
|
@ -432,11 +423,11 @@ void CardReader::openFileReadFilteredGcode(const char* name, bool replace_curren
|
|||
SERIAL_ECHOLN(name);
|
||||
}
|
||||
sdprinting = false;
|
||||
|
||||
|
||||
const char *fname=name;
|
||||
if (!diveSubfolder(fname))
|
||||
return;
|
||||
|
||||
|
||||
if (file.openFilteredGcode(curDir, fname)) {
|
||||
getfilename(0, fname);
|
||||
filesize = file.fileSize();
|
||||
|
|
@ -445,7 +436,7 @@ void CardReader::openFileReadFilteredGcode(const char* name, bool replace_curren
|
|||
SERIAL_PROTOCOLRPGM(ofSize);////MSG_SD_SIZE
|
||||
SERIAL_PROTOCOLLN(filesize);
|
||||
sdpos = 0;
|
||||
|
||||
|
||||
SERIAL_PROTOCOLLNRPGM(ofFileSelected);////MSG_SD_FILE_SELECTED
|
||||
lcd_setstatuspgm(ofFileSelected);
|
||||
scrollstuff = 0;
|
||||
|
|
@ -458,7 +449,7 @@ void CardReader::openFileReadFilteredGcode(const char* name, bool replace_curren
|
|||
|
||||
void CardReader::openFileWrite(const char* name)
|
||||
{
|
||||
if(!cardOK)
|
||||
if(!mounted)
|
||||
return;
|
||||
if(file.isOpen()){ //replacing current file by new file, or subfile call
|
||||
#if 0
|
||||
|
|
@ -472,15 +463,15 @@ void CardReader::openFileWrite(const char* name)
|
|||
kill(ofKill);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHORPGM(ofSubroutineCallTgt);
|
||||
SERIAL_ECHO(name);
|
||||
SERIAL_ECHORPGM(ofParent);
|
||||
|
||||
|
||||
//store current filename and position
|
||||
getAbsFilename(filenames[file_subcall_ctr]);
|
||||
|
||||
|
||||
SERIAL_ECHO(filenames[file_subcall_ctr]);
|
||||
SERIAL_ECHORPGM(ofPos);
|
||||
SERIAL_ECHOLN(sdpos);
|
||||
|
|
@ -497,11 +488,11 @@ void CardReader::openFileWrite(const char* name)
|
|||
SERIAL_ECHOLN(name);
|
||||
}
|
||||
sdprinting = false;
|
||||
|
||||
|
||||
const char *fname=name;
|
||||
if (!diveSubfolder(fname))
|
||||
return;
|
||||
|
||||
|
||||
//write
|
||||
if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)){
|
||||
SERIAL_PROTOCOLRPGM(MSG_SD_OPEN_FILE_FAIL);
|
||||
|
|
@ -513,7 +504,7 @@ void CardReader::openFileWrite(const char* name)
|
|||
SERIAL_PROTOCOLRPGM(ofWritingToFile);////MSG_SD_WRITE_TO_FILE
|
||||
printAbsFilenameFast();
|
||||
SERIAL_PROTOCOLLN();
|
||||
|
||||
|
||||
SERIAL_PROTOCOLLNRPGM(ofFileSelected);////MSG_SD_FILE_SELECTED
|
||||
lcd_setstatuspgm(ofFileSelected);
|
||||
scrollstuff = 0;
|
||||
|
|
@ -522,7 +513,7 @@ void CardReader::openFileWrite(const char* name)
|
|||
|
||||
void CardReader::removeFile(const char* name)
|
||||
{
|
||||
if(!cardOK) return;
|
||||
if(!mounted) return;
|
||||
file.close();
|
||||
sdprinting = false;
|
||||
|
||||
|
|
@ -530,7 +521,7 @@ void CardReader::removeFile(const char* name)
|
|||
if (!diveSubfolder(fname))
|
||||
return;
|
||||
|
||||
if (file.remove(curDir, fname))
|
||||
if (file.remove(curDir, fname))
|
||||
{
|
||||
SERIAL_PROTOCOLPGM("File deleted:");
|
||||
SERIAL_PROTOCOLLN(fname);
|
||||
|
|
@ -545,7 +536,7 @@ void CardReader::removeFile(const char* name)
|
|||
SERIAL_PROTOCOL(fname);
|
||||
SERIAL_PROTOCOLLN('.');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
uint32_t CardReader::getFileSize()
|
||||
|
|
@ -555,9 +546,9 @@ uint32_t CardReader::getFileSize()
|
|||
|
||||
void CardReader::getStatus(bool arg_P)
|
||||
{
|
||||
if (isPrintPaused)
|
||||
if (printingIsPaused())
|
||||
{
|
||||
if (saved_printing && (saved_printing_type == PRINTING_TYPE_SD))
|
||||
if (saved_printing && (saved_printing_type == PowerPanic::PRINT_TYPE_SD))
|
||||
SERIAL_PROTOCOLLNPGM("SD print paused");
|
||||
else
|
||||
SERIAL_PROTOCOLLNPGM("Print saved");
|
||||
|
|
@ -571,12 +562,12 @@ void CardReader::getStatus(bool arg_P)
|
|||
}
|
||||
else
|
||||
SERIAL_PROTOCOLLN(LONGEST_FILENAME);
|
||||
|
||||
|
||||
SERIAL_PROTOCOLRPGM(_N("SD printing byte "));////MSG_SD_PRINTING_BYTE
|
||||
SERIAL_PROTOCOL(sdpos);
|
||||
SERIAL_PROTOCOL('/');
|
||||
SERIAL_PROTOCOLLN(filesize);
|
||||
uint16_t time = ( _millis() - starttime ) / 60000U;
|
||||
uint16_t time = print_job_timer.duration() / 60;
|
||||
SERIAL_PROTOCOL((int)(time / 60));
|
||||
SERIAL_PROTOCOL(':');
|
||||
SERIAL_PROTOCOLLN((int)(time % 60));
|
||||
|
|
@ -614,7 +605,7 @@ void CardReader::checkautostart(bool force)
|
|||
{
|
||||
// The SD start is delayed because otherwise the serial cannot answer
|
||||
// fast enough to make contact with the host software.
|
||||
static bool autostart_stilltocheck = true;
|
||||
static bool autostart_stilltocheck = true;
|
||||
if(!force)
|
||||
{
|
||||
if(!autostart_stilltocheck)
|
||||
|
|
@ -623,13 +614,13 @@ void CardReader::checkautostart(bool force)
|
|||
return;
|
||||
}
|
||||
autostart_stilltocheck = false;
|
||||
if(!cardOK)
|
||||
if(!mounted)
|
||||
{
|
||||
initsd();
|
||||
if(!cardOK) //fail
|
||||
mount();
|
||||
if(!mounted) //fail
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
char autoname[30];
|
||||
sprintf_P(autoname, PSTR("auto%i.g"), lastnr);
|
||||
for(int8_t i=0;i<(int8_t)strlen(autoname);i++)
|
||||
|
|
@ -637,9 +628,9 @@ void CardReader::checkautostart(bool force)
|
|||
dir_t p;
|
||||
|
||||
root.rewind();
|
||||
|
||||
|
||||
bool found=false;
|
||||
while (root.readDir(p, NULL) > 0)
|
||||
while (root.readDir(p, NULL) > 0)
|
||||
{
|
||||
for(int8_t i=0;i<(int8_t)strlen((char*)p.name);i++)
|
||||
p.name[i]=tolower(p.name[i]);
|
||||
|
|
@ -666,17 +657,17 @@ void CardReader::closefile(bool store_location)
|
|||
{
|
||||
file.sync();
|
||||
file.close();
|
||||
saving = false;
|
||||
saving = false;
|
||||
logging = false;
|
||||
|
||||
|
||||
if(store_location)
|
||||
{
|
||||
//future: store printer state, filename and position for continuing a stopped print
|
||||
// so one can unplug the printer and continue printing the next day.
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/)
|
||||
|
|
@ -685,7 +676,7 @@ void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/)
|
|||
nrFiles=nr;
|
||||
curDir->rewind();
|
||||
lsDive("",*curDir,match, LS_GetFilename);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CardReader::getfilename_simple(uint16_t entry, const char * const match/*=NULL*/)
|
||||
|
|
@ -718,10 +709,10 @@ bool CardReader::chdir(const char * relpath, bool doPresort)
|
|||
{
|
||||
SdFile newfile;
|
||||
SdFile *parent=&root;
|
||||
|
||||
|
||||
if(workDir.isOpen())
|
||||
parent=&workDir;
|
||||
|
||||
|
||||
if(!newfile.open(*parent,relpath, O_READ) || ((workDirDepth + 1) >= MAX_DIR_DEPTH))
|
||||
{
|
||||
SERIAL_ECHO_START;
|
||||
|
|
@ -798,7 +789,7 @@ void CardReader::getfilename_afterMaxSorting(uint16_t entry, const char * const
|
|||
void CardReader::presort() {
|
||||
// Throw away old sort index
|
||||
flush_presort();
|
||||
|
||||
|
||||
if (IS_SD_INSERTED == false) return; //sorting is not used in farm mode
|
||||
uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
|
||||
|
||||
|
|
@ -811,13 +802,13 @@ void CardReader::presort() {
|
|||
// If you use folders to organize, 20 may be enough
|
||||
if (fileCnt > SDSORT_LIMIT) {
|
||||
if ((sdSort != SD_SORT_NONE) && !farm_mode) {
|
||||
lcd_show_fullscreen_message_and_wait_P(_i("Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."));////MSG_FILE_CNT c=20 r=6
|
||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_FILE_CNT));
|
||||
}
|
||||
fileCnt = SDSORT_LIMIT;
|
||||
}
|
||||
|
||||
sort_count = fileCnt;
|
||||
|
||||
|
||||
// Init sort order.
|
||||
for (uint16_t i = 0; i < fileCnt; i++) {
|
||||
if (!IS_SD_INSERTED) return;
|
||||
|
|
@ -876,14 +867,14 @@ void CardReader::presort() {
|
|||
uint16_t j = i;
|
||||
for (; j > 0; --j){
|
||||
if (!IS_SD_INSERTED) return;
|
||||
|
||||
|
||||
#ifdef SORTING_DUMP
|
||||
for (uint16_t z = 0; z < fileCnt; z++){
|
||||
printf_P(PSTR("%2u "), sort_entries[z]);
|
||||
}
|
||||
MYSERIAL.println();
|
||||
#endif
|
||||
|
||||
|
||||
manage_heater();
|
||||
const uint16_t o2 = sort_entries[j - 1];
|
||||
|
||||
|
|
@ -903,7 +894,7 @@ void CardReader::presort() {
|
|||
} else {
|
||||
#ifdef SORTING_DUMP
|
||||
puts_P(PSTR("shift"));
|
||||
#endif
|
||||
#endif
|
||||
sort_entries[j] = o2;
|
||||
}
|
||||
}
|
||||
|
|
@ -966,7 +957,7 @@ void CardReader::presort() {
|
|||
#ifdef SORTING_DUMP
|
||||
puts_P(PSTR("swap"));
|
||||
#endif
|
||||
|
||||
|
||||
sort_entries[j] = o2;
|
||||
sort_entries[j + 1] = o1;
|
||||
didSwap = true;
|
||||
|
|
@ -975,11 +966,11 @@ void CardReader::presort() {
|
|||
if (!didSwap) break;
|
||||
} //end of bubble sort loop
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SORTING_SPEEDTEST
|
||||
printf_P(PSTR("sortingSpeedtestTimer:%lu\n"), sortingSpeedtestTimer.elapsed());
|
||||
#endif //SORTING_SPEEDTEST
|
||||
|
||||
|
||||
#ifdef SORTING_DUMP
|
||||
for (uint16_t z = 0; z < fileCnt; z++)
|
||||
printf_P(PSTR("%2u "), sort_entries[z]);
|
||||
|
|
@ -1017,6 +1008,7 @@ void CardReader::printingHasFinished()
|
|||
else
|
||||
{
|
||||
sdprinting = false;
|
||||
SetPrinterState(PrinterState::SDPrintingFinished); //set printer state to show LCD menu after finished SD print
|
||||
if(SD_FINISHED_STEPPERRELEASE)
|
||||
{
|
||||
finishAndDisableSteppers();
|
||||
|
|
@ -1035,4 +1027,17 @@ bool CardReader::ToshibaFlashAir_GetIP(uint8_t *ip)
|
|||
return card.readExtMemory(1, 1, 0x400+0x150, 4, ip);
|
||||
}
|
||||
|
||||
//Used for Reprint action
|
||||
bool CardReader::FileExists(const char* filename)
|
||||
{
|
||||
bool exists = false;
|
||||
|
||||
if (file.open(curDir, filename, O_READ))
|
||||
{
|
||||
exists = true;
|
||||
file.close();
|
||||
}
|
||||
return exists;
|
||||
}
|
||||
|
||||
#endif //SDSUPPORT
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class CardReader
|
|||
{
|
||||
public:
|
||||
CardReader();
|
||||
|
||||
|
||||
enum LsAction : uint8_t
|
||||
{
|
||||
LS_SerialPrint,
|
||||
|
|
@ -26,14 +26,14 @@ public:
|
|||
inline ls_param():LFN(0), timestamp(0) { }
|
||||
inline ls_param(bool LFN, bool timestamp):LFN(LFN), timestamp(timestamp) { }
|
||||
} __attribute__((packed));
|
||||
|
||||
void initsd(bool doPresort = true);
|
||||
|
||||
void mount(bool doPresort = true);
|
||||
void write_command(char *buf);
|
||||
void write_command_no_newline(char *buf);
|
||||
//files auto[0-9].g on the sd card are performed in a row
|
||||
//this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
|
||||
|
||||
void checkautostart(bool x);
|
||||
void checkautostart(bool x);
|
||||
void openFileWrite(const char* name);
|
||||
void openFileReadFilteredGcode(const char* name, bool replace_current = false);
|
||||
void openLogFile(const char* name);
|
||||
|
|
@ -49,17 +49,16 @@ public:
|
|||
void getfilename_simple(uint16_t entry, const char * const match = NULL);
|
||||
void getfilename_next(uint32_t position, const char * const match = NULL);
|
||||
uint16_t getnrfilenames();
|
||||
|
||||
|
||||
void getAbsFilename(char *t);
|
||||
void printAbsFilenameFast();
|
||||
void getDirName(char* name, uint8_t level);
|
||||
uint8_t getWorkDirDepth();
|
||||
|
||||
|
||||
void ls(ls_param params);
|
||||
bool chdir(const char * relpath, bool doPresort);
|
||||
void updir();
|
||||
void setroot(bool doPresort);
|
||||
void cdroot(bool doPresort);
|
||||
|
||||
#ifdef SDCARD_SORT_ALPHA
|
||||
void presort();
|
||||
|
|
@ -84,11 +83,14 @@ public:
|
|||
void ToshibaFlashAir_enable(bool enable) { card.setFlashAirCompatible(enable); }
|
||||
bool ToshibaFlashAir_GetIP(uint8_t *ip);
|
||||
|
||||
//Reprint
|
||||
bool FileExists(const char* filename);
|
||||
|
||||
public:
|
||||
bool saving;
|
||||
bool logging;
|
||||
bool sdprinting ;
|
||||
bool cardOK ;
|
||||
bool sdprinting;
|
||||
bool mounted;
|
||||
char filename[FILENAME_LENGTH];
|
||||
// There are scenarios when simple modification time is not enough (on MS Windows)
|
||||
// Therefore these timestamps hold the most recent one of creation/modification date/times
|
||||
|
|
@ -144,7 +146,7 @@ extern CardReader card;
|
|||
#define IS_SD_PRINTING (card.sdprinting)
|
||||
|
||||
#if (SDCARDDETECT > -1)
|
||||
# ifdef SDCARDDETECTINVERTED
|
||||
# ifdef SDCARDDETECTINVERTED
|
||||
# define IS_SD_INSERTED (READ(SDCARDDETECT)!=0)
|
||||
# else
|
||||
# define IS_SD_INSERTED (READ(SDCARDDETECT)==0)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
#include "ultralcd.h"
|
||||
#include "Prusa_farm.h"
|
||||
#include "meatpack.h"
|
||||
#include "messages.h"
|
||||
#include "language.h"
|
||||
#include "stopwatch.h"
|
||||
#include "power_panic.h"
|
||||
|
||||
// Reserve BUFSIZE lines of length MAX_CMD_SIZE plus CMDBUFFER_RESERVE_FRONT.
|
||||
char cmdbuffer[BUFSIZE * (MAX_CMD_SIZE + 1) + CMDBUFFER_RESERVE_FRONT];
|
||||
|
|
@ -104,7 +108,7 @@ void cmdqueue_reset()
|
|||
//commands are removed from command queue after process_command() function is finished
|
||||
//reseting command queue and enqueing new commands during some (usually long running) command processing would cause that new commands are immediately removed from queue (or damaged)
|
||||
//this will ensure that all new commands which are enqueued after cmdqueue reset, will be always executed
|
||||
cmdbuffer_front_already_processed = true;
|
||||
cmdbuffer_front_already_processed = true;
|
||||
}
|
||||
|
||||
// How long a string could be pushed to the front of the command queue?
|
||||
|
|
@ -350,7 +354,7 @@ void enquecommand_front(const char *cmd, bool from_progmem)
|
|||
void repeatcommand_front()
|
||||
{
|
||||
cmdbuffer_front_already_processed = true;
|
||||
}
|
||||
}
|
||||
|
||||
void get_command()
|
||||
{
|
||||
|
|
@ -364,8 +368,8 @@ void get_command()
|
|||
}
|
||||
|
||||
// start of serial line processing loop
|
||||
while (((MYSERIAL.available() > 0 && !saved_printing) || (MYSERIAL.available() > 0 && isPrintPaused)) && !cmdqueue_serial_disabled) { //is print is saved (crash detection or filament detection), dont process data from serial line
|
||||
|
||||
while (((MYSERIAL.available() > 0 && !saved_printing) || (MYSERIAL.available() > 0 && printingIsPaused())) && !cmdqueue_serial_disabled) { //is print is saved (crash detection or filament detection), dont process data from serial line
|
||||
|
||||
#ifdef ENABLE_MEATPACK
|
||||
// MeatPack Changes
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
@ -477,9 +481,11 @@ void get_command()
|
|||
allow_when_stopped = true;
|
||||
|
||||
// Handle the USB timer
|
||||
if ((*cmd_start == 'G') && !(IS_SD_PRINTING))
|
||||
if ((*cmd_start == 'G') && (GetPrinterState() != PrinterState::IsSDPrinting)) {
|
||||
usb_timer.start();
|
||||
|
||||
SetPrinterState(PrinterState::IsHostPrinting); //set printer state busy printing to hide LCD menu while USB printing
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY);
|
||||
}
|
||||
if (allow_when_stopped == false && Stopped == true) {
|
||||
// Stopped can be set either during error states (thermal error: cannot continue), or
|
||||
// when a printer-initiated action is processed. In such case the printer will send to
|
||||
|
|
@ -590,9 +596,9 @@ void get_command()
|
|||
{
|
||||
// This is either an empty line, or a line with just a comment.
|
||||
// Continue to the following line, and continue accumulating the number of bytes
|
||||
// read from the sdcard into sd_count,
|
||||
// read from the sdcard into sd_count,
|
||||
// so that the length of the already read empty lines and comments will be added
|
||||
// to the following non-empty line.
|
||||
// to the following non-empty line.
|
||||
return; // prevent cycling indefinitely - let manage_heaters do their job
|
||||
}
|
||||
// The new command buffer could be updated non-atomically, because it is not yet considered
|
||||
|
|
@ -629,7 +635,7 @@ void get_command()
|
|||
|
||||
comment_mode = false; //for new command
|
||||
serial_count = 0; //clear buffer
|
||||
|
||||
|
||||
if(card.eof()) break;
|
||||
|
||||
// The following line will reserve buffer space if available.
|
||||
|
|
@ -656,16 +662,17 @@ void get_command()
|
|||
|
||||
SERIAL_PROTOCOLLNRPGM(_n("Done printing file"));////MSG_FILE_PRINTED
|
||||
char time[30];
|
||||
uint32_t t = (_millis() - starttime - pause_time) / 60000;
|
||||
pause_time = 0;
|
||||
uint32_t t = print_job_timer.duration() / 60;
|
||||
int hours, minutes;
|
||||
minutes = t % 60;
|
||||
hours = t / 60;
|
||||
save_statistics(total_filament_used, t);
|
||||
save_statistics();
|
||||
sprintf_P(time, PSTR("%i hours %i minutes"),hours, minutes);
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLN(time);
|
||||
#ifndef SHOW_FILENAME_AFTER_FINISH
|
||||
lcd_setstatus(time);
|
||||
#endif //SHOW_FILENAME_AFTER_FINISH
|
||||
card.printingHasFinished();
|
||||
card.checkautostart(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@
|
|||
#define CMDQUEUE_H
|
||||
|
||||
#include "Marlin.h"
|
||||
#include "language.h"
|
||||
|
||||
|
||||
// String circular buffer. Commands may be pushed to the buffer from both sides:
|
||||
// Chained commands will be pushed to the front, interactive (from LCD menu)
|
||||
// Chained commands will be pushed to the front, interactive (from LCD menu)
|
||||
// and printing commands (from serial line or from SD card) are pushed to the tail.
|
||||
// First character of each entry indicates the type of the entry:
|
||||
// First character of each entry indicates the type of the entry:
|
||||
#define CMDBUFFER_CURRENT_TYPE_UNKNOWN 0
|
||||
// Command in cmdbuffer was sent over USB.
|
||||
#define CMDBUFFER_CURRENT_TYPE_USB 1
|
||||
|
|
@ -18,8 +16,8 @@
|
|||
#define CMDBUFFER_CURRENT_TYPE_UI 3
|
||||
// Command in cmdbuffer was generated by another G-code.
|
||||
#define CMDBUFFER_CURRENT_TYPE_CHAINED 4
|
||||
// Command has been processed and its SD card length has been possibly pushed
|
||||
// to the planner queue, but not yet removed from the cmdqueue.
|
||||
// Command has been processed and its SD card length has been possibly pushed
|
||||
// to the planner queue, but not yet removed from the cmdqueue.
|
||||
// This is a temporary state to reduce stepper interrupt locking time.
|
||||
#define CMDBUFFER_CURRENT_TYPE_TO_BE_REMOVED 5
|
||||
//Command in cmdbuffer was sent over USB and contains line number
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
#define LANG_SIZE_RESERVED 0x3500 // reserved space for secondary language (13568 bytes).
|
||||
// 0x3D00 Maximum 15616 bytes as it depends on xflash_layout.h
|
||||
// 16 Languages max. per group including stock
|
||||
// 16 Languages max. per group including stock
|
||||
|
||||
#if (LANG_SIZE_RESERVED % 256)
|
||||
#error "LANG_SIZE_RESERVED should be a multiple of a page size"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
#include <avr/eeprom.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
#include "language.h"
|
||||
|
||||
void eeprom_init()
|
||||
{
|
||||
eeprom_init_default_byte((uint8_t*)EEPROM_POWER_COUNT, 0);
|
||||
|
|
@ -29,13 +26,13 @@ void eeprom_init()
|
|||
eeprom_init_default_dword((uint32_t*)EEPROM_MMU_MATERIAL_CHANGES, 0);
|
||||
if (eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)) == EEPROM_EMPTY_VALUE)
|
||||
{
|
||||
eeprom_update_byte(&(EEPROM_Sheets_base->active_sheet), 0);
|
||||
eeprom_update_byte_notify(&(EEPROM_Sheets_base->active_sheet), 0);
|
||||
// When upgrading from version older version (before multiple sheets were implemented in v3.8.0)
|
||||
// Sheet 1 uses the previous Live adjust Z (@EEPROM_BABYSTEP_Z)
|
||||
int last_babystep = eeprom_read_word((uint16_t *)EEPROM_BABYSTEP_Z);
|
||||
eeprom_update_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[0].z_offset)), last_babystep);
|
||||
}
|
||||
|
||||
|
||||
// initialize the sheet names in eeprom
|
||||
for (uint_least8_t i = 0; i < (sizeof(Sheets::s)/sizeof(Sheets::s[0])); i++) {
|
||||
SheetName sheetName;
|
||||
|
|
@ -49,6 +46,12 @@ void eeprom_init()
|
|||
}
|
||||
check_babystep();
|
||||
|
||||
// initialize custom mendel name in eeprom
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_MENDEL_NAME) == EEPROM_EMPTY_VALUE) {
|
||||
//SERIAL_ECHOLN("Init Custom Mendel Name");
|
||||
eeprom_update_block_notify(CUSTOM_MENDEL_NAME, (uint8_t*)EEPROM_CUSTOM_MENDEL_NAME, sizeof(CUSTOM_MENDEL_NAME));
|
||||
} //else SERIAL_ECHOLN("Found Custom Mendel Name");
|
||||
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
eeprom_init_default_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION, 0);
|
||||
#endif //PINDA_TEMP_COMP
|
||||
|
|
@ -63,11 +66,11 @@ void eeprom_init()
|
|||
}
|
||||
|
||||
void eeprom_adjust_bed_reset() {
|
||||
eeprom_update_byte((uint8_t*)EEPROM_BED_CORRECTION_VALID, 1);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_BED_CORRECTION_LEFT, 0);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_BED_CORRECTION_RIGHT, 0);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_BED_CORRECTION_FRONT, 0);
|
||||
eeprom_update_byte((uint8_t*)EEPROM_BED_CORRECTION_REAR, 0);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_BED_CORRECTION_VALID, 1);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_BED_CORRECTION_LEFT, 0);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_BED_CORRECTION_RIGHT, 0);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_BED_CORRECTION_FRONT, 0);
|
||||
eeprom_update_byte_notify((uint8_t*)EEPROM_BED_CORRECTION_REAR, 0);
|
||||
}
|
||||
|
||||
//! @brief Get default sheet name for index
|
||||
|
|
@ -134,12 +137,175 @@ int8_t eeprom_next_initialized_sheet(int8_t sheet)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_EEPROM_CHANGES
|
||||
static void eeprom_byte_notify(uint8_t *dst, uint8_t previous_value, uint8_t value, bool write) {
|
||||
printf_P(PSTR("EEPROMChng b %s %u %d -> %d\n"), write ? "write":"", dst , previous_value, value);
|
||||
}
|
||||
|
||||
static void eeprom_word_notify(uint16_t *dst, uint16_t previous_value, uint16_t value, bool write) {
|
||||
printf_P(PSTR("EEPROMChng w %s %u %u -> %u\n"), write ? "write":"", dst , previous_value, value);
|
||||
}
|
||||
|
||||
static void eeprom_dword_notify(uint32_t *dst, uint32_t previous_value, uint32_t value, bool write) {
|
||||
printf_P(PSTR("EEPROMChng d %s %u %x -> %x\n"), write ? "write":"", reinterpret_cast<const uint16_t>(dst) , previous_value, value);
|
||||
}
|
||||
|
||||
static void eeprom_float_notify(float *dst, float previous_value, float value, bool write) {
|
||||
printf_P(PSTR("EEPROMChng f %s %u %f -> %f\n"), write ? "write":"", reinterpret_cast<const uint16_t>(dst) , previous_value, value);
|
||||
}
|
||||
|
||||
static void eeprom_block_notify(void *dst, const uint8_t *previous_values, const uint8_t *values, size_t size, bool write) {
|
||||
for(size_t i = 0; i < size; ++i){
|
||||
if (previous_values[i] != values[i] || write) {
|
||||
printf_P(PSTR("EEPROMChng bl %s %u %x -> %x\n"), write ? "write":"", reinterpret_cast<const uint16_t>(dst) + i, previous_values[i], values[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_byte_notify(uint8_t *dst, uint8_t value){
|
||||
#else
|
||||
void eeprom_write_byte_notify(uint8_t *dst, uint8_t value, bool active){
|
||||
if (active) {
|
||||
uint8_t previous_value = eeprom_read_byte(dst);
|
||||
eeprom_byte_notify(dst, previous_value, value, true);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_write_byte(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_update_byte_notify(uint8_t *dst, uint8_t value){
|
||||
#else
|
||||
void eeprom_update_byte_notify(uint8_t *dst, uint8_t value, bool active){
|
||||
|
||||
if (active) {
|
||||
uint8_t previous_value = eeprom_read_byte(dst);
|
||||
if (previous_value != value) {
|
||||
eeprom_byte_notify(dst, previous_value, value, false);
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_update_byte(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_word_notify(uint16_t *dst, uint16_t value){
|
||||
#else
|
||||
void eeprom_write_word_notify(uint16_t *dst, uint16_t value, bool active){
|
||||
if (active) {
|
||||
uint16_t previous_value = eeprom_read_word(dst);
|
||||
eeprom_word_notify(dst, previous_value, value, true);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_write_word(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_update_word_notify(uint16_t *dst, uint16_t value){
|
||||
#else
|
||||
void eeprom_update_word_notify(uint16_t *dst, uint16_t value, bool active){
|
||||
if (active) {
|
||||
uint16_t previous_value = eeprom_read_word(dst);
|
||||
if (previous_value != value) {
|
||||
eeprom_word_notify(dst, previous_value, value, false);
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_update_word(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_dword_notify(uint32_t *dst, uint32_t value){
|
||||
#else
|
||||
void eeprom_write_dword_notify(uint32_t *dst, uint32_t value, bool active){
|
||||
if (active) {
|
||||
uint32_t previous_value = eeprom_read_dword(dst);
|
||||
eeprom_dword_notify(dst, previous_value, value, true);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_write_dword(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_update_dword_notify(uint32_t *dst, uint32_t value){
|
||||
#else
|
||||
void eeprom_update_dword_notify(uint32_t *dst, uint32_t value, bool active){
|
||||
if (active) {
|
||||
uint32_t previous_value = eeprom_read_dword(dst);
|
||||
if (previous_value != value) {
|
||||
eeprom_dword_notify(dst, previous_value, value, false);
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_update_dword(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_float_notify(float *dst, float value){
|
||||
#else
|
||||
void eeprom_write_float_notify(float *dst, float value, bool active){
|
||||
if (active) {
|
||||
float previous_value = eeprom_read_float(dst);
|
||||
eeprom_float_notify(dst, previous_value, value, true);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_write_float(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_update_float_notify(float *dst, float value){
|
||||
#else
|
||||
void eeprom_update_float_notify(float *dst, float value, bool active){
|
||||
if (active) {
|
||||
float previous_value = eeprom_read_float(dst);
|
||||
if (previous_value != value) {
|
||||
eeprom_float_notify(dst, previous_value, value, false);
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
eeprom_update_float(dst, value);
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_block_notify(const void *__src, void *__dst, size_t __n){
|
||||
eeprom_write_block(__src, __dst, __n);
|
||||
#else
|
||||
void eeprom_write_block_notify(const void *__src, void *__dst, size_t __n, bool active){
|
||||
if (active) {
|
||||
uint8_t previous_values[__n];
|
||||
uint8_t new_values[__n];
|
||||
eeprom_read_block(previous_values, __dst, __n);
|
||||
eeprom_write_block(__src, __dst, __n);
|
||||
eeprom_read_block(new_values, __dst, __n);
|
||||
eeprom_block_notify(__dst, previous_values, new_values, __n, true);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
}
|
||||
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_update_block_notify(const void *__src, void *__dst, size_t __n){
|
||||
eeprom_update_block(__src, __dst, __n);
|
||||
#else
|
||||
void eeprom_update_block_notify(const void *__src, void *__dst, size_t __n, bool active){
|
||||
if (active) {
|
||||
uint8_t previous_values[__n];
|
||||
uint8_t new_values[__n];
|
||||
eeprom_read_block(previous_values, __dst, __n);
|
||||
eeprom_update_block(__src, __dst, __n);
|
||||
eeprom_read_block(new_values, __dst, __n);
|
||||
eeprom_block_notify(__dst, previous_values, new_values, __n, false);
|
||||
}
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
}
|
||||
|
||||
void eeprom_switch_to_next_sheet()
|
||||
{
|
||||
int8_t sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet));
|
||||
|
||||
sheet = eeprom_next_initialized_sheet(sheet);
|
||||
if (sheet >= 0) eeprom_update_byte(&(EEPROM_Sheets_base->active_sheet), sheet);
|
||||
if (sheet >= 0) eeprom_update_byte_notify(&(EEPROM_Sheets_base->active_sheet), sheet);
|
||||
}
|
||||
|
||||
bool __attribute__((noinline)) eeprom_is_sheet_initialized(uint8_t sheet_num) {
|
||||
|
|
@ -160,44 +326,44 @@ void eeprom_update_block_P(const void *__src, void *__dst, size_t __n) {
|
|||
const uint8_t *src = (const uint8_t*)__src;
|
||||
uint8_t *dst = (uint8_t*)__dst;
|
||||
while (__n--) {
|
||||
eeprom_update_byte(dst++, pgm_read_byte(src++));
|
||||
eeprom_update_byte_notify(dst++, pgm_read_byte(src++));
|
||||
}
|
||||
}
|
||||
|
||||
void eeprom_toggle(uint8_t *__p) {
|
||||
eeprom_write_byte(__p, !eeprom_read_byte(__p));
|
||||
eeprom_write_byte_notify(__p, !eeprom_read_byte(__p));
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_increment_byte(uint8_t *__p) {
|
||||
eeprom_write_byte(__p, eeprom_read_byte(__p) + 1);
|
||||
eeprom_write_byte_notify(__p, eeprom_read_byte(__p) + 1);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_increment_word(uint16_t *__p) {
|
||||
eeprom_write_word(__p, eeprom_read_word(__p) + 1);
|
||||
eeprom_write_word_notify(__p, eeprom_read_word(__p) + 1);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_increment_dword(uint32_t *__p) {
|
||||
eeprom_write_dword(__p, eeprom_read_dword(__p) + 1);
|
||||
eeprom_write_dword_notify(__p, eeprom_read_dword(__p) + 1);
|
||||
}
|
||||
|
||||
|
||||
void __attribute__((noinline)) eeprom_add_byte(uint8_t *__p, uint8_t add) {
|
||||
eeprom_write_byte(__p, eeprom_read_byte(__p) + add);
|
||||
eeprom_write_byte_notify(__p, eeprom_read_byte(__p) + add);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_add_word(uint16_t *__p, uint16_t add) {
|
||||
eeprom_write_word(__p, eeprom_read_word(__p) + add);
|
||||
eeprom_write_word_notify(__p, eeprom_read_word(__p) + add);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_add_dword(uint32_t *__p, uint32_t add) {
|
||||
eeprom_write_dword(__p, eeprom_read_dword(__p) + add);
|
||||
eeprom_write_dword_notify(__p, eeprom_read_dword(__p) + add);
|
||||
}
|
||||
|
||||
|
||||
uint8_t __attribute__((noinline)) eeprom_init_default_byte(uint8_t *__p, uint8_t def) {
|
||||
uint8_t val = eeprom_read_byte(__p);
|
||||
if (val == EEPROM_EMPTY_VALUE) {
|
||||
eeprom_write_byte(__p, def);
|
||||
eeprom_write_byte_notify(__p, def);
|
||||
return def;
|
||||
}
|
||||
return val;
|
||||
|
|
@ -206,7 +372,7 @@ uint8_t __attribute__((noinline)) eeprom_init_default_byte(uint8_t *__p, uint8_t
|
|||
uint16_t __attribute__((noinline)) eeprom_init_default_word(uint16_t *__p, uint16_t def) {
|
||||
uint16_t val = eeprom_read_word(__p);
|
||||
if (val == EEPROM_EMPTY_VALUE16) {
|
||||
eeprom_write_word(__p, def);
|
||||
eeprom_write_word_notify(__p, def);
|
||||
return def;
|
||||
}
|
||||
return val;
|
||||
|
|
@ -215,7 +381,7 @@ uint16_t __attribute__((noinline)) eeprom_init_default_word(uint16_t *__p, uint1
|
|||
uint32_t __attribute__((noinline)) eeprom_init_default_dword(uint32_t *__p, uint32_t def) {
|
||||
uint32_t val = eeprom_read_dword(__p);
|
||||
if (val == EEPROM_EMPTY_VALUE32) {
|
||||
eeprom_write_dword(__p, def);
|
||||
eeprom_write_dword_notify(__p, def);
|
||||
return def;
|
||||
}
|
||||
return val;
|
||||
|
|
@ -223,12 +389,12 @@ uint32_t __attribute__((noinline)) eeprom_init_default_dword(uint32_t *__p, uint
|
|||
|
||||
void __attribute__((noinline)) eeprom_init_default_float(float *__p, float def) {
|
||||
if (eeprom_read_dword((uint32_t*)__p) == EEPROM_EMPTY_VALUE32)
|
||||
eeprom_write_float(__p, def);
|
||||
eeprom_write_float_notify(__p, def);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_init_default_block(void *__p, size_t __n, const void *def) {
|
||||
if (!eeprom_is_initialized_block(__p, __n))
|
||||
eeprom_update_block(def, __p, __n);
|
||||
eeprom_update_block_notify(def, __p, __n);
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) eeprom_init_default_block_P(void *__p, size_t __n, const void *def) {
|
||||
|
|
|
|||
|
|
@ -12,13 +12,24 @@
|
|||
#define EEPROM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "Configuration_var.h"
|
||||
|
||||
// Custom Mendel Name
|
||||
#ifndef CUSTOM_MENDEL_NAME
|
||||
#define CUSTOM_MENDEL_NAME "Prusa i3"
|
||||
#endif
|
||||
|
||||
#define MAX_CUSTOM_MENDEL_NAME_LENGTH 17
|
||||
|
||||
|
||||
// Sheets
|
||||
#define MAX_SHEETS 8
|
||||
#define MAX_SHEET_NAME_LENGTH 7
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[MAX_SHEET_NAME_LENGTH]; //!< Can be null terminated, doesn't need to be null terminated
|
||||
unsigned char name[MAX_SHEET_NAME_LENGTH]; //!< Can be null terminated, doesn't need to be null terminated
|
||||
int16_t z_offset; //!< Z_BABYSTEP_MIN .. Z_BABYSTEP_MAX = Z_BABYSTEP_MIN*2/1000 [mm] .. Z_BABYSTEP_MAX*2/1000 [mm]
|
||||
uint8_t bed_temp; //!< 0 .. 254 [°C] NOTE: currently only written-to and never used
|
||||
uint8_t pinda_temp; //!< 0 .. 254 [°C] NOTE: currently only written-to and never used
|
||||
|
|
@ -73,7 +84,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
|
||||
To convert hex to dec https://www.rapidtables.com/convert/number/hex-to-decimal.html
|
||||
|
||||
Version: 1.0.2
|
||||
Version: 3.14.1
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -85,19 +96,19 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 02h 2 | ^ | miniRambo Auto mode | ^ | ^
|
||||
| 0x0FFE 4094 | uchar | EEPROM_LANG | 00h 0 | ffh 255 __L__ | English / LANG_ID_PRI | LCD menu | D3 Ax0ffe C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Other language LANG_ID_SEC | ^ | ^
|
||||
| 0x0FFC 4092 | uint16 | EEPROM_BABYSTEP_X | ??? | ff ffh 65535 | Babystep for X axis _unsued_ | ??? | D3 Ax0ffc C2
|
||||
| 0x0FFA 4090 | uint16 | EEPROM_BABYSTEP_Y | ??? | ff ffh 65535 | Babystep for Y axis _unsued_ | ^ | D3 Ax0ffa C2
|
||||
| 0x0FF8 4088 | uint16 | EEPROM_BABYSTEP_Z | ??? | ff ffh 65535 | Babystep for Z axis _lagacy_ | ^ | D3 Ax0ff8 C2
|
||||
| 0x0FFC 4092 | uint16 | _EEPROM_FREE_NR10_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0ffc C2
|
||||
| 0x0FFA 4090 | uint16 | _EEPROM_FREE_NR11_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0ffa C2
|
||||
| 0x0FF8 4088 | uint16 | EEPROM_BABYSTEP_Z | ??? | ff ffh 65535 | Babystep for Z axis _legacy_ | ??? | D3 Ax0ff8 C2
|
||||
| ^ | ^ | ^ | ^ | ^ | multiple values stored now in EEPROM_Sheets_base | ^ | ^
|
||||
| 0x0FF7 4087 | uint8 | EEPROM_CALIBRATION_STATUS_V1 | ffh 255 | ffh 255 | Calibration status (<v3.12) | ??? | D3 Ax0ff7 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Calibrated | ^ | ^
|
||||
| ^ | ^ | ^ | e6h 230 | ^ | needs Live Z adjustment | ^ | ^
|
||||
| ^ | ^ | ^ | ebh 235 | ^ | needs Temp Model calibration | ^ | ^
|
||||
| ^ | ^ | ^ | ebh 235 | ^ | needs Thermal Model calibration | ^ | ^
|
||||
| ^ | ^ | ^ | f0h 240 | ^ __P__ | needs Z calibration | ^ | ^
|
||||
| ^ | ^ | ^ | fah 250 | ^ | needs XYZ calibration | ^ | ^
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Unknown (legacy) | ^ | ^
|
||||
| 0x0FF5 4085 | uint16 | EEPROM_BABYSTEP_Z0 | ??? | ff ffh 65535 | Babystep for Z ??? | ??? | D3 Ax0ff5 C2
|
||||
| 0x0FF1 4081 | uint32 | EEPROM_FILAMENTUSED | ??? | 00 00 00 00h 0 __S/P__| Filament used in meters | ??? | D3 Ax0ff1 C4
|
||||
| 0x0FF5 4085 | uint16 | _EEPROM_FREE_NR12_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0ff5 C2
|
||||
| 0x0FF1 4081 | uint32 | EEPROM_FILAMENTUSED | ??? | 00 00 00 00h 0 __S/P__| Filament used in centimeters | ??? | D3 Ax0ff1 C4
|
||||
| 0x0FED 4077 | uint32 | EEPROM_TOTALTIME | ??? | 00 00 00 00h 0 __S/P__| Total print time in minutes | ??? | D3 Ax0fed C4
|
||||
| 0x0FE5 4069 | float | EEPROM_BED_CALIBRATION_CENTER | ??? | ff ff ff ffh | ??? | ??? | D3 Ax0fe5 C8
|
||||
| 0x0FDD 4061 | float | EEPROM_BED_CALIBRATION_VEC_X | ??? | ff ff ff ffh | ??? | ??? | D3 Ax0fdd C8
|
||||
|
|
@ -106,9 +117,9 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| 0x0FC4 4036 | bool | EEPROM_FARM_MODE | 00h 0 | ffh 255 __P__ | Prusa farm mode: __off__ | G99 | D3 Ax0fc4 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Prusa farm mode: __on__ | G98 | ^
|
||||
| 0x0FC3 4035 | free | _EEPROM_FREE_NR1_ | ??? | ffh 255 | _Free EEPROM space_ | _free space_ | D3 Ax0fc3 C1
|
||||
| 0x0FC1 4033 | ??? | EEPROM_FARM_NUMBER | 000-999 | ff ffh / 000 __P__ | Prusa farm number _only 0-9 are allowed: 000-999_ | LCD menu | D3 Ax0fc1 C2
|
||||
| 0x0FC0 4032 | bool | EEPROM_BED_CORRECTION_VALID | 00h 0 | 00h 0 | Bed correction invalid | ??? | D3 Ax0fc0 C1
|
||||
| ^ | ^ | ^ | ffh 255 | ^ | Bed correction valid | ??? | ^
|
||||
| 0x0FC1 4033 | ??? | _EEPROM_FREE_NR2_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0fc1 C2
|
||||
| 0x0FC0 4032 | bool | EEPROM_BED_CORRECTION_VALID | 00h 0 | 00h 0 | Bed correction: __invalid__ | ??? | D3 Ax0fc0 C1
|
||||
| ^ | ^ | ^ | ffh 255 | ^ | Bed correction: __valid__ | ??? | ^
|
||||
| 0x0FBF 4031 | char | EEPROM_BED_CORRECTION_LEFT | 00h ffh | 00h 0 | Bed manual correction left | LCD menu | D3 Ax0fbf C1
|
||||
| ^ | ^ | ^ | ^ | ^ | At this moment limited to +-100um | G80 Lxxx | ^
|
||||
| 0x0FBE 4030 | char | EEPROM_BED_CORRECTION_RIGHT | 00h ffh | 00h 0 | Bed manual correction right | LCD menu | D3 Ax0fbe C1
|
||||
|
|
@ -119,42 +130,46 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | ^ | ^ | At this moment limited to +-100um | G80 Bxxx | ^
|
||||
| 0x0FBB 4027 | bool | EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY | 00h 0 | ffh 255 | Toshiba Air: __off__ | LCD menu | D3 Ax0fbb C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Toshiba Air: __on__ | ^ | ^
|
||||
| 0x0FBA 4026 | uchar | EEPROM_PRINT_FLAG | ??? | ??? | _unsued_ | ??? | D3 Ax0fba C1
|
||||
| 0x0FBA 4026 | uint8 | _EEPROM_FREE_NR3_ | ??? | ??? | _Free EEPROM space_ | _free space_ | D3 Ax0fba C1
|
||||
| 0x0FB0 4016 | int16 | EEPROM_PROBE_TEMP_SHIFT | ??? | ??? | ??? | ??? | D3 Ax0fb0 C10
|
||||
| 0x0FAF 4015 | bool | EEPROM_TEMP_CAL_ACTIVE | 00h 0 | 00h 0 | PINDA Temp cal.: __inactive__ | LCD menu | D3 Ax0faf C1
|
||||
| ^ | ^ | ^ | ffh 255 | ^ | PINDA Temp cal.: __active__ | ^ | ^
|
||||
| 0x0FA7 4007 | ??? | _EEPROM_FREE_NR6_ | ??? | ffh 255 | _Free EEPROM space_ | ??? | D3 Ax0fae C8
|
||||
| ^ | ^ | ^ | ^ | 00 00 00 00h | ^ | ^ | ^
|
||||
| 0x0FA7 4007 | ??? | _EEPROM_FREE_NR6_ | ??? | ffh 255 | _Free EEPROM space_ | _free space_ | D3 Ax0fae C8
|
||||
| 0x0FA6 4006 | uint8 | EEPROM_CALIBRATION_STATUS_PINDA | 00h 0 | ffh 255 | PINDA Temp: __not calibrated__ | ??? | D3 Ax0fa6 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | PINDA Temp: __calibrated__ | ^ | ^
|
||||
| 0x0FA5 4005 | uint8 | EEPROM_UVLO | 00h 0 | ffh 255 | Power Panic flag: __inactive__ | ??? | D3 Ax0fa5 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Power Panic flag: __active__ | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | Power Panic flag: __???__ | ^ | ^
|
||||
| 0x0F9D 3997 | float | EEPROM_UVLO_CURRENT_POSITION | ??? | ffh 255 | Power Panic position | ??? | D3 Ax0f9d C8
|
||||
| 0x0F95 3989 | char | EEPROM_FILENAME | ??? | ffh 255 | Power Panic Filename | ??? | D3 Ax0f95 C8
|
||||
| 0x0F91 3985 | unint32 | EEPROM_FILE_POSITION | ??? | ff ff ff ffh | Power Panic File Position | ??? | D3 Ax0f91 C4
|
||||
| 0x0F8D 3981 | float | EEPROM_UVLO_CURRENT_POSITION_Z | ??? | ff ff ff ffh | Power Panic Z Position | ^ | D3 Ax0f8d C4
|
||||
| 0x0F8C 3980 | ??? | EEPROM_UVLO_UNUSED_001 | ??? | ffh 255 | Power Panic _unused_ | ^ | D3 Ax0f8c C1
|
||||
| 0x0F8B 3979 | uint8 | EEPROM_UVLO_TARGET_BED | ??? | ffh 255 | Power Panic Bed temperature | ^ | D3 Ax0f8b C1
|
||||
| 0x0F89 3977 | uint16 | EEPROM_UVLO_FEEDRATE | ??? | ff ffh 65535 | Power Panic Feedrate | ^ | D3 Ax0f89 C2
|
||||
| 0x0F88 3976 | uint8 | EEPROM_UVLO_FAN_SPEED | ??? | ffh 255 | Power Panic Fan speed | ^ | D3 Ax0f88 C1
|
||||
| 0x0FA5 4005 | uint8 | EEPROM_UVLO | 00h 0 | ffh 255 | No print job recovery is pending | Power panic | D3 Ax0fa5 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Print job recovery is pending | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | Print job recovery retry is pending | ^ | ^
|
||||
| 0x0F9D 3997 | float | EEPROM_UVLO_CURRENT_POSITION | ??? | ffh 255 | Saved machine position (X and Y axis) | Power Panic | D3 Ax0f9d C8
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0fa1 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0f9d C4
|
||||
| 0x0F95 3989 | char[8] | EEPROM_FILENAME | ??? | ffh 255 | SD print SFN without extension | Power Panic | D3 Ax0f95 C8
|
||||
| 0x0F91 3985 | uint32 | EEPROM_FILE_POSITION | ??? | ff ff ff ffh | SD: file position, USB/Serial: last line number | Power Panic | D3 Ax0f91 C4
|
||||
| 0x0F8D 3981 | float | EEPROM_UVLO_CURRENT_POSITION_Z | ??? | ff ff ff ffh | Saved machine position (Z axis) without MBL applied| Power Panic | D3 Ax0f8d C4
|
||||
| 0x0F8C 3980 | uint8 | EEPROM_UVLO_PRINT_TYPE | 00h 0 | ffh 255 | print type: SD | Power Panic | D3 Ax0f8c C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | print type: USB / Serial | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | print type: None | ^ | ^
|
||||
| 0x0F8B 3979 | uint8 | EEPROM_UVLO_TARGET_BED | ??? | ffh 255 | Saved bed target temperature | Power Panic | D3 Ax0f8b C1
|
||||
| 0x0F89 3977 | uint16 | EEPROM_UVLO_FEEDRATE | ??? | ff ffh 65535 | Saved Feedrate | Power Panic | D3 Ax0f89 C2
|
||||
| 0x0F88 3976 | uint8 | EEPROM_UVLO_FAN_SPEED | ??? | ffh 255 | Saved Fan speed | Power Panic | D3 Ax0f88 C1
|
||||
| 0x0F87 3975 | uint8 | EEPROM_FAN_CHECK_ENABLED | 00h 0 | ??? | Fan Check __disabled__ | LCD menu | D3 Ax0f87 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ffh 255 | Fan Check __enabled__ | ^ | ^
|
||||
| 0x0F75 3957 | uint16 | EEPROM_UVLO_MESH_BED_LEVELING | ??? | ff ffh 65535 | Power Panic Mesh Bed Leveling | ??? | D3 Ax0f75 C18
|
||||
| 0x0F73 3955 | uint16 | EEPROM_UVLO_Z_MICROSTEPS | ??? | ff ffh 65535 | Power Panic Z microsteps | ??? | D3 Ax0f73 C2
|
||||
| 0x0F72 3954 | uint8 | EEPROM_UVLO_E_ABS | ??? | ffh 255 | Power Panic ??? position | ??? | D3 Ax0f72 C1
|
||||
| 0x0F6E 3950 | float | EEPROM_UVLO_CURRENT_POSITION_E | ??? | ff ff ff ffh | Power Panic E position | ??? | D3 Ax0f6e C4
|
||||
| 0x0F6C 3948 | uint16 | EEPROM_UVLO_SAVED_SEGMENT_IDX | all | ff ffh 65535 | Power Panic index of multi-segment move | ??? | D3 Ax0f6c C2
|
||||
| 0x0F75 3957 | uint16 | _EEPROM_FREE_NR7_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0f75 C18
|
||||
| 0x0F73 3955 | uint16 | _EEPROM_FREE_NR8_ | ??? | ff ffh 65535 | _Free EEPROM space_ | _free space_ | D3 Ax0f73 C2
|
||||
| 0x0F72 3954 | uint8 | EEPROM_UVLO_E_ABS | ??? | ffh 0 | E axis was in relative mode (M83) | Power Panic | D3 Ax0f72 C1
|
||||
| 0x0F72 3954 | uint8 | ^ | ??? | ffh 1 | E axis was in absolute mode (M82) | Power Panic | ^
|
||||
| 0x0F6E 3950 | float | EEPROM_UVLO_CURRENT_POSITION_E | ??? | ff ff ff ffh | Saved machine position (E axis) | Power Panic | D3 Ax0f6e C4
|
||||
| 0x0F6C 3948 | uint16 | EEPROM_UVLO_SAVED_SEGMENT_IDX | all | ff ffh 65535 | Saved index of multi-segment move | Power Panic | D3 Ax0f6c C2
|
||||
| 0x0F6B 3947 | ??? | _EEPROM_FREE_NR4_ | ??? | ffh 255 | _Free EEPROM space_ | _free space_ | D3 Ax0f6b C1
|
||||
| 0x0F6A 3946 | ??? | _EEPROM_FREE_NR5_ | ??? | ffh 255 | _Free EEPROM space_ | _free space_ | D3 Ax0f6a C1
|
||||
| 0x0F69 3945 | uint8 | EEPROM_CRASH_DET | ffh 255 | ffh 255 | Crash detection: __enabled__ | LCD menu | D3 Ax0f69 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Crash detection: __disabled__ | LCD menu | ^
|
||||
| 0x0F68 3944 | uint8 | EEPROM_CRASH_COUNT_Y | 00h-ffh 0-255| ffh 255 __S/P__ | Crashes detected on y axis | ??? | D3 Ax0f68 C1
|
||||
| 0x0F68 3944 | uint8 | EEPROM_CRASH_COUNT_Y | 00h-ffh 0-255| ffh 255 __S/P__ | Crash detection counter Y (last print) | Statistics | D3 Ax0f68 C1
|
||||
| 0x0F67 3943 | uint8 | EEPROM_FSENSOR | 01h 1 | ffh 255 __P__ | Filament sensor: __enabled__ | LCD menu | D3 Ax0f67 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Filament sensor: __disabled__ | LCD menu | ^
|
||||
| 0x0F65 3942 | uint8 | EEPROM_CRASH_COUNT_X | 00h-ffh 0-255| ffh 255 __S/P__ | Crashes detected on x axis | ??? | D3 Ax0f66 C1
|
||||
| 0x0F65 3941 | uint8 | EEPROM_FERROR_COUNT | 00h-ffh 0-255| ffh 255 __S/P__ | Filament sensor error counter | ??? | D3 Ax0f65 C1
|
||||
| 0x0F64 3940 | uint8 | EEPROM_POWER_COUNT | 00h-ffh 0-255| ffh 255 __S/P__ | Power failure counter | ??? | D3 Ax0f64 C1
|
||||
| 0x0F65 3942 | uint8 | EEPROM_CRASH_COUNT_X | 00h-ffh 0-255| ffh 255 __S/P__ | Crash detection counter X (last print) | Statistics | D3 Ax0f66 C1
|
||||
| 0x0F65 3941 | uint8 | EEPROM_FERROR_COUNT | 00h-ffh 0-255| ffh 255 __S/P__ | Filament runout/error counter (last print) | Statistics | D3 Ax0f65 C1
|
||||
| 0x0F64 3940 | uint8 | EEPROM_POWER_COUNT | 00h-ffh 0-255| ffh 255 __S/P__ | Power loss errors (last print) | Statistics | D3 Ax0f64 C1
|
||||
| 0x0F60 3936 | float | EEPROM_XYZ_CAL_SKEW | ??? | ff ff ff ffh | XYZ skew value | ??? | D3 Ax0f60 C4
|
||||
| 0x0F5F 3935 | uint8 | EEPROM_WIZARD_ACTIVE | 01h 1 | 01h 1 __P__ | Wizard __active__ | ??? | D3 Ax0f5f C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Wizard __inactive__ | ^ | ^
|
||||
|
|
@ -170,10 +185,10 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 01h 1 | ^ | RPi Port: __enabled__ | LCD menu | ^
|
||||
| 0x0F07 3847 | uint8 | EEPROM_FSENS_AUTOLOAD_ENABLED | 01h 1 | ffh 255 __P__ | Filament autoload: __enabled__ | LCD menu | D3 Ax0f07 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Filament autoload: __disabled__ | LCD menu | ^
|
||||
| 0x0F05 3845 | uint16 | EEPROM_CRASH_COUNT_X_TOT | 0000-fffe | ff ffh __S/P__ | Total crashes on x axis | ??? | D3 Ax0f05 C2
|
||||
| 0x0F03 3843 | uint16 | EEPROM_CRASH_COUNT_Y_TOT | 0000-fffe | ff ffh __S/P__ | Total crashes on y axis | ??? | D3 Ax0f03 C2
|
||||
| 0x0F01 3841 | uint16 | EEPROM_FERROR_COUNT_TOT | 0000-fffe | ff ffh __S/P__ | Total filament sensor errors | ??? | D3 Ax0f01 C2
|
||||
| 0x0EFF 3839 | uint16 | EEPROM_POWER_COUNT_TOT | 0000-fffe | ff ffh __S/P__ | Total power failures | ??? | D3 Ax0eff C2
|
||||
| 0x0F05 3845 | uint16 | EEPROM_CRASH_COUNT_X_TOT | 0000-fffe | ff ffh __S/P__ | Total crashes on x axis | Statistics | D3 Ax0f05 C2
|
||||
| 0x0F03 3843 | uint16 | EEPROM_CRASH_COUNT_Y_TOT | 0000-fffe | ff ffh __S/P__ | Total crashes on y axis | Statistics | D3 Ax0f03 C2
|
||||
| 0x0F01 3841 | uint16 | EEPROM_FERROR_COUNT_TOT | 0000-fffe | ff ffh __S/P__ | Total filament sensor errors | Statistics | D3 Ax0f01 C2
|
||||
| 0x0EFF 3839 | uint16 | EEPROM_POWER_COUNT_TOT | 0000-fffe | ff ffh __S/P__ | Total power failures | Statistics | D3 Ax0eff C2
|
||||
| 0x0EFE 3838 | uint8 | EEPROM_TMC2130_HOME_X_ORIGIN | ??? | ffh 255 | ??? | ??? | D3 Ax0efe C1
|
||||
| 0x0EFD 3837 | uint8 | EEPROM_TMC2130_HOME_X_BSTEPS | ??? | ffh 255 | ??? | ??? | D3 Ax0efd C1
|
||||
| 0x0EFC 3836 | uint8 | EEPROM_TMC2130_HOME_X_FSTEPS | ??? | ffh 255 | ??? | ??? | D3 Ax0efc C1
|
||||
|
|
@ -201,35 +216,37 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 1c 4fh 20252 | ^ | PRINTER_MK2.5S with MMU2S | ??? | ^
|
||||
| ^ | ^ | ^ | 2c 01h 300 | ^ | PRINTER_MK3 | ??? | ^
|
||||
| ^ | ^ | ^ | 4c 4fh 20300 | ^ | PRINTER_MK3 with MMU2 | ??? | ^
|
||||
| ^ | ^ | ^ | 5c 76h 30300 | ^ | PRINTER_MK3 with MMU3 | ??? | ^
|
||||
| ^ | ^ | ^ | 2e 01h 302 | ^ | PRINTER_MK3S | ??? | ^
|
||||
| ^ | ^ | ^ | 4e 4fh 20302 | ^ | PRINTER_MK3S with MMU2S | ??? | ^
|
||||
| ^ | ^ | ^ | 5e 76h 30302 | ^ | PRINTER_MK3S with MMU3 | ??? | ^
|
||||
| 0x0EEC 3820 | uint16 | EEPROM_BOARD_TYPE | ??? | ff ffh 65535 | Board Type | ??? | D3 Ax0eec C2
|
||||
| ^ | ^ | ^ | c8 00h 200 | ^ | BOARD_RAMBO_MINI_1_0 | ??? | ^
|
||||
| ^ | ^ | ^ | cb 00h 203 | ^ | BOARD_RAMBO_MINI_1_3 | ??? | ^
|
||||
| ^ | ^ | ^ | 36 01h 310 | ^ | BOARD_EINSY_1_0a | ??? | ^
|
||||
| 0x0EE8 3816 | float | EEPROM_EXTRUDER_MULTIPLIER_0 | ??? | ff ff ff ffh | Power panic Extruder 0 multiplier | ??? | D3 Ax0ee8 C4
|
||||
| 0x0EE4 3812 | float | EEPROM_EXTRUDER_MULTIPLIER_1 | ??? | ff ff ff ffh | Power panic Extruder 1 multiplier | ??? | D3 Ax0ee4 C4
|
||||
| 0x0EE0 3808 | float | EEPROM_EXTRUDER_MULTIPLIER_2 | ??? | ff ff ff ffh | Power panic Extruder 2 multiplier | ??? | D3 Ax0ee0 C4
|
||||
| 0x0EDE 3806 | uint16 | EEPROM_EXTRUDEMULTIPLY | ??? | ff ffh 65535 | Power panic Extruder multiplier | ??? | D3 Ax0ede C2
|
||||
| 0x0EDA 3802 | float | EEPROM_UVLO_TINY_CURRENT_POSITION_Z | ??? | ff ff ff ffh | Power panic Z position | ??? | D3 Ax0eda C4
|
||||
| 0x0ED8 3800 | uint16 | EEPROM_UVLO_TARGET_HOTEND | ??? | ff ffh 65535 | Power panic target Hotend temperature | ??? | D3 Ax0ed8 C2
|
||||
| 0x0EE8 3816 | float | EEPROM_EXTRUDER_MULTIPLIER_0 | ??? | ff ff ff ffh | Extruder 0 multiplier | Power Panic | D3 Ax0ee8 C4
|
||||
| 0x0EE4 3812 | float | EEPROM_EXTRUDER_MULTIPLIER_1 | ??? | ff ff ff ffh | Extruder 1 multiplier | Power Panic | D3 Ax0ee4 C4
|
||||
| 0x0EE0 3808 | float | EEPROM_EXTRUDER_MULTIPLIER_2 | ??? | ff ff ff ffh | Extruder 2 multiplier | Power Panic | D3 Ax0ee0 C4
|
||||
| 0x0EDE 3806 | uint16 | EEPROM_EXTRUDEMULTIPLY | ??? | ff ffh 65535 | Extruder multiplier | Power Panic | D3 Ax0ede C2
|
||||
| 0x0EDA 3802 | float | EEPROM_UVLO_TINY_CURRENT_POSITION_Z | ??? | ff ff ff ffh | Saved Z-axis position when recovering print failed| Power Panic | D3 Ax0eda C4
|
||||
| 0x0ED8 3800 | uint16 | EEPROM_UVLO_TARGET_HOTEND | ??? | ff ffh 65535 | Saved hotend target temperature | Power Panic | D3 Ax0ed8 C2
|
||||
| 0x0ED7 3799 | uint8 | EEPROM_SOUND_MODE | 00h 0 | ffh 255 | Sound mode: __loud__ | ??? | D3 Ax0ed7 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Sound mode: __once__ | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | Sound mode: __silent__ | ^ | ^
|
||||
| ^ | ^ | ^ | 03h 3 | ^ | Sound mode: __assist__ | ^ | ^
|
||||
| 0x0ED6 3798 | bool | EEPROM_SPOOL_JOIN | 01h 1 | ffh 255 | MMU2/s autodeplete: __on__ | ??? | D3 Ax0ed6 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | MMU2/s autodeplete: __off__ | ^ | ^
|
||||
| 0x0ED6 3798 | bool | EEPROM_SPOOL_JOIN | 01h 1 | ffh 255 | SpoolJoin: __on__ | MMU | D3 Ax0ed6 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | SpoolJoin: __off__ | ^ | ^
|
||||
| 0x0ED5 3797 | bool | EEPROM_FSENS_RUNOUT_ENABLED | 01h 1 | ffh 255 __P__ | Filament runout: __enabled__ | LCD menu | D3 Ax0ed5 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Filament runout: __disabled__ | LCD menu | ^
|
||||
| 0x0ED3 3795 | uint16 | EEPROM_MMU_FAIL_TOT | ??? | ff ffh 65535 __S/P__ | MMU2/s total failures | ??? | D3 Ax0ed3 C2
|
||||
| 0x0ED2 3794 | uint8 | EEPROM_MMU_FAIL | ??? | ffh 255 __S/P__ | MMU2/s fails during print | ??? | D3 Ax0ed2 C1
|
||||
| 0x0ED0 3792 | uint16 | EEPROM_MMU_LOAD_FAIL_TOT | ??? | ff ffh 65535 __S/P__ | MMU2/s total load failures | ??? | D3 Ax0ed0 C2
|
||||
| 0x0ECF 3791 | uint8 | EEPROM_MMU_LOAD_FAIL | ??? | ffh 255 __S/P__ | MMU2/s load failures during print | ??? | D3 Ax0ecf C1
|
||||
| 0x0ECE 3790 | uint8 | EEPROM_MMU_CUTTER_ENABLED | 00h 0 | ffh 255 | MMU2/s cutter: __disabled__ | LCD menu | D3 Ax0ece C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | MMU2/s cutter: __enabled__ | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | MMU2/s cutter: __always__ | ^ | ^
|
||||
| 0x0DAE 3502 | uint16 | EEPROM_UVLO_MESH_BED_LEVELING_FULL | ??? | ff ffh 65535 | Power panic Mesh bed leveling points | ??? | D3 Ax0dae C288
|
||||
| 0x0DAD 3501 | uint8 | EEPROM_MBL_TYPE | ??? | ffh 255 | Mesh bed leveling precision _unused atm_ | ??? | D3 Ax0dad C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Filament runout: __disabled__ | ^ | ^
|
||||
| 0x0ED3 3795 | uint16 | EEPROM_MMU_FAIL_TOT | ??? | ff ffh 65535 __S/P__ | MMU total failures | LCD menu | D3 Ax0ed3 C2
|
||||
| 0x0ED2 3794 | uint8 | EEPROM_MMU_FAIL | ??? | ffh 255 __S/P__ | MMU fails during print | LCD menu | D3 Ax0ed2 C1
|
||||
| 0x0ED0 3792 | uint16 | EEPROM_MMU_LOAD_FAIL_TOT | ??? | ff ffh 65535 __S/P__ | MMU total load failures | LCD menu | D3 Ax0ed0 C2
|
||||
| 0x0ECF 3791 | uint8 | EEPROM_MMU_LOAD_FAIL | ??? | ffh 255 __S/P__ | MMU load failures during print | LCD menu | D3 Ax0ecf C1
|
||||
| 0x0ECE 3790 | uint8 | EEPROM_MMU_CUTTER_ENABLED | 00h 0 | ffh 255 | MMU cutter: __disabled__ | LCD menu | D3 Ax0ece C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | MMU cutter: __enabled__ | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | MMU cutter: __always__ | ^ | ^
|
||||
| 0x0DAE 3502 | uint16 | EEPROM_UVLO_MESH_BED_LEVELING_FULL | ??? | ff ffh 65535 | Saved MBL points | Power Panic | D3 Ax0dae C288
|
||||
| 0x0DAD 3501 | uint8 | _EEPROM_FREE_NR9_ | ??? | ffh 255 | _Free EEPROM space_ | _free space_ | D3 Ax0dad C1
|
||||
| 0x0DAC 3500 | bool | EEPROM_MBL_MAGNET_ELIMINATION | 01h 1 | ffh 255 | Mesh bed leveling does: __ignores__ magnets | LCD menu | D3 Ax0dac C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Mesh bed leveling does: __NOT ignores__ magnets | ^ | ^
|
||||
| 0x0DAB 3499 | uint8 | EEPROM_MBL_POINTS_NR | 03h 3 | ffh 255 | Mesh bed leveling points: __3x3__ | LCD menu | D3 Ax0dab C1
|
||||
|
|
@ -237,8 +254,8 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| 0x0DAA 3498 | uint8 | EEPROM_MBL_PROBE_NR | 03h 3 | ffh 255 | MBL times measurements for each point: __3__ | LCD menu | D3 Ax0daa C1
|
||||
| ^ | ^ | ^ | 05h 5 | ^ | MBL times measurements for each point: __5__ | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | MBL times measurements for each point: __1__ | ^ | ^
|
||||
| 0x0DA9 3497 | uint8 | EEPROM_MMU_STEALTH | 01h 1 | ffh 255 | MMU2/s Silent mode: __on__ | ??? | D3 Ax0da9 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | MMU2/s Silent mode: __off__ | ^ | ^
|
||||
| 0x0DA9 3497 | uint8 | EEPROM_MMU_STEALTH | 01h 1 | ffh 255 | MMU Silent mode: __on__ | LCD menu | D3 Ax0da9 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | MMU Silent mode: __off__ | ^ | ^
|
||||
| 0x0DA8 3496 | uint8 | EEPROM_CHECK_MODE | 01h 1 | ffh 255 | Check mode for nozzle is: __warn__ | LCD menu | D3 Ax0da8 C1
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | Check mode for nozzle is: __strict__ | ^ | ^
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Check mode for nozzle is: __none__ | ^ | ^
|
||||
|
|
@ -298,19 +315,19 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 01h 1 | ^ | Filament Sensor type IR 0.4 or newer | ^ | ^
|
||||
| 0x0D47 3399 | uint8 | EEPROM_FSENSOR_ACTION_NA | 00h 0 | ffh 255 | Filament Sensor action: __Continue__ | LCD menu | D3 Ax0d47 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Filament Sensor action: __Pause__ | ^ | ^
|
||||
| 0x0D37 3383 | float | EEPROM_UVLO_SAVED_START_POSITION | ??? | ff ff ff ffh | Power panic saved start position all-axis | ??? | D3 Ax0d37 C16
|
||||
| ^ | ^ | ^ | ??? | ^ | Power panic saved start position e-axis | ^ | D3 Ax0d43 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Power panic saved start position z-axis | ^ | D3 Ax0d3f C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Power panic saved start position y-axis | ^ | D3 Ax0d3b C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Power panic saved start position x-axis | ^ | D3 Ax0d37 C4
|
||||
| 0x0D35 3381 | uint16 | EEPROM_UVLO_FEEDMULTIPLY | ??? | ff ffh 65355 | Power panic saved feed multiplier | ??? | D3 Ax0d35 C2
|
||||
| 0x0D37 3383 | float | EEPROM_UVLO_SAVED_START_POSITION | ??? | ff ff ff ffh | Saved start position all-axis | Power Panic | D3 Ax0d37 C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0d43 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0d3f C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0d3b C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0d37 C4
|
||||
| 0x0D35 3381 | uint16 | EEPROM_UVLO_FEEDMULTIPLY | ??? | ff ffh 65355 | Saved feed multiplier | Power Panic | D3 Ax0d35 C2
|
||||
| 0x0D34 3380 | uint8 | EEPROM_BACKLIGHT_LEVEL_HIGH | 00h - ffh | 82h 130 | LCD backlight bright: __128__ Dim value to 255 | LCD menu | D3 Ax0d34 C1
|
||||
| 0x0D33 3379 | uint8 | EEPROM_BACKLIGHT_LEVEL_LOW | 00h - ffh | 32h 50 | LCD backlight dim: __50__ 0 to Bright value | LCD menu | D3 Ax0d33 C1
|
||||
| 0x0D32 3378 | uint8 | EEPROM_BACKLIGHT_MODE | 02h 2 | ffh 255 | LCD backlight mode: __Auto__ | LCD menu | D3 Ax0d32 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | LCD backlight mode: __Bright__ | ^ | ^
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | LCD backlight mode: __Dim__ | ^ | ^
|
||||
| 0x0D30 3376 | uint16 | EEPROM_BACKLIGHT_TIMEOUT | 01 00 - ff ff| 0a 00h 65535 | LCD backlight timeout: __10__ seconds | LCD menu | D3 Ax0d30 C2
|
||||
| 0x0D2C 3372 | float | EEPROM_UVLO_LA_K | ??? | ff ff ff ffh | Power panic saved Linear Advanced K value | ??? | D3 Ax0d2c C4
|
||||
| 0x0D2C 3372 | float | EEPROM_UVLO_LA_K | ??? | ff ff ff ffh | Saved Linear Advanced K value | Power Panic | D3 Ax0d2c C4
|
||||
| 0x0D2B 3371 | uint8 | EEPROM_ALTFAN_OVERRIDE | ffh 255 | ffh 255 | ALTFAN override unknown state | LCD menu | D3 Ax0d2b C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | ALTFAN override deactivated | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | ALTFAN override activated | ^ | ^
|
||||
|
|
@ -321,10 +338,10 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 00h 0 | ^ | PINDA has no temp compensation PINDA v1/2 | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | PINDA has temp compensation aka SuperPINDA | ^ | ^
|
||||
| 0x0D15 3349 | char[20]| EEPROM_PRUSA_SN | SN[19] == 0 | ffffffffffffffff... | PRUSA Serial number string | PRUSA SN | D3 Ax0d15 C20
|
||||
| 0x0D11 3345 | float | EEPROM_UVLO_ACCELL | ??? | ff ff ff ffh | Power panic saved normal acceleration | ??? | D3 Ax0d11 C4
|
||||
| 0x0D0D 3341 | float | EEPROM_UVLO_RETRACT_ACCELL | ??? | ff ff ff ffh | Power panic saved retract acceleration | ??? | D3 Ax0d0d C4
|
||||
| 0x0D09 3337 | float | EEPROM_UVLO_TRAVEL_ACCELL | ??? | ff ff ff ffh | Power panic saved travel acceleration | ??? | D3 Ax0d09 C4
|
||||
| 0x0D05 3333 | unint32 | EEPROM_JOB_ID | ??? | 00 00 00 00h | Job ID used by host software | D3 only | D3 Ax0d05 C4
|
||||
| 0x0D11 3345 | float | EEPROM_UVLO_ACCELL | ??? | ff ff ff ffh | Saved print acceleration | Power Panic | D3 Ax0d11 C4
|
||||
| 0x0D0D 3341 | float | EEPROM_UVLO_RETRACT_ACCELL | ??? | ff ff ff ffh | Saved retract acceleration | Power Panic | D3 Ax0d0d C4
|
||||
| 0x0D09 3337 | float | EEPROM_UVLO_TRAVEL_ACCELL | ??? | ff ff ff ffh | Saved travel acceleration | Power Panic | D3 Ax0d09 C4
|
||||
| 0x0D05 3333 | unint32 | EEPROM_JOB_ID | ??? | 00 00 00 00h | Job ID used by host software | D3 only | D3 Ax0d05 C4
|
||||
| 0x0D04 3332 | uint8 | EEPROM_ECOOL_ENABLE | ffh 255 | ^ | Disable extruder motor scaling for non-farm print | LCD menu | D3 Ax0d04 C1
|
||||
| ^ | ^ | ^ | 2ah 42 | ^ | Enable extruder motor scaling for non-farm print | ^ | D3 Ax0d04 C1
|
||||
| 0x0D03 3331 | uint8 | EEPROM_FW_CRASH_FLAG | ffh 255 | ffh 255 | Last FW crash reason (dump_crash_reason) | D21/D22 | D3 Ax0d03 C1
|
||||
|
|
@ -334,14 +351,14 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 03h 3 | ^ | bad_isr | ^ | ^
|
||||
| ^ | ^ | ^ | 04h 4 | ^ | bad_pullup_temp_isr | ^ | ^
|
||||
| ^ | ^ | ^ | 05h 5 | ^ | bad_pullup_step_isr | ^ | ^
|
||||
| 0x0D02 3330 | uint8 | EEPROM_TEMP_MODEL_ENABLE | 00h 0 | ff/00 | Temp model deactivated | Temp model | D3 Ax0d02 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Temp model activated | ^ | ^
|
||||
| 0x0CFE 3326 | float | EEPROM_TEMP_MODEL_P | ??? | ff ff ff ffh | Temp model power (W) | Temp model | D3 Ax0cfe C4
|
||||
| 0x0CFA 3322 | float | EEPROM_TEMP_MODEL_C | ??? | ff ff ff ffh | Temp model capacitance (J/K) | Temp model | D3 Ax0cfa C4
|
||||
| 0x0CBA 3258 |float[16]| EEPROM_TEMP_MODEL_R | ??? | ff ff ff ffh | Temp model resistance (K/W) | Temp model | D3 Ax0cba C64
|
||||
| 0x0CB6 3254 | float | EEPROM_TEMP_MODEL_Ta_corr | ??? | ff ff ff ffh | Temp model ambient temperature correction (K) | Temp model | D3 Ax0cb6 C4
|
||||
| 0x0CB2 3250 | float | EEPROM_TEMP_MODEL_W | ??? | ff ff ff ffh | Temp model warning threshold (K/s) | Temp model | D3 Ax0cb2 C4
|
||||
| 0x0CAE 3246 | float | EEPROM_TEMP_MODEL_E | ??? | ff ff ff ffh | Temp model error threshold (K/s) | Temp model | D3 Ax0cae C4
|
||||
| 0x0D02 3330 | uint8 | EEPROM_THERMAL_MODEL_ENABLE | 00h 0 | ff/00 | Thermal Model deactivated | Thermal Model| D3 Ax0d02 C1
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Thermal Model activated | ^ | ^
|
||||
| 0x0CFE 3326 | float | EEPROM_THERMAL_MODEL_P | ??? | ff ff ff ffh | Thermal Model power (W) | Thermal Model| D3 Ax0cfe C4
|
||||
| 0x0CFA 3322 | float | EEPROM_THERMAL_MODEL_C | ??? | ff ff ff ffh | Thermal Model capacitance (J/K) | Thermal Model| D3 Ax0cfa C4
|
||||
| 0x0CBA 3258 |float[16]| EEPROM_THERMAL_MODEL_R | ??? | ff ff ff ffh | Thermal Model resistance (K/W) | Thermal Model| D3 Ax0cba C64
|
||||
| 0x0CB6 3254 | float | EEPROM_THERMAL_MODEL_Ta_corr | ??? | ff ff ff ffh | Thermal Model ambient temperature correction (K) | Thermal Model| D3 Ax0cb6 C4
|
||||
| 0x0CB2 3250 | float | EEPROM_THERMAL_MODEL_W | ??? | ff ff ff ffh | Thermal Model warning threshold (K/s) | Thermal Model| D3 Ax0cb2 C4
|
||||
| 0x0CAE 3246 | float | EEPROM_THERMAL_MODEL_E | ??? | ff ff ff ffh | Thermal Model error threshold (K/s) | Thermal Model| D3 Ax0cae C4
|
||||
| 0x0CAD 3245 | uint8 | EEPROM_FSENSOR_JAM_DETECTION | 01h 1 | ff/01 | fsensor pat9125 jam detection feature | LCD menu | D3 Ax0cad C1
|
||||
| 0x0CAC 3244 | uint8 | EEPROM_MMU_ENABLED | 00h 0 | ff/00 | MMU enabled | LCD menu | D3 Ax0cac C1
|
||||
| 0x0CA8 3240 | uint32 | EEPROM_MMU_MATERIAL_CHANGES | ??? | ff ff ff ffh | MMU toolchange counter over printers lifetime | LCD statistic| D3 Ax0ca8 C4
|
||||
|
|
@ -352,18 +369,55 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| ^ | ^ | ^ | 01h 1 | ^ | Selftest passed | ^ | ^
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | XYZ cal passed | ^ | ^
|
||||
| ^ | ^ | ^ | 04h 4 | ^ | Z cal passed | ^ | ^
|
||||
| ^ | ^ | ^ | 08h 8 | ^ | Temp model cal passed | ^ | ^
|
||||
| ^ | ^ | ^ | 08h 8 | ^ | Thermal Model cal passed | ^ | ^
|
||||
| ^ | ^ | ^ | 10h 16 | ^ | Live Adjust set | ^ | ^
|
||||
| ^ | ^ | ^ | 20h 32 | ^ | Free bit | ^ | ^
|
||||
| ^ | ^ | ^ | 40h 64 | ^ | Free bit | ^ | ^
|
||||
| ^ | ^ | ^ | 80h 128 | ^ | Unknown | ^ | ^
|
||||
| 0x0CA2 3234 | float | EEPROM_TEMP_MODEL_U | ??? | ff ff ff ffh | Temp model linear temperature coefficient (W/K/W) | Temp model | D3 Ax0ca2 C4
|
||||
| 0x0C9E 3230 | float | EEPROM_TEMP_MODEL_V | ??? | ff ff ff ffh | Temp model linear temperature intercept (W/W) | Temp model | D3 Ax0c9e C4
|
||||
| 0x0C9A 3226 | float | EEPROM_TEMP_MODEL_D | ??? | ff ff ff ffh | Temp model sim. 1st order IIR filter factor | Temp model | D3 Ax0c9a C4
|
||||
| 0x0C98 3224 | uint16 | EEPROM_TEMP_MODEL_L | 0-2160 | ff ffh | Temp model sim. response lag (ms) | Temp model | D3 Ax0c98 C2
|
||||
| 0x0C97 3223 | uint8 | EEPROM_TEMP_MODEL_VER | 0-255 | ffh | Temp model Version | Temp model | D3 Ax0c97 C1
|
||||
| 0x0CA2 3234 | float | EEPROM_THERMAL_MODEL_U | ??? | ff ff ff ffh | Thermal Model linear temp coefficient (W/K/W) | Thermal Model| D3 Ax0ca2 C4
|
||||
| 0x0C9E 3230 | float | EEPROM_THERMAL_MODEL_V | ??? | ff ff ff ffh | Thermal Model linear temp intercept (W/W) | Thermal Model| D3 Ax0c9e C4
|
||||
| 0x0C9A 3226 | float | EEPROM_THERMAL_MODEL_D | ??? | ff ff ff ffh | Thermal Model sim. 1st order IIR filter factor | Thermal Model| D3 Ax0c9a C4
|
||||
| 0x0C98 3224 | uint16 | EEPROM_THERMAL_MODEL_L | 0-2160 | ff ffh | Thermal Model sim. response lag (ms) | Thermal Model| D3 Ax0c98 C2
|
||||
| 0x0C97 3223 | uint8 | EEPROM_THERMAL_MODEL_VER | 0-255 | ffh | Thermal Model Version | Thermal Model| D3 Ax0c97 C1
|
||||
| 0x0C95 3221 | PGM_P | EEPROM_KILL_MESSAGE | 0-65535 | ff ffh | Kill message PGM pointer | kill() | D3 Ax0c95 C2
|
||||
| 0x0C94 3220 | uint8 | EEPROM_KILL_PENDING_FLAG | 42h, ffh | ffh | Kill pending flag (0x42 magic value) | kill() | D3 Ax0c94 C1
|
||||
| 0x0C91 3217 | char[3] | EEPROM_FILENAME_EXTENSION | ??? | ffffffffh | DOS 8.3 filename extension | Power Panic | D3 Ax0c91 C1
|
||||
| 0x0C80 3200 | char[17]| EEPROM_CUSTOM_MENDEL_NAME | Prusa i3 MK3S| ffffffffffffffffff... | Custom Printer Name | | D3 Ax0c80 C17
|
||||
| 0x0C7F 3199 | bool | EEPROM_UVLO_Z_LIFTED | 00h 0 | 00h | Power Panic Z axis NOT lifted | Power Panic | D3 Ax0c7f C1
|
||||
| ^ | ^ | ^ | 01h 1 | 01h | Power Panic Z axis lifted | ^ | ^
|
||||
| 0x0C7d 3197 | uint16 | EEPROM_UVLO_EXTRUDE_MINTEMP | 0-305 | afh 175 | Power Panic Extrude mintemp | Power Panic | D3 Ax0c7d C2
|
||||
| 0x0C6D 3181 | uint32 | EEPROM_UVLO_ACCELL_MM_S2_NORMAL | ??? | ff ff ff ffh | Power Panic acceleration mm per s2 normal | Power Panic | D3 Ax0c6d C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0c79 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0c75 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0c71 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0c6d C4
|
||||
| 0x0C5D 3165 | uint32 | EEPROM_UVLO_ACCELL_MM_S2_SILENT | ??? | ff ff ff ffh | Power Panic acceleration mm per s2 silent | Power Panic | D3 Ax0c5d C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0c69 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0c65 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0c61 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0c5d C4
|
||||
| 0x0C4D 3149 | float | EEPROM_UVLO_MAX_FEEDRATE_NORMAL | ??? | ff ff ff ffh | Power Panic max feedrate normal | Power Panic | D3 Ax0c4d C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0d59 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0d55 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0d51 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0c4d C4
|
||||
| 0x0C3D 3133 | float | EEPROM_UVLO_MAX_FEEDRATE_SILENT | ??? | ff ff ff ffh | Power Panic max feedrate silent | Power Panic | D3 Ax0c3d C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0d49 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0d45 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0d41 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0c3d C4
|
||||
| 0x0C39 3129 | float | EEPROM_UVLO_MIN_FEEDRATE | ??? | ff ff ff ffh | Power Panic min feedrate | Power Panic | D3 Ax0c39 C4
|
||||
| 0x0C35 3125 | float | EEPROM_UVLO_MIN_TRAVEL_FEEDRATE | ??? | ff ff ff ffh | Power Panic min travel feedrate | Power Panic | D3 Ax0c35 C4
|
||||
| 0x0C31 3121 | uint32 | EEPROM_UVLO_MIN_SEGMENT_TIME_US | ??? | ff ff ff ffh | Power Panic min segment time us | Power Panic | D3 Ax0c31 C4
|
||||
| 0x0C21 3105 | float | EEPROM_UVLO_MAX_JERK | ??? | ff ff ff ffh | Power Panic max jerk | Power Panic | D3 Ax0c21 C16
|
||||
| ^ | ^ | ^ | ??? | ^ | E-axis | ^ | D3 Ax0d2d C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Z-axis | ^ | D3 Ax0d29 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | Y-axis | ^ | D3 Ax0d25 C4
|
||||
| ^ | ^ | ^ | ??? | ^ | X-axis | ^ | D3 Ax0c21 C4
|
||||
| 0x0C11 3089 | uint8 | EEPROM_CHECK_FILAMENT | 01h 1 | ffh 255 | Check mode for filament is: __warn__ | LCD menu | D3 Ax0c11 C1
|
||||
| ^ | ^ | ^ | 02h 2 | ^ | Check mode for filament is: __strict__ | ^ | ^
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Check mode for filament is: __none__ | ^ | ^
|
||||
|
||||
|
||||
|Address begin|Bit/Type | Name | Valid values | Default/FactoryReset | Description |Gcode/Function| Debug code
|
||||
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--:
|
||||
|
|
@ -383,11 +437,11 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
#define EEPROM_TOP 4096
|
||||
#define EEPROM_SILENT 4095
|
||||
#define EEPROM_LANG 4094
|
||||
#define EEPROM_BABYSTEP_X 4092 //unused
|
||||
#define EEPROM_BABYSTEP_Y 4090 //unused
|
||||
#define _EEPROM_FREE_NR10_ 4092 // uint16_t
|
||||
#define _EEPROM_FREE_NR11_ 4090 // uint16_t
|
||||
#define EEPROM_BABYSTEP_Z 4088 //legacy, multiple values stored now in EEPROM_Sheets_base
|
||||
#define EEPROM_CALIBRATION_STATUS_V1 4087 // legacy, used up to v3.11
|
||||
#define EEPROM_BABYSTEP_Z0 4085
|
||||
#define _EEPROM_FREE_NR12_ (EEPROM_CALIBRATION_STATUS_V1 - 2) // uint16_t
|
||||
#define EEPROM_FILAMENTUSED 4081
|
||||
// uint32_t
|
||||
#define EEPROM_TOTALTIME 4077
|
||||
|
|
@ -400,54 +454,53 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
// The offsets are saved as 16bit signed int, scaled to tenths of microns.
|
||||
#define EEPROM_BED_CALIBRATION_Z_JITTER (EEPROM_BED_CALIBRATION_VEC_Y-2*8)
|
||||
#define EEPROM_FARM_MODE (EEPROM_BED_CALIBRATION_Z_JITTER-1)
|
||||
#define EEPROM_FREE_NR1 (EEPROM_FARM_MODE-1)
|
||||
#define EEPROM_FARM_NUMBER (EEPROM_FREE_NR1-2)
|
||||
#define EEPROM_FREE_NR1 (EEPROM_FARM_MODE-1) // uint8_t
|
||||
#define _EEPROM_FREE_NR2_ (EEPROM_FREE_NR1 - 2) // int16_t
|
||||
|
||||
// Correction of the bed leveling, in micrometers.
|
||||
// Maximum 50 micrometers allowed.
|
||||
// Bed correction is valid if set to 1. If set to zero or 255, the successive 4 bytes are invalid.
|
||||
#define EEPROM_BED_CORRECTION_VALID (EEPROM_FARM_NUMBER-1)
|
||||
#define EEPROM_BED_CORRECTION_VALID (_EEPROM_FREE_NR2_ - 1)
|
||||
#define EEPROM_BED_CORRECTION_LEFT (EEPROM_BED_CORRECTION_VALID-1)
|
||||
#define EEPROM_BED_CORRECTION_RIGHT (EEPROM_BED_CORRECTION_LEFT-1)
|
||||
#define EEPROM_BED_CORRECTION_FRONT (EEPROM_BED_CORRECTION_RIGHT-1)
|
||||
#define EEPROM_BED_CORRECTION_REAR (EEPROM_BED_CORRECTION_FRONT-1)
|
||||
#define EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY (EEPROM_BED_CORRECTION_REAR-1)
|
||||
#define EEPROM_PRINT_FLAG (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY-1)
|
||||
#define EEPROM_PROBE_TEMP_SHIFT (EEPROM_PRINT_FLAG - 2*5) //5 x int for storing pinda probe temp shift relative to 50 C; unit: motor steps
|
||||
#define EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY (EEPROM_BED_CORRECTION_REAR-1) // bool
|
||||
|
||||
#define _EEPROM_FREE_NR3_ (EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY - 1) // uint8_t
|
||||
|
||||
#define EEPROM_PROBE_TEMP_SHIFT (_EEPROM_FREE_NR3_ - 2*5) //5 x int for storing pinda probe temp shift relative to 50 C; unit: motor steps
|
||||
#define EEPROM_TEMP_CAL_ACTIVE (EEPROM_PROBE_TEMP_SHIFT - 1)
|
||||
#define _EEPROM_FREE_NR6_ (EEPROM_TEMP_CAL_ACTIVE - 2*4) //4 x int (used to be for bowden lengths for SNMM)
|
||||
#define _EEPROM_FREE_NR6_ (EEPROM_TEMP_CAL_ACTIVE - 2*4) //4 x int
|
||||
#define EEPROM_CALIBRATION_STATUS_PINDA (_EEPROM_FREE_NR6_ - 1) //0 - not calibrated; 1 - calibrated
|
||||
#define EEPROM_UVLO (EEPROM_CALIBRATION_STATUS_PINDA - 1) //1 - uvlo during print
|
||||
#define EEPROM_UVLO_CURRENT_POSITION (EEPROM_UVLO-2*4) // 2 x float for current_position in X and Y axes
|
||||
#define EEPROM_FILENAME (EEPROM_UVLO_CURRENT_POSITION - 8) //8chars to store filename without extension
|
||||
#define EEPROM_FILE_POSITION (EEPROM_FILENAME - 4) //32 bit for uint32_t file position
|
||||
#define EEPROM_UVLO_CURRENT_POSITION_Z (EEPROM_FILE_POSITION - 4) //float for current position in Z
|
||||
#define EEPROM_UVLO_UNUSED_001 (EEPROM_UVLO_CURRENT_POSITION_Z - 1) // uint8_t (unused)
|
||||
#define EEPROM_UVLO_TARGET_BED (EEPROM_UVLO_UNUSED_001 - 1)
|
||||
#define EEPROM_UVLO_FEEDRATE (EEPROM_UVLO_TARGET_BED - 2) //uint16_t
|
||||
#define EEPROM_UVLO_FAN_SPEED (EEPROM_UVLO_FEEDRATE - 1)
|
||||
#define EEPROM_FAN_CHECK_ENABLED (EEPROM_UVLO_FAN_SPEED - 1)
|
||||
#define EEPROM_UVLO_MESH_BED_LEVELING (EEPROM_FAN_CHECK_ENABLED - 9*2)
|
||||
#define EEPROM_UVLO_Z_MICROSTEPS (EEPROM_UVLO_MESH_BED_LEVELING - 2) // uint16_t (could be removed)
|
||||
#define EEPROM_UVLO_E_ABS (EEPROM_UVLO_Z_MICROSTEPS - 1)
|
||||
#define EEPROM_UVLO_CURRENT_POSITION_E (EEPROM_UVLO_E_ABS - 4) //float for current position in E
|
||||
|
||||
#define EEPROM_UVLO (EEPROM_CALIBRATION_STATUS_PINDA - 1) // uint8_t
|
||||
#define EEPROM_UVLO_CURRENT_POSITION (EEPROM_UVLO-2*4) // 2 x float for current_position in X and Y axes
|
||||
#define EEPROM_FILENAME (EEPROM_UVLO_CURRENT_POSITION - 8) //8chars to store filename without extension
|
||||
#define EEPROM_FILE_POSITION (EEPROM_FILENAME - 4) //32 bit for uint32_t file position
|
||||
#define EEPROM_UVLO_CURRENT_POSITION_Z (EEPROM_FILE_POSITION - 4) //float for current position in Z
|
||||
#define EEPROM_UVLO_PRINT_TYPE (EEPROM_UVLO_CURRENT_POSITION_Z - 1) // uint8_t
|
||||
#define EEPROM_UVLO_TARGET_BED (EEPROM_UVLO_PRINT_TYPE - 1)
|
||||
#define EEPROM_UVLO_FEEDRATE (EEPROM_UVLO_TARGET_BED - 2) //uint16_t
|
||||
#define EEPROM_UVLO_FAN_SPEED (EEPROM_UVLO_FEEDRATE - 1)
|
||||
#define EEPROM_FAN_CHECK_ENABLED (EEPROM_UVLO_FAN_SPEED - 1)
|
||||
|
||||
#define _EEPROM_FREE_NR7_ (EEPROM_FAN_CHECK_ENABLED - 9*2) // 9 x uint16_t
|
||||
#define _EEPROM_FREE_NR8_ (_EEPROM_FREE_NR7_ - 2) // uint16_t
|
||||
|
||||
#define EEPROM_UVLO_E_ABS (_EEPROM_FREE_NR8_ - 1) // uint8_t
|
||||
#define EEPROM_UVLO_CURRENT_POSITION_E (EEPROM_UVLO_E_ABS - 4) // float
|
||||
#define EEPROM_UVLO_SAVED_SEGMENT_IDX (EEPROM_UVLO_CURRENT_POSITION_E - 2) //uint16_t
|
||||
|
||||
#define EEPROM_FREE_NR4 (EEPROM_UVLO_SAVED_SEGMENT_IDX - 1) // FREE EEPROM SPACE
|
||||
#define EEPROM_FREE_NR5 (EEPROM_FREE_NR4 - 1) // FREE EEPROM SPACE
|
||||
#define EEPROM_FREE_NR4 (EEPROM_UVLO_SAVED_SEGMENT_IDX - 1) // uint8_t
|
||||
#define EEPROM_FREE_NR5 (EEPROM_FREE_NR4 - 1) // uint8_t
|
||||
|
||||
// Crash detection mode EEPROM setting
|
||||
#define EEPROM_CRASH_DET (EEPROM_FREE_NR5 - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-12)
|
||||
// Crash detection counter Y (last print)
|
||||
#define EEPROM_CRASH_COUNT_Y (EEPROM_CRASH_DET - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-15)
|
||||
// Filament sensor on/off EEPROM setting
|
||||
#define EEPROM_FSENSOR (EEPROM_CRASH_COUNT_Y - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-14)
|
||||
// Crash detection counter X (last print)
|
||||
#define EEPROM_CRASH_COUNT_X (EEPROM_FSENSOR - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-15)
|
||||
// Filament runout/error coutner (last print)
|
||||
#define EEPROM_FERROR_COUNT (EEPROM_CRASH_COUNT_X - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-16)
|
||||
// Power loss errors (last print)
|
||||
#define EEPROM_POWER_COUNT (EEPROM_FERROR_COUNT - 1) // uint8 (orig EEPROM_UVLO_MESH_BED_LEVELING-17)
|
||||
#define EEPROM_CRASH_DET (EEPROM_FREE_NR5 - 1) // uint8_t
|
||||
#define EEPROM_CRASH_COUNT_Y (EEPROM_CRASH_DET - 1) // uint8_t
|
||||
#define EEPROM_FSENSOR (EEPROM_CRASH_COUNT_Y - 1) // uint8_t
|
||||
#define EEPROM_CRASH_COUNT_X (EEPROM_FSENSOR - 1) // uint8_t
|
||||
#define EEPROM_FERROR_COUNT (EEPROM_CRASH_COUNT_X - 1) // uint8_t
|
||||
#define EEPROM_POWER_COUNT (EEPROM_FERROR_COUNT - 1) // uint8_t
|
||||
|
||||
#define EEPROM_XYZ_CAL_SKEW (EEPROM_POWER_COUNT - 4) // float for skew backup
|
||||
#define EEPROM_WIZARD_ACTIVE (EEPROM_XYZ_CAL_SKEW - 1) // 0: wizard not active, 1: wizard active, 2: wizard active without yes/no = forced calibrate Z after shipping/service prep.
|
||||
|
|
@ -530,17 +583,18 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
#define EEPROM_MMU_FAIL_TOT (EEPROM_FSENS_RUNOUT_ENABLED - 2) //uint16_t
|
||||
#define EEPROM_MMU_FAIL (EEPROM_MMU_FAIL_TOT - 1) //uint8_t
|
||||
|
||||
#define EEPROM_MMU_LOAD_FAIL_TOT (EEPROM_MMU_FAIL - 2) //uint16_t
|
||||
#define EEPROM_MMU_LOAD_FAIL (EEPROM_MMU_LOAD_FAIL_TOT - 1) //uint8_t
|
||||
#define EEPROM_MMU_CUTTER_ENABLED (EEPROM_MMU_LOAD_FAIL - 1)
|
||||
#define EEPROM_MMU_LOAD_FAIL_TOT (EEPROM_MMU_FAIL - 2) // uint16_t
|
||||
#define EEPROM_MMU_LOAD_FAIL (EEPROM_MMU_LOAD_FAIL_TOT - 1) // uint8_t
|
||||
#define EEPROM_MMU_CUTTER_ENABLED (EEPROM_MMU_LOAD_FAIL - 1) // bool
|
||||
#define EEPROM_UVLO_MESH_BED_LEVELING_FULL (EEPROM_MMU_CUTTER_ENABLED - 12*12*2) //allow 12 calibration points for future expansion
|
||||
|
||||
#define EEPROM_MBL_TYPE (EEPROM_UVLO_MESH_BED_LEVELING_FULL-1) //uint8_t for mesh bed leveling precision
|
||||
#define EEPROM_MBL_MAGNET_ELIMINATION (EEPROM_MBL_TYPE -1)
|
||||
#define _EEPROM_FREE_NR9_ (EEPROM_UVLO_MESH_BED_LEVELING_FULL-1) // uint8_t
|
||||
|
||||
#define EEPROM_MBL_MAGNET_ELIMINATION (_EEPROM_FREE_NR9_ - 1)
|
||||
#define EEPROM_MBL_POINTS_NR (EEPROM_MBL_MAGNET_ELIMINATION -1) //uint8_t number of points in one exis for mesh bed leveling
|
||||
#define EEPROM_MBL_PROBE_NR (EEPROM_MBL_POINTS_NR-1) //number of measurements for each point
|
||||
|
||||
#define EEPROM_MMU_STEALTH (EEPROM_MBL_PROBE_NR-1)
|
||||
#define EEPROM_MMU_STEALTH (EEPROM_MBL_PROBE_NR-1) // bool
|
||||
|
||||
#define EEPROM_CHECK_MODE (EEPROM_MMU_STEALTH-1) // uint8
|
||||
#define EEPROM_NOZZLE_DIAMETER (EEPROM_CHECK_MODE-1) // uint8
|
||||
|
|
@ -579,31 +633,43 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
|||
#define EEPROM_ECOOL_ENABLE (EEPROM_JOB_ID-1) // uint8_t
|
||||
#define EEPROM_FW_CRASH_FLAG (EEPROM_ECOOL_ENABLE-1) // uint8_t
|
||||
|
||||
#define EEPROM_TEMP_MODEL_ENABLE (EEPROM_FW_CRASH_FLAG-1) // uint8_t
|
||||
#define EEPROM_TEMP_MODEL_P (EEPROM_TEMP_MODEL_ENABLE-4) // float
|
||||
#define EEPROM_TEMP_MODEL_C (EEPROM_TEMP_MODEL_P-4) // float
|
||||
#define EEPROM_TEMP_MODEL_R (EEPROM_TEMP_MODEL_C-4*16) // float[16]
|
||||
#define EEPROM_TEMP_MODEL_Ta_corr (EEPROM_TEMP_MODEL_R-4) // float
|
||||
#define EEPROM_TEMP_MODEL_W (EEPROM_TEMP_MODEL_Ta_corr-4) // float
|
||||
#define EEPROM_TEMP_MODEL_E (EEPROM_TEMP_MODEL_W-4) // float
|
||||
#define EEPROM_THERMAL_MODEL_ENABLE (EEPROM_FW_CRASH_FLAG-1) // uint8_t
|
||||
#define EEPROM_THERMAL_MODEL_P (EEPROM_THERMAL_MODEL_ENABLE-4) // float
|
||||
#define EEPROM_THERMAL_MODEL_C (EEPROM_THERMAL_MODEL_P-4) // float
|
||||
#define EEPROM_THERMAL_MODEL_R (EEPROM_THERMAL_MODEL_C-4*16) // float[16]
|
||||
#define EEPROM_THERMAL_MODEL_Ta_corr (EEPROM_THERMAL_MODEL_R-4) // float
|
||||
#define EEPROM_THERMAL_MODEL_W (EEPROM_THERMAL_MODEL_Ta_corr-4) // float
|
||||
#define EEPROM_THERMAL_MODEL_E (EEPROM_THERMAL_MODEL_W-4) // float
|
||||
|
||||
#define EEPROM_FSENSOR_JAM_DETECTION (EEPROM_TEMP_MODEL_E-1) // uint8_t
|
||||
#define EEPROM_FSENSOR_JAM_DETECTION (EEPROM_THERMAL_MODEL_E-1) // uint8_t
|
||||
#define EEPROM_MMU_ENABLED (EEPROM_FSENSOR_JAM_DETECTION-1) // uint8_t
|
||||
#define EEPROM_MMU_MATERIAL_CHANGES (EEPROM_MMU_ENABLED-4) // uint32_t
|
||||
#define EEPROM_HEAT_BED_ON_LOAD_FILAMENT (EEPROM_MMU_MATERIAL_CHANGES-1) //uint8
|
||||
#define EEPROM_CALIBRATION_STATUS_V2 (EEPROM_HEAT_BED_ON_LOAD_FILAMENT-1) //uint8
|
||||
|
||||
#define EEPROM_TEMP_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float
|
||||
#define EEPROM_TEMP_MODEL_V (EEPROM_TEMP_MODEL_U-4) //float
|
||||
#define EEPROM_TEMP_MODEL_D (EEPROM_TEMP_MODEL_V-4) //float
|
||||
#define EEPROM_TEMP_MODEL_L (EEPROM_TEMP_MODEL_D-2) //uint16_t
|
||||
#define EEPROM_TEMP_MODEL_VER (EEPROM_TEMP_MODEL_L-1) //uint8_t
|
||||
#define EEPROM_THERMAL_MODEL_U (EEPROM_CALIBRATION_STATUS_V2-4) //float
|
||||
#define EEPROM_THERMAL_MODEL_V (EEPROM_THERMAL_MODEL_U-4) //float
|
||||
#define EEPROM_THERMAL_MODEL_D (EEPROM_THERMAL_MODEL_V-4) //float
|
||||
#define EEPROM_THERMAL_MODEL_L (EEPROM_THERMAL_MODEL_D-2) //uint16_t
|
||||
#define EEPROM_THERMAL_MODEL_VER (EEPROM_THERMAL_MODEL_L-1) //uint8_t
|
||||
|
||||
#define EEPROM_KILL_MESSAGE (EEPROM_TEMP_MODEL_VER-2) //PGM_P
|
||||
#define EEPROM_KILL_MESSAGE (EEPROM_THERMAL_MODEL_VER-2) //PGM_P
|
||||
#define EEPROM_KILL_PENDING_FLAG (EEPROM_KILL_MESSAGE-1) //uint8
|
||||
|
||||
#define EEPROM_FILENAME_EXTENSION (EEPROM_KILL_PENDING_FLAG - 3) // 3 x char
|
||||
#define EEPROM_CUSTOM_MENDEL_NAME (EEPROM_FILENAME_EXTENSION-17) //char[17]
|
||||
#define EEPROM_UVLO_Z_LIFTED (EEPROM_CUSTOM_MENDEL_NAME-1) //bool
|
||||
#define EEPROM_UVLO_EXTRUDE_MINTEMP (EEPROM_UVLO_Z_LIFTED-2) //uint16_t
|
||||
#define EEPROM_UVLO_ACCELL_MM_S2_NORMAL (EEPROM_UVLO_EXTRUDE_MINTEMP-4*4) // 4 x float
|
||||
#define EEPROM_UVLO_ACCELL_MM_S2_SILENT (EEPROM_UVLO_ACCELL_MM_S2_NORMAL-4*4) // 4 x uint32_t
|
||||
#define EEPROM_UVLO_MAX_FEEDRATE_NORMAL (EEPROM_UVLO_ACCELL_MM_S2_SILENT-4*4) // 4 x uint32_t
|
||||
#define EEPROM_UVLO_MAX_FEEDRATE_SILENT (EEPROM_UVLO_MAX_FEEDRATE_NORMAL-4*4) // 4 x float
|
||||
#define EEPROM_UVLO_MIN_FEEDRATE (EEPROM_UVLO_MAX_FEEDRATE_SILENT-4) //float
|
||||
#define EEPROM_UVLO_MIN_TRAVEL_FEEDRATE (EEPROM_UVLO_MIN_FEEDRATE-4) //float
|
||||
#define EEPROM_UVLO_MIN_SEGMENT_TIME_US (EEPROM_UVLO_MIN_TRAVEL_FEEDRATE-4) //uint32_t
|
||||
#define EEPROM_UVLO_MAX_JERK (EEPROM_UVLO_MIN_SEGMENT_TIME_US-4*4) // 4 x float
|
||||
#define EEPROM_CHECK_FILAMENT (EEPROM_UVLO_MAX_JERK-1) // uint8_t
|
||||
//This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.
|
||||
#define EEPROM_LAST_ITEM EEPROM_KILL_PENDING_FLAG
|
||||
#define EEPROM_LAST_ITEM EEPROM_CHECK_FILAMENT
|
||||
// !!!!!
|
||||
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
||||
// !!!!!
|
||||
|
|
@ -664,6 +730,30 @@ uint32_t eeprom_init_default_dword(uint32_t *__p, uint32_t def);
|
|||
void eeprom_init_default_float(float *__p, float def);
|
||||
void eeprom_init_default_block(void *__p, size_t __n, const void *def);
|
||||
void eeprom_init_default_block_P(void *__p, size_t __n, const void *def);
|
||||
/// Updates eeprom byte and notifies the changed eeprom address (just the address!) onto the serial line
|
||||
#ifndef DEBUG_EEPROM_CHANGES
|
||||
void eeprom_write_byte_notify(uint8_t *dst, uint8_t value);
|
||||
void eeprom_update_byte_notify(uint8_t *dst, uint8_t value);
|
||||
void eeprom_write_word_notify(uint16_t *dst, uint16_t value);
|
||||
void eeprom_update_word_notify(uint16_t *dst, uint16_t value);
|
||||
void eeprom_write_dword_notify(uint32_t *dst, uint32_t value);
|
||||
void eeprom_update_dword_notify(uint32_t *dst, uint32_t value);
|
||||
void eeprom_write_float_notify(float *dst, float value);
|
||||
void eeprom_update_float_notify(float *dst, float value);
|
||||
void eeprom_write_block_notify(const void *__src, void *__dst , size_t __size);
|
||||
void eeprom_update_block_notify(const void *__src, void *__dst, size_t __size);
|
||||
#else
|
||||
void eeprom_write_byte_notify(uint8_t *dst, uint8_t value, bool active = true);
|
||||
void eeprom_update_byte_notify(uint8_t *dst, uint8_t value, bool active = true);
|
||||
void eeprom_write_word_notify(uint16_t *dst, uint16_t value, bool active = true);
|
||||
void eeprom_update_word_notify(uint16_t *dst, uint16_t value, bool active = true);
|
||||
void eeprom_write_dword_notify(uint32_t *dst, uint32_t value, bool active = true);
|
||||
void eeprom_update_dword_notify(uint32_t *dst, uint32_t value, bool active = true);
|
||||
void eeprom_write_float_notify(float *dst, float value, bool active = true);
|
||||
void eeprom_update_float_notify(float *dst, float value, bool active = true);
|
||||
void eeprom_write_block_notify(const void *__src, void *__dst , size_t __size, bool active = true);
|
||||
void eeprom_update_block_notify(const void *__src, void *__dst, size_t __size , bool active = true);
|
||||
#endif //DEBUG_EEPROM_CHANGES
|
||||
#endif
|
||||
|
||||
#endif // EEPROM_H
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "messages.h"
|
||||
#include "temperature.h"
|
||||
#include "stepper.h"
|
||||
#include "stopwatch.h"
|
||||
|
||||
#define FAN_CHECK_PERIOD 5000 //5s
|
||||
#define FAN_CHECK_DURATION 100 //100ms
|
||||
|
|
@ -93,7 +94,7 @@ void fanSpeedError(unsigned char _fan) {
|
|||
|
||||
if (printJobOngoing()) {
|
||||
// A print is ongoing, pause the print normally
|
||||
if(!isPrintPaused) {
|
||||
if(!printingIsPaused()) {
|
||||
if (usb_timer.running())
|
||||
lcd_pause_usb_print();
|
||||
else
|
||||
|
|
@ -146,8 +147,9 @@ void checkFanSpeed()
|
|||
if ((fan_check_error == EFCE_FIXED) && !printer_active()){
|
||||
fan_check_error = EFCE_OK; //if the issue is fixed while the printer is doing nothing, reenable processing immediately.
|
||||
lcd_reset_alert_level(); //for another fan speed error
|
||||
lcd_setstatuspgm(MSG_WELCOME); // Reset the status line message to visually show the error is gone
|
||||
}
|
||||
if (fans_check_enabled && (fan_check_error == EFCE_OK))
|
||||
if (fans_check_enabled && (fan_check_error != EFCE_REPORTED))
|
||||
{
|
||||
for (uint8_t fan = 0; fan < 2; fan++)
|
||||
{
|
||||
|
|
@ -192,7 +194,7 @@ ISR(INT7_vect) {
|
|||
if ((millis_nc() - t_fan_rising_edge) >= FAN_PULSE_WIDTH_LIMIT) {//this pulse was from sensor and not from pwm
|
||||
fan_edge_counter[1] += 2; //we are currently counting all edges so lets count two edges for one pulse
|
||||
}
|
||||
}
|
||||
}
|
||||
EICRB ^= (1 << 6); //change edge
|
||||
}
|
||||
#endif //(defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1))
|
||||
|
|
@ -236,7 +238,7 @@ bool extruder_altfan_detect()
|
|||
void altfanOverride_toggle()
|
||||
{
|
||||
altfanStatus.altfanOverride = !altfanStatus.altfanOverride;
|
||||
eeprom_update_byte((uint8_t *)EEPROM_ALTFAN_OVERRIDE, altfanStatus.altfanOverride);
|
||||
eeprom_update_byte_notify((uint8_t *)EEPROM_ALTFAN_OVERRIDE, altfanStatus.altfanOverride);
|
||||
}
|
||||
|
||||
bool altfanOverride_get()
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
/// Write to a pin wrapper, non critical.
|
||||
/// This macro is cheaper than WRITE(IO,v) on ports H,I,J,K,L, as _WRITE_C disables / enables interrupts
|
||||
/// and stores the old CPU flags on the stack.
|
||||
/// This macro should only be called, where it cannot be interrupted.
|
||||
/// This macro should only be called, where it cannot be interrupted.
|
||||
#define WRITE_NC(IO, v) _WRITE_NC(IO, v)
|
||||
|
||||
/// toggle a pin wrapper
|
||||
|
|
@ -2067,7 +2067,7 @@ pins
|
|||
pins
|
||||
*/
|
||||
|
||||
//#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
|
||||
//#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
|
||||
#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
|
||||
|
||||
#define DIO0_PIN PINA0
|
||||
|
|
@ -2707,8 +2707,8 @@ pins
|
|||
|
||||
/*
|
||||
|
||||
AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
|
||||
Port A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||
AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
|
||||
Port A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||
Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
||||
Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
||||
The pins 46 and 47 are not supported by Teensyduino, but are supported below.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#include "first_lay_cal.h"
|
||||
#include "Configuration_var.h"
|
||||
#include "language.h"
|
||||
#include "Marlin.h"
|
||||
#include "messages.h"
|
||||
#include "cmdqueue.h"
|
||||
#include "mmu2.h"
|
||||
#include <avr/pgmspace.h>
|
||||
|
|
@ -37,12 +37,31 @@ static constexpr float spacing(float layer_height, float extrusion_width, float
|
|||
static void lay1cal_common_enqueue_loop(const char * const * cmd_sequence, const uint8_t steps) {
|
||||
for (uint8_t i = 0; i < steps; ++i)
|
||||
{
|
||||
enquecommand_P(static_cast<char*>(pgm_read_ptr(cmd_sequence + i)));
|
||||
void * const pgm_ptr = pgm_read_ptr(cmd_sequence + i);
|
||||
|
||||
// M702 is currently only used with MMU enabled
|
||||
if (pgm_ptr == MSG_M702 && !MMU2::mmu2.Enabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
enquecommand_P(static_cast<char*>(pgm_ptr));
|
||||
}
|
||||
}
|
||||
|
||||
static const char extrude_fmt[] PROGMEM = "G1 X%d Y%d E%-.5f";
|
||||
static const char zero_extrusion[] PROGMEM = "G92 E0";
|
||||
static const char extrude_fmt_X[] PROGMEM = "G1X%.4fE%.4f";
|
||||
static const char extrude_fmt_Y[] PROGMEM = "G1Y%.4fE%.4f";
|
||||
static const char zero_extrusion[] PROGMEM = "G92E0";
|
||||
static const char feedrate_F1080[] PROGMEM = "G1F1080";
|
||||
#ifndef NEW_FIRST_LAYER_CAL
|
||||
static constexpr int8_t invert = 1;
|
||||
static constexpr float short_length = 20;
|
||||
static constexpr float square_width = short_length;
|
||||
#else
|
||||
static constexpr int8_t invert = -1;
|
||||
static constexpr float short_length = 13.2812; //max_pos[1]/2 / meander * 2
|
||||
static constexpr float square_width = short_length*2;
|
||||
#endif //NEW_FIRST_LAYER_CAL
|
||||
static constexpr float long_length = 150;
|
||||
|
||||
//! @brief Wait for preheat
|
||||
void lay1cal_wait_preheat()
|
||||
|
|
@ -72,8 +91,8 @@ bool lay1cal_load_filament(uint8_t filament)
|
|||
if (MMU2::mmu2.Enabled())
|
||||
{
|
||||
enquecommand_P(MSG_M83);
|
||||
enquecommand_P(PSTR("G1 Y-3 F1000"));
|
||||
enquecommand_P(PSTR("G1 Z0.4 F1000"));
|
||||
enquecommand_P(PSTR("G1Y-3F1000"));
|
||||
enquecommand_P(PSTR("G1Z0.4"));
|
||||
|
||||
uint8_t currentTool = MMU2::mmu2.get_current_tool();
|
||||
if(currentTool == filament ){
|
||||
|
|
@ -93,25 +112,22 @@ bool lay1cal_load_filament(uint8_t filament)
|
|||
//! @brief Print intro line
|
||||
//! @param extraPurgeNeeded false if the first MMU-related "G1 E29" have to be skipped because the nozzle is already full of filament
|
||||
//! @param layer_height the height of the calibration layer
|
||||
//! @param extrusion_width the width of the extrusion layer
|
||||
//! @param extrusion_width the width of the extrusion layer
|
||||
void lay1cal_intro_line(bool extraPurgeNeeded, float layer_height, float extrusion_width)
|
||||
{
|
||||
static const char cmd_intro_mmu_3[] PROGMEM = "G1 X55 E29 F1073";
|
||||
static const char cmd_intro_mmu_4[] PROGMEM = "G1 X5 E29 F1800";
|
||||
static const char cmd_intro_mmu_5[] PROGMEM = "G1 X55 E8 F2000";
|
||||
static const char cmd_intro_mmu_6[] PROGMEM = "G1 Z0.3 F1000";
|
||||
static const char cmd_intro_mmu_8[] PROGMEM = "G1 X240 E25 F2200";
|
||||
static const char cmd_intro_mmu_9[] PROGMEM = "G1 Y-2 F1000";
|
||||
static const char cmd_intro_mmu_10[] PROGMEM = "G1 X55 E25 F1400";
|
||||
static const char cmd_intro_mmu_11[] PROGMEM = "G1 Z0.2 F1000";
|
||||
static const char cmd_intro_mmu_12[] PROGMEM = "G1 X5 E4 F1000";
|
||||
|
||||
static const char * const intro_mmu_cmd[] PROGMEM =
|
||||
static const char cmd_intro_mmu_3[] PROGMEM = "G1X55E29F1073";
|
||||
static const char cmd_intro_mmu_4[] PROGMEM = "G1X5E29F1800";
|
||||
static const char cmd_intro_mmu_5[] PROGMEM = "G1X55E8F2000";
|
||||
static const char cmd_intro_mmu_6[] PROGMEM = "G1Z0.3F1000";
|
||||
static const char cmd_intro_mmu_8[] PROGMEM = "G1X240E25F2200";
|
||||
static const char cmd_intro_mmu_9[] PROGMEM = "G1Y-2F1000";
|
||||
static const char cmd_intro_mmu_10[] PROGMEM = "G1X202.5E8F1400";
|
||||
static const char cmd_intro_mmu_11[] PROGMEM = "G1Z0.2";
|
||||
static const char * const cmd_intro_mmu[] PROGMEM =
|
||||
{
|
||||
// first 2 items are only relevant if filament was not loaded - i.e. extraPurgeNeeded == true
|
||||
cmd_intro_mmu_3,
|
||||
cmd_intro_mmu_4,
|
||||
|
||||
cmd_intro_mmu_5,
|
||||
cmd_intro_mmu_6,
|
||||
zero_extrusion,
|
||||
|
|
@ -119,42 +135,42 @@ void lay1cal_intro_line(bool extraPurgeNeeded, float layer_height, float extrusi
|
|||
cmd_intro_mmu_9,
|
||||
cmd_intro_mmu_10,
|
||||
cmd_intro_mmu_11,
|
||||
cmd_intro_mmu_12,
|
||||
};
|
||||
|
||||
if (MMU2::mmu2.Enabled())
|
||||
{
|
||||
for (uint8_t i = (extraPurgeNeeded ? 0 : 2); i < (sizeof(intro_mmu_cmd)/sizeof(intro_mmu_cmd[0])); ++i)
|
||||
for (uint8_t i = (extraPurgeNeeded ? 0 : 2); i < (sizeof(cmd_intro_mmu)/sizeof(cmd_intro_mmu[0])); ++i)
|
||||
{
|
||||
enquecommand_P(static_cast<char*>(pgm_read_ptr(&intro_mmu_cmd[i])));
|
||||
enquecommand_P(static_cast<char*>(pgm_read_ptr(&cmd_intro_mmu[i])));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static const char fmt1[] PROGMEM = "G1 X%d E%-.3f F1000";
|
||||
enquecommandf_P(fmt1, 60, count_e(layer_height, extrusion_width * 4.f, 60));
|
||||
enquecommandf_P(fmt1, 100, count_e(layer_height, extrusion_width * 8.f, 40));
|
||||
enquecommand_P(feedrate_F1080); //fixed velocity for the intro line
|
||||
enquecommandf_P(extrude_fmt_X, 60.f, count_e(layer_height, extrusion_width * 4.f, 60));
|
||||
enquecommandf_P(extrude_fmt_X, 202.5f, count_e(layer_height, extrusion_width * 8.f, 142.5));
|
||||
}
|
||||
}
|
||||
|
||||
//! @brief Setup for printing meander
|
||||
void lay1cal_before_meander()
|
||||
{
|
||||
static const char cmd_pre_meander_2[] PROGMEM = "G90"; //use absolute coordinates
|
||||
static const char cmd_pre_meander_4[] PROGMEM = "G1 E-1.5 F2100";
|
||||
static const char cmd_pre_meander_5[] PROGMEM = "G1 Z5 F7200";
|
||||
static const char cmd_pre_meander_6[] PROGMEM = "M204 S1000"; //set acceleration
|
||||
static const char cmd_pre_meander_7[] PROGMEM = "G1 F4000";
|
||||
#ifndef NEW_FIRST_LAYER_CAL
|
||||
static const char cmd_pre_meander_4[] PROGMEM = "G1E-1.5F2100";
|
||||
static const char cmd_pre_meander_5[] PROGMEM = "G1Z5F7200";
|
||||
#endif //NEW_FIRST_LAYER_CAL
|
||||
static const char cmd_pre_meander_6[] PROGMEM = "M204S1000"; //set acceleration
|
||||
|
||||
static const char * const cmd_pre_meander[] PROGMEM =
|
||||
{
|
||||
zero_extrusion,
|
||||
cmd_pre_meander_2,
|
||||
MSG_G90,
|
||||
MSG_M83, // use relative distances for extrusion
|
||||
#ifndef NEW_FIRST_LAYER_CAL
|
||||
cmd_pre_meander_4,
|
||||
cmd_pre_meander_5,
|
||||
#endif //NEW_FIRST_LAYER_CAL
|
||||
cmd_pre_meander_6,
|
||||
cmd_pre_meander_7,
|
||||
};
|
||||
|
||||
lay1cal_common_enqueue_loop(cmd_pre_meander, (sizeof(cmd_pre_meander)/sizeof(cmd_pre_meander[0])));
|
||||
|
|
@ -163,88 +179,86 @@ void lay1cal_before_meander()
|
|||
//! @brief Print meander start
|
||||
void lay1cal_meander_start(float layer_height, float extrusion_width)
|
||||
{
|
||||
enquecommand_P(PSTR("G1 X50 Y155"));
|
||||
|
||||
static const char fmt1[] PROGMEM = "G1 Z%-.3f F7200";
|
||||
#ifndef NEW_FIRST_LAYER_CAL
|
||||
enquecommand_P(PSTR("G1X50Y155"));
|
||||
#endif //_NEW_FIRST_LAYER_CAL
|
||||
static const char fmt1[] PROGMEM = "G1Z%.2f";
|
||||
enquecommandf_P(fmt1, layer_height);
|
||||
|
||||
enquecommand_P(PSTR("G1 F1080"));
|
||||
|
||||
enquecommandf_P(extrude_fmt, 75, 155, count_e(layer_height, extrusion_width * 4.f, 25));
|
||||
enquecommandf_P(extrude_fmt, 100, 155, count_e(layer_height, extrusion_width * 2.f, 25));
|
||||
enquecommandf_P(extrude_fmt, 200, 155, count_e(layer_height, extrusion_width, 100));
|
||||
enquecommandf_P(extrude_fmt, 200, 135, count_e(layer_height, extrusion_width, 20));
|
||||
enquecommand_P(feedrate_F1080);
|
||||
enquecommand_P(MSG_G91); //enable relative XYZ
|
||||
#ifdef NEW_FIRST_LAYER_CAL
|
||||
enquecommandf_P(extrude_fmt_Y, short_length, count_e(layer_height, extrusion_width, short_length));
|
||||
enquecommandf_P(extrude_fmt_X, long_length*invert, count_e(layer_height, extrusion_width, long_length));
|
||||
enquecommandf_P(extrude_fmt_Y, -short_length*invert, count_e(layer_height, extrusion_width, short_length));
|
||||
#else
|
||||
enquecommandf_P(extrude_fmt_X, 25.f*invert, count_e(layer_height, extrusion_width * 4.f, 25));
|
||||
enquecommandf_P(extrude_fmt_X, 25.f*invert, count_e(layer_height, extrusion_width * 2.f, 25));
|
||||
enquecommandf_P(extrude_fmt_X, 100.f*invert, count_e(layer_height, extrusion_width, 100));
|
||||
enquecommandf_P(extrude_fmt_Y, -20.f*invert, count_e(layer_height, extrusion_width, 20));
|
||||
#endif //_NEW_FIRST_LAYER_CAL
|
||||
}
|
||||
|
||||
//! @brief Print meander
|
||||
//! @param cmd_buffer character buffer needed to format gcodes
|
||||
void lay1cal_meander(float layer_height, float extrusion_width)
|
||||
{
|
||||
const float short_length = 20;
|
||||
float long_length = 150;
|
||||
const float long_extrusion = count_e(layer_height, extrusion_width, long_length);
|
||||
const float short_extrusion = count_e(layer_height, extrusion_width, short_length);
|
||||
|
||||
uint8_t y_pos = 135;
|
||||
uint8_t x_pos = 50;
|
||||
for(uint8_t i = 0; i <= 4; ++i)
|
||||
for(int8_t i = 0, xdir = -invert; i <= 4; i++, xdir = -xdir)
|
||||
{
|
||||
enquecommandf_P(extrude_fmt, x_pos, y_pos, long_extrusion);
|
||||
|
||||
y_pos -= short_length;
|
||||
|
||||
enquecommandf_P(extrude_fmt, x_pos, y_pos, short_extrusion);
|
||||
|
||||
x_pos += long_length;
|
||||
|
||||
long_length = -long_length;
|
||||
enquecommandf_P(extrude_fmt_X, xdir * long_length, long_extrusion);
|
||||
enquecommandf_P(extrude_fmt_Y, invert * -short_length, short_extrusion);
|
||||
}
|
||||
#ifdef NEW_FIRST_LAYER_CAL
|
||||
constexpr float mid_length = 0.5f * long_length - 0.5f * square_width;
|
||||
const float mid_extrusion = count_e(layer_height, extrusion_width, mid_length);
|
||||
enquecommandf_P(extrude_fmt_X, -mid_length, mid_extrusion); //~Middle of bed X125
|
||||
enquecommandf_P(extrude_fmt_Y, short_length, short_extrusion); //~Middle of bed Y105
|
||||
#endif //NEW_FIRST_LAYER_CAL
|
||||
|
||||
}
|
||||
|
||||
//! @brief Print square
|
||||
//!
|
||||
//! This function needs to be called 4 times with step of 0,4,8,12
|
||||
//! This function enqueues 4 lines of the square, so it needs to be called multiple times
|
||||
//!
|
||||
//! @param cmd_buffer character buffer needed to format gcodes
|
||||
//! @param i iteration
|
||||
void lay1cal_square(uint8_t step, float layer_height, float extrusion_width)
|
||||
void lay1cal_square(float layer_height, float extrusion_width)
|
||||
{
|
||||
const float long_length = 20;
|
||||
const float short_length = spacing(layer_height, extrusion_width);
|
||||
const float long_extrusion = count_e(layer_height, extrusion_width, long_length);
|
||||
const float short_extrusion = count_e(layer_height, extrusion_width, short_length);
|
||||
static const char fmt1[] PROGMEM = "G1 X%d Y%-.2f E%-.3f";
|
||||
const float Y_spacing = spacing(layer_height, extrusion_width);
|
||||
const float long_extrusion = count_e(layer_height, extrusion_width, square_width);
|
||||
const float short_extrusion = count_e(layer_height, extrusion_width, Y_spacing);
|
||||
|
||||
for (uint8_t i = step; i < step+4; ++i)
|
||||
for (uint8_t i = 0; i < 4; i++)
|
||||
{
|
||||
enquecommandf_P(fmt1, 70, (35 - i*short_length * 2), long_extrusion);
|
||||
enquecommandf_P(fmt1, 70, (35 - (2 * i + 1)*short_length), short_extrusion);
|
||||
enquecommandf_P(fmt1, 50, (35 - (2 * i + 1)*short_length), long_extrusion);
|
||||
enquecommandf_P(fmt1, 50, (35 - (i + 1)*short_length * 2), short_extrusion);
|
||||
enquecommandf_P(extrude_fmt_X, square_width*invert, long_extrusion);
|
||||
enquecommandf_P(extrude_fmt_Y, -Y_spacing*invert, short_extrusion);
|
||||
enquecommandf_P(extrude_fmt_X, -square_width*invert, long_extrusion);
|
||||
enquecommandf_P(extrude_fmt_Y, -Y_spacing*invert, short_extrusion);
|
||||
}
|
||||
}
|
||||
|
||||
void lay1cal_finish(bool mmu_enabled)
|
||||
void lay1cal_finish()
|
||||
{
|
||||
static const char cmd_cal_finish_1[] PROGMEM = "G1 E-0.075 F2100"; //retract
|
||||
static const char cmd_cal_finish_2[] PROGMEM = "M104 S0"; // turn off temperature
|
||||
static const char cmd_cal_finish_3[] PROGMEM = "M140 S0"; // turn off heatbed
|
||||
static const char cmd_cal_finish_4[] PROGMEM = "G1 Z10 F1300"; //lift Z
|
||||
static const char cmd_cal_finish_5[] PROGMEM = "G1 X10 Y180 F4000"; //Go to parking position
|
||||
static const char cmd_cal_finish_3[] PROGMEM = "G1E-0.075F2100"; // Retract
|
||||
static const char cmd_cal_finish_4[] PROGMEM = "M140S0"; // Turn off bed heater
|
||||
static const char cmd_cal_finish_5[] PROGMEM = "G1Z10F1300"; // Lift Z
|
||||
static const char cmd_cal_finish_6[] PROGMEM = "G1X10Y180F4000"; // Go to parking position
|
||||
static const char cmd_cal_finish_8[] PROGMEM = "M104S0"; // Turn off hotend heater
|
||||
|
||||
static const char * const cmd_cal_finish[] PROGMEM =
|
||||
{
|
||||
MSG_M107, // turn off printer fan
|
||||
cmd_cal_finish_1,
|
||||
cmd_cal_finish_2,
|
||||
cmd_cal_finish_3,
|
||||
cmd_cal_finish_4,
|
||||
cmd_cal_finish_5
|
||||
MSG_G90, // Set to Absolute Positioning
|
||||
MSG_M107, // Turn off printer fan
|
||||
cmd_cal_finish_3, // Retract
|
||||
cmd_cal_finish_4, // Turn off bed heater
|
||||
cmd_cal_finish_5, // Lift Z
|
||||
cmd_cal_finish_6, // Go to parking position
|
||||
MSG_M702, // Unload filament (MMU only)
|
||||
cmd_cal_finish_8, // Turn off hotend heater
|
||||
MSG_M84 // Disable stepper motors
|
||||
};
|
||||
|
||||
lay1cal_common_enqueue_loop(cmd_cal_finish, (sizeof(cmd_cal_finish)/sizeof(cmd_cal_finish[0])));
|
||||
|
||||
if (mmu_enabled) enquecommand_P(MSG_M702); //unload from nozzle
|
||||
enquecommand_P(MSG_M84);// disable motors
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ void lay1cal_intro_line(bool skipExtraPurge, float layer_height, float extrusion
|
|||
void lay1cal_before_meander();
|
||||
void lay1cal_meander_start(float layer_height, float extrusion_width);
|
||||
void lay1cal_meander(float layer_height, float extrusion_width);
|
||||
void lay1cal_square(uint8_t step, float layer_height, float extrusion_width);
|
||||
void lay1cal_finish(bool mmu_enabled);
|
||||
void lay1cal_square(float layer_height, float extrusion_width);
|
||||
void lay1cal_finish();
|
||||
|
||||
#endif /* FIRMWARE_FIRST_LAY_CAL_H_ */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
// Doing this at higher frequency than the bed "loudspeaker" can handle makes the click barely audible.
|
||||
// Technically:
|
||||
// timer0 is set to fast PWM mode at 62.5kHz (timer0 is linked to the bed heating pin) (zero prescaler)
|
||||
// To keep the bed switching at 30Hz - we don't want the PWM running at 62kHz all the time
|
||||
// To keep the bed switching at 30Hz - we don't want the PWM running at 62kHz all the time
|
||||
// since it would burn the heatbed's MOSFET:
|
||||
// 16MHz/256 levels of PWM duty gives us 62.5kHz
|
||||
// 62.5kHz/256 gives ~244Hz, that is still too fast - 244/8 gives ~30Hz, that's what we need
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
// The finite automaton is running in the ISR(TIMER0_OVF_vect)
|
||||
|
||||
// 2019-08-14 update: the original algorithm worked very well, however there were 2 regressions:
|
||||
// 1. 62kHz ISR requires considerable amount of processing power,
|
||||
// 1. 62kHz ISR requires considerable amount of processing power,
|
||||
// USB transfer speed dropped by 20%, which was most notable when doing short G-code segments.
|
||||
// 2. Some users reported TLed PSU started clicking when running at 120V/60Hz.
|
||||
// 2. Some users reported TLed PSU started clicking when running at 120V/60Hz.
|
||||
// This looks like the original algorithm didn't maintain base PWM 30Hz, but only 15Hz
|
||||
// To address both issues, there is an improved approach based on the idea of leveraging
|
||||
// different CLK prescalers in some automaton states - i.e. when holding LOW or HIGH on the output pin,
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
// - it can toggle unnoticed, which will result in bed clicking again.
|
||||
// That's why there are special transition states ZERO_TO_RISE and ONE_TO_FALL, which enable the
|
||||
// counter change its operation atomically and without artefacts on the output pin.
|
||||
// The resulting signal on the output pin was checked with an osciloscope.
|
||||
// The resulting signal on the output pin was checked with an osciloscope.
|
||||
// If there are any change requirements in the future, the signal must be checked with an osciloscope again,
|
||||
// ad-hoc changes may completely screw things up!
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ enum class States : uint8_t {
|
|||
ZERO_TO_RISE, ///< metastate allowing the timer change its state atomically without artefacts on the output pin
|
||||
RISE, ///< 16 fast PWM cycles with increasing duty up to steady ON
|
||||
RISE_TO_ONE, ///< metastate allowing the timer change its state atomically without artefacts on the output pin
|
||||
ONE, ///< steady 1 (ON), no change for the whole period
|
||||
ONE, ///< steady 1 (ON), no change for the whole period
|
||||
FALL, ///< 16 fast PWM cycles with decreasing duty down to steady OFF
|
||||
FALL_TO_ZERO ///< metastate allowing the timer change its state atomically without artefacts on the output pin
|
||||
};
|
||||
|
|
@ -92,7 +92,7 @@ static const uint8_t fastShift = 4;
|
|||
/// increment slowCounter by 1
|
||||
/// but use less bits of soft PWM - something like soft_pwm_bed >> 2
|
||||
/// that may further reduce the CPU cycles required by the bed heating automaton
|
||||
/// Due to the nature of bed heating the reduced PID precision may not be a major issue, however doing 8x less ISR(timer0_ovf) may significantly improve the performance
|
||||
/// Due to the nature of bed heating the reduced PID precision may not be a major issue, however doing 8x less ISR(timer0_ovf) may significantly improve the performance
|
||||
static const uint8_t slowInc = 1;
|
||||
|
||||
ISR(TIMER0_OVF_vect) // timer compare interrupt service routine
|
||||
|
|
@ -177,6 +177,6 @@ ISR(TIMER0_OVF_vect) // timer compare interrupt service routine
|
|||
TCNT0 = 128;
|
||||
OCR0B = 255;
|
||||
TCCR0B = (1 << CS01); // change prescaler to 8, i.e. 7.8kHz
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
#include <string.h>
|
||||
#include "Configuration_adv.h"
|
||||
#include "host.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static LongTimer M79_timer;
|
||||
static char host_status_screen_name[3];
|
||||
|
||||
void SetHostStatusScreenName(const char * name) {
|
||||
strncpy(host_status_screen_name, name, 2);
|
||||
host_status_screen_name[2] = '\0';
|
||||
}
|
||||
|
||||
char * GetHostStatusScreenName() {
|
||||
return host_status_screen_name;
|
||||
}
|
||||
|
||||
void ResetHostStatusScreenName() {
|
||||
memset(host_status_screen_name, 0, sizeof(host_status_screen_name));
|
||||
}
|
||||
|
||||
void M79_timer_restart() {
|
||||
M79_timer.start();
|
||||
}
|
||||
|
||||
bool M79_timer_get_status() {
|
||||
return M79_timer.running();
|
||||
}
|
||||
|
||||
void M79_timer_update_status() {
|
||||
M79_timer.expired(M79_TIMEOUT);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
/// Assigns host name with up to two characters which will be shown on
|
||||
/// the UI when printing. The function forces the third byte to be null delimiter.
|
||||
void SetHostStatusScreenName(const char * name);
|
||||
|
||||
/// Returns a pointer to the host name
|
||||
char * GetHostStatusScreenName();
|
||||
|
||||
/// Reset the memory to NULL when the host name should not be used
|
||||
void ResetHostStatusScreenName();
|
||||
|
||||
/// Restart the M79 timer
|
||||
void M79_timer_restart();
|
||||
|
||||
/// Get the current M79 timer status
|
||||
/// @returns true if running, false otherwise
|
||||
bool M79_timer_get_status();
|
||||
|
||||
/// Checks if the timer period has expired. If the timer
|
||||
/// has expired, the timer is stopped
|
||||
void M79_timer_update_status();
|
||||
|
|
@ -74,7 +74,7 @@ float la10c_jerk(float j)
|
|||
|
||||
// check for a compatible range of values prior to convert (be sure that
|
||||
// a higher E-jerk would still be compatible wrt the E accell range)
|
||||
if(j < 4.5 && cs.max_acceleration_units_per_sq_second_normal[E_AXIS] < 2000)
|
||||
if(j < 4.5 && cs.max_acceleration_mm_per_s2_normal[E_AXIS] < 2000)
|
||||
return j;
|
||||
|
||||
// bring low E-jerk values into equivalent LA 1.5 values by
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ const char* lang_get_name_by_code(uint16_t code)
|
|||
#endif // COMMUNITY_LANG_GROUP1_RO
|
||||
|
||||
//Use the 3 lines below as a template and replace 'QR' and 'New language'
|
||||
//#ifdef COMMUNITY_LANG_GROUP1_QR
|
||||
//#ifdef COMMUNITY_LANG_GROUP1_QR
|
||||
// case LANG_CODE_QR: return _n("New language"); //community contribution
|
||||
//#endif // COMMUNITY_LANG_GROUP1_QR
|
||||
#endif // COMMUNITY_LANGUAGE_SUPPORT
|
||||
|
|
@ -276,7 +276,7 @@ const char* lang_get_sec_lang_str_by_id(uint16_t id)
|
|||
return ui + pgm_read_word(((uint16_t*)(ui + 16 + id * 2))); //read relative offset and return calculated pointer
|
||||
}
|
||||
|
||||
uint16_t lang_print_sec_lang(FILE* out)
|
||||
uint16_t lang_print_sec_lang()
|
||||
{
|
||||
printf_P(_n("&_SEC_LANG = 0x%04x\n"), &_SEC_LANG);
|
||||
printf_P(_n("sizeof(_SEC_LANG) = 0x%04x\n"), sizeof(_SEC_LANG));
|
||||
|
|
@ -298,7 +298,7 @@ uint16_t lang_print_sec_lang(FILE* out)
|
|||
puts_P(_n(" strings:\n"));
|
||||
uint16_t ui = _SEC_LANG_TABLE; //table pointer
|
||||
for (ui = 0; ui < _lt_count; ui++)
|
||||
fprintf_P(out, _n(" %3d %S\n"), ui, lang_get_sec_lang_str_by_id(ui));
|
||||
printf_P(_n(" %3d %S\n"), ui, lang_get_sec_lang_str_by_id(ui));
|
||||
return _lt_count;
|
||||
}
|
||||
#endif //DEBUG_SEC_LANG
|
||||
|
|
|
|||
|
|
@ -13,14 +13,6 @@
|
|||
|
||||
#define PROTOCOL_VERSION "1.0"
|
||||
|
||||
#ifndef CUSTOM_MENDEL_NAME
|
||||
#define MACHINE_NAME "Mendel"
|
||||
#endif
|
||||
|
||||
#ifndef MACHINE_UUID
|
||||
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
|
||||
#endif
|
||||
|
||||
#if (LANG_MODE == 0) //primary language only
|
||||
#define PROGMEM_I2 __attribute__((section(".progmem0")))
|
||||
#define PROGMEM_I1 __attribute__((section(".progmem1")))
|
||||
|
|
@ -51,7 +43,7 @@
|
|||
/** @brief lang_table_header_t structure - (size= 16byte) */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t magic; //+0
|
||||
uint32_t magic; //+0
|
||||
uint16_t size; //+4
|
||||
uint16_t count; //+6
|
||||
uint16_t checksum; //+8
|
||||
|
|
@ -171,7 +163,7 @@ extern uint8_t lang_is_selected(void);
|
|||
|
||||
#ifdef DEBUG_SEC_LANG
|
||||
extern const char* lang_get_sec_lang_str_by_id(uint16_t id);
|
||||
extern uint16_t lang_print_sec_lang(FILE* out);
|
||||
extern uint16_t lang_print_sec_lang();
|
||||
#endif //DEBUG_SEC_LANG
|
||||
|
||||
extern void lang_boot_update_start(uint8_t lang);
|
||||
|
|
|
|||
594
Firmware/lcd.cpp
594
Firmware/lcd.cpp
|
|
@ -22,8 +22,6 @@
|
|||
#define LCD_8BIT
|
||||
#endif
|
||||
|
||||
// #define VT100
|
||||
|
||||
// commands
|
||||
#define LCD_CLEARDISPLAY 0x01
|
||||
#define LCD_RETURNHOME 0x02
|
||||
|
|
@ -70,38 +68,32 @@ constexpr uint8_t row_offsets[] PROGMEM = { 0x00, 0x40, 0x14, 0x54 };
|
|||
|
||||
FILE _lcdout; // = {0}; Global variable is always zero initialized, no need to explicitly state that.
|
||||
|
||||
uint8_t lcd_displayfunction = 0;
|
||||
uint8_t lcd_displaycontrol = 0;
|
||||
uint8_t lcd_displaymode = 0;
|
||||
static uint8_t lcd_displayfunction = 0;
|
||||
static uint8_t lcd_displaycontrol = 0;
|
||||
static uint8_t lcd_displaymode = 0;
|
||||
|
||||
uint8_t lcd_currline;
|
||||
static uint8_t lcd_ddram_address; // no need for preventing ddram overflow
|
||||
|
||||
#ifdef VT100
|
||||
uint8_t lcd_escape[8];
|
||||
#endif
|
||||
struct CustomCharacter {
|
||||
uint8_t colByte;
|
||||
uint8_t rowData[4];
|
||||
char alternate;
|
||||
};
|
||||
|
||||
static uint8_t lcd_custom_characters[8] = {0};
|
||||
static const CustomCharacter Font[] PROGMEM = {
|
||||
#include "FontTable.h"
|
||||
};
|
||||
|
||||
#define CUSTOM_CHARACTERS_CNT (sizeof(Font) / sizeof(Font[0]))
|
||||
|
||||
static void lcd_display(void);
|
||||
|
||||
#if 0
|
||||
static void lcd_no_display(void);
|
||||
static void lcd_no_cursor(void);
|
||||
static void lcd_cursor(void);
|
||||
static void lcd_no_blink(void);
|
||||
static void lcd_blink(void);
|
||||
static void lcd_scrollDisplayLeft(void);
|
||||
static void lcd_scrollDisplayRight(void);
|
||||
static void lcd_leftToRight(void);
|
||||
static void lcd_rightToLeft(void);
|
||||
static void lcd_autoscroll(void);
|
||||
static void lcd_no_autoscroll(void);
|
||||
#endif
|
||||
|
||||
#ifdef VT100
|
||||
void lcd_escape_write(uint8_t chr);
|
||||
#endif
|
||||
static void lcd_print_custom(uint8_t c);
|
||||
static void lcd_invalidate_custom_characters();
|
||||
|
||||
static void lcd_pulseEnable(void)
|
||||
{
|
||||
{
|
||||
WRITE(LCD_PINS_ENABLE,HIGH);
|
||||
_delay_us(1); // enable pulse must be >450ns
|
||||
WRITE(LCD_PINS_ENABLE,LOW);
|
||||
|
|
@ -119,7 +111,7 @@ static void lcd_writebits(uint8_t value)
|
|||
WRITE(LCD_PINS_D5, value & 0x20);
|
||||
WRITE(LCD_PINS_D6, value & 0x40);
|
||||
WRITE(LCD_PINS_D7, value & 0x80);
|
||||
|
||||
|
||||
lcd_pulseEnable();
|
||||
}
|
||||
|
||||
|
|
@ -129,40 +121,38 @@ static void lcd_send(uint8_t data, uint8_t flags, uint16_t duration = LCD_DEFAUL
|
|||
_delay_us(5);
|
||||
lcd_writebits(data);
|
||||
#ifndef LCD_8BIT
|
||||
if (!(flags & LCD_HALF_FLAG))
|
||||
{
|
||||
_delay_us(LCD_DEFAULT_DELAY);
|
||||
lcd_writebits(data<<4);
|
||||
if (!(flags & LCD_HALF_FLAG)) {
|
||||
// _delay_us(LCD_DEFAULT_DELAY); // should not be needed when sending a two nibble instruction.
|
||||
lcd_writebits((data << 4) | (data >> 4)); //force efficient swap opcode even though the lower nibble is ignored in this case
|
||||
}
|
||||
#endif
|
||||
delayMicroseconds(duration);
|
||||
}
|
||||
|
||||
static void lcd_command(uint8_t value, uint16_t delayExtra = 0)
|
||||
static void lcd_command(uint8_t value, uint16_t duration = LCD_DEFAULT_DELAY)
|
||||
{
|
||||
lcd_send(value, LOW, LCD_DEFAULT_DELAY + delayExtra);
|
||||
lcd_send(value, LOW, duration);
|
||||
}
|
||||
|
||||
static void lcd_write(uint8_t value)
|
||||
{
|
||||
if (value == '\n')
|
||||
{
|
||||
if (value == '\n') {
|
||||
if (lcd_currline > 3) lcd_currline = -1;
|
||||
lcd_set_cursor(0, lcd_currline + 1); // LF
|
||||
return;
|
||||
} else if ((value >= 0x80) && (value < (0x80 + CUSTOM_CHARACTERS_CNT))) {
|
||||
lcd_print_custom(value);
|
||||
} else {
|
||||
lcd_send(value, HIGH);
|
||||
lcd_ddram_address++; // no need for preventing ddram overflow
|
||||
}
|
||||
#ifdef VT100
|
||||
if (lcd_escape[0] || (value == 0x1b)){
|
||||
lcd_escape_write(value);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
lcd_send(value, HIGH);
|
||||
}
|
||||
|
||||
static void lcd_begin(uint8_t clear)
|
||||
{
|
||||
lcd_currline = 0;
|
||||
lcd_ddram_address = 0;
|
||||
|
||||
lcd_invalidate_custom_characters();
|
||||
|
||||
lcd_send(LCD_FUNCTIONSET | LCD_8BITMODE, LOW | LCD_HALF_FLAG, 4500); // wait min 4.1ms
|
||||
// second try
|
||||
|
|
@ -177,7 +167,7 @@ static void lcd_begin(uint8_t clear)
|
|||
// finally, set # lines, font size, etc.0
|
||||
lcd_command(LCD_FUNCTIONSET | lcd_displayfunction);
|
||||
// turn the display on with no cursor or blinking default
|
||||
lcd_displaycontrol = LCD_CURSOROFF | LCD_BLINKOFF;
|
||||
lcd_displaycontrol = LCD_CURSOROFF | LCD_BLINKOFF;
|
||||
lcd_display();
|
||||
// clear it off
|
||||
if (clear) lcd_clear();
|
||||
|
|
@ -185,10 +175,6 @@ static void lcd_begin(uint8_t clear)
|
|||
lcd_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
|
||||
// set the entry mode
|
||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||
|
||||
#ifdef VT100
|
||||
lcd_escape[0] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int lcd_putchar(char c, FILE *)
|
||||
|
|
@ -213,12 +199,12 @@ void lcd_init(void)
|
|||
SET_OUTPUT(LCD_PINS_D5);
|
||||
SET_OUTPUT(LCD_PINS_D6);
|
||||
SET_OUTPUT(LCD_PINS_D7);
|
||||
|
||||
|
||||
#ifdef LCD_8BIT
|
||||
lcd_displayfunction |= LCD_8BITMODE;
|
||||
#endif
|
||||
lcd_displayfunction |= LCD_2LINE;
|
||||
_delay_us(50000);
|
||||
_delay_us(50000);
|
||||
lcd_begin(1); //first time init
|
||||
fdev_setup_stream(lcdout, lcd_putchar, NULL, _FDEV_SETUP_WRITE); //setup lcdout stream
|
||||
}
|
||||
|
|
@ -226,25 +212,27 @@ void lcd_init(void)
|
|||
void lcd_refresh(void)
|
||||
{
|
||||
lcd_begin(1);
|
||||
lcd_set_custom_characters();
|
||||
}
|
||||
|
||||
void lcd_refresh_noclear(void)
|
||||
{
|
||||
lcd_begin(0);
|
||||
lcd_set_custom_characters();
|
||||
}
|
||||
|
||||
// Clear display, set cursor position to zero and unshift the display. It also invalidates all custom characters
|
||||
void lcd_clear(void)
|
||||
{
|
||||
lcd_command(LCD_CLEARDISPLAY, 1600); // clear display, set cursor position to zero
|
||||
lcd_command(LCD_CLEARDISPLAY, 1600);
|
||||
lcd_currline = 0;
|
||||
lcd_ddram_address = 0;
|
||||
lcd_invalidate_custom_characters();
|
||||
}
|
||||
|
||||
// Set cursor position to zero and in DDRAM. It does not unshift the display.
|
||||
void lcd_home(void)
|
||||
{
|
||||
lcd_command(LCD_RETURNHOME, 1600); // set cursor position to zero
|
||||
lcd_currline = 0;
|
||||
lcd_set_cursor(0, 0);
|
||||
lcd_ddram_address = 0;
|
||||
}
|
||||
|
||||
// Turn the display on/off (quickly)
|
||||
|
|
@ -254,83 +242,6 @@ void lcd_display(void)
|
|||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void lcd_no_display(void)
|
||||
{
|
||||
lcd_displaycontrol &= ~LCD_DISPLAYON;
|
||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VT100 //required functions for VT100
|
||||
// Turns the underline cursor on/off
|
||||
void lcd_no_cursor(void)
|
||||
{
|
||||
lcd_displaycontrol &= ~LCD_CURSORON;
|
||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
|
||||
void lcd_cursor(void)
|
||||
{
|
||||
lcd_displaycontrol |= LCD_CURSORON;
|
||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// Turn on and off the blinking cursor
|
||||
void lcd_no_blink(void)
|
||||
{
|
||||
lcd_displaycontrol &= ~LCD_BLINKON;
|
||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
|
||||
void lcd_blink(void)
|
||||
{
|
||||
lcd_displaycontrol |= LCD_BLINKON;
|
||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
||||
}
|
||||
|
||||
// These commands scroll the display without changing the RAM
|
||||
void lcd_scrollDisplayLeft(void)
|
||||
{
|
||||
lcd_command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
|
||||
}
|
||||
|
||||
void lcd_scrollDisplayRight(void)
|
||||
{
|
||||
lcd_command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
|
||||
}
|
||||
|
||||
// This is for text that flows Left to Right
|
||||
void lcd_leftToRight(void)
|
||||
{
|
||||
lcd_displaymode |= LCD_ENTRYLEFT;
|
||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||
}
|
||||
|
||||
// This is for text that flows Right to Left
|
||||
void lcd_rightToLeft(void)
|
||||
{
|
||||
lcd_displaymode &= ~LCD_ENTRYLEFT;
|
||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||
}
|
||||
|
||||
// This will 'right justify' text from the cursor
|
||||
void lcd_autoscroll(void)
|
||||
{
|
||||
lcd_displaymode |= LCD_ENTRYSHIFTINCREMENT;
|
||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||
}
|
||||
|
||||
// This will 'left justify' text from the cursor
|
||||
void lcd_no_autoscroll(void)
|
||||
{
|
||||
lcd_displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
|
||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// @brief set the current LCD row
|
||||
/// @param row LCD row number, ranges from 0 to LCD_HEIGHT - 1
|
||||
static void FORCE_INLINE lcd_set_current_row(uint8_t row)
|
||||
|
|
@ -349,162 +260,76 @@ static uint8_t __attribute__((noinline)) lcd_get_row_offset(uint8_t row)
|
|||
void lcd_set_cursor(uint8_t col, uint8_t row)
|
||||
{
|
||||
lcd_set_current_row(row);
|
||||
lcd_command(LCD_SETDDRAMADDR | (col + lcd_get_row_offset(lcd_currline)));
|
||||
uint8_t addr = col + lcd_get_row_offset(lcd_currline);
|
||||
lcd_ddram_address = addr;
|
||||
lcd_command(LCD_SETDDRAMADDR | addr);
|
||||
}
|
||||
|
||||
void lcd_set_cursor_column(uint8_t col)
|
||||
{
|
||||
lcd_command(LCD_SETDDRAMADDR | (col + lcd_get_row_offset(lcd_currline)));
|
||||
uint8_t addr = col + lcd_get_row_offset(lcd_currline);
|
||||
lcd_ddram_address = addr;
|
||||
lcd_command(LCD_SETDDRAMADDR | addr);
|
||||
}
|
||||
|
||||
// Allows us to fill the first 8 CGRAM locations
|
||||
// with custom characters
|
||||
void lcd_createChar_P(uint8_t location, const uint8_t* charmap)
|
||||
void lcd_createChar_P(uint8_t location, const CustomCharacter *char_p)
|
||||
{
|
||||
location &= 0x7; // we only have 8 locations 0-7
|
||||
lcd_command(LCD_SETCGRAMADDR | (location << 3));
|
||||
for (uint8_t i = 0; i < 8; i++)
|
||||
lcd_send(pgm_read_byte(&charmap[i]), HIGH);
|
||||
}
|
||||
uint8_t charmap[8]; // unpacked font data
|
||||
|
||||
#ifdef VT100
|
||||
// The LCD expects the CGRAM data to be sent as pixel data, row by row. Since there are 8 rows per character, 8 bytes need to be sent.
|
||||
// However, storing the data in the flash as the LCD expects it is wasteful since 3 bits per row are don't care and are not used.
|
||||
// Therefore, flash can be saved if the character data is packed. For the AVR to unpack efficiently and quickly, the following scheme was used:
|
||||
//
|
||||
// colbyte data0 data1 data2 data3
|
||||
// a b c d e
|
||||
//
|
||||
// ** ** ** b7 b6 b5 b4 a0
|
||||
// ** ** ** b3 b2 b1 b0 a1
|
||||
// ** ** ** c7 c6 c5 c4 a2
|
||||
// ** ** ** c3 c2 c1 c0 a3
|
||||
// ** ** ** d7 d6 d5 d4 a4
|
||||
// ** ** ** d3 d2 d1 d0 a5
|
||||
// ** ** ** e7 e6 e5 e4 a6
|
||||
// ** ** ** e3 e2 e1 e0 a7
|
||||
//
|
||||
// The bits marked as ** in the unpacked data are don't care and they will contain garbage.
|
||||
|
||||
//Supported VT100 escape codes:
|
||||
//EraseScreen "\x1b[2J"
|
||||
//CursorHome "\x1b[%d;%dH"
|
||||
//CursorShow "\x1b[?25h"
|
||||
//CursorHide "\x1b[?25l"
|
||||
void lcd_escape_write(uint8_t chr)
|
||||
{
|
||||
#define escape_cnt (lcd_escape[0]) //escape character counter
|
||||
#define is_num_msk (lcd_escape[1]) //numeric character bit mask
|
||||
#define chr_is_num (is_num_msk & 0x01) //current character is numeric
|
||||
#define e_2_is_num (is_num_msk & 0x04) //escape char 2 is numeric
|
||||
#define e_3_is_num (is_num_msk & 0x08) //...
|
||||
#define e_4_is_num (is_num_msk & 0x10)
|
||||
#define e_5_is_num (is_num_msk & 0x20)
|
||||
#define e_6_is_num (is_num_msk & 0x40)
|
||||
#define e_7_is_num (is_num_msk & 0x80)
|
||||
#define e2_num (lcd_escape[2] - '0') //number from character 2
|
||||
#define e3_num (lcd_escape[3] - '0') //number from character 3
|
||||
#define e23_num (10*e2_num+e3_num) //number from characters 2 and 3
|
||||
#define e4_num (lcd_escape[4] - '0') //number from character 4
|
||||
#define e5_num (lcd_escape[5] - '0') //number from character 5
|
||||
#define e45_num (10*e4_num+e5_num) //number from characters 4 and 5
|
||||
#define e6_num (lcd_escape[6] - '0') //number from character 6
|
||||
#define e56_num (10*e5_num+e6_num) //number from characters 5 and 6
|
||||
if (escape_cnt > 1) // escape length > 1 = "\x1b["
|
||||
{
|
||||
lcd_escape[escape_cnt] = chr; // store current char
|
||||
if ((chr >= '0') && (chr <= '9')) // char is numeric
|
||||
is_num_msk |= (1 | (1 << escape_cnt)); //set mask
|
||||
else
|
||||
is_num_msk &= ~1; //clear mask
|
||||
uint8_t temp;
|
||||
uint8_t colByte;
|
||||
__asm__ __volatile__ (
|
||||
// load colByte
|
||||
"lpm %1, Z+" "\n\t"
|
||||
|
||||
// begin for loop
|
||||
"ldi %0, 8" "\n\t"
|
||||
"mov __zero_reg__, %0" "\n\t" // use zero_reg as loop counter
|
||||
"forBegin_%=: " "\n\t"
|
||||
"sbrs __zero_reg__, 0" "\n\t" // test LSB of counter. Fetch new data if counter is even
|
||||
"lpm __tmp_reg__, Z+" "\n\t" // load next data byte from progmem, increment
|
||||
"swap __tmp_reg__" "\n\t" // swap the nibbles
|
||||
"mov %0, __tmp_reg__" "\n\t" // copy row data to temp
|
||||
|
||||
// "andi %0, 0xF" "\n\t" // mask lower nibble - Not needed since bits 7-5 of the CGRAM are don't care, so they can contain garbage
|
||||
"ror %1" "\n\t" // consume LSB of colByte and push it to the carry
|
||||
"rol %0" "\n\t" // insert the column LSB from carry
|
||||
"st %a3+, %0" "\n\t" // push the generated row data to the output
|
||||
// end for loop
|
||||
"dec __zero_reg__" "\n\t"
|
||||
"brne forBegin_%=" "\n\t"
|
||||
|
||||
: "=&d" (temp), "=&r" (colByte)
|
||||
: "z" (char_p), "e" (charmap)
|
||||
);
|
||||
|
||||
lcd_command(LCD_SETCGRAMADDR | (location << 3));
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
lcd_send(charmap[i], HIGH);
|
||||
}
|
||||
switch (escape_cnt++)
|
||||
{
|
||||
case 0:
|
||||
if (chr == 0x1b) return; // escape = "\x1b"
|
||||
break;
|
||||
case 1:
|
||||
is_num_msk = 0x00; // reset 'is number' bit mask
|
||||
if (chr == '[') return; // escape = "\x1b["
|
||||
break;
|
||||
case 2:
|
||||
switch (chr)
|
||||
{
|
||||
case '2': return; // escape = "\x1b[2"
|
||||
case '?': return; // escape = "\x1b[?"
|
||||
default:
|
||||
if (chr_is_num) return; // escape = "\x1b[%1d"
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch (lcd_escape[2])
|
||||
{
|
||||
case '?': // escape = "\x1b[?"
|
||||
if (chr == '2') return; // escape = "\x1b[?2"
|
||||
break;
|
||||
case '2':
|
||||
if (chr == 'J') // escape = "\x1b[2J"
|
||||
{ lcd_clear(); lcd_currline = 0; break; } // EraseScreen
|
||||
default:
|
||||
if (e_2_is_num && // escape = "\x1b[%1d"
|
||||
((chr == ';') || // escape = "\x1b[%1d;"
|
||||
chr_is_num)) // escape = "\x1b[%2d"
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
switch (lcd_escape[2])
|
||||
{
|
||||
case '?': // "\x1b[?"
|
||||
if ((lcd_escape[3] == '2') && (chr == '5')) return; // escape = "\x1b[?25"
|
||||
break;
|
||||
default:
|
||||
if (e_2_is_num) // escape = "\x1b[%1d"
|
||||
{
|
||||
if ((lcd_escape[3] == ';') && chr_is_num) return; // escape = "\x1b[%1d;%1d"
|
||||
else if (e_3_is_num && (chr == ';')) return; // escape = "\x1b[%2d;"
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
switch (lcd_escape[2])
|
||||
{
|
||||
case '?':
|
||||
if ((lcd_escape[3] == '2') && (lcd_escape[4] == '5')) // escape = "\x1b[?25"
|
||||
switch (chr)
|
||||
{
|
||||
case 'h': // escape = "\x1b[?25h"
|
||||
lcd_cursor(); // CursorShow
|
||||
break;
|
||||
case 'l': // escape = "\x1b[?25l"
|
||||
lcd_no_cursor(); // CursorHide
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (e_2_is_num) // escape = "\x1b[%1d"
|
||||
{
|
||||
if ((lcd_escape[3] == ';') && e_4_is_num) // escape = "\x1b%1d;%1dH"
|
||||
{
|
||||
if (chr == 'H') // escape = "\x1b%1d;%1dH"
|
||||
lcd_set_cursor(e4_num, e2_num); // CursorHome
|
||||
else if (chr_is_num)
|
||||
return; // escape = "\x1b%1d;%2d"
|
||||
}
|
||||
else if (e_3_is_num && (lcd_escape[4] == ';') && chr_is_num)
|
||||
return; // escape = "\x1b%2d;%1d"
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (e_2_is_num) // escape = "\x1b[%1d"
|
||||
{
|
||||
if ((lcd_escape[3] == ';') && e_4_is_num && e_5_is_num && (chr == 'H')) // escape = "\x1b%1d;%2dH"
|
||||
lcd_set_cursor(e45_num, e2_num); // CursorHome
|
||||
else if (e_3_is_num && (lcd_escape[4] == ';') && e_5_is_num) // escape = "\x1b%2d;%1d"
|
||||
{
|
||||
if (chr == 'H') // escape = "\x1b%2d;%1dH"
|
||||
lcd_set_cursor(e5_num, e23_num); // CursorHome
|
||||
else if (chr_is_num) // "\x1b%2d;%2d"
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (e_2_is_num && e_3_is_num && (lcd_escape[4] == ';')) // "\x1b[%2d;"
|
||||
if (e_5_is_num && e_6_is_num && (chr == 'H')) // "\x1b[%2d;%2dH"
|
||||
lcd_set_cursor(e56_num, e23_num); // CursorHome
|
||||
break;
|
||||
}
|
||||
escape_cnt = 0; // reset escape
|
||||
lcd_command(LCD_SETDDRAMADDR | lcd_ddram_address); // no need for masking the address
|
||||
}
|
||||
|
||||
#endif //VT100
|
||||
|
||||
|
||||
int lcd_putc(char c)
|
||||
{
|
||||
return fputc(c, lcdout);
|
||||
|
|
@ -547,14 +372,14 @@ void lcd_print(const char* s)
|
|||
while (*s) lcd_write(*(s++));
|
||||
}
|
||||
|
||||
char lcd_print_pad(const char* s, uint8_t len)
|
||||
uint8_t lcd_print_pad(const char* s, uint8_t len)
|
||||
{
|
||||
while (len && *s) {
|
||||
lcd_write(*(s++));
|
||||
--len;
|
||||
}
|
||||
lcd_space(len);
|
||||
return *s;
|
||||
return len;
|
||||
}
|
||||
|
||||
uint8_t lcd_print_pad_P(const char* s, uint8_t len)
|
||||
|
|
@ -614,13 +439,13 @@ void lcd_print(unsigned long n, int base)
|
|||
|
||||
void lcd_printNumber(unsigned long n, uint8_t base)
|
||||
{
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
uint8_t i = 0;
|
||||
if (n == 0)
|
||||
{
|
||||
lcd_print('0');
|
||||
return;
|
||||
}
|
||||
}
|
||||
while (n > 0)
|
||||
{
|
||||
buf[i++] = n % base;
|
||||
|
|
@ -793,7 +618,7 @@ void lcd_buttons_update(void)
|
|||
uint8_t enc_bits = 0;
|
||||
if (!READ(BTN_EN1)) enc_bits |= _BV(0);
|
||||
if (!READ(BTN_EN2)) enc_bits |= _BV(1);
|
||||
|
||||
|
||||
if (enc_bits != enc_bits_old)
|
||||
{
|
||||
int8_t newDiff = pgm_read_byte(&encrot_table[(enc_bits_old << 2) | enc_bits]);
|
||||
|
|
@ -810,151 +635,84 @@ void lcd_buttons_update(void)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Custom character data
|
||||
|
||||
const uint8_t lcd_chardata_bedTemp[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b11111,
|
||||
0b10101,
|
||||
0b10001,
|
||||
0b10101,
|
||||
0b11111,
|
||||
0b00000,
|
||||
0b00000}; //thanks Sonny Mounicou
|
||||
// #define DEBUG_CUSTOM_CHARACTERS
|
||||
|
||||
const uint8_t lcd_chardata_degree[8] PROGMEM = {
|
||||
0b01100,
|
||||
0b10010,
|
||||
0b10010,
|
||||
0b01100,
|
||||
0b00000,
|
||||
0b00000,
|
||||
0b00000,
|
||||
0b00000};
|
||||
static void lcd_print_custom(uint8_t c) {
|
||||
uint8_t charToSend = pgm_read_byte(&Font[c - 0x80].alternate); // in case no empty slot is found, use the alternate character.
|
||||
int8_t slotToUse = -1;
|
||||
|
||||
const uint8_t lcd_chardata_thermometer[8] PROGMEM = {
|
||||
0b00100,
|
||||
0b01010,
|
||||
0b01010,
|
||||
0b01010,
|
||||
0b01010,
|
||||
0b10001,
|
||||
0b10001,
|
||||
0b01110};
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
// first check if we already have the character in the lcd memory
|
||||
if ((lcd_custom_characters[i] & 0x7F) == (c & 0x7F)) {
|
||||
lcd_custom_characters[i] = c; // mark the custom character as used
|
||||
charToSend = i; // send the found custom character id
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("found char %02x at slot %u\n"), c, i);
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
goto sendChar;
|
||||
} else if (lcd_custom_characters[i] == 0x7F) { //found an empty slot. create a new custom character and send it
|
||||
lcd_custom_characters[i] = c; // mark the custom character as used
|
||||
slotToUse = i;
|
||||
goto createChar;
|
||||
} else if (!(lcd_custom_characters[i] & 0x80)) { // found potentially unused slot. Remember it in case it's needed
|
||||
slotToUse = i;
|
||||
}
|
||||
}
|
||||
|
||||
const uint8_t lcd_chardata_uplevel[8] PROGMEM = {
|
||||
0b00100,
|
||||
0b01110,
|
||||
0b11111,
|
||||
0b00100,
|
||||
0b11100,
|
||||
0b00000,
|
||||
0b00000,
|
||||
0b00000}; //thanks joris
|
||||
// If this point was reached, then there is no empty slot available.
|
||||
// If there exists any potentially unused slot, then use that one instead.
|
||||
// Otherwise, use the alternate form of the character.
|
||||
if (slotToUse < 0) {
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("used alternate for char %02x\n"), c);
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
goto sendChar;
|
||||
}
|
||||
|
||||
const uint8_t lcd_chardata_refresh[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b00110,
|
||||
0b11001,
|
||||
0b11000,
|
||||
0b00011,
|
||||
0b10011,
|
||||
0b01100,
|
||||
0b00000}; //thanks joris
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("replaced char %02x at slot %u\n"), lcd_custom_characters[slotToUse], slotToUse);
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
|
||||
const uint8_t lcd_chardata_folder[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b11100,
|
||||
0b11111,
|
||||
0b10001,
|
||||
0b10001,
|
||||
0b11111,
|
||||
0b00000,
|
||||
0b00000}; //thanks joris
|
||||
createChar:
|
||||
charToSend = slotToUse;
|
||||
lcd_createChar_P(slotToUse, &Font[c - 0x80]);
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("created char %02x at slot %u\n"), c, slotToUse);
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
|
||||
/*const uint8_t lcd_chardata_feedrate[8] PROGMEM = {
|
||||
0b11100,
|
||||
0b10000,
|
||||
0b11000,
|
||||
0b10111,
|
||||
0b00101,
|
||||
0b00110,
|
||||
0b00101,
|
||||
0b00000};*/ //thanks Sonny Mounicou
|
||||
|
||||
/*const uint8_t lcd_chardata_feedrate[8] PROGMEM = {
|
||||
0b11100,
|
||||
0b10100,
|
||||
0b11000,
|
||||
0b10100,
|
||||
0b00000,
|
||||
0b00111,
|
||||
0b00010,
|
||||
0b00010};*/
|
||||
|
||||
/*const uint8_t lcd_chardata_feedrate[8] PROGMEM = {
|
||||
0b01100,
|
||||
0b10011,
|
||||
0b00000,
|
||||
0b01100,
|
||||
0b10011,
|
||||
0b00000,
|
||||
0b01100,
|
||||
0b10011};*/
|
||||
|
||||
const uint8_t lcd_chardata_feedrate[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b00100,
|
||||
0b10010,
|
||||
0b01001,
|
||||
0b10010,
|
||||
0b00100,
|
||||
0b00000,
|
||||
0b00000};
|
||||
|
||||
const uint8_t lcd_chardata_clock[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b01110,
|
||||
0b10011,
|
||||
0b10101,
|
||||
0b10001,
|
||||
0b01110,
|
||||
0b00000,
|
||||
0b00000}; //thanks Sonny Mounicou
|
||||
|
||||
void lcd_set_custom_characters(void)
|
||||
{
|
||||
lcd_createChar_P(LCD_STR_BEDTEMP[0], lcd_chardata_bedTemp);
|
||||
lcd_createChar_P(LCD_STR_DEGREE[0], lcd_chardata_degree);
|
||||
lcd_createChar_P(LCD_STR_THERMOMETER[0], lcd_chardata_thermometer);
|
||||
lcd_createChar_P(LCD_STR_UPLEVEL[0], lcd_chardata_uplevel);
|
||||
lcd_createChar_P(LCD_STR_REFRESH[0], lcd_chardata_refresh);
|
||||
lcd_createChar_P(LCD_STR_FOLDER[0], lcd_chardata_folder);
|
||||
lcd_createChar_P(LCD_STR_FEEDRATE[0], lcd_chardata_feedrate);
|
||||
lcd_createChar_P(LCD_STR_CLOCK[0], lcd_chardata_clock);
|
||||
sendChar:
|
||||
lcd_send(charToSend, HIGH);
|
||||
lcd_ddram_address++; // no need for preventing ddram overflow
|
||||
}
|
||||
|
||||
const uint8_t lcd_chardata_arr2down[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b00000,
|
||||
0b10001,
|
||||
0b01010,
|
||||
0b00100,
|
||||
0b10001,
|
||||
0b01010,
|
||||
0b00100};
|
||||
|
||||
const uint8_t lcd_chardata_confirm[8] PROGMEM = {
|
||||
0b00000,
|
||||
0b00001,
|
||||
0b00011,
|
||||
0b10110,
|
||||
0b11100,
|
||||
0b01000,
|
||||
0b00000,
|
||||
0b00000};
|
||||
|
||||
void lcd_set_custom_characters_nextpage(void)
|
||||
{
|
||||
lcd_createChar_P(LCD_STR_ARROW_2_DOWN[0], lcd_chardata_arr2down);
|
||||
lcd_createChar_P(LCD_STR_CONFIRM[0], lcd_chardata_confirm);
|
||||
static void lcd_invalidate_custom_characters() {
|
||||
memset(lcd_custom_characters, 0x7F, sizeof(lcd_custom_characters));
|
||||
}
|
||||
|
||||
void lcd_frame_start() {
|
||||
// check all custom characters and discard unused ones
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
uint8_t c = lcd_custom_characters[i];
|
||||
if (c == 0x7F) { //slot empty
|
||||
continue;
|
||||
}
|
||||
else if (c & 0x80) { //slot was used on the last frame update, mark it as potentially unused this time
|
||||
lcd_custom_characters[i] = c & 0x7F;
|
||||
}
|
||||
else { //character is no longer used (or invalid?), mark it as unused
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("discarded char %02x at slot %u\n"), c, i);
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
lcd_custom_characters[i] = 0x7F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CUSTOM_CHARACTERS
|
||||
printf_P(PSTR("frame start:"));
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
printf_P(PSTR(" %02x"), lcd_custom_characters[i]);
|
||||
}
|
||||
printf_P(PSTR("\n"));
|
||||
#endif // DEBUG_CUSTOM_CHARACTERS
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,19 +22,6 @@ extern void lcd_clear(void);
|
|||
|
||||
extern void lcd_home(void);
|
||||
|
||||
/*extern void lcd_no_display(void);
|
||||
extern void lcd_display(void);
|
||||
extern void lcd_no_blink(void);
|
||||
extern void lcd_blink(void);
|
||||
extern void lcd_no_cursor(void);
|
||||
extern void lcd_cursor(void);
|
||||
extern void lcd_scrollDisplayLeft(void);
|
||||
extern void lcd_scrollDisplayRight(void);
|
||||
extern void lcd_leftToRight(void);
|
||||
extern void lcd_rightToLeft(void);
|
||||
extern void lcd_autoscroll(void);
|
||||
extern void lcd_no_autoscroll(void);*/
|
||||
|
||||
extern void lcd_set_cursor(uint8_t col, uint8_t row);
|
||||
|
||||
/// @brief Change the cursor column position while preserving the current row position
|
||||
|
|
@ -56,7 +43,7 @@ extern void lcd_space(uint8_t n);
|
|||
extern void lcd_printNumber(unsigned long n, uint8_t base);
|
||||
|
||||
extern void lcd_print(const char*);
|
||||
extern char lcd_print_pad(const char* s, uint8_t len);
|
||||
extern uint8_t lcd_print_pad(const char* s, uint8_t len);
|
||||
|
||||
/// @brief print a string from PROGMEM with left-adjusted padding
|
||||
/// @param s string from PROGMEM.
|
||||
|
|
@ -70,19 +57,6 @@ extern void lcd_print(unsigned int, int = 10);
|
|||
extern void lcd_print(long, int = 10);
|
||||
extern void lcd_print(unsigned long, int = 10);
|
||||
|
||||
//! @brief Clear screen
|
||||
#define ESC_2J "\x1b[2J"
|
||||
//! @brief Show cursor
|
||||
#define ESC_25h "\x1b[?25h"
|
||||
//! @brief Hide cursor
|
||||
#define ESC_25l "\x1b[?25l"
|
||||
//! @brief Set cursor to
|
||||
//! @param c column
|
||||
//! @param r row
|
||||
#define ESC_H(c,r) "\x1b["#r";"#c"H"
|
||||
|
||||
|
||||
|
||||
#define LCD_UPDATE_INTERVAL 100
|
||||
#define LCD_TIMEOUT_TO_STATUS 30000ul //!< Generic timeout to status screen in ms, when no user action.
|
||||
#define LCD_TIMEOUT_TO_STATUS_BABYSTEP_Z 90000ul //!< Specific timeout for lcd_babystep_z screen in ms.
|
||||
|
|
@ -137,18 +111,18 @@ extern void lcd_buttons_update(void);
|
|||
//! When constructed (on stack), original state state of lcd_update_enabled is stored
|
||||
//! and LCD updates are disabled.
|
||||
//! When destroyed (gone out of scope), original state of LCD update is restored.
|
||||
//! It has zero overhead compared to storing bool saved = lcd_update_enabled
|
||||
//! and calling lcd_update_enable(false) and lcd_update_enable(saved).
|
||||
//! Do not call lcd_update_enable() to prevent calling lcd_update() in sensitive code.
|
||||
//! in certain scenarios it will cause recursion e.g. in the menus.
|
||||
class LcdUpdateDisabler
|
||||
{
|
||||
public:
|
||||
LcdUpdateDisabler(): m_updateEnabled(lcd_update_enabled)
|
||||
{
|
||||
lcd_update_enable(false);
|
||||
lcd_update_enabled = false;
|
||||
}
|
||||
~LcdUpdateDisabler()
|
||||
{
|
||||
lcd_update_enable(m_updateEnabled);
|
||||
lcd_update_enabled = m_updateEnabled;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -171,21 +145,21 @@ private:
|
|||
////////////////////////////////////
|
||||
|
||||
//Custom characters defined in the first 8 characters of the LCD
|
||||
#define LCD_STR_BEDTEMP "\x00"
|
||||
#define LCD_STR_DEGREE "\x01"
|
||||
#define LCD_STR_THERMOMETER "\x02"
|
||||
#define LCD_STR_UPLEVEL "\x03"
|
||||
#define LCD_STR_REFRESH "\x04"
|
||||
#define LCD_STR_FOLDER "\x05"
|
||||
#define LCD_STR_FEEDRATE "\x06"
|
||||
#define LCD_STR_ARROW_2_DOWN "\x06"
|
||||
#define LCD_STR_CLOCK "\x07"
|
||||
#define LCD_STR_CONFIRM "\x07"
|
||||
#define LCD_STR_ARROW_RIGHT "\x7E" //from the default character set
|
||||
#define LCD_STR_ARROW_LEFT "\x7F" //from the default character set
|
||||
#define LCD_STR_BEDTEMP "\x80"
|
||||
#define LCD_STR_DEGREE "\x81"
|
||||
#define LCD_STR_THERMOMETER "\x82"
|
||||
#define LCD_STR_UPLEVEL "\x83"
|
||||
#define LCD_STR_REFRESH "\x84"
|
||||
#define LCD_STR_FOLDER "\x85"
|
||||
#define LCD_STR_FEEDRATE "\x86"
|
||||
#define LCD_STR_CLOCK "\x87"
|
||||
#define LCD_STR_ARROW_2_DOWN "\x88"
|
||||
#define LCD_STR_CONFIRM "\x89"
|
||||
#define LCD_STR_SOLID_BLOCK "\xFF" //from the default character set
|
||||
|
||||
extern void lcd_set_custom_characters(void);
|
||||
extern void lcd_set_custom_characters_nextpage(void);
|
||||
extern void lcd_frame_start();
|
||||
|
||||
//! @brief Consume click and longpress event
|
||||
inline void lcd_consume_click()
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void FORCE_INLINE mp_handle_cmd(const MeatPack_Command c) {
|
|||
break;
|
||||
}
|
||||
|
||||
mp_echo_config_state();
|
||||
mp_echo_config_state();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* objects with high curvature, especially at high speeds. There is also the issue of the limited
|
||||
* baud rate provided by Prusa's Atmega2560-based boards, over the USB serial connection. So soft-
|
||||
* ware like OctoPrint would also suffer this same micro-stuttering and poor print quality issue.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include "Configuration.h"
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ void menu_end(void)
|
|||
if (((uint8_t)lcd_encoder) >= menu_top + LCD_HEIGHT)
|
||||
{
|
||||
menu_top = lcd_encoder - LCD_HEIGHT + 1;
|
||||
lcd_draw_update = 1;
|
||||
menu_line = menu_top - 1;
|
||||
menu_row = -1;
|
||||
}
|
||||
|
|
@ -111,7 +110,7 @@ void menu_back_no_reset(void)
|
|||
{
|
||||
if (menu_depth > 0)
|
||||
{
|
||||
menu_depth--;
|
||||
menu_depth--;
|
||||
menu_goto(menu_stack[menu_depth].menu, menu_stack[menu_depth].position, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -146,7 +145,7 @@ void menu_item_ret(void)
|
|||
{
|
||||
lcd_draw_update = 2;
|
||||
menu_item++;
|
||||
|
||||
|
||||
//prevent the rest of the menu items from rendering or getting clicked
|
||||
menu_row = LCD_HEIGHT; // early exit from the MENU_BEGIN() for loop at the end of the current cycle
|
||||
menu_line = 0; // prevent subsequent menu items from rendering at all in the current MENU_BEGIN() for loop cycle
|
||||
|
|
@ -434,24 +433,24 @@ static void menu_draw_P(const char chr, const char* str, const int16_t val)
|
|||
|
||||
//! @brief Draw up to 10 chars of text and a float number in format from +0.0 to +12345.0. The increased range is necessary
|
||||
//! for displaying large values of extruder positions, which caused text overflow in the previous implementation.
|
||||
//!
|
||||
//!
|
||||
//! @param str string label to print
|
||||
//! @param val value to print aligned to the right side of the display
|
||||
//!
|
||||
//! @param val value to print aligned to the right side of the display
|
||||
//!
|
||||
//! Implementation comments:
|
||||
//! The text needs to come with a colon ":", this function does not append it anymore.
|
||||
//! That resulted in a much shorter implementation (234628B -> 234476B)
|
||||
//! There are similar functions around which may be shortened in a similar way
|
||||
void menu_draw_float31(const char* str, float val)
|
||||
{
|
||||
lcd_printf_P(menu_fmt_float31, str, val);
|
||||
lcd_printf_P(menu_fmt_float31, str, val);
|
||||
}
|
||||
|
||||
//! @brief Draw up to 14 chars of text and a float number in format +1.234
|
||||
//!
|
||||
//!
|
||||
//! @param str string label to print
|
||||
//! @param val value to print aligned to the right side of the display
|
||||
//!
|
||||
//! @param val value to print aligned to the right side of the display
|
||||
//!
|
||||
//! Implementation comments:
|
||||
//! This function uses similar optimization principles as menu_draw_float31
|
||||
//! (i.e. str must include a ':' at its end)
|
||||
|
|
@ -462,15 +461,22 @@ void menu_draw_float13(const char* str, float val)
|
|||
lcd_printf_P(menu_fmt_float13, ' ', str, val);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static void _menu_edit_P(void)
|
||||
static void _menu_edit_P()
|
||||
{
|
||||
menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]);
|
||||
if (lcd_draw_update)
|
||||
{
|
||||
// handle initial value jumping
|
||||
if (_md->minJumpValue && lcd_encoder) {
|
||||
if (lcd_encoder > 0 && _md->currentValue == _md->minEditValue) {
|
||||
_md->currentValue = _md->minJumpValue;
|
||||
lcd_encoder = 0;
|
||||
}
|
||||
// disable after first use and/or if the initial value is not minEditValue
|
||||
_md->minJumpValue = 0;
|
||||
}
|
||||
_md->currentValue += lcd_encoder;
|
||||
lcd_encoder = 0; // Consume knob rotation event
|
||||
|
||||
// Constrain the value in case it's outside the allowed limits
|
||||
_md->currentValue = constrain(_md->currentValue, _md->minEditValue, _md->maxEditValue);
|
||||
lcd_set_cursor(0, 1);
|
||||
|
|
@ -478,30 +484,36 @@ static void _menu_edit_P(void)
|
|||
}
|
||||
if (lcd_clicked())
|
||||
{
|
||||
*((T)(_md->editValue)) = _md->currentValue;
|
||||
if (_md->editValueBits == 8)
|
||||
*((uint8_t*)(_md->editValuePtr)) = _md->currentValue;
|
||||
else
|
||||
*((int16_t*)(_md->editValuePtr)) = _md->currentValue;
|
||||
menu_back_no_reset();
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val)
|
||||
void menu_item_edit_P(const char* str, void* pval, uint8_t pbits, int16_t min_val, int16_t max_val, int16_t jmp_val)
|
||||
{
|
||||
menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]);
|
||||
if (menu_item == menu_line)
|
||||
{
|
||||
if (lcd_draw_update)
|
||||
int16_t cur_val = (pbits == 8 ? *((uint8_t*)pval) : *((int16_t*)pval));
|
||||
|
||||
if (lcd_draw_update)
|
||||
{
|
||||
lcd_set_cursor(0, menu_row);
|
||||
menu_draw_P(menu_selection_mark(), str, *pval);
|
||||
menu_draw_P(menu_selection_mark(), str, cur_val);
|
||||
}
|
||||
if (menu_clicked && (lcd_encoder == menu_item))
|
||||
{
|
||||
menu_submenu_no_reset(_menu_edit_P<T>);
|
||||
menu_submenu_no_reset(_menu_edit_P);
|
||||
_md->editLabel = str;
|
||||
_md->editValue = pval;
|
||||
_md->currentValue = *pval;
|
||||
_md->editValuePtr = pval;
|
||||
_md->editValueBits = pbits;
|
||||
_md->currentValue = cur_val;
|
||||
_md->minEditValue = min_val;
|
||||
_md->maxEditValue = max_val;
|
||||
_md->minJumpValue = jmp_val;
|
||||
menu_item_ret();
|
||||
return;
|
||||
}
|
||||
|
|
@ -509,9 +521,6 @@ void menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val)
|
|||
menu_item++;
|
||||
}
|
||||
|
||||
template void menu_item_edit_P<int16_t*>(const char* str, int16_t *pval, int16_t min_val, int16_t max_val);
|
||||
template void menu_item_edit_P<uint8_t*>(const char* str, uint8_t *pval, int16_t min_val, int16_t max_val);
|
||||
|
||||
static uint8_t progressbar_block_count = 0;
|
||||
static uint16_t progressbar_total = 0;
|
||||
void menu_progressbar_init(uint16_t total, const char* title)
|
||||
|
|
@ -519,7 +528,7 @@ void menu_progressbar_init(uint16_t total, const char* title)
|
|||
lcd_clear();
|
||||
progressbar_block_count = 0;
|
||||
progressbar_total = total;
|
||||
|
||||
|
||||
lcd_set_cursor(0, 1);
|
||||
lcd_print_pad_P(title, LCD_WIDTH);
|
||||
lcd_set_cursor(0, 2);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
//Function pointer to menu functions.
|
||||
typedef void (*menu_func_t)(void);
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
menu_func_t menu;
|
||||
int8_t position;
|
||||
|
|
@ -20,10 +20,12 @@ typedef struct
|
|||
{
|
||||
//Variables used when editing values.
|
||||
const char* editLabel;
|
||||
void* editValue;
|
||||
uint8_t editValueBits; // 8 or 16
|
||||
void* editValuePtr;
|
||||
int16_t currentValue;
|
||||
int16_t minEditValue;
|
||||
int16_t maxEditValue;
|
||||
int16_t minJumpValue;
|
||||
} menu_data_edit_t;
|
||||
|
||||
extern uint8_t menu_data[MENU_DATA_SIZE];
|
||||
|
|
@ -33,12 +35,12 @@ extern uint8_t menu_depth;
|
|||
//! definition of reasons blocking the main menu
|
||||
//! Use them as bit mask, so that the code may set various errors at the same time
|
||||
enum ESeriousErrors {
|
||||
MENU_BLOCK_NONE = 0,
|
||||
MENU_BLOCK_THERMAL_ERROR = 0x01,
|
||||
#ifdef TEMP_MODEL
|
||||
MENU_BLOCK_TEMP_MODEL_AUTOTUNE = 0x02,
|
||||
MENU_BLOCK_NONE = 0,
|
||||
MENU_BLOCK_THERMAL_ERROR = 0x01,
|
||||
#ifdef THERMAL_MODEL
|
||||
MENU_BLOCK_THERMAL_MODEL_AUTOTUNE = 0x02,
|
||||
#endif
|
||||
MENU_BLOCK_STATUS_SCREEN_M0 = 0x04,
|
||||
MENU_BLOCK_STATUS_SCREEN_M0 = 0x04,
|
||||
}; // and possibly others in the future.
|
||||
|
||||
//! this is a flag for disabling entering the main menu and longpress. If this is set to anything !=
|
||||
|
|
@ -143,11 +145,9 @@ struct SheetFormatBuffer
|
|||
|
||||
extern void menu_format_sheet_E(const Sheet &sheet_E, SheetFormatBuffer &buffer);
|
||||
|
||||
|
||||
#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { menu_item_edit_P(str, pval, minval, maxval); } while (0)
|
||||
//#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) MENU_ITEM_EDIT(int3, str, pval, minval, maxval)
|
||||
template <typename T>
|
||||
extern void menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val);
|
||||
#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { menu_item_edit_P(str, pval, sizeof(*pval)*8, minval, maxval, 0); } while (0)
|
||||
#define MENU_ITEM_EDIT_int3_jmp_P(str, pval, minval, maxval, jmpval) do { menu_item_edit_P(str, pval, sizeof(*pval)*8, minval, maxval, jmpval); } while (0)
|
||||
extern void menu_item_edit_P(const char* str, void* pval, uint8_t pbits, int16_t min_val, int16_t max_val, int16_t jmp_val);
|
||||
|
||||
extern void menu_progressbar_init(uint16_t total, const char* title);
|
||||
extern void menu_progressbar_update(uint16_t newVal);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "ConfigurationStore.h"
|
||||
#include "util.h"
|
||||
#include "language.h"
|
||||
#include "lcd.h"
|
||||
#include "mesh_bed_calibration.h"
|
||||
#include "mesh_bed_leveling.h"
|
||||
#include "stepper.h"
|
||||
|
|
@ -262,26 +263,26 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
for (uint8_t i = 0; i < npts; ++i) {
|
||||
// First for the residuum in the x axis:
|
||||
if (r != 1 && c != 1) {
|
||||
float a =
|
||||
float a =
|
||||
(r == 0) ? 1.f :
|
||||
((r == 2) ? (-s1 * measured_pts[2 * i]) :
|
||||
(-c2 * measured_pts[2 * i + 1]));
|
||||
float b =
|
||||
float b =
|
||||
(c == 0) ? 1.f :
|
||||
((c == 2) ? (-s1 * measured_pts[2 * i]) :
|
||||
(-c2 * measured_pts[2 * i + 1]));
|
||||
float w = point_weight_x(i, measured_pts[2 * i + 1]);
|
||||
acc += a * b * w;
|
||||
}
|
||||
// Second for the residuum in the y axis.
|
||||
// Second for the residuum in the y axis.
|
||||
// The first row of the points have a low weight, because their position may not be known
|
||||
// with a sufficient accuracy.
|
||||
if (r != 0 && c != 0) {
|
||||
float a =
|
||||
float a =
|
||||
(r == 1) ? 1.f :
|
||||
((r == 2) ? ( c1 * measured_pts[2 * i]) :
|
||||
(-s2 * measured_pts[2 * i + 1]));
|
||||
float b =
|
||||
float b =
|
||||
(c == 1) ? 1.f :
|
||||
((c == 2) ? ( c1 * measured_pts[2 * i]) :
|
||||
(-s2 * measured_pts[2 * i + 1]));
|
||||
|
|
@ -295,7 +296,7 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
acc = 0.f;
|
||||
for (uint8_t i = 0; i < npts; ++i) {
|
||||
{
|
||||
float j =
|
||||
float j =
|
||||
(r == 0) ? 1.f :
|
||||
((r == 1) ? 0.f :
|
||||
((r == 2) ? (-s1 * measured_pts[2 * i]) :
|
||||
|
|
@ -305,7 +306,7 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
acc += j * fx * w;
|
||||
}
|
||||
{
|
||||
float j =
|
||||
float j =
|
||||
(r == 0) ? 0.f :
|
||||
((r == 1) ? 1.f :
|
||||
((r == 2) ? ( c1 * measured_pts[2 * i]) :
|
||||
|
|
@ -373,7 +374,7 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
angleDiff = fabs(a2 - a1);
|
||||
/// XY skew and Y-bed skew
|
||||
DBG(_n("Measured skews: %f %f\n"), degrees(a2 - a1), degrees(a2));
|
||||
eeprom_update_float((float *)(EEPROM_XYZ_CAL_SKEW), angleDiff); //storing xyz cal. skew to be able to show in support menu later
|
||||
eeprom_update_float_notify((float *)(EEPROM_XYZ_CAL_SKEW), angleDiff); //storing xyz cal. skew to be able to show in support menu later
|
||||
if (angleDiff > bed_skew_angle_mild)
|
||||
result = (angleDiff > bed_skew_angle_extreme) ?
|
||||
BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME :
|
||||
|
|
@ -455,7 +456,7 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
if (err > BED_CALIBRATION_POINT_OFFSET_MAX_EUCLIDIAN) {
|
||||
result = BED_SKEW_OFFSET_DETECTION_FITTING_FAILED;
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if(verbosity_level >= 20) SERIAL_ECHOPGM(", error > max. error euclidian");
|
||||
if(verbosity_level >= 20) SERIAL_ECHOPGM(", error > max. error euclidian");
|
||||
#endif // SUPPORT_VERBOSITY
|
||||
}
|
||||
}
|
||||
|
|
@ -499,19 +500,6 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
}
|
||||
#endif // SUPPORT_VERBOSITY
|
||||
|
||||
#if 0
|
||||
if (result == BED_SKEW_OFFSET_DETECTION_PERFECT && fabs(a1) < bed_skew_angle_mild && fabs(a2) < bed_skew_angle_mild) {
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level > 0)
|
||||
SERIAL_ECHOLNPGM("Very little skew detected. Disabling skew correction.");
|
||||
#endif // SUPPORT_VERBOSITY
|
||||
// Just disable the skew correction.
|
||||
vec_x[0] = MACHINE_AXIS_SCALE_X;
|
||||
vec_x[1] = 0.f;
|
||||
vec_y[0] = 0.f;
|
||||
vec_y[1] = MACHINE_AXIS_SCALE_Y;
|
||||
}
|
||||
#else
|
||||
if (result == BED_SKEW_OFFSET_DETECTION_PERFECT) {
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level > 0)
|
||||
|
|
@ -583,7 +571,6 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
}
|
||||
#endif // SUPPORT_VERBOSITY
|
||||
}
|
||||
#endif
|
||||
|
||||
// Invert the transformation matrix made of vec_x, vec_y and cntr.
|
||||
{
|
||||
|
|
@ -669,27 +656,27 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
*/
|
||||
void reset_bed_offset_and_skew()
|
||||
{
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_CENTER+0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_CENTER+4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_X +0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_X +4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_Y +0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_Y +4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_CENTER+0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_CENTER+4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_X +0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_X +4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_Y +0), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_VEC_Y +4), 0x0FFFFFFFF);
|
||||
|
||||
// Reset the 8 16bit offsets.
|
||||
for (int8_t i = 0; i < 4; ++ i)
|
||||
eeprom_update_dword((uint32_t*)(EEPROM_BED_CALIBRATION_Z_JITTER+i*4), 0x0FFFFFFFF);
|
||||
eeprom_update_dword_notify((uint32_t*)(EEPROM_BED_CALIBRATION_Z_JITTER+i*4), 0x0FFFFFFFF);
|
||||
}
|
||||
|
||||
bool is_bed_z_jitter_data_valid()
|
||||
// offsets of the Z heiths of the calibration points from the first point are saved as 16bit signed int, scaled to tenths of microns
|
||||
// if at least one 16bit integer has different value then -1 (0x0FFFF), data are considered valid and function returns true, otherwise it returns false
|
||||
{
|
||||
bool data_valid = false;
|
||||
{
|
||||
for (int8_t i = 0; i < 8; ++i) {
|
||||
if (eeprom_read_word((uint16_t*)(EEPROM_BED_CALIBRATION_Z_JITTER + i * 2)) != 0x0FFFF) data_valid = true;
|
||||
if (eeprom_read_word((uint16_t*)(EEPROM_BED_CALIBRATION_Z_JITTER + i * 2)) != 0x0FFFF)
|
||||
return true;
|
||||
}
|
||||
return data_valid;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void world2machine_update(const float vec_x[2], const float vec_y[2], const float cntr[2])
|
||||
|
|
@ -776,7 +763,7 @@ void world2machine_revert_to_uncorrected()
|
|||
static inline bool vec_undef(const float v[2])
|
||||
{
|
||||
const uint32_t *vx = (const uint32_t*)v;
|
||||
return vx[0] == 0x0FFFFFFFF || vx[1] == 0x0FFFFFFFF;
|
||||
return vx[0] == 0xFFFFFFFF || vx[1] == 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -793,12 +780,9 @@ static inline bool vec_undef(const float v[2])
|
|||
*/
|
||||
void world2machine_read_valid(float vec_x[2], float vec_y[2], float cntr[2])
|
||||
{
|
||||
vec_x[0] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +0));
|
||||
vec_x[1] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +4));
|
||||
vec_y[0] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +0));
|
||||
vec_y[1] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +4));
|
||||
cntr[0] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER+0));
|
||||
cntr[1] = eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER+4));
|
||||
eeprom_read_block(&vec_x[0], (float*)(EEPROM_BED_CALIBRATION_VEC_X), 8);
|
||||
eeprom_read_block(&vec_y[0], (float*)(EEPROM_BED_CALIBRATION_VEC_Y), 8);
|
||||
eeprom_read_block(&cntr[0], (float*)(EEPROM_BED_CALIBRATION_CENTER), 8);
|
||||
|
||||
bool reset = false;
|
||||
if (vec_undef(cntr) || vec_undef(vec_x) || vec_undef(vec_y))
|
||||
|
|
@ -950,10 +934,15 @@ bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, int
|
|||
#endif //SUPPORT_VERBOSITY
|
||||
)
|
||||
{
|
||||
bool high_deviation_occured = false;
|
||||
bool high_deviation_occured = false;
|
||||
bedPWMDisabled = 1;
|
||||
#ifdef TMC2130
|
||||
FORCE_HIGH_POWER_START;
|
||||
bool bHighPowerForced = false;
|
||||
if (tmc2130_mode == TMC2130_MODE_SILENT)
|
||||
{
|
||||
FORCE_HIGH_POWER_START;
|
||||
bHighPowerForced = true;
|
||||
}
|
||||
#endif
|
||||
//printf_P(PSTR("Min. Z: %f\n"), minimum_z);
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
|
|
@ -983,7 +972,7 @@ bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, int
|
|||
#endif //TMC2130
|
||||
for (uint8_t i = 0; i < n_iter; ++ i)
|
||||
{
|
||||
|
||||
|
||||
current_position[Z_AXIS] += high_deviation_occured ? 0.5 : 0.2;
|
||||
float z_bckp = current_position[Z_AXIS];
|
||||
go_to_current(homing_feedrate[Z_AXIS]/60);
|
||||
|
|
@ -995,7 +984,7 @@ bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, int
|
|||
update_current_position_z();
|
||||
//printf_P(PSTR("Zs: %f, Z: %f, delta Z: %f"), z_bckp, current_position[Z_AXIS], (z_bckp - current_position[Z_AXIS]));
|
||||
if (fabs(current_position[Z_AXIS] - z_bckp) < 0.025) {
|
||||
//printf_P(PSTR("PINDA triggered immediately, move Z higher and repeat measurement\n"));
|
||||
//printf_P(PSTR("PINDA triggered immediately, move Z higher and repeat measurement\n"));
|
||||
raise_z(0.5);
|
||||
current_position[Z_AXIS] = minimum_z;
|
||||
go_to_current(homing_feedrate[Z_AXIS]/(4*60));
|
||||
|
|
@ -1024,12 +1013,12 @@ bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, int
|
|||
//printf_P(PSTR("Z[%d] = %d, dz=%d\n"), i, (int)(current_position[Z_AXIS] * 1000), (int)(dz * 1000));
|
||||
//printf_P(PSTR("Z- measurement deviation from avg value %f um\n"), dz);
|
||||
if (dz > 0.05) { //deviation > 50um
|
||||
if (high_deviation_occured == false) { //first occurence may be caused in some cases by mechanic resonance probably especially if printer is placed on unstable surface
|
||||
if (high_deviation_occured == false) { //first occurence may be caused in some cases by mechanic resonance probably especially if printer is placed on unstable surface
|
||||
//printf_P(PSTR("high dev. first occurence\n"));
|
||||
delay_keep_alive(500); //damping
|
||||
//start measurement from the begining, but this time with higher movements in Z axis which should help to reduce mechanical resonance
|
||||
high_deviation_occured = true;
|
||||
i = -1;
|
||||
i = -1;
|
||||
z = 0;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1047,7 +1036,7 @@ bool find_bed_induction_sensor_point_z(float minimum_z, uint8_t n_iter, int
|
|||
enable_z_endstop(endstop_z_enabled);
|
||||
// SERIAL_ECHOLNPGM("find_bed_induction_sensor_point_z 3");
|
||||
#ifdef TMC2130
|
||||
FORCE_HIGH_POWER_END;
|
||||
if (bHighPowerForced) FORCE_HIGH_POWER_END;
|
||||
#endif
|
||||
bedPWMDisabled = 0;
|
||||
return true;
|
||||
|
|
@ -1057,7 +1046,7 @@ error:
|
|||
enable_endstops(endstops_enabled);
|
||||
enable_z_endstop(endstop_z_enabled);
|
||||
#ifdef TMC2130
|
||||
FORCE_HIGH_POWER_END;
|
||||
if (bHighPowerForced) FORCE_HIGH_POWER_END;
|
||||
#endif
|
||||
bedPWMDisabled = 0;
|
||||
return false;
|
||||
|
|
@ -1197,8 +1186,6 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
|||
MYSERIAL.println(current_position[Z_AXIS]);
|
||||
}
|
||||
#endif //SUPPORT_VERBOSITY
|
||||
//lcd_show_fullscreen_message_and_wait_P(PSTR("First hit"));
|
||||
//lcd_update_enable(true);
|
||||
|
||||
float init_x_position = current_position[X_AXIS];
|
||||
float init_y_position = current_position[Y_AXIS];
|
||||
|
|
@ -1206,7 +1193,7 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
|||
// we have to let the planner know where we are right now as it is not where we said to go.
|
||||
update_current_position_xyz();
|
||||
enable_z_endstop(false);
|
||||
|
||||
|
||||
for (int8_t iter = 0; iter < 2; ++iter) {
|
||||
/*SERIAL_ECHOPGM("iter: ");
|
||||
MYSERIAL.println(iter);
|
||||
|
|
@ -1225,7 +1212,7 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
|||
invert_z_endstop(true);
|
||||
for (int iteration = 0; iteration < 8; iteration++) {
|
||||
|
||||
found = false;
|
||||
found = false;
|
||||
enable_z_endstop(true);
|
||||
go_xy(init_x_position + 16.0f, current_position[Y_AXIS], feedrate / 5);
|
||||
update_current_position_xyz();
|
||||
|
|
@ -1251,7 +1238,7 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
|||
current_position[X_AXIS] = 0.5f * (a + b);
|
||||
go_xy(current_position[X_AXIS], init_y_position, feedrate / 5);
|
||||
found = true;
|
||||
|
||||
|
||||
// Search in the Y direction along a cross.
|
||||
found = false;
|
||||
enable_z_endstop(true);
|
||||
|
|
@ -1327,7 +1314,7 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enable_z_endstop(false);
|
||||
invert_z_endstop(false);
|
||||
return found;
|
||||
|
|
@ -1815,7 +1802,7 @@ canceled:
|
|||
#define IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS (8.f)
|
||||
#define IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_STEP_FINE_Y (0.1f)
|
||||
inline bool improve_bed_induction_sensor_point3(int verbosity_level)
|
||||
{
|
||||
{
|
||||
float center_old_x = current_position[X_AXIS];
|
||||
float center_old_y = current_position[Y_AXIS];
|
||||
float a, b;
|
||||
|
|
@ -2179,8 +2166,18 @@ inline void scan_bed_induction_sensor_point()
|
|||
|
||||
#define MESH_BED_CALIBRATION_SHOW_LCD
|
||||
|
||||
float __attribute__((noinline)) BED_X(const uint8_t col)
|
||||
{
|
||||
return ((float)col * x_mesh_density + BED_X0);
|
||||
}
|
||||
|
||||
float __attribute__((noinline)) BED_Y(const uint8_t row)
|
||||
{
|
||||
return ((float)row * y_mesh_density + BED_Y0);
|
||||
}
|
||||
|
||||
BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level, uint8_t &too_far_mask)
|
||||
{
|
||||
{
|
||||
// Don't let the manage_inactivity() function remove power from the motors.
|
||||
refresh_cmd_timeout();
|
||||
|
||||
|
|
@ -2191,13 +2188,13 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
float *vec_y = vec_x + 2;
|
||||
float *cntr = vec_y + 2;
|
||||
memset(pts, 0, sizeof(float) * 7 * 7);
|
||||
uint8_t iteration = 0;
|
||||
uint8_t iteration = 0;
|
||||
BedSkewOffsetDetectionResultType result;
|
||||
|
||||
// SERIAL_ECHOLNPGM("find_bed_offset_and_skew verbosity level: ");
|
||||
// SERIAL_ECHO(int(verbosity_level));
|
||||
// SERIAL_ECHOPGM("");
|
||||
|
||||
|
||||
#ifdef NEW_XYZCAL
|
||||
{
|
||||
#else //NEW_XYZCAL
|
||||
|
|
@ -2209,7 +2206,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level >= 20) {
|
||||
SERIAL_ECHOLNPGM("Vectors: ");
|
||||
|
||||
|
||||
SERIAL_ECHOPGM("vec_x[0]:");
|
||||
MYSERIAL.print(vec_x[0], 5);
|
||||
SERIAL_ECHOLNPGM("");
|
||||
|
|
@ -2278,7 +2275,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
else {
|
||||
// if first iteration failed, count corrected point coordinates as initial
|
||||
// Use the corrected coordinate, which is a result of find_bed_offset_and_skew().
|
||||
|
||||
|
||||
current_position[X_AXIS] = vec_x[0] * pgm_read_float(bed_ref_points_4 + k * 2) + vec_y[0] * pgm_read_float(bed_ref_points_4 + k * 2 + 1) + cntr[0];
|
||||
current_position[Y_AXIS] = vec_x[1] * pgm_read_float(bed_ref_points_4 + k * 2) + vec_y[1] * pgm_read_float(bed_ref_points_4 + k * 2 + 1) + cntr[1];
|
||||
|
||||
|
|
@ -2321,7 +2318,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
|
||||
#ifndef NEW_XYZCAL
|
||||
#ifndef HEATBED_V2
|
||||
|
||||
|
||||
if (k == 0 || k == 1) {
|
||||
// Improve the position of the 1st row sensor points by a zig-zag movement.
|
||||
find_bed_induction_sensor_point_z();
|
||||
|
|
@ -2360,11 +2357,11 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
pt[0] += (current_position[X_AXIS]/(iteration + 1)); //count average
|
||||
pt[1] = (pt[1] * iteration) / (iteration + 1);
|
||||
pt[1] += (current_position[Y_AXIS] / (iteration + 1));
|
||||
|
||||
|
||||
|
||||
|
||||
//pt[0] += current_position[X_AXIS];
|
||||
//if(iteration > 0) pt[0] = pt[0] / 2;
|
||||
|
||||
|
||||
//pt[1] += current_position[Y_AXIS];
|
||||
//if (iteration > 0) pt[1] = pt[1] / 2;
|
||||
|
||||
|
|
@ -2398,7 +2395,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
}
|
||||
DBG(_n("All 4 calibration points found.\n"));
|
||||
delay_keep_alive(0); //manage_heater, reset watchdog, manage inactivity
|
||||
|
||||
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level >= 20) {
|
||||
// Test the positions. Are the positions reproducible? Now the calibration is active in the planner.
|
||||
|
|
@ -2425,19 +2422,16 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
}
|
||||
result = calculate_machine_skew_and_offset_LS(pts, 4, bed_ref_points_4, vec_x, vec_y, cntr, verbosity_level);
|
||||
delay_keep_alive(0); //manage_heater, reset watchdog, manage inactivity
|
||||
|
||||
|
||||
if (result >= 0) {
|
||||
DBG(_n("Calibration success.\n"));
|
||||
world2machine_update(vec_x, vec_y, cntr);
|
||||
#if 1
|
||||
|
||||
// Fearlessly store the calibration values into the eeprom.
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 0), cntr[0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 4), cntr[1]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_X + 0), vec_x[0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_X + 4), vec_x[1]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 0), vec_y[0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 4), vec_y[1]);
|
||||
#endif
|
||||
eeprom_update_block_notify(&cntr[0], (float*)(EEPROM_BED_CALIBRATION_CENTER), 8);
|
||||
eeprom_update_block_notify(&vec_x[0], (float*)(EEPROM_BED_CALIBRATION_VEC_X), 8);
|
||||
eeprom_update_block_notify(&vec_y[0], (float*)(EEPROM_BED_CALIBRATION_VEC_Y), 8);
|
||||
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level >= 10) {
|
||||
// Length of the vec_x
|
||||
|
|
@ -2476,8 +2470,8 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
uint8_t ix = mesh_point % MESH_MEAS_NUM_X_POINTS; // from 0 to MESH_NUM_X_POINTS - 1
|
||||
uint8_t iy = mesh_point / MESH_MEAS_NUM_X_POINTS;
|
||||
if (iy & 1) ix = (MESH_MEAS_NUM_X_POINTS - 1) - ix;
|
||||
current_position[X_AXIS] = BED_X(ix, MESH_MEAS_NUM_X_POINTS);
|
||||
current_position[Y_AXIS] = BED_Y(iy, MESH_MEAS_NUM_Y_POINTS);
|
||||
current_position[X_AXIS] = BED_X(ix * 3);
|
||||
current_position[Y_AXIS] = BED_Y(iy * 3);
|
||||
go_to_current(homing_feedrate[X_AXIS] / 60);
|
||||
delay_keep_alive(3000);
|
||||
}
|
||||
|
|
@ -2491,7 +2485,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
}
|
||||
iteration++;
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_XYZCAL
|
||||
|
|
@ -2528,7 +2522,7 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
|
|||
bool endstop_z_enabled = enable_z_endstop(false);
|
||||
|
||||
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
|
||||
lcd_display_message_fullscreen_P(_i("Improving bed calibration point"));////MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=20 r=4
|
||||
lcd_display_message_fullscreen_P(_T(MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1));
|
||||
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
|
||||
|
||||
// Collect a matrix of 9x9 points.
|
||||
|
|
@ -2720,15 +2714,11 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
|
|||
}
|
||||
|
||||
world2machine_update(vec_x, vec_y, cntr);
|
||||
#if 1
|
||||
|
||||
// Fearlessly store the calibration values into the eeprom.
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_CENTER+0), cntr [0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_CENTER+4), cntr [1]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +0), vec_x[0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_X +4), vec_x[1]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +0), vec_y[0]);
|
||||
eeprom_update_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y +4), vec_y[1]);
|
||||
#endif
|
||||
eeprom_update_block_notify(&cntr[0], (float*)(EEPROM_BED_CALIBRATION_CENTER), 8);
|
||||
eeprom_update_block_notify(&vec_x[0], (float*)(EEPROM_BED_CALIBRATION_VEC_X), 8);
|
||||
eeprom_update_block_notify(&vec_y[0], (float*)(EEPROM_BED_CALIBRATION_VEC_Y), 8);
|
||||
|
||||
// Correct the current_position to match the transformed coordinate system after world2machine_rotation_and_skew and world2machine_shift were set.
|
||||
world2machine_update_current();
|
||||
|
|
@ -2790,16 +2780,22 @@ canceled:
|
|||
#endif //NEW_XYZCAL
|
||||
|
||||
bool sample_z() {
|
||||
bool sampled = true;
|
||||
//make space
|
||||
raise_z(150);
|
||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
|
||||
bool sampled = true;
|
||||
// make some space for the sheet
|
||||
// Avoid calling raise_z(), because a false triggering stallguard may prevent the Z from moving.
|
||||
// The extruder then may ram the sheet hard if not going down from some ~150mm height
|
||||
current_position[Z_AXIS] = 0.F;
|
||||
destination[Z_AXIS] = 150.F;
|
||||
plan_buffer_line_destinationXYZE(homing_feedrate[Z_AXIS] / 60);
|
||||
|
||||
// Sample Z heights for the mesh bed leveling.
|
||||
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
|
||||
if (!sample_mesh_and_store_reference()) sampled = false;
|
||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
|
||||
|
||||
return sampled;
|
||||
// Sample Z heights for the mesh bed leveling.
|
||||
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
|
||||
if (!sample_mesh_and_store_reference())
|
||||
sampled = false;
|
||||
|
||||
return sampled;
|
||||
}
|
||||
|
||||
void go_home_with_z_lift()
|
||||
|
|
@ -2809,16 +2805,16 @@ void go_home_with_z_lift()
|
|||
// Go home.
|
||||
// First move up to a safe height.
|
||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||
go_to_current(homing_feedrate[Z_AXIS]/60);
|
||||
go_to_current(homing_feedrate[Z_AXIS] / 60);
|
||||
// Second move to XY [0, 0].
|
||||
current_position[X_AXIS] = X_MIN_POS+0.2;
|
||||
current_position[Y_AXIS] = Y_MIN_POS+0.2;
|
||||
current_position[X_AXIS] = X_MIN_POS + 0.2;
|
||||
current_position[Y_AXIS] = Y_MIN_POS + 0.2;
|
||||
// Clamp to the physical coordinates.
|
||||
world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
|
||||
go_to_current(homing_feedrate[X_AXIS]/20);
|
||||
go_to_current((3 * homing_feedrate[X_AXIS]) / 60);
|
||||
// Third move up to a safe height.
|
||||
current_position[Z_AXIS] = Z_MIN_POS;
|
||||
go_to_current(homing_feedrate[Z_AXIS]/60);
|
||||
go_to_current(homing_feedrate[Z_AXIS] / 60);
|
||||
}
|
||||
|
||||
// Sample the 9 points of the bed and store them into the EEPROM as a reference.
|
||||
|
|
@ -2827,6 +2823,10 @@ void go_home_with_z_lift()
|
|||
// Returns false if the reference values are more than 3mm far away.
|
||||
bool sample_mesh_and_store_reference()
|
||||
{
|
||||
bool result = false;
|
||||
#ifdef TMC2130
|
||||
tmc2130_home_enter(Z_AXIS_MASK);
|
||||
#endif
|
||||
bool endstops_enabled = enable_endstops(false);
|
||||
bool endstop_z_enabled = enable_z_endstop(false);
|
||||
|
||||
|
|
@ -2842,30 +2842,25 @@ bool sample_mesh_and_store_reference()
|
|||
// Sample Z heights for the mesh bed leveling.
|
||||
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
|
||||
{
|
||||
// The first point defines the reference.
|
||||
// Lower Z to the mesh search height with stall detection
|
||||
enable_endstops(true);
|
||||
current_position[Z_AXIS] = MESH_HOME_Z_SEARCH;
|
||||
go_to_current(homing_feedrate[Z_AXIS]/60);
|
||||
#ifdef TMC2130
|
||||
check_Z_crash();
|
||||
#endif
|
||||
enable_endstops(false);
|
||||
|
||||
// Move XY to first point
|
||||
current_position[X_AXIS] = BED_X0;
|
||||
current_position[Y_AXIS] = BED_Y0;
|
||||
world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
|
||||
go_to_current(homing_feedrate[X_AXIS]/60);
|
||||
set_destination_to_current();
|
||||
enable_endstops(true);
|
||||
homeaxis(Z_AXIS);
|
||||
|
||||
#ifdef TMC2130
|
||||
if (!axis_known_position[Z_AXIS] && (!READ(Z_TMC2130_DIAG))) //Z crash
|
||||
{
|
||||
kill(_T(MSG_BED_LEVELING_FAILED_POINT_LOW));
|
||||
return false;
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
||||
enable_endstops(false);
|
||||
if (!find_bed_induction_sensor_point_z()) //Z crash or deviation > 50um
|
||||
{
|
||||
kill(_T(MSG_BED_LEVELING_FAILED_POINT_LOW));
|
||||
return false;
|
||||
}
|
||||
mbl.set_z(0, 0, current_position[Z_AXIS]);
|
||||
}
|
||||
|
|
@ -2879,8 +2874,8 @@ bool sample_mesh_and_store_reference()
|
|||
uint8_t ix = mesh_point % MESH_MEAS_NUM_X_POINTS;
|
||||
uint8_t iy = mesh_point / MESH_MEAS_NUM_X_POINTS;
|
||||
if (iy & 1) ix = (MESH_MEAS_NUM_X_POINTS - 1) - ix; // Zig zag
|
||||
current_position[X_AXIS] = BED_X(ix, MESH_MEAS_NUM_X_POINTS);
|
||||
current_position[Y_AXIS] = BED_Y(iy, MESH_MEAS_NUM_Y_POINTS);
|
||||
current_position[X_AXIS] = BED_X(ix * 3);
|
||||
current_position[Y_AXIS] = BED_Y(iy * 3);
|
||||
world2machine_clamp(current_position[X_AXIS], current_position[Y_AXIS]);
|
||||
go_to_current(homing_feedrate[X_AXIS]/60);
|
||||
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
|
||||
|
|
@ -2891,10 +2886,9 @@ bool sample_mesh_and_store_reference()
|
|||
if (!find_bed_induction_sensor_point_z()) //Z crash or deviation > 50um
|
||||
{
|
||||
kill(_T(MSG_BED_LEVELING_FAILED_POINT_LOW));
|
||||
return false;
|
||||
}
|
||||
// Get cords of measuring point
|
||||
|
||||
|
||||
mbl.set_z(ix, iy, current_position[Z_AXIS]);
|
||||
}
|
||||
{
|
||||
|
|
@ -2910,7 +2904,7 @@ bool sample_mesh_and_store_reference()
|
|||
// The span of the Z offsets is extreme. Give up.
|
||||
// Homing failed on some of the points.
|
||||
SERIAL_PROTOCOLLNPGM("Exreme span of the Z values!");
|
||||
return false;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2925,7 +2919,7 @@ bool sample_mesh_and_store_reference()
|
|||
continue;
|
||||
float dif = mbl.z_values[j][i] - mbl.z_values[0][0];
|
||||
int16_t dif_quantized = int16_t(floor(dif * 100.f + 0.5f));
|
||||
eeprom_update_word((uint16_t*)addr, *reinterpret_cast<uint16_t*>(&dif_quantized));
|
||||
eeprom_update_word_notify((uint16_t*)addr, *reinterpret_cast<uint16_t*>(&dif_quantized));
|
||||
#if 0
|
||||
{
|
||||
uint16_t z_offset_u = eeprom_read_word((uint16_t*)addr);
|
||||
|
|
@ -2946,14 +2940,18 @@ bool sample_mesh_and_store_reference()
|
|||
}
|
||||
}
|
||||
|
||||
mbl.upsample_3x3();
|
||||
mbl.active = true;
|
||||
mbl.reset();
|
||||
|
||||
go_home_with_z_lift();
|
||||
|
||||
result = true;
|
||||
end:
|
||||
enable_endstops(endstops_enabled);
|
||||
enable_z_endstop(endstop_z_enabled);
|
||||
return true;
|
||||
#ifdef TMC2130
|
||||
tmc2130_home_exit();
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_XYZCAL
|
||||
|
|
@ -2999,8 +2997,8 @@ bool scan_bed_induction_points(int8_t verbosity_level)
|
|||
uint8_t ix = mesh_point % MESH_MEAS_NUM_X_POINTS; // from 0 to MESH_NUM_X_POINTS - 1
|
||||
uint8_t iy = mesh_point / MESH_MEAS_NUM_X_POINTS;
|
||||
if (iy & 1) ix = (MESH_MEAS_NUM_X_POINTS - 1) - ix;
|
||||
float bedX = BED_X(ix, MESH_MEAS_NUM_X_POINTS);
|
||||
float bedY = BED_Y(iy, MESH_MEAS_NUM_Y_POINTS);
|
||||
float bedX = BED_X(ix * 3);
|
||||
float bedY = BED_Y(iy * 3);
|
||||
current_position[X_AXIS] = vec_x[0] * bedX + vec_y[0] * bedY + cntr[0];
|
||||
current_position[Y_AXIS] = vec_x[1] * bedX + vec_y[1] * bedY + cntr[1];
|
||||
// The calibration points are very close to the min Y.
|
||||
|
|
@ -3029,9 +3027,12 @@ bool scan_bed_induction_points(int8_t verbosity_level)
|
|||
// To replace loading of the babystep correction.
|
||||
static void shift_z(float delta)
|
||||
{
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] - delta, current_position[E_AXIS], homing_feedrate[Z_AXIS]/40);
|
||||
const float curpos_z = current_position[Z_AXIS];
|
||||
current_position[Z_AXIS] -= delta;
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[Z_AXIS] / 60);
|
||||
st_synchronize();
|
||||
plan_set_z_position(current_position[Z_AXIS]);
|
||||
current_position[Z_AXIS] = curpos_z;
|
||||
plan_set_z_position(curpos_z);
|
||||
}
|
||||
|
||||
// Number of baby steps applied
|
||||
|
|
@ -3044,18 +3045,18 @@ void babystep_load()
|
|||
if (calibration_status_get(CALIBRATION_STATUS_LIVE_ADJUST))
|
||||
{
|
||||
check_babystep(); //checking if babystep is in allowed range, otherwise setting babystep to 0
|
||||
|
||||
|
||||
// End of G80: Apply the baby stepping value.
|
||||
babystepLoadZ = eeprom_read_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->
|
||||
s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)));
|
||||
|
||||
|
||||
#if 0
|
||||
SERIAL_ECHO("Z baby step: ");
|
||||
SERIAL_ECHO(babystepLoadZ);
|
||||
SERIAL_ECHO(", current Z: ");
|
||||
SERIAL_ECHO(current_position[Z_AXIS]);
|
||||
SERIAL_ECHO("correction: ");
|
||||
SERIAL_ECHO(float(babystepLoadZ) / float(axis_steps_per_unit[Z_AXIS]));
|
||||
SERIAL_ECHO(float(babystepLoadZ) / float(axis_steps_per_mm[Z_AXIS]));
|
||||
SERIAL_ECHOLN("");
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3064,38 +3065,28 @@ void babystep_load()
|
|||
void babystep_apply()
|
||||
{
|
||||
babystep_load();
|
||||
shift_z(- float(babystepLoadZ) / float(cs.axis_steps_per_unit[Z_AXIS]));
|
||||
shift_z(- float(babystepLoadZ) / float(cs.axis_steps_per_mm[Z_AXIS]));
|
||||
}
|
||||
|
||||
void babystep_undo()
|
||||
{
|
||||
shift_z(float(babystepLoadZ) / float(cs.axis_steps_per_unit[Z_AXIS]));
|
||||
shift_z(float(babystepLoadZ) / float(cs.axis_steps_per_mm[Z_AXIS]));
|
||||
babystepLoadZ = 0;
|
||||
}
|
||||
|
||||
void babystep_reset()
|
||||
{
|
||||
babystepLoadZ = 0;
|
||||
babystepLoadZ = 0;
|
||||
}
|
||||
|
||||
void count_xyz_details(float (&distanceMin)[2]) {
|
||||
float cntr[2] = {
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 0)),
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 4))
|
||||
};
|
||||
float vec_x[2] = {
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X + 0)),
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_X + 4))
|
||||
};
|
||||
float vec_y[2] = {
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 0)),
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 4))
|
||||
};
|
||||
#if 0
|
||||
a2 = -1 * asin(vec_y[0] / MACHINE_AXIS_SCALE_Y);
|
||||
a1 = asin(vec_x[1] / MACHINE_AXIS_SCALE_X);
|
||||
angleDiff = fabs(a2 - a1);
|
||||
#endif
|
||||
float cntr[2];
|
||||
float vec_x[2];
|
||||
float vec_y[2];
|
||||
eeprom_read_block(&cntr[0], (float*)(EEPROM_BED_CALIBRATION_CENTER), 8);
|
||||
eeprom_read_block(&vec_x[0], (float*)(EEPROM_BED_CALIBRATION_VEC_X), 8);
|
||||
eeprom_read_block(&vec_y[0], (float*)(EEPROM_BED_CALIBRATION_VEC_Y), 8);
|
||||
|
||||
for (uint8_t mesh_point = 0; mesh_point < 2; ++mesh_point) {
|
||||
float y = vec_x[1] * pgm_read_float(bed_ref_points_4 + mesh_point * 2) + vec_y[1] * pgm_read_float(bed_ref_points_4 + mesh_point * 2 + 1) + cntr[1];
|
||||
distanceMin[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||
|
|
@ -3107,20 +3098,19 @@ void mbl_settings_init() {
|
|||
//magnet elimination: use aaproximate Z-coordinate instead of measured values for points which are near magnets
|
||||
eeprom_init_default_byte((uint8_t*)EEPROM_MBL_MAGNET_ELIMINATION, 1);
|
||||
eeprom_init_default_byte((uint8_t*)EEPROM_MBL_POINTS_NR, 3);
|
||||
mbl_z_probe_nr = eeprom_init_default_byte((uint8_t*)EEPROM_MBL_PROBE_NR, 3);
|
||||
eeprom_init_default_byte((uint8_t*)EEPROM_MBL_PROBE_NR, 3);
|
||||
}
|
||||
|
||||
//parameter ix: index of mesh bed leveling point in X-axis (for meas_points == 7 is valid range from 0 to 6; for meas_points == 3 is valid range from 0 to 2 )
|
||||
//parameter iy: index of mesh bed leveling point in Y-axis (for meas_points == 7 is valid range from 0 to 6; for meas_points == 3 is valid range from 0 to 2 )
|
||||
//parameter meas_points: number of mesh bed leveling points in one axis; currently designed and tested for values 3 and 7
|
||||
//parameter zigzag: false if ix is considered 0 on left side of bed and ix rises with rising X coordinate; true if ix is considered 0 on the right side of heatbed for odd iy values (zig zag mesh bed leveling movements)
|
||||
//parameter ix: index of mesh bed leveling point in X-axis (for meas_points == 7 is valid range from 0 to 6; for meas_points == 3 is valid range from 0 to 2 )
|
||||
//parameter iy: index of mesh bed leveling point in Y-axis (for meas_points == 7 is valid range from 0 to 6; for meas_points == 3 is valid range from 0 to 2 )
|
||||
//function returns true if point is considered valid (typicaly in safe distance from magnet or another object which inflences PINDA measurements)
|
||||
bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy, uint8_t meas_points, bool zigzag) {
|
||||
bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy) {
|
||||
//"human readable" heatbed plan
|
||||
//magnet proximity influence Z coordinate measurements significantly (40 - 100 um)
|
||||
//0 - measurement point is above magnet and Z coordinate can be influenced negatively
|
||||
//1 - we should be in safe distance from magnets, measurement should be accurate
|
||||
if ((ix >= meas_points) || (iy >= meas_points)) return false;
|
||||
if ((ix >= MESH_NUM_X_POINTS) || (iy >= MESH_NUM_Y_POINTS))
|
||||
return false;
|
||||
|
||||
uint8_t valid_points_mask[7] = {
|
||||
//[X_MAX,Y_MAX]
|
||||
|
|
@ -3134,36 +3124,26 @@ bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy, uint8_t meas_points, bo
|
|||
0b1111111,//0
|
||||
//[0,0]
|
||||
};
|
||||
if (meas_points == 3) {
|
||||
ix *= 3;
|
||||
iy *= 3;
|
||||
}
|
||||
if (zigzag) {
|
||||
if ((iy % 2) == 0) return (valid_points_mask[6 - iy] & (1 << (6 - ix)));
|
||||
else return (valid_points_mask[6 - iy] & (1 << ix));
|
||||
}
|
||||
else {
|
||||
return (valid_points_mask[6 - iy] & (1 << (6 - ix)));
|
||||
}
|
||||
return (valid_points_mask[6 - iy] & (1 << (6 - ix)));
|
||||
}
|
||||
|
||||
void mbl_single_point_interpolation(uint8_t x, uint8_t y, uint8_t meas_points) {
|
||||
void mbl_single_point_interpolation(uint8_t x, uint8_t y) {
|
||||
//printf_P(PSTR("x = %d; y = %d \n"), x, y);
|
||||
uint8_t count = 0;
|
||||
float z = 0;
|
||||
if (mbl_point_measurement_valid(x, y + 1, meas_points, false)) { z += mbl.z_values[y + 1][x]; /*printf_P(PSTR("x; y+1: Z = %f \n"), mbl.z_values[y + 1][x]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x, y - 1, meas_points, false)) { z += mbl.z_values[y - 1][x]; /*printf_P(PSTR("x; y-1: Z = %f \n"), mbl.z_values[y - 1][x]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x + 1, y, meas_points, false)) { z += mbl.z_values[y][x + 1]; /*printf_P(PSTR("x+1; y: Z = %f \n"), mbl.z_values[y][x + 1]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x - 1, y, meas_points, false)) { z += mbl.z_values[y][x - 1]; /*printf_P(PSTR("x-1; y: Z = %f \n"), mbl.z_values[y][x - 1]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x, y + 1)) { z += mbl.z_values[y + 1][x]; /*printf_P(PSTR("x; y+1: Z = %f \n"), mbl.z_values[y + 1][x]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x, y - 1)) { z += mbl.z_values[y - 1][x]; /*printf_P(PSTR("x; y-1: Z = %f \n"), mbl.z_values[y - 1][x]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x + 1, y)) { z += mbl.z_values[y][x + 1]; /*printf_P(PSTR("x+1; y: Z = %f \n"), mbl.z_values[y][x + 1]);*/ count++; }
|
||||
if (mbl_point_measurement_valid(x - 1, y)) { z += mbl.z_values[y][x - 1]; /*printf_P(PSTR("x-1; y: Z = %f \n"), mbl.z_values[y][x - 1]);*/ count++; }
|
||||
if(count != 0) mbl.z_values[y][x] = z / count; //if we have at least one valid point in surrounding area use average value, otherwise use inaccurately measured Z-coordinate
|
||||
//printf_P(PSTR("result: Z = %f \n\n"), mbl.z_values[y][x]);
|
||||
}
|
||||
|
||||
void mbl_interpolation(uint8_t meas_points) {
|
||||
for (uint8_t x = 0; x < meas_points; x++) {
|
||||
for (uint8_t y = 0; y < meas_points; y++) {
|
||||
if (!mbl_point_measurement_valid(x, y, meas_points, false)) {
|
||||
mbl_single_point_interpolation(x, y, meas_points);
|
||||
void mbl_magnet_elimination() {
|
||||
for (uint8_t y = 0; y < MESH_NUM_Y_POINTS; y++) {
|
||||
for (uint8_t x = 0; x < MESH_NUM_X_POINTS; x++) {
|
||||
if (!mbl_point_measurement_valid(x, y)) {
|
||||
mbl_single_point_interpolation(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Marlin.h"
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define BED_ZERO_REF_X (- 22.f + X_PROBE_OFFSET_FROM_EXTRUDER) // -22 + 23 = 1
|
||||
#define BED_ZERO_REF_Y (- 0.6f + Y_PROBE_OFFSET_FROM_EXTRUDER + 4.f) // -0.6 + 5 + 4 = 8.4
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
#endif //not HEATBED_V2
|
||||
|
||||
#define BED_X(i, n) ((float)i * (BED_Xn - BED_X0) / (n - 1) + BED_X0)
|
||||
#define BED_Y(i, n) ((float)i * (BED_Yn - BED_Y0) / (n - 1) + BED_Y0)
|
||||
constexpr float x_mesh_density = (BED_Xn - BED_X0) / (MESH_NUM_X_POINTS - 1);
|
||||
constexpr float y_mesh_density = (BED_Yn - BED_Y0) / (MESH_NUM_Y_POINTS - 1);
|
||||
|
||||
// Exact positions of the print head above the bed reference points, in the world coordinates.
|
||||
// The world coordinates match the machine coordinates only in case, when the machine
|
||||
|
|
@ -133,7 +133,7 @@ inline bool world2machine_clamp(float &x, float &y)
|
|||
tmpx = X_MAX_POS;
|
||||
clamped = true;
|
||||
}
|
||||
|
||||
|
||||
if (tmpy < Y_MIN_POS) {
|
||||
tmpy = Y_MIN_POS;
|
||||
clamped = true;
|
||||
|
|
@ -145,6 +145,17 @@ inline bool world2machine_clamp(float &x, float &y)
|
|||
machine2world(tmpx, tmpy, x, y);
|
||||
return clamped;
|
||||
}
|
||||
|
||||
/// @brief For a given column on the mesh calculate the bed X coordinate
|
||||
/// @param col column index on mesh
|
||||
/// @return Bed X coordinate
|
||||
float BED_X(const uint8_t col);
|
||||
|
||||
/// @brief For a given row on the mesh calculate the bed Y coordinate
|
||||
/// @param row row index on mesh
|
||||
/// @return Bed Y coordinate
|
||||
float BED_Y(const uint8_t row);
|
||||
|
||||
/**
|
||||
* @brief Bed skew and offest detection result
|
||||
*
|
||||
|
|
@ -152,13 +163,13 @@ inline bool world2machine_clamp(float &x, float &y)
|
|||
* Negative: failed
|
||||
*/
|
||||
|
||||
enum BedSkewOffsetDetectionResultType {
|
||||
enum BedSkewOffsetDetectionResultType : int8_t {
|
||||
// Detection failed, some point was not found.
|
||||
BED_SKEW_OFFSET_DETECTION_POINT_FOUND = 0, //!< Point found
|
||||
BED_SKEW_OFFSET_DETECTION_POINT_NOT_FOUND = -1, //!< Point not found.
|
||||
BED_SKEW_OFFSET_DETECTION_FITTING_FAILED = -2, //!< Fitting failed
|
||||
BED_SKEW_OFFSET_DETECTION_POINT_SCAN_FAILED = -3, //!< Point scan failed, try again
|
||||
|
||||
|
||||
// Detection finished with success.
|
||||
BED_SKEW_OFFSET_DETECTION_PERFECT = 0, //!< Perfect.
|
||||
BED_SKEW_OFFSET_DETECTION_SKEW_MILD = 1, //!< Mildly skewed.
|
||||
|
|
@ -184,7 +195,7 @@ extern bool is_bed_z_jitter_data_valid();
|
|||
// Useful for visualizing the behavior of the bed induction detector.
|
||||
extern bool scan_bed_induction_points(int8_t verbosity_level);
|
||||
|
||||
// Load Z babystep value from the EEPROM into babystepLoadZ,
|
||||
// Load Z babystep value from the EEPROM into babystepLoadZ,
|
||||
// but don't apply it through the planner. This is useful on wake up
|
||||
// after power panic, when it is expected, that the baby step has been already applied.
|
||||
extern void babystep_load();
|
||||
|
|
@ -203,6 +214,5 @@ extern void count_xyz_details(float (&distanceMin)[2]);
|
|||
extern bool sample_z();
|
||||
|
||||
extern void mbl_settings_init();
|
||||
|
||||
extern bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy, uint8_t meas_points, bool zigzag);
|
||||
extern void mbl_interpolation(uint8_t meas_points);
|
||||
extern bool mbl_point_measurement_valid(uint8_t ix, uint8_t iy);
|
||||
extern void mbl_magnet_elimination();
|
||||
|
|
|
|||
|
|
@ -6,23 +6,44 @@
|
|||
|
||||
mesh_bed_leveling mbl;
|
||||
|
||||
mesh_bed_leveling::mesh_bed_leveling() { reset(); }
|
||||
|
||||
void mesh_bed_leveling::reset() {
|
||||
active = 0;
|
||||
memset(z_values, 0, sizeof(float) * MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS);
|
||||
memset(z_values, 0, sizeof(z_values));
|
||||
}
|
||||
|
||||
static inline bool vec_undef(const float v[2])
|
||||
{
|
||||
const uint32_t *vx = (const uint32_t*)v;
|
||||
return vx[0] == 0x0FFFFFFFF || vx[1] == 0x0FFFFFFFF;
|
||||
}
|
||||
float mesh_bed_leveling::get_z(float x, float y) {
|
||||
int i, j;
|
||||
float s, t;
|
||||
|
||||
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
||||
i = int(floor((x - (BED_X0 + X_PROBE_OFFSET_FROM_EXTRUDER)) / x_mesh_density));
|
||||
if (i < 0) {
|
||||
i = 0;
|
||||
s = (x - (BED_X0 + X_PROBE_OFFSET_FROM_EXTRUDER)) / x_mesh_density;
|
||||
} else {
|
||||
if (i > MESH_NUM_X_POINTS - 2) {
|
||||
i = MESH_NUM_X_POINTS - 2;
|
||||
}
|
||||
s = (x - get_x(i)) / x_mesh_density;
|
||||
}
|
||||
|
||||
j = int(floor((y - (BED_Y0 + Y_PROBE_OFFSET_FROM_EXTRUDER)) / y_mesh_density));
|
||||
if (j < 0) {
|
||||
j = 0;
|
||||
t = (y - (BED_Y0 + Y_PROBE_OFFSET_FROM_EXTRUDER)) / y_mesh_density;
|
||||
} else {
|
||||
if (j > MESH_NUM_Y_POINTS - 2) {
|
||||
j = MESH_NUM_Y_POINTS - 2;
|
||||
}
|
||||
t = (y - get_y(j)) / y_mesh_density;
|
||||
}
|
||||
|
||||
float si = 1.f-s;
|
||||
float z0 = si * z_values[j ][i] + s * z_values[j ][i+1];
|
||||
float z1 = si * z_values[j+1][i] + s * z_values[j+1][i+1];
|
||||
return (1.f-t) * z0 + t * z1;
|
||||
}
|
||||
// Works for an odd number of MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS
|
||||
|
||||
// #define MBL_BILINEAR
|
||||
void mesh_bed_leveling::upsample_3x3()
|
||||
{
|
||||
int idx0 = 0;
|
||||
|
|
@ -30,76 +51,53 @@ void mesh_bed_leveling::upsample_3x3()
|
|||
int idx2 = MESH_NUM_X_POINTS - 1;
|
||||
{
|
||||
// First interpolate the points in X axis.
|
||||
static const float x0 = MESH_MIN_X;
|
||||
static const float x1 = 0.5f * float(MESH_MIN_X + MESH_MAX_X);
|
||||
static const float x2 = MESH_MAX_X;
|
||||
for (int j = 0; j < 3; ++ j) {
|
||||
// 1) Copy the source points to their new destination.
|
||||
z_values[j][idx2] = z_values[j][2];
|
||||
z_values[j][idx1] = z_values[j][1];
|
||||
// 2) Interpolate the remaining values by Largrangian polynomials.
|
||||
for (int i = idx0 + 1; i < idx2; ++ i) {
|
||||
if (i == idx1)
|
||||
static const float x0 = (BED_X0 + X_PROBE_OFFSET_FROM_EXTRUDER);
|
||||
static const float x1 = 0.5f * float(BED_X0 + BED_Xn) + X_PROBE_OFFSET_FROM_EXTRUDER;
|
||||
static const float x2 = BED_Xn + X_PROBE_OFFSET_FROM_EXTRUDER;
|
||||
for (int j = 0; j < MESH_NUM_Y_POINTS; ++ j) {
|
||||
// Interpolate the remaining values by Largrangian polynomials.
|
||||
for (int i = 0; i < MESH_NUM_X_POINTS; ++ i) {
|
||||
if (!isnan(z_values[j][i]))
|
||||
continue;
|
||||
float x = get_x(i);
|
||||
#ifdef MBL_BILINEAR
|
||||
z_values[j][i] = (x < x1) ?
|
||||
((z_values[j][idx0] * (x - x0) + z_values[j][idx1] * (x1 - x)) / (x1 - x0)) :
|
||||
((z_values[j][idx1] * (x - x1) + z_values[j][idx2] * (x2 - x)) / (x2 - x1));
|
||||
#else
|
||||
z_values[j][i] =
|
||||
z_values[j][i] =
|
||||
z_values[j][idx0] * (x - x1) * (x - x2) / ((x0 - x1) * (x0 - x2)) +
|
||||
z_values[j][idx1] * (x - x0) * (x - x2) / ((x1 - x0) * (x1 - x2)) +
|
||||
z_values[j][idx2] * (x - x0) * (x - x1) / ((x2 - x0) * (x2 - x1));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
// Second interpolate the points in Y axis.
|
||||
static const float y0 = MESH_MIN_Y;
|
||||
static const float y1 = 0.5f * float(MESH_MIN_Y + MESH_MAX_Y);
|
||||
static const float y2 = MESH_MAX_Y;
|
||||
static const float y0 = (BED_Y0 + Y_PROBE_OFFSET_FROM_EXTRUDER);
|
||||
static const float y1 = 0.5f * float(BED_Y0 + BED_Yn) + Y_PROBE_OFFSET_FROM_EXTRUDER;
|
||||
static const float y2 = BED_Yn + Y_PROBE_OFFSET_FROM_EXTRUDER;
|
||||
for (int i = 0; i < MESH_NUM_X_POINTS; ++ i) {
|
||||
// 1) Copy the intermediate points to their new destination.
|
||||
z_values[idx2][i] = z_values[2][i];
|
||||
z_values[idx1][i] = z_values[1][i];
|
||||
// 2) Interpolate the remaining values by Largrangian polynomials.
|
||||
// Interpolate the remaining values by Largrangian polynomials.
|
||||
for (int j = 1; j + 1 < MESH_NUM_Y_POINTS; ++ j) {
|
||||
if (j == idx1)
|
||||
if (!isnan(z_values[j][i]))
|
||||
continue;
|
||||
float y = get_y(j);
|
||||
#ifdef MBL_BILINEAR
|
||||
z_values[j][i] = (y < y1) ?
|
||||
((z_values[idx0][i] * (y - y0) + z_values[idx1][i] * (y1 - y)) / (y1 - y0)) :
|
||||
((z_values[idx1][i] * (y - y1) + z_values[idx2][i] * (y2 - y)) / (y2 - y1));
|
||||
#else
|
||||
z_values[j][i] =
|
||||
z_values[j][i] =
|
||||
z_values[idx0][i] * (y - y1) * (y - y2) / ((y0 - y1) * (y0 - y2)) +
|
||||
z_values[idx1][i] * (y - y0) * (y - y2) / ((y1 - y0) * (y1 - y2)) +
|
||||
z_values[idx2][i] * (y - y0) * (y - y1) / ((y2 - y0) * (y2 - y1));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// Relax the non-measured points.
|
||||
const float weight = 0.2f;
|
||||
for (uint8_t iter = 0; iter < 20; ++ iter) {
|
||||
for (int8_t j = 1; j < 6; ++ j) {
|
||||
for (int8_t i = 1; i < 6; ++ i) {
|
||||
if (i == 3 || j == 3)
|
||||
continue;
|
||||
if ((i % 3) == 0 && (j % 3) == 0)
|
||||
continue;
|
||||
float avg = 0.25f * (z_values[j][i-1]+z_values[j][i+1]+z_values[j-1][i]+z_values[j+1][i]);
|
||||
z_values[j][i] = (1.f-weight)*z_values[j][i] + weight*avg;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
void mesh_bed_leveling::print() {
|
||||
SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
|
||||
SERIAL_PROTOCOLLNPGM("Z search height: " STRINGIFY(MESH_HOME_Z_SEARCH));
|
||||
SERIAL_PROTOCOLLNPGM("Measured points:");
|
||||
for (uint8_t y = MESH_NUM_Y_POINTS; y-- > 0;) {
|
||||
for (uint8_t x = 0; x < MESH_NUM_X_POINTS; x++) {
|
||||
SERIAL_PROTOCOLPGM(" ");
|
||||
SERIAL_PROTOCOL_F(z_values[y][x], 5);
|
||||
}
|
||||
SERIAL_PROTOCOLLN();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MESH_BED_LEVELING
|
||||
|
|
|
|||
|
|
@ -1,118 +1,23 @@
|
|||
#include "Marlin.h"
|
||||
#include "mesh_bed_calibration.h"
|
||||
|
||||
#ifdef MESH_BED_LEVELING
|
||||
|
||||
#define MEAS_NUM_X_DIST (float(MESH_MAX_X - MESH_MIN_X)/float(MESH_MEAS_NUM_X_POINTS - 1))
|
||||
#define MEAS_NUM_Y_DIST (float(MESH_MAX_Y - MESH_MIN_Y)/float(MESH_MEAS_NUM_Y_POINTS - 1))
|
||||
|
||||
#define MESH_X_DIST (float(MESH_MAX_X - MESH_MIN_X)/float(MESH_NUM_X_POINTS - 1))
|
||||
#define MESH_Y_DIST (float(MESH_MAX_Y - MESH_MIN_Y)/float(MESH_NUM_Y_POINTS - 1))
|
||||
|
||||
class mesh_bed_leveling {
|
||||
public:
|
||||
uint8_t active;
|
||||
float z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS];
|
||||
|
||||
mesh_bed_leveling();
|
||||
|
||||
|
||||
mesh_bed_leveling() { reset(); }
|
||||
|
||||
void reset();
|
||||
|
||||
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
||||
void upsample_3x3();
|
||||
#endif
|
||||
|
||||
static float get_x(int i) { return float(MESH_MIN_X) + float(MESH_X_DIST) * float(i); }
|
||||
static float get_y(int i) { return float(MESH_MIN_Y) + float(MESH_Y_DIST) * float(i); }
|
||||
|
||||
|
||||
static float get_x(int i) { return BED_X(i) + X_PROBE_OFFSET_FROM_EXTRUDER; }
|
||||
static float get_y(int i) { return BED_Y(i) + Y_PROBE_OFFSET_FROM_EXTRUDER; }
|
||||
float get_z(float x, float y);
|
||||
void set_z(uint8_t ix, uint8_t iy, float z) { z_values[iy][ix] = z; }
|
||||
|
||||
int select_x_index(float x) {
|
||||
int i = 1;
|
||||
while (x > get_x(i) && i < MESH_NUM_X_POINTS - 1) i++;
|
||||
return i - 1;
|
||||
}
|
||||
|
||||
int select_y_index(float y) {
|
||||
int i = 1;
|
||||
while (y > get_y(i) && i < MESH_NUM_Y_POINTS - 1) i++;
|
||||
return i - 1;
|
||||
}
|
||||
|
||||
float get_z(float x, float y) {
|
||||
int i, j;
|
||||
float s, t;
|
||||
|
||||
#if MESH_NUM_X_POINTS==3 && MESH_NUM_Y_POINTS==3
|
||||
#define MESH_MID_X (0.5f*(MESH_MIN_X+MESH_MAX_X))
|
||||
#define MESH_MID_Y (0.5f*(MESH_MIN_Y+MESH_MAX_Y))
|
||||
if (x < MESH_MID_X) {
|
||||
i = 0;
|
||||
s = (x - MESH_MIN_X) / MESH_X_DIST;
|
||||
if (s > 1.f)
|
||||
s = 1.f;
|
||||
} else {
|
||||
i = 1;
|
||||
s = (x - MESH_MID_X) / MESH_X_DIST;
|
||||
if (s < 0)
|
||||
s = 0;
|
||||
}
|
||||
if (y < MESH_MID_Y) {
|
||||
j = 0;
|
||||
t = (y - MESH_MIN_Y) / MESH_Y_DIST;
|
||||
if (t > 1.f)
|
||||
t = 1.f;
|
||||
} else {
|
||||
j = 1;
|
||||
t = (y - MESH_MID_Y) / MESH_Y_DIST;
|
||||
if (t < 0)
|
||||
t = 0;
|
||||
}
|
||||
#else
|
||||
i = int(floor((x - MESH_MIN_X) / MESH_X_DIST));
|
||||
if (i < 0) {
|
||||
i = 0;
|
||||
s = (x - MESH_MIN_X) / MESH_X_DIST;
|
||||
if (s > 1.f)
|
||||
s = 1.f;
|
||||
}
|
||||
else if (i > MESH_NUM_X_POINTS - 2) {
|
||||
i = MESH_NUM_X_POINTS - 2;
|
||||
s = (x - get_x(i)) / MESH_X_DIST;
|
||||
if (s < 0)
|
||||
s = 0;
|
||||
} else {
|
||||
s = (x - get_x(i)) / MESH_X_DIST;
|
||||
if (s < 0)
|
||||
s = 0;
|
||||
else if (s > 1.f)
|
||||
s = 1.f;
|
||||
}
|
||||
j = int(floor((y - MESH_MIN_Y) / MESH_Y_DIST));
|
||||
if (j < 0) {
|
||||
j = 0;
|
||||
t = (y - MESH_MIN_Y) / MESH_Y_DIST;
|
||||
if (t > 1.f)
|
||||
t = 1.f;
|
||||
} else if (j > MESH_NUM_Y_POINTS - 2) {
|
||||
j = MESH_NUM_Y_POINTS - 2;
|
||||
t = (y - get_y(j)) / MESH_Y_DIST;
|
||||
if (t < 0)
|
||||
t = 0;
|
||||
} else {
|
||||
t = (y - get_y(j)) / MESH_Y_DIST;
|
||||
if (t < 0)
|
||||
t = 0;
|
||||
else if (t > 1.f)
|
||||
t = 1.f;
|
||||
}
|
||||
#endif /* MESH_NUM_X_POINTS==3 && MESH_NUM_Y_POINTS==3 */
|
||||
|
||||
float si = 1.f-s;
|
||||
float z0 = si * z_values[j ][i] + s * z_values[j ][i+1];
|
||||
float z1 = si * z_values[j+1][i] + s * z_values[j+1][i+1];
|
||||
return (1.f-t) * z0 + t * z1;
|
||||
}
|
||||
|
||||
void upsample_3x3();
|
||||
void print();
|
||||
};
|
||||
|
||||
extern mesh_bed_leveling mbl;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
//this is because we need CUSTOM_MENDEL_NAME
|
||||
#include "Configuration_var.h"
|
||||
|
||||
// For the custom characters
|
||||
#include "lcd.h"
|
||||
|
||||
//internationalized messages
|
||||
const char MSG_ALWAYS[] PROGMEM_I1 = ISTR("Always"); ////MSG_ALWAYS c=6
|
||||
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////MSG_AUTO_HOME c=18
|
||||
|
|
@ -15,7 +18,8 @@ const char MSG_BED_HEATING[] PROGMEM_I1 = ISTR("Bed Heating"); ////MSG_BED_HEATI
|
|||
const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for reset."); ////MSG_BED_LEVELING_FAILED_POINT_LOW c=20 r=6
|
||||
const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[] PROGMEM_I1 = ISTR("XYZ calibration failed. Please consult the manual."); ////MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED c=20 r=8
|
||||
const char MSG_BELT_STATUS[] PROGMEM_I1 = ISTR("Belt status");////MSG_BELT_STATUS c=18
|
||||
const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////MSG_CANCEL c=10
|
||||
const char MSG_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_EJECT c=9
|
||||
const char MSG_CANCEL[] PROGMEM_I1 = ISTR("Cancel");////MSG_CANCEL c=9
|
||||
const char MSG_CALIBRATE_Z_AUTO[] PROGMEM_I1 = ISTR("Calibrating Z"); ////MSG_CALIBRATE_Z_AUTO c=20 r=2
|
||||
const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////MSG_CARD_MENU c=18
|
||||
const char MSG_CHECKING_X[] PROGMEM_I1 = ISTR("Checking X axis"); ////MSG_CHECKING_X c=20
|
||||
|
|
@ -26,11 +30,11 @@ const char MSG_COOLDOWN[] PROGMEM_I1 = ISTR("Cooldown"); ////MSG_COOLDOWN c=18
|
|||
const char MSG_CRASH[] PROGMEM_I1 = ISTR("Crash"); ////MSG_CRASH c=7
|
||||
const char MSG_CRASH_DETECTED[] PROGMEM_I1 = ISTR("Crash detected."); ////MSG_CRASH_DETECTED c=20
|
||||
const char MSG_CRASHDETECT[] PROGMEM_I1 = ISTR("Crash det."); ////MSG_CRASHDETECT c=13
|
||||
const char MSG_DONE[] PROGMEM_I1 = ISTR("Done"); ////MSG_DONE c=8
|
||||
const char MSG_ERROR[] PROGMEM_I1 = ISTR("ERROR:"); ////MSG_ERROR c=10
|
||||
const char MSG_EXTRUDER[] PROGMEM_I1 = ISTR("Extruder"); ////MSG_EXTRUDER c=17
|
||||
const char MSG_FANS_CHECK[] PROGMEM_I1 = ISTR("Fans check"); ////MSG_FANS_CHECK c=13
|
||||
const char MSG_FIL_RUNOUTS[] PROGMEM_I1 = ISTR("Fil. runouts"); ////MSG_FIL_RUNOUTS c=15
|
||||
const char MSG_FILAMENT[] PROGMEM_I1 = ISTR("Filament"); ////MSG_FILAMENT c=17
|
||||
const char MSG_FAN_SPEED[] PROGMEM_I1 = ISTR("Fan speed"); ////MSG_FAN_SPEED c=14
|
||||
const char MSG_HOTEND_FAN_SPEED[] PROGMEM_I1 = ISTR("Hotend fan:");////MSG_HOTEND_FAN_SPEED c=15
|
||||
const char MSG_PRINT_FAN_SPEED[] PROGMEM_I1 = ISTR("Print fan:"); ////MSG_PRINT_FAN_SPEED c=15
|
||||
|
|
@ -72,6 +76,7 @@ const char MSG_NO[] PROGMEM_I1 = ISTR("No"); ////MSG_NO c=4
|
|||
const char MSG_NOZZLE[] PROGMEM_I1 = ISTR("Nozzle"); ////MSG_NOZZLE c=10
|
||||
const char MSG_PAPER[] PROGMEM_I1 = ISTR("Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."); ////MSG_PAPER c=20 r=8
|
||||
const char MSG_PAUSE_PRINT[] PROGMEM_I1 = ISTR("Pause print");////MSG_PAUSE_PRINT c=18
|
||||
const char MSG_PRINT_PAUSED[] PROGMEM_I1 = ISTR("Print paused");////MSG_PRINT_PAUSED c=20
|
||||
const char MSG_PLACE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please place steel sheet on heatbed."); ////MSG_PLACE_STEEL_SHEET c=20 r=4
|
||||
const char MSG_PLEASE_WAIT[] PROGMEM_I1 = ISTR("Please wait"); ////MSG_PLEASE_WAIT c=20
|
||||
const char MSG_POWER_FAILURES[] PROGMEM_I1 = ISTR("Power failures"); ////MSG_POWER_FAILURES c=15
|
||||
|
|
@ -80,7 +85,7 @@ const char MSG_PRESS_TO_UNLOAD[] PROGMEM_I1 = ISTR("Please press the knob to unl
|
|||
const char MSG_PRINT_ABORTED[] PROGMEM_I1 = ISTR("Print aborted"); ////MSG_PRINT_ABORTED c=20
|
||||
const char MSG_PULL_OUT_FILAMENT[] PROGMEM_I1 = ISTR("Please pull out filament immediately"); ////MSG_PULL_OUT_FILAMENT c=20 r=4
|
||||
const char MSG_RECOVER_PRINT[] PROGMEM_I1 = ISTR("Blackout occurred. Recover print?"); ////MSG_RECOVER_PRINT c=20 r=3
|
||||
const char MSG_REFRESH[] PROGMEM_I1 = ISTR("\x04Refresh"); ////MSG_REFRESH c=18
|
||||
const char MSG_REFRESH[] PROGMEM_I1 = ISTR(LCD_STR_REFRESH "Refresh"); ////MSG_REFRESH c=18
|
||||
const char MSG_REMOVE_STEEL_SHEET[] PROGMEM_I1 = ISTR("Please remove steel sheet from heatbed."); ////MSG_REMOVE_STEEL_SHEET c=20 r=4
|
||||
const char MSG_RESET[] PROGMEM_I1 = ISTR("Reset"); ////MSG_RESET c=14
|
||||
const char MSG_RESUME_PRINT[] PROGMEM_I1 = ISTR("Resume print"); ////MSG_RESUME_PRINT c=18
|
||||
|
|
@ -97,12 +102,22 @@ const char MSG_SELFTEST_MOTOR[] PROGMEM_I1 = ISTR("Motor"); ////MSG_SELFTEST_MOT
|
|||
const char MSG_SELFTEST_FILAMENT_SENSOR[] PROGMEM_I1 = ISTR("Filament sensor"); ////MSG_SELFTEST_FILAMENT_SENSOR c=17
|
||||
const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////MSG_SELFTEST_WIRINGERROR c=18
|
||||
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////MSG_SETTINGS c=18
|
||||
#ifndef REPLACE_SETREADY
|
||||
const char MSG_SET_READY[] PROGMEM_I1 = ISTR("Set Ready"); ////MSG_SET_READY c=18
|
||||
const char MSG_SET_NOT_READY[] PROGMEM_I1 = ISTR("Set not Ready"); ////MSG_SET_NOT_READY c=18
|
||||
#else
|
||||
const char MSG_HOSTPRINT[] PROGMEM_I1 = ISTR("Print from host"); ////MSG_HOSTPRINT c=18
|
||||
#endif //REPLACE_SETREADY
|
||||
#ifdef HOST_SHUTDOWN
|
||||
const char MSG_SHUTDOWN_HOST[] PROGMEM_I1 = ISTR("Shutdown host"); ////MSG_SHUTDOWN_HOST c=18
|
||||
#endif //HOST_SHUTOWN
|
||||
const char MSG_SELECT_LANGUAGE[] PROGMEM_I1 = ISTR("Select language"); ////MSG_SELECT_LANGUAGE c=18
|
||||
const char MSG_SORTING_FILES[] PROGMEM_I1 = ISTR("Sorting files"); ////MSG_SORTING_FILES c=20
|
||||
const char MSG_TOTAL[] PROGMEM_I1 = ISTR("Total"); ////MSG_TOTAL c=6
|
||||
const char MSG_MATERIAL_CHANGES[] PROGMEM_I1 = ISTR("Material changes"); ////MSG_MATERIAL_CHANGES c=18
|
||||
const char MSG_TOTAL_FAILURES[] PROGMEM_I1 = ISTR("Total failures"); ////MSG_TOTAL_FAILURES c=20
|
||||
const char MSG_HW_SETUP[] PROGMEM_I1 = ISTR("HW Setup"); ////MSG_HW_SETUP c=18
|
||||
const char MSG_TUNE[] PROGMEM_I1 =ISTR("Tune"); ////MSG_TUNE c=8
|
||||
const char MSG_MODE[] PROGMEM_I1 = ISTR("Mode"); ////MSG_MODE c=6
|
||||
const char MSG_HIGH_POWER[] PROGMEM_I1 = ISTR("High power"); ////MSG_HIGH_POWER c=10
|
||||
const char MSG_AUTO_POWER[] PROGMEM_I1 = ISTR("Auto power"); ////MSG_AUTO_POWER c=10
|
||||
|
|
@ -110,11 +125,12 @@ const char MSG_SILENT[] PROGMEM_I1 = ISTR("Silent"); ////MSG_SILENT c=7
|
|||
const char MSG_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////MSG_NORMAL c=7
|
||||
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////MSG_STEALTH c=7
|
||||
const char MSG_STEEL_SHEET_CHECK[] PROGMEM_I1 = ISTR("Is steel sheet on heatbed?"); ////MSG_STEEL_SHEET_CHECK c=20 r=3
|
||||
const char MSG_Z_CALIBRATION_PROMPT[] PROGMEM_I1 = ISTR("Z calibration recommended. Run it now?"); ////MSG_Z_CALIBRATION_PROMPT c=20 r=3
|
||||
const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); ////MSG_STOP_PRINT c=18
|
||||
const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED."); ////MSG_STOPPED c=20
|
||||
const char MSG_PINDA_CALIBRATION[] PROGMEM_I1 = ISTR("PINDA cal."); ////MSG_PINDA_CALIBRATION c=13
|
||||
const char MSG_PINDA_CALIBRATION_DONE[] PROGMEM_I1 = ISTR("PINDA calibration is finished and active. It can be disabled in menu Settings->PINDA cal."); ////MSG_PINDA_CALIBRATION_DONE c=20 r=8
|
||||
const char MSG_UNLOAD_FILAMENT[] PROGMEM_I1 = ISTR("Unload filament"); ////MSG_UNLOAD_FILAMENT c=16
|
||||
const char MSG_UNLOAD_FILAMENT[] PROGMEM_I1 = ISTR("Unload filament"); ////MSG_UNLOAD_FILAMENT c=18
|
||||
const char MSG_UNLOADING_FILAMENT[] PROGMEM_I1 = ISTR("Unloading filament"); ////MSG_UNLOADING_FILAMENT c=20
|
||||
const char MSG_INFO_SCREEN[] PROGMEM_I1 = ISTR("Info screen"); ////MSG_INFO_SCREEN c=18
|
||||
const char MSG_WIZARD_CALIBRATION_FAILED[] PROGMEM_I1 = ISTR("Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."); ////MSG_WIZARD_CALIBRATION_FAILED c=20 r=8
|
||||
|
|
@ -133,14 +149,15 @@ const char MSG_NONE[] PROGMEM_I1 = ISTR("None"); ////MSG_NONE c=8
|
|||
const char MSG_WARN[] PROGMEM_I1 = ISTR("Warn"); ////MSG_WARN c=8
|
||||
const char MSG_STRICT[] PROGMEM_I1 = ISTR("Strict"); ////MSG_STRICT c=8
|
||||
const char MSG_MODEL[] PROGMEM_I1 = ISTR("Model"); ////MSG_MODEL c=8
|
||||
const char MSG_GCODE_DIFF_PRINTER_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different printer type. Continue?"); ////MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again. Print cancelled."); ////MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
|
||||
const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Continue?"); ////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Please update the firmware. Print cancelled."); ////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
|
||||
const char MSG_GCODE_DIFF_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Continue?"); ////MSG_GCODE_DIFF_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_DIFF_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Please re-slice the model again. Print cancelled."); ////MSG_GCODE_DIFF_CANCELLED c=20 r=8
|
||||
const char MSG_NOZZLE_DIFFERS_CONTINUE[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Continue?"); ////MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=3
|
||||
const char MSG_NOZZLE_DIFFERS_CANCELLED[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Please check the value in settings. Print cancelled."); ////MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=8
|
||||
const char MSG_GCODE_DIFF_PRINTER_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different printer type."); ////MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again."); ////MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
|
||||
const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware."); ////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Please update the firmware."); ////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
|
||||
const char MSG_GCODE_DIFF_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different level."); ////MSG_GCODE_DIFF_CONTINUE c=20 r=3
|
||||
const char MSG_GCODE_DIFF_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Please re-slice the model again."); ////MSG_GCODE_DIFF_CANCELLED c=20 r=8
|
||||
const char MSG_MISSING_FILAMENT[] PROGMEM_I1 = ISTR("There is no filament loaded."); ////MSG_MISSING_FILAMENT c=20 r=3
|
||||
const char MSG_NOZZLE_DIFFERS_CONTINUE[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code."); ////MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=3
|
||||
const char MSG_NOZZLE_DIFFERS_CANCELLED[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Please check the value in settings."); ////MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=8
|
||||
const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////MSG_NOZZLE_DIAMETER c=10
|
||||
const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////MSG_MMU_MODE c=8
|
||||
const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////MSG_SD_CARD c=8
|
||||
|
|
@ -173,7 +190,7 @@ const char MSG_IR_03_OR_OLDER[] PROGMEM_I1 = ISTR(" 0.3 or older");////MSG_IR_03
|
|||
const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////MSG_IR_UNKNOWN c=18
|
||||
#endif
|
||||
extern const char MSG_PAUSED_THERMAL_ERROR[] PROGMEM_I1 = ISTR("PAUSED THERMAL ERROR");////MSG_PAUSED_THERMAL_ERROR c=20
|
||||
#ifdef TEMP_MODEL
|
||||
#ifdef THERMAL_MODEL
|
||||
extern const char MSG_THERMAL_ANOMALY[] PROGMEM_I1 = ISTR("THERMAL ANOMALY");////MSG_THERMAL_ANOMALY c=20
|
||||
extern const char MSG_TM_NOT_CAL[] PROGMEM_I1 = ISTR("Thermal model not calibrated yet.");////MSG_TM_NOT_CAL c=20 r=4
|
||||
extern const char MSG_TM_ACK_ERROR[] PROGMEM_I1 = ISTR("Clear TM error");////MSG_TM_ACK_ERROR c=18
|
||||
|
|
@ -181,34 +198,203 @@ extern const char MSG_TM_ACK_ERROR[] PROGMEM_I1 = ISTR("Clear TM error");////MSG
|
|||
extern const char MSG_LOAD_ALL[] PROGMEM_I1 = ISTR("Load All"); ////MSG_LOAD_ALL c=18
|
||||
extern const char MSG_NOZZLE_CNG_MENU [] PROGMEM_I1 = ISTR("Nozzle change");////MSG_NOZZLE_CNG_MENU c=18
|
||||
extern const char MSG_NOZZLE_CNG_READ_HELP [] PROGMEM_I1 = ISTR("For a Nozzle change please read\nprusa.io/nozzle-mk3s");////MSG_NOZZLE_CNG_READ_HELP c=20 r=4
|
||||
#ifdef QUICK_NOZZLE_CHANGE
|
||||
extern const char MSG_NOZZLE_CNG_COOLDOWN [] PROGMEM_I1 = ISTR("Nozzle is hot! Wait for cooldown.");////MSG_NOZZLE_CNG_COOLDOWN c=20 r=3
|
||||
extern const char MSG_NOZZLE_CNG_CHANGED [] PROGMEM_I1 = ISTR("Nozzle changed?");////MSG_NOZZLE_CNG_CHANGED_QUICK c=20 r=3
|
||||
#else
|
||||
extern const char MSG_NOZZLE_CNG_CHANGED [] PROGMEM_I1 = ISTR("Hotend at 280C! Nozzle changed and tightened to specs?");////MSG_NOZZLE_CNG_CHANGED c=20 r=6
|
||||
|
||||
#endif //QUICK_NOZZLE_CHANGE
|
||||
extern const char MSG_REPRINT [] PROGMEM_I1 = ISTR("Reprint"); ////MSG_REPRINT c=18
|
||||
extern const char MSG_FILE_CNT [] PROGMEM_I1 = ISTR("Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."); ////MSG_FILE_CNT c=20 r=6
|
||||
extern const char MSG_CHANGED_MOTHERBOARD [] PROGMEM_I1 = ISTR("Warning: motherboard type changed."); ////MSG_CHANGED_MOTHERBOARD c=20 r=4
|
||||
extern const char MSG_CHANGED_PRINTER [] PROGMEM_I1 = ISTR("Warning: printer type changed."); ////MSG_CHANGED_PRINTER c=20 r=4
|
||||
extern const char MSG_CHANGED_BOTH [] PROGMEM_I1 = ISTR("Warning: both printer type and motherboard type changed."); ////MSG_CHANGED_BOTH c=20 r=4
|
||||
extern const char MSG_DEFAULT_SETTINGS_LOADED [] PROGMEM_I1 = ISTR("Old settings found. Default PID, Esteps etc. will be set."); ////MSG_DEFAULT_SETTINGS_LOADED c=20 r=6
|
||||
extern const char MSG_FORCE_SELFTEST [] PROGMEM_I1 = ISTR("Selftest will be run to calibrate accurate sensorless rehoming."); ////MSG_FORCE_SELFTEST c=20 r=8
|
||||
extern const char MSG_MBL_FAILED [] PROGMEM_I1 = ISTR("Mesh bed leveling failed. Print canceled."); ////MSG_MBL_FAILED c=20 r=4
|
||||
extern const char MSG_ZLEVELING_ENFORCED [] PROGMEM_I1 = ISTR("Some problem encountered, Z-leveling enforced ..."); ////MSG_ZLEVELING_ENFORCED c=20 r=4
|
||||
extern const char MSG_UNLOAD_SUCCESSFUL [] PROGMEM_I1 = ISTR("Was filament unload successful?"); ////MSG_UNLOAD_SUCCESSFUL c=20 r=3
|
||||
extern const char MSG_CHECK_IDLER [] PROGMEM_I1 = ISTR("Please open idler and remove filament manually."); ////MSG_CHECK_IDLER c=20 r=4
|
||||
extern const char MSG_RUN_XYZ [] PROGMEM_I1 = ISTR("Please run XYZ calibration first."); ////MSG_RUN_XYZ c=20 r=4
|
||||
extern const char MSG_TEMP_CAL_WARNING [] PROGMEM_I1 = ISTR("Stable ambient temperature 21-26C is needed a rigid stand is required."); ////MSG_TEMP_CAL_WARNING c=20 r=4
|
||||
extern const char MSG_USERWAIT [] PROGMEM_I1 = ISTR("Wait for user..."); ////MSG_USERWAIT c=20
|
||||
extern const char MSG_NO_MOVE [] PROGMEM_I1 = ISTR("No move."); ////MSG_NO_MOVE c=20
|
||||
extern const char MSG_BED_HEATING_SAFETY_DISABLED [] PROGMEM_I1 = ISTR("Heating disabled by safety timer."); ////MSG_BED_HEATING_SAFETY_DISABLED c=20 r=4
|
||||
extern const char MSG_PRESS_TO_PREHEAT [] PROGMEM_I1 = ISTR("Press the knob to preheat nozzle and continue."); ////MSG_PRESS_TO_PREHEAT c=20 r=4
|
||||
extern const char MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 [] PROGMEM_I1 = ISTR("Improving bed calibration point"); ////MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 c=20 r=4
|
||||
extern const char MSG_MMU_RESTORE_TEMP [] PROGMEM_I1 = ISTR("MMU Retry: Restoring temperature..."); ////MSG_MMU_RESTORE_TEMP c=20 r=4
|
||||
extern const char MSG_MMU_SENSITIVITY [] PROGMEM_I1 = ISTR("Sensitivity"); ////MSG_MMU_SENSITIVITY c=18
|
||||
extern const char MSG_RECOVERING_PRINT [] PROGMEM_I1 = ISTR("Recovering print"); ////MSG_RECOVERING_PRINT c=20
|
||||
extern const char MSG_HOMEYZ_DONE [] PROGMEM_I1 = ISTR("Calibration done"); ////MSG_HOMEYZ_DONE c=20
|
||||
extern const char MSG_PINDA_PREHEAT [] PROGMEM_I1 = ISTR("PINDA Heating"); ////MSG_PINDA_PREHEAT c=20
|
||||
extern const char MSG_PID_RUNNING [] PROGMEM_I1 = ISTR("PID cal."); ////MSG_PID_RUNNING c=20
|
||||
extern const char MSG_PID_FINISHED [] PROGMEM_I1 = ISTR("PID cal. finished"); ////MSG_PID_FINISHED c=20
|
||||
extern const char MSG_AMBIENT [] PROGMEM_I1 = ISTR("Ambient"); ////MSG_AMBIENT c=14
|
||||
extern const char MSG_DATE [] PROGMEM_I1 = ISTR("Date:"); ////MSG_DATE c=17
|
||||
extern const char MSG_MMU_CONNECTED [] PROGMEM_I1 = ISTR("MMU connected"); ////MSG_MMU_CONNECTED c=18
|
||||
extern const char MSG_UNKNOWN [] PROGMEM_I1 = ISTR("unknown"); ////MSG_UNKNOWN c=13
|
||||
extern const char MSG_PRINTER_IP [] PROGMEM_I1 = ISTR("Printer IP Addr:"); ////MSG_PRINTER_IP c=18
|
||||
extern const char MSG_XYZ_DETAILS [] PROGMEM_I1 = ISTR("XYZ cal. details"); ////MSG_XYZ_DETAILS c=18
|
||||
extern const char MSG_INFO_EXTRUDER [] PROGMEM_I1 = ISTR("Extruder info"); ////MSG_INFO_EXTRUDER c=18
|
||||
extern const char MSG_INFO_SENSORS [] PROGMEM_I1 = ISTR("Sensor info"); ////MSG_INFO_SENSORS c=18
|
||||
extern const char MSG_MENU_TEMPERATURES [] PROGMEM_I1 = ISTR("Temperatures"); ////MSG_MENU_TEMPERATURES c=18
|
||||
extern const char MSG_MENU_VOLTAGES [] PROGMEM_I1 = ISTR("Voltages"); ////MSG_MENU_VOLTAGES c=18
|
||||
extern const char MSG_PRESS_KNOB [] PROGMEM_I1 = ISTR("Press the knob"); ////MSG_PRESS_KNOB c=20
|
||||
extern const char MSG_TO_LOAD_FIL [] PROGMEM_I1 = ISTR("to load filament"); ////MSG_TO_LOAD_FIL c=20
|
||||
extern const char MSG_TO_UNLOAD_FIL [] PROGMEM_I1 = ISTR("to unload filament"); ////MSG_TO_UNLOAD_FIL c=20
|
||||
extern const char MSG_PREHEATING_TO_LOAD [] PROGMEM_I1 = ISTR("Preheating to load"); ////MSG_PREHEATING_TO_LOAD c=20
|
||||
extern const char MSG_PREHEATING_TO_UNLOAD [] PROGMEM_I1 = ISTR("Preheating to unload"); ////MSG_PREHEATING_TO_UNLOAD c=20
|
||||
extern const char MSG_PREHEATING_TO_EJECT [] PROGMEM_I1 = ISTR("Preheating to eject"); ////MSG_PREHEATING_TO_EJECT c=20
|
||||
extern const char MSG_PREHEATING_TO_CUT [] PROGMEM_I1 = ISTR("Preheating to cut"); ////MSG_PREHEATING_TO_CUT c=20
|
||||
extern const char MSG_INSERT_FILAMENT [] PROGMEM_I1 = ISTR("Insert filament"); ////MSG_INSERT_FILAMENT c=20
|
||||
extern const char MSG_PRESS [] PROGMEM_I1 = ISTR("and press the knob"); ////MSG_PRESS c=20 r=2
|
||||
extern const char MSG_CHANGE_SUCCESS [] PROGMEM_I1 = ISTR("Change success!"); ////MSG_CHANGE_SUCCESS c=20
|
||||
extern const char MSG_LOADING_COLOR [] PROGMEM_I1 = ISTR("Loading color"); ////MSG_LOADING_COLOR c=20
|
||||
extern const char MSG_CORRECTLY [] PROGMEM_I1 = ISTR("Changed correctly"); ////MSG_CORRECTLY c=19
|
||||
extern const char MSG_NOT_LOADED [] PROGMEM_I1 = ISTR("Filament not loaded"); ////MSG_NOT_LOADED c=19
|
||||
extern const char MSG_NOT_COLOR [] PROGMEM_I1 = ISTR("Color not correct"); ////MSG_NOT_COLOR c=19
|
||||
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||
extern const char MSG_AUTOLOADING_ENABLED [] PROGMEM_I1 = ISTR("Autoloading filament is active, just press the knob and insert filament..."); ////MSG_AUTOLOADING_ENABLED c=20 r=4
|
||||
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||
extern const char MSG_FILAMENT_USED [] PROGMEM_I1 = ISTR("Filament used"); ////MSG_FILAMENT_USED c=19
|
||||
extern const char MSG_PRINT_TIME [] PROGMEM_I1 = ISTR("Print time"); ////MSG_PRINT_TIME c=19
|
||||
extern const char MSG_TOTAL_FILAMENT [] PROGMEM_I1 = ISTR("Total filament"); ////MSG_TOTAL_FILAMENT c=19
|
||||
extern const char MSG_TOTAL_PRINT_TIME [] PROGMEM_I1 = ISTR("Total print time"); ////MSG_TOTAL_PRINT_TIME c=19
|
||||
extern const char MSG_Y_DIST_FROM_MIN [] PROGMEM_I1 = ISTR("Y distance from min"); ////MSG_Y_DIST_FROM_MIN c=20
|
||||
extern const char MSG_LEFT [] PROGMEM_I1 = ISTR("Left"); ////MSG_LEFT c=10
|
||||
extern const char MSG_RIGHT [] PROGMEM_I1 = ISTR("Right"); ////MSG_RIGHT c=10
|
||||
extern const char MSG_MEASURED_SKEW [] PROGMEM_I1 = ISTR("Measured skew"); ////MSG_MEASURED_SKEW c=14
|
||||
extern const char MSG_SLIGHT_SKEW [] PROGMEM_I1 = ISTR("Slight skew"); ////MSG_SLIGHT_SKEW c=14
|
||||
extern const char MSG_SEVERE_SKEW [] PROGMEM_I1 = ISTR("Severe skew"); ////MSG_SEVERE_SKEW c=14
|
||||
extern const char MSG_MEASURED_OFFSET [] PROGMEM_I1 = ISTR("[0;0] point offset"); ////MSG_MEASURED_OFFSET c=20
|
||||
extern const char MSG_BABYSTEPPING_Z [] PROGMEM_I1 = ISTR("Adjusting Z"); ////MSG_BABYSTEPPING_Z c=13
|
||||
extern const char MSG_BED_CORRECTION_LEFT [] PROGMEM_I1 = ISTR("Left side [\xe4m]"); ////MSG_BED_CORRECTION_LEFT c=14
|
||||
extern const char MSG_BED_CORRECTION_RIGHT [] PROGMEM_I1 = ISTR("Right side[\xe4m]"); ////MSG_BED_CORRECTION_RIGHT c=14
|
||||
extern const char MSG_BED_CORRECTION_FRONT [] PROGMEM_I1 = ISTR("Front side[\xe4m]"); ////MSG_BED_CORRECTION_FRONT c=14
|
||||
extern const char MSG_BED_CORRECTION_REAR [] PROGMEM_I1 = ISTR("Rear side [\xe4m]"); ////MSG_BED_CORRECTION_REAR c=14
|
||||
extern const char MSG_SET_TEMPERATURE [] PROGMEM_I1 = ISTR("Set temperature:"); ////MSG_SET_TEMPERATURE c=20
|
||||
extern const char MSG_WAITING_TEMP_PINDA [] PROGMEM_I1 = ISTR("Waiting for PINDA probe cooling"); ////MSG_WAITING_TEMP_PINDA c=20 r=3
|
||||
extern const char MSG_WAITING_TEMP [] PROGMEM_I1 = ISTR("Waiting for nozzle and bed cooling"); ////MSG_WAITING_TEMP c=20 r=4
|
||||
extern const char MSG_MOVE_CARRIAGE_TO_THE_TOP_Z [] PROGMEM_I1 = ISTR("Calibrating Z. Rotate the knob to move the Z carriage up to the end stoppers. Click when done."); ////MSG_MOVE_CARRIAGE_TO_THE_TOP_Z c=20 r=8
|
||||
extern const char MSG_MOVE_CARRIAGE_TO_THE_TOP [] PROGMEM_I1 = ISTR("Calibrating XYZ. Rotate the knob to move the Z carriage up to the end stoppers. Click when done."); ////MSG_MOVE_CARRIAGE_TO_THE_TOP c=20 r=8
|
||||
extern const char MSG_CONFIRM_CARRIAGE_AT_THE_TOP [] PROGMEM_I1 = ISTR("Are left and right Z-carriages all up?"); ////MSG_CONFIRM_CARRIAGE_AT_THE_TOP c=20 r=3
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_POINT_NOT_FOUND [] PROGMEM_I1 = ISTR("XYZ calibration failed. Bed calibration point was not found."); ////MSG_BED_SKEW_OFFSET_DETECTION_POINT_NOT_FOUND c=20 r=6
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR [] PROGMEM_I1 = ISTR("XYZ calibration failed. Front calibration points not reachable."); ////MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR c=20 r=6
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_RIGHT_FAR [] PROGMEM_I1 = ISTR("XYZ calibration failed. Right front calibration point not reachable."); ////MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_RIGHT_FAR c=20 r=6
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR [] PROGMEM_I1 = ISTR("XYZ calibration compromised. Front calibration points not reachable."); ////MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR c=20 r=8
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR [] PROGMEM_I1 = ISTR("XYZ calibration compromised. Right front calibration point not reachable."); ////MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR c=20 r=8
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_PERFECT [] PROGMEM_I1 = ISTR("XYZ calibration ok. X/Y axes are perpendicular. Congratulations!"); ////MSG_BED_SKEW_OFFSET_DETECTION_PERFECT c=20 r=8
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_SKEW_MILD [] PROGMEM_I1 = ISTR("XYZ calibration all right. X/Y axes are slightly skewed. Good job!"); ////MSG_BED_SKEW_OFFSET_DETECTION_SKEW_MILD c=20 r=8
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME [] PROGMEM_I1 = ISTR("XYZ calibration all right. Skew will be corrected automatically."); ////MSG_BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME c=20 r=8
|
||||
extern const char MSG_PINDA_CAL_FAILED [] PROGMEM_I1 = ISTR("PINDA calibration failed"); ////MSG_PINDA_CAL_FAILED c=20 r=4
|
||||
extern const char MSG_MOVE_X [] PROGMEM_I1 = ISTR("Move X"); ////MSG_MOVE_X c=18
|
||||
extern const char MSG_MOVE_Y [] PROGMEM_I1 = ISTR("Move Y"); ////MSG_MOVE_Y c=18
|
||||
extern const char MSG_MOVE_Z [] PROGMEM_I1 = ISTR("Move Z"); ////MSG_MOVE_Z c=18
|
||||
extern const char MSG_CRASH_DET_ONLY_IN_NORMAL [] PROGMEM_I1 = ISTR("Crash detection can\nbe turned on only in\nNormal mode"); ////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
|
||||
extern const char MSG_CRASH_DET_STEALTH_FORCE_OFF [] PROGMEM_I1 = ISTR("WARNING:\nCrash detection\ndisabled in\nStealth mode"); ////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
|
||||
extern const char MSG_MODE_CHANGE_IN_PROGRESS [] PROGMEM_I1 = ISTR("Mode change in progress..."); ////MSG_MODE_CHANGE_IN_PROGRESS c=20 r=3
|
||||
extern const char MSG_COPY_SEL_LANG [] PROGMEM_I1 = ISTR("Copy selected language?"); ////MSG_COPY_SEL_LANG c=20 r=3
|
||||
extern const char MSG_SHEET_OFFSET [] PROGMEM_I1 = ISTR("Sheet %.7s\nZ offset: %+1.3fmm\n%cContinue\n%cReset"); ////MSG_SHEET_OFFSET c=20 r=4
|
||||
extern const char MSG_PLEASE_LOAD_PLA [] PROGMEM_I1 = ISTR("Please load filament first."); ////MSG_PLEASE_LOAD_PLA c=20 r=4
|
||||
extern const char MSG_WIZARD_RERUN [] PROGMEM_I1 = ISTR("Running Wizard will delete current calibration results and start from the beginning."); ////MSG_WIZARD_RERUN c=20 r=7
|
||||
extern const char MSG_MMU_INSERT_FILAMENT_FIRST_TUBE [] PROGMEM_I1 = ISTR("Please insert filament into the first tube of the MMU, then press the knob to load it."); ////MSG_MMU_INSERT_FILAMENT_FIRST_TUBE c=20 r=6
|
||||
extern const char MSG_WIZARD_LOAD_FILAMENT [] PROGMEM_I1 = ISTR("Please insert filament into the extruder, then press the knob to load it."); ////MSG_WIZARD_LOAD_FILAMENT c=20 r=6
|
||||
extern const char MSG_WIZARD_V2_CAL [] PROGMEM_I1 = ISTR("Now I will calibrate distance between tip of the nozzle and heatbed surface."); ////MSG_WIZARD_V2_CAL c=20 r=8
|
||||
extern const char MSG_SELECT_FIL_1ST_LAYERCAL [] PROGMEM_I1 = ISTR("Select a filament for the First Layer Calibration and select it in the on-screen menu."); ////MSG_SELECT_FIL_1ST_LAYERCAL c=20 r=7
|
||||
extern const char MSG_SELECT_TEMP_MATCHES_MATERIAL [] PROGMEM_I1 = ISTR("Select temperature which matches your material."); ////MSG_SELECT_TEMP_MATCHES_MATERIAL c=20 r=4
|
||||
extern const char MSG_WIZARD_V2_CAL_2 [] PROGMEM_I1 = ISTR("The printer will start printing a zig-zag line. Rotate the knob until you reach the optimal height. Check the pictures in the handbook (Calibration chapter)."); ////MSG_WIZARD_V2_CAL_2 c=20 r=12
|
||||
extern const char MSG_WIZARD_SELFTEST [] PROGMEM_I1 = ISTR("First, I will run the selftest to check most common assembly problems."); ////MSG_WIZARD_SELFTEST c=20 r=8
|
||||
extern const char MSG_WIZARD_XYZ_CAL [] PROGMEM_I1 = ISTR("I will run xyz calibration now. It will take up to 24 mins."); ////MSG_WIZARD_XYZ_CAL c=20 r=8
|
||||
extern const char MSG_REMOVE_SHIPPING_HELPERS [] PROGMEM_I1 = ISTR("Please remove shipping helpers first."); ////MSG_REMOVE_SHIPPING_HELPERS c=20 r=3
|
||||
extern const char MSG_REMOVE_TEST_PRINT [] PROGMEM_I1 = ISTR("Now remove the test print from steel sheet."); ////MSG_REMOVE_TEST_PRINT c=20 r=4
|
||||
extern const char MSG_WIZARD_Z_CAL [] PROGMEM_I1 = ISTR("I will run z calibration now."); ////MSG_WIZARD_Z_CAL c=20 r=8
|
||||
extern const char MSG_WIZARD_WILL_PREHEAT [] PROGMEM_I1 = ISTR("Now I will preheat nozzle for PLA."); ////MSG_WIZARD_WILL_PREHEAT c=20 r=4
|
||||
extern const char MSG_TM_CAL [] PROGMEM_I1 = ISTR("Thermal model cal. takes approx. 12 mins. See\nprusa.io/tm-cal"); ////MSG_TM_CAL c=20 r=4
|
||||
extern const char MSG_SEL_PREHEAT_TEMP [] PROGMEM_I1 = ISTR("Select nozzle preheat temperature which matches your material."); ////MSG_SEL_PREHEAT_TEMP c=20 r=6
|
||||
extern const char MSG_WIZARD_REPEAT_V2_CAL [] PROGMEM_I1 = ISTR("Do you want to repeat last step to readjust distance between nozzle and heatbed?"); ////MSG_WIZARD_REPEAT_V2_CAL c=20 r=7
|
||||
extern const char MSG_WIZARD_CLEAN_HEATBED [] PROGMEM_I1 = ISTR("Please clean heatbed and then press the knob."); ////MSG_WIZARD_CLEAN_HEATBED c=20 r=8
|
||||
extern const char MSG_ADDITIONAL_SHEETS [] PROGMEM_I1 = ISTR("If you have additional steel sheets, calibrate their presets in Settings - HW Setup - Steel sheets."); ////MSG_ADDITIONAL_SHEETS c=20 r=8
|
||||
extern const char MSG_X_CORRECTION [] PROGMEM_I1 = ISTR("X-correct"); ////MSG_X_CORRECTION c=13
|
||||
extern const char MSG_Y_CORRECTION [] PROGMEM_I1 = ISTR("Y-correct"); ////MSG_Y_CORRECTION c=13
|
||||
extern const char MSG_Z_CORRECTION [] PROGMEM_I1 = ISTR("Z-correct"); ////MSG_Z_CORRECTION c=13
|
||||
extern const char MSG_EXTRUDER_CORRECTION [] PROGMEM_I1 = ISTR("E-correct"); ////MSG_EXTRUDER_CORRECTION c=13
|
||||
extern const char MSG_CHECKS [] PROGMEM_I1 = ISTR("Checks"); ////MSG_CHECKS c=18
|
||||
extern const char MSG_TEMPERATURE [] PROGMEM_I1 = ISTR("Temperature"); ////MSG_TEMPERATURE c=18
|
||||
extern const char MSG_MOVE_AXIS [] PROGMEM_I1 = ISTR("Move axis"); ////MSG_MOVE_AXIS c=18
|
||||
extern const char MSG_DISABLE_STEPPERS [] PROGMEM_I1 = ISTR("Disable steppers"); ////MSG_DISABLE_STEPPERS c=18
|
||||
extern const char MSG_LIN_CORRECTION [] PROGMEM_I1 = ISTR("Lin. correction"); ////MSG_LIN_CORRECTION c=18
|
||||
extern const char MSG_WIZARD [] PROGMEM_I1 = ISTR("Wizard"); ////MSG_WIZARD c=17
|
||||
extern const char MSG_BELTTEST [] PROGMEM_I1 = ISTR("Belt test"); ////MSG_BELTTEST c=18
|
||||
extern const char MSG_SELFTEST [] PROGMEM_I1 = ISTR("Selftest"); ////MSG_SELFTEST c=18
|
||||
extern const char MSG_CALIBRATE_BED [] PROGMEM_I1 = ISTR("Calibrate XYZ"); ////MSG_CALIBRATE_BED c=18
|
||||
extern const char MSG_BED_CORRECTION_MENU [] PROGMEM_I1 = ISTR("Bed level correct"); ////MSG_BED_CORRECTION_MENU c=18
|
||||
extern const char MSG_PID_EXTRUDER [] PROGMEM_I1 = ISTR("PID calibration"); ////MSG_PID_EXTRUDER c=17
|
||||
extern const char MSG_SHOW_END_STOPS [] PROGMEM_I1 = ISTR("Show end stops"); ////MSG_SHOW_END_STOPS c=18
|
||||
extern const char MSG_CALIBRATE_BED_RESET [] PROGMEM_I1 = ISTR("Reset XYZ calibr."); ////MSG_CALIBRATE_BED_RESET c=18
|
||||
extern const char MSG_SELECT [] PROGMEM_I1 = ISTR("Select"); ////MSG_SELECT c=18
|
||||
extern const char MSG_RENAME [] PROGMEM_I1 = ISTR("Rename"); ////MSG_RENAME c=18
|
||||
extern const char MSG_PREHEAT [] PROGMEM_I1 = ISTR("Preheat"); ////MSG_PREHEAT c=18
|
||||
extern const char MSG_CNG_SDCARD [] PROGMEM_I1 = ISTR("Change SD card"); ////MSG_CNG_SDCARD c=18
|
||||
extern const char MSG_NO_CARD [] PROGMEM_I1 = ISTR("No SD card"); ////MSG_NO_CARD c=18
|
||||
extern const char MSG_INIT_SDCARD [] PROGMEM_I1 = ISTR("Init. SD card"); ////MSG_INIT_SDCARD c=18
|
||||
extern const char MSG_LOAD_TO_NOZZLE [] PROGMEM_I1 = ISTR("Load to nozzle"); ////MSG_LOAD_TO_NOZZLE c=18
|
||||
extern const char MSG_AUTOLOAD_FILAMENT [] PROGMEM_I1 = ISTR("AutoLoad filament"); ////MSG_AUTOLOAD_FILAMENT c=18
|
||||
extern const char MSG_STATISTICS [] PROGMEM_I1 = ISTR("Statistics"); ////MSG_STATISTICS c=18
|
||||
extern const char MSG_FAIL_STATS [] PROGMEM_I1 = ISTR("Fail stats"); ////MSG_FAIL_STATS c=18
|
||||
extern const char MSG_MMU_FAIL_STATS [] PROGMEM_I1 = ISTR("Fail stats MMU"); ////MSG_MMU_FAIL_STATS c=18
|
||||
extern const char MSG_SUPPORT [] PROGMEM_I1 = ISTR("Support"); ////MSG_SUPPORT c=18
|
||||
extern const char MSG_SPEED [] PROGMEM_I1 = ISTR("Speed"); ////MSG_SPEED c=15
|
||||
extern const char MSG_FLOW [] PROGMEM_I1 = ISTR("Flow"); ////MSG_FLOW c=15
|
||||
extern const char MSG_INSERT_FIL [] PROGMEM_I1 = ISTR("Insert the filament (do not load it) into the extruder and then press the knob."); ////MSG_INSERT_FIL c=20 r=6
|
||||
extern const char MSG_UNLOAD_FILAMENT_REPEAT [] PROGMEM_I1 = ISTR("Please unload the filament first, then repeat this action."); ////MSG_UNLOAD_FILAMENT_REPEAT c=20 r=4
|
||||
extern const char MSG_CHECK_IR_CONNECTION [] PROGMEM_I1 = ISTR("Please check the IR sensor connection, unload filament if present."); ////MSG_CHECK_IR_CONNECTION c=20 r=4
|
||||
extern const char MSG_FS_VERIFIED [] PROGMEM_I1 = ISTR("Sensor verified, remove the filament now."); ////MSG_FS_VERIFIED c=20 r=3
|
||||
extern const char MSG_FIL_FAILED [] PROGMEM_I1 = ISTR("Verification failed, remove the filament and try again."); ////MSG_FIL_FAILED c=20 r=4
|
||||
extern const char MSG_SELFTEST_START [] PROGMEM_I1 = ISTR("Selftest start"); ////MSG_SELFTEST_START c=20
|
||||
extern const char MSG_SELFTEST_OK [] PROGMEM_I1 = ISTR("Selftest OK"); ////MSG_SELFTEST_OK c=20
|
||||
extern const char MSG_SELFTEST_ERROR [] PROGMEM_I1 = ISTR("Selftest error!"); ////MSG_SELFTEST_ERROR c=20
|
||||
extern const char MSG_SELFTEST_PLEASECHECK [] PROGMEM_I1 = ISTR("Please check:"); ////MSG_SELFTEST_PLEASECHECK c=20
|
||||
extern const char MSG_SELFTEST_HEATERTHERMISTOR [] PROGMEM_I1 = ISTR("Heater/Thermistor"); ////MSG_SELFTEST_HEATERTHERMISTOR c=20
|
||||
extern const char MSG_SELFTEST_NOTCONNECTED [] PROGMEM_I1 = ISTR("Not connected"); ////MSG_SELFTEST_NOTCONNECTED c=20
|
||||
extern const char MSG_SELFTEST_BEDHEATER [] PROGMEM_I1 = ISTR("Bed/Heater"); ////MSG_SELFTEST_BEDHEATER c=20
|
||||
extern const char MSG_SELFTEST_ENDSTOPS [] PROGMEM_I1 = ISTR("Endstops"); ////MSG_SELFTEST_ENDSTOPS c=20
|
||||
extern const char MSG_SELFTEST_ENDSTOP [] PROGMEM_I1 = ISTR("Endstop"); ////MSG_SELFTEST_ENDSTOP c=16
|
||||
extern const char MSG_SELFTEST_ENDSTOP_NOTHIT [] PROGMEM_I1 = ISTR("Endstop not hit"); ////MSG_SELFTEST_ENDSTOP_NOTHIT c=20
|
||||
extern const char MSG_LOOSE_PULLEY [] PROGMEM_I1 = ISTR("Loose pulley"); ////MSG_LOOSE_PULLEY c=20
|
||||
extern const char MSG_SELFTEST_AXIS_LENGTH [] PROGMEM_I1 = ISTR("Axis length"); ////MSG_SELFTEST_AXIS_LENGTH c=20
|
||||
extern const char MSG_SELFTEST_AXIS [] PROGMEM_I1 = ISTR("Axis"); ////MSG_SELFTEST_AXIS c=16
|
||||
extern const char MSG_SELFTEST_FANS [] PROGMEM_I1 = ISTR("Front/left fans"); ////MSG_SELFTEST_FANS c=20
|
||||
extern const char MSG_SELFTEST_SWAPPED [] PROGMEM_I1 = ISTR("Swapped"); ////MSG_SELFTEST_SWAPPED c=16
|
||||
extern const char MSG_FALSE_TRIGGERING [] PROGMEM_I1 = ISTR("False triggering"); ////MSG_FALSE_TRIGGERING c=20
|
||||
extern const char MSG_SELFTEST_FS_LEVEL [] PROGMEM_I1 = ISTR("%s level expected"); ////MSG_SELFTEST_FS_LEVEL c=20
|
||||
extern const char MSG_SELFTEST_CHECK_ENDSTOPS [] PROGMEM_I1 = ISTR("Checking endstops"); ////MSG_SELFTEST_CHECK_ENDSTOPS c=20
|
||||
extern const char MSG_SELFTEST_CHECK_Z [] PROGMEM_I1 = ISTR("Checking Z axis"); ////MSG_SELFTEST_CHECK_Z c=20
|
||||
extern const char MSG_SELFTEST_CHECK_HOTEND [] PROGMEM_I1 = ISTR("Checking hotend"); ////MSG_SELFTEST_CHECK_HOTEND c=20
|
||||
extern const char MSG_SELFTEST_CHECK_ALLCORRECT [] PROGMEM_I1 = ISTR("All correct"); ////MSG_SELFTEST_CHECK_ALLCORRECT c=20
|
||||
extern const char MSG_CALIBRATING_HOME [] PROGMEM_I1 = ISTR("Calibrating home"); ////MSG_CALIBRATING_HOME c=20
|
||||
extern const char MSG_CHECKING_FILE [] PROGMEM_I1 = ISTR("Checking file"); ////MSG_CHECKING_FILE c=17
|
||||
extern const char MSG_FILE_INCOMPLETE [] PROGMEM_I1 = ISTR("File incomplete."); ////MSG_FILE_INCOMPLETE c=20 r=3
|
||||
extern const char MSG_SD_REMOVED [] PROGMEM_I1 = ISTR("Card removed"); ////MSG_SD_REMOVED c=20
|
||||
extern const char MSG_NEW_FIRMWARE_AVAILABLE [] PROGMEM_I1 = ISTR("New firmware version available:"); ////MSG_NEW_FIRMWARE_AVAILABLE c=20 r=2
|
||||
extern const char MSG_NEW_FIRMWARE_PLEASE_UPGRADE [] PROGMEM_I1 = ISTR("Please upgrade."); ////MSG_NEW_FIRMWARE_PLEASE_UPGRADE c=20
|
||||
extern const char MSG_FW_MK3_DETECTED [] PROGMEM_I1 = ISTR(PRINTER_NAME " firmware detected on " PRINTER_NAME_ALTERNATE " printer"); ////MSG_FW_MK3_DETECTED c=20 r=4
|
||||
//not internationalized messages
|
||||
#if 0
|
||||
const char MSG_FW_VERSION_BETA[] PROGMEM_N1 = "You are using a BETA firmware version! It is in a development state! Use this version with CAUTION as it may DAMAGE the printer!"; ////MSG_FW_VERSION_BETA c=20 r=8
|
||||
#endif
|
||||
const char MSG_SPOOL_JOIN[] PROGMEM_N1 = "SpoolJoin"; ////MSG_SPOOL_JOIN c=13
|
||||
const char MSG_FIRMWARE[] PROGMEM_N1 = "Firmware"; ////MSG_FIRMWARE c=8
|
||||
const char MSG_FILAMENT[] PROGMEM_N1 = "Filament"; ////MSG_FILAMENT c=8
|
||||
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_N1 = "FlashAir"; ////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY c=8
|
||||
const char MSG_PINDA[] PROGMEM_N1 = "PINDA"; ////MSG_PINDA c=5
|
||||
const char MSG_WELCOME[] PROGMEM_N1 = WELCOME_MSG;
|
||||
const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////
|
||||
const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////
|
||||
const char MSG_EXTERNAL_RESET[] PROGMEM_N1 = " External Reset"; ////
|
||||
const char MSG_FILE_SAVED[] PROGMEM_N1 = "Done saving file."; ////
|
||||
const char MSG_POSITION_UNKNOWN[] PROGMEM_N1 = "Home X/Y before Z"; ////
|
||||
const char MSG_SOFTWARE_RESET[] PROGMEM_N1 = " Software Reset"; ////
|
||||
const char MSG_UNKNOWN_COMMAND[] PROGMEM_N1 = "Unknown command: \""; ////
|
||||
const char MSG_WATCHDOG_RESET[] PROGMEM_N1 = " Watchdog Reset"; ////
|
||||
const char MSG_Z_MAX[] PROGMEM_N1 = "z_max: "; ////
|
||||
const char MSG_Z_MIN[] PROGMEM_N1 = "z_min: "; ////
|
||||
const char MSG_ZPROBE_OUT[] PROGMEM_N1 = "Z probe out. bed"; ////
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
const char MSG_ZPROBE_ZOFFSET[] PROGMEM_N1 = "Z Offset"; ////
|
||||
#endif
|
||||
const char MSG_TMC_OVERTEMP[] PROGMEM_N1 = "TMC DRIVER OVERTEMP"; ////
|
||||
const char MSG_Enqueing[] PROGMEM_N1 = "enqueing \""; ////
|
||||
const char MSG_ENDSTOPS_HIT[] PROGMEM_N1 = "endstops hit: "; ////
|
||||
const char MSG_SD_ERR_WRITE_TO_FILE[] PROGMEM_N1 = "error writing to file"; ////
|
||||
const char MSG_OK[] PROGMEM_N1 = "ok"; ////
|
||||
const char MSG_OK_CAPS[] PROGMEM_N1 = "OK"; ////
|
||||
|
|
@ -217,11 +403,20 @@ const char MSG_ENDSTOP_OPEN[] PROGMEM_N1 = "open"; ////
|
|||
const char MSG_POWERUP[] PROGMEM_N1 = "PowerUp"; ////
|
||||
const char MSG_ERR_STOPPED[] PROGMEM_N1 = "Printer stopped due to errors. Supervision required."; ////
|
||||
const char MSG_ENDSTOP_HIT[] PROGMEM_N1 = "TRIGGERED"; ////
|
||||
const char MSG_OCTOPRINT_ASK_PAUSE[] PROGMEM_N1 = "// action:pause"; ////
|
||||
const char MSG_OCTOPRINT_PAUSED[] PROGMEM_N1 = "// action:paused"; ////
|
||||
const char MSG_OCTOPRINT_ASK_RESUME[] PROGMEM_N1 = "// action:resume"; ////
|
||||
const char MSG_OCTOPRINT_RESUMED[] PROGMEM_N1 = "// action:resumed"; ////
|
||||
const char MSG_OCTOPRINT_CANCEL[] PROGMEM_N1 = "// action:cancel"; ////
|
||||
const char MSG_HOST_ACTION_ASK_PAUSE[] PROGMEM_N1 = "//action:pause"; ////
|
||||
const char MSG_HOST_ACTION_PAUSED[] PROGMEM_N1 = "//action:paused"; ////
|
||||
const char MSG_HOST_ACTION_ASK_RESUME[] PROGMEM_N1 = "//action:resume"; ////
|
||||
const char MSG_HOST_ACTION_RESUMED[] PROGMEM_N1 = "//action:resumed"; ////
|
||||
const char MSG_HOST_ACTION_CANCEL[] PROGMEM_N1 = "//action:cancel"; ////
|
||||
const char MSG_HOST_ACTION_READY[] PROGMEM_N1 = "//action:ready"; ////
|
||||
const char MSG_HOST_ACTION_NOT_READY[] PROGMEM_N1 = "//action:not_ready"; ////
|
||||
const char MSG_HOST_ACTION_START[] PROGMEM_N1 = "//action:start"; ////
|
||||
const char MSG_HOST_ACTION_UVLO_RECOVERY_READY[] PROGMEM_N1 = "//action:uvlo_recovery_ready"; ////
|
||||
const char MSG_HOST_ACTION_UVLO_AUTO_RECOVERY_READY[] PROGMEM_N1 = "//action:uvlo_auto_recovery_ready"; ////
|
||||
const char MSG_HOST_ACTION_NOTIFICATION[] PROGMEM_N1 = "//action:notification %S\n"; ////
|
||||
#ifdef HOST_SHUTDOWN
|
||||
const char MSG_HOST_ACTION_SHUTDOWN[] PROGMEM_N1 = "//action:shutdown"; ////
|
||||
#endif //HOST_SHUTOWN
|
||||
const char MSG_FANCHECK_HOTEND[] PROGMEM_N1 = "Err:HOTEND FAN ERROR"; ////c=20
|
||||
const char MSG_FANCHECK_PRINT[] PROGMEM_N1 = "Err:PRINT FAN ERROR"; ////c=20
|
||||
const char MSG_M112_KILL[] PROGMEM_N1 = "M112 called. Emergency Stop."; ////c=20
|
||||
|
|
@ -229,10 +424,13 @@ const char MSG_ADVANCE_K[] PROGMEM_N1 = "Advance K:"; ////c=13
|
|||
const char MSG_POWERPANIC_DETECTED[] PROGMEM_N1 = "POWER PANIC DETECTED"; ////c=20
|
||||
const char MSG_LCD_STATUS_CHANGED[] PROGMEM_N1 = "LCD status changed";
|
||||
const char MSG_UNKNOWN_CODE[] PROGMEM_N1 = "Unknown %c code: %s\n";
|
||||
const char MSG_FILAMENT_RUNOUT_DETECTED[] PROGMEM_N1 = "Filament runout detected!"; ////c=20 r=2
|
||||
|
||||
// Common G-gcodes
|
||||
const char G1_E_F2700[] PROGMEM_N1 = "G1 E%-.3f F2700";
|
||||
const char G28W[] PROGMEM_N1 = "G28 W";
|
||||
const char MSG_G90[] PROGMEM_N1 = "G90";
|
||||
const char MSG_G91[] PROGMEM_N1 = "G91";
|
||||
const char MSG_M23[] PROGMEM_N1 = "M23 %s";
|
||||
const char MSG_M24[] PROGMEM_N1 = "M24";
|
||||
const char MSG_M83[] PROGMEM_N1 = "M83";
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ extern const char MSG_BED_HEATING[];
|
|||
extern const char MSG_BED_LEVELING_FAILED_POINT_LOW[];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[];
|
||||
extern const char MSG_BELT_STATUS[];
|
||||
extern const char MSG_EJECT[];
|
||||
extern const char MSG_CANCEL[];
|
||||
extern const char MSG_CALIBRATE_Z_AUTO[];
|
||||
extern const char MSG_CARD_MENU[];
|
||||
|
|
@ -32,11 +33,11 @@ extern const char MSG_COOLDOWN[];
|
|||
extern const char MSG_CRASH[];
|
||||
extern const char MSG_CRASH_DETECTED[];
|
||||
extern const char MSG_CRASHDETECT[];
|
||||
extern const char MSG_DONE[];
|
||||
extern const char MSG_ERROR[];
|
||||
extern const char MSG_EXTRUDER[];
|
||||
extern const char MSG_FANS_CHECK[];
|
||||
extern const char MSG_FIL_RUNOUTS[];
|
||||
extern const char MSG_FILAMENT[];
|
||||
extern const char MSG_FAN_SPEED[];
|
||||
extern const char MSG_HOTEND_FAN_SPEED[];
|
||||
extern const char MSG_PRINT_FAN_SPEED[];
|
||||
|
|
@ -77,6 +78,7 @@ extern const char MSG_NO[];
|
|||
extern const char MSG_NOZZLE[];
|
||||
extern const char MSG_PAPER[];
|
||||
extern const char MSG_PAUSE_PRINT[];
|
||||
extern const char MSG_PRINT_PAUSED[];
|
||||
extern const char MSG_PLACE_STEEL_SHEET[];
|
||||
extern const char MSG_PLEASE_WAIT[];
|
||||
extern const char MSG_POWER_FAILURES[];
|
||||
|
|
@ -102,12 +104,22 @@ extern const char MSG_SELFTEST_MOTOR[];
|
|||
extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
|
||||
extern const char MSG_SELFTEST_WIRINGERROR[];
|
||||
extern const char MSG_SETTINGS[];
|
||||
#ifndef REPLACE_SETREADY
|
||||
extern const char MSG_SET_READY[];
|
||||
extern const char MSG_SET_NOT_READY[];
|
||||
#else
|
||||
extern const char MSG_HOSTPRINT[];
|
||||
#endif
|
||||
#ifdef HOST_SHUTDOWN
|
||||
extern const char MSG_SHUTDOWN_HOST[];
|
||||
#endif //HOST_SHUTOWN
|
||||
extern const char MSG_SELECT_LANGUAGE[];
|
||||
extern const char MSG_SORTING_FILES[];
|
||||
extern const char MSG_TOTAL[];
|
||||
extern const char MSG_MATERIAL_CHANGES[];
|
||||
extern const char MSG_TOTAL_FAILURES[];
|
||||
extern const char MSG_HW_SETUP[];
|
||||
extern const char MSG_TUNE[];
|
||||
extern const char MSG_MODE[];
|
||||
extern const char MSG_HIGH_POWER[];
|
||||
extern const char MSG_AUTO_POWER[];
|
||||
|
|
@ -115,6 +127,7 @@ extern const char MSG_SILENT[];
|
|||
extern const char MSG_NORMAL[];
|
||||
extern const char MSG_STEALTH[];
|
||||
extern const char MSG_STEEL_SHEET_CHECK[];
|
||||
extern const char MSG_Z_CALIBRATION_PROMPT[];
|
||||
extern const char MSG_STOP_PRINT[];
|
||||
extern const char MSG_STOPPED[];
|
||||
extern const char MSG_PINDA_CALIBRATION[];
|
||||
|
|
@ -144,6 +157,7 @@ extern const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[];
|
|||
extern const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[];
|
||||
extern const char MSG_GCODE_DIFF_CONTINUE[];
|
||||
extern const char MSG_GCODE_DIFF_CANCELLED[];
|
||||
extern const char MSG_MISSING_FILAMENT[];
|
||||
extern const char MSG_NOZZLE_DIFFERS_CONTINUE[];
|
||||
extern const char MSG_NOZZLE_DIFFERS_CANCELLED[];
|
||||
extern const char MSG_NOZZLE_DIAMETER[];
|
||||
|
|
@ -177,7 +191,7 @@ extern const char MSG_IR_03_OR_OLDER[];
|
|||
extern const char MSG_IR_UNKNOWN[];
|
||||
#endif
|
||||
extern const char MSG_PAUSED_THERMAL_ERROR[];
|
||||
#ifdef TEMP_MODEL
|
||||
#ifdef THERMAL_MODEL
|
||||
extern const char MSG_THERMAL_ANOMALY[];
|
||||
extern const char MSG_TM_NOT_CAL[];
|
||||
extern const char MSG_TM_ACK_ERROR[];
|
||||
|
|
@ -186,33 +200,201 @@ extern const char MSG_LOAD_ALL[];
|
|||
extern const char MSG_NOZZLE_CNG_MENU [];
|
||||
extern const char MSG_NOZZLE_CNG_READ_HELP [];
|
||||
extern const char MSG_NOZZLE_CNG_CHANGED [];
|
||||
#ifdef QUICK_NOZZLE_CHANGE
|
||||
extern const char MSG_NOZZLE_CNG_COOLDOWN [];
|
||||
#endif //QUICK_NOZZLE_CHANGE
|
||||
extern const char MSG_REPRINT [];
|
||||
extern const char MSG_FILE_CNT [];
|
||||
extern const char MSG_CHANGED_MOTHERBOARD [];
|
||||
extern const char MSG_CHANGED_PRINTER [];
|
||||
extern const char MSG_CHANGED_BOTH [];
|
||||
extern const char MSG_DEFAULT_SETTINGS_LOADED [];
|
||||
extern const char MSG_FORCE_SELFTEST [];
|
||||
extern const char MSG_MBL_FAILED [];
|
||||
extern const char MSG_ZLEVELING_ENFORCED [];
|
||||
extern const char MSG_UNLOAD_SUCCESSFUL [];
|
||||
extern const char MSG_CHECK_IDLER [];
|
||||
extern const char MSG_RUN_XYZ [];
|
||||
extern const char MSG_TEMP_CAL_WARNING [];
|
||||
extern const char MSG_USERWAIT [];
|
||||
extern const char MSG_NO_MOVE [];
|
||||
extern const char MSG_BED_HEATING_SAFETY_DISABLED [];
|
||||
extern const char MSG_PRESS_TO_PREHEAT [];
|
||||
extern const char MSG_IMPROVE_BED_OFFSET_AND_SKEW_LINE1 [];
|
||||
extern const char MSG_MMU_RESTORE_TEMP [];
|
||||
extern const char MSG_MMU_SENSITIVITY [];
|
||||
extern const char MSG_RECOVERING_PRINT [];
|
||||
extern const char MSG_HOMEYZ_DONE [];
|
||||
extern const char MSG_PINDA_PREHEAT [];
|
||||
extern const char MSG_PID_RUNNING [];
|
||||
extern const char MSG_PID_FINISHED [];
|
||||
extern const char MSG_AMBIENT [];
|
||||
extern const char MSG_DATE [];
|
||||
extern const char MSG_MMU_CONNECTED [];
|
||||
extern const char MSG_UNKNOWN [];
|
||||
extern const char MSG_PRINTER_IP [];
|
||||
extern const char MSG_XYZ_DETAILS [];
|
||||
extern const char MSG_INFO_EXTRUDER [];
|
||||
extern const char MSG_INFO_SENSORS [];
|
||||
extern const char MSG_MENU_TEMPERATURES [];
|
||||
extern const char MSG_MENU_VOLTAGES [];
|
||||
extern const char MSG_PRESS_KNOB [];
|
||||
extern const char MSG_TO_LOAD_FIL [];
|
||||
extern const char MSG_TO_UNLOAD_FIL [];
|
||||
extern const char MSG_PREHEATING_TO_LOAD [];
|
||||
extern const char MSG_PREHEATING_TO_UNLOAD [];
|
||||
extern const char MSG_PREHEATING_TO_EJECT [];
|
||||
extern const char MSG_PREHEATING_TO_CUT [];
|
||||
extern const char MSG_INSERT_FILAMENT [];
|
||||
extern const char MSG_PRESS [];
|
||||
extern const char MSG_CHANGE_SUCCESS [];
|
||||
extern const char MSG_LOADING_COLOR [];
|
||||
extern const char MSG_CORRECTLY [];
|
||||
extern const char MSG_NOT_LOADED [];
|
||||
extern const char MSG_NOT_COLOR [];
|
||||
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||
extern const char MSG_AUTOLOADING_ENABLED [];
|
||||
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||
extern const char MSG_FILAMENT_USED [];
|
||||
extern const char MSG_PRINT_TIME [];
|
||||
extern const char MSG_TOTAL_FILAMENT [];
|
||||
extern const char MSG_TOTAL_PRINT_TIME [];
|
||||
extern const char MSG_Y_DIST_FROM_MIN [];
|
||||
extern const char MSG_LEFT [];
|
||||
extern const char MSG_RIGHT [];
|
||||
extern const char MSG_MEASURED_SKEW [];
|
||||
extern const char MSG_SLIGHT_SKEW [];
|
||||
extern const char MSG_SEVERE_SKEW [];
|
||||
extern const char MSG_MEASURED_OFFSET [];
|
||||
extern const char MSG_BABYSTEPPING_Z [];
|
||||
extern const char MSG_BED_CORRECTION_LEFT [];
|
||||
extern const char MSG_BED_CORRECTION_RIGHT [];
|
||||
extern const char MSG_BED_CORRECTION_FRONT [];
|
||||
extern const char MSG_BED_CORRECTION_REAR [];
|
||||
extern const char MSG_SET_TEMPERATURE [];
|
||||
extern const char MSG_WAITING_TEMP_PINDA [];
|
||||
extern const char MSG_WAITING_TEMP [];
|
||||
extern const char MSG_MOVE_CARRIAGE_TO_THE_TOP_Z [];
|
||||
extern const char MSG_MOVE_CARRIAGE_TO_THE_TOP [];
|
||||
extern const char MSG_CONFIRM_CARRIAGE_AT_THE_TOP [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_POINT_NOT_FOUND [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_RIGHT_FAR [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_PERFECT [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_SKEW_MILD [];
|
||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME [];
|
||||
extern const char MSG_PINDA_CAL_FAILED [];
|
||||
extern const char MSG_MOVE_X [];
|
||||
extern const char MSG_MOVE_Y [];
|
||||
extern const char MSG_MOVE_Z [];
|
||||
extern const char MSG_CRASH_DET_ONLY_IN_NORMAL [];
|
||||
extern const char MSG_CRASH_DET_STEALTH_FORCE_OFF [];
|
||||
extern const char MSG_MODE_CHANGE_IN_PROGRESS [];
|
||||
extern const char MSG_COPY_SEL_LANG [];
|
||||
extern const char MSG_SHEET_OFFSET [];
|
||||
extern const char MSG_PLEASE_LOAD_PLA [];
|
||||
extern const char MSG_WIZARD_RERUN [];
|
||||
extern const char MSG_MMU_INSERT_FILAMENT_FIRST_TUBE [];
|
||||
extern const char MSG_WIZARD_LOAD_FILAMENT [];
|
||||
extern const char MSG_WIZARD_V2_CAL [];
|
||||
extern const char MSG_SELECT_FIL_1ST_LAYERCAL [];
|
||||
extern const char MSG_SELECT_TEMP_MATCHES_MATERIAL [];
|
||||
extern const char MSG_WIZARD_V2_CAL_2 [];
|
||||
extern const char MSG_WIZARD_SELFTEST [];
|
||||
extern const char MSG_WIZARD_XYZ_CAL [];
|
||||
extern const char MSG_REMOVE_SHIPPING_HELPERS [];
|
||||
extern const char MSG_REMOVE_TEST_PRINT [];
|
||||
extern const char MSG_WIZARD_Z_CAL [];
|
||||
extern const char MSG_WIZARD_WILL_PREHEAT [];
|
||||
extern const char MSG_TM_CAL [];
|
||||
extern const char MSG_SEL_PREHEAT_TEMP [];
|
||||
extern const char MSG_WIZARD_REPEAT_V2_CAL [];
|
||||
extern const char MSG_WIZARD_CLEAN_HEATBED [];
|
||||
extern const char MSG_ADDITIONAL_SHEETS [];
|
||||
extern const char MSG_X_CORRECTION [];
|
||||
extern const char MSG_Y_CORRECTION [];
|
||||
extern const char MSG_Z_CORRECTION [];
|
||||
extern const char MSG_EXTRUDER_CORRECTION [];
|
||||
extern const char MSG_CHECKS [];
|
||||
extern const char MSG_TEMPERATURE [];
|
||||
extern const char MSG_MOVE_AXIS [];
|
||||
extern const char MSG_DISABLE_STEPPERS [];
|
||||
extern const char MSG_LIN_CORRECTION [];
|
||||
extern const char MSG_WIZARD [];
|
||||
extern const char MSG_BELTTEST [];
|
||||
extern const char MSG_SELFTEST [];
|
||||
extern const char MSG_CALIBRATE_BED [];
|
||||
extern const char MSG_BED_CORRECTION_MENU [];
|
||||
extern const char MSG_PID_EXTRUDER [];
|
||||
extern const char MSG_SHOW_END_STOPS [];
|
||||
extern const char MSG_CALIBRATE_BED_RESET [];
|
||||
extern const char MSG_SELECT [];
|
||||
extern const char MSG_RENAME [];
|
||||
extern const char MSG_PREHEAT [];
|
||||
extern const char MSG_CNG_SDCARD [];
|
||||
extern const char MSG_NO_CARD [];
|
||||
extern const char MSG_INIT_SDCARD [];
|
||||
extern const char MSG_LOAD_TO_NOZZLE [];
|
||||
extern const char MSG_AUTOLOAD_FILAMENT [];
|
||||
extern const char MSG_STATISTICS [];
|
||||
extern const char MSG_FAIL_STATS [];
|
||||
extern const char MSG_MMU_FAIL_STATS [];
|
||||
extern const char MSG_SUPPORT [];
|
||||
extern const char MSG_SPEED [];
|
||||
extern const char MSG_FLOW [];
|
||||
extern const char MSG_INSERT_FIL [];
|
||||
extern const char MSG_UNLOAD_FILAMENT_REPEAT [];
|
||||
extern const char MSG_CHECK_IR_CONNECTION [];
|
||||
extern const char MSG_FS_VERIFIED [];
|
||||
extern const char MSG_FIL_FAILED [];
|
||||
extern const char MSG_SELFTEST_START [];
|
||||
extern const char MSG_SELFTEST_OK [];
|
||||
extern const char MSG_SELFTEST_ERROR [];
|
||||
extern const char MSG_SELFTEST_PLEASECHECK [];
|
||||
extern const char MSG_SELFTEST_HEATERTHERMISTOR [];
|
||||
extern const char MSG_SELFTEST_NOTCONNECTED [];
|
||||
extern const char MSG_SELFTEST_BEDHEATER [];
|
||||
extern const char MSG_SELFTEST_ENDSTOPS [];
|
||||
extern const char MSG_SELFTEST_ENDSTOP [];
|
||||
extern const char MSG_SELFTEST_ENDSTOP_NOTHIT [];
|
||||
extern const char MSG_LOOSE_PULLEY [];
|
||||
extern const char MSG_SELFTEST_AXIS_LENGTH [];
|
||||
extern const char MSG_SELFTEST_AXIS [];
|
||||
extern const char MSG_SELFTEST_FANS [];
|
||||
extern const char MSG_SELFTEST_SWAPPED [];
|
||||
extern const char MSG_FALSE_TRIGGERING [];
|
||||
extern const char MSG_SELFTEST_FS_LEVEL [];
|
||||
extern const char MSG_SELFTEST_CHECK_ENDSTOPS [];
|
||||
extern const char MSG_SELFTEST_CHECK_Z [];
|
||||
extern const char MSG_SELFTEST_CHECK_HOTEND [];
|
||||
extern const char MSG_SELFTEST_CHECK_ALLCORRECT [];
|
||||
extern const char MSG_CALIBRATING_HOME [];
|
||||
extern const char MSG_CHECKING_FILE [];
|
||||
extern const char MSG_FILE_INCOMPLETE [];
|
||||
extern const char MSG_SD_REMOVED [];
|
||||
extern const char MSG_NEW_FIRMWARE_AVAILABLE [];
|
||||
extern const char MSG_NEW_FIRMWARE_PLEASE_UPGRADE [];
|
||||
extern const char MSG_FW_MK3_DETECTED [];
|
||||
|
||||
//not internationalized messages
|
||||
#if 0
|
||||
extern const char MSG_FW_VERSION_BETA[];
|
||||
#endif
|
||||
extern const char MSG_SPOOL_JOIN[];
|
||||
extern const char MSG_FIRMWARE[];
|
||||
extern const char MSG_FILAMENT[];
|
||||
extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
|
||||
extern const char MSG_PINDA[];
|
||||
extern const char MSG_WELCOME[];
|
||||
extern const char MSG_SD_WORKDIR_FAIL[];
|
||||
extern const char MSG_BROWNOUT_RESET[];
|
||||
extern const char MSG_EXTERNAL_RESET[];
|
||||
extern const char MSG_FILE_SAVED[];
|
||||
extern const char MSG_POSITION_UNKNOWN[];
|
||||
extern const char MSG_SOFTWARE_RESET[];
|
||||
extern const char MSG_UNKNOWN_COMMAND[];
|
||||
extern const char MSG_WATCHDOG_RESET[];
|
||||
extern const char MSG_Z_MAX[];
|
||||
extern const char MSG_Z_MIN[];
|
||||
extern const char MSG_ZPROBE_OUT[];
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
extern const char MSG_ZPROBE_ZOFFSET[];
|
||||
#endif
|
||||
extern const char MSG_TMC_OVERTEMP[];
|
||||
extern const char MSG_Enqueing[];
|
||||
extern const char MSG_ENDSTOPS_HIT[];
|
||||
extern const char MSG_SD_ERR_WRITE_TO_FILE[];
|
||||
extern const char MSG_OK[];
|
||||
extern const char MSG_OK_CAPS[];
|
||||
|
|
@ -223,11 +405,20 @@ extern const char MSG_ERR_STOPPED[];
|
|||
extern const char MSG_ENDSTOP_HIT[];
|
||||
extern const char MSG_EJECT_FROM_MMU[];
|
||||
extern const char MSG_CUT_FILAMENT[];
|
||||
extern const char MSG_OCTOPRINT_ASK_PAUSE[];
|
||||
extern const char MSG_OCTOPRINT_PAUSED[];
|
||||
extern const char MSG_OCTOPRINT_ASK_RESUME[];
|
||||
extern const char MSG_OCTOPRINT_RESUMED[];
|
||||
extern const char MSG_OCTOPRINT_CANCEL[];
|
||||
extern const char MSG_HOST_ACTION_ASK_PAUSE[];
|
||||
extern const char MSG_HOST_ACTION_PAUSED[];
|
||||
extern const char MSG_HOST_ACTION_ASK_RESUME[];
|
||||
extern const char MSG_HOST_ACTION_RESUMED[];
|
||||
extern const char MSG_HOST_ACTION_CANCEL[];
|
||||
extern const char MSG_HOST_ACTION_READY[];
|
||||
extern const char MSG_HOST_ACTION_NOT_READY[];
|
||||
extern const char MSG_HOST_ACTION_START[];
|
||||
extern const char MSG_HOST_ACTION_UVLO_RECOVERY_READY[];
|
||||
extern const char MSG_HOST_ACTION_UVLO_AUTO_RECOVERY_READY[];
|
||||
extern const char MSG_HOST_ACTION_NOTIFICATION[];
|
||||
#ifdef HOST_SHUTDOWN
|
||||
extern const char MSG_HOST_ACTION_SHUTDOWN[];
|
||||
#endif //HOST_SHUTOWN
|
||||
extern const char MSG_FANCHECK_HOTEND[];
|
||||
extern const char MSG_FANCHECK_PRINT[];
|
||||
extern const char MSG_M112_KILL[];
|
||||
|
|
@ -235,10 +426,13 @@ extern const char MSG_ADVANCE_K[];
|
|||
extern const char MSG_POWERPANIC_DETECTED[];
|
||||
extern const char MSG_LCD_STATUS_CHANGED[];
|
||||
extern const char MSG_UNKNOWN_CODE[];
|
||||
extern const char MSG_FILAMENT_RUNOUT_DETECTED[];
|
||||
|
||||
// Common G-gcodes
|
||||
extern const char G1_E_F2700[];
|
||||
extern const char G28W[];
|
||||
extern const char MSG_G90[];
|
||||
extern const char MSG_G91[];
|
||||
extern const char MSG_M23[];
|
||||
extern const char MSG_M24[];
|
||||
extern const char MSG_M83[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
#include "strlen_cx.h"
|
||||
#include "SpoolJoin.h"
|
||||
|
||||
#include "messages.h"
|
||||
#include "language.h"
|
||||
|
||||
#ifdef __AVR__
|
||||
// As of FW 3.12 we only support building the FW with only one extruder, all the multi-extruder infrastructure will be removed.
|
||||
// Saves at least 800B of code size
|
||||
|
|
@ -31,7 +34,7 @@ void waitForHotendTargetTemp(uint16_t delay, F f) {
|
|||
}
|
||||
|
||||
void WaitForHotendTargetTempBeep() {
|
||||
waitForHotendTargetTemp(3000, []{ });
|
||||
waitForHotendTargetTemp(200, [] {});
|
||||
MakeSound(Prompt);
|
||||
}
|
||||
|
||||
|
|
@ -52,24 +55,38 @@ MMU2::MMU2()
|
|||
, tmcFailures(0) {
|
||||
}
|
||||
|
||||
void MMU2::Status() {
|
||||
// Useful information to see during bootup and change state
|
||||
SERIAL_ECHOPGM("MMU is ");
|
||||
uint8_t status = eeprom_init_default_byte((uint8_t*)EEPROM_MMU_ENABLED, 0);
|
||||
if (status == 1) {
|
||||
SERIAL_ECHOLNRPGM(_O(MSG_ON));
|
||||
} else {
|
||||
SERIAL_ECHOLNRPGM(_O(MSG_OFF));
|
||||
}
|
||||
}
|
||||
|
||||
void MMU2::Start() {
|
||||
mmu2Serial.begin(MMU_BAUD);
|
||||
|
||||
PowerOn(); // I repurposed this to serve as our EEPROM disable toggle.
|
||||
PowerOn();
|
||||
mmu2Serial.flush(); // make sure the UART buffer is clear before starting communication
|
||||
|
||||
extruder = MMU2_NO_TOOL;
|
||||
state = xState::Connecting;
|
||||
SetCurrentTool(MMU2_NO_TOOL);
|
||||
|
||||
// start the communication
|
||||
logic.Start();
|
||||
|
||||
logic.ResetRetryAttempts();
|
||||
logic.ResetCommunicationTimeoutAttempts();
|
||||
|
||||
state = xState::Connecting;
|
||||
logic.Start();
|
||||
}
|
||||
|
||||
MMU2::~MMU2() {}
|
||||
|
||||
void MMU2::Stop() {
|
||||
StopKeepPowered();
|
||||
PowerOff(); // This also disables the MMU in the EEPROM.
|
||||
PowerOff();
|
||||
}
|
||||
|
||||
void MMU2::StopKeepPowered() {
|
||||
|
|
@ -78,6 +95,19 @@ void MMU2::StopKeepPowered() {
|
|||
mmu2Serial.close();
|
||||
}
|
||||
|
||||
void MMU2::Tune() {
|
||||
switch (lastErrorCode) {
|
||||
case ErrorCode::HOMING_SELECTOR_FAILED:
|
||||
case ErrorCode::HOMING_IDLER_FAILED: {
|
||||
// Prompt a menu for different values
|
||||
tuneIdlerStallguardThreshold();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MMU2::Reset(ResetForm level) {
|
||||
switch (level) {
|
||||
case Software:
|
||||
|
|
@ -101,7 +131,7 @@ void MMU2::ResetX0() {
|
|||
logic.ResetMMU(); // Send soft reset
|
||||
}
|
||||
|
||||
void MMU2::ResetX42(){
|
||||
void MMU2::ResetX42() {
|
||||
logic.ResetMMU(42);
|
||||
}
|
||||
|
||||
|
|
@ -112,11 +142,9 @@ void MMU2::TriggerResetPin() {
|
|||
void MMU2::PowerCycle() {
|
||||
// cut the power to the MMU and after a while restore it
|
||||
// Sadly, MK3/S/+ cannot do this
|
||||
// NOTE: the below will toggle the EEPROM var. Should we
|
||||
// assert this function is never called in the MK3 FW? Do we even care?
|
||||
PowerOff();
|
||||
Stop();
|
||||
safe_delay_keep_alive(1000);
|
||||
PowerOn();
|
||||
Start();
|
||||
}
|
||||
|
||||
void MMU2::PowerOff() {
|
||||
|
|
@ -128,22 +156,33 @@ void MMU2::PowerOn() {
|
|||
}
|
||||
|
||||
bool MMU2::ReadRegister(uint8_t address) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
do {
|
||||
logic.ReadRegister(address); // we may signal the accepted/rejected status of the response as return value of this function
|
||||
} while (!manage_response(false, false));
|
||||
|
||||
// Update cached value
|
||||
lastReadRegisterValue = logic.rsp.paramValue;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MMU2::WriteRegister(uint8_t address, uint16_t data) {
|
||||
if (!WaitForMMUReady())
|
||||
bool __attribute__((noinline)) MMU2::WriteRegister(uint8_t address, uint16_t data) {
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// special case - intercept requests of extra loading distance and perform the change even on the printer's side
|
||||
if (address == 0x0b) {
|
||||
// special cases - intercept requests of registers which influence the printer's behaviour too + perform the change even on the printer's side
|
||||
switch (address) {
|
||||
case (uint8_t)Register::Extra_Load_Distance:
|
||||
logic.PlanExtraLoadDistance(data);
|
||||
break;
|
||||
case (uint8_t)Register::Pulley_Slow_Feedrate:
|
||||
logic.PlanPulleySlowFeedRate(data);
|
||||
break;
|
||||
default:
|
||||
break; // do not intercept any other register writes
|
||||
}
|
||||
|
||||
do {
|
||||
|
|
@ -158,30 +197,24 @@ void MMU2::mmu_loop() {
|
|||
// Atomic compare_exchange would have been the most appropriate solution here, but this gets called only in Marlin's task,
|
||||
// so thread safety should be kept
|
||||
static bool avoidRecursion = false;
|
||||
if (avoidRecursion)
|
||||
if (avoidRecursion) {
|
||||
return;
|
||||
}
|
||||
avoidRecursion = true;
|
||||
|
||||
mmu_loop_inner(true);
|
||||
|
||||
avoidRecursion = false;
|
||||
}
|
||||
|
||||
void __attribute__((noinline)) MMU2::mmu_loop_inner(bool reportErrors) {
|
||||
logicStepLastStatus = LogicStep(reportErrors); // it looks like the mmu_loop doesn't need to be a blocking call
|
||||
|
||||
if (isErrorScreenRunning()) {
|
||||
// Call this every iteration to keep the knob rotation responsive
|
||||
// This includes when mmu_loop is called within manage_response
|
||||
ReportErrorHook((CommandInProgress)logic.CommandInProgress(), (uint16_t)lastErrorCode, uint8_t(lastErrorSource));
|
||||
}
|
||||
CheckErrorScreenUserInput();
|
||||
}
|
||||
|
||||
void MMU2::CheckFINDARunout() {
|
||||
// Check for FINDA filament runout
|
||||
if (!FindaDetectsFilament() && check_fsensor()) {
|
||||
if (!FindaDetectsFilament() && check_fsensor()) { // Check if we have filament runout detected from sensors
|
||||
SERIAL_ECHOLNPGM("FINDA filament runout!");
|
||||
stop_and_save_print_to_ram(0, 0);
|
||||
marlin_stop_and_save_print_to_ram();
|
||||
restore_print_from_ram_and_continue(0);
|
||||
if (SpoolJoin::spooljoin.isSpoolJoinEnabled() && get_current_tool() != (uint8_t)FILAMENT_UNKNOWN){ // Can't auto if F=?
|
||||
enquecommand_front_P(PSTR("M600 AUTO")); // save print and run M600 command
|
||||
|
|
@ -195,10 +228,10 @@ struct ReportingRAII {
|
|||
CommandInProgress cip;
|
||||
explicit inline __attribute__((always_inline)) ReportingRAII(CommandInProgress cip)
|
||||
: cip(cip) {
|
||||
BeginReport(cip, (uint16_t)ProgressCode::EngagingIdler);
|
||||
BeginReport(cip, ProgressCode::EngagingIdler);
|
||||
}
|
||||
inline __attribute__((always_inline)) ~ReportingRAII() {
|
||||
EndReport(cip, (uint16_t)ProgressCode::OK);
|
||||
EndReport(cip, ProgressCode::OK);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -214,11 +247,11 @@ bool MMU2::WaitForMMUReady() {
|
|||
}
|
||||
}
|
||||
|
||||
bool MMU2::RetryIfPossible(uint16_t ec) {
|
||||
bool MMU2::RetryIfPossible(ErrorCode ec) {
|
||||
if (logic.RetryAttempts()) {
|
||||
SetButtonResponse(ButtonOperations::Retry);
|
||||
// check, that Retry is actually allowed on that operation
|
||||
if (ButtonAvailable(ec) != NoButton) {
|
||||
if (ButtonAvailable(ec) != Buttons::NoButton) {
|
||||
logic.SetInAutoRetry(true);
|
||||
SERIAL_ECHOLNPGM("RetryButtonPressed");
|
||||
// We don't decrement until the button is acknowledged by the MMU.
|
||||
|
|
@ -233,23 +266,13 @@ bool MMU2::RetryIfPossible(uint16_t ec) {
|
|||
bool MMU2::VerifyFilamentEnteredPTFE() {
|
||||
planner_synchronize();
|
||||
|
||||
if (WhereIsFilament() == FilamentState::NOT_PRESENT)
|
||||
if (WhereIsFilament() != FilamentState::AT_FSENSOR)
|
||||
return false;
|
||||
|
||||
uint8_t fsensorState = 0;
|
||||
uint8_t fsensorStateLCD = 0;
|
||||
uint8_t lcd_cursor_col = 0;
|
||||
// MMU has finished its load, push the filament further by some defined constant length
|
||||
// If the filament sensor reads 0 at any moment, then report FAILURE
|
||||
|
||||
const float delta_mm = MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH - logic.ExtraLoadDistance();
|
||||
|
||||
// The total length is twice delta_mm. Divide that length by number of pixels
|
||||
// available to get length per pixel.
|
||||
// Note: Below is the reciprocal of (2 * delta_mm) / LCD_WIDTH [mm/pixel]
|
||||
const float pixel_per_mm = 0.5f * float(LCD_WIDTH) / (delta_mm);
|
||||
|
||||
TryLoadUnloadProgressbarInit();
|
||||
const float tryload_length = MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH - logic.ExtraLoadDistance();
|
||||
TryLoadUnloadReporter tlur(tryload_length);
|
||||
|
||||
/* The position is a triangle wave
|
||||
// current position is not zero, it is an offset
|
||||
|
|
@ -261,7 +284,7 @@ bool MMU2::VerifyFilamentEnteredPTFE() {
|
|||
// in the slope's sign or check the last machine position.
|
||||
// y(x)
|
||||
// ▲
|
||||
// │ ^◄────────── delta_mm + current_position
|
||||
// │ ^◄────────── tryload_length + current_position
|
||||
// machine │ / \
|
||||
// position │ / \◄────────── stepper_position_mm + current_position
|
||||
// (mm) │ / \
|
||||
|
|
@ -272,38 +295,28 @@ bool MMU2::VerifyFilamentEnteredPTFE() {
|
|||
// pixel #
|
||||
*/
|
||||
|
||||
bool filament_inserted = true; // expect success
|
||||
// Pixel index will go from 0 to 10, then back from 10 to 0
|
||||
// The change in this number is used to indicate a new pixel
|
||||
// should be drawn on the display
|
||||
uint8_t dpixel1 = 0;
|
||||
uint8_t dpixel0 = 0;
|
||||
for (uint8_t move = 0; move < 2; move++) {
|
||||
MoveE(move == 0 ? delta_mm : -delta_mm, MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE);
|
||||
extruder_move(move == 0 ? tryload_length : -tryload_length, MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE);
|
||||
while (planner_any_moves()) {
|
||||
// Wait for move to finish and monitor the fsensor the entire time
|
||||
// A single 0 reading will set the bit.
|
||||
fsensorStateLCD |= (WhereIsFilament() == FilamentState::NOT_PRESENT);
|
||||
fsensorState |= fsensorStateLCD; // No need to do the above comparison twice, just bitwise OR
|
||||
|
||||
// Always round up, you can only have 'whole' pixels. (floor is also an option)
|
||||
dpixel1 = ceil((stepper_get_machine_position_E_mm() - planner_get_current_position_E()) * pixel_per_mm);
|
||||
if (dpixel1 - dpixel0) {
|
||||
dpixel0 = dpixel1;
|
||||
if (lcd_cursor_col > (LCD_WIDTH - 1)) lcd_cursor_col = LCD_WIDTH - 1;
|
||||
TryLoadUnloadProgressbar(lcd_cursor_col++, fsensorStateLCD);
|
||||
fsensorStateLCD = 0; // Clear temporary bit
|
||||
}
|
||||
filament_inserted = filament_inserted && (WhereIsFilament() == FilamentState::AT_FSENSOR);
|
||||
tlur.Progress(filament_inserted);
|
||||
safe_delay_keep_alive(0);
|
||||
if (planner_draining()) {
|
||||
return false; // power panic or a similar issue happened, bail out fast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fsensorState) {
|
||||
Disable_E0();
|
||||
if (!filament_inserted) {
|
||||
IncrementLoadFails();
|
||||
return false;
|
||||
} else {
|
||||
// else, happy printing! :)
|
||||
return true;
|
||||
}
|
||||
tlur.DumpToSerial();
|
||||
return filament_inserted;
|
||||
}
|
||||
|
||||
bool MMU2::ToolChangeCommonOnce(uint8_t slot) {
|
||||
|
|
@ -313,8 +326,9 @@ bool MMU2::ToolChangeCommonOnce(uint8_t slot) {
|
|||
Disable_E0(); // it may seem counterintuitive to disable the E-motor, but it gets enabled in the planner whenever the E-motor is to move
|
||||
tool_change_extruder = slot;
|
||||
logic.ToolChange(slot); // let the MMU pull the filament out and push a new one in
|
||||
if (manage_response(true, true))
|
||||
if (manage_response(true, true)) {
|
||||
break;
|
||||
}
|
||||
// otherwise: failed to perform the command - unload first and then let it run again
|
||||
IncrementMMUFails();
|
||||
|
||||
|
|
@ -328,11 +342,9 @@ bool MMU2::ToolChangeCommonOnce(uint8_t slot) {
|
|||
// but honestly - if the MMU restarts during every toolchange,
|
||||
// something else is seriously broken and stopping a print is probably our best option.
|
||||
}
|
||||
// reset current position to whatever the planner thinks it is
|
||||
planner_set_current_position_E(planner_get_current_position_E());
|
||||
if (VerifyFilamentEnteredPTFE()) {
|
||||
return true; // success
|
||||
} else { // Prepare a retry attempt
|
||||
} else { // Prepare a retry attempt
|
||||
UnloadInner();
|
||||
if (retries == 2 && cutter_enabled()) {
|
||||
CutFilamentInner(slot); // try cutting filament tip at the last attempt
|
||||
|
|
@ -344,6 +356,9 @@ bool MMU2::ToolChangeCommonOnce(uint8_t slot) {
|
|||
|
||||
void MMU2::ToolChangeCommon(uint8_t slot) {
|
||||
while (!ToolChangeCommonOnce(slot)) { // while not successfully fed into extruder's PTFE tube
|
||||
if (planner_draining()) {
|
||||
return; // power panic happening, pretend the G-code finished ok
|
||||
}
|
||||
// failed autoretry, report an error by forcing a "printer" error into the MMU infrastructure - it is a hack to leverage existing code
|
||||
// @@TODO theoretically logic layer may not need to be spoiled with the printer error - may be just the manage_response needs it...
|
||||
logic.SetPrinterError(ErrorCode::LOAD_TO_EXTRUDER_FAILED);
|
||||
|
|
@ -354,15 +369,16 @@ void MMU2::ToolChangeCommon(uint8_t slot) {
|
|||
static_cast<void>(manage_response(true, true)); // yes, I'd like to silence [[nodiscard]] warning at this spot by casting to void
|
||||
}
|
||||
|
||||
extruder = slot; //filament change is finished
|
||||
SetCurrentTool(slot); // filament change is finished
|
||||
SpoolJoin::spooljoin.setSlot(slot);
|
||||
|
||||
++toolchange_counter;
|
||||
}
|
||||
|
||||
bool MMU2::tool_change(uint8_t slot) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (slot != extruder) {
|
||||
if (/*FindaDetectsFilament()*/
|
||||
|
|
@ -387,8 +403,9 @@ bool MMU2::tool_change(uint8_t slot) {
|
|||
///- Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load.
|
||||
///- Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
|
||||
bool MMU2::tool_change(char code, uint8_t slot) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FSensorBlockRunout blockRunout;
|
||||
|
||||
|
|
@ -425,10 +442,17 @@ uint8_t MMU2::get_tool_change_tool() const {
|
|||
return tool_change_extruder == MMU2_NO_TOOL ? (uint8_t)FILAMENT_UNKNOWN : tool_change_extruder;
|
||||
}
|
||||
|
||||
void MMU2::SetCurrentTool(uint8_t ex){
|
||||
extruder = ex;
|
||||
MMU2_ECHO_MSGRPGM(PSTR("MMU2tool="));
|
||||
SERIAL_ECHOLN((int)ex);
|
||||
}
|
||||
|
||||
bool MMU2::set_filament_type(uint8_t /*slot*/, uint8_t /*type*/) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
// @@TODO - this is not supported in the new MMU yet
|
||||
// slot = slot; // @@TODO
|
||||
// type = type; // @@TODO
|
||||
|
|
@ -452,26 +476,31 @@ void MMU2::UnloadInner() {
|
|||
for (;;) {
|
||||
Disable_E0();
|
||||
logic.UnloadFilament();
|
||||
if (manage_response(false, true))
|
||||
if (manage_response(false, true)) {
|
||||
break;
|
||||
}
|
||||
IncrementMMUFails();
|
||||
}
|
||||
MakeSound(Confirm);
|
||||
|
||||
// no active tool
|
||||
extruder = MMU2_NO_TOOL;
|
||||
SetCurrentTool(MMU2_NO_TOOL);
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
}
|
||||
|
||||
bool MMU2::unload() {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WaitForHotendTargetTempBeep();
|
||||
|
||||
ReportingRAII rep(CommandInProgress::UnloadFilament);
|
||||
UnloadInner();
|
||||
{
|
||||
ReportingRAII rep(CommandInProgress::UnloadFilament);
|
||||
UnloadInner();
|
||||
}
|
||||
|
||||
ScreenUpdateEnable();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -479,15 +508,17 @@ void MMU2::CutFilamentInner(uint8_t slot) {
|
|||
for (;;) {
|
||||
Disable_E0();
|
||||
logic.CutFilament(slot);
|
||||
if (manage_response(false, true))
|
||||
if (manage_response(false, true)) {
|
||||
break;
|
||||
}
|
||||
IncrementMMUFails();
|
||||
}
|
||||
}
|
||||
|
||||
bool MMU2::cut_filament(uint8_t slot, bool enableFullScreenMsg /*= true*/) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enableFullScreenMsg) {
|
||||
FullScreenMsgCut(slot);
|
||||
|
|
@ -499,10 +530,10 @@ bool MMU2::cut_filament(uint8_t slot, bool enableFullScreenMsg /*= true*/) {
|
|||
|
||||
ReportingRAII rep(CommandInProgress::CutFilament);
|
||||
CutFilamentInner(slot);
|
||||
SetCurrentTool(MMU2_NO_TOOL);
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
MakeSound(SoundType::Confirm);
|
||||
}
|
||||
extruder = MMU2_NO_TOOL;
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
MakeSound(SoundType::Confirm);
|
||||
ScreenUpdateEnable();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -517,30 +548,31 @@ bool MMU2::loading_test(uint8_t slot) {
|
|||
}
|
||||
|
||||
bool MMU2::load_filament(uint8_t slot) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
|
||||
FullScreenMsgLoad(slot);
|
||||
|
||||
ReportingRAII rep(CommandInProgress::LoadFilament);
|
||||
for (;;) {
|
||||
Disable_E0();
|
||||
logic.LoadFilament(slot);
|
||||
if (manage_response(false, false))
|
||||
break;
|
||||
IncrementMMUFails();
|
||||
}
|
||||
|
||||
MakeSound(SoundType::Confirm);
|
||||
|
||||
FullScreenMsgLoad(slot);
|
||||
{
|
||||
ReportingRAII rep(CommandInProgress::LoadFilament);
|
||||
for (;;) {
|
||||
Disable_E0();
|
||||
logic.LoadFilament(slot);
|
||||
if (manage_response(false, false)) {
|
||||
break;
|
||||
}
|
||||
IncrementMMUFails();
|
||||
}
|
||||
MakeSound(SoundType::Confirm);
|
||||
}
|
||||
ScreenUpdateEnable();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WaitForHotendTargetTempBeep();
|
||||
|
||||
|
|
@ -565,8 +597,9 @@ bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
|||
}
|
||||
|
||||
bool MMU2::eject_filament(uint8_t slot, bool enableFullScreenMsg /* = true */) {
|
||||
if (!WaitForMMUReady())
|
||||
if (!WaitForMMUReady()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enableFullScreenMsg) {
|
||||
FullScreenMsgEject(slot);
|
||||
|
|
@ -580,14 +613,16 @@ bool MMU2::eject_filament(uint8_t slot, bool enableFullScreenMsg /* = true */) {
|
|||
for (;;) {
|
||||
Disable_E0();
|
||||
logic.EjectFilament(slot);
|
||||
if (manage_response(false, true))
|
||||
if (manage_response(false, true)) {
|
||||
break;
|
||||
}
|
||||
IncrementMMUFails();
|
||||
}
|
||||
SetCurrentTool(MMU2_NO_TOOL);
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
MakeSound(Confirm);
|
||||
}
|
||||
extruder = MMU2_NO_TOOL;
|
||||
tool_change_extruder = MMU2_NO_TOOL;
|
||||
MakeSound(Confirm);
|
||||
ScreenUpdateEnable();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -601,8 +636,9 @@ void MMU2::Home(uint8_t mode) {
|
|||
}
|
||||
|
||||
void MMU2::SaveHotendTemp(bool turn_off_nozzle) {
|
||||
if (mmu_print_saved & SavedState::Cooldown)
|
||||
if (mmu_print_saved & SavedState::Cooldown) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (turn_off_nozzle && !(mmu_print_saved & SavedState::CooldownPending)) {
|
||||
Disable_E0();
|
||||
|
|
@ -618,12 +654,16 @@ void MMU2::SaveAndPark(bool move_axes) {
|
|||
Disable_E0();
|
||||
planner_synchronize();
|
||||
|
||||
// In case a power panic happens while waiting for the user
|
||||
// take a partial back up of print state into RAM (current position, etc.)
|
||||
marlin_refresh_print_state_in_ram();
|
||||
|
||||
if (move_axes) {
|
||||
mmu_print_saved |= SavedState::ParkExtruder;
|
||||
resume_position = planner_current_position(); // save current pos
|
||||
|
||||
// lift Z
|
||||
MoveRaiseZ(MMU_ERR_Z_PAUSE_LIFT);
|
||||
move_raise_z(MMU_ERR_Z_PAUSE_LIFT);
|
||||
|
||||
// move XY aside
|
||||
if (all_axes_homed()) {
|
||||
|
|
@ -631,9 +671,6 @@ void MMU2::SaveAndPark(bool move_axes) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// keep the motors powered forever (until some other strategy is chosen)
|
||||
// @@TODO do we need that in 8bit?
|
||||
gcode_reset_stepper_timeout();
|
||||
}
|
||||
|
||||
void MMU2::ResumeHotendTemp() {
|
||||
|
|
@ -672,12 +709,17 @@ void MMU2::ResumeUnpark() {
|
|||
// Move Z_AXIS to saved position
|
||||
motion_do_blocking_move_to_z(resume_position.xyz[2], feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||
|
||||
// From this point forward, power panic should not use
|
||||
// the partial backup in RAM since the extruder is no
|
||||
// longer in parking position
|
||||
marlin_clear_print_state_in_ram();
|
||||
|
||||
mmu_print_saved &= ~(SavedState::ParkExtruder);
|
||||
}
|
||||
}
|
||||
|
||||
void MMU2::CheckUserInput() {
|
||||
auto btn = ButtonPressed((uint16_t)lastErrorCode);
|
||||
auto btn = ButtonPressed(lastErrorCode);
|
||||
|
||||
// Was a button pressed on the MMU itself instead of the LCD?
|
||||
if (btn == Buttons::NoButton && lastButton != Buttons::NoButton) {
|
||||
|
|
@ -685,29 +727,27 @@ void MMU2::CheckUserInput() {
|
|||
lastButton = Buttons::NoButton; // Clear it.
|
||||
}
|
||||
|
||||
if (mmu2.MMULastErrorSource() == ErrorSourcePrinter && btn != Buttons::NoButton) {
|
||||
// When the printer has raised an error screen, and a button was selected
|
||||
// the error screen should always be dismissed.
|
||||
ClearPrinterError();
|
||||
// A horrible hack - clear the explicit printer error allowing manage_response to recover on MMU's Finished state
|
||||
// Moreover - if the MMU is currently doing something (like the LoadFilament - see comment above)
|
||||
// we'll actually wait for it automagically in manage_response and after it finishes correctly,
|
||||
// we'll issue another command (like toolchange)
|
||||
}
|
||||
|
||||
switch (btn) {
|
||||
case Left:
|
||||
case Middle:
|
||||
case Right:
|
||||
case Buttons::Left:
|
||||
case Buttons::Middle:
|
||||
case Buttons::Right:
|
||||
SERIAL_ECHOPGM("CheckUserInput-btnLMR ");
|
||||
SERIAL_ECHOLN(btn);
|
||||
|
||||
// clear the explicit printer error as soon as possible so that the MMU error screens + reporting doesn't get too confused
|
||||
if (lastErrorCode == ErrorCode::LOAD_TO_EXTRUDER_FAILED) {
|
||||
// A horrible hack - clear the explicit printer error allowing manage_response to recover on MMU's Finished state
|
||||
// Moreover - if the MMU is currently doing something (like the LoadFilament - see comment above)
|
||||
// we'll actually wait for it automagically in manage_response and after it finishes correctly,
|
||||
// we'll issue another command (like toolchange)
|
||||
logic.ClearPrinterError();
|
||||
lastErrorCode = ErrorCode::OK;
|
||||
lastErrorSource = ErrorSourceNone; // this seems to help clearing the error screen
|
||||
}
|
||||
|
||||
SERIAL_ECHOLN((int)buttons_to_uint8t(btn));
|
||||
ResumeHotendTemp(); // Recover the hotend temp before we attempt to do anything else...
|
||||
|
||||
if (mmu2.MMULastErrorSource() == MMU2::ErrorSourceMMU) {
|
||||
if (mmu2.MMULastErrorSource() == ErrorSourceMMU) {
|
||||
// Do not send a button to the MMU unless the MMU is in error state
|
||||
Button(btn);
|
||||
Button(buttons_to_uint8t(btn));
|
||||
}
|
||||
|
||||
// A quick hack: for specific error codes move the E-motor every time.
|
||||
|
|
@ -722,14 +762,23 @@ void MMU2::CheckUserInput() {
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case RestartMMU:
|
||||
case Buttons::TuneMMU:
|
||||
Tune();
|
||||
break;
|
||||
case Buttons::Load:
|
||||
case Buttons::Eject:
|
||||
// High level operation
|
||||
SetPrinterButtonOperation(btn);
|
||||
break;
|
||||
case Buttons::ResetMMU:
|
||||
Reset(ResetPin); // we cannot do power cycle on the MK3
|
||||
// ... but mmu2_power.cpp knows this and triggers a soft-reset instead.
|
||||
break;
|
||||
case DisableMMU:
|
||||
Stop(); // Poweroff handles updating the EEPROM shutoff.
|
||||
case Buttons::DisableMMU:
|
||||
Stop();
|
||||
DisableMMUInSettings();
|
||||
break;
|
||||
case StopPrint:
|
||||
case Buttons::StopPrint:
|
||||
// @@TODO not sure if we shall handle this high level operation at this spot
|
||||
break;
|
||||
default:
|
||||
|
|
@ -758,6 +807,7 @@ bool MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
|||
// - failed -> then do the safety moves on the printer like before
|
||||
// - finished ok -> proceed with reading other commands
|
||||
safe_delay_keep_alive(0); // calls LogicStep() and remembers its return status
|
||||
// also disables stepper motor unlocking
|
||||
|
||||
if (mmu_print_saved & SavedState::CooldownPending) {
|
||||
if (!nozzleTimeout.running()) {
|
||||
|
|
@ -779,8 +829,14 @@ bool MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
|||
// command/operation completed, let Marlin continue its work
|
||||
// the E may have some more moves to finish - wait for them
|
||||
ResumeHotendTemp();
|
||||
ResumeUnpark(); // We can now travel back to the tower or wherever we were when we saved.
|
||||
logic.ResetRetryAttempts(); // Reset the retry counter.
|
||||
ResumeUnpark(); // We can now travel back to the tower or wherever we were when we saved.
|
||||
if (!TuneMenuEntered()) {
|
||||
// If the error screen is sleeping (running 'Tune' menu)
|
||||
// then don't reset retry attempts because we this will trigger
|
||||
// an automatic retry attempt when 'Tune' button is selected. We want the
|
||||
// error screen to appear once more so the user can hit 'Retry' button manually.
|
||||
logic.ResetRetryAttempts(); // Reset the retry counter.
|
||||
}
|
||||
planner_synchronize();
|
||||
return true;
|
||||
case Interrupted:
|
||||
|
|
@ -820,45 +876,58 @@ bool MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
|||
}
|
||||
|
||||
StepStatus MMU2::LogicStep(bool reportErrors) {
|
||||
CheckUserInput(); // Process any buttons before proceeding with another MMU Query
|
||||
StepStatus ss = logic.Step();
|
||||
// Process any buttons before proceeding with another MMU Query
|
||||
CheckUserInput();
|
||||
|
||||
const StepStatus ss = logic.Step();
|
||||
switch (ss) {
|
||||
|
||||
case Finished:
|
||||
// At this point it is safe to trigger a runout and not interrupt the MMU protocol
|
||||
CheckFINDARunout();
|
||||
break;
|
||||
|
||||
case Processing:
|
||||
OnMMUProgressMsg(logic.Progress());
|
||||
break;
|
||||
|
||||
case ButtonPushed:
|
||||
lastButton = logic.Button();
|
||||
LogEchoEvent_P(PSTR("MMU Button pushed"));
|
||||
CheckUserInput(); // Process the button immediately
|
||||
break;
|
||||
|
||||
case Interrupted:
|
||||
// can be silently handed over to a higher layer, no processing necessary at this spot
|
||||
break;
|
||||
|
||||
default:
|
||||
if (reportErrors) {
|
||||
switch (ss) {
|
||||
|
||||
case CommandError:
|
||||
ReportError(logic.Error(), ErrorSourceMMU);
|
||||
break;
|
||||
|
||||
case CommunicationTimeout:
|
||||
state = xState::Connecting;
|
||||
ReportError(ErrorCode::MMU_NOT_RESPONDING, ErrorSourcePrinter);
|
||||
break;
|
||||
|
||||
case ProtocolError:
|
||||
state = xState::Connecting;
|
||||
ReportError(ErrorCode::PROTOCOL_ERROR, ErrorSourcePrinter);
|
||||
break;
|
||||
|
||||
case VersionMismatch:
|
||||
StopKeepPowered();
|
||||
ReportError(ErrorCode::VERSION_MISMATCH, ErrorSourcePrinter);
|
||||
break;
|
||||
|
||||
case PrinterError:
|
||||
ReportError(logic.PrinterError(), ErrorSourcePrinter);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -868,6 +937,7 @@ StepStatus MMU2::LogicStep(bool reportErrors) {
|
|||
if (logic.Running()) {
|
||||
state = xState::Active;
|
||||
}
|
||||
|
||||
return ss;
|
||||
}
|
||||
|
||||
|
|
@ -875,16 +945,19 @@ void MMU2::filament_ramming() {
|
|||
execute_extruder_sequence(ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
|
||||
}
|
||||
|
||||
void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t steps) {
|
||||
void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t stepCount) {
|
||||
planner_synchronize();
|
||||
Enable_E0();
|
||||
|
||||
// Plan the moves
|
||||
const E_Step *step = sequence;
|
||||
for (uint8_t i = steps; i ; --i) {
|
||||
MoveE(pgm_read_float(&(step->extrude)), pgm_read_float(&(step->feedRate)));
|
||||
for (uint8_t i = stepCount; i > 0; --i) {
|
||||
extruder_move(pgm_read_float(&(step->extrude)), pgm_read_float(&(step->feedRate)));
|
||||
step++;
|
||||
}
|
||||
planner_synchronize(); // it looks like it's better to sync the moves at the end - smoother move (if the sequence is not too long).
|
||||
|
||||
// Wait for the moves to finish
|
||||
// it looks like it's better to sync the moves at the end - smoother move (if the sequence is not too long).
|
||||
planner_synchronize();
|
||||
|
||||
Disable_E0();
|
||||
}
|
||||
|
|
@ -927,12 +1000,13 @@ void MMU2::ReportError(ErrorCode ec, ErrorSource res) {
|
|||
if (ec != lastErrorCode) { // deduplicate: only report changes in error codes into the log
|
||||
lastErrorCode = ec;
|
||||
lastErrorSource = res;
|
||||
LogErrorEvent_P(_O(PrusaErrorTitle(PrusaErrorCodeIndex((uint16_t)ec))));
|
||||
LogErrorEvent_P(_O(PrusaErrorTitle(PrusaErrorCodeIndex(ec))));
|
||||
|
||||
if (ec != ErrorCode::OK) {
|
||||
if (ec != ErrorCode::OK && ec != ErrorCode::FILAMENT_EJECTED && ec != ErrorCode::FILAMENT_CHANGE) {
|
||||
IncrementMMUFails();
|
||||
|
||||
// check if it is a "power" failure - we consider TMC-related errors as power failures
|
||||
// clang-format off
|
||||
static constexpr uint16_t tmcMask =
|
||||
( (uint16_t)ErrorCode::TMC_IOIN_MISMATCH
|
||||
| (uint16_t)ErrorCode::TMC_RESET
|
||||
|
|
@ -941,6 +1015,7 @@ void MMU2::ReportError(ErrorCode ec, ErrorSource res) {
|
|||
| (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN
|
||||
| (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR
|
||||
| (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION ) & 0x7fffU; // skip the top bit
|
||||
// clang-format on
|
||||
static_assert(tmcMask == 0x7e00); // just make sure we fail compilation if any of the TMC error codes change
|
||||
|
||||
if ((uint16_t)ec & tmcMask) { // @@TODO can be optimized to uint8_t operation
|
||||
|
|
@ -950,11 +1025,11 @@ void MMU2::ReportError(ErrorCode ec, ErrorSource res) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!mmu2.RetryIfPossible((uint16_t)ec)) {
|
||||
if (!mmu2.RetryIfPossible(ec)) {
|
||||
// If retry attempts are all used up
|
||||
// or if 'Retry' operation is not available
|
||||
// raise the MMU error sceen and wait for user input
|
||||
ReportErrorHook((CommandInProgress)logic.CommandInProgress(), (uint16_t)ec, uint8_t(lastErrorSource));
|
||||
// raise the MMU error screen and wait for user input
|
||||
ReportErrorHook((CommandInProgress)logic.CommandInProgress(), ec, uint8_t(lastErrorSource));
|
||||
}
|
||||
|
||||
static_assert(mmu2Magic[0] == 'M'
|
||||
|
|
@ -967,8 +1042,8 @@ void MMU2::ReportError(ErrorCode ec, ErrorSource res) {
|
|||
}
|
||||
|
||||
void MMU2::ReportProgress(ProgressCode pc) {
|
||||
ReportProgressHook((CommandInProgress)logic.CommandInProgress(), (uint16_t)pc);
|
||||
LogEchoEvent_P(_O(ProgressCodeToText((uint16_t)pc)));
|
||||
ReportProgressHook((CommandInProgress)logic.CommandInProgress(), pc);
|
||||
LogEchoEvent_P(_O(ProgressCodeToText(pc)));
|
||||
}
|
||||
|
||||
void MMU2::OnMMUProgressMsg(ProgressCode pc) {
|
||||
|
|
@ -985,7 +1060,7 @@ void MMU2::OnMMUProgressMsgChanged(ProgressCode pc) {
|
|||
switch (pc) {
|
||||
case ProgressCode::UnloadingToFinda:
|
||||
if ((CommandInProgress)logic.CommandInProgress() == CommandInProgress::UnloadFilament
|
||||
|| ((CommandInProgress)logic.CommandInProgress() == CommandInProgress::ToolChange)) {
|
||||
|| ((CommandInProgress)logic.CommandInProgress() == CommandInProgress::ToolChange)) {
|
||||
// If MK3S sent U0 command, ramming sequence takes care of releasing the filament.
|
||||
// If Toolchange is done while printing, PrusaSlicer takes care of releasing the filament
|
||||
// If printing is not in progress, ToolChange will issue a U0 command.
|
||||
|
|
@ -1009,7 +1084,7 @@ void MMU2::OnMMUProgressMsgChanged(ProgressCode pc) {
|
|||
}
|
||||
|
||||
void __attribute__((noinline)) MMU2::HelpUnloadToFinda() {
|
||||
MoveE(-MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH, MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE);
|
||||
extruder_move(-MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH, MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE);
|
||||
}
|
||||
|
||||
void MMU2::OnMMUProgressMsgSame(ProgressCode pc) {
|
||||
|
|
@ -1033,14 +1108,10 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc) {
|
|||
case FilamentState::AT_FSENSOR:
|
||||
// fsensor triggered, finish FeedingToExtruder state
|
||||
loadFilamentStarted = false;
|
||||
|
||||
// Abort any excess E-move from the planner queue
|
||||
planner_abort_queued_moves();
|
||||
|
||||
// After the MMU knows the FSENSOR is triggered it will:
|
||||
// 1. Push the filament by additional 30mm (see fsensorToNozzle)
|
||||
// 2. Disengage the idler and push another 2mm.
|
||||
MoveE(logic.ExtraLoadDistance() + 2, MMU2_LOAD_TO_NOZZLE_FEED_RATE);
|
||||
{
|
||||
extruder_move(logic.ExtraLoadDistance() + 2, logic.PulleySlowFeedRate());
|
||||
}
|
||||
break;
|
||||
case FilamentState::NOT_PRESENT:
|
||||
// fsensor not triggered, continue moving extruder
|
||||
|
|
@ -1050,7 +1121,7 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc) {
|
|||
// than 450mm because the firmware will ignore too long extrusions
|
||||
// for safety reasons. See PREVENT_LENGTHY_EXTRUDE.
|
||||
// Use 350mm to be safely away from the prevention threshold
|
||||
MoveE(350.0f, MMU2_LOAD_TO_NOZZLE_FEED_RATE);
|
||||
extruder_move(350.0f, logic.PulleySlowFeedRate());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -5,15 +5,13 @@
|
|||
#include "mmu2_marlin.h"
|
||||
|
||||
#ifdef __AVR__
|
||||
#include "mmu2_protocol_logic.h"
|
||||
#include "mmu2_protocol_logic.h"
|
||||
typedef float feedRate_t;
|
||||
|
||||
#else
|
||||
|
||||
#include "protocol_logic.h"
|
||||
#include "../../Marlin/src/core/macros.h"
|
||||
#include "../../Marlin/src/core/types.h"
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
struct E_Step;
|
||||
|
|
@ -35,6 +33,7 @@ struct Version {
|
|||
class MMU2 {
|
||||
public:
|
||||
MMU2();
|
||||
~MMU2();
|
||||
|
||||
/// Powers ON the MMU, then initializes the UART and protocol logic
|
||||
void Start();
|
||||
|
|
@ -42,23 +41,26 @@ public:
|
|||
/// Stops the protocol logic, closes the UART, powers OFF the MMU
|
||||
void Stop();
|
||||
|
||||
/// Serial output of MMU state
|
||||
void Status();
|
||||
|
||||
inline xState State() const { return state; }
|
||||
|
||||
inline bool Enabled() const { return State() == xState::Active; }
|
||||
|
||||
/// Different levels of resetting the MMU
|
||||
enum ResetForm : uint8_t {
|
||||
Software = 0, ///< sends a X0 command into the MMU, the MMU will watchdog-reset itself
|
||||
ResetPin = 1, ///< trigger the reset pin of the MMU
|
||||
Software = 0, ///< sends a X0 command into the MMU, the MMU will watchdog-reset itself
|
||||
ResetPin = 1, ///< trigger the reset pin of the MMU
|
||||
CutThePower = 2, ///< power off and power on (that includes +5V and +24V power lines)
|
||||
EraseEEPROM = 42, ///< erase MMU EEPROM and then perform a software reset
|
||||
};
|
||||
|
||||
/// Saved print state on error.
|
||||
enum SavedState : uint8_t {
|
||||
None = 0, // No state saved.
|
||||
None = 0, // No state saved.
|
||||
ParkExtruder = 1, // The extruder was parked.
|
||||
Cooldown = 2, // The extruder was allowed to cool.
|
||||
Cooldown = 2, // The extruder was allowed to cool.
|
||||
CooldownPending = 4,
|
||||
};
|
||||
|
||||
|
|
@ -69,6 +71,10 @@ public:
|
|||
ErrorSourceNone = 0xFF,
|
||||
};
|
||||
|
||||
/// Tune value in MMU registers as a way to recover from errors
|
||||
/// e.g. Idler Stallguard threshold
|
||||
void Tune();
|
||||
|
||||
/// Perform a reset of the MMU
|
||||
/// @param level physical form of the reset
|
||||
void Reset(ResetForm level);
|
||||
|
|
@ -159,9 +165,15 @@ public:
|
|||
/// @returns Current error code
|
||||
inline ErrorCode MMUCurrentErrorCode() const { return logic.Error(); }
|
||||
|
||||
/// @returns Command in progress
|
||||
inline uint8_t GetCommandInProgress() const { return logic.CommandInProgress(); }
|
||||
|
||||
/// @returns Last error source
|
||||
inline ErrorSource MMULastErrorSource() const { return lastErrorSource; }
|
||||
|
||||
/// @returns Last error code
|
||||
inline ErrorCode GetLastErrorCode() const { return lastErrorCode; }
|
||||
|
||||
/// @returns the version of the connected MMU FW.
|
||||
/// In the future we'll return the trully detected FW version
|
||||
Version GetMMUFWVersion() const {
|
||||
|
|
@ -178,7 +190,7 @@ public:
|
|||
/// Automagically "press" a Retry button if we have any retry attempts left
|
||||
/// @param ec ErrorCode enum value
|
||||
/// @returns true if auto-retry is ongoing, false when retry is unavailable or retry attempts are all used up
|
||||
bool RetryIfPossible(uint16_t ec);
|
||||
bool RetryIfPossible(ErrorCode ec);
|
||||
|
||||
/// @return count for toolchange in current print
|
||||
inline uint16_t ToolChangeCounter() const { return toolchange_counter; };
|
||||
|
|
@ -190,7 +202,46 @@ public:
|
|||
inline void IncrementTMCFailures() { ++tmcFailures; }
|
||||
inline void ClearTMCFailures() { tmcFailures = 0; }
|
||||
|
||||
/// Retrieve cached value parsed from ReadRegister()
|
||||
/// or using M707
|
||||
inline uint16_t GetLastReadRegisterValue() const {
|
||||
return lastReadRegisterValue;
|
||||
};
|
||||
inline void InvokeErrorScreen(ErrorCode ec) {
|
||||
// The printer may not raise an error when the MMU is busy
|
||||
if (!logic.CommandInProgress() // MMU must not be busy
|
||||
&& MMUCurrentErrorCode() == ErrorCode::OK // The protocol must not be in error state
|
||||
&& lastErrorCode != ec) // The error code is not a duplicate
|
||||
{
|
||||
ReportError(ec, ErrorSource::ErrorSourcePrinter);
|
||||
}
|
||||
}
|
||||
|
||||
void ClearPrinterError() {
|
||||
logic.ClearPrinterError();
|
||||
lastErrorCode = ErrorCode::OK;
|
||||
lastErrorSource = ErrorSource::ErrorSourceNone;
|
||||
}
|
||||
|
||||
/// @brief Queue a button operation which the printer can act upon
|
||||
/// @param btn Button operation
|
||||
inline void SetPrinterButtonOperation(Buttons btn) {
|
||||
printerButtonOperation = btn;
|
||||
}
|
||||
|
||||
/// @brief Get the printer button operation
|
||||
/// @return currently set printer button operation, it can be NoButton if nothing is queued
|
||||
inline Buttons GetPrinterButtonOperation() {
|
||||
return printerButtonOperation;
|
||||
}
|
||||
|
||||
inline void ClearPrinterButtonOperation() {
|
||||
printerButtonOperation = Buttons::NoButton;
|
||||
}
|
||||
|
||||
#ifndef UNITTEST
|
||||
private:
|
||||
#endif
|
||||
/// Perform software self-reset of the MMU (sends an X0 command)
|
||||
void ResetX0();
|
||||
|
||||
|
|
@ -224,7 +275,9 @@ private:
|
|||
StepStatus LogicStep(bool reportErrors);
|
||||
|
||||
void filament_ramming();
|
||||
void execute_extruder_sequence(const E_Step *sequence, uint8_t steps);
|
||||
|
||||
void execute_extruder_sequence(const E_Step *sequence, uint8_t stepCount);
|
||||
|
||||
void execute_load_to_nozzle_sequence();
|
||||
|
||||
/// Reports an error into attached ExtUIs
|
||||
|
|
@ -238,6 +291,11 @@ private:
|
|||
|
||||
/// Responds to a change of MMU's progress
|
||||
/// - plans additional steps, e.g. starts the E-motor after fsensor trigger
|
||||
/// The function is quite complex, because it needs to handle asynchronnous
|
||||
/// progress and error reports coming from the MMU without an explicit command
|
||||
/// - typically after MMU's start or after some HW issue on the MMU.
|
||||
/// It must ensure, that calls to @ref ReportProgress and/or @ref ReportError are
|
||||
/// only executed after @ref BeginReport has been called first.
|
||||
void OnMMUProgressMsg(ProgressCode pc);
|
||||
/// Progress code changed - act accordingly
|
||||
void OnMMUProgressMsgChanged(ProgressCode pc);
|
||||
|
|
@ -286,8 +344,11 @@ private:
|
|||
void UnloadInner();
|
||||
void CutFilamentInner(uint8_t slot);
|
||||
|
||||
ProtocolLogic logic; ///< implementation of the protocol logic layer
|
||||
uint8_t extruder; ///< currently active slot in the MMU ... somewhat... not sure where to get it from yet
|
||||
void SetCurrentTool(uint8_t ex);
|
||||
|
||||
ProtocolLogic logic; ///< implementation of the protocol logic layer
|
||||
|
||||
uint8_t extruder; ///< currently active slot in the MMU ... somewhat... not sure where to get it from yet
|
||||
uint8_t tool_change_extruder; ///< only used for UI purposes
|
||||
|
||||
pos3d resume_position;
|
||||
|
|
@ -297,6 +358,8 @@ private:
|
|||
ErrorCode lastErrorCode = ErrorCode::MMU_NOT_RESPONDING;
|
||||
ErrorSource lastErrorSource = ErrorSource::ErrorSourceNone;
|
||||
Buttons lastButton = Buttons::NoButton;
|
||||
uint16_t lastReadRegisterValue = 0;
|
||||
Buttons printerButtonOperation = Buttons::NoButton;
|
||||
|
||||
StepStatus logicStepLastStatus;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
#include <stdint.h>
|
||||
|
||||
// Helper macros to parse the operations from Btns()
|
||||
#define BUTTON_OP_RIGHT(X) ( ( X & 0xF0 ) >> 4 )
|
||||
#define BUTTON_OP_MIDDLE(X) ( X & 0x0F )
|
||||
#define BUTTON_OP_RIGHT(X) ((X & 0xF0) >> 4)
|
||||
#define BUTTON_OP_MIDDLE(X) (X & 0x0F)
|
||||
|
||||
namespace MMU2 {
|
||||
|
||||
|
|
@ -13,25 +13,34 @@ enum class ButtonOperations : uint8_t {
|
|||
NoOperation = 0,
|
||||
Retry = 1,
|
||||
Continue = 2,
|
||||
RestartMMU = 3,
|
||||
ResetMMU = 3,
|
||||
Unload = 4,
|
||||
StopPrint = 5,
|
||||
DisableMMU = 6,
|
||||
Load = 5,
|
||||
Eject = 6,
|
||||
Tune = 7,
|
||||
StopPrint = 8,
|
||||
DisableMMU = 9,
|
||||
};
|
||||
|
||||
/// Button codes + extended actions performed on the printer's side
|
||||
enum Buttons : uint8_t {
|
||||
enum class Buttons : uint_least8_t {
|
||||
Right = 0,
|
||||
Middle,
|
||||
Left,
|
||||
|
||||
|
||||
// performed on the printer's side
|
||||
RestartMMU,
|
||||
ResetMMU,
|
||||
Load,
|
||||
Eject,
|
||||
StopPrint,
|
||||
DisableMMU,
|
||||
|
||||
TuneMMU, // Printer changes MMU register value
|
||||
|
||||
NoButton = 0xff // shall be kept last
|
||||
};
|
||||
|
||||
constexpr uint_least8_t buttons_to_uint8t(Buttons b) {
|
||||
return static_cast<uint8_t>(b);
|
||||
}
|
||||
|
||||
} // namespace MMU2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
# download Prusa Error Codes for MMU
|
||||
#wget https://raw.githubusercontent.com/3d-gussner/Prusa-Error-Codes/master/04_MMU/error-codes.yaml --output-document=error-codes.yaml
|
||||
wget https://raw.githubusercontent.com/prusa3d/Prusa-Error-Codes/master/04_MMU/error-codes.yaml --output-document=error-codes.yaml
|
||||
|
||||
oifs="$IFS" ## save original IFS
|
||||
IFS=$'\n' ## set IFS to break on newline
|
||||
codes=($(cat error-codes.yaml |grep "code:" |cut -d '"' -f2))
|
||||
titles=($(cat error-codes.yaml |grep 'title:' |cut -d '"' -f2))
|
||||
texts=($(cat error-codes.yaml |grep "text:" |cut -d '"' -f2))
|
||||
actions=($(cat error-codes.yaml |grep "action:" |cut -d ':' -f2))
|
||||
ids=($(cat error-codes.yaml |grep "id:" |cut -d '"' -f2))
|
||||
IFS="$oifs" ## restore original IFS
|
||||
|
||||
filename=errors_list.h
|
||||
|
||||
clear
|
||||
for ((i = 0; i < ${#codes[@]}; i++)) do
|
||||
code=${codes[i]}
|
||||
id=$(cat $filename |grep "${code#04*}" | cut -d "=" -f1 | cut -d "_" -f3- |cut -d " " -f1)
|
||||
title=$(cat $filename |grep "${id}" |grep --max-count=1 "MSG_TITLE" |cut -d '"' -f2)
|
||||
text=$(cat $filename |grep "${id}" |grep --max-count=1 "MSG_DESC" |cut -d '"' -f2)
|
||||
action1=$(cat $filename |grep "),//$id"| cut -d "," -f1)
|
||||
action2=$(cat $filename |grep "),//$id"| cut -d "," -f2)
|
||||
action1=$(echo $action1 | cut -d ":" -f2- |cut -d ":" -f2)
|
||||
action2=$(echo $action2 | cut -d ":" -f2- |cut -d ":" -f2 |cut -d ")" -f1)
|
||||
if [ "$action2" == "NoOperation" ]; then
|
||||
action=" [$action1]"
|
||||
else
|
||||
action=" [$action1,$action2]"
|
||||
fi
|
||||
echo -n "code: $code |"
|
||||
if [ "$id" != "${ids[i]}" ]; then
|
||||
echo -n "$(tput setaf 1) $id $(tput sgr0) # $(tput setaf 2)${ids[i]}$(tput sgr0)|"
|
||||
else
|
||||
echo -n " $id |"
|
||||
fi
|
||||
if [ "$title" != "${titles[i]}" ]; then
|
||||
echo -n "$(tput setaf 1) $title $(tput sgr0) # $(tput setaf 2)${titles[i]}$(tput sgr0)|"
|
||||
else
|
||||
echo -n " $title |"
|
||||
fi
|
||||
if [ "$text" != "${texts[i]}" ]; then
|
||||
echo -n "$(tput setaf 1) $text $(tput sgr0) # $(tput setaf 2)${texts[i]}$(tput sgr0)|"
|
||||
else
|
||||
echo -n " $text |"
|
||||
fi
|
||||
if [ "$action" != "${actions[i]}" ]; then
|
||||
echo -n "$(tput setaf 1) $action $(tput sgr0) # $(tput setaf 2)${actions[i]}$(tput sgr0)|"
|
||||
else
|
||||
echo -n " $action |"
|
||||
fi
|
||||
echo
|
||||
done
|
||||
|
|
@ -58,7 +58,8 @@ enum class ErrorCode : uint_fast16_t {
|
|||
|
||||
MCU_UNDERVOLTAGE_VCC = 0x800d, ///< MCU VCC rail undervoltage.
|
||||
|
||||
LOAD_TO_EXTRUDER_FAILED = 0x802a, ///< E32811 internal error of the printer - try-load-unload sequence detected missing filament -> failed load into the nozzle
|
||||
FILAMENT_CHANGE = 0x8029, ///< E32809 internal error of the printer - try-load-unload sequence detected missing filament -> failed load into the nozzle
|
||||
LOAD_TO_EXTRUDER_FAILED = 0x802a, ///< E32810 internal error of the printer - try-load-unload sequence detected missing filament -> failed load into the nozzle
|
||||
QUEUE_FULL = 0x802b, ///< E32811 internal logic error - attempt to move with a full queue
|
||||
VERSION_MISMATCH = 0x802c, ///< E32812 internal error of the printer - incompatible version of the MMU FW
|
||||
PROTOCOL_ERROR = 0x802d, ///< E32813 internal error of the printer - communication with the MMU got garbled - protocol decoder couldn't decode the incoming messages
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#pragma once
|
||||
#include "inttypes.h"
|
||||
#include "../language.h"
|
||||
#include "../lcd.h"
|
||||
#include <avr/pgmspace.h>
|
||||
#include "buttons.h"
|
||||
#include "../strlen_cx.h"
|
||||
|
|
@ -18,9 +19,9 @@ typedef enum : uint16_t {
|
|||
|
||||
ERR_MECHANICAL = 100,
|
||||
ERR_MECHANICAL_FINDA_DIDNT_TRIGGER = 101,
|
||||
ERR_MECHANICAL_FINDA_DIDNT_GO_OFF = 102,
|
||||
ERR_MECHANICAL_FINDA_FILAMENT_STUCK = 102,
|
||||
ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER = 103,
|
||||
ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF = 104,
|
||||
ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK = 104,
|
||||
|
||||
ERR_MECHANICAL_PULLEY_CANNOT_MOVE = 105,
|
||||
ERR_MECHANICAL_FSENSOR_TOO_EARLY = 106,
|
||||
|
|
@ -32,37 +33,37 @@ typedef enum : uint16_t {
|
|||
ERR_MECHANICAL_IDLER_CANNOT_MOVE = 126,
|
||||
|
||||
ERR_TEMPERATURE = 200,
|
||||
ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT = 201,
|
||||
ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT = 211,
|
||||
ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT = 221,
|
||||
ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT = 201,
|
||||
ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT = 211,
|
||||
ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT = 221,
|
||||
|
||||
ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR = 202,
|
||||
ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR = 212,
|
||||
ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR = 222,
|
||||
ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR = 202,
|
||||
ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR = 212,
|
||||
ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR = 222,
|
||||
|
||||
|
||||
ERR_ELECTRICAL = 300,
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR = 301,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR = 311,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR = 321,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR = 301,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR = 311,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR = 321,
|
||||
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET = 302,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET = 312,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET = 322,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET = 302,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET = 312,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET = 322,
|
||||
|
||||
ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR = 303,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR = 313,
|
||||
ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR = 323,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR = 303,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR = 313,
|
||||
ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR = 323,
|
||||
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED = 304,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED = 314,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED = 324,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED = 304,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED = 314,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED = 324,
|
||||
|
||||
ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED = 305,
|
||||
ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED = 315,
|
||||
ERR_ELECTRICAL_IDLER_SELFTEST_FAILED = 325,
|
||||
ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED = 305,
|
||||
ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED = 315,
|
||||
ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED = 325,
|
||||
|
||||
ERR_ELECTRICAL_MCU_UNDERVOLTAGE_VCC = 306,
|
||||
ERR_ELECTRICAL_MMU_MCU_ERROR = 306,
|
||||
|
||||
ERR_CONNECT = 400,
|
||||
ERR_CONNECT_MMU_NOT_RESPONDING = 401,
|
||||
|
|
@ -77,8 +78,9 @@ typedef enum : uint16_t {
|
|||
ERR_SYSTEM_FW_RUNTIME_ERROR = 505,
|
||||
ERR_SYSTEM_UNLOAD_MANUALLY = 506,
|
||||
ERR_SYSTEM_FILAMENT_EJECTED = 507,
|
||||
ERR_SYSTEM_FILAMENT_CHANGE = 508,
|
||||
|
||||
ERR_OTHER = 900
|
||||
ERR_OTHER_UNKNOWN_ERROR = 900
|
||||
} err_num_t;
|
||||
|
||||
// Avr gcc has serious trouble understanding static data structures in PROGMEM
|
||||
|
|
@ -87,9 +89,9 @@ typedef enum : uint16_t {
|
|||
// it really makes no difference if there are "nice" data structures or plain arrays.
|
||||
static const constexpr uint16_t errorCodes[] PROGMEM = {
|
||||
ERR_MECHANICAL_FINDA_DIDNT_TRIGGER,
|
||||
ERR_MECHANICAL_FINDA_DIDNT_GO_OFF,
|
||||
ERR_MECHANICAL_FINDA_FILAMENT_STUCK,
|
||||
ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER,
|
||||
ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF,
|
||||
ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK,
|
||||
ERR_MECHANICAL_PULLEY_CANNOT_MOVE,
|
||||
ERR_MECHANICAL_FSENSOR_TOO_EARLY,
|
||||
ERR_MECHANICAL_INSPECT_FINDA,
|
||||
|
|
@ -98,44 +100,46 @@ static const constexpr uint16_t errorCodes[] PROGMEM = {
|
|||
ERR_MECHANICAL_SELECTOR_CANNOT_MOVE,
|
||||
ERR_MECHANICAL_IDLER_CANNOT_HOME,
|
||||
ERR_MECHANICAL_IDLER_CANNOT_MOVE,
|
||||
ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT,
|
||||
ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT,
|
||||
ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT,
|
||||
ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR,
|
||||
ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR,
|
||||
ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR,
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_IDLER_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_MCU_UNDERVOLTAGE_VCC,
|
||||
ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT,
|
||||
ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT,
|
||||
ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT,
|
||||
ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR,
|
||||
ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR,
|
||||
ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR,
|
||||
ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED,
|
||||
ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED,
|
||||
ERR_ELECTRICAL_MMU_MCU_ERROR,
|
||||
ERR_CONNECT_MMU_NOT_RESPONDING,
|
||||
ERR_CONNECT_COMMUNICATION_ERROR,
|
||||
ERR_SYSTEM_FILAMENT_ALREADY_LOADED,
|
||||
ERR_SYSTEM_INVALID_TOOL,
|
||||
ERR_SYSTEM_QUEUE_FULL,
|
||||
ERR_SYSTEM_FW_UPDATE_NEEDED,
|
||||
ERR_SYSTEM_FILAMENT_ALREADY_LOADED,
|
||||
ERR_SYSTEM_INVALID_TOOL,
|
||||
ERR_SYSTEM_QUEUE_FULL,
|
||||
ERR_SYSTEM_FW_UPDATE_NEEDED,
|
||||
ERR_SYSTEM_FW_RUNTIME_ERROR,
|
||||
ERR_SYSTEM_UNLOAD_MANUALLY,
|
||||
ERR_SYSTEM_FILAMENT_EJECTED
|
||||
ERR_SYSTEM_FILAMENT_EJECTED,
|
||||
ERR_SYSTEM_FILAMENT_CHANGE,
|
||||
ERR_OTHER_UNKNOWN_ERROR
|
||||
};
|
||||
|
||||
// @@TODO some of the strings are duplicates, can be merged into one 01234567890123456789
|
||||
static const char MSG_TITLE_FINDA_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FINDA DIDNT TRIGGER"); ////MSG_TITLE_FINDA_DIDNT_TRIGGER c=20
|
||||
static const char MSG_TITLE_FINDA_DIDNT_GO_OFF[] PROGMEM_I1 = ISTR("FINDA: FILAM. STUCK"); ////MSG_TITLE_FINDA_DIDNT_GO_OFF c=20
|
||||
static const char MSG_TITLE_FINDA_FILAMENT_STUCK[] PROGMEM_I1 = ISTR("FINDA FILAM. STUCK"); ////MSG_TITLE_FINDA_FILAMENT_STUCK c=20
|
||||
static const char MSG_TITLE_FSENSOR_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FSENSOR DIDNT TRIGG."); ////MSG_TITLE_FSENSOR_DIDNT_TRIGGER c=20
|
||||
static const char MSG_TITLE_FSENSOR_DIDNT_GO_OFF[] PROGMEM_I1 = ISTR("FSENSOR: FIL. STUCK"); ////MSG_TITLE_FSENSOR_DIDNT_GO_OFF c=20
|
||||
static const char MSG_TITLE_FSENSOR_FILAMENT_STUCK[] PROGMEM_I1 = ISTR("FSENSOR FIL. STUCK"); ////MSG_TITLE_FSENSOR_FILAMENT_STUCK c=20
|
||||
static const char MSG_TITLE_PULLEY_CANNOT_MOVE[] PROGMEM_I1 = ISTR("PULLEY CANNOT MOVE"); ////MSG_TITLE_PULLEY_CANNOT_MOVE c=20
|
||||
static const char MSG_TITLE_FSENSOR_TOO_EARLY[] PROGMEM_I1 = ISTR("FSENSOR TOO EARLY"); ////MSG_TITLE_FSENSOR_TOO_EARLY c=20
|
||||
static const char MSG_TITLE_INSPECT_FINDA[] PROGMEM_I1 = ISTR("INSPECT FINDA"); ////MSG_TITLE_INSPECT_FINDA c=20
|
||||
|
|
@ -145,40 +149,51 @@ static const char MSG_TITLE_SELECTOR_CANNOT_HOME[] PROGMEM_I1 = ISTR("SELECTO
|
|||
static const char MSG_TITLE_IDLER_CANNOT_MOVE[] PROGMEM_I1 = ISTR("IDLER CANNOT MOVE"); ////MSG_TITLE_IDLER_CANNOT_MOVE c=20
|
||||
static const char MSG_TITLE_IDLER_CANNOT_HOME[] PROGMEM_I1 = ISTR("IDLER CANNOT HOME"); ////MSG_TITLE_IDLER_CANNOT_HOME c=20
|
||||
static const char MSG_TITLE_TMC_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT"); ////MSG_TITLE_TMC_WARNING_TMC_TOO_HOT c=20
|
||||
//static const char MSG_TITLE_TMC_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT"); ////MSG_TITLE_TMC_WARNING_TMC_TOO_HOT c=20
|
||||
//static const char MSG_TITLE_TMC_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT");
|
||||
//static const char MSG_TITLE_WARNING_TMC_PULLEY_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT");
|
||||
//static const char MSG_TITLE_WARNING_TMC_SELECTOR_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT");
|
||||
//static const char MSG_TITLE_WARNING_TMC_IDLER_TOO_HOT[] PROGMEM_I1 = ISTR("WARNING TMC TOO HOT");
|
||||
static const char MSG_TITLE_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR"); ////MSG_TITLE_TMC_OVERHEAT_ERROR c=20
|
||||
//static const char MSG_TITLE_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
|
||||
//static const char MSG_TITLE_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
|
||||
//static const char MSG_TITLE_TMC_PULLEY_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
|
||||
//static const char MSG_TITLE_TMC_SELECTOR_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
|
||||
//static const char MSG_TITLE_TMC_IDLER_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC OVERHEAT ERROR");
|
||||
static const char MSG_TITLE_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR"); ////MSG_TITLE_TMC_DRIVER_ERROR c=20
|
||||
//static const char MSG_TITLE_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
|
||||
//static const char MSG_TITLE_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
|
||||
//static const char MSG_TITLE_TMC_PULLEY_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
|
||||
//static const char MSG_TITLE_TMC_SELECTOR_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
|
||||
//static const char MSG_TITLE_TMC_IDLER_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC DRIVER ERROR");
|
||||
static const char MSG_TITLE_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET"); ////MSG_TITLE_TMC_DRIVER_RESET c=20
|
||||
//static const char MSG_TITLE_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
|
||||
//static const char MSG_TITLE_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
|
||||
//static const char MSG_TITLE_TMC_PULLEY_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
|
||||
//static const char MSG_TITLE_TMC_SELECTOR_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
|
||||
//static const char MSG_TITLE_TMC_IDLER_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC DRIVER RESET");
|
||||
static const char MSG_TITLE_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR"); ////MSG_TITLE_TMC_UNDERVOLTAGE_ERROR c=20
|
||||
//static const char MSG_TITLE_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR");
|
||||
//static const char MSG_TITLE_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR");
|
||||
//static const char MSG_TITLE_TMC_PULLEY_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR");
|
||||
//static const char MSG_TITLE_TMC_SELECTOR_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR");
|
||||
//static const char MSG_TITLE_TMC_IDLER_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("TMC UNDERVOLTAGE ERR");
|
||||
static const char MSG_TITLE_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED"); ////MSG_TITLE_TMC_DRIVER_SHORTED c=20
|
||||
//static const char MSG_TITLE_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
|
||||
//static const char MSG_TITLE_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
|
||||
//static const char MSG_TITLE_TMC_PULLEY_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
|
||||
//static const char MSG_TITLE_TMC_SELECTOR_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
|
||||
//static const char MSG_TITLE_TMC_IDLER_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("TMC DRIVER SHORTED");
|
||||
static const char MSG_TITLE_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU SELFTEST FAILED"); ////MSG_TITLE_SELFTEST_FAILED c=20
|
||||
static const char MSG_TITLE_MCU_UNDERVOLTAGE_VCC[] PROGMEM_I1 = ISTR("MCU UNDERVOLTAGE VCC"); ////MSG_TITLE_MCU_UNDERVOLTAGE_VCC c=20
|
||||
//static const char MSG_TITLE_MMU_PULLEY_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU SELFTEST FAILED");
|
||||
//static const char MSG_TITLE_MMU_SELECTOR_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU SELFTEST FAILED");
|
||||
//static const char MSG_TITLE_MMU_IDLER_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU SELFTEST FAILED");
|
||||
static const char MSG_TITLE_MMU_MCU_ERROR[] PROGMEM_I1 = ISTR("MMU MCU ERROR"); ////MSG_TITLE_MMU_MCU_ERROR c=20
|
||||
static const char MSG_TITLE_MMU_NOT_RESPONDING[] PROGMEM_I1 = ISTR("MMU NOT RESPONDING"); ////MSG_TITLE_MMU_NOT_RESPONDING c=20
|
||||
static const char MSG_TITLE_COMMUNICATION_ERROR[] PROGMEM_I1 = ISTR("COMMUNICATION ERROR"); ////MSG_TITLE_COMMUNICATION_ERROR c=20
|
||||
static const char MSG_TITLE_FIL_ALREADY_LOADED[] PROGMEM_I1 = ISTR("FILAMENT ALREADY LOA"); ////MSG_TITLE_FIL_ALREADY_LOADED c=20
|
||||
static const char MSG_TITLE_FILAMENT_ALREADY_LOADED[] PROGMEM_I1 = ISTR("FIL. ALREADY LOADED"); ////MSG_TITLE_FILAMENT_ALREADY_LOADED c=20
|
||||
static const char MSG_TITLE_INVALID_TOOL[] PROGMEM_I1 = ISTR("INVALID TOOL"); ////MSG_TITLE_INVALID_TOOL c=20
|
||||
static const char MSG_TITLE_QUEUE_FULL[] PROGMEM_I1 = ISTR("QUEUE FULL"); ////MSG_TITLE_QUEUE_FULL c=20
|
||||
static const char MSG_TITLE_FW_UPDATE_NEEDED[] PROGMEM_I1 = ISTR("MMU FW UPDATE NEEDED"); ////MSG_TITLE_FW_UPDATE_NEEDED c=20
|
||||
static const char MSG_TITLE_FW_RUNTIME_ERROR[] PROGMEM_I1 = ISTR("FW RUNTIME ERROR"); ////MSG_TITLE_FW_RUNTIME_ERROR c=20
|
||||
static const char MSG_TITLE_UNLOAD_MANUALLY[] PROGMEM_I1 = ISTR("UNLOAD MANUALLY"); ////MSG_TITLE_UNLOAD_MANUALLY c=20
|
||||
static const char MSG_TITLE_FILAMENT_EJECTED[] PROGMEM_I1 = ISTR("FILAMENT EJECTED"); ////MSG_TITLE_FILAMENT_EJECTED c=20
|
||||
static const char MSG_TITLE_FILAMENT_CHANGE[] PROGMEM_I1 = ISTR("FILAMENT CHANGE"); ////MSG_TITLE_FILAMENT_CHANGE c=20
|
||||
static const char MSG_TITLE_UNKNOWN_ERROR[] PROGMEM_I1 = ISTR("UNKNOWN ERROR"); ////MSG_TITLE_UNKNOWN_ERROR c=20
|
||||
|
||||
static const char * const errorTitles [] PROGMEM = {
|
||||
_R(MSG_TITLE_FINDA_DIDNT_TRIGGER),
|
||||
_R(MSG_TITLE_FINDA_DIDNT_GO_OFF),
|
||||
_R(MSG_TITLE_FINDA_FILAMENT_STUCK),
|
||||
_R(MSG_TITLE_FSENSOR_DIDNT_TRIGGER),
|
||||
_R(MSG_TITLE_FSENSOR_DIDNT_GO_OFF),
|
||||
_R(MSG_TITLE_FSENSOR_FILAMENT_STUCK),
|
||||
_R(MSG_TITLE_PULLEY_CANNOT_MOVE),
|
||||
_R(MSG_TITLE_FSENSOR_TOO_EARLY),
|
||||
_R(MSG_TITLE_INSPECT_FINDA),
|
||||
|
|
@ -208,53 +223,58 @@ static const char * const errorTitles [] PROGMEM = {
|
|||
_R(MSG_TITLE_SELFTEST_FAILED),
|
||||
_R(MSG_TITLE_SELFTEST_FAILED),
|
||||
_R(MSG_TITLE_SELFTEST_FAILED),
|
||||
_R(MSG_TITLE_MCU_UNDERVOLTAGE_VCC),
|
||||
_R(MSG_TITLE_MMU_MCU_ERROR),
|
||||
_R(MSG_TITLE_MMU_NOT_RESPONDING),
|
||||
_R(MSG_TITLE_COMMUNICATION_ERROR),
|
||||
_R(MSG_TITLE_FIL_ALREADY_LOADED),
|
||||
_R(MSG_TITLE_FILAMENT_ALREADY_LOADED),
|
||||
_R(MSG_TITLE_INVALID_TOOL),
|
||||
_R(MSG_TITLE_QUEUE_FULL),
|
||||
_R(MSG_TITLE_FW_UPDATE_NEEDED),
|
||||
_R(MSG_TITLE_FW_RUNTIME_ERROR),
|
||||
_R(MSG_TITLE_UNLOAD_MANUALLY),
|
||||
_R(MSG_TITLE_FILAMENT_EJECTED)
|
||||
_R(MSG_TITLE_FILAMENT_EJECTED),
|
||||
_R(MSG_TITLE_FILAMENT_CHANGE),
|
||||
_R(MSG_TITLE_UNKNOWN_ERROR)
|
||||
};
|
||||
|
||||
// @@TODO looking at the texts, they can be composed of several parts and/or parametrized (could save a lot of space ;) )
|
||||
// Moreover, some of them have been disabled in favour of saving some more code size.
|
||||
static const char MSG_DESC_FINDA_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("FINDA didn't trigger while loading the filament. Ensure the filament can move and FINDA works."); ////MSG_DESC_FINDA_DIDNT_TRIGGER c=20 r=8
|
||||
static const char MSG_DESC_FINDA_DIDNT_GO_OFF[] PROGMEM_I1 = ISTR("FINDA didn't switch off while unloading filament. Try unloading manually. Ensure filament can move and FINDA works."); ////MSG_DESC_FINDA_DIDNT_GO_OFF c=20 r=8
|
||||
static const char MSG_DESC_FSENSOR_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("Filament sensor didn't trigger while loading the filament. Ensure the filament reached the fsensor and the sensor works."); ////MSG_DESC_FSENSOR_DIDNT_TRIGGER c=20 r=8
|
||||
static const char MSG_DESC_FSENSOR_DIDNT_GO_OFF[] PROGMEM_I1 = ISTR("Filament sensor didn't switch off while unloading filament. Ensure filament can move and the sensor works."); ////MSG_DESC_FSENSOR_DIDNT_GO_OFF c=20 r=8
|
||||
static const char MSG_DESC_PULLEY_STALLED[] PROGMEM_I1 = ISTR("Pulley motor stalled. Ensure the pulley can move and check the wiring."); ////MSG_DESC_PULLEY_STALLED c=20 r=8
|
||||
static const char MSG_DESC_FINDA_FILAMENT_STUCK[] PROGMEM_I1 = ISTR("FINDA didn't switch off while unloading filament. Try unloading manually. Ensure filament can move and FINDA works."); ////MSG_DESC_FINDA_FILAMENT_STUCK c=20 r=8
|
||||
static const char MSG_DESC_FSENSOR_DIDNT_TRIGGER[] PROGMEM_I1 = ISTR("Filament sensor didn't trigger while loading the filament. Ensure the sensor is calibrated and the filament reached it."); ////MSG_DESC_FSENSOR_DIDNT_TRIGGER c=20 r=8
|
||||
static const char MSG_DESC_FSENSOR_FILAMENT_STUCK[] PROGMEM_I1 = ISTR("Filament sensor didn't switch off while unloading filament. Ensure filament can move and the sensor works."); ////MSG_DESC_FSENSOR_FILAMENT_STUCK c=20 r=8
|
||||
static const char MSG_DESC_PULLEY_CANNOT_MOVE[] PROGMEM_I1 = ISTR("Pulley motor stalled. Ensure the pulley can move and check the wiring."); ////MSG_DESC_PULLEY_CANNOT_MOVE c=20 r=8
|
||||
static const char MSG_DESC_FSENSOR_TOO_EARLY[] PROGMEM_I1 = ISTR("Filament sensor triggered too early while loading to extruder. Check there isn't anything stuck in PTFE tube. Check that sensor reads properly."); ////MSG_DESC_FSENSOR_TOO_EARLY c=20 r=8
|
||||
static const char MSG_DESC_INSPECT_FINDA[] PROGMEM_I1 = ISTR("Selector can't move due to FINDA detecting a filament. Make sure no filament is in selector and FINDA works properly."); ////MSG_DESC_INSPECT_FINDA c=20 r=8
|
||||
static const char MSG_DESC_INSPECT_FINDA[] PROGMEM_I1 = ISTR("Selector can't move due to FINDA detecting a filament. Make sure no filament is in Selector and FINDA works properly."); ////MSG_DESC_INSPECT_FINDA c=20 r=8
|
||||
static const char MSG_DESC_LOAD_TO_EXTRUDER_FAILED[] PROGMEM_I1 = ISTR("Loading to extruder failed. Inspect the filament tip shape. Refine the sensor calibration, if needed."); ////MSG_DESC_LOAD_TO_EXTRUDER_FAILED c=20 r=8
|
||||
static const char MSG_DESC_SELECTOR_CANNOT_HOME[] PROGMEM_I1 = ISTR("The Selector cannot home properly. Check for anything blocking its movement."); ////MSG_DESC_SELECTOR_CANNOT_HOME c=20 r=8
|
||||
static const char MSG_DESC_CANNOT_MOVE[] PROGMEM_I1 = ISTR("Can't move Selector or Idler."); /////MSG_DESC_CANNOT_MOVE c=20 r=4
|
||||
//static const char MSG_DESC_SELECTOR_CANNOT_MOVE[] PROGMEM_I1 = ISTR("The Selector cannot move. Check for anything blocking its movement. Check the wiring is correct.");
|
||||
//static const char MSG_DESC_SELECTOR_CANNOT_MOVE[] PROGMEM_I1 = ISTR("The Selector cannot move. Check for anything blocking its movement. Check if the wiring is correct.");
|
||||
static const char MSG_DESC_IDLER_CANNOT_HOME[] PROGMEM_I1 = ISTR("The Idler cannot home properly. Check for anything blocking its movement."); ////MSG_DESC_IDLER_CANNOT_HOME c=20 r=8
|
||||
//static const char MSG_DESC_IDLER_CANNOT_MOVE[] PROGMEM_I1 = ISTR("The Idler cannot move properly. Check for anything blocking its movement. Check the wiring is correct.");
|
||||
//static const char MSG_DESC_IDLER_CANNOT_MOVE[] PROGMEM_I1 = ISTR("The Idler cannot move properly. Check for anything blocking its movement. Check if the wiring is correct.");
|
||||
static const char MSG_DESC_TMC[] PROGMEM_I1 = ISTR("More details online."); ////MSG_DESC_TMC c=20 r=8
|
||||
//static const char MSG_DESC_PULLEY_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_SELECTOR_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_IDLER_WARNING_TMC_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_PULLEY_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_SELECTOR_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_IDLER_TMC_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_PULLEY_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is not responding. Try resetting the MMU.");
|
||||
//static const char MSG_DESC_SELECTOR_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is not responding. Try resetting the MMU.");
|
||||
//static const char MSG_DESC_IDLER_TMC_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is not responding. Try resetting the MMU.");
|
||||
//static const char MSG_DESC_PULLEY_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_SELECTOR_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_IDLER_TMC_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_PULLEY_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Pulley TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_SELECTOR_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Selector TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_IDLER_TMC_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Idler TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_PULLEY_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Pulley TMC driver. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_SELECTOR_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Selector TMC driver. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_IDLER_TMC_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Idler TMC driver. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_MCU_UNDERVOLTAGE_VCC[] PROGMEM_I1 = ISTR("MMU MCU detected a 5V undervoltage. There might be an issue with the electronics. Check the wiring and connectors"); ////MSG_DESC_MCU_UNDERVOLTAGE_VCC c=20 r=8
|
||||
//static const char MSG_DESC_WARNING_TMC_PULLEY_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_WARNING_TMC_SELECTOR_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_WARNING_TMC_IDLER_TOO_HOT[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is almost overheating. Make sure there is sufficient airflow near the MMU board.");
|
||||
//static const char MSG_DESC_TMC_PULLEY_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_TMC_SELECTOR_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_TMC_IDLER_OVERHEAT_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is overheated. Cool down the MMU board and reset MMU.");
|
||||
//static const char MSG_DESC_TMC_PULLEY_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor is not responding. Try resetting the MMU. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_TMC_SELECTOR_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor is not responding. Try resetting the MMU. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_TMC_IDLER_DRIVER_ERROR[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor is not responding. Try resetting the MMU. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_TMC_PULLEY_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Pulley motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_SELECTOR_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Selector motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_IDLER_DRIVER_RESET[] PROGMEM_I1 = ISTR("TMC driver for the Idler motor was restarted. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_PULLEY_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Pulley TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_SELECTOR_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Selector TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_IDLER_UNDERVOLTAGE_ERROR[] PROGMEM_I1 = ISTR("Not enough current for the Idler TMC driver. There is probably an issue with the electronics. Check the wiring and connectors.");
|
||||
//static const char MSG_DESC_TMC_PULLEY_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Pulley TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_TMC_SELECTOR_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Selector TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_TMC_IDLER_DRIVER_SHORTED[] PROGMEM_I1 = ISTR("Short circuit on the Idler TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_MMU_PULLEY_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU selftest failed on the Pulley TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_MMU_SELECTOR_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU selftest failed on the Selector TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_MMU_IDLER_SELFTEST_FAILED[] PROGMEM_I1 = ISTR("MMU selftest failed on the Idler TMC driver. Check the wiring and connectors. If the issue persists contact support.");
|
||||
//static const char MSG_DESC_MMU_MCU_ERROR[] PROGMEM_I1 = ISTR("MMU detected a power-related issue. Check the wiring and connectors. If the issue persists, contact support."); ////MSG_DESC_MMU_MCU_ERROR c=20 r=8
|
||||
static const char MSG_DESC_MMU_NOT_RESPONDING[] PROGMEM_I1 = ISTR("MMU not responding. Check the wiring and connectors."); ////MSG_DESC_MMU_NOT_RESPONDING c=20 r=4
|
||||
static const char MSG_DESC_COMMUNICATION_ERROR[] PROGMEM_I1 = ISTR("MMU not responding correctly. Check the wiring and connectors."); ////MSG_DESC_COMMUNICATION_ERROR c=20 r=4
|
||||
static const char MSG_DESC_FILAMENT_ALREADY_LOADED[] PROGMEM_I1 = ISTR("Cannot perform the action, filament is already loaded. Unload it first."); ////MSG_DESC_FILAMENT_ALREADY_LOADED c=20 r=8
|
||||
|
|
@ -263,9 +283,11 @@ static const char MSG_DESC_QUEUE_FULL[] PROGMEM_I1 = ISTR("MMU Firmware internal
|
|||
static const char MSG_DESC_FW_RUNTIME_ERROR[] PROGMEM_I1 = ISTR("Internal runtime error. Try resetting the MMU or updating the firmware."); ////MSG_DESC_FW_RUNTIME_ERROR c=20 r=8
|
||||
static const char MSG_DESC_UNLOAD_MANUALLY[] PROGMEM_I1 = ISTR("Filament detected unexpectedly. Ensure no filament is loaded. Check the sensors and wiring."); ////MSG_DESC_UNLOAD_MANUALLY c=20 r=8
|
||||
static const char MSG_DESC_FILAMENT_EJECTED[] PROGMEM_I1 = ISTR("Remove the ejected filament from the front of the MMU."); ////MSG_DESC_FILAMENT_EJECTED c=20 r=8
|
||||
static const char MSG_DESC_FILAMENT_CHANGE[] PROGMEM_I1 = ISTR("M600 Filament Change. Load a new filament or eject the old one."); ////MSG_DESC_FILAMENT_CHANGE c=20 r=8
|
||||
static const char MSG_DESC_UNKNOWN_ERROR[] PROGMEM_I1 = ISTR("Unexpected error occurred."); ////MSG_DESC_UNKNOWN_ERROR c=20 r=8
|
||||
|
||||
// Read explanation in mmu2_protocol_logic.cpp -> supportedMmuFWVersion
|
||||
static constexpr char MSG_DESC_FW_UPDATE_NEEDED[] PROGMEM_I1 = ISTR("The MMU firmware version incompatible with the printer's FW. Update to version 2.1.9."); ////MSG_DESC_FW_UPDATE_NEEDED c=20 r=8
|
||||
static constexpr char MSG_DESC_FW_UPDATE_NEEDED[] PROGMEM_I1 = ISTR("MMU FW version is incompatible with printer FW.Update to version 3.0.3."); ////MSG_DESC_FW_UPDATE_NEEDED c=20 r=8
|
||||
static constexpr uint8_t szFWUN = sizeof(MSG_DESC_FW_UPDATE_NEEDED);
|
||||
// at least check the individual version characters in MSG_DESC_FW_UPDATE_NEEDED
|
||||
static_assert(MSG_DESC_FW_UPDATE_NEEDED[szFWUN - 7] == ('0' + mmuVersionMajor));
|
||||
|
|
@ -274,10 +296,10 @@ static_assert(MSG_DESC_FW_UPDATE_NEEDED[szFWUN - 3] == ('0' + mmuVersionPatch));
|
|||
|
||||
static const char * const errorDescs[] PROGMEM = {
|
||||
_R(MSG_DESC_FINDA_DIDNT_TRIGGER),
|
||||
_R(MSG_DESC_FINDA_DIDNT_GO_OFF),
|
||||
_R(MSG_DESC_FINDA_FILAMENT_STUCK),
|
||||
_R(MSG_DESC_FSENSOR_DIDNT_TRIGGER),
|
||||
_R(MSG_DESC_FSENSOR_DIDNT_GO_OFF),
|
||||
_R(MSG_DESC_PULLEY_STALLED),
|
||||
_R(MSG_DESC_FSENSOR_FILAMENT_STUCK),
|
||||
_R(MSG_DESC_PULLEY_CANNOT_MOVE),
|
||||
_R(MSG_DESC_FSENSOR_TOO_EARLY),
|
||||
_R(MSG_DESC_INSPECT_FINDA),
|
||||
_R(MSG_DESC_LOAD_TO_EXTRUDER_FAILED),
|
||||
|
|
@ -285,28 +307,28 @@ static const char * const errorDescs[] PROGMEM = {
|
|||
_R(MSG_DESC_CANNOT_MOVE),
|
||||
_R(MSG_DESC_IDLER_CANNOT_HOME),
|
||||
_R(MSG_DESC_CANNOT_MOVE),
|
||||
_R(MSG_DESC_TMC), // descPULLEY_WARNING_TMC_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_WARNING_TMC_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descIDLER_WARNING_TMC_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descPULLEY_TMC_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_TMC_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descIDLER_TMC_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descPULLEY_TMC_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_TMC_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descIDLER_TMC_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descPULLEY_TMC_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_TMC_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descIDLER_TMC_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descPULLEY_TMC_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_TMC_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descIDLER_TMC_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descPULLEY_TMC_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_TMC_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descIDLER_TMC_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descPULLEY_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descSELECTOR_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descIDLER_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descMSG_DESC_MCU_UNDERVOLTAGE_VCC
|
||||
_R(MSG_DESC_TMC), // descWARNING_TMC_PULLEY_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descWARNING_TMC_SELECTOR_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descWARNING_TMC_IDLER_TOO_HOT
|
||||
_R(MSG_DESC_TMC), // descTMC_PULLEY_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_SELECTOR_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_IDLER_OVERHEAT_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_PULLEY_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_SELECTOR_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_IDLER_DRIVER_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_PULLEY_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descTMC_SELECTOR_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descTMC_IDLER_DRIVER_RESET
|
||||
_R(MSG_DESC_TMC), // descTMC_PULLEY_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_SELECTOR_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_IDLER_UNDERVOLTAGE_ERROR
|
||||
_R(MSG_DESC_TMC), // descTMC_PULLEY_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descTMC_SELECTOR_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descTMC_IDLER_DRIVER_SHORTED
|
||||
_R(MSG_DESC_TMC), // descMMU_PULLEY_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descMMU_SELECTOR_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descMMU_IDLER_SELFTEST_FAILED
|
||||
_R(MSG_DESC_TMC), // descMSG_DESC_MMU_MCU_ERROR
|
||||
_R(MSG_DESC_MMU_NOT_RESPONDING),
|
||||
_R(MSG_DESC_COMMUNICATION_ERROR),
|
||||
_R(MSG_DESC_FILAMENT_ALREADY_LOADED),
|
||||
|
|
@ -315,7 +337,9 @@ static const char * const errorDescs[] PROGMEM = {
|
|||
_R(MSG_DESC_FW_UPDATE_NEEDED),
|
||||
_R(MSG_DESC_FW_RUNTIME_ERROR),
|
||||
_R(MSG_DESC_UNLOAD_MANUALLY),
|
||||
_R(MSG_DESC_FILAMENT_EJECTED)
|
||||
_R(MSG_DESC_FILAMENT_EJECTED),
|
||||
_R(MSG_DESC_FILAMENT_CHANGE),
|
||||
_R(MSG_DESC_UNKNOWN_ERROR)
|
||||
};
|
||||
|
||||
// we have max 3 buttons/operations to select from
|
||||
|
|
@ -327,19 +351,25 @@ static const char * const errorDescs[] PROGMEM = {
|
|||
// Beware - we only have space for 2 buttons on the LCD while the MMU has 3 buttons
|
||||
// -> the left button on the MMU is not used/rendered on the LCD (it is also almost unused on the MMU side)
|
||||
static const char MSG_BTN_RETRY[] PROGMEM_I1 = ISTR("Retry"); ////MSG_BTN_RETRY c=8
|
||||
static const char MSG_BTN_CONTINUE[] PROGMEM_I1 = ISTR("Done"); ////MSG_BTN_CONTINUE c=8
|
||||
static const char MSG_BTN_RESTART_MMU[] PROGMEM_I1 = ISTR("RstMMU"); ////MSG_BTN_RESTART_MMU c=8
|
||||
//static const char MSG_BTN_DONE[] PROGMEM_I1 = ISTR("Done"); //Reuse MSG_DONE c=8
|
||||
static const char MSG_BTN_RESET_MMU[] PROGMEM_I1 = ISTR("ResetMMU"); ////MSG_BTN_RESET_MMU c=8
|
||||
static const char MSG_BTN_UNLOAD[] PROGMEM_I1 = ISTR("Unload"); ////MSG_BTN_UNLOAD c=8
|
||||
static const char MSG_BTN_LOAD[] PROGMEM_I1 = ISTR("Load"); ////MSG_BTN_LOAD c=8
|
||||
//static const char MSG_BTN_EJECT[] PROGMEM_I1 = ISTR("Eject"); //Reuse MSG_EJECT c=9
|
||||
//static const char MSG_BTN_TUNE_MMU[] PROGMEM_I1 = ISTR("Tune"); //Reuse MSG_TUNE c=8
|
||||
static const char MSG_BTN_STOP[] PROGMEM_I1 = ISTR("Stop"); ////MSG_BTN_STOP c=8
|
||||
static const char MSG_BTN_DISABLE_MMU[] PROGMEM_I1 = ISTR("Disable"); ////MSG_BTN_DISABLE_MMU c=8
|
||||
static const char MSG_BTN_MORE[] PROGMEM_N1 = "\x06";
|
||||
static const char MSG_BTN_MORE[] PROGMEM_N1 = LCD_STR_ARROW_2_DOWN;
|
||||
|
||||
// Used to parse the buttons from Btns().
|
||||
static const char * const btnOperation[] PROGMEM = {
|
||||
_R(MSG_BTN_RETRY),
|
||||
_R(MSG_BTN_CONTINUE),
|
||||
_R(MSG_BTN_RESTART_MMU),
|
||||
_R(MSG_DONE),
|
||||
_R(MSG_BTN_RESET_MMU),
|
||||
_R(MSG_BTN_UNLOAD),
|
||||
_R(MSG_BTN_LOAD),
|
||||
_R(MSG_EJECT),
|
||||
_R(MSG_TUNE),
|
||||
_R(MSG_BTN_STOP),
|
||||
_R(MSG_BTN_DISABLE_MMU),
|
||||
};
|
||||
|
|
@ -353,52 +383,54 @@ uint8_t constexpr Btns(ButtonOperations bMiddle, ButtonOperations bRight){
|
|||
|
||||
static const uint8_t errorButtons[] PROGMEM = {
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FINDA_DIDNT_TRIGGER
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FINDA_DIDNT_GO_OFF
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FINDA_FILAMENT_STUCK
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FSENSOR_DIDNT_TRIGGER
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FSENSOR_DIDNT_GO_OFF
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FSENSOR_FILAMENT_STUCK
|
||||
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//PULLEY_STALLED
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//PULLEY_CANNOT_MOVE
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//FSENSOR_TOO_EARLY
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//INSPECT_FINDA
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::NoOperation),//LOAD_TO_EXTRUDER_FAILED
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//SELECTOR_CANNOT_HOME
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::Tune),//SELECTOR_CANNOT_HOME
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//SELECTOR_CANNOT_MOVE
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//IDLER_CANNOT_HOME
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::Tune),//IDLER_CANNOT_HOME
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//IDLER_CANNOT_MOVE
|
||||
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),//PULLEY_WARNING_TMC_TOO_HOT
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),//SELECTOR_WARNING_TMC_TOO_HOT
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::RestartMMU),//IDLER_WARNING_TMC_TOO_HOT
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::ResetMMU),//WARNING_TMC_PULLEY_TOO_HOT
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::ResetMMU),//WARNING_TMC_SELECTOR_TOO_HOT
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::ResetMMU),//WARNING_TMC_IDLER_TOO_HOT
|
||||
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_TMC_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_TMC_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_TMC_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_TMC_DRIVER_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_TMC_DRIVER_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_TMC_DRIVER_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_TMC_DRIVER_RESET
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_TMC_DRIVER_RESET
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_TMC_DRIVER_RESET
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_TMC_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_TMC_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_TMC_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_TMC_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_TMC_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_TMC_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//PULLEY_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//SELECTOR_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//IDLER_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//MCU_UNDERVOLTAGE_VCC
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::DisableMMU),//MMU_NOT_RESPONDING
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::DisableMMU),//COMMUNICATION_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_PULLEY_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_SELECTOR_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_IDLER_OVERHEAT_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_PULLEY_DRIVER_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_SELECTOR_DRIVER_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_IDLER_DRIVER_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_PULLEY_DRIVER_RESET
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_SELECTOR_DRIVER_RESET
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_IDLER_DRIVER_RESET
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_PULLEY_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_SELECTOR_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_IDLER_UNDERVOLTAGE_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_PULLEY_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_SELECTOR_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//TMC_IDLER_DRIVER_SHORTED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//MMU_PULLEY_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//MMU_SELECTOR_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//MMU_IDLER_SELFTEST_FAILED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//MMU_MCU_ERROR
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::DisableMMU),//MMU_NOT_RESPONDING
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::DisableMMU),//COMMUNICATION_ERROR
|
||||
|
||||
Btns(ButtonOperations::Unload, ButtonOperations::Continue),//FILAMENT_ALREADY_LOADED
|
||||
Btns(ButtonOperations::StopPrint, ButtonOperations::RestartMMU),//INVALID_TOOL
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//QUEUE_FULL
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::DisableMMU),//FW_UPDATE_NEEDED
|
||||
Btns(ButtonOperations::RestartMMU, ButtonOperations::NoOperation),//FW_RUNTIME_ERROR
|
||||
Btns(ButtonOperations::StopPrint, ButtonOperations::ResetMMU),//INVALID_TOOL
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//QUEUE_FULL
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::DisableMMU),//FW_UPDATE_NEEDED
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//FW_RUNTIME_ERROR
|
||||
Btns(ButtonOperations::Retry, ButtonOperations::NoOperation),//UNLOAD_MANUALLY
|
||||
Btns(ButtonOperations::Continue, ButtonOperations::NoOperation),//FILAMENT_EJECTED
|
||||
Btns(ButtonOperations::Eject, ButtonOperations::Load),//FILAMENT_CHANGE
|
||||
Btns(ButtonOperations::ResetMMU, ButtonOperations::NoOperation),//UNKOWN_ERROR
|
||||
};
|
||||
|
||||
static_assert( sizeof(errorCodes) / sizeof(errorCodes[0]) == sizeof(errorDescs) / sizeof (errorDescs[0]));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
namespace MMU2 {
|
||||
|
||||
// Register map for MMU
|
||||
enum class Register : uint8_t {
|
||||
Project_Major = 0x00,
|
||||
Project_Minor = 0x01,
|
||||
Project_Revision = 0x02,
|
||||
Project_Build_Number = 0x03,
|
||||
MMU_Errors = 0x04,
|
||||
Current_Progress_Code = 0x05,
|
||||
Current_Error_Code = 0x06,
|
||||
Filament_State = 0x07,
|
||||
FINDA_State = 0x08,
|
||||
FSensor_State = 0x09,
|
||||
Motor_Mode = 0x0A,
|
||||
Extra_Load_Distance = 0x0B,
|
||||
FSensor_Unload_Check_Distance = 0xC,
|
||||
Pulley_Unload_Feedrate = 0x0D,
|
||||
Pulley_Acceleration = 0x0E,
|
||||
Selector_Acceleration = 0x0F,
|
||||
Idler_Acceleration = 0x10,
|
||||
Pulley_Load_Feedrate = 0x11,
|
||||
Selector_Nominal_Feedrate = 0x12,
|
||||
Idler_Nominal_Feedrate = 0x13,
|
||||
Pulley_Slow_Feedrate = 0x14,
|
||||
Selector_Homing_Feedrate = 0x15,
|
||||
Idler_Homing_Feedrate = 0x16,
|
||||
Pulley_sg_thrs_R = 0x17,
|
||||
Selector_sg_thrs_R = 0x18,
|
||||
Idler_sg_thrs_R = 0x19,
|
||||
Get_Pulley_Position = 0x1A,
|
||||
Set_Get_Selector_Slot = 0x1B,
|
||||
Set_Get_Idler_Slot = 0x1C,
|
||||
Set_Get_Selector_Cut_iRun = 0x1D,
|
||||
Set_Get_Pulley_iRun = 0x1E,
|
||||
Set_Get_Selector_iRun = 0x1F,
|
||||
Set_Get_Idler_iRun = 0x20,
|
||||
Reserved = 0x21,
|
||||
};
|
||||
|
||||
} // namespace MMU2
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
#include "mmu2_crc.h"
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <util/crc16.h>
|
||||
#include <util/crc16.h>
|
||||
#endif
|
||||
|
||||
namespace modules {
|
||||
// clang-format off
|
||||
namespace crc {
|
||||
|
||||
#ifdef __AVR__
|
||||
uint8_t CRC8::CCITT_update(uint8_t crc, uint8_t b) {
|
||||
return _crc8_ccitt_update(crc, b);
|
||||
|
|
@ -17,6 +17,6 @@ uint8_t CRC8::CCITT_update(uint8_t crc, uint8_t b) {
|
|||
return CCITT_updateCX(crc, b);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace crc
|
||||
// clang-format on
|
||||
} // namespace modules
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
namespace modules {
|
||||
|
||||
// clang-format off
|
||||
// prevent silly indenting of the whole file
|
||||
|
||||
/// Contains all the necessary functions for computation of CRC
|
||||
namespace crc {
|
||||
|
||||
|
|
@ -40,4 +43,6 @@ public:
|
|||
|
||||
} // namespace crc
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace modules
|
||||
|
|
|
|||
|
|
@ -29,192 +29,229 @@ static constexpr uint8_t FindErrorIndex(uint16_t pec) {
|
|||
return (i != errorCodesEnd) ? (i-errorCodes) : (errorCodesSize - 1);
|
||||
}
|
||||
|
||||
// check that the searching algoritm works
|
||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER) == 0);
|
||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_GO_OFF) == 1);
|
||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER) == 2);
|
||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF) == 3);
|
||||
// check that the searching algorithm works
|
||||
static_assert(FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER) == 0);
|
||||
static_assert(FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK) == 1);
|
||||
static_assert(FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER) == 2);
|
||||
static_assert(FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK) == 3);
|
||||
|
||||
uint8_t PrusaErrorCodeIndex(uint16_t ec) {
|
||||
constexpr ErrorCode operator&(ErrorCode a, ErrorCode b) {
|
||||
return (ErrorCode)((uint16_t)a & (uint16_t)b);
|
||||
}
|
||||
|
||||
constexpr bool ContainsBit(ErrorCode ec, ErrorCode mask) {
|
||||
return (uint16_t)ec & (uint16_t)mask;
|
||||
}
|
||||
|
||||
uint8_t PrusaErrorCodeIndex(ErrorCode ec) {
|
||||
switch (ec) {
|
||||
case (uint16_t)ErrorCode::FINDA_DIDNT_SWITCH_ON:
|
||||
case ErrorCode::FINDA_DIDNT_SWITCH_ON:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER);
|
||||
case (uint16_t)ErrorCode::FINDA_DIDNT_SWITCH_OFF:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_GO_OFF);
|
||||
case (uint16_t)ErrorCode::FSENSOR_DIDNT_SWITCH_ON:
|
||||
case ErrorCode::FINDA_DIDNT_SWITCH_OFF:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK);
|
||||
case ErrorCode::FSENSOR_DIDNT_SWITCH_ON:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER);
|
||||
case (uint16_t)ErrorCode::FSENSOR_DIDNT_SWITCH_OFF:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF);
|
||||
case (uint16_t)ErrorCode::FSENSOR_TOO_EARLY:
|
||||
case ErrorCode::FSENSOR_DIDNT_SWITCH_OFF:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK);
|
||||
case ErrorCode::FSENSOR_TOO_EARLY:
|
||||
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_TOO_EARLY);
|
||||
case (uint16_t)ErrorCode::FINDA_FLICKERS:
|
||||
case ErrorCode::FINDA_FLICKERS:
|
||||
return FindErrorIndex(ERR_MECHANICAL_INSPECT_FINDA);
|
||||
case (uint16_t)ErrorCode::LOAD_TO_EXTRUDER_FAILED:
|
||||
case ErrorCode::LOAD_TO_EXTRUDER_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_LOAD_TO_EXTRUDER_FAILED);
|
||||
case (uint16_t)ErrorCode::FILAMENT_EJECTED:
|
||||
case ErrorCode::FILAMENT_EJECTED:
|
||||
return FindErrorIndex(ERR_SYSTEM_FILAMENT_EJECTED);
|
||||
case ErrorCode::FILAMENT_CHANGE:
|
||||
return FindErrorIndex(ERR_SYSTEM_FILAMENT_CHANGE);
|
||||
|
||||
case (uint16_t)ErrorCode::STALLED_PULLEY:
|
||||
case (uint16_t)ErrorCode::MOVE_PULLEY_FAILED:
|
||||
case ErrorCode::STALLED_PULLEY:
|
||||
case ErrorCode::MOVE_PULLEY_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_PULLEY_CANNOT_MOVE);
|
||||
|
||||
case (uint16_t)ErrorCode::HOMING_SELECTOR_FAILED:
|
||||
|
||||
case ErrorCode::HOMING_SELECTOR_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_SELECTOR_CANNOT_HOME);
|
||||
case (uint16_t)ErrorCode::MOVE_SELECTOR_FAILED:
|
||||
case ErrorCode::MOVE_SELECTOR_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_SELECTOR_CANNOT_MOVE);
|
||||
|
||||
case (uint16_t)ErrorCode::HOMING_IDLER_FAILED:
|
||||
|
||||
case ErrorCode::HOMING_IDLER_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_IDLER_CANNOT_HOME);
|
||||
case (uint16_t)ErrorCode::MOVE_IDLER_FAILED:
|
||||
case ErrorCode::MOVE_IDLER_FAILED:
|
||||
return FindErrorIndex(ERR_MECHANICAL_IDLER_CANNOT_MOVE);
|
||||
|
||||
case (uint16_t)ErrorCode::MMU_NOT_RESPONDING:
|
||||
|
||||
case ErrorCode::MMU_NOT_RESPONDING:
|
||||
return FindErrorIndex(ERR_CONNECT_MMU_NOT_RESPONDING);
|
||||
case (uint16_t)ErrorCode::PROTOCOL_ERROR:
|
||||
case ErrorCode::PROTOCOL_ERROR:
|
||||
return FindErrorIndex(ERR_CONNECT_COMMUNICATION_ERROR);
|
||||
case (uint16_t)ErrorCode::FILAMENT_ALREADY_LOADED:
|
||||
case ErrorCode::FILAMENT_ALREADY_LOADED:
|
||||
return FindErrorIndex(ERR_SYSTEM_FILAMENT_ALREADY_LOADED);
|
||||
case (uint16_t)ErrorCode::INVALID_TOOL:
|
||||
case ErrorCode::INVALID_TOOL:
|
||||
return FindErrorIndex(ERR_SYSTEM_INVALID_TOOL);
|
||||
case (uint16_t)ErrorCode::QUEUE_FULL:
|
||||
case ErrorCode::QUEUE_FULL:
|
||||
return FindErrorIndex(ERR_SYSTEM_QUEUE_FULL);
|
||||
case (uint16_t)ErrorCode::VERSION_MISMATCH:
|
||||
case ErrorCode::VERSION_MISMATCH:
|
||||
return FindErrorIndex(ERR_SYSTEM_FW_UPDATE_NEEDED);
|
||||
case (uint16_t)ErrorCode::INTERNAL:
|
||||
case ErrorCode::INTERNAL:
|
||||
return FindErrorIndex(ERR_SYSTEM_FW_RUNTIME_ERROR);
|
||||
case (uint16_t)ErrorCode::FINDA_VS_EEPROM_DISREPANCY:
|
||||
case ErrorCode::FINDA_VS_EEPROM_DISREPANCY:
|
||||
return FindErrorIndex(ERR_SYSTEM_UNLOAD_MANUALLY);
|
||||
case (uint16_t)ErrorCode::MCU_UNDERVOLTAGE_VCC:
|
||||
return FindErrorIndex(ERR_ELECTRICAL_MCU_UNDERVOLTAGE_VCC);
|
||||
case ErrorCode::MCU_UNDERVOLTAGE_VCC:
|
||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_MCU_ERROR);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Electrical issues which can be detected somehow.
|
||||
// Need to be placed before TMC-related errors in order to process couples of error bits between single ones
|
||||
// and to keep the code size down.
|
||||
if (ec & (uint16_t)ErrorCode::TMC_PULLEY_BIT) {
|
||||
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED);
|
||||
} else if (ec & (uint16_t)ErrorCode::TMC_SELECTOR_BIT) {
|
||||
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED);
|
||||
} else if (ec & (uint16_t)ErrorCode::TMC_IDLER_BIT) {
|
||||
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_IDLER_SELFTEST_FAILED);
|
||||
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED);
|
||||
}
|
||||
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED);
|
||||
}
|
||||
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
// TMC-related errors - multiple of these can occur at once
|
||||
// - in such a case we report the first which gets found/converted into Prusa-Error-Codes (usually the fact, that one TMC has an issue is serious enough)
|
||||
// By carefully ordering the checks here we can prioritize the errors being reported to the user.
|
||||
if (ec & (uint16_t)ErrorCode::TMC_PULLEY_BIT) {
|
||||
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_RESET)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR);
|
||||
} else if (ec & (uint16_t)ErrorCode::TMC_SELECTOR_BIT) {
|
||||
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_RESET)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR);
|
||||
} else if (ec & (uint16_t)ErrorCode::TMC_IDLER_BIT) {
|
||||
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_RESET)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
|
||||
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT);
|
||||
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
|
||||
return FindErrorIndex(ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR);
|
||||
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR);
|
||||
}
|
||||
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR);
|
||||
}
|
||||
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT);
|
||||
}
|
||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// if nothing got caught, return a generic runtime error
|
||||
return FindErrorIndex(ERR_SYSTEM_FW_RUNTIME_ERROR);
|
||||
// if nothing got caught, return a generic error
|
||||
return FindErrorIndex(ERR_OTHER_UNKNOWN_ERROR);
|
||||
}
|
||||
|
||||
uint16_t PrusaErrorCode(uint8_t i){
|
||||
uint16_t PrusaErrorCode(uint8_t i) {
|
||||
return pgm_read_word(errorCodes + i);
|
||||
}
|
||||
|
||||
const char * PrusaErrorTitle(uint8_t i){
|
||||
const char *PrusaErrorTitle(uint8_t i) {
|
||||
return (const char *)pgm_read_ptr(errorTitles + i);
|
||||
}
|
||||
|
||||
const char * PrusaErrorDesc(uint8_t i){
|
||||
const char *PrusaErrorDesc(uint8_t i) {
|
||||
return (const char *)pgm_read_ptr(errorDescs + i);
|
||||
}
|
||||
|
||||
uint8_t PrusaErrorButtons(uint8_t i){
|
||||
uint8_t PrusaErrorButtons(uint8_t i) {
|
||||
return pgm_read_byte(errorButtons + i);
|
||||
}
|
||||
|
||||
const char * PrusaErrorButtonTitle(uint8_t bi){
|
||||
const char *PrusaErrorButtonTitle(uint8_t bi) {
|
||||
// -1 represents the hidden NoOperation button which is not drawn in any way
|
||||
return (const char *)pgm_read_ptr(btnOperation + bi - 1);
|
||||
}
|
||||
|
||||
const char * PrusaErrorButtonMore(){
|
||||
const char *PrusaErrorButtonMore() {
|
||||
return MSG_BTN_MORE;
|
||||
}
|
||||
|
||||
struct ResetOnExit {
|
||||
ResetOnExit() = default;
|
||||
~ResetOnExit(){
|
||||
buttonSelectedOperation = ButtonOperations::NoOperation;
|
||||
}
|
||||
};
|
||||
|
||||
Buttons ButtonPressed(uint16_t ec) {
|
||||
Buttons ButtonPressed(ErrorCode ec) {
|
||||
if (buttonSelectedOperation == ButtonOperations::NoOperation) {
|
||||
return NoButton; // no button
|
||||
return Buttons::NoButton; // no button
|
||||
}
|
||||
|
||||
ResetOnExit ros; // clear buttonSelectedOperation on exit from this call
|
||||
return ButtonAvailable(ec);
|
||||
|
||||
const auto result = ButtonAvailable(ec);
|
||||
buttonSelectedOperation = ButtonOperations::NoOperation; // Reset operation
|
||||
return result;
|
||||
}
|
||||
|
||||
Buttons ButtonAvailable(uint16_t ec) {
|
||||
Buttons ButtonAvailable(ErrorCode ec) {
|
||||
uint8_t ei = PrusaErrorCodeIndex(ec);
|
||||
|
||||
|
||||
// The list of responses which occur in mmu error dialogs
|
||||
// Return button index or perform some action on the MK3 by itself (like restart MMU)
|
||||
// Return button index or perform some action on the MK3 by itself (like Reset MMU)
|
||||
// Based on Prusa-Error-Codes errors_list.h
|
||||
// So far hardcoded, but shall be generated in the future
|
||||
switch ( PrusaErrorCode(ei) ) {
|
||||
case ERR_MECHANICAL_FINDA_DIDNT_TRIGGER:
|
||||
case ERR_MECHANICAL_FINDA_DIDNT_GO_OFF:
|
||||
case ERR_MECHANICAL_FINDA_FILAMENT_STUCK:
|
||||
case ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER:
|
||||
case ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF:
|
||||
case ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK:
|
||||
case ERR_MECHANICAL_FSENSOR_TOO_EARLY:
|
||||
case ERR_MECHANICAL_INSPECT_FINDA:
|
||||
case ERR_MECHANICAL_SELECTOR_CANNOT_HOME:
|
||||
case ERR_MECHANICAL_SELECTOR_CANNOT_MOVE:
|
||||
case ERR_MECHANICAL_IDLER_CANNOT_HOME:
|
||||
case ERR_MECHANICAL_IDLER_CANNOT_MOVE:
|
||||
case ERR_MECHANICAL_PULLEY_CANNOT_MOVE:
|
||||
case ERR_SYSTEM_UNLOAD_MANUALLY:
|
||||
switch (buttonSelectedOperation) {
|
||||
// may be allow move selector right and left in the future
|
||||
case ButtonOperations::Retry: // "Repeat action"
|
||||
return Middle;
|
||||
return Buttons::Middle;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ERR_MECHANICAL_SELECTOR_CANNOT_HOME:
|
||||
case ERR_MECHANICAL_IDLER_CANNOT_HOME:
|
||||
switch (buttonSelectedOperation) {
|
||||
// may be allow move selector right and left in the future
|
||||
case ButtonOperations::Tune: // Tune Stallguard threshold
|
||||
return Buttons::TuneMMU;
|
||||
case ButtonOperations::Retry: // "Repeat action"
|
||||
return Buttons::Middle;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -223,54 +260,64 @@ Buttons ButtonAvailable(uint16_t ec) {
|
|||
case ERR_SYSTEM_FILAMENT_EJECTED:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::Continue: // User solved the serious mechanical problem by hand - there is no other way around
|
||||
return Middle;
|
||||
return Buttons::Middle;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT:
|
||||
case ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT:
|
||||
case ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT:
|
||||
case ERR_SYSTEM_FILAMENT_CHANGE:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::Load:
|
||||
return Buttons::Load;
|
||||
case ButtonOperations::Eject:
|
||||
return Buttons::Eject;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT:
|
||||
case ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT:
|
||||
case ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::Continue: // "Continue"
|
||||
return Left;
|
||||
case ButtonOperations::RestartMMU: // "Restart MMU"
|
||||
return RestartMMU;
|
||||
return Buttons::Left;
|
||||
case ButtonOperations::ResetMMU: // "Reset MMU"
|
||||
return Buttons::ResetMMU;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR:
|
||||
case ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR:
|
||||
case ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR:
|
||||
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR:
|
||||
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET:
|
||||
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET:
|
||||
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET:
|
||||
|
||||
case ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR:
|
||||
case ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR:
|
||||
case ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED:
|
||||
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED:
|
||||
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED:
|
||||
|
||||
case ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED:
|
||||
case ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED:
|
||||
case ERR_ELECTRICAL_IDLER_SELFTEST_FAILED:
|
||||
case ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR:
|
||||
case ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR:
|
||||
case ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR:
|
||||
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR:
|
||||
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET:
|
||||
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET:
|
||||
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET:
|
||||
|
||||
case ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR:
|
||||
case ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR:
|
||||
case ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR:
|
||||
|
||||
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED:
|
||||
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED:
|
||||
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED:
|
||||
|
||||
case ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED:
|
||||
case ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED:
|
||||
case ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED:
|
||||
|
||||
case ERR_SYSTEM_QUEUE_FULL:
|
||||
case ERR_SYSTEM_FW_RUNTIME_ERROR:
|
||||
case ERR_ELECTRICAL_MCU_UNDERVOLTAGE_VCC:
|
||||
case ERR_ELECTRICAL_MMU_MCU_ERROR:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::RestartMMU: // "Restart MMU"
|
||||
return RestartMMU;
|
||||
case ButtonOperations::ResetMMU: // "Reset MMU"
|
||||
return Buttons::ResetMMU;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -280,9 +327,9 @@ Buttons ButtonAvailable(uint16_t ec) {
|
|||
case ERR_SYSTEM_FW_UPDATE_NEEDED:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::DisableMMU: // "Disable"
|
||||
return DisableMMU;
|
||||
case ButtonOperations::RestartMMU: // "RestartMMU"
|
||||
return RestartMMU;
|
||||
return Buttons::DisableMMU;
|
||||
case ButtonOperations::ResetMMU: // "ResetMMU"
|
||||
return Buttons::ResetMMU;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -290,20 +337,20 @@ Buttons ButtonAvailable(uint16_t ec) {
|
|||
case ERR_SYSTEM_FILAMENT_ALREADY_LOADED:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::Unload: // "Unload"
|
||||
return Left;
|
||||
return Buttons::Left;
|
||||
case ButtonOperations::Continue: // "Proceed/Continue"
|
||||
return Right;
|
||||
return Buttons::Right;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ERR_SYSTEM_INVALID_TOOL:
|
||||
switch (buttonSelectedOperation) {
|
||||
case ButtonOperations::StopPrint: // "Stop print"
|
||||
return StopPrint;
|
||||
case ButtonOperations::RestartMMU: // "Restart MMU"
|
||||
return RestartMMU;
|
||||
return Buttons::StopPrint;
|
||||
case ButtonOperations::ResetMMU: // "Reset MMU"
|
||||
return Buttons::ResetMMU;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -312,11 +359,11 @@ Buttons ButtonAvailable(uint16_t ec) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NoButton;
|
||||
|
||||
return Buttons::NoButton;
|
||||
}
|
||||
|
||||
void SetButtonResponse(ButtonOperations rsp){
|
||||
void SetButtonResponse(ButtonOperations rsp) {
|
||||
buttonSelectedOperation = rsp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,20 @@
|
|||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "mmu2/buttons.h"
|
||||
#ifdef __AVR__
|
||||
#include "mmu2/buttons.h"
|
||||
#include "mmu2/error_codes.h"
|
||||
#else
|
||||
#include "buttons.h"
|
||||
#include "../../../../../../Prusa-Error-Codes/include/button_operations.h"
|
||||
#include "../../../../../../Prusa-Firmware-MMU/src/logic/error_codes.h"
|
||||
#endif
|
||||
|
||||
namespace MMU2 {
|
||||
|
||||
/// Translates MMU2::ErrorCode into an index of Prusa-Error-Codes
|
||||
/// Basically this is the way to obtain an index into all other functions in this API
|
||||
uint8_t PrusaErrorCodeIndex(uint16_t ec);
|
||||
uint8_t PrusaErrorCodeIndex(ErrorCode ec);
|
||||
|
||||
/// @returns pointer to a PROGMEM string representing the Title of the Prusa-Error-Codes error
|
||||
/// @param i index of the error - obtained by calling ErrorCodeIndex
|
||||
|
|
@ -38,11 +45,11 @@ void SetButtonResponse(ButtonOperations rsp);
|
|||
|
||||
/// @returns button index/code based on currently processed error/screen
|
||||
/// Clears the "pressed" button upon exit
|
||||
Buttons ButtonPressed(uint16_t ec);
|
||||
Buttons ButtonPressed(ErrorCode ec);
|
||||
|
||||
/// @returns button index/code based on currently processed error/screen
|
||||
/// Used as a subfunction of ButtonPressed.
|
||||
/// Does not clear the "pressed" button upon exit
|
||||
Buttons ButtonAvailable(uint16_t ec);
|
||||
Buttons ButtonAvailable(ErrorCode ec);
|
||||
|
||||
} // namespace MMU2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef UNITTEST
|
||||
#include "Marlin.h"
|
||||
#ifdef __AVR__
|
||||
#include <avr/pgmspace.h>
|
||||
#endif
|
||||
|
||||
// Beware - before changing this prefix, think twice
|
||||
// you'd need to change appmain.cpp app_marlin_serial_output_write_hook
|
||||
|
|
@ -14,16 +14,22 @@ namespace MMU2 {
|
|||
/// @param msg pointer to a string in PROGMEM
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogErrorEvent_P(const char *msg);
|
||||
void LogErrorEvent_P(const char *msg_P);
|
||||
|
||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||
/// @param msg pointer to a string in PROGMEM
|
||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||
void LogEchoEvent_P(const char *msg);
|
||||
void LogEchoEvent_P(const char *msg_P);
|
||||
|
||||
} // namespace
|
||||
} // namespace MMU2
|
||||
|
||||
#ifndef UNITTEST
|
||||
#ifdef __AVR__
|
||||
#include "Marlin.h"
|
||||
#else
|
||||
#include "../../core/serial.h"
|
||||
#endif
|
||||
#define SERIAL_MMU2() \
|
||||
{ serialprintPGM(mmu2Magic); }
|
||||
|
||||
|
|
@ -50,10 +56,13 @@ void LogEchoEvent_P(const char *msg);
|
|||
#define MMU2_ERROR_MSG(S) MMU2_ECHO_MSG(S) //!@todo Decide MMU errors on serial line
|
||||
|
||||
#else // #ifndef UNITTEST
|
||||
|
||||
#define MMU2_ECHO_MSGLN(S) /* */
|
||||
#define MMU2_ERROR_MSGLN(S) /* */
|
||||
#define MMU2_ECHO_MSGRPGM(S) /* */
|
||||
#define MMU2_ERROR_MSGRPGM(S) /* */
|
||||
#include "stubs/stub_interfaces.h"
|
||||
#define MMU2_ECHO_MSGLN(S) marlinLogSim.AppendLine(S)
|
||||
#define MMU2_ERROR_MSGLN(S) marlinLogSim.AppendLine(S)
|
||||
#define MMU2_ECHO_MSGRPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||
#define MMU2_ERROR_MSGRPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||
#define SERIAL_ECHOLNPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||
#define SERIAL_ECHOPGM(S) /* */
|
||||
#define SERIAL_ECHOLN(S) /*marlinLogSim.AppendLine(S)*/
|
||||
|
||||
#endif // #ifndef UNITTEST
|
||||
|
|
|
|||
|
|
@ -14,27 +14,26 @@ struct pos3d {
|
|||
pos3d() = default;
|
||||
inline constexpr pos3d(float x, float y, float z)
|
||||
: xyz { x, y, z } {}
|
||||
pos3d operator=(const float *newP){
|
||||
for(uint8_t i = 0; i < 3; ++i){
|
||||
pos3d operator=(const float *newP) {
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
xyz[i] = newP[i];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
void MoveE(float delta, float feedRate);
|
||||
void extruder_move(float distance, float feed_rate);
|
||||
void extruder_schedule_turning(float feed_rate);
|
||||
|
||||
float MoveRaiseZ(float delta);
|
||||
float move_raise_z(float delta);
|
||||
|
||||
void planner_abort_queued_moves();
|
||||
bool planner_draining();
|
||||
void planner_synchronize();
|
||||
bool planner_any_moves();
|
||||
float planner_get_machine_position_E_mm();
|
||||
float stepper_get_machine_position_E_mm();
|
||||
float planner_get_current_position_E();
|
||||
void planner_set_current_position_E(float e);
|
||||
void planner_line_to_current_position(float feedRate_mm_s);
|
||||
void planner_line_to_current_position_sync(float feedRate_mm_s);
|
||||
pos3d planner_current_position();
|
||||
|
||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s);
|
||||
|
|
@ -44,8 +43,11 @@ void nozzle_park();
|
|||
|
||||
bool marlin_printingIsActive();
|
||||
void marlin_manage_heater();
|
||||
void marlin_manage_inactivity(bool b);
|
||||
void marlin_idle(bool b);
|
||||
void marlin_manage_inactivity(bool ignore_stepper_queue);
|
||||
void marlin_idle(bool ignore_stepper_queue);
|
||||
void marlin_refresh_print_state_in_ram();
|
||||
void marlin_clear_print_state_in_ram();
|
||||
void marlin_stop_and_save_print_to_ram();
|
||||
|
||||
int16_t thermal_degTargetHotend();
|
||||
int16_t thermal_degHotend();
|
||||
|
|
@ -59,8 +61,4 @@ void Disable_E0();
|
|||
|
||||
bool all_axes_homed();
|
||||
|
||||
void gcode_reset_stepper_timeout();
|
||||
|
||||
bool cutter_enabled();
|
||||
|
||||
} // namespace MMU2
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue