Compare commits
225 Commits
| 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 | |
|
|
0a727d8573 | |
|
|
020239687a |
|
|
@ -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
|
||||||
|
|
@ -8,6 +8,8 @@ on:
|
||||||
branches: [ MK3, MK3_* ]
|
branches: [ MK3, MK3_* ]
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
- 't*'
|
||||||
|
- 'c*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GH_ANNOTATIONS: 1
|
GH_ANNOTATIONS: 1
|
||||||
|
|
@ -41,7 +43,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: actions/cache@v4.0.0
|
uses: actions/cache@v4
|
||||||
id: cache-pkgs
|
id: cache-pkgs
|
||||||
with:
|
with:
|
||||||
path: ".dependencies"
|
path: ".dependencies"
|
||||||
|
|
@ -63,16 +65,17 @@ jobs:
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
if: ${{ !github.event.pull_request }}
|
if: ${{ !github.event.pull_request }}
|
||||||
uses: actions/upload-artifact@v3.1.1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Firmware
|
name: Firmware
|
||||||
path: build/*.hex
|
path: build/*.hex
|
||||||
|
|
||||||
- name: RELEASE THE KRAKEN
|
- name: RELEASE THE KRAKEN
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
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"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
automatic_release_tag: ${{ github.ref_name }}
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
${{ github.workspace }}/build/release/*.hex
|
${{ github.workspace }}/build/release/*.hex
|
||||||
|
|
@ -106,7 +109,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: actions/cache@v4.0.0
|
uses: actions/cache@v4
|
||||||
id: cache-pkgs
|
id: cache-pkgs
|
||||||
with:
|
with:
|
||||||
path: ".dependencies"
|
path: ".dependencies"
|
||||||
|
|
@ -154,7 +157,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: actions/cache@v4.0.0
|
uses: actions/cache@v4
|
||||||
id: cache-pkgs
|
id: cache-pkgs
|
||||||
with:
|
with:
|
||||||
path: ".dependencies"
|
path: ".dependencies"
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: actions/cache@v4.0.0
|
uses: actions/cache@v4
|
||||||
id: cache-pkgs
|
id: cache-pkgs
|
||||||
with:
|
with:
|
||||||
path: ".dependencies"
|
path: ".dependencies"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Don't ever mark PRs as stale.
|
# Don't ever mark PRs as stale.
|
||||||
days-before-pr-stale: -1
|
days-before-pr-stale: -1
|
||||||
stale-issue-message: 'This issue has been flagged as stale because it has been open for 60 days with no activity. The issue will be closed in 7 days unless someone removes the "stale" label or adds a comment.'
|
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.'
|
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.
|
# Don't act on things assigned to a milestone or assigned to someone.
|
||||||
exempt-all-milestones: true
|
exempt-all-milestones: true
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "avr-gcc",
|
"name": "avr-gcc",
|
||||||
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
||||||
"cmakeSettings": {
|
"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"
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,12 @@ message(STATUS "Project version (Configuration.h): ${PROJECT_VERSION}")
|
||||||
#message(STATUS "Project version commit number....: ${PROJECT_VERSION_COMMIT}") #For debuging
|
#message(STATUS "Project version commit number....: ${PROJECT_VERSION_COMMIT}") #For debuging
|
||||||
message(STATUS "Filename suffix..................: ${FN_VERSION_SUFFIX}")
|
message(STATUS "Filename suffix..................: ${FN_VERSION_SUFFIX}")
|
||||||
message(STATUS "Filename debug suffix ...........: ${FN_VERSION_DEBUG_SUFFIX}")
|
message(STATUS "Filename debug suffix ...........: ${FN_VERSION_DEBUG_SUFFIX}")
|
||||||
|
#message(STATUS "Host OS .........................: ${CMAKE_HOST_SYSTEM_NAME}")
|
||||||
# testing
|
# testing
|
||||||
# SET(FW_COMMIT_DSC "v3.13.0-1234")
|
# 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.
|
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]([0-9]+)\.([0-9]+)\.([0-9]+)-?(${DEV_TAG_REGEX})?([0-9]+)?-([0-9]+)" TAG_VERSION "${FW_COMMIT_DSC}")
|
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?
|
if (CMAKE_MATCH_4) # Do we have a build type?
|
||||||
decode_flavor_code(PROJECT_VER_TAG_FLV "${CMAKE_MATCH_4}" "${CMAKE_MATCH_5}")
|
decode_flavor_code(PROJECT_VER_TAG_FLV "${CMAKE_MATCH_4}" "${CMAKE_MATCH_5}")
|
||||||
|
|
@ -245,15 +246,13 @@ set(FW_SOURCES
|
||||||
power_panic.cpp
|
power_panic.cpp
|
||||||
printer_state.cpp
|
printer_state.cpp
|
||||||
Prusa_farm.cpp
|
Prusa_farm.cpp
|
||||||
qr_solve.cpp
|
|
||||||
rbuf.c
|
rbuf.c
|
||||||
Sd2Card.cpp
|
Sd2Card.cpp
|
||||||
SdBaseFile.cpp
|
SdBaseFile.cpp
|
||||||
SdFatUtil.cpp
|
SdFatUtil.cpp
|
||||||
SdFile.cpp
|
SdFile.cpp
|
||||||
SdVolume.cpp
|
SdVolume.cpp
|
||||||
Servo.cpp
|
sm4.cpp
|
||||||
sm4.c
|
|
||||||
sound.cpp
|
sound.cpp
|
||||||
speed_lookuptable.cpp
|
speed_lookuptable.cpp
|
||||||
spi.c
|
spi.c
|
||||||
|
|
@ -269,10 +268,9 @@ set(FW_SOURCES
|
||||||
tmc2130.cpp
|
tmc2130.cpp
|
||||||
tone04.c
|
tone04.c
|
||||||
twi.cpp
|
twi.cpp
|
||||||
uart2.c
|
uart2.cpp
|
||||||
ultralcd.cpp
|
ultralcd.cpp
|
||||||
util.cpp
|
util.cpp
|
||||||
vector_3.cpp
|
|
||||||
xflash.c
|
xflash.c
|
||||||
xflash_dump.cpp
|
xflash_dump.cpp
|
||||||
xyzcal.cpp
|
xyzcal.cpp
|
||||||
|
|
@ -565,10 +563,10 @@ function(fw_add_variant variant_name)
|
||||||
# Patched binary with pre-baked secondary language
|
# Patched binary with pre-baked secondary language
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${FW_LANG_FINAL}.bin
|
OUTPUT ${FW_LANG_FINAL}.bin
|
||||||
COMMAND ${CMAKE_OBJCOPY} -O binary ${FW_LANG_BASE} ${FW_LANG_FINAL}.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}
|
COMMAND "${Python3_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/lang/lang-patchsec.py ${FW_LANG_BASE} ${LANG_BIN}
|
||||||
${FW_LANG_FINAL}.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"
|
COMMENT "Generating ${FW_LANG_FINAL}.bin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -588,6 +586,7 @@ function(fw_add_variant variant_name)
|
||||||
list(APPEND ALL_VARIANT_HEXES ${FW_LANG_FINAL})
|
list(APPEND ALL_VARIANT_HEXES ${FW_LANG_FINAL})
|
||||||
endforeach()
|
endforeach()
|
||||||
add_custom_target("${variant_name}-All-Languages" DEPENDS ${ALL_VARIANT_HEXES})
|
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"
|
add_custom_command(TARGET "${variant_name}-All-Languages"
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
|
@ -595,6 +594,7 @@ function(fw_add_variant variant_name)
|
||||||
COMMAND ${CMAKE_COMMAND} -E tar "cfv" "release/${variant_name}_${FN_VERSION_SUFFIX}.zip" --format=zip ${variant_name}_${FN_VERSION_SUFFIX}_en*.hex
|
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"
|
BYPRODUCTS "${CMAKE_BINARY_DIR}/release/${variant_name}_${FN_VERSION_SUFFIX}.zip"
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
add_dependencies(ALL_MULTILANG "${variant_name}-All-Languages")
|
add_dependencies(ALL_MULTILANG "${variant_name}-All-Languages")
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
@ -639,13 +639,15 @@ endif()
|
||||||
|
|
||||||
SET(REVO_FW_ZIP_NAME "E3D_REVO_FW_MK3_MK3S_MK3S+_${FN_VERSION_SUFFIX}.zip")
|
SET(REVO_FW_ZIP_NAME "E3D_REVO_FW_MK3_MK3S_MK3S+_${FN_VERSION_SUFFIX}.zip")
|
||||||
|
|
||||||
add_custom_command(TARGET ALL_MULTILANG
|
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
add_custom_command(TARGET ALL_MULTILANG
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/release
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/release
|
||||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/release/${REVO_FW_ZIP_NAME}
|
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 tar "cfv" "${REVO_FW_ZIP_NAME}" --format=zip *E3DREVO*.hex
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm *E3DREVO*.hex
|
COMMAND ${CMAKE_COMMAND} -E rm *E3DREVO*.hex
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tests
|
# Tests
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef CONFIGURATION_H
|
#ifndef CONFIGURATION_H
|
||||||
#define CONFIGURATION_H
|
#define CONFIGURATION_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include "boards.h"
|
#include "boards.h"
|
||||||
|
|
||||||
#define STR_HELPER(x) #x
|
#define STR_HELPER(x) #x
|
||||||
|
|
@ -20,9 +21,9 @@ extern const char _sPrinterMmuName[] PROGMEM;
|
||||||
#ifndef CMAKE_CONTROL
|
#ifndef CMAKE_CONTROL
|
||||||
#define FW_MAJOR 3
|
#define FW_MAJOR 3
|
||||||
#define FW_MINOR 14
|
#define FW_MINOR 14
|
||||||
#define FW_REVISION 0
|
#define FW_REVISION 1
|
||||||
#define FW_COMMITNR 7945
|
#define FW_COMMITNR 8225
|
||||||
#define FW_FLAVOR BETA //uncomment if DEV, ALPHA, BETA or RC
|
#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.
|
#define FW_FLAVERSION 1 //uncomment if FW_FLAVOR is defined and versioning is needed. Limited to max 8.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -121,13 +122,6 @@ extern const char _sPrinterMmuName[] PROGMEM;
|
||||||
#define TEMP_HYSTERESIS 5 // (degC) range of +/- temperatures considered "close" to the target one
|
#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.
|
#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
|
// 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 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
|
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
|
||||||
|
|
@ -290,124 +284,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
||||||
|
|
||||||
#define HOME_Z_SEARCH_THRESHOLD 0.15f // Threshold of the Z height in calibration
|
#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
|
// The position of the homing switches
|
||||||
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
|
//#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)
|
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)
|
||||||
|
|
@ -425,17 +301,6 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
||||||
//=============================Additional Features===========================
|
//=============================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
|
// Host Keepalive
|
||||||
//
|
//
|
||||||
// When enabled Marlin will send a busy status message to the host
|
// When enabled Marlin will send a busy status message to the host
|
||||||
|
|
@ -459,6 +324,10 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
||||||
#define SDSUPPORT
|
#define SDSUPPORT
|
||||||
#define LCD_WIDTH 20
|
#define LCD_WIDTH 20
|
||||||
#define LCD_HEIGHT 4
|
#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
|
// Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
||||||
|
|
@ -489,26 +358,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
|
||||||
//define BlinkM/CyzRgb Support
|
//define BlinkM/CyzRgb Support
|
||||||
//#define BLINKM
|
//#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.
|
#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
|
// Try to maintain a minimum distance from the bed even when Z is
|
||||||
// unknown when doing the following operations
|
// unknown when doing the following operations
|
||||||
#define MIN_Z_FOR_LOAD 50 // lcd filament loading or autoload
|
#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 50 // lcd filament unloading
|
#define MIN_Z_FOR_UNLOAD 35 // lcd filament unloading
|
||||||
#define MIN_Z_FOR_SWAP 27 // filament change (including M600)
|
#define MIN_Z_FOR_SWAP 27 // filament change (including M600)
|
||||||
#define MIN_Z_FOR_PREHEAT 10 // lcd preheat
|
#define MIN_Z_FOR_PREHEAT 10 // lcd preheat
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,9 @@ void Config_PrintSettings(uint8_t level)
|
||||||
#ifdef THERMAL_MODEL
|
#ifdef THERMAL_MODEL
|
||||||
thermal_model_report_settings();
|
thermal_model_report_settings();
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
@ -116,10 +119,6 @@ static_assert (EXTRUDERS == 1, "ConfigurationStore M500_conf not implemented for
|
||||||
static_assert (NUM_AXIS == 4, "ConfigurationStore M500_conf not implemented for more axis."
|
static_assert (NUM_AXIS == 4, "ConfigurationStore M500_conf not implemented for more axis."
|
||||||
"Fix axis_steps_per_mm max_feedrate_normal max_acceleration_mm_per_s2_normal max_jerk max_feedrate_silent"
|
"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.");
|
" max_acceleration_mm_per_s2_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
|
|
||||||
|
|
||||||
static_assert (sizeof(M500_conf) == 209, "sizeof(M500_conf) has changed, ensure that EEPROM_VERSION has been incremented, "
|
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."
|
"or if you added members in the end of struct, ensure that historically uninitialized values will be initialized."
|
||||||
|
|
@ -214,6 +213,10 @@ bool Config_RetrieveSettings()
|
||||||
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_feedrate_silent, sizeof(EEPROM_M500_base->max_feedrate_silent), default_conf.max_feedrate_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);
|
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
|
// load the CS to RAM
|
||||||
eeprom_read_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
|
eeprom_read_block(reinterpret_cast<uint8_t*>(&cs), reinterpret_cast<uint8_t*>(EEPROM_M500_base), sizeof(cs));
|
||||||
calculate_extruder_multipliers();
|
calculate_extruder_multipliers();
|
||||||
|
|
@ -231,11 +234,6 @@ bool Config_RetrieveSettings()
|
||||||
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(X_AXIS, cs.axis_ustep_resolution[X_AXIS]);
|
||||||
tmc2130_set_res(Y_AXIS, cs.axis_ustep_resolution[Y_AXIS]);
|
tmc2130_set_res(Y_AXIS, cs.axis_ustep_resolution[Y_AXIS]);
|
||||||
tmc2130_set_res(Z_AXIS, cs.axis_ustep_resolution[Z_AXIS]);
|
tmc2130_set_res(Z_AXIS, cs.axis_ustep_resolution[Z_AXIS]);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ typedef struct
|
||||||
uint32_t min_segment_time_us; //!< (µs) M205 B
|
uint32_t min_segment_time_us; //!< (µs) M205 B
|
||||||
float max_jerk[4]; //!< Jerk is a maximum immediate velocity change.
|
float max_jerk[4]; //!< Jerk is a maximum immediate velocity change.
|
||||||
float add_homing[3];
|
float add_homing[3];
|
||||||
float zprobe_zoffset; //!< Only used with define ENABLE_AUTO_BED_LEVELING
|
float zprobe_zoffset; //!< unused
|
||||||
float Kp;
|
float Kp;
|
||||||
float Ki;
|
float Ki;
|
||||||
float Kd;
|
float Kd;
|
||||||
|
|
|
||||||
|
|
@ -125,34 +125,6 @@
|
||||||
#endif //End auto min/max positions
|
#endif //End auto min/max positions
|
||||||
//END AUTOSET LOCATIONS OF LIMIT SWITCHES -ZP
|
//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:
|
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
|
||||||
#define X_HOME_RETRACT_MM 5
|
#define X_HOME_RETRACT_MM 5
|
||||||
#define Y_HOME_RETRACT_MM 5
|
#define Y_HOME_RETRACT_MM 5
|
||||||
|
|
|
||||||
|
|
@ -191,13 +191,6 @@ void dcode_3()
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
#include "bootapp.h"
|
#include "bootapp.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
extern float current_temperature_pinda;
|
|
||||||
extern float axis_steps_per_mm[NUM_AXIS];
|
|
||||||
|
|
||||||
|
|
||||||
#define LOG(args...) printf(args)
|
|
||||||
#endif //0
|
|
||||||
#define LOG(args...)
|
#define LOG(args...)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -348,7 +341,6 @@ void dcode_4()
|
||||||
- The hex address needs to be lowercase without the 0 before the x
|
- 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
|
- The hex data needs to be lowercase
|
||||||
|
|
||||||
*/
|
*/
|
||||||
void dcode_5()
|
void dcode_5()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
|
#include "mmu2.h"
|
||||||
#include "planner.h"
|
#include "planner.h"
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
|
|
@ -148,6 +149,7 @@ void Filament_sensor::triggerFilamentRemoved() {
|
||||||
|
|
||||||
void Filament_sensor::filRunout() {
|
void Filament_sensor::filRunout() {
|
||||||
// SERIAL_ECHOLNPGM("filRunout");
|
// SERIAL_ECHOLNPGM("filRunout");
|
||||||
|
sendHostNotification_P(MSG_FILAMENT_RUNOUT_DETECTED);
|
||||||
runoutEnabled = false;
|
runoutEnabled = false;
|
||||||
autoLoadEnabled = false;
|
autoLoadEnabled = false;
|
||||||
stop_and_save_print_to_ram(0, 0);
|
stop_and_save_print_to_ram(0, 0);
|
||||||
|
|
@ -311,22 +313,7 @@ bool IR_sensor_analog::checkVoltage(uint16_t raw) {
|
||||||
puts_P(PSTR("fsensor v0.4 in fault range 4.6-5V - unconnected"));
|
puts_P(PSTR("fsensor v0.4 in fault range 4.6-5V - unconnected"));
|
||||||
return false;
|
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
|
// otherwise the IR fsensor is considered working correctly
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#include "Configuration.h"
|
#include "Configuration.h"
|
||||||
#include "pins.h"
|
#include "pins.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "mmu2.h"
|
|
||||||
#include "printer_state.h"
|
#include "printer_state.h"
|
||||||
|
|
||||||
#ifndef AT90USB
|
#ifndef AT90USB
|
||||||
|
|
@ -64,8 +63,6 @@
|
||||||
#define MYSERIAL MSerial
|
#define MYSERIAL MSerial
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lcd.h"
|
|
||||||
|
|
||||||
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
|
#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
|
||||||
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
|
#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
|
||||||
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
|
#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
|
||||||
|
|
@ -124,13 +121,8 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
#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 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; }
|
#define disable_y() { WRITE(Y_ENABLE_PIN,!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define enable_y() ;
|
#define enable_y() ;
|
||||||
#define disable_y() ;
|
#define disable_y() ;
|
||||||
|
|
@ -138,22 +130,12 @@ void manage_inactivity(bool ignore_stepper_queue=false);
|
||||||
|
|
||||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||||
#if defined(Z_AXIS_ALWAYS_ON)
|
#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 poweron_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
||||||
#define poweroff_z() {}
|
#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
|
#else
|
||||||
#define poweron_z() WRITE(Z_ENABLE_PIN, Z_ENABLE_ON)
|
#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; }
|
#define poweroff_z() { WRITE(Z_ENABLE_PIN,!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define poweron_z() {}
|
#define poweron_z() {}
|
||||||
#define poweroff_z() {}
|
#define poweroff_z() {}
|
||||||
|
|
@ -367,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);
|
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
|
#endif //HEATBED_ANALYSIS
|
||||||
float temp_comp_interpolation(float temperature);
|
float temp_comp_interpolation(float temperature);
|
||||||
#if 0
|
|
||||||
void show_fw_version_warnings();
|
|
||||||
#endif
|
|
||||||
uint8_t check_printer_version();
|
uint8_t check_printer_version();
|
||||||
|
|
||||||
#ifdef PINDA_THERMISTOR
|
#ifdef PINDA_THERMISTOR
|
||||||
|
|
@ -417,7 +396,7 @@ extern uint8_t calc_percent_done();
|
||||||
/*enum MarlinBusyState {
|
/*enum MarlinBusyState {
|
||||||
NOT_BUSY, // Not in a handler
|
NOT_BUSY, // Not in a handler
|
||||||
IN_HANDLER, // Processing a GCode
|
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_USER, // Blocking pending any input
|
||||||
PAUSED_FOR_INPUT // Blocking pending text input (concept)
|
PAUSED_FOR_INPUT // Blocking pending text input (concept)
|
||||||
};*/
|
};*/
|
||||||
|
|
@ -457,10 +436,10 @@ void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex);
|
||||||
#define UVLO !(PINE & (1<<4))
|
#define UVLO !(PINE & (1<<4))
|
||||||
|
|
||||||
|
|
||||||
void M600_load_filament();
|
void M600_load_filament(const char* filament_name);
|
||||||
void M600_load_filament_movements();
|
void M600_load_filament_movements(const char* filament_name);
|
||||||
void M600_wait_for_user();
|
void M600_wait_for_user();
|
||||||
bool M600_check_state_and_repeat();
|
bool M600_check_state_and_repeat(const char* filament_name);
|
||||||
void load_filament_final_feed();
|
void load_filament_final_feed();
|
||||||
void marlin_wait_for_click();
|
void marlin_wait_for_click();
|
||||||
float raise_z(float delta);
|
float raise_z(float delta);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -8,6 +8,7 @@
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
#include "Filament_sensor.h"
|
#include "Filament_sensor.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "lcd.h"
|
||||||
#include "stopwatch.h"
|
#include "stopwatch.h"
|
||||||
|
|
||||||
#ifdef PRUSA_FARM
|
#ifdef PRUSA_FARM
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -55,7 +55,7 @@ uint8_t SpoolJoin::nextSlot()
|
||||||
SERIAL_ECHOPGM("SpoolJoin: ");
|
SERIAL_ECHOPGM("SpoolJoin: ");
|
||||||
SERIAL_ECHO((int)currentMMUSlot);
|
SERIAL_ECHO((int)currentMMUSlot);
|
||||||
|
|
||||||
if (currentMMUSlot >= 4) currentMMUSlot = 0;
|
if (currentMMUSlot >= MMU_FILAMENT_COUNT-1) currentMMUSlot = 0;
|
||||||
else currentMMUSlot++;
|
else currentMMUSlot++;
|
||||||
|
|
||||||
SERIAL_ECHOPGM(" -> ");
|
SERIAL_ECHOPGM(" -> ");
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ void TCodes(char *const strchr_pointer, const uint8_t codeValue) {
|
||||||
} else if (strchr_pointer[index] == 'x' || strchr_pointer[index] == '?'){
|
} else if (strchr_pointer[index] == 'x' || strchr_pointer[index] == '?'){
|
||||||
// load to extruder gears; if mmu is not present do nothing
|
// load to extruder gears; if mmu is not present do nothing
|
||||||
if (MMU2::mmu2.Enabled()) {
|
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'){
|
} else if (strchr_pointer[index] == 'c'){
|
||||||
// load from extruder gears to nozzle (nozzle should be preheated)
|
// load from extruder gears to nozzle (nozzle should be preheated)
|
||||||
|
|
|
||||||
|
|
@ -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_HIGH = 0;
|
||||||
uint8_t backlightLevel_LOW = 0;
|
uint8_t backlightLevel_LOW = 0;
|
||||||
uint8_t backlightMode = BACKLIGHT_MODE_BRIGHT;
|
uint8_t backlightMode = BACKLIGHT_MODE_BRIGHT;
|
||||||
int16_t backlightTimer_period = 10;
|
int16_t backlightTimer_period = LCD_BACKLIGHT_TIMEOUT;
|
||||||
LongTimer backlightTimer;
|
LongTimer backlightTimer;
|
||||||
|
|
||||||
static void backlightTimer_reset() //used for resetting the timer and waking the display. Triggered on user interactions.
|
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)
|
if (section_start)
|
||||||
{
|
{
|
||||||
backlightMode = BACKLIGHT_MODE_BRIGHT;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -93,9 +93,9 @@ void backlight_init()
|
||||||
|
|
||||||
//initialize backlight
|
//initialize backlight
|
||||||
backlightMode = eeprom_init_default_byte((uint8_t *)EEPROM_BACKLIGHT_MODE, BACKLIGHT_MODE_AUTO);
|
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_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, 50);
|
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, 10); // in seconds
|
backlightTimer_period = eeprom_init_default_word((uint16_t *)EEPROM_BACKLIGHT_TIMEOUT, LCD_BACKLIGHT_TIMEOUT); // in seconds
|
||||||
|
|
||||||
SET_OUTPUT(LCD_BL_PIN);
|
SET_OUTPUT(LCD_BL_PIN);
|
||||||
backlightTimer_reset();
|
backlightTimer_reset();
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ public:
|
||||||
void getDirName(char* name, uint8_t level);
|
void getDirName(char* name, uint8_t level);
|
||||||
uint8_t getWorkDirDepth();
|
uint8_t getWorkDirDepth();
|
||||||
|
|
||||||
|
|
||||||
void ls(ls_param params);
|
void ls(ls_param params);
|
||||||
bool chdir(const char * relpath, bool doPresort);
|
bool chdir(const char * relpath, bool doPresort);
|
||||||
void updir();
|
void updir();
|
||||||
|
|
@ -90,7 +89,7 @@ public:
|
||||||
public:
|
public:
|
||||||
bool saving;
|
bool saving;
|
||||||
bool logging;
|
bool logging;
|
||||||
bool sdprinting ;
|
bool sdprinting;
|
||||||
bool mounted;
|
bool mounted;
|
||||||
char filename[FILENAME_LENGTH];
|
char filename[FILENAME_LENGTH];
|
||||||
// There are scenarios when simple modification time is not enough (on MS Windows)
|
// There are scenarios when simple modification time is not enough (on MS Windows)
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,9 @@ void get_command()
|
||||||
sprintf_P(time, PSTR("%i hours %i minutes"),hours, minutes);
|
sprintf_P(time, PSTR("%i hours %i minutes"),hours, minutes);
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOLN(time);
|
SERIAL_ECHOLN(time);
|
||||||
|
#ifndef SHOW_FILENAME_AFTER_FINISH
|
||||||
lcd_setstatus(time);
|
lcd_setstatus(time);
|
||||||
|
#endif //SHOW_FILENAME_AFTER_FINISH
|
||||||
card.printingHasFinished();
|
card.printingHasFinished();
|
||||||
card.checkautostart(true);
|
card.checkautostart(true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#define EEPROM_H
|
#define EEPROM_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include "Configuration_var.h"
|
#include "Configuration_var.h"
|
||||||
|
|
||||||
// Custom Mendel Name
|
// Custom Mendel Name
|
||||||
|
|
@ -83,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
|
To convert hex to dec https://www.rapidtables.com/convert/number/hex-to-decimal.html
|
||||||
|
|
||||||
Version: 3.14.0
|
Version: 3.14.1
|
||||||
|
|
||||||
---------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -106,8 +107,8 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
||||||
| ^ | ^ | ^ | f0h 240 | ^ __P__ | needs Z calibration | ^ | ^
|
| ^ | ^ | ^ | f0h 240 | ^ __P__ | needs Z calibration | ^ | ^
|
||||||
| ^ | ^ | ^ | fah 250 | ^ | needs XYZ calibration | ^ | ^
|
| ^ | ^ | ^ | fah 250 | ^ | needs XYZ calibration | ^ | ^
|
||||||
| ^ | ^ | ^ | 00h 0 | ^ | Unknown (legacy) | ^ | ^
|
| ^ | ^ | ^ | 00h 0 | ^ | Unknown (legacy) | ^ | ^
|
||||||
| 0x0FF5 4085 | uint16 | EEPROM_BABYSTEP_Z0 | ??? | ff ffh 65535 | Babystep for Z ??? | ??? | D3 Ax0ff5 C2
|
| 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 meters | ??? | D3 Ax0ff1 C4
|
| 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
|
| 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
|
| 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
|
| 0x0FDD 4061 | float | EEPROM_BED_CALIBRATION_VEC_X | ??? | ff ff ff ffh | ??? | ??? | D3 Ax0fdd C8
|
||||||
|
|
@ -384,6 +385,39 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
||||||
| 0x0C80 3200 | char[17]| EEPROM_CUSTOM_MENDEL_NAME | Prusa i3 MK3S| ffffffffffffffffff... | Custom Printer Name | | D3 Ax0c80 C17
|
| 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
|
| 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 | ^ | ^
|
| ^ | ^ | ^ | 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
|
|Address begin|Bit/Type | Name | Valid values | Default/FactoryReset | Description |Gcode/Function| Debug code
|
||||||
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--:
|
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--:
|
||||||
|
|
@ -407,7 +441,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
||||||
#define _EEPROM_FREE_NR11_ 4090 // 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_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_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
|
#define EEPROM_FILAMENTUSED 4081
|
||||||
// uint32_t
|
// uint32_t
|
||||||
#define EEPROM_TOTALTIME 4077
|
#define EEPROM_TOTALTIME 4077
|
||||||
|
|
@ -624,9 +658,18 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
||||||
#define EEPROM_FILENAME_EXTENSION (EEPROM_KILL_PENDING_FLAG - 3) // 3 x char
|
#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_CUSTOM_MENDEL_NAME (EEPROM_FILENAME_EXTENSION-17) //char[17]
|
||||||
#define EEPROM_UVLO_Z_LIFTED (EEPROM_CUSTOM_MENDEL_NAME-1) //bool
|
#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.
|
//This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.
|
||||||
#define EEPROM_LAST_ITEM EEPROM_UVLO_Z_LIFTED
|
#define EEPROM_LAST_ITEM EEPROM_CHECK_FILAMENT
|
||||||
// !!!!!
|
// !!!!!
|
||||||
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
||||||
// !!!!!
|
// !!!!!
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ void checkFanSpeed()
|
||||||
lcd_reset_alert_level(); //for another fan speed error
|
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
|
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++)
|
for (uint8_t fan = 0; fan < 2; fan++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
static void lay1cal_common_enqueue_loop(const char * const * cmd_sequence, const uint8_t steps) {
|
||||||
for (uint8_t i = 0; i < steps; ++i)
|
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 extrude_fmt_X[] PROGMEM = "G1X%.4fE%.4f";
|
||||||
static const char zero_extrusion[] PROGMEM = "G92 E0";
|
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
|
//! @brief Wait for preheat
|
||||||
void lay1cal_wait_preheat()
|
void lay1cal_wait_preheat()
|
||||||
|
|
@ -72,8 +91,8 @@ bool lay1cal_load_filament(uint8_t filament)
|
||||||
if (MMU2::mmu2.Enabled())
|
if (MMU2::mmu2.Enabled())
|
||||||
{
|
{
|
||||||
enquecommand_P(MSG_M83);
|
enquecommand_P(MSG_M83);
|
||||||
enquecommand_P(PSTR("G1 Y-3 F1000"));
|
enquecommand_P(PSTR("G1Y-3F1000"));
|
||||||
enquecommand_P(PSTR("G1 Z0.4 F1000"));
|
enquecommand_P(PSTR("G1Z0.4"));
|
||||||
|
|
||||||
uint8_t currentTool = MMU2::mmu2.get_current_tool();
|
uint8_t currentTool = MMU2::mmu2.get_current_tool();
|
||||||
if(currentTool == filament ){
|
if(currentTool == filament ){
|
||||||
|
|
@ -96,22 +115,19 @@ bool lay1cal_load_filament(uint8_t filament)
|
||||||
//! @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)
|
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_3[] PROGMEM = "G1X55E29F1073";
|
||||||
static const char cmd_intro_mmu_4[] PROGMEM = "G1 X5 E29 F1800";
|
static const char cmd_intro_mmu_4[] PROGMEM = "G1X5E29F1800";
|
||||||
static const char cmd_intro_mmu_5[] PROGMEM = "G1 X55 E8 F2000";
|
static const char cmd_intro_mmu_5[] PROGMEM = "G1X55E8F2000";
|
||||||
static const char cmd_intro_mmu_6[] PROGMEM = "G1 Z0.3 F1000";
|
static const char cmd_intro_mmu_6[] PROGMEM = "G1Z0.3F1000";
|
||||||
static const char cmd_intro_mmu_8[] PROGMEM = "G1 X240 E25 F2200";
|
static const char cmd_intro_mmu_8[] PROGMEM = "G1X240E25F2200";
|
||||||
static const char cmd_intro_mmu_9[] PROGMEM = "G1 Y-2 F1000";
|
static const char cmd_intro_mmu_9[] PROGMEM = "G1Y-2F1000";
|
||||||
static const char cmd_intro_mmu_10[] PROGMEM = "G1 X55 E25 F1400";
|
static const char cmd_intro_mmu_10[] PROGMEM = "G1X202.5E8F1400";
|
||||||
static const char cmd_intro_mmu_11[] PROGMEM = "G1 Z0.2 F1000";
|
static const char cmd_intro_mmu_11[] PROGMEM = "G1Z0.2";
|
||||||
static const char cmd_intro_mmu_12[] PROGMEM = "G1 X5 E4 F1000";
|
static const char * const cmd_intro_mmu[] PROGMEM =
|
||||||
|
|
||||||
static const char * const intro_mmu_cmd[] PROGMEM =
|
|
||||||
{
|
{
|
||||||
// first 2 items are only relevant if filament was not loaded - i.e. extraPurgeNeeded == true
|
// first 2 items are only relevant if filament was not loaded - i.e. extraPurgeNeeded == true
|
||||||
cmd_intro_mmu_3,
|
cmd_intro_mmu_3,
|
||||||
cmd_intro_mmu_4,
|
cmd_intro_mmu_4,
|
||||||
|
|
||||||
cmd_intro_mmu_5,
|
cmd_intro_mmu_5,
|
||||||
cmd_intro_mmu_6,
|
cmd_intro_mmu_6,
|
||||||
zero_extrusion,
|
zero_extrusion,
|
||||||
|
|
@ -119,42 +135,42 @@ void lay1cal_intro_line(bool extraPurgeNeeded, float layer_height, float extrusi
|
||||||
cmd_intro_mmu_9,
|
cmd_intro_mmu_9,
|
||||||
cmd_intro_mmu_10,
|
cmd_intro_mmu_10,
|
||||||
cmd_intro_mmu_11,
|
cmd_intro_mmu_11,
|
||||||
cmd_intro_mmu_12,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (MMU2::mmu2.Enabled())
|
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
|
else
|
||||||
{
|
{
|
||||||
static const char fmt1[] PROGMEM = "G1 X%d E%-.3f F1000";
|
enquecommand_P(feedrate_F1080); //fixed velocity for the intro line
|
||||||
enquecommandf_P(fmt1, 60, count_e(layer_height, extrusion_width * 4.f, 60));
|
enquecommandf_P(extrude_fmt_X, 60.f, count_e(layer_height, extrusion_width * 4.f, 60));
|
||||||
enquecommandf_P(fmt1, 100, count_e(layer_height, extrusion_width * 8.f, 40));
|
enquecommandf_P(extrude_fmt_X, 202.5f, count_e(layer_height, extrusion_width * 8.f, 142.5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Setup for printing meander
|
//! @brief Setup for printing meander
|
||||||
void lay1cal_before_meander()
|
void lay1cal_before_meander()
|
||||||
{
|
{
|
||||||
static const char cmd_pre_meander_2[] PROGMEM = "G90"; //use absolute coordinates
|
#ifndef NEW_FIRST_LAYER_CAL
|
||||||
static const char cmd_pre_meander_4[] PROGMEM = "G1 E-1.5 F2100";
|
static const char cmd_pre_meander_4[] PROGMEM = "G1E-1.5F2100";
|
||||||
static const char cmd_pre_meander_5[] PROGMEM = "G1 Z5 F7200";
|
static const char cmd_pre_meander_5[] PROGMEM = "G1Z5F7200";
|
||||||
static const char cmd_pre_meander_6[] PROGMEM = "M204 S1000"; //set acceleration
|
#endif //NEW_FIRST_LAYER_CAL
|
||||||
static const char cmd_pre_meander_7[] PROGMEM = "G1 F4000";
|
static const char cmd_pre_meander_6[] PROGMEM = "M204S1000"; //set acceleration
|
||||||
|
|
||||||
static const char * const cmd_pre_meander[] PROGMEM =
|
static const char * const cmd_pre_meander[] PROGMEM =
|
||||||
{
|
{
|
||||||
zero_extrusion,
|
zero_extrusion,
|
||||||
cmd_pre_meander_2,
|
MSG_G90,
|
||||||
MSG_M83, // use relative distances for extrusion
|
MSG_M83, // use relative distances for extrusion
|
||||||
|
#ifndef NEW_FIRST_LAYER_CAL
|
||||||
cmd_pre_meander_4,
|
cmd_pre_meander_4,
|
||||||
cmd_pre_meander_5,
|
cmd_pre_meander_5,
|
||||||
|
#endif //NEW_FIRST_LAYER_CAL
|
||||||
cmd_pre_meander_6,
|
cmd_pre_meander_6,
|
||||||
cmd_pre_meander_7,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lay1cal_common_enqueue_loop(cmd_pre_meander, (sizeof(cmd_pre_meander)/sizeof(cmd_pre_meander[0])));
|
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
|
//! @brief Print meander start
|
||||||
void lay1cal_meander_start(float layer_height, float extrusion_width)
|
void lay1cal_meander_start(float layer_height, float extrusion_width)
|
||||||
{
|
{
|
||||||
enquecommand_P(PSTR("G1 X50 Y155"));
|
#ifndef NEW_FIRST_LAYER_CAL
|
||||||
|
enquecommand_P(PSTR("G1X50Y155"));
|
||||||
static const char fmt1[] PROGMEM = "G1 Z%-.3f F7200";
|
#endif //_NEW_FIRST_LAYER_CAL
|
||||||
|
static const char fmt1[] PROGMEM = "G1Z%.2f";
|
||||||
enquecommandf_P(fmt1, layer_height);
|
enquecommandf_P(fmt1, layer_height);
|
||||||
|
enquecommand_P(feedrate_F1080);
|
||||||
enquecommand_P(PSTR("G1 F1080"));
|
enquecommand_P(MSG_G91); //enable relative XYZ
|
||||||
|
#ifdef NEW_FIRST_LAYER_CAL
|
||||||
enquecommandf_P(extrude_fmt, 75, 155, count_e(layer_height, extrusion_width * 4.f, 25));
|
enquecommandf_P(extrude_fmt_Y, short_length, count_e(layer_height, extrusion_width, short_length));
|
||||||
enquecommandf_P(extrude_fmt, 100, 155, count_e(layer_height, extrusion_width * 2.f, 25));
|
enquecommandf_P(extrude_fmt_X, long_length*invert, count_e(layer_height, extrusion_width, long_length));
|
||||||
enquecommandf_P(extrude_fmt, 200, 155, count_e(layer_height, extrusion_width, 100));
|
enquecommandf_P(extrude_fmt_Y, -short_length*invert, count_e(layer_height, extrusion_width, short_length));
|
||||||
enquecommandf_P(extrude_fmt, 200, 135, count_e(layer_height, extrusion_width, 20));
|
#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
|
//! @brief Print meander
|
||||||
//! @param cmd_buffer character buffer needed to format gcodes
|
//! @param cmd_buffer character buffer needed to format gcodes
|
||||||
void lay1cal_meander(float layer_height, float extrusion_width)
|
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 long_extrusion = count_e(layer_height, extrusion_width, long_length);
|
||||||
const float short_extrusion = count_e(layer_height, extrusion_width, short_length);
|
const float short_extrusion = count_e(layer_height, extrusion_width, short_length);
|
||||||
|
|
||||||
uint8_t y_pos = 135;
|
for(int8_t i = 0, xdir = -invert; i <= 4; i++, xdir = -xdir)
|
||||||
uint8_t x_pos = 50;
|
|
||||||
for(uint8_t i = 0; i <= 4; ++i)
|
|
||||||
{
|
{
|
||||||
enquecommandf_P(extrude_fmt, x_pos, y_pos, long_extrusion);
|
enquecommandf_P(extrude_fmt_X, xdir * long_length, long_extrusion);
|
||||||
|
enquecommandf_P(extrude_fmt_Y, invert * -short_length, short_extrusion);
|
||||||
y_pos -= short_length;
|
|
||||||
|
|
||||||
enquecommandf_P(extrude_fmt, x_pos, y_pos, short_extrusion);
|
|
||||||
|
|
||||||
x_pos += long_length;
|
|
||||||
|
|
||||||
long_length = -long_length;
|
|
||||||
}
|
}
|
||||||
|
#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
|
//! @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 cmd_buffer character buffer needed to format gcodes
|
||||||
//! @param i iteration
|
void lay1cal_square(float layer_height, float extrusion_width)
|
||||||
void lay1cal_square(uint8_t step, float layer_height, float extrusion_width)
|
|
||||||
{
|
{
|
||||||
const float long_length = 20;
|
const float Y_spacing = spacing(layer_height, extrusion_width);
|
||||||
const float short_length = spacing(layer_height, extrusion_width);
|
const float long_extrusion = count_e(layer_height, extrusion_width, square_width);
|
||||||
const float long_extrusion = count_e(layer_height, extrusion_width, long_length);
|
const float short_extrusion = count_e(layer_height, extrusion_width, Y_spacing);
|
||||||
const float short_extrusion = count_e(layer_height, extrusion_width, short_length);
|
|
||||||
static const char fmt1[] PROGMEM = "G1 X%d Y%-.2f E%-.3f";
|
|
||||||
|
|
||||||
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(extrude_fmt_X, square_width*invert, long_extrusion);
|
||||||
enquecommandf_P(fmt1, 70, (35 - (2 * i + 1)*short_length), short_extrusion);
|
enquecommandf_P(extrude_fmt_Y, -Y_spacing*invert, short_extrusion);
|
||||||
enquecommandf_P(fmt1, 50, (35 - (2 * i + 1)*short_length), long_extrusion);
|
enquecommandf_P(extrude_fmt_X, -square_width*invert, long_extrusion);
|
||||||
enquecommandf_P(fmt1, 50, (35 - (i + 1)*short_length * 2), short_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_3[] PROGMEM = "G1E-0.075F2100"; // Retract
|
||||||
static const char cmd_cal_finish_2[] PROGMEM = "M104 S0"; // turn off temperature
|
static const char cmd_cal_finish_4[] PROGMEM = "M140S0"; // Turn off bed heater
|
||||||
static const char cmd_cal_finish_3[] PROGMEM = "M140 S0"; // turn off heatbed
|
static const char cmd_cal_finish_5[] PROGMEM = "G1Z10F1300"; // Lift Z
|
||||||
static const char cmd_cal_finish_4[] PROGMEM = "G1 Z10 F1300"; //lift Z
|
static const char cmd_cal_finish_6[] PROGMEM = "G1X10Y180F4000"; // Go to parking position
|
||||||
static const char cmd_cal_finish_5[] PROGMEM = "G1 X10 Y180 F4000"; //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 =
|
static const char * const cmd_cal_finish[] PROGMEM =
|
||||||
{
|
{
|
||||||
MSG_M107, // turn off printer fan
|
MSG_G90, // Set to Absolute Positioning
|
||||||
cmd_cal_finish_1,
|
MSG_M107, // Turn off printer fan
|
||||||
cmd_cal_finish_2,
|
cmd_cal_finish_3, // Retract
|
||||||
cmd_cal_finish_3,
|
cmd_cal_finish_4, // Turn off bed heater
|
||||||
cmd_cal_finish_4,
|
cmd_cal_finish_5, // Lift Z
|
||||||
cmd_cal_finish_5
|
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])));
|
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_before_meander();
|
||||||
void lay1cal_meander_start(float layer_height, float extrusion_width);
|
void lay1cal_meander_start(float layer_height, float extrusion_width);
|
||||||
void lay1cal_meander(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_square(float layer_height, float extrusion_width);
|
||||||
void lay1cal_finish(bool mmu_enabled);
|
void lay1cal_finish();
|
||||||
|
|
||||||
#endif /* FIRMWARE_FIRST_LAY_CAL_H_ */
|
#endif /* FIRMWARE_FIRST_LAY_CAL_H_ */
|
||||||
|
|
|
||||||
255
Firmware/lcd.cpp
255
Firmware/lcd.cpp
|
|
@ -22,8 +22,6 @@
|
||||||
#define LCD_8BIT
|
#define LCD_8BIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define VT100
|
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
#define LCD_CLEARDISPLAY 0x01
|
#define LCD_CLEARDISPLAY 0x01
|
||||||
#define LCD_RETURNHOME 0x02
|
#define LCD_RETURNHOME 0x02
|
||||||
|
|
@ -77,10 +75,6 @@ static uint8_t lcd_displaymode = 0;
|
||||||
uint8_t lcd_currline;
|
uint8_t lcd_currline;
|
||||||
static uint8_t lcd_ddram_address; // no need for preventing ddram overflow
|
static uint8_t lcd_ddram_address; // no need for preventing ddram overflow
|
||||||
|
|
||||||
#ifdef VT100
|
|
||||||
uint8_t lcd_escape[8];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct CustomCharacter {
|
struct CustomCharacter {
|
||||||
uint8_t colByte;
|
uint8_t colByte;
|
||||||
uint8_t rowData[4];
|
uint8_t rowData[4];
|
||||||
|
|
@ -95,28 +89,9 @@ static const CustomCharacter Font[] PROGMEM = {
|
||||||
#define CUSTOM_CHARACTERS_CNT (sizeof(Font) / sizeof(Font[0]))
|
#define CUSTOM_CHARACTERS_CNT (sizeof(Font) / sizeof(Font[0]))
|
||||||
|
|
||||||
static void lcd_display(void);
|
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
|
|
||||||
|
|
||||||
static void lcd_print_custom(uint8_t c);
|
static void lcd_print_custom(uint8_t c);
|
||||||
static void lcd_invalidate_custom_characters();
|
static void lcd_invalidate_custom_characters();
|
||||||
|
|
||||||
#ifdef VT100
|
|
||||||
void lcd_escape_write(uint8_t chr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void lcd_pulseEnable(void)
|
static void lcd_pulseEnable(void)
|
||||||
{
|
{
|
||||||
WRITE(LCD_PINS_ENABLE,HIGH);
|
WRITE(LCD_PINS_ENABLE,HIGH);
|
||||||
|
|
@ -164,16 +139,9 @@ static void lcd_write(uint8_t value)
|
||||||
if (value == '\n') {
|
if (value == '\n') {
|
||||||
if (lcd_currline > 3) lcd_currline = -1;
|
if (lcd_currline > 3) lcd_currline = -1;
|
||||||
lcd_set_cursor(0, lcd_currline + 1); // LF
|
lcd_set_cursor(0, lcd_currline + 1); // LF
|
||||||
}
|
} else if ((value >= 0x80) && (value < (0x80 + CUSTOM_CHARACTERS_CNT))) {
|
||||||
else if ((value >= 0x80) && (value < (0x80 + CUSTOM_CHARACTERS_CNT))) {
|
|
||||||
lcd_print_custom(value);
|
lcd_print_custom(value);
|
||||||
}
|
} else {
|
||||||
#ifdef VT100
|
|
||||||
else if (lcd_escape[0] || (value == '\e')) {
|
|
||||||
lcd_escape_write(value);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else {
|
|
||||||
lcd_send(value, HIGH);
|
lcd_send(value, HIGH);
|
||||||
lcd_ddram_address++; // no need for preventing ddram overflow
|
lcd_ddram_address++; // no need for preventing ddram overflow
|
||||||
}
|
}
|
||||||
|
|
@ -207,10 +175,6 @@ static void lcd_begin(uint8_t clear)
|
||||||
lcd_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
|
lcd_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
|
||||||
// set the entry mode
|
// set the entry mode
|
||||||
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
lcd_command(LCD_ENTRYMODESET | lcd_displaymode);
|
||||||
|
|
||||||
#ifdef VT100
|
|
||||||
lcd_escape[0] = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lcd_putchar(char c, FILE *)
|
static int lcd_putchar(char c, FILE *)
|
||||||
|
|
@ -278,83 +242,6 @@ void lcd_display(void)
|
||||||
lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
|
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
|
/// @brief set the current LCD row
|
||||||
/// @param row LCD row number, ranges from 0 to LCD_HEIGHT - 1
|
/// @param row LCD row number, ranges from 0 to LCD_HEIGHT - 1
|
||||||
static void FORCE_INLINE lcd_set_current_row(uint8_t row)
|
static void FORCE_INLINE lcd_set_current_row(uint8_t row)
|
||||||
|
|
@ -443,144 +330,6 @@ void lcd_createChar_P(uint8_t location, const CustomCharacter *char_p)
|
||||||
lcd_command(LCD_SETDDRAMADDR | lcd_ddram_address); // no need for masking the address
|
lcd_command(LCD_SETDDRAMADDR | lcd_ddram_address); // no need for masking the address
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VT100
|
|
||||||
|
|
||||||
//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
|
|
||||||
}
|
|
||||||
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(); 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
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //VT100
|
|
||||||
|
|
||||||
|
|
||||||
int lcd_putc(char c)
|
int lcd_putc(char c)
|
||||||
{
|
{
|
||||||
return fputc(c, lcdout);
|
return fputc(c, lcdout);
|
||||||
|
|
|
||||||
|
|
@ -22,19 +22,6 @@ extern void lcd_clear(void);
|
||||||
|
|
||||||
extern void lcd_home(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);
|
extern void lcd_set_cursor(uint8_t col, uint8_t row);
|
||||||
|
|
||||||
/// @brief Change the cursor column position while preserving the current row position
|
/// @brief Change the cursor column position while preserving the current row position
|
||||||
|
|
@ -70,19 +57,6 @@ extern void lcd_print(unsigned int, int = 10);
|
||||||
extern void lcd_print(long, int = 10);
|
extern void lcd_print(long, int = 10);
|
||||||
extern void lcd_print(unsigned 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_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 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.
|
#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
|
//! When constructed (on stack), original state state of lcd_update_enabled is stored
|
||||||
//! and LCD updates are disabled.
|
//! and LCD updates are disabled.
|
||||||
//! When destroyed (gone out of scope), original state of LCD update is restored.
|
//! 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
|
//! Do not call lcd_update_enable() to prevent calling lcd_update() in sensitive code.
|
||||||
//! and calling lcd_update_enable(false) and lcd_update_enable(saved).
|
//! in certain scenarios it will cause recursion e.g. in the menus.
|
||||||
class LcdUpdateDisabler
|
class LcdUpdateDisabler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LcdUpdateDisabler(): m_updateEnabled(lcd_update_enabled)
|
LcdUpdateDisabler(): m_updateEnabled(lcd_update_enabled)
|
||||||
{
|
{
|
||||||
lcd_update_enable(false);
|
lcd_update_enabled = false;
|
||||||
}
|
}
|
||||||
~LcdUpdateDisabler()
|
~LcdUpdateDisabler()
|
||||||
{
|
{
|
||||||
lcd_update_enable(m_updateEnabled);
|
lcd_update_enabled = m_updateEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -475,10 +475,8 @@ static void _menu_edit_P()
|
||||||
// disable after first use and/or if the initial value is not minEditValue
|
// disable after first use and/or if the initial value is not minEditValue
|
||||||
_md->minJumpValue = 0;
|
_md->minJumpValue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_md->currentValue += lcd_encoder;
|
_md->currentValue += lcd_encoder;
|
||||||
lcd_encoder = 0; // Consume knob rotation event
|
lcd_encoder = 0; // Consume knob rotation event
|
||||||
|
|
||||||
// Constrain the value in case it's outside the allowed limits
|
// Constrain the value in case it's outside the allowed limits
|
||||||
_md->currentValue = constrain(_md->currentValue, _md->minEditValue, _md->maxEditValue);
|
_md->currentValue = constrain(_md->currentValue, _md->minEditValue, _md->maxEditValue);
|
||||||
lcd_set_cursor(0, 1);
|
lcd_set_cursor(0, 1);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "ConfigurationStore.h"
|
#include "ConfigurationStore.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "lcd.h"
|
||||||
#include "mesh_bed_calibration.h"
|
#include "mesh_bed_calibration.h"
|
||||||
#include "mesh_bed_leveling.h"
|
#include "mesh_bed_leveling.h"
|
||||||
#include "stepper.h"
|
#include "stepper.h"
|
||||||
|
|
@ -499,19 +500,6 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
||||||
}
|
}
|
||||||
#endif // SUPPORT_VERBOSITY
|
#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) {
|
if (result == BED_SKEW_OFFSET_DETECTION_PERFECT) {
|
||||||
#ifdef SUPPORT_VERBOSITY
|
#ifdef SUPPORT_VERBOSITY
|
||||||
if (verbosity_level > 0)
|
if (verbosity_level > 0)
|
||||||
|
|
@ -583,7 +571,6 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
||||||
}
|
}
|
||||||
#endif // SUPPORT_VERBOSITY
|
#endif // SUPPORT_VERBOSITY
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Invert the transformation matrix made of vec_x, vec_y and cntr.
|
// Invert the transformation matrix made of vec_x, vec_y and cntr.
|
||||||
{
|
{
|
||||||
|
|
@ -1199,8 +1186,6 @@ BedSkewOffsetDetectionResultType find_bed_induction_sensor_point_xy(int
|
||||||
MYSERIAL.println(current_position[Z_AXIS]);
|
MYSERIAL.println(current_position[Z_AXIS]);
|
||||||
}
|
}
|
||||||
#endif //SUPPORT_VERBOSITY
|
#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_x_position = current_position[X_AXIS];
|
||||||
float init_y_position = current_position[Y_AXIS];
|
float init_y_position = current_position[Y_AXIS];
|
||||||
|
|
@ -3101,11 +3086,7 @@ void count_xyz_details(float (&distanceMin)[2]) {
|
||||||
eeprom_read_block(&cntr[0], (float*)(EEPROM_BED_CALIBRATION_CENTER), 8);
|
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_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(&vec_y[0], (float*)(EEPROM_BED_CALIBRATION_VEC_Y), 8);
|
||||||
#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
|
|
||||||
for (uint8_t mesh_point = 0; mesh_point < 2; ++mesh_point) {
|
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];
|
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);
|
distanceMin[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#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_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
|
#define BED_ZERO_REF_Y (- 0.6f + Y_PROBE_OFFSET_FROM_EXTRUDER + 4.f) // -0.6 + 5 + 4 = 8.4
|
||||||
|
|
@ -163,7 +163,7 @@ float BED_Y(const uint8_t row);
|
||||||
* Negative: failed
|
* Negative: failed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum BedSkewOffsetDetectionResultType {
|
enum BedSkewOffsetDetectionResultType : int8_t {
|
||||||
// Detection failed, some point was not found.
|
// Detection failed, some point was not found.
|
||||||
BED_SKEW_OFFSET_DETECTION_POINT_FOUND = 0, //!< Point 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_POINT_NOT_FOUND = -1, //!< Point not found.
|
||||||
|
|
|
||||||
|
|
@ -18,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_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_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_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_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_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
|
const char MSG_CHECKING_X[] PROGMEM_I1 = ISTR("Checking X axis"); ////MSG_CHECKING_X c=20
|
||||||
|
|
@ -34,7 +35,6 @@ 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_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_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_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_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_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
|
const char MSG_PRINT_FAN_SPEED[] PROGMEM_I1 = ISTR("Print fan:"); ////MSG_PRINT_FAN_SPEED c=15
|
||||||
|
|
@ -102,8 +102,12 @@ 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_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_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////MSG_SELFTEST_WIRINGERROR c=18
|
||||||
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////MSG_SETTINGS 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_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
|
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
|
#ifdef HOST_SHUTDOWN
|
||||||
const char MSG_SHUTDOWN_HOST[] PROGMEM_I1 = ISTR("Shutdown host"); ////MSG_SHUTDOWN_HOST c=18
|
const char MSG_SHUTDOWN_HOST[] PROGMEM_I1 = ISTR("Shutdown host"); ////MSG_SHUTDOWN_HOST c=18
|
||||||
#endif //HOST_SHUTOWN
|
#endif //HOST_SHUTOWN
|
||||||
|
|
@ -121,6 +125,7 @@ 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_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////MSG_NORMAL c=7
|
||||||
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////MSG_STEALTH 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_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_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_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[] PROGMEM_I1 = ISTR("PINDA cal."); ////MSG_PINDA_CALIBRATION c=13
|
||||||
|
|
@ -144,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_WARN[] PROGMEM_I1 = ISTR("Warn"); ////MSG_WARN c=8
|
||||||
const char MSG_STRICT[] PROGMEM_I1 = ISTR("Strict"); ////MSG_STRICT 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_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_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. Print cancelled."); ////MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
|
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. Continue?"); ////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
|
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. Print cancelled."); ////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
|
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. Continue?"); ////MSG_GCODE_DIFF_CONTINUE c=20 r=3
|
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. Print cancelled."); ////MSG_GCODE_DIFF_CANCELLED c=20 r=8
|
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_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_MISSING_FILAMENT[] PROGMEM_I1 = ISTR("There is no filament loaded."); ////MSG_MISSING_FILAMENT 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_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_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_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
|
const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////MSG_SD_CARD c=8
|
||||||
|
|
@ -192,7 +198,12 @@ 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_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_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
|
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
|
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_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_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_MOTHERBOARD [] PROGMEM_I1 = ISTR("Warning: motherboard type changed."); ////MSG_CHANGED_MOTHERBOARD c=20 r=4
|
||||||
|
|
@ -200,7 +211,7 @@ extern const char MSG_CHANGED_PRINTER [] PROGMEM_I1 = ISTR("Warning: printer typ
|
||||||
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_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_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_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_Z_CAL [] PROGMEM_I1 = ISTR("Mesh bed leveling failed. Please run Z calibration."); ////MSG_MBL_FAILED_Z_CAL c=20 r=4
|
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_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_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_CHECK_IDLER [] PROGMEM_I1 = ISTR("Please open idler and remove filament manually."); ////MSG_CHECK_IDLER c=20 r=4
|
||||||
|
|
@ -242,7 +253,9 @@ extern const char MSG_LOADING_COLOR [] PROGMEM_I1 = ISTR("Loading color"); ////M
|
||||||
extern const char MSG_CORRECTLY [] PROGMEM_I1 = ISTR("Changed correctly"); ////MSG_CORRECTLY c=19
|
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_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
|
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
|
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_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_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_FILAMENT [] PROGMEM_I1 = ISTR("Total filament"); ////MSG_TOTAL_FILAMENT c=19
|
||||||
|
|
@ -283,7 +296,7 @@ extern const char MSG_MODE_CHANGE_IN_PROGRESS [] PROGMEM_I1 = ISTR("Mode change
|
||||||
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_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_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_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. Continue?"); ////MSG_WIZARD_RERUN c=20 r=7
|
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_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_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_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
|
||||||
|
|
@ -360,37 +373,28 @@ extern const char MSG_SELFTEST_CHECK_HOTEND [] PROGMEM_I1 = ISTR("Checking hoten
|
||||||
extern const char MSG_SELFTEST_CHECK_ALLCORRECT [] PROGMEM_I1 = ISTR("All correct"); ////MSG_SELFTEST_CHECK_ALLCORRECT 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_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_CHECKING_FILE [] PROGMEM_I1 = ISTR("Checking file"); ////MSG_CHECKING_FILE c=17
|
||||||
extern const char MSG_FILE_INCOMPLETE [] PROGMEM_I1 = ISTR("File incomplete. Continue anyway?"); ////MSG_FILE_INCOMPLETE c=20 r=3
|
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_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_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_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
|
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
|
//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_SPOOL_JOIN[] PROGMEM_N1 = "SpoolJoin"; ////MSG_SPOOL_JOIN c=13
|
||||||
const char MSG_FIRMWARE[] PROGMEM_N1 = "Firmware"; ////MSG_FIRMWARE c=8
|
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_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_PINDA[] PROGMEM_N1 = "PINDA"; ////MSG_PINDA c=5
|
||||||
const char MSG_WELCOME[] PROGMEM_N1 = WELCOME_MSG;
|
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_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////
|
||||||
const char MSG_EXTERNAL_RESET[] PROGMEM_N1 = " External Reset"; ////
|
const char MSG_EXTERNAL_RESET[] PROGMEM_N1 = " External Reset"; ////
|
||||||
const char MSG_FILE_SAVED[] PROGMEM_N1 = "Done saving file."; ////
|
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_SOFTWARE_RESET[] PROGMEM_N1 = " Software Reset"; ////
|
||||||
const char MSG_UNKNOWN_COMMAND[] PROGMEM_N1 = "Unknown command: \""; ////
|
const char MSG_UNKNOWN_COMMAND[] PROGMEM_N1 = "Unknown command: \""; ////
|
||||||
const char MSG_WATCHDOG_RESET[] PROGMEM_N1 = " Watchdog Reset"; ////
|
const char MSG_WATCHDOG_RESET[] PROGMEM_N1 = " Watchdog Reset"; ////
|
||||||
const char MSG_Z_MAX[] PROGMEM_N1 = "z_max: "; ////
|
const char MSG_Z_MAX[] PROGMEM_N1 = "z_max: "; ////
|
||||||
const char MSG_Z_MIN[] PROGMEM_N1 = "z_min: "; ////
|
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_TMC_OVERTEMP[] PROGMEM_N1 = "TMC DRIVER OVERTEMP"; ////
|
||||||
const char MSG_Enqueing[] PROGMEM_N1 = "enqueing \""; ////
|
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_SD_ERR_WRITE_TO_FILE[] PROGMEM_N1 = "error writing to file"; ////
|
||||||
const char MSG_OK[] PROGMEM_N1 = "ok"; ////
|
const char MSG_OK[] PROGMEM_N1 = "ok"; ////
|
||||||
const char MSG_OK_CAPS[] PROGMEM_N1 = "OK"; ////
|
const char MSG_OK_CAPS[] PROGMEM_N1 = "OK"; ////
|
||||||
|
|
@ -409,6 +413,7 @@ 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_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_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_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
|
#ifdef HOST_SHUTDOWN
|
||||||
const char MSG_HOST_ACTION_SHUTDOWN[] PROGMEM_N1 = "//action:shutdown"; ////
|
const char MSG_HOST_ACTION_SHUTDOWN[] PROGMEM_N1 = "//action:shutdown"; ////
|
||||||
#endif //HOST_SHUTOWN
|
#endif //HOST_SHUTOWN
|
||||||
|
|
@ -419,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_POWERPANIC_DETECTED[] PROGMEM_N1 = "POWER PANIC DETECTED"; ////c=20
|
||||||
const char MSG_LCD_STATUS_CHANGED[] PROGMEM_N1 = "LCD status changed";
|
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_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
|
// Common G-gcodes
|
||||||
const char G1_E_F2700[] PROGMEM_N1 = "G1 E%-.3f F2700";
|
const char G1_E_F2700[] PROGMEM_N1 = "G1 E%-.3f F2700";
|
||||||
const char G28W[] PROGMEM_N1 = "G28 W";
|
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_M23[] PROGMEM_N1 = "M23 %s";
|
||||||
const char MSG_M24[] PROGMEM_N1 = "M24";
|
const char MSG_M24[] PROGMEM_N1 = "M24";
|
||||||
const char MSG_M83[] PROGMEM_N1 = "M83";
|
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_LEVELING_FAILED_POINT_LOW[];
|
||||||
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[];
|
extern const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[];
|
||||||
extern const char MSG_BELT_STATUS[];
|
extern const char MSG_BELT_STATUS[];
|
||||||
|
extern const char MSG_EJECT[];
|
||||||
extern const char MSG_CANCEL[];
|
extern const char MSG_CANCEL[];
|
||||||
extern const char MSG_CALIBRATE_Z_AUTO[];
|
extern const char MSG_CALIBRATE_Z_AUTO[];
|
||||||
extern const char MSG_CARD_MENU[];
|
extern const char MSG_CARD_MENU[];
|
||||||
|
|
@ -37,7 +38,6 @@ extern const char MSG_ERROR[];
|
||||||
extern const char MSG_EXTRUDER[];
|
extern const char MSG_EXTRUDER[];
|
||||||
extern const char MSG_FANS_CHECK[];
|
extern const char MSG_FANS_CHECK[];
|
||||||
extern const char MSG_FIL_RUNOUTS[];
|
extern const char MSG_FIL_RUNOUTS[];
|
||||||
extern const char MSG_FILAMENT[];
|
|
||||||
extern const char MSG_FAN_SPEED[];
|
extern const char MSG_FAN_SPEED[];
|
||||||
extern const char MSG_HOTEND_FAN_SPEED[];
|
extern const char MSG_HOTEND_FAN_SPEED[];
|
||||||
extern const char MSG_PRINT_FAN_SPEED[];
|
extern const char MSG_PRINT_FAN_SPEED[];
|
||||||
|
|
@ -104,8 +104,12 @@ extern const char MSG_SELFTEST_MOTOR[];
|
||||||
extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
|
extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
|
||||||
extern const char MSG_SELFTEST_WIRINGERROR[];
|
extern const char MSG_SELFTEST_WIRINGERROR[];
|
||||||
extern const char MSG_SETTINGS[];
|
extern const char MSG_SETTINGS[];
|
||||||
|
#ifndef REPLACE_SETREADY
|
||||||
extern const char MSG_SET_READY[];
|
extern const char MSG_SET_READY[];
|
||||||
extern const char MSG_SET_NOT_READY[];
|
extern const char MSG_SET_NOT_READY[];
|
||||||
|
#else
|
||||||
|
extern const char MSG_HOSTPRINT[];
|
||||||
|
#endif
|
||||||
#ifdef HOST_SHUTDOWN
|
#ifdef HOST_SHUTDOWN
|
||||||
extern const char MSG_SHUTDOWN_HOST[];
|
extern const char MSG_SHUTDOWN_HOST[];
|
||||||
#endif //HOST_SHUTOWN
|
#endif //HOST_SHUTOWN
|
||||||
|
|
@ -123,6 +127,7 @@ extern const char MSG_SILENT[];
|
||||||
extern const char MSG_NORMAL[];
|
extern const char MSG_NORMAL[];
|
||||||
extern const char MSG_STEALTH[];
|
extern const char MSG_STEALTH[];
|
||||||
extern const char MSG_STEEL_SHEET_CHECK[];
|
extern const char MSG_STEEL_SHEET_CHECK[];
|
||||||
|
extern const char MSG_Z_CALIBRATION_PROMPT[];
|
||||||
extern const char MSG_STOP_PRINT[];
|
extern const char MSG_STOP_PRINT[];
|
||||||
extern const char MSG_STOPPED[];
|
extern const char MSG_STOPPED[];
|
||||||
extern const char MSG_PINDA_CALIBRATION[];
|
extern const char MSG_PINDA_CALIBRATION[];
|
||||||
|
|
@ -152,6 +157,7 @@ extern const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[];
|
||||||
extern const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[];
|
extern const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[];
|
||||||
extern const char MSG_GCODE_DIFF_CONTINUE[];
|
extern const char MSG_GCODE_DIFF_CONTINUE[];
|
||||||
extern const char MSG_GCODE_DIFF_CANCELLED[];
|
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_CONTINUE[];
|
||||||
extern const char MSG_NOZZLE_DIFFERS_CANCELLED[];
|
extern const char MSG_NOZZLE_DIFFERS_CANCELLED[];
|
||||||
extern const char MSG_NOZZLE_DIAMETER[];
|
extern const char MSG_NOZZLE_DIAMETER[];
|
||||||
|
|
@ -194,6 +200,9 @@ extern const char MSG_LOAD_ALL[];
|
||||||
extern const char MSG_NOZZLE_CNG_MENU [];
|
extern const char MSG_NOZZLE_CNG_MENU [];
|
||||||
extern const char MSG_NOZZLE_CNG_READ_HELP [];
|
extern const char MSG_NOZZLE_CNG_READ_HELP [];
|
||||||
extern const char MSG_NOZZLE_CNG_CHANGED [];
|
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_REPRINT [];
|
||||||
extern const char MSG_FILE_CNT [];
|
extern const char MSG_FILE_CNT [];
|
||||||
extern const char MSG_CHANGED_MOTHERBOARD [];
|
extern const char MSG_CHANGED_MOTHERBOARD [];
|
||||||
|
|
@ -201,7 +210,7 @@ extern const char MSG_CHANGED_PRINTER [];
|
||||||
extern const char MSG_CHANGED_BOTH [];
|
extern const char MSG_CHANGED_BOTH [];
|
||||||
extern const char MSG_DEFAULT_SETTINGS_LOADED [];
|
extern const char MSG_DEFAULT_SETTINGS_LOADED [];
|
||||||
extern const char MSG_FORCE_SELFTEST [];
|
extern const char MSG_FORCE_SELFTEST [];
|
||||||
extern const char MSG_MBL_FAILED_Z_CAL [];
|
extern const char MSG_MBL_FAILED [];
|
||||||
extern const char MSG_ZLEVELING_ENFORCED [];
|
extern const char MSG_ZLEVELING_ENFORCED [];
|
||||||
extern const char MSG_UNLOAD_SUCCESSFUL [];
|
extern const char MSG_UNLOAD_SUCCESSFUL [];
|
||||||
extern const char MSG_CHECK_IDLER [];
|
extern const char MSG_CHECK_IDLER [];
|
||||||
|
|
@ -243,7 +252,9 @@ extern const char MSG_LOADING_COLOR [];
|
||||||
extern const char MSG_CORRECTLY [];
|
extern const char MSG_CORRECTLY [];
|
||||||
extern const char MSG_NOT_LOADED [];
|
extern const char MSG_NOT_LOADED [];
|
||||||
extern const char MSG_NOT_COLOR [];
|
extern const char MSG_NOT_COLOR [];
|
||||||
|
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
extern const char MSG_AUTOLOADING_ENABLED [];
|
extern const char MSG_AUTOLOADING_ENABLED [];
|
||||||
|
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
extern const char MSG_FILAMENT_USED [];
|
extern const char MSG_FILAMENT_USED [];
|
||||||
extern const char MSG_PRINT_TIME [];
|
extern const char MSG_PRINT_TIME [];
|
||||||
extern const char MSG_TOTAL_FILAMENT [];
|
extern const char MSG_TOTAL_FILAMENT [];
|
||||||
|
|
@ -368,31 +379,22 @@ extern const char MSG_NEW_FIRMWARE_PLEASE_UPGRADE [];
|
||||||
extern const char MSG_FW_MK3_DETECTED [];
|
extern const char MSG_FW_MK3_DETECTED [];
|
||||||
|
|
||||||
//not internationalized messages
|
//not internationalized messages
|
||||||
#if 0
|
|
||||||
extern const char MSG_FW_VERSION_BETA[];
|
|
||||||
#endif
|
|
||||||
extern const char MSG_SPOOL_JOIN[];
|
extern const char MSG_SPOOL_JOIN[];
|
||||||
extern const char MSG_FIRMWARE[];
|
extern const char MSG_FIRMWARE[];
|
||||||
|
extern const char MSG_FILAMENT[];
|
||||||
extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
|
extern const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[];
|
||||||
extern const char MSG_PINDA[];
|
extern const char MSG_PINDA[];
|
||||||
extern const char MSG_WELCOME[];
|
extern const char MSG_WELCOME[];
|
||||||
extern const char MSG_SD_WORKDIR_FAIL[];
|
|
||||||
extern const char MSG_BROWNOUT_RESET[];
|
extern const char MSG_BROWNOUT_RESET[];
|
||||||
extern const char MSG_EXTERNAL_RESET[];
|
extern const char MSG_EXTERNAL_RESET[];
|
||||||
extern const char MSG_FILE_SAVED[];
|
extern const char MSG_FILE_SAVED[];
|
||||||
extern const char MSG_POSITION_UNKNOWN[];
|
|
||||||
extern const char MSG_SOFTWARE_RESET[];
|
extern const char MSG_SOFTWARE_RESET[];
|
||||||
extern const char MSG_UNKNOWN_COMMAND[];
|
extern const char MSG_UNKNOWN_COMMAND[];
|
||||||
extern const char MSG_WATCHDOG_RESET[];
|
extern const char MSG_WATCHDOG_RESET[];
|
||||||
extern const char MSG_Z_MAX[];
|
extern const char MSG_Z_MAX[];
|
||||||
extern const char MSG_Z_MIN[];
|
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_TMC_OVERTEMP[];
|
||||||
extern const char MSG_Enqueing[];
|
extern const char MSG_Enqueing[];
|
||||||
extern const char MSG_ENDSTOPS_HIT[];
|
|
||||||
extern const char MSG_SD_ERR_WRITE_TO_FILE[];
|
extern const char MSG_SD_ERR_WRITE_TO_FILE[];
|
||||||
extern const char MSG_OK[];
|
extern const char MSG_OK[];
|
||||||
extern const char MSG_OK_CAPS[];
|
extern const char MSG_OK_CAPS[];
|
||||||
|
|
@ -413,6 +415,7 @@ extern const char MSG_HOST_ACTION_NOT_READY[];
|
||||||
extern const char MSG_HOST_ACTION_START[];
|
extern const char MSG_HOST_ACTION_START[];
|
||||||
extern const char MSG_HOST_ACTION_UVLO_RECOVERY_READY[];
|
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_UVLO_AUTO_RECOVERY_READY[];
|
||||||
|
extern const char MSG_HOST_ACTION_NOTIFICATION[];
|
||||||
#ifdef HOST_SHUTDOWN
|
#ifdef HOST_SHUTDOWN
|
||||||
extern const char MSG_HOST_ACTION_SHUTDOWN[];
|
extern const char MSG_HOST_ACTION_SHUTDOWN[];
|
||||||
#endif //HOST_SHUTOWN
|
#endif //HOST_SHUTOWN
|
||||||
|
|
@ -423,10 +426,13 @@ extern const char MSG_ADVANCE_K[];
|
||||||
extern const char MSG_POWERPANIC_DETECTED[];
|
extern const char MSG_POWERPANIC_DETECTED[];
|
||||||
extern const char MSG_LCD_STATUS_CHANGED[];
|
extern const char MSG_LCD_STATUS_CHANGED[];
|
||||||
extern const char MSG_UNKNOWN_CODE[];
|
extern const char MSG_UNKNOWN_CODE[];
|
||||||
|
extern const char MSG_FILAMENT_RUNOUT_DETECTED[];
|
||||||
|
|
||||||
// Common G-gcodes
|
// Common G-gcodes
|
||||||
extern const char G1_E_F2700[];
|
extern const char G1_E_F2700[];
|
||||||
extern const char G28W[];
|
extern const char G28W[];
|
||||||
|
extern const char MSG_G90[];
|
||||||
|
extern const char MSG_G91[];
|
||||||
extern const char MSG_M23[];
|
extern const char MSG_M23[];
|
||||||
extern const char MSG_M24[];
|
extern const char MSG_M24[];
|
||||||
extern const char MSG_M83[];
|
extern const char MSG_M83[];
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ void waitForHotendTargetTemp(uint16_t delay, F f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitForHotendTargetTempBeep() {
|
void WaitForHotendTargetTempBeep() {
|
||||||
waitForHotendTargetTemp(3000, []{ });
|
waitForHotendTargetTemp(200, [] {});
|
||||||
MakeSound(Prompt);
|
MakeSound(Prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,14 +73,17 @@ void MMU2::Start() {
|
||||||
mmu2Serial.flush(); // make sure the UART buffer is clear before starting communication
|
mmu2Serial.flush(); // make sure the UART buffer is clear before starting communication
|
||||||
|
|
||||||
SetCurrentTool(MMU2_NO_TOOL);
|
SetCurrentTool(MMU2_NO_TOOL);
|
||||||
state = xState::Connecting;
|
|
||||||
|
|
||||||
// start the communication
|
// start the communication
|
||||||
logic.Start();
|
|
||||||
logic.ResetRetryAttempts();
|
logic.ResetRetryAttempts();
|
||||||
logic.ResetCommunicationTimeoutAttempts();
|
logic.ResetCommunicationTimeoutAttempts();
|
||||||
|
|
||||||
|
state = xState::Connecting;
|
||||||
|
logic.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MMU2::~MMU2() {}
|
||||||
|
|
||||||
void MMU2::Stop() {
|
void MMU2::Stop() {
|
||||||
StopKeepPowered();
|
StopKeepPowered();
|
||||||
PowerOff();
|
PowerOff();
|
||||||
|
|
@ -153,8 +156,9 @@ void MMU2::PowerOn() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::ReadRegister(uint8_t address) {
|
bool MMU2::ReadRegister(uint8_t address) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
do {
|
do {
|
||||||
logic.ReadRegister(address); // we may signal the accepted/rejected status of the response as return value of this function
|
logic.ReadRegister(address); // we may signal the accepted/rejected status of the response as return value of this function
|
||||||
} while (!manage_response(false, false));
|
} while (!manage_response(false, false));
|
||||||
|
|
@ -165,8 +169,9 @@ bool MMU2::ReadRegister(uint8_t address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool __attribute__((noinline)) MMU2::WriteRegister(uint8_t address, uint16_t data) {
|
bool __attribute__((noinline)) MMU2::WriteRegister(uint8_t address, uint16_t data) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// special cases - intercept requests of registers which influence the printer's behaviour too + perform the change even on the printer's side
|
// special cases - intercept requests of registers which influence the printer's behaviour too + perform the change even on the printer's side
|
||||||
switch (address) {
|
switch (address) {
|
||||||
|
|
@ -192,12 +197,11 @@ void MMU2::mmu_loop() {
|
||||||
// Atomic compare_exchange would have been the most appropriate solution here, but this gets called only in Marlin's task,
|
// 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
|
// so thread safety should be kept
|
||||||
static bool avoidRecursion = false;
|
static bool avoidRecursion = false;
|
||||||
if (avoidRecursion)
|
if (avoidRecursion) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
avoidRecursion = true;
|
avoidRecursion = true;
|
||||||
|
|
||||||
mmu_loop_inner(true);
|
mmu_loop_inner(true);
|
||||||
|
|
||||||
avoidRecursion = false;
|
avoidRecursion = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,7 +212,7 @@ void __attribute__((noinline)) MMU2::mmu_loop_inner(bool reportErrors) {
|
||||||
|
|
||||||
void MMU2::CheckFINDARunout() {
|
void MMU2::CheckFINDARunout() {
|
||||||
// Check for FINDA filament runout
|
// 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!");
|
SERIAL_ECHOLNPGM("FINDA filament runout!");
|
||||||
marlin_stop_and_save_print_to_ram();
|
marlin_stop_and_save_print_to_ram();
|
||||||
restore_print_from_ram_and_continue(0);
|
restore_print_from_ram_and_continue(0);
|
||||||
|
|
@ -301,8 +305,12 @@ bool MMU2::VerifyFilamentEnteredPTFE() {
|
||||||
filament_inserted = filament_inserted && (WhereIsFilament() == FilamentState::AT_FSENSOR);
|
filament_inserted = filament_inserted && (WhereIsFilament() == FilamentState::AT_FSENSOR);
|
||||||
tlur.Progress(filament_inserted);
|
tlur.Progress(filament_inserted);
|
||||||
safe_delay_keep_alive(0);
|
safe_delay_keep_alive(0);
|
||||||
|
if (planner_draining()) {
|
||||||
|
return false; // power panic or a similar issue happened, bail out fast
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
if (!filament_inserted) {
|
if (!filament_inserted) {
|
||||||
IncrementLoadFails();
|
IncrementLoadFails();
|
||||||
|
|
@ -318,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
|
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;
|
tool_change_extruder = slot;
|
||||||
logic.ToolChange(slot); // let the MMU pull the filament out and push a new one in
|
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;
|
break;
|
||||||
|
}
|
||||||
// otherwise: failed to perform the command - unload first and then let it run again
|
// otherwise: failed to perform the command - unload first and then let it run again
|
||||||
IncrementMMUFails();
|
IncrementMMUFails();
|
||||||
|
|
||||||
|
|
@ -347,6 +356,9 @@ bool MMU2::ToolChangeCommonOnce(uint8_t slot) {
|
||||||
|
|
||||||
void MMU2::ToolChangeCommon(uint8_t slot) {
|
void MMU2::ToolChangeCommon(uint8_t slot) {
|
||||||
while (!ToolChangeCommonOnce(slot)) { // while not successfully fed into extruder's PTFE tube
|
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
|
// 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...
|
// @@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);
|
logic.SetPrinterError(ErrorCode::LOAD_TO_EXTRUDER_FAILED);
|
||||||
|
|
@ -357,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
|
static_cast<void>(manage_response(true, true)); // yes, I'd like to silence [[nodiscard]] warning at this spot by casting to void
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCurrentTool(slot); //filament change is finished
|
SetCurrentTool(slot); // filament change is finished
|
||||||
SpoolJoin::spooljoin.setSlot(slot);
|
SpoolJoin::spooljoin.setSlot(slot);
|
||||||
|
|
||||||
++toolchange_counter;
|
++toolchange_counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::tool_change(uint8_t slot) {
|
bool MMU2::tool_change(uint8_t slot) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (slot != extruder) {
|
if (slot != extruder) {
|
||||||
if (/*FindaDetectsFilament()*/
|
if (/*FindaDetectsFilament()*/
|
||||||
|
|
@ -390,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.
|
///- 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.
|
///- 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) {
|
bool MMU2::tool_change(char code, uint8_t slot) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
FSensorBlockRunout blockRunout;
|
FSensorBlockRunout blockRunout;
|
||||||
|
|
||||||
|
|
@ -435,8 +449,9 @@ void MMU2::SetCurrentTool(uint8_t ex){
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::set_filament_type(uint8_t /*slot*/, uint8_t /*type*/) {
|
bool MMU2::set_filament_type(uint8_t /*slot*/, uint8_t /*type*/) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// @@TODO - this is not supported in the new MMU yet
|
// @@TODO - this is not supported in the new MMU yet
|
||||||
// slot = slot; // @@TODO
|
// slot = slot; // @@TODO
|
||||||
|
|
@ -461,8 +476,9 @@ void MMU2::UnloadInner() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
logic.UnloadFilament();
|
logic.UnloadFilament();
|
||||||
if (manage_response(false, true))
|
if (manage_response(false, true)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
IncrementMMUFails();
|
IncrementMMUFails();
|
||||||
}
|
}
|
||||||
MakeSound(Confirm);
|
MakeSound(Confirm);
|
||||||
|
|
@ -473,8 +489,9 @@ void MMU2::UnloadInner() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::unload() {
|
bool MMU2::unload() {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
WaitForHotendTargetTempBeep();
|
WaitForHotendTargetTempBeep();
|
||||||
|
|
||||||
|
|
@ -482,6 +499,7 @@ bool MMU2::unload() {
|
||||||
ReportingRAII rep(CommandInProgress::UnloadFilament);
|
ReportingRAII rep(CommandInProgress::UnloadFilament);
|
||||||
UnloadInner();
|
UnloadInner();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenUpdateEnable();
|
ScreenUpdateEnable();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -490,15 +508,17 @@ void MMU2::CutFilamentInner(uint8_t slot) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
logic.CutFilament(slot);
|
logic.CutFilament(slot);
|
||||||
if (manage_response(false, true))
|
if (manage_response(false, true)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
IncrementMMUFails();
|
IncrementMMUFails();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::cut_filament(uint8_t slot, bool enableFullScreenMsg /*= true*/) {
|
bool MMU2::cut_filament(uint8_t slot, bool enableFullScreenMsg /*= true*/) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (enableFullScreenMsg) {
|
if (enableFullScreenMsg) {
|
||||||
FullScreenMsgCut(slot);
|
FullScreenMsgCut(slot);
|
||||||
|
|
@ -528,8 +548,9 @@ bool MMU2::loading_test(uint8_t slot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::load_filament(uint8_t slot) {
|
bool MMU2::load_filament(uint8_t slot) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
FullScreenMsgLoad(slot);
|
FullScreenMsgLoad(slot);
|
||||||
{
|
{
|
||||||
|
|
@ -537,8 +558,9 @@ bool MMU2::load_filament(uint8_t slot) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
logic.LoadFilament(slot);
|
logic.LoadFilament(slot);
|
||||||
if (manage_response(false, false))
|
if (manage_response(false, false)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
IncrementMMUFails();
|
IncrementMMUFails();
|
||||||
}
|
}
|
||||||
MakeSound(SoundType::Confirm);
|
MakeSound(SoundType::Confirm);
|
||||||
|
|
@ -548,8 +570,9 @@ bool MMU2::load_filament(uint8_t slot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
WaitForHotendTargetTempBeep();
|
WaitForHotendTargetTempBeep();
|
||||||
|
|
||||||
|
|
@ -574,8 +597,9 @@ bool MMU2::load_filament_to_nozzle(uint8_t slot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MMU2::eject_filament(uint8_t slot, bool enableFullScreenMsg /* = true */) {
|
bool MMU2::eject_filament(uint8_t slot, bool enableFullScreenMsg /* = true */) {
|
||||||
if (!WaitForMMUReady())
|
if (!WaitForMMUReady()) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (enableFullScreenMsg) {
|
if (enableFullScreenMsg) {
|
||||||
FullScreenMsgEject(slot);
|
FullScreenMsgEject(slot);
|
||||||
|
|
@ -589,8 +613,9 @@ bool MMU2::eject_filament(uint8_t slot, bool enableFullScreenMsg /* = true */) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
logic.EjectFilament(slot);
|
logic.EjectFilament(slot);
|
||||||
if (manage_response(false, true))
|
if (manage_response(false, true)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
IncrementMMUFails();
|
IncrementMMUFails();
|
||||||
}
|
}
|
||||||
SetCurrentTool(MMU2_NO_TOOL);
|
SetCurrentTool(MMU2_NO_TOOL);
|
||||||
|
|
@ -611,8 +636,9 @@ void MMU2::Home(uint8_t mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MMU2::SaveHotendTemp(bool turn_off_nozzle) {
|
void MMU2::SaveHotendTemp(bool turn_off_nozzle) {
|
||||||
if (mmu_print_saved & SavedState::Cooldown)
|
if (mmu_print_saved & SavedState::Cooldown) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (turn_off_nozzle && !(mmu_print_saved & SavedState::CooldownPending)) {
|
if (turn_off_nozzle && !(mmu_print_saved & SavedState::CooldownPending)) {
|
||||||
Disable_E0();
|
Disable_E0();
|
||||||
|
|
@ -701,8 +727,7 @@ void MMU2::CheckUserInput() {
|
||||||
lastButton = Buttons::NoButton; // Clear it.
|
lastButton = Buttons::NoButton; // Clear it.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mmu2.MMULastErrorSource() == MMU2::ErrorSourcePrinter && btn != Buttons::NoButton)
|
if (mmu2.MMULastErrorSource() == ErrorSourcePrinter && btn != Buttons::NoButton) {
|
||||||
{
|
|
||||||
// When the printer has raised an error screen, and a button was selected
|
// When the printer has raised an error screen, and a button was selected
|
||||||
// the error screen should always be dismissed.
|
// the error screen should always be dismissed.
|
||||||
ClearPrinterError();
|
ClearPrinterError();
|
||||||
|
|
@ -720,7 +745,7 @@ void MMU2::CheckUserInput() {
|
||||||
SERIAL_ECHOLN((int)buttons_to_uint8t(btn));
|
SERIAL_ECHOLN((int)buttons_to_uint8t(btn));
|
||||||
ResumeHotendTemp(); // Recover the hotend temp before we attempt to do anything else...
|
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
|
// Do not send a button to the MMU unless the MMU is in error state
|
||||||
Button(buttons_to_uint8t(btn));
|
Button(buttons_to_uint8t(btn));
|
||||||
}
|
}
|
||||||
|
|
@ -782,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
|
// - failed -> then do the safety moves on the printer like before
|
||||||
// - finished ok -> proceed with reading other commands
|
// - finished ok -> proceed with reading other commands
|
||||||
safe_delay_keep_alive(0); // calls LogicStep() and remembers its return status
|
safe_delay_keep_alive(0); // calls LogicStep() and remembers its return status
|
||||||
|
// also disables stepper motor unlocking
|
||||||
|
|
||||||
if (mmu_print_saved & SavedState::CooldownPending) {
|
if (mmu_print_saved & SavedState::CooldownPending) {
|
||||||
if (!nozzleTimeout.running()) {
|
if (!nozzleTimeout.running()) {
|
||||||
|
|
@ -804,8 +830,7 @@ bool MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||||
// the E may have some more moves to finish - wait for them
|
// the E may have some more moves to finish - wait for them
|
||||||
ResumeHotendTemp();
|
ResumeHotendTemp();
|
||||||
ResumeUnpark(); // We can now travel back to the tower or wherever we were when we saved.
|
ResumeUnpark(); // We can now travel back to the tower or wherever we were when we saved.
|
||||||
if (!TuneMenuEntered())
|
if (!TuneMenuEntered()) {
|
||||||
{
|
|
||||||
// If the error screen is sleeping (running 'Tune' menu)
|
// If the error screen is sleeping (running 'Tune' menu)
|
||||||
// then don't reset retry attempts because we this will trigger
|
// then don't reset retry attempts because we this will trigger
|
||||||
// an automatic retry attempt when 'Tune' button is selected. We want the
|
// an automatic retry attempt when 'Tune' button is selected. We want the
|
||||||
|
|
@ -920,15 +945,19 @@ void MMU2::filament_ramming() {
|
||||||
execute_extruder_sequence(ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
|
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();
|
planner_synchronize();
|
||||||
|
|
||||||
|
// Plan the moves
|
||||||
const E_Step *step = sequence;
|
const E_Step *step = sequence;
|
||||||
for (uint8_t i = steps; i > 0; --i) {
|
for (uint8_t i = stepCount; i > 0; --i) {
|
||||||
extruder_move(pgm_read_float(&(step->extrude)), pgm_read_float(&(step->feedRate)));
|
extruder_move(pgm_read_float(&(step->extrude)), pgm_read_float(&(step->feedRate)));
|
||||||
step++;
|
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();
|
Disable_E0();
|
||||||
}
|
}
|
||||||
|
|
@ -1079,14 +1108,10 @@ void MMU2::OnMMUProgressMsgSame(ProgressCode pc) {
|
||||||
case FilamentState::AT_FSENSOR:
|
case FilamentState::AT_FSENSOR:
|
||||||
// fsensor triggered, finish FeedingToExtruder state
|
// fsensor triggered, finish FeedingToExtruder state
|
||||||
loadFilamentStarted = false;
|
loadFilamentStarted = false;
|
||||||
|
|
||||||
// Abort any excess E-move from the planner queue
|
|
||||||
planner_abort_queued_moves();
|
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.
|
|
||||||
extruder_move(logic.ExtraLoadDistance() + 2, logic.PulleySlowFeedRate());
|
extruder_move(logic.ExtraLoadDistance() + 2, logic.PulleySlowFeedRate());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FilamentState::NOT_PRESENT:
|
case FilamentState::NOT_PRESENT:
|
||||||
// fsensor not triggered, continue moving extruder
|
// fsensor not triggered, continue moving extruder
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ typedef float feedRate_t;
|
||||||
#else
|
#else
|
||||||
#include "protocol_logic.h"
|
#include "protocol_logic.h"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <memory>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct E_Step;
|
struct E_Step;
|
||||||
|
|
@ -32,6 +33,7 @@ struct Version {
|
||||||
class MMU2 {
|
class MMU2 {
|
||||||
public:
|
public:
|
||||||
MMU2();
|
MMU2();
|
||||||
|
~MMU2();
|
||||||
|
|
||||||
/// Powers ON the MMU, then initializes the UART and protocol logic
|
/// Powers ON the MMU, then initializes the UART and protocol logic
|
||||||
void Start();
|
void Start();
|
||||||
|
|
@ -273,7 +275,9 @@ private:
|
||||||
StepStatus LogicStep(bool reportErrors);
|
StepStatus LogicStep(bool reportErrors);
|
||||||
|
|
||||||
void filament_ramming();
|
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();
|
void execute_load_to_nozzle_sequence();
|
||||||
|
|
||||||
/// Reports an error into attached ExtUIs
|
/// Reports an error into attached ExtUIs
|
||||||
|
|
@ -343,6 +347,7 @@ private:
|
||||||
void SetCurrentTool(uint8_t ex);
|
void SetCurrentTool(uint8_t ex);
|
||||||
|
|
||||||
ProtocolLogic logic; ///< implementation of the protocol logic layer
|
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 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
|
uint8_t tool_change_extruder; ///< only used for UI purposes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ static const char MSG_DESC_FILAMENT_CHANGE[] PROGMEM_I1 = ISTR("M600 Filament Ch
|
||||||
static const char MSG_DESC_UNKNOWN_ERROR[] PROGMEM_I1 = ISTR("Unexpected error occurred."); ////MSG_DESC_UNKNOWN_ERROR 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
|
// Read explanation in mmu2_protocol_logic.cpp -> supportedMmuFWVersion
|
||||||
static constexpr char MSG_DESC_FW_UPDATE_NEEDED[] PROGMEM_I1 = ISTR("MMU FW version is incompatible with printer FW.Update to version 3.0.2."); ////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);
|
static constexpr uint8_t szFWUN = sizeof(MSG_DESC_FW_UPDATE_NEEDED);
|
||||||
// at least check the individual version characters in 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));
|
static_assert(MSG_DESC_FW_UPDATE_NEEDED[szFWUN - 7] == ('0' + mmuVersionMajor));
|
||||||
|
|
@ -355,7 +355,7 @@ static const char MSG_BTN_RETRY[] PROGMEM_I1 = ISTR("Retry"); ////MSG_BTN_RETRY
|
||||||
static const char MSG_BTN_RESET_MMU[] PROGMEM_I1 = ISTR("ResetMMU"); ////MSG_BTN_RESET_MMU 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_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_LOAD[] PROGMEM_I1 = ISTR("Load"); ////MSG_BTN_LOAD c=8
|
||||||
static const char MSG_BTN_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_BTN_EJECT 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_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_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_DISABLE_MMU[] PROGMEM_I1 = ISTR("Disable"); ////MSG_BTN_DISABLE_MMU c=8
|
||||||
|
|
@ -368,7 +368,7 @@ static const char * const btnOperation[] PROGMEM = {
|
||||||
_R(MSG_BTN_RESET_MMU),
|
_R(MSG_BTN_RESET_MMU),
|
||||||
_R(MSG_BTN_UNLOAD),
|
_R(MSG_BTN_UNLOAD),
|
||||||
_R(MSG_BTN_LOAD),
|
_R(MSG_BTN_LOAD),
|
||||||
_R(MSG_BTN_EJECT),
|
_R(MSG_EJECT),
|
||||||
_R(MSG_TUNE),
|
_R(MSG_TUNE),
|
||||||
_R(MSG_BTN_STOP),
|
_R(MSG_BTN_STOP),
|
||||||
_R(MSG_BTN_DISABLE_MMU),
|
_R(MSG_BTN_DISABLE_MMU),
|
||||||
|
|
|
||||||
|
|
@ -29,17 +29,17 @@ static constexpr uint8_t FindErrorIndex(uint16_t pec) {
|
||||||
return (i != errorCodesEnd) ? (i-errorCodes) : (errorCodesSize - 1);
|
return (i != errorCodesEnd) ? (i-errorCodes) : (errorCodesSize - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check that the searching algoritm works
|
// check that the searching algorithm works
|
||||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER) == 0);
|
static_assert(FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER) == 0);
|
||||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK) == 1);
|
static_assert(FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK) == 1);
|
||||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER) == 2);
|
static_assert(FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER) == 2);
|
||||||
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK) == 3);
|
static_assert(FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK) == 3);
|
||||||
|
|
||||||
constexpr ErrorCode operator&(ErrorCode a, ErrorCode b){
|
constexpr ErrorCode operator&(ErrorCode a, ErrorCode b) {
|
||||||
return (ErrorCode)((uint16_t)a & (uint16_t)b);
|
return (ErrorCode)((uint16_t)a & (uint16_t)b);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool ContainsBit(ErrorCode ec, ErrorCode mask){
|
constexpr bool ContainsBit(ErrorCode ec, ErrorCode mask) {
|
||||||
return (uint16_t)ec & (uint16_t)mask;
|
return (uint16_t)ec & (uint16_t)mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,93 +96,115 @@ uint8_t PrusaErrorCodeIndex(ErrorCode ec) {
|
||||||
return FindErrorIndex(ERR_SYSTEM_UNLOAD_MANUALLY);
|
return FindErrorIndex(ERR_SYSTEM_UNLOAD_MANUALLY);
|
||||||
case ErrorCode::MCU_UNDERVOLTAGE_VCC:
|
case ErrorCode::MCU_UNDERVOLTAGE_VCC:
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_MCU_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_MMU_MCU_ERROR);
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Electrical issues which can be detected somehow.
|
// 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
|
// 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.
|
// and to keep the code size down.
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
||||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED);
|
return FindErrorIndex(ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED);
|
||||||
|
}
|
||||||
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
||||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED);
|
return FindErrorIndex(ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED);
|
||||||
|
}
|
||||||
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
||||||
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
|
if ((ec & ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED);
|
return FindErrorIndex(ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TMC-related errors - multiple of these can occur at once
|
// 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)
|
// - 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.
|
// By carefully ordering the checks here we can prioritize the errors being reported to the user.
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
if (ContainsBit(ec, ErrorCode::TMC_PULLEY_BIT)) {
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH))
|
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_RESET))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT);
|
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR);
|
return FindErrorIndex(ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR);
|
||||||
|
}
|
||||||
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
} else if (ContainsBit(ec, ErrorCode::TMC_SELECTOR_BIT)) {
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH))
|
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_RESET))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT);
|
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR);
|
return FindErrorIndex(ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR);
|
||||||
|
}
|
||||||
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
} else if (ContainsBit(ec, ErrorCode::TMC_IDLER_BIT)) {
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH))
|
if (ContainsBit(ec, ErrorCode::TMC_IOIN_MISMATCH)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_RESET))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_RESET)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_SHORT_TO_GROUND)) {
|
||||||
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED);
|
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_WARN)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT);
|
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT);
|
||||||
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR))
|
}
|
||||||
|
if (ContainsBit(ec, ErrorCode::TMC_OVER_TEMPERATURE_ERROR)) {
|
||||||
return FindErrorIndex(ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR);
|
return FindErrorIndex(ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if nothing got caught, return a generic runtime error
|
// if nothing got caught, return a generic error
|
||||||
return FindErrorIndex(ERR_OTHER_UNKNOWN_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);
|
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);
|
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);
|
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);
|
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
|
// -1 represents the hidden NoOperation button which is not drawn in any way
|
||||||
return (const char *)pgm_read_ptr(btnOperation + bi - 1);
|
return (const char *)pgm_read_ptr(btnOperation + bi - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * PrusaErrorButtonMore(){
|
const char *PrusaErrorButtonMore() {
|
||||||
return MSG_BTN_MORE;
|
return MSG_BTN_MORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -193,7 +215,6 @@ Buttons ButtonPressed(ErrorCode ec) {
|
||||||
|
|
||||||
const auto result = ButtonAvailable(ec);
|
const auto result = ButtonAvailable(ec);
|
||||||
buttonSelectedOperation = ButtonOperations::NoOperation; // Reset operation
|
buttonSelectedOperation = ButtonOperations::NoOperation; // Reset operation
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -342,7 +363,7 @@ Buttons ButtonAvailable(ErrorCode ec) {
|
||||||
return Buttons::NoButton;
|
return Buttons::NoButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetButtonResponse(ButtonOperations rsp){
|
void SetButtonResponse(ButtonOperations rsp) {
|
||||||
buttonSelectedOperation = rsp;
|
buttonSelectedOperation = rsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include "mmu2/error_codes.h"
|
#include "mmu2/error_codes.h"
|
||||||
#else
|
#else
|
||||||
#include "buttons.h"
|
#include "buttons.h"
|
||||||
#include "../../../../../../Prusa-Error-Codes/04_MMU/button_operations.h"
|
#include "../../../../../../Prusa-Error-Codes/include/button_operations.h"
|
||||||
#include "../../../../../../Prusa-Firmware-MMU/src/logic/error_codes.h"
|
#include "../../../../../../Prusa-Firmware-MMU/src/logic/error_codes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ void extruder_schedule_turning(float feed_rate);
|
||||||
float move_raise_z(float delta);
|
float move_raise_z(float delta);
|
||||||
|
|
||||||
void planner_abort_queued_moves();
|
void planner_abort_queued_moves();
|
||||||
|
bool planner_draining();
|
||||||
void planner_synchronize();
|
void planner_synchronize();
|
||||||
bool planner_any_moves();
|
bool planner_any_moves();
|
||||||
float stepper_get_machine_position_E_mm();
|
float stepper_get_machine_position_E_mm();
|
||||||
|
|
@ -42,8 +43,8 @@ void nozzle_park();
|
||||||
|
|
||||||
bool marlin_printingIsActive();
|
bool marlin_printingIsActive();
|
||||||
void marlin_manage_heater();
|
void marlin_manage_heater();
|
||||||
void marlin_manage_inactivity(bool b);
|
void marlin_manage_inactivity(bool ignore_stepper_queue);
|
||||||
void marlin_idle(bool b);
|
void marlin_idle(bool ignore_stepper_queue);
|
||||||
void marlin_refresh_print_state_in_ram();
|
void marlin_refresh_print_state_in_ram();
|
||||||
void marlin_clear_print_state_in_ram();
|
void marlin_clear_print_state_in_ram();
|
||||||
void marlin_stop_and_save_print_to_ram();
|
void marlin_stop_and_save_print_to_ram();
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ void planner_abort_queued_moves() {
|
||||||
planner_aborted = false;
|
planner_aborted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool planner_draining() {
|
||||||
|
return planner_aborted;
|
||||||
|
}
|
||||||
|
|
||||||
void planner_synchronize() {
|
void planner_synchronize() {
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
}
|
}
|
||||||
|
|
@ -46,33 +50,33 @@ bool planner_any_moves() {
|
||||||
return blocks_queued();
|
return blocks_queued();
|
||||||
}
|
}
|
||||||
|
|
||||||
float planner_get_machine_position_E_mm(){
|
float planner_get_machine_position_E_mm() {
|
||||||
return current_position[E_AXIS];
|
return current_position[E_AXIS];
|
||||||
}
|
}
|
||||||
|
|
||||||
float stepper_get_machine_position_E_mm(){
|
float stepper_get_machine_position_E_mm() {
|
||||||
return st_get_position_mm(E_AXIS);
|
return st_get_position_mm(E_AXIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
float planner_get_current_position_E(){
|
float planner_get_current_position_E() {
|
||||||
return current_position[E_AXIS];
|
return current_position[E_AXIS];
|
||||||
}
|
}
|
||||||
|
|
||||||
void planner_set_current_position_E(float e){
|
void planner_set_current_position_E(float e) {
|
||||||
current_position[E_AXIS] = e;
|
current_position[E_AXIS] = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos3d planner_current_position(){
|
pos3d planner_current_position() {
|
||||||
return pos3d(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]);
|
return pos3d(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s){
|
void motion_do_blocking_move_to_xy(float rx, float ry, float feedRate_mm_s) {
|
||||||
current_position[X_AXIS] = rx;
|
current_position[X_AXIS] = rx;
|
||||||
current_position[Y_AXIS] = ry;
|
current_position[Y_AXIS] = ry;
|
||||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void motion_do_blocking_move_to_z(float z, float feedRate_mm_s){
|
void motion_do_blocking_move_to_z(float z, float feedRate_mm_s) {
|
||||||
current_position[Z_AXIS] = z;
|
current_position[Z_AXIS] = z;
|
||||||
planner_line_to_current_position_sync(feedRate_mm_s);
|
planner_line_to_current_position_sync(feedRate_mm_s);
|
||||||
}
|
}
|
||||||
|
|
@ -84,32 +88,31 @@ void nozzle_park() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool marlin_printingIsActive() {
|
bool marlin_printingIsActive() {
|
||||||
// return IS_SD_PRINTING || usb_timer_running();
|
|
||||||
return printer_active();
|
return printer_active();
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_manage_heater(){
|
void marlin_manage_heater() {
|
||||||
manage_heater();
|
manage_heater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_manage_inactivity(bool b){
|
void marlin_manage_inactivity(bool ignore_stepper_queue) {
|
||||||
manage_inactivity(b);
|
manage_inactivity(ignore_stepper_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_idle(bool b){
|
void marlin_idle(bool ignore_stepper_queue) {
|
||||||
manage_heater();
|
manage_heater();
|
||||||
manage_inactivity(b);
|
manage_inactivity(ignore_stepper_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_refresh_print_state_in_ram(){
|
void marlin_refresh_print_state_in_ram() {
|
||||||
refresh_print_state_in_ram();
|
refresh_print_state_in_ram();
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_clear_print_state_in_ram(){
|
void marlin_clear_print_state_in_ram() {
|
||||||
clear_print_state_in_ram();
|
clear_print_state_in_ram();
|
||||||
}
|
}
|
||||||
|
|
||||||
void marlin_stop_and_save_print_to_ram(){
|
void marlin_stop_and_save_print_to_ram() {
|
||||||
stop_and_save_print_to_ram(0,0);
|
stop_and_save_print_to_ram(0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,10 +136,15 @@ void safe_delay_keep_alive(uint16_t t) {
|
||||||
delay_keep_alive(t);
|
delay_keep_alive(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Enable_E0(){ enable_e0(); }
|
void Enable_E0() {
|
||||||
void Disable_E0(){ disable_e0(); }
|
enable_e0();
|
||||||
|
}
|
||||||
|
|
||||||
bool all_axes_homed(){
|
void Disable_E0() {
|
||||||
|
disable_e0();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool all_axes_homed() {
|
||||||
return axis_known_position[X_AXIS] && axis_known_position[Y_AXIS];
|
return axis_known_position[X_AXIS] && axis_known_position[Y_AXIS];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ static const char MSG_PROGRESS_HOMING[] PROGMEM_I1 = ISTR("Homing"); /
|
||||||
static const char MSG_PROGRESS_MOVING_SELECTOR[] PROGMEM_I1 = ISTR("Moving selector"); ////MSG_PROGRESS_MOVING_SELECTOR c=20
|
static const char MSG_PROGRESS_MOVING_SELECTOR[] PROGMEM_I1 = ISTR("Moving selector"); ////MSG_PROGRESS_MOVING_SELECTOR c=20
|
||||||
static const char MSG_PROGRESS_FEED_FSENSOR[] PROGMEM_I1 = ISTR("Feeding to FSensor"); ////MSG_PROGRESS_FEED_FSENSOR c=20
|
static const char MSG_PROGRESS_FEED_FSENSOR[] PROGMEM_I1 = ISTR("Feeding to FSensor"); ////MSG_PROGRESS_FEED_FSENSOR c=20
|
||||||
|
|
||||||
static const char * const progressTexts[] PROGMEM = {
|
static const char *const progressTexts[] PROGMEM = {
|
||||||
_R(MSG_PROGRESS_OK),
|
_R(MSG_PROGRESS_OK),
|
||||||
_R(MSG_PROGRESS_ENGAGE_IDLER),
|
_R(MSG_PROGRESS_ENGAGE_IDLER),
|
||||||
_R(MSG_PROGRESS_DISENGAGE_IDLER),
|
_R(MSG_PROGRESS_DISENGAGE_IDLER),
|
||||||
|
|
@ -62,9 +62,9 @@ static const char * const progressTexts[] PROGMEM = {
|
||||||
_R(MSG_PROGRESS_FEED_FSENSOR)
|
_R(MSG_PROGRESS_FEED_FSENSOR)
|
||||||
};
|
};
|
||||||
|
|
||||||
const char * ProgressCodeToText(ProgressCode pc){
|
const char *ProgressCodeToText(ProgressCode pc) {
|
||||||
// @@TODO ?? a better fallback option?
|
// @@TODO ?? a better fallback option?
|
||||||
return ( (uint16_t)pc <= (sizeof(progressTexts) / sizeof(progressTexts[0])) )
|
return ((uint16_t)pc <= (sizeof(progressTexts) / sizeof(progressTexts[0])))
|
||||||
? static_cast<const char *>(pgm_read_ptr(&progressTexts[(uint16_t)pc]))
|
? static_cast<const char *>(pgm_read_ptr(&progressTexts[(uint16_t)pc]))
|
||||||
: static_cast<const char *>(pgm_read_ptr(&progressTexts[0]));
|
: static_cast<const char *>(pgm_read_ptr(&progressTexts[0]));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/// @file
|
/// @file mmu2_protocol.cpp
|
||||||
#include "mmu2_protocol.h"
|
#include "mmu2_protocol.h"
|
||||||
|
|
||||||
// protocol definition
|
// protocol definition
|
||||||
|
|
@ -112,11 +112,8 @@ DecodeStatus Protocol::DecodeRequest(uint8_t c) {
|
||||||
rqState = RequestStates::Code;
|
rqState = RequestStates::Code;
|
||||||
return DecodeStatus::MessageCompleted;
|
return DecodeStatus::MessageCompleted;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
requestMsg.code = RequestMsgCodes::unknown;
|
|
||||||
rqState = RequestStates::Error;
|
|
||||||
return DecodeStatus::Error;
|
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
default: //case error:
|
default: //case error:
|
||||||
if (IsNewLine(c)) {
|
if (IsNewLine(c)) {
|
||||||
rqState = RequestStates::Code;
|
rqState = RequestStates::Code;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/// @file protocol.h
|
/// @file mmu2_protocol.h
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "mmu2_crc.h"
|
#include "mmu2_crc.h"
|
||||||
|
|
@ -8,6 +8,7 @@ namespace modules {
|
||||||
/// @brief The MMU communication protocol implementation and related stuff.
|
/// @brief The MMU communication protocol implementation and related stuff.
|
||||||
///
|
///
|
||||||
/// See description of the new protocol in the MMU 2021 doc
|
/// See description of the new protocol in the MMU 2021 doc
|
||||||
|
|
||||||
namespace protocol {
|
namespace protocol {
|
||||||
|
|
||||||
/// Definition of request message codes
|
/// Definition of request message codes
|
||||||
|
|
@ -179,17 +180,9 @@ public:
|
||||||
/// @returns number of bytes written into txbuff
|
/// @returns number of bytes written into txbuff
|
||||||
static uint8_t EncodeResponseReadFINDA(const RequestMsg &msg, uint8_t findaValue, uint8_t *txbuff);
|
static uint8_t EncodeResponseReadFINDA(const RequestMsg &msg, uint8_t findaValue, uint8_t *txbuff);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Encode response to Query operation status
|
/// Encode response to Query operation status
|
||||||
/// @param msg source request message for this response
|
/// @param msg source request message for this response
|
||||||
/// @param code status of operation (Processing, Error, Finished)
|
/// @param rcs status of operation (Processing, Error, Finished)
|
||||||
/// @param value related to status of operation(e.g. error code or progress)
|
|
||||||
/// @param txbuff where to format the message
|
/// @param txbuff where to format the message
|
||||||
/// @returns number of bytes written into txbuff
|
/// @returns number of bytes written into txbuff
|
||||||
static uint8_t EncodeResponseQueryOperation(const RequestMsg &msg, ResponseCommandStatus rcs, uint8_t *txbuff);
|
static uint8_t EncodeResponseQueryOperation(const RequestMsg &msg, ResponseCommandStatus rcs, uint8_t *txbuff);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
// on MK3/S/+ we shuffle the timers a bit, thus "_millis" may not equal "millis"
|
// on MK3/S/+ we shuffle the timers a bit, thus "_millis" may not equal "millis"
|
||||||
#include "system_timer.h"
|
#include "system_timer.h"
|
||||||
#else
|
#else
|
||||||
// irrelevant on Buddy FW, just keep "_millis" as "millis"
|
// irrelevant on Buddy FW, just keep "_millis" as "millis"
|
||||||
#include <wiring_time.h>
|
#include <wiring_time.h>
|
||||||
#define _millis millis
|
#define _millis millis
|
||||||
#ifdef UNITTEST
|
#ifdef UNITTEST
|
||||||
|
|
@ -267,6 +267,8 @@ StepStatus ProtocolLogic::ScopeStep() {
|
||||||
if (!ExpectsResponse()) {
|
if (!ExpectsResponse()) {
|
||||||
// we are waiting for something
|
// we are waiting for something
|
||||||
switch (currentScope) {
|
switch (currentScope) {
|
||||||
|
case Scope::StartSeq:
|
||||||
|
return Processing;
|
||||||
case Scope::DelayedRestart:
|
case Scope::DelayedRestart:
|
||||||
return DelayedRestartWait();
|
return DelayedRestartWait();
|
||||||
case Scope::Idle:
|
case Scope::Idle:
|
||||||
|
|
@ -280,8 +282,9 @@ StepStatus ProtocolLogic::ScopeStep() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we are expecting a message
|
// we are expecting a message
|
||||||
if (auto expmsg = ExpectingMessage(); expmsg != MessageReady) // this whole statement takes 12B
|
if (auto expmsg = ExpectingMessage(); expmsg != MessageReady) { // this whole statement takes 12B
|
||||||
return expmsg;
|
return expmsg;
|
||||||
|
}
|
||||||
|
|
||||||
// process message
|
// process message
|
||||||
switch (currentScope) {
|
switch (currentScope) {
|
||||||
|
|
@ -723,8 +726,9 @@ void ProtocolLogic::FormatLastResponseMsgAndClearLRB(char *dst) {
|
||||||
for (uint8_t i = 0; i < lrb; ++i) {
|
for (uint8_t i = 0; i < lrb; ++i) {
|
||||||
uint8_t b = lastReceivedBytes[i];
|
uint8_t b = lastReceivedBytes[i];
|
||||||
// Check for printable character, including space
|
// Check for printable character, including space
|
||||||
if (b < 32 || b > 127)
|
if (b < 32 || b > 127) {
|
||||||
b = '.';
|
b = '.';
|
||||||
|
}
|
||||||
*dst++ = b;
|
*dst++ = b;
|
||||||
}
|
}
|
||||||
*dst = 0; // terminate properly
|
*dst = 0; // terminate properly
|
||||||
|
|
@ -738,8 +742,9 @@ void ProtocolLogic::LogRequestMsg(const uint8_t *txbuff, uint8_t size) {
|
||||||
for (uint8_t i = 0; i < size; ++i) {
|
for (uint8_t i = 0; i < size; ++i) {
|
||||||
uint8_t b = txbuff[i];
|
uint8_t b = txbuff[i];
|
||||||
// Check for printable character, including space
|
// Check for printable character, including space
|
||||||
if (b < 32 || b > 127)
|
if (b < 32 || b > 127) {
|
||||||
b = '.';
|
b = '.';
|
||||||
|
}
|
||||||
tmp[i + 1] = b;
|
tmp[i + 1] = b;
|
||||||
}
|
}
|
||||||
tmp[size + 1] = 0;
|
tmp[size + 1] = 0;
|
||||||
|
|
@ -845,8 +850,9 @@ StepStatus ProtocolLogic::Step() {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t ProtocolLogic::CommandInProgress() const {
|
uint8_t ProtocolLogic::CommandInProgress() const {
|
||||||
if (currentScope != Scope::Command)
|
if (currentScope != Scope::Command) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return (uint8_t)ReqMsg().code;
|
return (uint8_t)ReqMsg().code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -862,7 +868,7 @@ void ProtocolLogic::ResetRetryAttempts() {
|
||||||
retryAttempts = MAX_RETRIES;
|
retryAttempts = MAX_RETRIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __attribute__((noinline)) ProtocolLogic::ResetCommunicationTimeoutAttempts() {
|
void ProtocolLogic::ResetCommunicationTimeoutAttempts() {
|
||||||
SERIAL_ECHOLNPGM("RSTCommTimeout");
|
SERIAL_ECHOLNPGM("RSTCommTimeout");
|
||||||
dataTO.Reset();
|
dataTO.Reset();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
#include "Filament_sensor.h"
|
#include "Filament_sensor.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "lcd.h"
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
|
|
@ -464,6 +465,15 @@ void tuneIdlerStallguardThresholdMenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void tuneIdlerStallguardThreshold() {
|
void tuneIdlerStallguardThreshold() {
|
||||||
|
if ((CommandInProgress)mmu2.GetCommandInProgress() != NoCommand)
|
||||||
|
{
|
||||||
|
// Workaround to mitigate an issue where the Tune menu doesn't
|
||||||
|
// work if the MMU is running a command. For example the Idler
|
||||||
|
// homing fails during toolchange.
|
||||||
|
// To save the print, make the Tune button unresponsive for now.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
putErrorScreenToSleep = true;
|
putErrorScreenToSleep = true;
|
||||||
menu_submenu(tuneIdlerStallguardThresholdMenu);
|
menu_submenu(tuneIdlerStallguardThresholdMenu);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,12 @@ namespace MMU2 {
|
||||||
/// When the printer's FW starts, the MMU mode is either Stopped or NotResponding (based on user's preference).
|
/// When the printer's FW starts, the MMU mode is either Stopped or NotResponding (based on user's preference).
|
||||||
/// When the MMU successfully establishes communication, the state changes to Active.
|
/// When the MMU successfully establishes communication, the state changes to Active.
|
||||||
enum class xState : uint_fast8_t {
|
enum class xState : uint_fast8_t {
|
||||||
|
/// The user doesn't want the printer to work with the MMU. The MMU itself is not powered and does not work at all.
|
||||||
|
/// !!! Must be 0 !!! marlin_vars.mmu2_state is set to 0 if not active
|
||||||
|
Stopped,
|
||||||
|
|
||||||
Active, ///< MMU has been detected, connected, communicates and is ready to be worked with.
|
Active, ///< MMU has been detected, connected, communicates and is ready to be worked with.
|
||||||
Connecting, ///< MMU is connected but it doesn't communicate (yet). The user wants the MMU, but it is not ready to be worked with.
|
Connecting, ///< MMU is connected but it doesn't communicate (yet). The user wants the MMU, but it is not ready to be worked with.
|
||||||
Stopped ///< The user doesn't want the printer to work with the MMU. The MMU itself is not powered and does not work at all.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MMU2
|
} // namespace MMU2
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ namespace MMU2 {
|
||||||
|
|
||||||
static constexpr uint8_t mmuVersionMajor = 3;
|
static constexpr uint8_t mmuVersionMajor = 3;
|
||||||
static constexpr uint8_t mmuVersionMinor = 0;
|
static constexpr uint8_t mmuVersionMinor = 0;
|
||||||
static constexpr uint8_t mmuVersionPatch = 2;
|
static constexpr uint8_t mmuVersionPatch = 3;
|
||||||
|
|
||||||
} // namespace MMU2
|
} // namespace MMU2
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ void mc_arc(const float* position, float* target, const float* offset, float fee
|
||||||
if (cs.arc_segments_per_sec > 0)
|
if (cs.arc_segments_per_sec > 0)
|
||||||
{
|
{
|
||||||
// 20200417 - FormerLurker - Implement MIN_ARC_SEGMENTS if it is defined - from Marlin 2.0 implementation
|
// 20200417 - FormerLurker - Implement MIN_ARC_SEGMENTS if it is defined - from Marlin 2.0 implementation
|
||||||
float mm_per_arc_segment_sec = (feed_rate / 60.0f) * (1.0f / cs.arc_segments_per_sec);
|
float mm_per_arc_segment_sec = feed_rate / (60.f * float(cs.arc_segments_per_sec));
|
||||||
if (mm_per_arc_segment_sec < mm_per_arc_segment)
|
if (mm_per_arc_segment_sec < mm_per_arc_segment)
|
||||||
mm_per_arc_segment = mm_per_arc_segment_sec;
|
mm_per_arc_segment = mm_per_arc_segment_sec;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "boards.h"
|
#include "boards.h"
|
||||||
|
|
||||||
#define LARGE_FLASH true
|
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
* Rambo Pin Assignments 1.3
|
* Rambo Pin Assignments 1.3
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "fancheck.h"
|
#include "fancheck.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
|
#include "lcd.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "ConfigurationStore.h"
|
#include "ConfigurationStore.h"
|
||||||
|
|
||||||
|
|
@ -84,15 +85,6 @@ float* max_feedrate = cs.max_feedrate_normal;
|
||||||
uint32_t* max_acceleration_mm_per_s2 = cs.max_acceleration_mm_per_s2_normal;
|
uint32_t* max_acceleration_mm_per_s2 = cs.max_acceleration_mm_per_s2_normal;
|
||||||
uint32_t max_acceleration_steps_per_s2[NUM_AXIS];
|
uint32_t max_acceleration_steps_per_s2[NUM_AXIS];
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
// this holds the required transform to compensate for bed level
|
|
||||||
matrix_3x3 plan_bed_level_matrix = {
|
|
||||||
1.0, 0.0, 0.0,
|
|
||||||
0.0, 1.0, 0.0,
|
|
||||||
0.0, 0.0, 1.0,
|
|
||||||
};
|
|
||||||
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
// The current position of the tool in absolute steps
|
// The current position of the tool in absolute steps
|
||||||
long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_mm are changed by gcode
|
long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_mm are changed by gcode
|
||||||
static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
|
static float previous_speed[NUM_AXIS]; // Speed of previous path line segment
|
||||||
|
|
@ -123,7 +115,7 @@ static uint8_t g_cntr_planner_queue_min = 0;
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||||
int extrude_min_temp = EXTRUDE_MINTEMP;
|
int extrude_min_temp = EXTRUDE_MINTEMP;
|
||||||
#endif
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
|
||||||
#ifdef LIN_ADVANCE
|
#ifdef LIN_ADVANCE
|
||||||
float extruder_advance_K = LA_K_DEF;
|
float extruder_advance_K = LA_K_DEF;
|
||||||
|
|
@ -757,54 +749,9 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
|
||||||
plan_reset_next_e_sched = true;
|
plan_reset_next_e_sched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
// Apply the machine correction matrix.
|
// Apply the machine correction matrix.
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
SERIAL_ECHOPGM("Planner, current position - servos: ");
|
|
||||||
MYSERIAL.print(st_get_position_mm(X_AXIS), 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(st_get_position_mm(Y_AXIS), 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(st_get_position_mm(Z_AXIS), 5);
|
|
||||||
SERIAL_ECHOLNPGM("");
|
|
||||||
|
|
||||||
SERIAL_ECHOPGM("Planner, target position, initial: ");
|
|
||||||
MYSERIAL.print(x, 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(y, 5);
|
|
||||||
SERIAL_ECHOLNPGM("");
|
|
||||||
|
|
||||||
SERIAL_ECHOPGM("Planner, world2machine: ");
|
|
||||||
MYSERIAL.print(world2machine_rotation_and_skew[0][0], 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(world2machine_rotation_and_skew[0][1], 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(world2machine_rotation_and_skew[1][0], 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(world2machine_rotation_and_skew[1][1], 5);
|
|
||||||
SERIAL_ECHOLNPGM("");
|
|
||||||
SERIAL_ECHOPGM("Planner, offset: ");
|
|
||||||
MYSERIAL.print(world2machine_shift[0], 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(world2machine_shift[1], 5);
|
|
||||||
SERIAL_ECHOLNPGM("");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
world2machine(x, y);
|
world2machine(x, y);
|
||||||
|
|
||||||
#if 0
|
|
||||||
SERIAL_ECHOPGM("Planner, target position, corrected: ");
|
|
||||||
MYSERIAL.print(x, 5);
|
|
||||||
SERIAL_ECHOPGM(", ");
|
|
||||||
MYSERIAL.print(y, 5);
|
|
||||||
SERIAL_ECHOLNPGM("");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// The target position of the tool in absolute steps
|
// The target position of the tool in absolute steps
|
||||||
// Calculate target position in absolute steps
|
// Calculate target position in absolute steps
|
||||||
//this should be done after the wait, because otherwise a M92 code within the gcode disrupts this calculation somehow
|
//this should be done after the wait, because otherwise a M92 code within the gcode disrupts this calculation somehow
|
||||||
|
|
@ -856,7 +803,7 @@ void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
|
||||||
// Number of steps for each axis
|
// Number of steps for each axis
|
||||||
#ifndef COREXY
|
#ifndef COREXY
|
||||||
|
|
@ -1291,27 +1238,8 @@ Having the real displacement of the head, we can calculate the total movement le
|
||||||
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
ENABLE_STEPPER_DRIVER_INTERRUPT();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
vector_3 plan_get_position() {
|
|
||||||
vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
|
|
||||||
|
|
||||||
//position.debug("in plan_get position");
|
|
||||||
//plan_bed_level_matrix.debug("in plan_get bed_level");
|
|
||||||
matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
|
|
||||||
//inverse.debug("in plan_get inverse");
|
|
||||||
position.apply_rotation(inverse);
|
|
||||||
//position.debug("after rotation");
|
|
||||||
|
|
||||||
return position;
|
|
||||||
}
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
void plan_set_position(float x, float y, float z, const float &e)
|
void plan_set_position(float x, float y, float z, const float &e)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
world2machine(x, y);
|
world2machine(x, y);
|
||||||
|
|
||||||
position[X_AXIS] = lround(x*cs.axis_steps_per_mm[X_AXIS]);
|
position[X_AXIS] = lround(x*cs.axis_steps_per_mm[X_AXIS]);
|
||||||
|
|
@ -1364,7 +1292,7 @@ void set_extrude_min_temp(int temp)
|
||||||
{
|
{
|
||||||
extrude_min_temp = temp;
|
extrude_min_temp = temp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
|
||||||
// Calculate the steps/s^2 acceleration rates, based on the mm/s^s
|
// Calculate the steps/s^2 acceleration rates, based on the mm/s^s
|
||||||
void reset_acceleration_rates()
|
void reset_acceleration_rates()
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,6 @@
|
||||||
|
|
||||||
#include "Marlin.h"
|
#include "Marlin.h"
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
#include "vector_3.h"
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
enum BlockFlag {
|
enum BlockFlag {
|
||||||
// Planner flag to recalculate trapezoids on entry junction.
|
// Planner flag to recalculate trapezoids on entry junction.
|
||||||
// This flag has an optimization purpose only.
|
// This flag has an optimization purpose only.
|
||||||
|
|
@ -130,24 +126,9 @@ typedef struct {
|
||||||
extern float extruder_advance_K; // Linear-advance K factor
|
extern float extruder_advance_K; // Linear-advance K factor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
// this holds the required transform to compensate for bed level
|
|
||||||
extern matrix_3x3 plan_bed_level_matrix;
|
|
||||||
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
// Initialize the motion plan subsystem
|
// Initialize the motion plan subsystem
|
||||||
void plan_init();
|
void plan_init();
|
||||||
|
|
||||||
// Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in
|
|
||||||
// millimaters. Feed rate specifies the speed of the motion.
|
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate);
|
|
||||||
|
|
||||||
// Get the position applying the bed level matrix if enabled
|
|
||||||
vector_3 plan_get_position();
|
|
||||||
#else
|
|
||||||
|
|
||||||
/// Extracting common call of
|
/// Extracting common call of
|
||||||
/// plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], ...
|
/// plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], ...
|
||||||
/// saves almost 5KB.
|
/// saves almost 5KB.
|
||||||
|
|
@ -159,15 +140,9 @@ void plan_buffer_line_destinationXYZE(float feed_rate);
|
||||||
void plan_set_position_curposXYZE();
|
void plan_set_position_curposXYZE();
|
||||||
|
|
||||||
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const float* gcode_start_position = NULL, uint16_t segment_idx = 0);
|
void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const float* gcode_start_position = NULL, uint16_t segment_idx = 0);
|
||||||
//void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
// Set position. Used for G92 instructions.
|
// Set position. Used for G92 instructions.
|
||||||
//#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
void plan_set_position(float x, float y, float z, const float &e);
|
void plan_set_position(float x, float y, float z, const float &e);
|
||||||
//#else
|
|
||||||
//void plan_set_position(const float &x, const float &y, const float &z, const float &e);
|
|
||||||
//#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
void plan_set_z_position(const float &z);
|
void plan_set_z_position(const float &z);
|
||||||
void plan_set_e_position(const float &e);
|
void plan_set_e_position(const float &e);
|
||||||
|
|
@ -266,7 +241,7 @@ extern bool planner_aborted;
|
||||||
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||||
extern int extrude_min_temp;
|
extern int extrude_min_temp;
|
||||||
void set_extrude_min_temp(int temp);
|
void set_extrude_min_temp(int temp);
|
||||||
#endif
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
|
||||||
void reset_acceleration_rates();
|
void reset_acceleration_rates();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -191,10 +191,22 @@ void uvlo_() {
|
||||||
eeprom_update_float_notify((float*)(EEPROM_UVLO_LA_K), extruder_advance_K);
|
eeprom_update_float_notify((float*)(EEPROM_UVLO_LA_K), extruder_advance_K);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
eeprom_update_word_notify((uint16_t*)EEPROM_UVLO_EXTRUDE_MINTEMP, extrude_min_temp);
|
||||||
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
eeprom_update_block_notify(cs.max_acceleration_mm_per_s2_normal, (uint32_t *)EEPROM_UVLO_ACCELL_MM_S2_NORMAL, sizeof(cs.max_acceleration_mm_per_s2_normal));
|
||||||
|
eeprom_update_block_notify(cs.max_acceleration_mm_per_s2_silent, (uint32_t *)EEPROM_UVLO_ACCELL_MM_S2_SILENT, sizeof(cs.max_acceleration_mm_per_s2_silent));
|
||||||
|
eeprom_update_block_notify(cs.max_feedrate_normal, (float *)EEPROM_UVLO_MAX_FEEDRATE_NORMAL, sizeof(cs.max_feedrate_normal));
|
||||||
|
eeprom_update_block_notify(cs.max_feedrate_silent, (float *)EEPROM_UVLO_MAX_FEEDRATE_SILENT, sizeof(cs.max_feedrate_silent));
|
||||||
|
eeprom_update_float_notify((float *)(EEPROM_UVLO_MIN_FEEDRATE), cs.minimumfeedrate);
|
||||||
|
eeprom_update_float_notify((float *)(EEPROM_UVLO_MIN_TRAVEL_FEEDRATE), cs.mintravelfeedrate);
|
||||||
|
eeprom_update_dword_notify((uint32_t *)(EEPROM_UVLO_MIN_SEGMENT_TIME_US), cs.min_segment_time_us);
|
||||||
|
eeprom_update_block_notify(cs.max_jerk, (float *)EEPROM_UVLO_MAX_JERK, sizeof(cs.max_jerk));
|
||||||
// Finally store the "power outage" flag.
|
// Finally store the "power outage" flag.
|
||||||
if (did_pause_print) {
|
if (did_pause_print) {
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 1);
|
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO_Z_LIFTED, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::PENDING_RECOVERY);
|
eeprom_update_byte_notify((uint8_t*)EEPROM_UVLO, PowerPanic::PENDING_RECOVERY);
|
||||||
|
|
||||||
// Increment power failure counter
|
// Increment power failure counter
|
||||||
|
|
@ -422,6 +434,17 @@ bool recover_machine_state_after_power_panic() {
|
||||||
extruder_advance_K = eeprom_read_float((float*)EEPROM_UVLO_LA_K);
|
extruder_advance_K = eeprom_read_float((float*)EEPROM_UVLO_LA_K);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
extrude_min_temp = eeprom_read_word((uint16_t*)EEPROM_UVLO_EXTRUDE_MINTEMP);
|
||||||
|
#endif //PREVENT_DANGEROUS_EXTRUDE
|
||||||
|
eeprom_read_block(cs.max_acceleration_mm_per_s2_normal, (uint32_t *)EEPROM_UVLO_ACCELL_MM_S2_NORMAL, sizeof(cs.max_acceleration_mm_per_s2_normal));
|
||||||
|
eeprom_read_block(cs.max_acceleration_mm_per_s2_silent, (uint32_t *)EEPROM_UVLO_ACCELL_MM_S2_SILENT, sizeof(cs.max_acceleration_mm_per_s2_silent));
|
||||||
|
eeprom_read_block(cs.max_feedrate_normal, (float *)EEPROM_UVLO_MAX_FEEDRATE_NORMAL, sizeof(cs.max_feedrate_normal));
|
||||||
|
eeprom_read_block(cs.max_feedrate_silent, (float *)EEPROM_UVLO_MAX_FEEDRATE_SILENT, sizeof(cs.max_feedrate_silent));
|
||||||
|
cs.minimumfeedrate = eeprom_read_float((float *)EEPROM_UVLO_MIN_FEEDRATE);
|
||||||
|
cs.mintravelfeedrate = eeprom_read_float((float *)EEPROM_UVLO_MIN_TRAVEL_FEEDRATE);
|
||||||
|
cs.min_segment_time_us = eeprom_read_dword((uint32_t *)EEPROM_UVLO_MIN_SEGMENT_TIME_US);
|
||||||
|
eeprom_read_block(cs.max_jerk, (float *)EEPROM_UVLO_MAX_JERK, sizeof(cs.max_jerk));
|
||||||
return mbl_was_active;
|
return mbl_was_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,22 +0,0 @@
|
||||||
#include "Configuration.h"
|
|
||||||
|
|
||||||
#ifdef AUTO_BED_LEVELING_GRID
|
|
||||||
|
|
||||||
void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
|
|
||||||
double ddot ( int n, double dx[], int incx, double dy[], int incy );
|
|
||||||
double dnrm2 ( int n, double x[], int incx );
|
|
||||||
void dqrank ( double a[], int lda, int m, int n, double tol, int *kr,
|
|
||||||
int jpvt[], double qraux[] );
|
|
||||||
void dqrdc ( double a[], int lda, int n, int p, double qraux[], int jpvt[],
|
|
||||||
double work[], int job );
|
|
||||||
int dqrls ( double a[], int lda, int m, int n, double tol, int *kr, double b[],
|
|
||||||
double x[], double rsd[], int jpvt[], double qraux[], int itask );
|
|
||||||
void dqrlss ( double a[], int lda, int m, int n, int kr, double b[], double x[],
|
|
||||||
double rsd[], int jpvt[], double qraux[] );
|
|
||||||
int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[],
|
|
||||||
double qy[], double qty[], double b[], double rsd[], double ab[], int job );
|
|
||||||
void dscal ( int n, double sa, double x[], int incx );
|
|
||||||
void dswap ( int n, double x[], int incx, double y[], int incy );
|
|
||||||
double *qr_solve ( int m, int n, double a[], double b[] );
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//sm4.c - simple 4-axis stepper control
|
//sm4.cpp - simple 4-axis stepper control
|
||||||
|
|
||||||
#include "sm4.h"
|
#include "sm4.h"
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|
@ -49,28 +48,6 @@ sm4_update_pos_cb_t sm4_update_pos_cb = 0;
|
||||||
|
|
||||||
sm4_calc_delay_cb_t sm4_calc_delay_cb = 0;
|
sm4_calc_delay_cb_t sm4_calc_delay_cb = 0;
|
||||||
|
|
||||||
uint16_t sm4_cpu_time = 0;
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t sm4_get_dir(uint8_t axis)
|
|
||||||
{
|
|
||||||
switch (axis)
|
|
||||||
{
|
|
||||||
#if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3))
|
|
||||||
case 0: return (PORTL & 2)?XDIR;
|
|
||||||
case 1: return (PORTL & 1)?YDIR;
|
|
||||||
case 2: return (PORTL & 4)?ZDIR;
|
|
||||||
case 3: return (PORTL & 64)?EDIR;
|
|
||||||
#elif ((MOTHERBOARD == BOARD_EINSY_1_0a))
|
|
||||||
case 0: return (PORTL & 1)?XDIR;
|
|
||||||
case 1: return (PORTL & 2)?YDIR;
|
|
||||||
case 2: return (PORTL & 4)?ZDIR;
|
|
||||||
case 3: return (PORTL & 64)?EDIR;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sm4_set_dir(uint8_t axis, uint8_t dir)
|
void sm4_set_dir(uint8_t axis, uint8_t dir)
|
||||||
{
|
{
|
||||||
switch (axis)
|
switch (axis)
|
||||||
|
|
@ -90,30 +67,9 @@ void sm4_set_dir(uint8_t axis, uint8_t dir)
|
||||||
asm("nop");
|
asm("nop");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t sm4_get_dir_bits(void)
|
|
||||||
{
|
|
||||||
register uint8_t dir_bits = 0;
|
|
||||||
register uint8_t portL = PORTL;
|
|
||||||
//TODO -optimize in asm
|
|
||||||
#if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3))
|
|
||||||
if (portL & 2) dir_bits |= 1;
|
|
||||||
if (portL & 1) dir_bits |= 2;
|
|
||||||
if (portL & 4) dir_bits |= 4;
|
|
||||||
if (portL & 64) dir_bits |= 8;
|
|
||||||
dir_bits ^= dir_mask;
|
|
||||||
#elif ((MOTHERBOARD == BOARD_EINSY_1_0a))
|
|
||||||
if (portL & 1) dir_bits |= 1;
|
|
||||||
if (portL & 2) dir_bits |= 2;
|
|
||||||
if (portL & 4) dir_bits |= 4;
|
|
||||||
if (portL & 64) dir_bits |= 8;
|
|
||||||
dir_bits ^= dir_mask;
|
|
||||||
#endif
|
|
||||||
return dir_bits;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sm4_set_dir_bits(uint8_t dir_bits)
|
void sm4_set_dir_bits(uint8_t dir_bits)
|
||||||
{
|
{
|
||||||
register uint8_t portL = PORTL;
|
uint8_t portL = PORTL;
|
||||||
portL &= 0xb8; //set direction bits to zero
|
portL &= 0xb8; //set direction bits to zero
|
||||||
//TODO -optimize in asm
|
//TODO -optimize in asm
|
||||||
#if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3))
|
#if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3))
|
||||||
|
|
@ -139,7 +95,7 @@ void sm4_do_step(uint8_t axes_mask)
|
||||||
#ifdef TMC2130_DEDGE_STEPPING
|
#ifdef TMC2130_DEDGE_STEPPING
|
||||||
PINC = (axes_mask & 0x0f); // toggle step signals by mask
|
PINC = (axes_mask & 0x0f); // toggle step signals by mask
|
||||||
#else
|
#else
|
||||||
register uint8_t portC = PORTC & 0xf0;
|
uint8_t portC = PORTC & 0xf0;
|
||||||
PORTC = portC | (axes_mask & 0x0f); //set step signals by mask
|
PORTC = portC | (axes_mask & 0x0f); //set step signals by mask
|
||||||
asm("nop");
|
asm("nop");
|
||||||
PORTC = portC; //set step signals to zero
|
PORTC = portC; //set step signals to zero
|
||||||
|
|
@ -148,60 +104,6 @@ void sm4_do_step(uint8_t axes_mask)
|
||||||
#endif //((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3) || (MOTHERBOARD == BOARD_EINSY_1_0a))
|
#endif //((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3) || (MOTHERBOARD == BOARD_EINSY_1_0a))
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t sm4_line_xyze_ui(uint16_t dx, uint16_t dy, uint16_t dz, uint16_t de)
|
|
||||||
{
|
|
||||||
uint16_t dd = (uint16_t)(sqrt((float)(((uint32_t)dx)*dx + ((uint32_t)dy*dy) + ((uint32_t)dz*dz) + ((uint32_t)de*de))) + 0.5);
|
|
||||||
uint16_t nd = dd;
|
|
||||||
uint16_t cx = dd;
|
|
||||||
uint16_t cy = dd;
|
|
||||||
uint16_t cz = dd;
|
|
||||||
uint16_t ce = dd;
|
|
||||||
uint16_t x = 0;
|
|
||||||
uint16_t y = 0;
|
|
||||||
uint16_t z = 0;
|
|
||||||
uint16_t e = 0;
|
|
||||||
while (nd)
|
|
||||||
{
|
|
||||||
if (sm4_stop_cb && (*sm4_stop_cb)()) break;
|
|
||||||
uint8_t sm = 0; //step mask
|
|
||||||
if (cx <= dx)
|
|
||||||
{
|
|
||||||
sm |= 1;
|
|
||||||
cx += dd;
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
if (cy <= dy)
|
|
||||||
{
|
|
||||||
sm |= 2;
|
|
||||||
cy += dd;
|
|
||||||
y++;
|
|
||||||
}
|
|
||||||
if (cz <= dz)
|
|
||||||
{
|
|
||||||
sm |= 4;
|
|
||||||
cz += dd;
|
|
||||||
z++;
|
|
||||||
}
|
|
||||||
if (ce <= de)
|
|
||||||
{
|
|
||||||
sm |= 8;
|
|
||||||
ce += dd;
|
|
||||||
e++;
|
|
||||||
}
|
|
||||||
cx -= dx;
|
|
||||||
cy -= dy;
|
|
||||||
cz -= dz;
|
|
||||||
ce -= de;
|
|
||||||
sm4_do_step(sm);
|
|
||||||
uint16_t delay = SM4_DEFDELAY;
|
|
||||||
if (sm4_calc_delay_cb) delay = (*sm4_calc_delay_cb)(nd, dd);
|
|
||||||
if (delay) delayMicroseconds(delay);
|
|
||||||
nd--;
|
|
||||||
}
|
|
||||||
if (sm4_update_pos_cb) (*sm4_update_pos_cb)(x, y, z, e);
|
|
||||||
return nd;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t sm4_line_xyz_ui(uint16_t dx, uint16_t dy, uint16_t dz){
|
uint16_t sm4_line_xyz_ui(uint16_t dx, uint16_t dy, uint16_t dz){
|
||||||
uint16_t dd = (uint16_t)(sqrt((float)(((uint32_t)dx)*dx + ((uint32_t)dy*dy) + ((uint32_t)dz*dz))) + 0.5);
|
uint16_t dd = (uint16_t)(sqrt((float)(((uint32_t)dx)*dx + ((uint32_t)dy*dy) + ((uint32_t)dz*dz))) + 0.5);
|
||||||
uint16_t nd = dd;
|
uint16_t nd = dd;
|
||||||
|
|
@ -5,12 +5,6 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif //defined(__cplusplus)
|
|
||||||
|
|
||||||
|
|
||||||
// callback prototype for stop condition (return 0 - continue, return 1 - stop)
|
// callback prototype for stop condition (return 0 - continue, return 1 - stop)
|
||||||
typedef uint8_t (*sm4_stop_cb_t)();
|
typedef uint8_t (*sm4_stop_cb_t)();
|
||||||
|
|
||||||
|
|
@ -30,16 +24,9 @@ extern sm4_update_pos_cb_t sm4_update_pos_cb;
|
||||||
// callback pointer - calc_delay
|
// callback pointer - calc_delay
|
||||||
extern sm4_calc_delay_cb_t sm4_calc_delay_cb;
|
extern sm4_calc_delay_cb_t sm4_calc_delay_cb;
|
||||||
|
|
||||||
|
|
||||||
// returns direction for single axis (0 - positive, 1 - negative)
|
|
||||||
extern uint8_t sm4_get_dir(uint8_t axis);
|
|
||||||
|
|
||||||
// set direction for single axis (0 - positive, 1 - negative)
|
// set direction for single axis (0 - positive, 1 - negative)
|
||||||
extern void sm4_set_dir(uint8_t axis, uint8_t dir);
|
extern void sm4_set_dir(uint8_t axis, uint8_t dir);
|
||||||
|
|
||||||
// returns direction of all axes as bitmask (0 - positive, 1 - negative)
|
|
||||||
extern uint8_t sm4_get_dir_bits(void);
|
|
||||||
|
|
||||||
// set direction for all axes as bitmask (0 - positive, 1 - negative)
|
// set direction for all axes as bitmask (0 - positive, 1 - negative)
|
||||||
extern void sm4_set_dir_bits(uint8_t dir_bits);
|
extern void sm4_set_dir_bits(uint8_t dir_bits);
|
||||||
|
|
||||||
|
|
@ -47,11 +34,6 @@ extern void sm4_set_dir_bits(uint8_t dir_bits);
|
||||||
extern void sm4_do_step(uint8_t axes_mask);
|
extern void sm4_do_step(uint8_t axes_mask);
|
||||||
|
|
||||||
// xyze linear-interpolated relative move, returns remaining diagonal steps (>0 means stoped)
|
// xyze linear-interpolated relative move, returns remaining diagonal steps (>0 means stoped)
|
||||||
extern uint16_t sm4_line_xyze_ui(uint16_t dx, uint16_t dy, uint16_t dz, uint16_t de);
|
|
||||||
extern uint16_t sm4_line_xyz_ui(uint16_t dx, uint16_t dy, uint16_t dz);
|
extern uint16_t sm4_line_xyz_ui(uint16_t dx, uint16_t dy, uint16_t dz);
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif //defined(__cplusplus)
|
|
||||||
#endif //_SM4_H
|
#endif //_SM4_H
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include "planner.h"
|
#include "planner.h"
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
|
#include "lcd.h"
|
||||||
#include "cardreader.h"
|
#include "cardreader.h"
|
||||||
#include "speed_lookuptable.h"
|
#include "speed_lookuptable.h"
|
||||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||||
|
|
@ -58,14 +59,6 @@ uint16_t SP_min = 0x21FF;
|
||||||
#ifdef DEBUG_YSTEP_DUP_PIN
|
#ifdef DEBUG_YSTEP_DUP_PIN
|
||||||
#define _STEP_PIN_Y_DUP_AXIS DEBUG_YSTEP_DUP_PIN
|
#define _STEP_PIN_Y_DUP_AXIS DEBUG_YSTEP_DUP_PIN
|
||||||
#endif
|
#endif
|
||||||
#ifdef Y_DUAL_STEPPER_DRIVERS
|
|
||||||
#error Y_DUAL_STEPPER_DRIVERS not fully implemented
|
|
||||||
#define _STEP_PIN_Y2_AXIS Y2_STEP_PIN
|
|
||||||
#endif
|
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
|
||||||
#error Z_DUAL_STEPPER_DRIVERS not fully implemented
|
|
||||||
#define _STEP_PIN_Z2_AXIS Z2_STEP_PIN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
#define STEPPER_MINIMUM_PULSE TMC2130_MINIMUM_PULSE
|
#define STEPPER_MINIMUM_PULSE TMC2130_MINIMUM_PULSE
|
||||||
|
|
@ -1078,17 +1071,9 @@ void st_init()
|
||||||
#endif
|
#endif
|
||||||
#if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
|
#if defined(Y_DIR_PIN) && Y_DIR_PIN > -1
|
||||||
SET_OUTPUT(Y_DIR_PIN);
|
SET_OUTPUT(Y_DIR_PIN);
|
||||||
|
|
||||||
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_DIR_PIN) && (Y2_DIR_PIN > -1)
|
|
||||||
SET_OUTPUT(Y2_DIR_PIN);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
|
#if defined(Z_DIR_PIN) && Z_DIR_PIN > -1
|
||||||
SET_OUTPUT(Z_DIR_PIN);
|
SET_OUTPUT(Z_DIR_PIN);
|
||||||
|
|
||||||
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_DIR_PIN) && (Z2_DIR_PIN > -1)
|
|
||||||
SET_OUTPUT(Z2_DIR_PIN);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(E0_DIR_PIN) && E0_DIR_PIN > -1
|
#if defined(E0_DIR_PIN) && E0_DIR_PIN > -1
|
||||||
SET_OUTPUT(E0_DIR_PIN);
|
SET_OUTPUT(E0_DIR_PIN);
|
||||||
|
|
@ -1107,20 +1092,10 @@ void st_init()
|
||||||
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
#if defined(Y_ENABLE_PIN) && Y_ENABLE_PIN > -1
|
||||||
SET_OUTPUT(Y_ENABLE_PIN);
|
SET_OUTPUT(Y_ENABLE_PIN);
|
||||||
if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
|
if(!Y_ENABLE_ON) WRITE(Y_ENABLE_PIN,HIGH);
|
||||||
|
|
||||||
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_ENABLE_PIN) && (Y2_ENABLE_PIN > -1)
|
|
||||||
SET_OUTPUT(Y2_ENABLE_PIN);
|
|
||||||
if(!Y_ENABLE_ON) WRITE(Y2_ENABLE_PIN,HIGH);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
#if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1
|
||||||
SET_OUTPUT(Z_ENABLE_PIN);
|
SET_OUTPUT(Z_ENABLE_PIN);
|
||||||
if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH);
|
if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH);
|
||||||
|
|
||||||
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_ENABLE_PIN) && (Z2_ENABLE_PIN > -1)
|
|
||||||
SET_OUTPUT(Z2_ENABLE_PIN);
|
|
||||||
if(!Z_ENABLE_ON) WRITE(Z2_ENABLE_PIN,HIGH);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
|
#if defined(E0_ENABLE_PIN) && (E0_ENABLE_PIN > -1)
|
||||||
SET_OUTPUT(E0_ENABLE_PIN);
|
SET_OUTPUT(E0_ENABLE_PIN);
|
||||||
|
|
@ -1200,19 +1175,11 @@ void st_init()
|
||||||
SET_OUTPUT(DEBUG_YSTEP_DUP_PIN);
|
SET_OUTPUT(DEBUG_YSTEP_DUP_PIN);
|
||||||
WRITE(DEBUG_YSTEP_DUP_PIN,INVERT_Y_STEP_PIN);
|
WRITE(DEBUG_YSTEP_DUP_PIN,INVERT_Y_STEP_PIN);
|
||||||
#endif //DEBUG_YSTEP_DUP_PIN
|
#endif //DEBUG_YSTEP_DUP_PIN
|
||||||
#if defined(Y_DUAL_STEPPER_DRIVERS) && defined(Y2_STEP_PIN) && (Y2_STEP_PIN > -1)
|
|
||||||
SET_OUTPUT(Y2_STEP_PIN);
|
|
||||||
WRITE(Y2_STEP_PIN,INVERT_Y_STEP_PIN);
|
|
||||||
#endif
|
|
||||||
disable_y();
|
disable_y();
|
||||||
#endif
|
#endif
|
||||||
#if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
|
#if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1)
|
||||||
SET_OUTPUT(Z_STEP_PIN);
|
SET_OUTPUT(Z_STEP_PIN);
|
||||||
WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
|
WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN);
|
||||||
#if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && (Z2_STEP_PIN > -1)
|
|
||||||
SET_OUTPUT(Z2_STEP_PIN);
|
|
||||||
WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN);
|
|
||||||
#endif
|
|
||||||
#ifdef PSU_Delta
|
#ifdef PSU_Delta
|
||||||
init_force_z();
|
init_force_z();
|
||||||
#endif // PSU_Delta
|
#endif // PSU_Delta
|
||||||
|
|
@ -1372,7 +1339,7 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
case X_AXIS:
|
case X_AXIS:
|
||||||
{
|
{
|
||||||
enable_x();
|
enable_x();
|
||||||
uint8_t old_x_dir_pin = READ(X_DIR_PIN); //if dualzstepper, both point to same direction.
|
uint8_t old_x_dir_pin = READ(X_DIR_PIN);
|
||||||
uint8_t new_x_dir_pin = (INVERT_X_DIR)^direction;
|
uint8_t new_x_dir_pin = (INVERT_X_DIR)^direction;
|
||||||
|
|
||||||
//setup new step
|
//setup new step
|
||||||
|
|
@ -1400,7 +1367,7 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
case Y_AXIS:
|
case Y_AXIS:
|
||||||
{
|
{
|
||||||
enable_y();
|
enable_y();
|
||||||
uint8_t old_y_dir_pin = READ(Y_DIR_PIN); //if dualzstepper, both point to same direction.
|
uint8_t old_y_dir_pin = READ(Y_DIR_PIN);
|
||||||
uint8_t new_y_dir_pin = (INVERT_Y_DIR)^direction;
|
uint8_t new_y_dir_pin = (INVERT_Y_DIR)^direction;
|
||||||
|
|
||||||
//setup new step
|
//setup new step
|
||||||
|
|
@ -1428,35 +1395,23 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
case Z_AXIS:
|
case Z_AXIS:
|
||||||
{
|
{
|
||||||
enable_z();
|
enable_z();
|
||||||
uint8_t old_z_dir_pin = READ(Z_DIR_PIN); //if dualzstepper, both point to same direction.
|
uint8_t old_z_dir_pin = READ(Z_DIR_PIN);
|
||||||
uint8_t new_z_dir_pin = (INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z;
|
uint8_t new_z_dir_pin = (INVERT_Z_DIR)^direction^BABYSTEP_INVERT_Z;
|
||||||
|
|
||||||
//setup new step
|
//setup new step
|
||||||
if (new_z_dir_pin != old_z_dir_pin) {
|
if (new_z_dir_pin != old_z_dir_pin) {
|
||||||
WRITE_NC(Z_DIR_PIN, new_z_dir_pin);
|
WRITE_NC(Z_DIR_PIN, new_z_dir_pin);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
|
||||||
WRITE_NC(Z2_DIR_PIN, new_z_dir_pin);
|
|
||||||
#endif
|
|
||||||
delayMicroseconds(STEPPER_SET_DIR_DELAY);
|
delayMicroseconds(STEPPER_SET_DIR_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
//perform step
|
//perform step
|
||||||
STEP_NC_HI(Z_AXIS);
|
STEP_NC_HI(Z_AXIS);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
|
||||||
STEP_NC_HI(Z2_AXIS);
|
|
||||||
#endif
|
|
||||||
STEPPER_MINIMUM_DELAY;
|
STEPPER_MINIMUM_DELAY;
|
||||||
STEP_NC_LO(Z_AXIS);
|
STEP_NC_LO(Z_AXIS);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
|
||||||
STEP_NC_LO(Z2_AXIS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//get old pin state back.
|
//get old pin state back.
|
||||||
if (new_z_dir_pin != old_z_dir_pin) {
|
if (new_z_dir_pin != old_z_dir_pin) {
|
||||||
WRITE_NC(Z_DIR_PIN, old_z_dir_pin);
|
WRITE_NC(Z_DIR_PIN, old_z_dir_pin);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
|
||||||
WRITE_NC(Z2_DIR_PIN, old_z_dir_pin);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
#include "fancheck.h"
|
#include "fancheck.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "lcd.h"
|
||||||
|
|
||||||
#include "SdFatUtil.h"
|
#include "SdFatUtil.h"
|
||||||
|
|
||||||
|
|
@ -1147,25 +1148,6 @@ FORCE_INLINE static void soft_pwm_core()
|
||||||
#endif
|
#endif
|
||||||
} else WRITE(HEATER_0_PIN,0);
|
} else WRITE(HEATER_0_PIN,0);
|
||||||
}
|
}
|
||||||
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
|
|
||||||
|
|
||||||
#if 0 // @@DR vypnuto pro hw pwm bedu
|
|
||||||
// tuhle prasarnu bude potreba poustet ve stanovenych intervalech, jinak nemam moc sanci zareagovat
|
|
||||||
// teoreticky by se tato cast uz vubec nemusela poustet
|
|
||||||
if ((pwm_count & ((1 << HEATER_BED_SOFT_PWM_BITS) - 1)) == 0)
|
|
||||||
{
|
|
||||||
soft_pwm_b = soft_pwm_bed >> (7 - HEATER_BED_SOFT_PWM_BITS);
|
|
||||||
# ifndef SYSTEM_TIMER_2
|
|
||||||
// tady budu krokovat pomalou frekvenci na automatu - tohle je rizeni spinani a rozepinani
|
|
||||||
// jako ridici frekvenci mam 2khz, jako vystupni frekvenci mam 30hz
|
|
||||||
// 2kHz jsou ovsem ve slysitelnem pasmu, mozna bude potreba jit s frekvenci nahoru (a tomu taky prizpusobit ostatni veci)
|
|
||||||
// Teoreticky bych mohl stahnout OCR0B citac na 6, cimz bych se dostal nekam ke 40khz a tady potom honit PWM rychleji nebo i pomaleji
|
|
||||||
// to nicemu nevadi. Soft PWM scale by se 20x zvetsilo (no dobre, 16x), cimz by se to posunulo k puvodnimu 30Hz PWM
|
|
||||||
//if(soft_pwm_b > 0) WRITE(HEATER_BED_PIN,1); else WRITE(HEATER_BED_PIN,0);
|
|
||||||
# endif //SYSTEM_TIMER_2
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FAN_SOFT_PWM
|
#ifdef FAN_SOFT_PWM
|
||||||
if ((pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1)) == 0)
|
if ((pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1)) == 0)
|
||||||
|
|
@ -1182,14 +1164,6 @@ FORCE_INLINE static void soft_pwm_core()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // @@DR
|
|
||||||
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
|
|
||||||
if (soft_pwm_b < (pwm_count & ((1 << HEATER_BED_SOFT_PWM_BITS) - 1))){
|
|
||||||
//WRITE(HEATER_BED_PIN,0);
|
|
||||||
}
|
|
||||||
//WRITE(HEATER_BED_PIN, pwm_count & 1 );
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifdef FAN_SOFT_PWM
|
#ifdef FAN_SOFT_PWM
|
||||||
if (soft_pwm_fan < (pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1))) WRITE(FAN_PIN,0);
|
if (soft_pwm_fan < (pwm_count & ((1 << FAN_SOFT_PWM_BITS) - 1))) WRITE(FAN_PIN,0);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
//uart2.c
|
|
||||||
#include "uart2.h"
|
|
||||||
#include <avr/io.h>
|
|
||||||
#include <avr/interrupt.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "rbuf.h"
|
|
||||||
#include "macros.h"
|
|
||||||
|
|
||||||
#define UART2_BAUD 115200
|
|
||||||
#define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*8.0)-1.0+0.5)
|
|
||||||
#define uart2_rxcomplete (UCSR2A & (1 << RXC2))
|
|
||||||
#define uart2_txcomplete (UCSR2A & (1 << TXC2))
|
|
||||||
#define uart2_txready (UCSR2A & (1 << UDRE2))
|
|
||||||
|
|
||||||
uint8_t uart2_ibuf[20] = {0, 0};
|
|
||||||
|
|
||||||
FILE _uart2io = {0};
|
|
||||||
|
|
||||||
|
|
||||||
int uart2_putchar(char c, _UNUSED FILE *stream)
|
|
||||||
{
|
|
||||||
while (!uart2_txready);
|
|
||||||
UDR2 = c; // transmit byte
|
|
||||||
// while (!uart2_txcomplete); // wait until byte sent
|
|
||||||
// UCSR2A |= (1 << TXC2); // delete TXCflag
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int uart2_getchar(_UNUSED FILE *stream)
|
|
||||||
{
|
|
||||||
if (rbuf_empty(uart2_ibuf)) return -1;
|
|
||||||
return rbuf_get(uart2_ibuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
//uart init (io + FILE stream)
|
|
||||||
void uart2_init(uint32_t baudRate)
|
|
||||||
{
|
|
||||||
DDRH &= ~0x01;
|
|
||||||
PORTH |= 0x01;
|
|
||||||
rbuf_ini(uart2_ibuf, sizeof(uart2_ibuf) - 4);
|
|
||||||
UCSR2A |= (1 << U2X2); // baudrate multiplier
|
|
||||||
UBRR2L = UART_BAUD_SELECT(baudRate, F_CPU); // select baudrate
|
|
||||||
UCSR2B = (1 << RXEN2) | (1 << TXEN2); // enable receiver and transmitter
|
|
||||||
UCSR2B |= (1 << RXCIE2); // enable rx interrupt
|
|
||||||
fdev_setup_stream(uart2io, uart2_putchar, uart2_getchar, _FDEV_SETUP_WRITE | _FDEV_SETUP_READ); //setup uart2 i/o stream
|
|
||||||
}
|
|
||||||
|
|
||||||
//returns 1 if chars in input buffer match to str
|
|
||||||
//returns -1 if chars does not match and 0 for empty buffer
|
|
||||||
int8_t uart2_rx_str_P(const char* str)
|
|
||||||
{
|
|
||||||
uint8_t r = rbuf_r(uart2_ibuf); //get read index
|
|
||||||
uint8_t w = rbuf_w(uart2_ibuf); //get write index
|
|
||||||
// printf_P(PSTR("uart2_rx_str_P r=%d w=%d\n"), r, w);
|
|
||||||
uint8_t e = rbuf_l(uart2_ibuf) - 1; //get end index
|
|
||||||
uint8_t len = strlen_P(str); //get string length
|
|
||||||
str += len; //last char will be compared first
|
|
||||||
// printf_P(PSTR(" len=%d\n"), len);
|
|
||||||
while (len--) //loop over all chars
|
|
||||||
{
|
|
||||||
if (w == r) return 0; //empty buffer - return 0
|
|
||||||
if ((--w) == 255) w = e; //decrement index
|
|
||||||
char c0 = pgm_read_byte(--str); //read char from str
|
|
||||||
char c1 = uart2_ibuf[4 + w]; //read char from input buffer
|
|
||||||
// printf_P(PSTR(" uart2_rx_str_P w=%d l=%d c0=%02x c1=%02x\n"), w, len, c0, c1);
|
|
||||||
if (c0 == c1) continue; //if match, continue with next char
|
|
||||||
if ((c0 == '\r') && (c1 == '\n')) //match cr as lf
|
|
||||||
continue;
|
|
||||||
if ((c0 == '\n') && (c1 == '\r')) //match lf as cr
|
|
||||||
continue;
|
|
||||||
return -1; //no match - return -1
|
|
||||||
}
|
|
||||||
return 1; //all characters match - return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
ISR(USART2_RX_vect)
|
|
||||||
{
|
|
||||||
//printf_P(PSTR("USART2_RX_vect \n") );
|
|
||||||
if (rbuf_put(uart2_ibuf, UDR2) < 0) // put received byte to buffer
|
|
||||||
{ //rx buffer full
|
|
||||||
//uart2_rx_clr(); //for sure, clear input buffer
|
|
||||||
puts_P(PSTR("USART2 rx Full!!!"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
//uart2.c
|
||||||
|
#include "uart2.h"
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#include "rbuf.h"
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
|
#define UART_BAUD_SELECT(baudRate,xtalCpu) (((float)(xtalCpu))/(((float)(baudRate))*8.0)-1.0+0.5)
|
||||||
|
#define uart2_txready (UCSR2A & (1 << UDRE2))
|
||||||
|
|
||||||
|
uint8_t uart2_ibuf[20] = {0, 0};
|
||||||
|
FILE _uart2io;
|
||||||
|
|
||||||
|
static int uart2_putchar(char c, _UNUSED FILE *stream)
|
||||||
|
{
|
||||||
|
while (!uart2_txready);
|
||||||
|
|
||||||
|
UDR2 = c; // transmit byte
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int uart2_getchar(_UNUSED FILE *stream)
|
||||||
|
{
|
||||||
|
if (rbuf_empty(uart2_ibuf)) return -1;
|
||||||
|
return rbuf_get(uart2_ibuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
//uart init (io + FILE stream)
|
||||||
|
void uart2_init(uint32_t baudRate)
|
||||||
|
{
|
||||||
|
DDRH &= ~0x01;
|
||||||
|
PORTH |= 0x01;
|
||||||
|
rbuf_ini(uart2_ibuf, sizeof(uart2_ibuf) - 4);
|
||||||
|
UCSR2A |= (1 << U2X2); // baudrate multiplier
|
||||||
|
UBRR2L = UART_BAUD_SELECT(baudRate, F_CPU); // select baudrate
|
||||||
|
UCSR2B = (1 << RXEN2) | (1 << TXEN2); // enable receiver and transmitter
|
||||||
|
UCSR2B |= (1 << RXCIE2); // enable rx interrupt
|
||||||
|
fdev_setup_stream(uart2io, uart2_putchar, uart2_getchar, _FDEV_SETUP_WRITE | _FDEV_SETUP_READ); //setup uart2 i/o stream
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(USART2_RX_vect)
|
||||||
|
{
|
||||||
|
if (rbuf_put(uart2_ibuf, UDR2) < 0) // put received byte to buffer
|
||||||
|
{ //rx buffer full
|
||||||
|
puts_P(PSTR("USART2 rx Full!!!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -5,22 +5,9 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif //defined(__cplusplus)
|
|
||||||
|
|
||||||
|
|
||||||
extern FILE _uart2io;
|
extern FILE _uart2io;
|
||||||
#define uart2io (&_uart2io)
|
#define uart2io (&_uart2io)
|
||||||
|
|
||||||
|
void uart2_init(uint32_t baudRate);
|
||||||
|
|
||||||
extern void uart2_init(uint32_t baudRate);
|
|
||||||
|
|
||||||
extern int8_t uart2_rx_str_P(const char* str);
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
}
|
|
||||||
#endif //defined(__cplusplus)
|
|
||||||
#endif //_UART2_H
|
#endif //_UART2_H
|
||||||
|
|
|
||||||
|
|
@ -542,7 +542,11 @@ void lcdui_print_status_line(void) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((IS_SD_PRINTING) &&
|
else if (((IS_SD_PRINTING)
|
||||||
|
#ifdef SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|| (GetPrinterState() == PrinterState::SDPrintingFinished)
|
||||||
|
#endif //SHOW_FILENAME_AFTER_FINISH
|
||||||
|
) &&
|
||||||
(custom_message_type == CustomMsg::Status) &&
|
(custom_message_type == CustomMsg::Status) &&
|
||||||
(lcd_status_message_level <= LCD_STATUS_INFO) &&
|
(lcd_status_message_level <= LCD_STATUS_INFO) &&
|
||||||
lcd_status_message_timeout.expired_cont(LCD_STATUS_INFO_TIMEOUT))
|
lcd_status_message_timeout.expired_cont(LCD_STATUS_INFO_TIMEOUT))
|
||||||
|
|
@ -857,19 +861,13 @@ void lcd_commands()
|
||||||
lay1cal_meander(layer_height, extrusion_width);
|
lay1cal_meander(layer_height, extrusion_width);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
lay1cal_square(0, layer_height, extrusion_width);
|
|
||||||
break;
|
|
||||||
case 5:
|
case 5:
|
||||||
lay1cal_square(4, layer_height, extrusion_width);
|
|
||||||
break;
|
|
||||||
case 4:
|
case 4:
|
||||||
lay1cal_square(8, layer_height, extrusion_width);
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
lay1cal_square(12, layer_height, extrusion_width);
|
lay1cal_square(layer_height, extrusion_width);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
lay1cal_finish(MMU2::mmu2.Enabled());
|
lay1cal_finish();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
lcd_setstatuspgm(MSG_WELCOME);
|
lcd_setstatuspgm(MSG_WELCOME);
|
||||||
|
|
@ -972,19 +970,19 @@ void lcd_commands()
|
||||||
{
|
{
|
||||||
if (!blocks_queued() && cmd_buffer_empty() && !saved_printing)
|
if (!blocks_queued() && cmd_buffer_empty() && !saved_printing)
|
||||||
{
|
{
|
||||||
|
#ifndef QUICK_NOZZLE_CHANGE //thermal model can be ignored if a quickchange nozzle is in use, no heatup necessary
|
||||||
#ifdef THERMAL_MODEL
|
#ifdef THERMAL_MODEL
|
||||||
static bool was_enabled;
|
static bool was_enabled;
|
||||||
#endif //THERMAL_MODEL
|
#endif //THERMAL_MODEL
|
||||||
|
#endif //QUICK_NOZZLE_CHANGE
|
||||||
switch(lcd_commands_step)
|
switch(lcd_commands_step)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
lcd_commands_step = 3;
|
lcd_commands_step = 3;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
lcd_update_enabled = false; //hack to avoid lcd_update recursion.
|
#ifndef QUICK_NOZZLE_CHANGE
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_NOZZLE_CNG_READ_HELP));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_NOZZLE_CNG_READ_HELP));
|
||||||
lcd_update_enabled = true;
|
|
||||||
lcd_draw_update = 2; //force lcd clear and update after the stack unwinds.
|
|
||||||
enquecommand_P(G28W);
|
enquecommand_P(G28W);
|
||||||
enquecommand_P(PSTR("G1 X125 Z200 F1000"));
|
enquecommand_P(PSTR("G1 X125 Z200 F1000"));
|
||||||
enquecommand_P(PSTR("M109 S280"));
|
enquecommand_P(PSTR("M109 S280"));
|
||||||
|
|
@ -992,30 +990,40 @@ void lcd_commands()
|
||||||
was_enabled = thermal_model_enabled();
|
was_enabled = thermal_model_enabled();
|
||||||
thermal_model_set_enabled(false);
|
thermal_model_set_enabled(false);
|
||||||
#endif //THERMAL_MODEL
|
#endif //THERMAL_MODEL
|
||||||
|
#else //nozzle change without heating
|
||||||
|
while((int)degHotend(active_extruder)>40) { //check temp
|
||||||
|
fanSpeed = 255; //turn on fan
|
||||||
|
disable_heater();
|
||||||
|
uint8_t choice = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_COOLDOWN), true, LCD_LEFT_BUTTON_CHOICE);
|
||||||
|
if (choice == LCD_MIDDLE_BUTTON_CHOICE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enquecommand_P(G28W); //home
|
||||||
|
enquecommand_P(PSTR("G1 X125 Z200 F1000")); //move to top center
|
||||||
|
#endif //QUICK_NOZZLE_CHANGE
|
||||||
lcd_commands_step = 2;
|
lcd_commands_step = 2;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//|0123456789012456789|
|
|
||||||
//|Hotend at 280C!
|
|
||||||
//|Nozzle changed and
|
|
||||||
//|tightend to specs?
|
|
||||||
//| Yes No
|
|
||||||
enquecommand_P(PSTR("M84 XY"));
|
enquecommand_P(PSTR("M84 XY"));
|
||||||
lcd_update_enabled = false; //hack to avoid lcd_update recursion.
|
if (lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_CHANGED), false) == LCD_LEFT_BUTTON_CHOICE) {
|
||||||
if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_NOZZLE_CNG_CHANGED), false) == LCD_LEFT_BUTTON_CHOICE) {
|
#ifndef QUICK_NOZZLE_CHANGE
|
||||||
setTargetHotend(0);
|
setTargetHotend(0);
|
||||||
#ifdef THERMAL_MODEL
|
#ifdef THERMAL_MODEL
|
||||||
thermal_model_set_enabled(was_enabled);
|
thermal_model_set_enabled(was_enabled);
|
||||||
#endif //THERMAL_MODEL
|
#endif //THERMAL_MODEL
|
||||||
|
#else
|
||||||
|
fanSpeed = 0; //turn off fan
|
||||||
|
#endif //QUICK_NOZZLE_CHANGE
|
||||||
lcd_commands_step = 1;
|
lcd_commands_step = 1;
|
||||||
}
|
}
|
||||||
lcd_update_enabled = true;
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
lcd_setstatuspgm(MSG_WELCOME);
|
|
||||||
lcd_commands_step = 0;
|
lcd_commands_step = 0;
|
||||||
lcd_commands_type = LcdCommands::Idle;
|
lcd_commands_type = LcdCommands::Idle;
|
||||||
SetPrinterState(PrinterState::Idle);
|
SetPrinterState(PrinterState::Idle);
|
||||||
|
menu_goto(lcd_hw_setup_menu, 2, true);
|
||||||
|
menu_depth = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1793,13 +1801,12 @@ void lcd_print_target_temps_first_line() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mFilamentPrompt()
|
static void mFilamentPrompt() {
|
||||||
{
|
lcd_timeoutToStatus.stop();
|
||||||
lcd_print_target_temps_first_line();
|
lcd_print_target_temps_first_line();
|
||||||
lcd_puts_at_P(0,1, _T(MSG_PRESS_KNOB));
|
lcd_puts_at_P(0,1, _T(MSG_PRESS_KNOB));
|
||||||
lcd_set_cursor(0,2);
|
lcd_set_cursor(0,2);
|
||||||
switch(eFilamentAction)
|
switch(eFilamentAction) {
|
||||||
{
|
|
||||||
case FilamentAction::Load:
|
case FilamentAction::Load:
|
||||||
case FilamentAction::AutoLoad:
|
case FilamentAction::AutoLoad:
|
||||||
case FilamentAction::MmuLoad:
|
case FilamentAction::MmuLoad:
|
||||||
|
|
@ -1817,6 +1824,7 @@ switch(eFilamentAction)
|
||||||
case FilamentAction::Lay1Cal:
|
case FilamentAction::Lay1Cal:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lcd_clicked()
|
if(lcd_clicked()
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
/// @todo leptun - add this as a specific retest item
|
/// @todo leptun - add this as a specific retest item
|
||||||
|
|
@ -1824,12 +1832,11 @@ switch(eFilamentAction)
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_SENSOR
|
||||||
) {
|
) {
|
||||||
menu_back(bFilamentPreheatState ? 2 : 3);
|
menu_back(bFilamentPreheatState ? 2 : 3);
|
||||||
switch(eFilamentAction)
|
switch(eFilamentAction) {
|
||||||
{
|
|
||||||
case FilamentAction::AutoLoad:
|
case FilamentAction::AutoLoad:
|
||||||
// loading no longer cancellable
|
// loading no longer cancellable
|
||||||
eFilamentAction = FilamentAction::Load;
|
eFilamentAction = FilamentAction::Load;
|
||||||
// FALLTHRU
|
[[fallthrough]];
|
||||||
case FilamentAction::Load:
|
case FilamentAction::Load:
|
||||||
enquecommand_P(MSG_M701); // load filament
|
enquecommand_P(MSG_M701); // load filament
|
||||||
break;
|
break;
|
||||||
|
|
@ -1968,14 +1975,14 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
|
||||||
// modified elsewhere and needs to be redrawn in full.
|
// modified elsewhere and needs to be redrawn in full.
|
||||||
|
|
||||||
// reset bFilamentWaitingFlag immediately to avoid re-entry from raise_z_above()!
|
// reset bFilamentWaitingFlag immediately to avoid re-entry from raise_z_above()!
|
||||||
bool once = !bFilamentWaitingFlag;
|
|
||||||
bFilamentWaitingFlag = true;
|
bFilamentWaitingFlag = true;
|
||||||
|
|
||||||
// also force-enable lcd_draw_update (might be 0 when called from outside a menu)
|
// also force-enable lcd_draw_update (might be 0 when called from outside a menu)
|
||||||
lcd_draw_update = 1;
|
lcd_draw_update = 1;
|
||||||
|
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
lcd_puts_at_P(0, 3, _T(MSG_CANCEL));
|
lcd_puts_at_P(0,3, PSTR(">"));
|
||||||
|
lcd_puts_at_P(1, 3, _T(MSG_CANCEL));
|
||||||
|
|
||||||
lcd_set_cursor(0, 1);
|
lcd_set_cursor(0, 1);
|
||||||
switch (eFilamentAction)
|
switch (eFilamentAction)
|
||||||
|
|
@ -1985,12 +1992,10 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
|
||||||
case FilamentAction::MmuLoad:
|
case FilamentAction::MmuLoad:
|
||||||
case FilamentAction::MmuLoadingTest:
|
case FilamentAction::MmuLoadingTest:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_LOAD));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_LOAD));
|
||||||
if (once) raise_z_above(MIN_Z_FOR_LOAD);
|
|
||||||
break;
|
break;
|
||||||
case FilamentAction::UnLoad:
|
case FilamentAction::UnLoad:
|
||||||
case FilamentAction::MmuUnLoad:
|
case FilamentAction::MmuUnLoad:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_UNLOAD));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_UNLOAD));
|
||||||
if (once) raise_z_above(MIN_Z_FOR_UNLOAD);
|
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuEject:
|
case FilamentAction::MmuEject:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_EJECT));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_EJECT));
|
||||||
|
|
@ -2135,16 +2140,21 @@ static void lcd_unLoadFilament()
|
||||||
preheat_or_continue(FilamentAction::UnLoad);
|
preheat_or_continue(FilamentAction::UnLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_wait_interact() {
|
void lcd_wait_interact(const char* filament_name) {
|
||||||
|
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
|
|
||||||
lcd_puts_at_P(0, 1, _T(MSG_INSERT_FILAMENT));
|
lcd_puts_at_P(0, 0, _T(MSG_INSERT_FILAMENT));
|
||||||
|
lcd_set_cursor(0, 1);
|
||||||
|
if (filament_name[0]) {
|
||||||
|
lcd_print(filament_name);
|
||||||
|
lcd_set_cursor(0, 2);
|
||||||
|
}
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
if (!fsensor.getAutoLoadEnabled())
|
if (!fsensor.getAutoLoadEnabled())
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_SENSOR
|
||||||
{
|
{
|
||||||
lcd_puts_at_P(0, 2, _T(MSG_PRESS));
|
lcd_puts_P(_T(MSG_PRESS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2181,12 +2191,15 @@ void lcd_loading_color() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void lcd_loading_filament() {
|
void lcd_loading_filament(const char* filament_name) {
|
||||||
|
|
||||||
|
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
|
|
||||||
lcd_puts_at_P(0, 0, _T(MSG_LOADING_FILAMENT));
|
lcd_puts_at_P(0, 0, _T(MSG_LOADING_FILAMENT));
|
||||||
|
if (filament_name[0]) {
|
||||||
|
lcd_set_cursor(0, 1);
|
||||||
|
lcd_print(filament_name);
|
||||||
|
}
|
||||||
lcd_puts_at_P(0, 2, _T(MSG_PLEASE_WAIT));
|
lcd_puts_at_P(0, 2, _T(MSG_PLEASE_WAIT));
|
||||||
uint16_t slow_seq_time = (FILAMENTCHANGE_FINALFEED * 1000ul) / FILAMENTCHANGE_EFEED_FINAL;
|
uint16_t slow_seq_time = (FILAMENTCHANGE_FINALFEED * 1000ul) / FILAMENTCHANGE_EFEED_FINAL;
|
||||||
uint16_t fast_seq_time = (FILAMENTCHANGE_FIRSTFEED * 1000ul) / FILAMENTCHANGE_EFEED_FIRST;
|
uint16_t fast_seq_time = (FILAMENTCHANGE_FIRSTFEED * 1000ul) / FILAMENTCHANGE_EFEED_FIRST;
|
||||||
|
|
@ -2258,21 +2271,38 @@ void show_preheat_nozzle_warning()
|
||||||
|
|
||||||
void lcd_load_filament_color_check()
|
void lcd_load_filament_color_check()
|
||||||
{
|
{
|
||||||
uint8_t clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE);
|
// The total length of the individual messages MSG_YES c=4, MSG_NO c=4 and MSG_EJECT c=9 with the selectors and spaces between
|
||||||
|
// exceeds the LCD width.
|
||||||
|
// 01234567890123456789
|
||||||
|
// >yyyy >nnnn >eeeeeeee
|
||||||
|
// As long the translations of MSG_YES, MSG_NO and MSG_EJECT combined length do not exceed 15 chars, we don't have to shorten
|
||||||
|
// the MSG_EJECT message/translation. We can set the second_col value to the length of the first choice + the selector and space.
|
||||||
|
// Examples:
|
||||||
|
// German
|
||||||
|
// 01234567890123456789
|
||||||
|
// >Ja >Nein >Auswerfen
|
||||||
|
// Hungarian
|
||||||
|
// 01234567890123456789
|
||||||
|
// >Igen >Nem >Kiadás
|
||||||
|
|
||||||
|
uint8_t clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), strlen_P(_T(MSG_YES))+2);
|
||||||
while (clean == LCD_MIDDLE_BUTTON_CHOICE) {
|
while (clean == LCD_MIDDLE_BUTTON_CHOICE) {
|
||||||
load_filament_final_feed();
|
load_filament_final_feed();
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE);
|
clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), strlen_P(_T(MSG_YES))+2);
|
||||||
|
}
|
||||||
|
if (clean == LCD_RIGHT_BUTTON_CHOICE) {
|
||||||
|
unload_filament(FILAMENTCHANGE_FINALRETRACT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FILAMENT_SENSOR
|
#if defined(FILAMENT_SENSOR) && !defined(REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY)
|
||||||
static void lcd_menu_AutoLoadFilament()
|
static void lcd_menu_AutoLoadFilament()
|
||||||
{
|
{
|
||||||
lcd_display_message_fullscreen_nonBlocking_P(_T(MSG_AUTOLOADING_ENABLED));
|
lcd_display_message_fullscreen_nonBlocking_P(_T(MSG_AUTOLOADING_ENABLED));
|
||||||
menu_back_if_clicked();
|
menu_back_if_clicked();
|
||||||
}
|
}
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_SENSOR && REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
static void preheat_or_continue(FilamentAction action) {
|
static void preheat_or_continue(FilamentAction action) {
|
||||||
|
|
||||||
|
|
@ -2350,7 +2380,7 @@ void lcd_menu_statistics()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32_t _filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED); // in meters
|
uint32_t _filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED); // in centimeters
|
||||||
uint32_t _time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME); // in minutes
|
uint32_t _time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME); // in minutes
|
||||||
uint8_t _hours, _minutes;
|
uint8_t _hours, _minutes;
|
||||||
uint32_t _days;
|
uint32_t _days;
|
||||||
|
|
@ -2845,7 +2875,7 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Let the user confirm, that the Z carriage is at the top end stoppers.
|
// Let the user confirm, that the Z carriage is at the top end stoppers.
|
||||||
uint8_t result = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_CONFIRM_CARRIAGE_AT_THE_TOP), false);
|
uint8_t result = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_CONFIRM_CARRIAGE_AT_THE_TOP), false);
|
||||||
if (result == LCD_BUTTON_TIMEOUT)
|
if (result == LCD_BUTTON_TIMEOUT)
|
||||||
goto canceled;
|
goto canceled;
|
||||||
else if (result == LCD_LEFT_BUTTON_CHOICE)
|
else if (result == LCD_LEFT_BUTTON_CHOICE)
|
||||||
|
|
@ -3028,6 +3058,17 @@ uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool all
|
||||||
{
|
{
|
||||||
return lcd_show_multiscreen_message_with_choices_and_wait_P(msg, allow_timeouting, default_selection, _T(MSG_YES), _T(MSG_NO), nullptr, 10);
|
return lcd_show_multiscreen_message_with_choices_and_wait_P(msg, allow_timeouting, default_selection, _T(MSG_YES), _T(MSG_NO), nullptr, 10);
|
||||||
}
|
}
|
||||||
|
//! @brief Show multiple screen message with yes and no possible choices and wait with possible timeout
|
||||||
|
//! @param msg Message to show. If NULL, do not clear the screen and handle choice selection only.
|
||||||
|
//! @param allow_timeouting if true, allows time outing of the screen
|
||||||
|
//! @param default_selection if 0, 'Yes' choice is selected by default, otherwise 'No' choice is preselected
|
||||||
|
//! @retval 0 cont choice selected by user
|
||||||
|
//! @retval 1 cancel choice selected by user
|
||||||
|
//! @retval 0xFF button timeout (only possible if allow_timeouting is true)
|
||||||
|
uint8_t lcd_show_multiscreen_message_cont_cancel_and_wait_P(const char *msg, bool allow_timeouting, uint8_t default_selection) //currently just max. n*4 + 3 lines supported (set in language header files)
|
||||||
|
{
|
||||||
|
return lcd_show_multiscreen_message_with_choices_and_wait_P(msg, allow_timeouting, default_selection, _T(MSG_CONTINUE_SHORT), _T(MSG_CANCEL), nullptr, 10);
|
||||||
|
}
|
||||||
//! @brief Show a two-choice prompt on the last line of the LCD
|
//! @brief Show a two-choice prompt on the last line of the LCD
|
||||||
//! @param selected Show first choice as selected if true, the second otherwise
|
//! @param selected Show first choice as selected if true, the second otherwise
|
||||||
//! @param first_choice text caption of first possible choice
|
//! @param first_choice text caption of first possible choice
|
||||||
|
|
@ -3041,7 +3082,13 @@ void lcd_show_choices_prompt_P(uint8_t selected, const char *first_choice, const
|
||||||
lcd_putc_at(second_col, 3, selected == LCD_MIDDLE_BUTTON_CHOICE ? '>': ' ');
|
lcd_putc_at(second_col, 3, selected == LCD_MIDDLE_BUTTON_CHOICE ? '>': ' ');
|
||||||
lcd_puts_P(second_choice);
|
lcd_puts_P(second_choice);
|
||||||
if (third_choice) {
|
if (third_choice) {
|
||||||
lcd_putc_at(18, 3, selected == LCD_RIGHT_BUTTON_CHOICE ? '>': ' ');
|
////get size of third_choice, offset to the left. Make sure it doesn't overlap second_choice.
|
||||||
|
size_t third_choice_len = strlen_P(third_choice);
|
||||||
|
uint8_t second_col_end = second_col + strlen_P(second_choice) + 2;
|
||||||
|
uint8_t third_col;
|
||||||
|
if (uint8_t pos = 19 - third_choice_len; pos > second_col_end) {third_col = pos;} else {third_col = second_col_end;}
|
||||||
|
if (third_col > 18) {third_col = 18;} //backwards compatability - make sure at least one character of the third selection is shown
|
||||||
|
lcd_putc_at(third_col, 3, selected == LCD_RIGHT_BUTTON_CHOICE ? '>': ' ');
|
||||||
lcd_puts_P(third_choice);
|
lcd_puts_P(third_choice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3147,19 +3194,6 @@ uint8_t lcd_show_yes_no_and_wait(bool allow_timeouting, uint8_t default_selectio
|
||||||
return lcd_show_multiscreen_message_yes_no_and_wait_P(NULL, allow_timeouting, default_selection);
|
return lcd_show_multiscreen_message_yes_no_and_wait_P(NULL, allow_timeouting, default_selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Show single screen message with yes and no possible choices and wait with possible timeout
|
|
||||||
//! @param msg Message to show. If NULL, do not clear the screen and handle choice selection only.
|
|
||||||
//! @param allow_timeouting if true, allows time outing of the screen
|
|
||||||
//! @param default_selection if 0, 'Yes' choice is selected by default, otherwise 'No' choice is preselected
|
|
||||||
//! @retval 0 yes choice selected by user
|
|
||||||
//! @retval 1 no choice selected by user
|
|
||||||
//! @retval 0xFF button timeout (only possible if allow_timeouting is true)
|
|
||||||
//! @relates lcd_show_yes_no_and_wait
|
|
||||||
uint8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting, uint8_t default_selection)
|
|
||||||
{
|
|
||||||
return lcd_show_multiscreen_message_yes_no_and_wait_P(msg, allow_timeouting, default_selection);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask)
|
void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask)
|
||||||
{
|
{
|
||||||
const char *msg = NULL;
|
const char *msg = NULL;
|
||||||
|
|
@ -3447,7 +3481,7 @@ static void menu_setlang(uint8_t lang)
|
||||||
{
|
{
|
||||||
if (!lang_select(lang))
|
if (!lang_select(lang))
|
||||||
{
|
{
|
||||||
if (lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_COPY_SEL_LANG), false, LCD_LEFT_BUTTON_CHOICE) == LCD_LEFT_BUTTON_CHOICE)
|
if (lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_COPY_SEL_LANG), false, LCD_LEFT_BUTTON_CHOICE) == LCD_LEFT_BUTTON_CHOICE)
|
||||||
lang_boot_update_start(lang);
|
lang_boot_update_start(lang);
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
menu_goto(lcd_language_menu, 0, true, true);
|
menu_goto(lcd_language_menu, 0, true, true);
|
||||||
|
|
@ -3610,7 +3644,7 @@ void lcd_v2_calibration() {
|
||||||
if (MMU2::mmu2.Enabled()) {
|
if (MMU2::mmu2.Enabled()) {
|
||||||
const uint8_t filament = choose_menu_P(
|
const uint8_t filament = choose_menu_P(
|
||||||
_T(MSG_SELECT_FILAMENT),
|
_T(MSG_SELECT_FILAMENT),
|
||||||
_T(MSG_FILAMENT),(_T(MSG_CANCEL)+1)); //Hack to reuse MSG but strip 1st char off
|
MSG_FILAMENT,_T(MSG_CANCEL));
|
||||||
if (filament < MMU_FILAMENT_COUNT) {
|
if (filament < MMU_FILAMENT_COUNT) {
|
||||||
lay1cal_filament = filament;
|
lay1cal_filament = filament;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3625,7 +3659,7 @@ void lcd_v2_calibration() {
|
||||||
if (fsensor.isReady()) {
|
if (fsensor.isReady()) {
|
||||||
loaded = fsensor.getFilamentPresent();
|
loaded = fsensor.getFilamentPresent();
|
||||||
} else {
|
} else {
|
||||||
loaded = !lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, LCD_MIDDLE_BUTTON_CHOICE);
|
loaded = !lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, LCD_MIDDLE_BUTTON_CHOICE);
|
||||||
lcd_update_enabled = true;
|
lcd_update_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3653,7 +3687,7 @@ void lcd_wizard() {
|
||||||
bool result = true;
|
bool result = true;
|
||||||
if (calibration_status_get(CALIBRATION_WIZARD_STEPS)) {
|
if (calibration_status_get(CALIBRATION_WIZARD_STEPS)) {
|
||||||
// calibration already performed: ask before clearing the previous status
|
// calibration already performed: ask before clearing the previous status
|
||||||
result = !lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_WIZARD_RERUN), false);
|
result = !lcd_show_multiscreen_message_cont_cancel_and_wait_P(_T(MSG_WIZARD_RERUN), false);
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
calibration_status_clear(CALIBRATION_WIZARD_STEPS);
|
calibration_status_clear(CALIBRATION_WIZARD_STEPS);
|
||||||
|
|
@ -3738,6 +3772,22 @@ static void wizard_lay1cal_message(bool cold)
|
||||||
_T(MSG_WIZARD_V2_CAL_2));
|
_T(MSG_WIZARD_V2_CAL_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lcd_z_calibration_prompt(bool allowTimeouting) {
|
||||||
|
uint8_t result = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_Z_CALIBRATION_PROMPT), allowTimeouting, 0);
|
||||||
|
if (result == LCD_LEFT_BUTTON_CHOICE) {
|
||||||
|
lcd_mesh_calibration_z();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void prompt_steel_sheet_on_bed(bool wantedState) {
|
||||||
|
#ifdef STEEL_SHEET
|
||||||
|
bool sheetIsOnBed = !lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_STEEL_SHEET_CHECK), false, !wantedState);
|
||||||
|
if (sheetIsOnBed != wantedState) {
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(_T(wantedState ? MSG_PLACE_STEEL_SHEET : MSG_REMOVE_STEEL_SHEET));
|
||||||
|
}
|
||||||
|
#endif //STEEL_SHEET
|
||||||
|
}
|
||||||
|
|
||||||
//! @brief Printer first run wizard (Selftest and calibration)
|
//! @brief Printer first run wizard (Selftest and calibration)
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
|
|
@ -3855,16 +3905,13 @@ void lcd_wizard(WizState state)
|
||||||
case S::Z:
|
case S::Z:
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_REMOVE_SHIPPING_HELPERS));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_REMOVE_SHIPPING_HELPERS));
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_REMOVE_TEST_PRINT));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_REMOVE_TEST_PRINT));
|
||||||
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_STEEL_SHEET_CHECK), false);
|
|
||||||
if (wizard_event == LCD_MIDDLE_BUTTON_CHOICE) {
|
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PLACE_STEEL_SHEET));
|
|
||||||
}
|
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_WIZARD_Z_CAL));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_WIZARD_Z_CAL));
|
||||||
wizard_event = gcode_M45(true, 0);
|
wizard_event = gcode_M45(true, 0);
|
||||||
if (!wizard_event) {
|
if (!wizard_event) {
|
||||||
state = S::Failed;
|
state = S::Failed;
|
||||||
} else {
|
} else {
|
||||||
raise_z_above(MIN_Z_FOR_SWAP);
|
raise_z_above(MIN_Z_FOR_SWAP);
|
||||||
|
if(!MMU2::mmu2.Enabled()) {
|
||||||
//current filament needs to be unloaded and then new filament should be loaded
|
//current filament needs to be unloaded and then new filament should be loaded
|
||||||
//start to preheat nozzle for unloading remaining PLA filament
|
//start to preheat nozzle for unloading remaining PLA filament
|
||||||
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP);
|
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP);
|
||||||
|
|
@ -3873,6 +3920,7 @@ void lcd_wizard(WizState state)
|
||||||
unload_filament(FILAMENTCHANGE_FINALRETRACT); // unload current filament
|
unload_filament(FILAMENTCHANGE_FINALRETRACT); // unload current filament
|
||||||
lcd_wizard_load(); // load filament
|
lcd_wizard_load(); // load filament
|
||||||
setTargetHotend(0); //we are finished, cooldown nozzle
|
setTargetHotend(0); //we are finished, cooldown nozzle
|
||||||
|
}
|
||||||
state = S::Restore;
|
state = S::Restore;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -3887,7 +3935,7 @@ void lcd_wizard(WizState state)
|
||||||
//start to preheat nozzle and bed to save some time later
|
//start to preheat nozzle and bed to save some time later
|
||||||
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP);
|
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP);
|
||||||
setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
||||||
wizard_event = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, LCD_MIDDLE_BUTTON_CHOICE);
|
wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_LOADED), false, LCD_MIDDLE_BUTTON_CHOICE);
|
||||||
if (wizard_event == LCD_LEFT_BUTTON_CHOICE) {
|
if (wizard_event == LCD_LEFT_BUTTON_CHOICE) {
|
||||||
state = S::Lay1CalCold;
|
state = S::Lay1CalCold;
|
||||||
} else { // MIDDLE_BUTTON_CHOICE
|
} else { // MIDDLE_BUTTON_CHOICE
|
||||||
|
|
@ -4202,45 +4250,6 @@ do\
|
||||||
}\
|
}\
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
static void lcd_check_mode_set(void)
|
|
||||||
{
|
|
||||||
switch(oCheckMode)
|
|
||||||
{
|
|
||||||
case ClCheckMode::_None:
|
|
||||||
oCheckMode=ClCheckMode::_Warn;
|
|
||||||
break;
|
|
||||||
case ClCheckMode::_Warn:
|
|
||||||
oCheckMode=ClCheckMode::_Strict;
|
|
||||||
break;
|
|
||||||
case ClCheckMode::_Strict:
|
|
||||||
oCheckMode=ClCheckMode::_None;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
oCheckMode=ClCheckMode::_None;
|
|
||||||
}
|
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_MODE,(uint8_t)oCheckMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SETTINGS_MODE \
|
|
||||||
do\
|
|
||||||
{\
|
|
||||||
switch(oCheckMode)\
|
|
||||||
{\
|
|
||||||
case ClCheckMode::_None:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_NOZZLE), _T(MSG_NONE), lcd_check_mode_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckMode::_Warn:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_NOZZLE), _T(MSG_WARN), lcd_check_mode_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckMode::_Strict:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_NOZZLE), _T(MSG_STRICT), lcd_check_mode_set);\
|
|
||||||
break;\
|
|
||||||
default:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_NOZZLE), _T(MSG_NONE), lcd_check_mode_set);\
|
|
||||||
}\
|
|
||||||
}\
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
static void lcd_nozzle_diameter_cycle(void) {
|
static void lcd_nozzle_diameter_cycle(void) {
|
||||||
uint16_t nDiameter;
|
uint16_t nDiameter;
|
||||||
switch(oNozzleDiameter){
|
switch(oNozzleDiameter){
|
||||||
|
|
@ -4282,91 +4291,66 @@ do\
|
||||||
}\
|
}\
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
static void lcd_check_model_set(void)
|
static void lcd_check_update_RAM(ClCheckMode * oCheckSetting) {
|
||||||
{
|
switch(*oCheckSetting) {
|
||||||
switch(oCheckModel)
|
case ClCheckMode::_None:
|
||||||
{
|
*oCheckSetting = ClCheckMode::_Warn;
|
||||||
case ClCheckModel::_None:
|
|
||||||
oCheckModel=ClCheckModel::_Warn;
|
|
||||||
break;
|
break;
|
||||||
case ClCheckModel::_Warn:
|
case ClCheckMode::_Warn:
|
||||||
oCheckModel=ClCheckModel::_Strict;
|
*oCheckSetting = ClCheckMode::_Strict;
|
||||||
break;
|
break;
|
||||||
case ClCheckModel::_Strict:
|
case ClCheckMode::_Strict:
|
||||||
oCheckModel=ClCheckModel::_None;
|
*oCheckSetting = ClCheckMode::_None;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
oCheckModel=ClCheckModel::_None;
|
*oCheckSetting = ClCheckMode::_None;
|
||||||
}
|
}
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_MODEL,(uint8_t)oCheckModel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SETTINGS_MODEL \
|
static void lcd_check_mode_set() {
|
||||||
do\
|
lcd_check_update_RAM(&oCheckMode);
|
||||||
{\
|
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_MODE,(uint8_t)oCheckMode);
|
||||||
switch(oCheckModel)\
|
}
|
||||||
{\
|
|
||||||
case ClCheckModel::_None:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODEL), _T(MSG_NONE), lcd_check_model_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckModel::_Warn:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODEL), _T(MSG_WARN), lcd_check_model_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckModel::_Strict:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODEL), _T(MSG_STRICT), lcd_check_model_set);\
|
|
||||||
break;\
|
|
||||||
default:\
|
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODEL), _T(MSG_NONE), lcd_check_model_set);\
|
|
||||||
}\
|
|
||||||
}\
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
static void lcd_check_version_set(void)
|
static void lcd_check_model_set() {
|
||||||
{
|
lcd_check_update_RAM(&oCheckModel);
|
||||||
switch(oCheckVersion)
|
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_MODEL,(uint8_t)oCheckModel);
|
||||||
{
|
}
|
||||||
case ClCheckVersion::_None:
|
|
||||||
oCheckVersion=ClCheckVersion::_Warn;
|
static void lcd_check_version_set() {
|
||||||
|
lcd_check_update_RAM(&oCheckVersion);
|
||||||
|
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_VERSION,(uint8_t)oCheckVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void lcd_check_filament_set() {
|
||||||
|
lcd_check_update_RAM(&oCheckFilament);
|
||||||
|
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_FILAMENT,(uint8_t)oCheckFilament);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void settings_check_toggle(ClCheckMode * oCheckSetting, const char* msg, void (*func)(void)) {
|
||||||
|
switch(*oCheckSetting) {
|
||||||
|
case ClCheckMode::_None:
|
||||||
|
MENU_ITEM_TOGGLE_P(msg, _T(MSG_NONE), func);
|
||||||
break;
|
break;
|
||||||
case ClCheckVersion::_Warn:
|
case ClCheckMode::_Warn:
|
||||||
oCheckVersion=ClCheckVersion::_Strict;
|
MENU_ITEM_TOGGLE_P(msg, _T(MSG_WARN), func);
|
||||||
break;
|
break;
|
||||||
case ClCheckVersion::_Strict:
|
case ClCheckMode::_Strict:
|
||||||
oCheckVersion=ClCheckVersion::_None;
|
MENU_ITEM_TOGGLE_P(msg, _T(MSG_STRICT), func);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
oCheckVersion=ClCheckVersion::_None;
|
MENU_ITEM_TOGGLE_P(msg, _T(MSG_NONE), func);
|
||||||
}
|
}
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_CHECK_VERSION,(uint8_t)oCheckVersion);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SETTINGS_VERSION \
|
|
||||||
do\
|
|
||||||
{\
|
|
||||||
switch(oCheckVersion)\
|
|
||||||
{\
|
|
||||||
case ClCheckVersion::_None:\
|
|
||||||
MENU_ITEM_TOGGLE_P(MSG_FIRMWARE, _T(MSG_NONE), lcd_check_version_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckVersion::_Warn:\
|
|
||||||
MENU_ITEM_TOGGLE_P(MSG_FIRMWARE, _T(MSG_WARN), lcd_check_version_set);\
|
|
||||||
break;\
|
|
||||||
case ClCheckVersion::_Strict:\
|
|
||||||
MENU_ITEM_TOGGLE_P(MSG_FIRMWARE, _T(MSG_STRICT), lcd_check_version_set);\
|
|
||||||
break;\
|
|
||||||
default:\
|
|
||||||
MENU_ITEM_TOGGLE_P(MSG_FIRMWARE, _T(MSG_NONE), lcd_check_version_set);\
|
|
||||||
}\
|
|
||||||
}\
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
static void lcd_checking_menu(void)
|
static void lcd_checking_menu(void)
|
||||||
{
|
{
|
||||||
MENU_BEGIN();
|
MENU_BEGIN();
|
||||||
MENU_ITEM_BACK_P(_T(MSG_HW_SETUP));
|
MENU_ITEM_BACK_P(_T(MSG_HW_SETUP));
|
||||||
SETTINGS_MODE;
|
settings_check_toggle(&oCheckMode, _T(MSG_NOZZLE), lcd_check_mode_set);
|
||||||
SETTINGS_MODEL;
|
settings_check_toggle(&oCheckModel, _T(MSG_MODEL), lcd_check_model_set);
|
||||||
SETTINGS_VERSION;
|
settings_check_toggle(&oCheckVersion, MSG_FIRMWARE, lcd_check_version_set);
|
||||||
|
settings_check_toggle(&oCheckFilament, MSG_FILAMENT, lcd_check_filament_set);
|
||||||
MENU_END();
|
MENU_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4394,6 +4378,13 @@ static void sheets_menu()
|
||||||
|
|
||||||
static void nozzle_change()
|
static void nozzle_change()
|
||||||
{
|
{
|
||||||
|
#ifdef FILAMENT_SENSOR
|
||||||
|
if (fsensor.isEnabled() && fsensor.getFilamentPresent()) {
|
||||||
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_UNLOAD_FILAMENT_REPEAT));
|
||||||
|
lcd_return_to_status();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif //FILAMENT_SENSOR
|
||||||
lcd_commands_type = LcdCommands::NozzleCNG;
|
lcd_commands_type = LcdCommands::NozzleCNG;
|
||||||
lcd_return_to_status();
|
lcd_return_to_status();
|
||||||
}
|
}
|
||||||
|
|
@ -4539,29 +4530,18 @@ static void lcd_settings_menu()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TMC2130
|
#ifdef TMC2130
|
||||||
static void lcd_ustep_linearity_menu_save()
|
static void lcd_settings_linearity_correction_menu_save() {
|
||||||
{
|
for (uint8_t axis = 0; axis < NUM_AXIS; axis++) {
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_TMC2130_WAVE_X_FAC, tmc2130_wave_fac[X_AXIS]);
|
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_TMC2130_WAVE_Y_FAC, tmc2130_wave_fac[Y_AXIS]);
|
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_TMC2130_WAVE_Z_FAC, tmc2130_wave_fac[Z_AXIS]);
|
|
||||||
eeprom_update_byte_notify((uint8_t*)EEPROM_TMC2130_WAVE_E_FAC, tmc2130_wave_fac[E_AXIS]);
|
|
||||||
}
|
|
||||||
#endif //TMC2130
|
|
||||||
|
|
||||||
#ifdef TMC2130
|
if (tmc2130_wave_fac[axis] < TMC2130_WAVE_FAC1000_MIN) {
|
||||||
static void lcd_settings_linearity_correction_menu_save()
|
tmc2130_wave_fac[axis] = 0;
|
||||||
{
|
}
|
||||||
bool changed = false;
|
|
||||||
if (tmc2130_wave_fac[X_AXIS] < TMC2130_WAVE_FAC1000_MIN) tmc2130_wave_fac[X_AXIS] = 0;
|
eeprom_update_byte_notify((uint8_t*)EEPROM_TMC2130_WAVE_X_FAC - axis, tmc2130_wave_fac[axis]);
|
||||||
if (tmc2130_wave_fac[Y_AXIS] < TMC2130_WAVE_FAC1000_MIN) tmc2130_wave_fac[Y_AXIS] = 0;
|
}
|
||||||
if (tmc2130_wave_fac[Z_AXIS] < TMC2130_WAVE_FAC1000_MIN) tmc2130_wave_fac[Z_AXIS] = 0;
|
|
||||||
if (tmc2130_wave_fac[E_AXIS] < TMC2130_WAVE_FAC1000_MIN) tmc2130_wave_fac[E_AXIS] = 0;
|
// Re-init the TMC2130 driver to apply changes, if any
|
||||||
changed |= (eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_X_FAC) != tmc2130_wave_fac[X_AXIS]);
|
tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
||||||
changed |= (eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_Y_FAC) != tmc2130_wave_fac[Y_AXIS]);
|
|
||||||
changed |= (eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_Z_FAC) != tmc2130_wave_fac[Z_AXIS]);
|
|
||||||
changed |= (eeprom_read_byte((uint8_t*)EEPROM_TMC2130_WAVE_E_FAC) != tmc2130_wave_fac[E_AXIS]);
|
|
||||||
lcd_ustep_linearity_menu_save();
|
|
||||||
if (changed) tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
|
||||||
}
|
}
|
||||||
#endif //TMC2130
|
#endif //TMC2130
|
||||||
|
|
||||||
|
|
@ -4582,7 +4562,7 @@ static void lcd_calibration_menu()
|
||||||
// MK2
|
// MK2
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_CALIBRATE_BED), lcd_mesh_calibration);
|
MENU_ITEM_FUNCTION_P(_T(MSG_CALIBRATE_BED), lcd_mesh_calibration);
|
||||||
// "Calibrate Z" with storing the reference values to EEPROM.
|
// "Calibrate Z" with storing the reference values to EEPROM.
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_HOMEYZ), lcd_mesh_calibration_z);
|
MENU_ITEM_FUNCTION_P(_T(MSG_HOMEYZ), lcd_mesh_calibration_z);
|
||||||
|
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_MESH_BED_LEVELING), lcd_mesh_bedleveling); ////MSG_MESH_BED_LEVELING c=18
|
MENU_ITEM_SUBMENU_P(_T(MSG_MESH_BED_LEVELING), lcd_mesh_bedleveling); ////MSG_MESH_BED_LEVELING c=18
|
||||||
|
|
||||||
|
|
@ -4598,7 +4578,7 @@ static void lcd_calibration_menu()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef THERMAL_MODEL
|
#ifdef THERMAL_MODEL
|
||||||
MENU_ITEM_SUBMENU_P(_n("Thermal Model cal."), lcd_thermal_model_cal);
|
MENU_ITEM_FUNCTION_P(_n("Thermal Model cal."), lcd_thermal_model_cal);
|
||||||
#endif //THERMAL_MODEL
|
#endif //THERMAL_MODEL
|
||||||
|
|
||||||
MENU_END();
|
MENU_END();
|
||||||
|
|
@ -4767,7 +4747,7 @@ char reset_menu() {
|
||||||
|
|
||||||
static void lcd_disable_farm_mode()
|
static void lcd_disable_farm_mode()
|
||||||
{
|
{
|
||||||
uint8_t disable = lcd_show_fullscreen_message_yes_no_and_wait_P(PSTR("Disable farm mode?"), true); //allow timeouting, default no
|
uint8_t disable = lcd_show_multiscreen_message_yes_no_and_wait_P(PSTR("Disable farm mode?"), true); //allow timeouting, default no
|
||||||
if (disable == LCD_LEFT_BUTTON_CHOICE)
|
if (disable == LCD_LEFT_BUTTON_CHOICE)
|
||||||
{
|
{
|
||||||
enquecommand_P(PSTR("G99"));
|
enquecommand_P(PSTR("G99"));
|
||||||
|
|
@ -4779,7 +4759,7 @@ static void lcd_disable_farm_mode()
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void load_all_wrapper(){
|
static inline void load_all_wrapper(){
|
||||||
for(uint8_t i = 0; i < 5; ++i){
|
for(uint8_t i = 0; i < MMU_FILAMENT_COUNT; ++i){
|
||||||
MMU2::mmu2.load_filament(i);
|
MMU2::mmu2.load_filament(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4856,7 +4836,7 @@ static void mmu_cut_filament_menu() {
|
||||||
#endif //MMU_HAS_CUTTER
|
#endif //MMU_HAS_CUTTER
|
||||||
|
|
||||||
static inline void loading_test_all_wrapper(){
|
static inline void loading_test_all_wrapper(){
|
||||||
for(uint8_t i = 0; i < 5; ++i){
|
for(uint8_t i = 0; i < MMU_FILAMENT_COUNT; ++i){
|
||||||
MMU2::mmu2.loading_test(i);
|
MMU2::mmu2.loading_test(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5055,7 +5035,11 @@ static void change_sheet()
|
||||||
menu_back(3);
|
menu_back(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! @brief Send a notification to the host. Param 'message' must reside in program memory!
|
||||||
|
void sendHostNotification_P(const char* message)
|
||||||
|
{
|
||||||
|
printf_P(MSG_HOST_ACTION_NOTIFICATION, message);
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_rename_sheet_menu()
|
static void lcd_rename_sheet_menu()
|
||||||
{
|
{
|
||||||
|
|
@ -5146,6 +5130,7 @@ static void lcd_sheet_menu()
|
||||||
MENU_END();
|
MENU_END();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef REPLACE_SETREADY
|
||||||
//! @brief Set printer state
|
//! @brief Set printer state
|
||||||
//! Sends the printer state for next print via LCD menu to host
|
//! Sends the printer state for next print via LCD menu to host
|
||||||
//! The host has to set the printer ready state with `M72` to keep printer in sync with the host
|
//! The host has to set the printer ready state with `M72` to keep printer in sync with the host
|
||||||
|
|
@ -5159,6 +5144,7 @@ static void lcd_printer_ready_state_toggle()
|
||||||
SERIAL_ECHOLNRPGM(MSG_HOST_ACTION_READY);
|
SERIAL_ECHOLNRPGM(MSG_HOST_ACTION_READY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HOST_SHUTDOWN
|
#ifdef HOST_SHUTDOWN
|
||||||
static void lcd_shutdown_menu()
|
static void lcd_shutdown_menu()
|
||||||
|
|
@ -5254,16 +5240,24 @@ static void lcd_main_menu()
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);//8
|
MENU_ITEM_FUNCTION_P(_T(MSG_FILAMENTCHANGE), lcd_colorprint_change);//8
|
||||||
|
|
||||||
if (!printer_recovering()) {
|
if (!printer_recovering()) {
|
||||||
if ( moves_planned() || printer_active()) {
|
if ( moves_planned() || printer_active()
|
||||||
|
#ifdef FANCHECK
|
||||||
|
|| fan_check_error == EFCE_REPORTED
|
||||||
|
#endif //End FANCHECK
|
||||||
|
) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_TUNE), lcd_tune_menu);
|
MENU_ITEM_SUBMENU_P(_T(MSG_TUNE), lcd_tune_menu);
|
||||||
} else if (!Stopped) {
|
} else if (!Stopped) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_PREHEAT), lcd_preheat_menu);
|
MENU_ITEM_SUBMENU_P(_T(MSG_PREHEAT), lcd_preheat_menu);
|
||||||
if (M79_timer_get_status()) {
|
if (M79_timer_get_status()) {
|
||||||
|
#ifndef REPLACE_SETREADY
|
||||||
if(GetPrinterState() == PrinterState::IsReady) {
|
if(GetPrinterState() == PrinterState::IsReady) {
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_SET_NOT_READY), lcd_printer_ready_state_toggle);
|
MENU_ITEM_FUNCTION_P(_T(MSG_SET_NOT_READY), lcd_printer_ready_state_toggle);
|
||||||
} else {
|
} else {
|
||||||
MENU_ITEM_FUNCTION_P(_T(MSG_SET_READY), lcd_printer_ready_state_toggle);
|
MENU_ITEM_FUNCTION_P(_T(MSG_SET_READY), lcd_printer_ready_state_toggle);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
MENU_ITEM_FUNCTION_P(_T(MSG_HOSTPRINT), lcd_send_action_start);
|
||||||
|
#endif //REPLACE_SETREADY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mesh_bed_leveling_flag == false && homing_flag == false && !printingIsPaused() && !processing_tcode) {
|
if (mesh_bed_leveling_flag == false && homing_flag == false && !printingIsPaused() && !processing_tcode) {
|
||||||
|
|
@ -5354,15 +5348,19 @@ static void lcd_main_menu()
|
||||||
} else {
|
} else {
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
if (fsensor.isEnabled()) {
|
if (fsensor.isEnabled()) {
|
||||||
if (!fsensor.getFilamentPresent()) {
|
if (!fsensor.getAutoLoadEnabled()) {
|
||||||
if (fsensor.getAutoLoadEnabled()) {
|
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_AUTOLOAD_FILAMENT), lcd_menu_AutoLoadFilament);
|
|
||||||
} else {
|
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
||||||
}
|
}
|
||||||
} else {
|
if (fsensor.getFilamentPresent()) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
|
MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), lcd_unLoadFilament);
|
||||||
}
|
}
|
||||||
|
#ifndef REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
else {
|
||||||
|
if (fsensor.getAutoLoadEnabled()) {
|
||||||
|
MENU_ITEM_SUBMENU_P(_T(MSG_AUTOLOAD_FILAMENT), lcd_menu_AutoLoadFilament);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif //REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
} else {
|
} else {
|
||||||
#endif //FILAMENT_SENSOR
|
#endif //FILAMENT_SENSOR
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), lcd_LoadFilament);
|
||||||
|
|
@ -5582,6 +5580,12 @@ static void lcd_mesh_bed_leveling_settings()
|
||||||
char sToggle[4]; //enough for nxn format
|
char sToggle[4]; //enough for nxn format
|
||||||
|
|
||||||
MENU_BEGIN();
|
MENU_BEGIN();
|
||||||
|
ON_MENU_LEAVE(
|
||||||
|
// Prompt user to run Z calibration for best results with region MBL.
|
||||||
|
if (points_nr == 7) {
|
||||||
|
lcd_z_calibration_prompt(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
||||||
sToggle[0] = points_nr + '0';
|
sToggle[0] = points_nr + '0';
|
||||||
sToggle[1] = 'x';
|
sToggle[1] = 'x';
|
||||||
|
|
@ -5619,7 +5623,7 @@ static void lcd_backlight_menu()
|
||||||
MENU_ITEM_EDIT_int3_P(_T(MSG_BL_HIGH), &backlightLevel_HIGH, backlightLevel_LOW, 255);
|
MENU_ITEM_EDIT_int3_P(_T(MSG_BL_HIGH), &backlightLevel_HIGH, backlightLevel_LOW, 255);
|
||||||
MENU_ITEM_EDIT_int3_P(_T(MSG_BL_LOW), &backlightLevel_LOW, 0, backlightLevel_HIGH);
|
MENU_ITEM_EDIT_int3_P(_T(MSG_BL_LOW), &backlightLevel_LOW, 0, backlightLevel_HIGH);
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), ((backlightMode==BACKLIGHT_MODE_BRIGHT) ? _T(MSG_BRIGHT) : ((backlightMode==BACKLIGHT_MODE_DIM) ? _T(MSG_DIM) : _T(MSG_AUTO))), backlight_mode_toggle);
|
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), ((backlightMode==BACKLIGHT_MODE_BRIGHT) ? _T(MSG_BRIGHT) : ((backlightMode==BACKLIGHT_MODE_DIM) ? _T(MSG_DIM) : _T(MSG_AUTO))), backlight_mode_toggle);
|
||||||
MENU_ITEM_EDIT_int3_P(_T(MSG_TIMEOUT), &backlightTimer_period, 1, 999);
|
MENU_ITEM_EDIT_int3_P(_T(MSG_TIMEOUT), &backlightTimer_period, LCD_BACKLIGHT_TIMEOUT, LCD_BACKLIGHT_TIMEOUT*60);
|
||||||
|
|
||||||
MENU_END();
|
MENU_END();
|
||||||
}
|
}
|
||||||
|
|
@ -5700,10 +5704,12 @@ void lcd_print_stop_finish()
|
||||||
|
|
||||||
// restore the auto hotend state
|
// restore the auto hotend state
|
||||||
hotendDefaultAutoFanState();
|
hotendDefaultAutoFanState();
|
||||||
}
|
|
||||||
|
|
||||||
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament())
|
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament()
|
||||||
{
|
#ifdef FANCHECK
|
||||||
|
&& fan_check_error != EFCE_REPORTED
|
||||||
|
#endif //FANCHECK
|
||||||
|
) {
|
||||||
// The print was aborted while when the nozzle was cold:
|
// The print was aborted while when the nozzle was cold:
|
||||||
// 1. in a paused state => a partial backup in RAM is always available
|
// 1. in a paused state => a partial backup in RAM is always available
|
||||||
// 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM
|
// 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM
|
||||||
|
|
@ -5719,6 +5725,7 @@ void lcd_print_stop_finish()
|
||||||
MMU2::mmu2.unload(); // M702
|
MMU2::mmu2.unload(); // M702
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lcd_cooldown(); //turns off heaters and fan; goes to status screen.
|
lcd_cooldown(); //turns off heaters and fan; goes to status screen.
|
||||||
|
|
||||||
|
|
@ -5743,9 +5750,8 @@ void print_stop(bool interactive, bool unconditional_stop)
|
||||||
// Reset the sd status
|
// Reset the sd status
|
||||||
card.sdprinting = false;
|
card.sdprinting = false;
|
||||||
card.closefile();
|
card.closefile();
|
||||||
} else {
|
|
||||||
SERIAL_ECHOLNRPGM(MSG_HOST_ACTION_CANCEL);
|
|
||||||
}
|
}
|
||||||
|
SERIAL_ECHOLNRPGM(MSG_HOST_ACTION_CANCEL);
|
||||||
|
|
||||||
#ifdef MESH_BED_LEVELING
|
#ifdef MESH_BED_LEVELING
|
||||||
mbl.active = false;
|
mbl.active = false;
|
||||||
|
|
@ -6819,7 +6825,7 @@ static bool lcd_selftest_fsensor(void)
|
||||||
static bool selftest_irsensor()
|
static bool selftest_irsensor()
|
||||||
{
|
{
|
||||||
// Ask user which slot to load filament from
|
// Ask user which slot to load filament from
|
||||||
uint8_t slot = choose_menu_P(_T(MSG_SELECT_FILAMENT), _T(MSG_FILAMENT));
|
uint8_t slot = choose_menu_P(_T(MSG_SELECT_FILAMENT), MSG_FILAMENT);
|
||||||
|
|
||||||
// Render self-test screen
|
// Render self-test screen
|
||||||
lcd_selftest_screen(TestScreen::Fsensor, 0, 1, true, 0);
|
lcd_selftest_screen(TestScreen::Fsensor, 0, 1, true, 0);
|
||||||
|
|
@ -6865,6 +6871,7 @@ static bool lcd_selftest_manual_fan_check(const uint8_t _fan, const bool check_o
|
||||||
lcd_encoder = _default;
|
lcd_encoder = _default;
|
||||||
|
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
|
lcd_consume_click();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
@ -7136,7 +7143,7 @@ static void menu_action_sdfile(const char* filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!check_file(selected_filename)) {
|
if (!check_file(selected_filename)) {
|
||||||
result = !lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILE_INCOMPLETE), false);
|
result = !lcd_show_multiscreen_message_cont_cancel_and_wait_P(_T(MSG_FILE_INCOMPLETE), false);
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,10 @@ void lcd_setalertstatuspgm(const char* message, uint8_t severity = LCD_STATUS_AL
|
||||||
uint8_t get_message_level();
|
uint8_t get_message_level();
|
||||||
void lcd_reset_alert_level();
|
void lcd_reset_alert_level();
|
||||||
|
|
||||||
void lcd_pick_babystep();
|
|
||||||
uint8_t lcd_alright();
|
uint8_t lcd_alright();
|
||||||
void show_preheat_nozzle_warning();
|
void show_preheat_nozzle_warning();
|
||||||
void lcd_wait_interact();
|
void lcd_wait_interact(const char* filament_name);
|
||||||
void lcd_loading_filament();
|
void lcd_loading_filament(const char* filament_name);
|
||||||
void lcd_change_success();
|
void lcd_change_success();
|
||||||
void lcd_loading_color();
|
void lcd_loading_color();
|
||||||
void lcd_sdcard_stop();
|
void lcd_sdcard_stop();
|
||||||
|
|
@ -94,12 +93,12 @@ extern bool lcd_wait_for_click_delay(uint16_t nDelay);
|
||||||
void lcd_show_choices_prompt_P(uint8_t selected, const char *first_choice, const char *second_choice, uint8_t second_col, const char *third_choice = nullptr);
|
void lcd_show_choices_prompt_P(uint8_t selected, const char *first_choice, const char *second_choice, uint8_t second_col, const char *third_choice = nullptr);
|
||||||
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
|
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
|
||||||
extern uint8_t lcd_show_yes_no_and_wait(bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
extern uint8_t lcd_show_yes_no_and_wait(bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
||||||
extern uint8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
|
||||||
extern uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P(
|
extern uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P(
|
||||||
const char * const msg, bool allow_timeouting, uint8_t default_selection,
|
const char * const msg, bool allow_timeouting, uint8_t default_selection,
|
||||||
const char * const first_choice, const char * const second_choice, const char * const third_choice = nullptr,
|
const char * const first_choice, const char * const second_choice, const char * const third_choice = nullptr,
|
||||||
uint8_t second_col = 7);
|
uint8_t second_col = 7);
|
||||||
extern uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
extern uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
||||||
|
extern uint8_t lcd_show_multiscreen_message_cont_cancel_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
|
||||||
// Ask the user to move the Z axis up to the end stoppers and let
|
// Ask the user to move the Z axis up to the end stoppers and let
|
||||||
// the user confirm that it has been done.
|
// the user confirm that it has been done.
|
||||||
|
|
||||||
|
|
@ -222,6 +221,9 @@ void lcd_temp_calibration_set();
|
||||||
void lcd_language();
|
void lcd_language();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void lcd_z_calibration_prompt(bool allowTimeouting);
|
||||||
|
void prompt_steel_sheet_on_bed(bool wantedState);
|
||||||
|
|
||||||
void lcd_wizard();
|
void lcd_wizard();
|
||||||
|
|
||||||
//! @brief Wizard state
|
//! @brief Wizard state
|
||||||
|
|
@ -262,4 +264,6 @@ extern void lcd_heat_bed_on_load_toggle();
|
||||||
extern void retract_for_ooze_prevention();
|
extern void retract_for_ooze_prevention();
|
||||||
#endif //COMMUNITY_PREVENT_OOZE
|
#endif //COMMUNITY_PREVENT_OOZE
|
||||||
|
|
||||||
|
extern void sendHostNotification_P(const char* message);
|
||||||
|
|
||||||
#endif //ULTRALCD_H
|
#endif //ULTRALCD_H
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,17 @@
|
||||||
#include "Configuration.h"
|
#include <avr/eeprom.h>
|
||||||
|
|
||||||
#include "ultralcd.h"
|
|
||||||
#include "menu.h"
|
|
||||||
#include "sound.h"
|
|
||||||
#include "language.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
#include <stdio.h> // for sprintf_P
|
||||||
|
|
||||||
|
#include "Configuration.h"
|
||||||
|
#include "Filament_sensor.h"
|
||||||
|
#include "language.h"
|
||||||
|
#include "lcd.h"
|
||||||
|
#include "Marlin.h" // delay_keep_alive
|
||||||
|
#include "menu.h"
|
||||||
#include "Prusa_farm.h"
|
#include "Prusa_farm.h"
|
||||||
|
#include "sound.h"
|
||||||
|
#include "ultralcd.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
// Allocate the version string in the program memory. Otherwise the string lands either on the stack or in the global RAM.
|
// Allocate the version string in the program memory. Otherwise the string lands either on the stack or in the global RAM.
|
||||||
static const char FW_VERSION_STR[] PROGMEM = FW_VERSION;
|
static const char FW_VERSION_STR[] PROGMEM = FW_VERSION;
|
||||||
|
|
@ -198,7 +203,7 @@ bool eeprom_fw_version_older_than_p(const uint16_t (&ver_req)[4])
|
||||||
|
|
||||||
bool show_upgrade_dialog_if_version_newer(const char *version_string)
|
bool show_upgrade_dialog_if_version_newer(const char *version_string)
|
||||||
{
|
{
|
||||||
if(oCheckVersion == ClCheckVersion::_None)
|
if(oCheckVersion == ClCheckMode::_None)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int8_t upgrade = is_provided_version_newer(version_string);
|
int8_t upgrade = is_provided_version_newer(version_string);
|
||||||
|
|
@ -238,9 +243,10 @@ void update_current_firmware_version_to_eeprom()
|
||||||
|
|
||||||
ClNozzleDiameter oNozzleDiameter;
|
ClNozzleDiameter oNozzleDiameter;
|
||||||
ClCheckMode oCheckMode;
|
ClCheckMode oCheckMode;
|
||||||
ClCheckModel oCheckModel;
|
ClCheckMode oCheckModel;
|
||||||
ClCheckVersion oCheckVersion;
|
ClCheckMode oCheckVersion;
|
||||||
ClCheckGcode oCheckGcode;
|
ClCheckMode oCheckGcode;
|
||||||
|
ClCheckMode oCheckFilament;
|
||||||
|
|
||||||
void fCheckModeInit() {
|
void fCheckModeInit() {
|
||||||
oCheckMode = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_MODE, (uint8_t)ClCheckMode::_Warn);
|
oCheckMode = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_MODE, (uint8_t)ClCheckMode::_Warn);
|
||||||
|
|
@ -253,15 +259,16 @@ void fCheckModeInit() {
|
||||||
oNozzleDiameter = (ClNozzleDiameter)eeprom_init_default_byte((uint8_t *)EEPROM_NOZZLE_DIAMETER, (uint8_t)ClNozzleDiameter::_Diameter_400);
|
oNozzleDiameter = (ClNozzleDiameter)eeprom_init_default_byte((uint8_t *)EEPROM_NOZZLE_DIAMETER, (uint8_t)ClNozzleDiameter::_Diameter_400);
|
||||||
eeprom_init_default_word((uint16_t *)EEPROM_NOZZLE_DIAMETER_uM, EEPROM_NOZZLE_DIAMETER_uM_DEFAULT);
|
eeprom_init_default_word((uint16_t *)EEPROM_NOZZLE_DIAMETER_uM, EEPROM_NOZZLE_DIAMETER_uM_DEFAULT);
|
||||||
|
|
||||||
oCheckModel = (ClCheckModel)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_MODEL, (uint8_t)ClCheckModel::_Warn);
|
oCheckModel = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_MODEL, (uint8_t)ClCheckMode::_Warn);
|
||||||
oCheckVersion = (ClCheckVersion)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_VERSION, (uint8_t)ClCheckVersion::_Warn);
|
oCheckVersion = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_VERSION, (uint8_t)ClCheckMode::_Warn);
|
||||||
oCheckGcode = (ClCheckGcode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_GCODE, (uint8_t)ClCheckGcode::_Warn);
|
oCheckGcode = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_GCODE, (uint8_t)ClCheckMode::_Warn);
|
||||||
|
oCheckFilament = (ClCheckMode)eeprom_init_default_byte((uint8_t *)EEPROM_CHECK_FILAMENT, (uint8_t)ClCheckMode::_Warn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void render_M862_warnings(const char* warning, const char* strict, uint8_t check)
|
static void render_M862_warnings(const char* warning, const char* strict, uint8_t check)
|
||||||
{
|
{
|
||||||
if (check == 1) { // Warning, stop print if user selects 'No'
|
if (check == 1) { // Warning, stop print if user selects 'No'
|
||||||
if (lcd_show_fullscreen_message_yes_no_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE) == LCD_MIDDLE_BUTTON_CHOICE) {
|
if (lcd_show_multiscreen_message_cont_cancel_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE) == LCD_MIDDLE_BUTTON_CHOICE) {
|
||||||
lcd_print_stop();
|
lcd_print_stop();
|
||||||
}
|
}
|
||||||
} else if (check == 2) { // Strict, always stop print
|
} else if (check == 2) { // Strict, always stop print
|
||||||
|
|
@ -298,7 +305,7 @@ void nozzle_diameter_check(uint16_t nDiameter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void printer_model_check(uint16_t nPrinterModel, uint16_t actualPrinterModel) {
|
void printer_model_check(uint16_t nPrinterModel, uint16_t actualPrinterModel) {
|
||||||
if (oCheckModel == ClCheckModel::_None)
|
if (oCheckModel == ClCheckMode::_None)
|
||||||
return;
|
return;
|
||||||
if (nPrinterModel == actualPrinterModel)
|
if (nPrinterModel == actualPrinterModel)
|
||||||
return;
|
return;
|
||||||
|
|
@ -324,7 +331,7 @@ uint8_t mCompareValue(uint16_t nX, uint16_t nY) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void fw_version_check(const char *pVersion) {
|
void fw_version_check(const char *pVersion) {
|
||||||
if (oCheckVersion == ClCheckVersion::_None)
|
if (oCheckVersion == ClCheckMode::_None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint16_t aVersion[4];
|
uint16_t aVersion[4];
|
||||||
|
|
@ -365,8 +372,36 @@ void fw_version_check(const char *pVersion) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool filament_presence_check() {
|
||||||
|
// When MMU is enabled, this is not necessary and the G-code file
|
||||||
|
// should always tell the MMU which filament to load.
|
||||||
|
if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED)) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fsensor.isEnabled() && !fsensor.getFilamentPresent()) {
|
||||||
|
if (oCheckFilament == ClCheckMode::_None) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
render_M862_warnings(
|
||||||
|
_T(MSG_MISSING_FILAMENT)
|
||||||
|
,_T(MSG_MISSING_FILAMENT) //Identical messages
|
||||||
|
,(uint8_t)oCheckFilament
|
||||||
|
);
|
||||||
|
|
||||||
|
if (lcd_commands_type == LcdCommands::StopPrint) {
|
||||||
|
// Print job was canceled
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void gcode_level_check(uint16_t nGcodeLevel) {
|
void gcode_level_check(uint16_t nGcodeLevel) {
|
||||||
if (oCheckGcode == ClCheckGcode::_None)
|
if (oCheckGcode == ClCheckMode::_None)
|
||||||
return;
|
return;
|
||||||
if (nGcodeLevel <= (uint16_t)GCODE_LEVEL)
|
if (nGcodeLevel <= (uint16_t)GCODE_LEVEL)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -55,30 +55,6 @@ enum class ClCheckMode:uint_least8_t
|
||||||
_Undef=EEPROM_EMPTY_VALUE
|
_Undef=EEPROM_EMPTY_VALUE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ClCheckModel:uint_least8_t
|
|
||||||
{
|
|
||||||
_None,
|
|
||||||
_Warn,
|
|
||||||
_Strict,
|
|
||||||
_Undef=EEPROM_EMPTY_VALUE
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class ClCheckVersion:uint_least8_t
|
|
||||||
{
|
|
||||||
_None,
|
|
||||||
_Warn,
|
|
||||||
_Strict,
|
|
||||||
_Undef=EEPROM_EMPTY_VALUE
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class ClCheckGcode:uint_least8_t
|
|
||||||
{
|
|
||||||
_None,
|
|
||||||
_Warn,
|
|
||||||
_Strict,
|
|
||||||
_Undef=EEPROM_EMPTY_VALUE
|
|
||||||
};
|
|
||||||
|
|
||||||
#define COMPARE_VALUE_EQUAL (((uint8_t)ClCompareValue::_Equal<<6)+((uint8_t)ClCompareValue::_Equal<<4)+((uint8_t)ClCompareValue::_Equal<<2)+((uint8_t)ClCompareValue::_Equal))
|
#define COMPARE_VALUE_EQUAL (((uint8_t)ClCompareValue::_Equal<<6)+((uint8_t)ClCompareValue::_Equal<<4)+((uint8_t)ClCompareValue::_Equal<<2)+((uint8_t)ClCompareValue::_Equal))
|
||||||
enum class ClCompareValue:uint_least8_t
|
enum class ClCompareValue:uint_least8_t
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +72,7 @@ public:
|
||||||
: len(0)
|
: len(0)
|
||||||
, found(false)
|
, found(false)
|
||||||
{
|
{
|
||||||
char * pStrEnd = NULL;
|
const char * pStrEnd = NULL;
|
||||||
|
|
||||||
// Start of the string
|
// Start of the string
|
||||||
this->ptr = strchr(pStr, '"');
|
this->ptr = strchr(pStr, '"');
|
||||||
|
|
@ -129,9 +105,10 @@ private:
|
||||||
|
|
||||||
extern ClNozzleDiameter oNozzleDiameter;
|
extern ClNozzleDiameter oNozzleDiameter;
|
||||||
extern ClCheckMode oCheckMode;
|
extern ClCheckMode oCheckMode;
|
||||||
extern ClCheckModel oCheckModel;
|
extern ClCheckMode oCheckModel;
|
||||||
extern ClCheckVersion oCheckVersion;
|
extern ClCheckMode oCheckVersion;
|
||||||
extern ClCheckGcode oCheckGcode;
|
extern ClCheckMode oCheckGcode;
|
||||||
|
extern ClCheckMode oCheckFilament;
|
||||||
|
|
||||||
void fCheckModeInit();
|
void fCheckModeInit();
|
||||||
void nozzle_diameter_check(uint16_t nDiameter);
|
void nozzle_diameter_check(uint16_t nDiameter);
|
||||||
|
|
@ -140,6 +117,20 @@ void printer_smodel_check(const char *pStrPos, const char *actualPrinterSModel);
|
||||||
void fw_version_check(const char *pVersion);
|
void fw_version_check(const char *pVersion);
|
||||||
void gcode_level_check(uint16_t nGcodeLevel);
|
void gcode_level_check(uint16_t nGcodeLevel);
|
||||||
|
|
||||||
|
/// Check if the filament is present before starting a print job.
|
||||||
|
/// Depending on the check level set in the menus the printer will:
|
||||||
|
/// - None: not issue any warning about missing filament
|
||||||
|
/// - Warning (default): The user is warned about missing filament
|
||||||
|
/// and is prompted to continue with Yes/No. If No is selected,
|
||||||
|
/// the print is aborted. If no user input is given (e.g. from
|
||||||
|
/// host printing) then the warning will expire in 30 seconds and
|
||||||
|
/// the printer assumes the Yes option was selected.
|
||||||
|
/// - Strict: If the filament is not detected when a print is started,
|
||||||
|
/// it is immediately canceled with a message saying the filament is
|
||||||
|
/// missing.
|
||||||
|
/// @returns false if the print is canceled, true otherwise
|
||||||
|
bool filament_presence_check();
|
||||||
|
|
||||||
uint16_t nPrinterType(bool bMMu);
|
uint16_t nPrinterType(bool bMMu);
|
||||||
const char *sPrinterType(bool bMMu);
|
const char *sPrinterType(bool bMMu);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define HEATBED_V2
|
#define HEATBED_V2
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define TACH0PULLUP
|
#define TACH0PULLUP
|
||||||
|
|
||||||
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
||||||
|
|
@ -264,7 +265,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -325,9 +332,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -513,4 +520,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define HEATBED_V2
|
#define HEATBED_V2
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define TACH0PULLUP
|
#define TACH0PULLUP
|
||||||
|
|
||||||
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
||||||
|
|
@ -265,7 +266,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -326,9 +333,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -517,4 +524,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define HEATBED_V2
|
#define HEATBED_V2
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define TACH0PULLUP
|
#define TACH0PULLUP
|
||||||
|
|
||||||
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
||||||
|
|
@ -264,7 +265,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -325,9 +332,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -521,4 +528,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#define HEATBED_V2
|
#define HEATBED_V2
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define TACH0PULLUP
|
#define TACH0PULLUP
|
||||||
|
|
||||||
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
|
||||||
|
|
@ -265,7 +266,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -326,9 +333,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -522,4 +529,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,6 +65,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 2
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -319,7 +323,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -420,7 +424,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -471,9 +481,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -677,4 +687,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,6 +65,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 2
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -319,7 +323,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -421,7 +425,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -472,9 +482,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -678,4 +688,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,6 +65,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 2
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -319,7 +323,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -423,7 +427,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -474,9 +484,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -680,4 +690,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
// PSU
|
// PSU
|
||||||
|
|
@ -66,6 +67,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 9
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -321,7 +325,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -424,7 +428,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -475,9 +485,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -689,4 +699,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
// PSU
|
// PSU
|
||||||
|
|
@ -66,6 +67,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 9
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -321,7 +325,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -425,7 +429,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -476,9 +486,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -690,4 +700,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
// Electronics
|
// Electronics
|
||||||
#define MOTHERBOARD BOARD_EINSY_1_0a
|
#define MOTHERBOARD BOARD_EINSY_1_0a
|
||||||
#define STEEL_SHEET
|
#define STEEL_SHEET
|
||||||
|
//#define NEW_FIRST_LAYER_CAL //from front to back
|
||||||
#define HAS_SECOND_SERIAL_PORT
|
#define HAS_SECOND_SERIAL_PORT
|
||||||
|
|
||||||
// PSU
|
// PSU
|
||||||
|
|
@ -66,6 +67,9 @@
|
||||||
#define Z_MAX_POS 210
|
#define Z_MAX_POS 210
|
||||||
#define Z_MIN_POS 0.15
|
#define Z_MIN_POS 0.15
|
||||||
|
|
||||||
|
// Z height correction value
|
||||||
|
#define Z_MAX_POS_XYZ_CALIBRATION_CORRECTION 9
|
||||||
|
|
||||||
// Canceled home position
|
// Canceled home position
|
||||||
#define X_CANCEL_POS 50
|
#define X_CANCEL_POS 50
|
||||||
#define Y_CANCEL_POS 190
|
#define Y_CANCEL_POS 190
|
||||||
|
|
@ -321,7 +325,7 @@
|
||||||
#define HEATER_0_MAXTEMP 305
|
#define HEATER_0_MAXTEMP 305
|
||||||
#endif
|
#endif
|
||||||
#define BED_MAXTEMP 125
|
#define BED_MAXTEMP 125
|
||||||
#define AMBIENT_MAXTEMP 100
|
#define AMBIENT_MAXTEMP 80
|
||||||
|
|
||||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||||
// Define PID constants for extruder with PT100
|
// Define PID constants for extruder with PT100
|
||||||
|
|
@ -427,7 +431,13 @@
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -478,9 +488,9 @@
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -692,4 +702,14 @@
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,13 @@ ADDITIONAL FEATURES SETTINGS
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -252,9 +258,9 @@ BED SETTINGS
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// All forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -424,4 +430,14 @@ THERMISTORS SETTINGS
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,13 @@ ADDITIONAL FEATURES SETTINGS
|
||||||
HOST FEATURES
|
HOST FEATURES
|
||||||
*------------------------------------*/
|
*------------------------------------*/
|
||||||
|
|
||||||
//#define HOST_SHUTDOWN //Host supports "//action:shutdown" feature
|
// Uncomment if the host supports '//action:shutdown'. It will add "Shutdown host" to the LCD meun.
|
||||||
|
//#define HOST_SHUTDOWN
|
||||||
|
|
||||||
|
// Uncomment if the host doesn't support '//action:ready' & '//action:notready'.
|
||||||
|
// This will replace the "Set Ready"/"Set not Ready" LCD menu entry with
|
||||||
|
// "Print from host" and send '//action:start' instead.
|
||||||
|
//#define REPLACE_SETREADY
|
||||||
|
|
||||||
/*------------------------------------
|
/*------------------------------------
|
||||||
MOTOR CURRENT SETTINGS
|
MOTOR CURRENT SETTINGS
|
||||||
|
|
@ -251,9 +257,9 @@ BED SETTINGS
|
||||||
//
|
//
|
||||||
//#define BED_LIMIT_SWITCHING
|
//#define BED_LIMIT_SWITCHING
|
||||||
|
|
||||||
// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
// This sets the max power delivered to the bed.
|
||||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
// setting this to anything other than 255 enables a form of PWM to the bed,
|
||||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||||
|
|
||||||
|
|
@ -423,4 +429,14 @@ THERMISTORS SETTINGS
|
||||||
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
#define DEFAULT_MIN_ARC_SEGMENTS 20 // The enforced minimum segments in a full circle of the same radius. Set to 0 to disable
|
||||||
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
#define DEFAULT_ARC_SEGMENTS_PER_SEC 0 // Use feedrate to choose segment length. Set to 0 to disable
|
||||||
|
|
||||||
|
/*------------------------------------
|
||||||
|
COMMUNITY FEATURES
|
||||||
|
*------------------------------------*/
|
||||||
|
|
||||||
|
//Show filename instead of print time after SD card print finished
|
||||||
|
//#define SHOW_FILENAME_AFTER_FINISH
|
||||||
|
|
||||||
|
//Remove the "AutoLoad filament" LCD menu entry if autoload is enabled.
|
||||||
|
//#define REMOVE_AUTOLOAD_FILAMENT_MENU_ENTRY
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
|
|
||||||
|
|
@ -1,167 +0,0 @@
|
||||||
/*
|
|
||||||
vector_3.cpp - Vector library for bed leveling
|
|
||||||
Copyright (c) 2012 Lars Brubaker. 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
|
|
||||||
*/
|
|
||||||
#include <math.h>
|
|
||||||
#include "Marlin.h"
|
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
#include "vector_3.h"
|
|
||||||
|
|
||||||
vector_3::vector_3() : x(0), y(0), z(0) { }
|
|
||||||
|
|
||||||
vector_3::vector_3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { }
|
|
||||||
|
|
||||||
vector_3 vector_3::cross(vector_3 left, vector_3 right)
|
|
||||||
{
|
|
||||||
return vector_3(left.y * right.z - left.z * right.y,
|
|
||||||
left.z * right.x - left.x * right.z,
|
|
||||||
left.x * right.y - left.y * right.x);
|
|
||||||
}
|
|
||||||
|
|
||||||
vector_3 vector_3::operator+(vector_3 v)
|
|
||||||
{
|
|
||||||
return vector_3((x + v.x), (y + v.y), (z + v.z));
|
|
||||||
}
|
|
||||||
|
|
||||||
vector_3 vector_3::operator-(vector_3 v)
|
|
||||||
{
|
|
||||||
return vector_3((x - v.x), (y - v.y), (z - v.z));
|
|
||||||
}
|
|
||||||
|
|
||||||
vector_3 vector_3::get_normal()
|
|
||||||
{
|
|
||||||
vector_3 normalized = vector_3(x, y, z);
|
|
||||||
normalized.normalize();
|
|
||||||
return normalized;
|
|
||||||
}
|
|
||||||
|
|
||||||
float vector_3::get_length()
|
|
||||||
{
|
|
||||||
float length = sqrt((x * x) + (y * y) + (z * z));
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vector_3::normalize()
|
|
||||||
{
|
|
||||||
float length = get_length();
|
|
||||||
x /= length;
|
|
||||||
y /= length;
|
|
||||||
z /= length;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vector_3::apply_rotation(matrix_3x3 matrix)
|
|
||||||
{
|
|
||||||
float resultX = x * matrix.matrix[3*0+0] + y * matrix.matrix[3*1+0] + z * matrix.matrix[3*2+0];
|
|
||||||
float resultY = x * matrix.matrix[3*0+1] + y * matrix.matrix[3*1+1] + z * matrix.matrix[3*2+1];
|
|
||||||
float resultZ = x * matrix.matrix[3*0+2] + y * matrix.matrix[3*1+2] + z * matrix.matrix[3*2+2];
|
|
||||||
|
|
||||||
x = resultX;
|
|
||||||
y = resultY;
|
|
||||||
z = resultZ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vector_3::debug(char* title)
|
|
||||||
{
|
|
||||||
SERIAL_PROTOCOL(title);
|
|
||||||
SERIAL_PROTOCOLPGM(" x: ");
|
|
||||||
SERIAL_PROTOCOL(x);
|
|
||||||
SERIAL_PROTOCOLPGM(" y: ");
|
|
||||||
SERIAL_PROTOCOL(y);
|
|
||||||
SERIAL_PROTOCOLPGM(" z: ");
|
|
||||||
SERIAL_PROTOCOL(z);
|
|
||||||
SERIAL_PROTOCOLPGM("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z)
|
|
||||||
{
|
|
||||||
vector_3 vector = vector_3(x, y, z);
|
|
||||||
vector.apply_rotation(matrix);
|
|
||||||
x = vector.x;
|
|
||||||
y = vector.y;
|
|
||||||
z = vector.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_3x3 matrix_3x3::create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2)
|
|
||||||
{
|
|
||||||
//row_0.debug("row_0");
|
|
||||||
//row_1.debug("row_1");
|
|
||||||
//row_2.debug("row_2");
|
|
||||||
matrix_3x3 new_matrix;
|
|
||||||
new_matrix.matrix[0] = row_0.x; new_matrix.matrix[1] = row_0.y; new_matrix.matrix[2] = row_0.z;
|
|
||||||
new_matrix.matrix[3] = row_1.x; new_matrix.matrix[4] = row_1.y; new_matrix.matrix[5] = row_1.z;
|
|
||||||
new_matrix.matrix[6] = row_2.x; new_matrix.matrix[7] = row_2.y; new_matrix.matrix[8] = row_2.z;
|
|
||||||
//new_matrix.debug("new_matrix");
|
|
||||||
|
|
||||||
return new_matrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_3x3::set_to_identity()
|
|
||||||
{
|
|
||||||
matrix[0] = 1; matrix[1] = 0; matrix[2] = 0;
|
|
||||||
matrix[3] = 0; matrix[4] = 1; matrix[5] = 0;
|
|
||||||
matrix[6] = 0; matrix[7] = 0; matrix[8] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
|
|
||||||
{
|
|
||||||
vector_3 z_row = target.get_normal();
|
|
||||||
vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
|
|
||||||
vector_3 y_row = vector_3::cross(z_row, x_row).get_normal();
|
|
||||||
|
|
||||||
// x_row.debug("x_row");
|
|
||||||
// y_row.debug("y_row");
|
|
||||||
// z_row.debug("z_row");
|
|
||||||
|
|
||||||
|
|
||||||
// create the matrix already correctly transposed
|
|
||||||
matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
|
|
||||||
|
|
||||||
// rot.debug("rot");
|
|
||||||
return rot;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
matrix_3x3 matrix_3x3::transpose(matrix_3x3 original)
|
|
||||||
{
|
|
||||||
matrix_3x3 new_matrix;
|
|
||||||
new_matrix.matrix[0] = original.matrix[0]; new_matrix.matrix[1] = original.matrix[3]; new_matrix.matrix[2] = original.matrix[6];
|
|
||||||
new_matrix.matrix[3] = original.matrix[1]; new_matrix.matrix[4] = original.matrix[4]; new_matrix.matrix[5] = original.matrix[7];
|
|
||||||
new_matrix.matrix[6] = original.matrix[2]; new_matrix.matrix[7] = original.matrix[5]; new_matrix.matrix[8] = original.matrix[8];
|
|
||||||
return new_matrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_3x3::debug(char* title)
|
|
||||||
{
|
|
||||||
SERIAL_PROTOCOL(title);
|
|
||||||
SERIAL_PROTOCOL("\n");
|
|
||||||
int count = 0;
|
|
||||||
for(int i=0; i<3; i++)
|
|
||||||
{
|
|
||||||
for(int j=0; j<3; j++)
|
|
||||||
{
|
|
||||||
SERIAL_PROTOCOL(matrix[count]);
|
|
||||||
SERIAL_PROTOCOLPGM(" ");
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
SERIAL_PROTOCOLPGM("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
/*
|
|
||||||
vector_3.cpp - Vector library for bed leveling
|
|
||||||
Copyright (c) 2012 Lars Brubaker. 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
|
|
||||||
*/
|
|
||||||
#ifndef VECTOR_3_H
|
|
||||||
#define VECTOR_3_H
|
|
||||||
|
|
||||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
|
||||||
class matrix_3x3;
|
|
||||||
|
|
||||||
struct vector_3
|
|
||||||
{
|
|
||||||
float x, y, z;
|
|
||||||
|
|
||||||
vector_3();
|
|
||||||
vector_3(float x, float y, float z);
|
|
||||||
|
|
||||||
static vector_3 cross(vector_3 a, vector_3 b);
|
|
||||||
|
|
||||||
vector_3 operator+(vector_3 v);
|
|
||||||
vector_3 operator-(vector_3 v);
|
|
||||||
void normalize();
|
|
||||||
float get_length();
|
|
||||||
vector_3 get_normal();
|
|
||||||
|
|
||||||
void debug(char* title);
|
|
||||||
|
|
||||||
void apply_rotation(matrix_3x3 matrix);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct matrix_3x3
|
|
||||||
{
|
|
||||||
float matrix[9];
|
|
||||||
|
|
||||||
static matrix_3x3 create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2);
|
|
||||||
static matrix_3x3 create_look_at(vector_3 target);
|
|
||||||
static matrix_3x3 transpose(matrix_3x3 original);
|
|
||||||
|
|
||||||
void set_to_identity();
|
|
||||||
|
|
||||||
void debug(char* title);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
|
|
||||||
#endif // ENABLE_AUTO_BED_LEVELING
|
|
||||||
|
|
||||||
#endif // VECTOR_3_H
|
|
||||||
|
|
@ -80,16 +80,6 @@ uint8_t xflash_rd_status_reg(void)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void w25x20cl_wr_status_reg(uint8_t val)
|
|
||||||
{
|
|
||||||
_CS_LOW();
|
|
||||||
_SPI_TX(_CMD_WR_STATUS_REG); // send command 0x90
|
|
||||||
_SPI_TX(val); // send value
|
|
||||||
_CS_HIGH();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void xflash_send_cmdaddr(uint8_t cmd, uint32_t addr)
|
static void xflash_send_cmdaddr(uint8_t cmd, uint32_t addr)
|
||||||
{
|
{
|
||||||
_SPI_TX(cmd); // send command 0x03
|
_SPI_TX(cmd); // send command 0x03
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,6 @@ extern int8_t xflash_init(void);
|
||||||
extern void xflash_enable_wr(void);
|
extern void xflash_enable_wr(void);
|
||||||
extern void xflash_disable_wr(void);
|
extern void xflash_disable_wr(void);
|
||||||
extern uint8_t xflash_rd_status_reg(void);
|
extern uint8_t xflash_rd_status_reg(void);
|
||||||
#if 0
|
|
||||||
extern void w25x20cl_wr_status_reg(uint8_t val);
|
|
||||||
#endif
|
|
||||||
extern void xflash_rd_data(uint32_t addr, uint8_t* data, uint16_t cnt);
|
extern void xflash_rd_data(uint32_t addr, uint8_t* data, uint16_t cnt);
|
||||||
|
|
||||||
extern void xflash_sector_erase(uint32_t addr);
|
extern void xflash_sector_erase(uint32_t addr);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "xyzcal.h"
|
#include "xyzcal.h"
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
|
#include "lcd.h"
|
||||||
#include "stepper.h"
|
#include "stepper.h"
|
||||||
#include "temperature.h"
|
#include "temperature.h"
|
||||||
#include "sm4.h"
|
#include "sm4.h"
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -35,9 +35,9 @@ The workflow should be pretty straightforward for anyone with development experi
|
||||||
Building with cmake requires:
|
Building with cmake requires:
|
||||||
|
|
||||||
- cmake >= 3.22.5
|
- cmake >= 3.22.5
|
||||||
- ninja >= 1.10.2 (optional, but recommended)
|
- ninja >= 1.12.1 (optional, but recommended)
|
||||||
|
|
||||||
Python >= 3.6 is also required with the following modules:
|
Python >= 3.8 is also required with the following modules:
|
||||||
|
|
||||||
- pyelftools (package `python3-pyelftools`)
|
- pyelftools (package `python3-pyelftools`)
|
||||||
- polib (package `python3-polib`)
|
- polib (package `python3-polib`)
|
||||||
|
|
@ -49,6 +49,12 @@ Assuming a recent Debian/Ubuntu distribution, install the dependencies globally
|
||||||
|
|
||||||
sudo apt-get install cmake ninja python3-pyelftools python3-polib python3-regex gettext
|
sudo apt-get install cmake ninja python3-pyelftools python3-polib python3-regex gettext
|
||||||
|
|
||||||
|
When using a recent Fedora(non-atomic)/RHEL distribution, install the dependencies globally with:
|
||||||
|
|
||||||
|
sudo dnf install cmake ninja-build python3-pyelftools python3-polib python3-regex gettext
|
||||||
|
|
||||||
|
When using a Fedora Atomic/UBlue distribution use `rpm-ostree install --allow-inactive` instead of `sudo dnf install`
|
||||||
|
|
||||||
Prusa-Firmware depends on a pinned version of `avr-gcc` and the external `prusa3dboards` package. These can be setup using `./utils/bootstrap.py`:
|
Prusa-Firmware depends on a pinned version of `avr-gcc` and the external `prusa3dboards` package. These can be setup using `./utils/bootstrap.py`:
|
||||||
|
|
||||||
# automatically setup dependencies
|
# automatically setup dependencies
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ function(git_describe_working_tree _var)
|
||||||
set(out "${out}-${res}-NOTFOUND")
|
set(out "${out}-${res}-NOTFOUND")
|
||||||
endif()
|
endif()
|
||||||
if( "${out}" MATCHES "-D\$")
|
if( "${out}" MATCHES "-D\$")
|
||||||
STRING(REPLACE "-D" "-${COMMIT_COUNT}-D" out "${out}")
|
STRING(REGEX REPLACE "-D\$" "-${COMMIT_COUNT}-D" out "${out}")
|
||||||
else()
|
else()
|
||||||
set(out "${out}-${COMMIT_COUNT}")
|
set(out "${out}-${COMMIT_COUNT}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
- [X] **Maintained** since September 2019
|
- [X] **Maintained** since September 2019
|
||||||
|
|
||||||
- **Romanian / Română**
|
- **Romanian / Română**
|
||||||
- Maintainers: **@leptun** and **@Hauzman**
|
- Maintainers: **@leptun**
|
||||||
- Co-maintainers: **@QuantumRoboticsFTC**
|
- Co-maintainers: **@Hauzman**
|
||||||
- Contributors:
|
- Contributors:
|
||||||
- [X] **Active** since January 2022
|
- [X] **Active** since January 2022
|
||||||
- [X] **Maintained** since January 2022
|
- [X] **Maintained** since January 2022
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
- [X] **Maintained** since January 2022
|
- [X] **Maintained** since January 2022
|
||||||
|
|
||||||
- **Croatian / Hrvatski**
|
- **Croatian / Hrvatski**
|
||||||
- Maintainers: **@Prime1910**
|
- Maintainers:
|
||||||
- Co-maintainers: **@PRPA041**
|
- Co-maintainers:
|
||||||
- Contributors:
|
- Contributors:
|
||||||
- [X] **Active** since January 2022
|
- [ ] **Active** started January 2022, inactive September 2024
|
||||||
- [X] **Maintained** since January 2022
|
- [ ] **Maintained** started January 2022, inactive September 2024
|
||||||
|
|
||||||
- **Slovak / Slovencina**
|
- **Slovak / Slovencina**
|
||||||
- Maintainers: **@ingbrzy**
|
- Maintainers: **@ingbrzy**
|
||||||
|
|
@ -36,15 +36,15 @@
|
||||||
- [X] **Maintained** since June 2021
|
- [X] **Maintained** since June 2021
|
||||||
|
|
||||||
- **Swedish / Svenska**
|
- **Swedish / Svenska**
|
||||||
- Maintainers: **@Painkiller56**
|
- Maintainers:
|
||||||
- Co-maintainers:**@pkg2000**
|
- Co-maintainers:
|
||||||
- Contributors:
|
- Contributors:
|
||||||
- [X] **Active** since March 2022
|
- [ ] **Active** started March 2022, inactive September 2024
|
||||||
- [X] **Maintained** since January 2022
|
- [ ] **Maintained** started January 2022
|
||||||
|
|
||||||
- **Norwegian / Norsk**
|
- **Norwegian / Norsk**
|
||||||
- Maintainers: **@OS-kar** and **@pkg2000**
|
- Maintainers:
|
||||||
- Co-maintainers: **@trondkla**
|
- Co-maintainers:
|
||||||
- Contributors:
|
- Contributors:
|
||||||
- [X] **Active** since May 2022
|
- [ ] **Active** started May 2022, inactive September 2024
|
||||||
- [X] **Maintained** since February 2022
|
- [ ] **Maintained** started February 2022
|
||||||
|
|
|
||||||
1063
lang/po/Firmware.pot
1063
lang/po/Firmware.pot
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue