diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 1e87012..3df3acb --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,5 @@ applet/ # Debug files *.dSYM/ *.su +.pioenvs +.piolibdeps diff --git a/.travis.yml b/.travis.yml new file mode 100755 index 0000000..a1ca50d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: python +python: +- '2.7' +sudo: false +cache: + directories: + - "~/.platformio" +install: +- pip install -U platformio +script: +- mkdir /tmp/build +- platformio ci --build-dir="/tmp/build" --keep-build-dir --project-conf=platformio.ini . +deploy: + provider: releases + api_key: + secure: cldWYIBGnKpJg8bpcgul/omtBVDJOPN8n09aeOGRwu02tNYnIUWBtohi2FgwnfDhh6/2MTx+hX/8bYDLM3LOtaSKgVN3CUTbSsyu16wqS+VFOcsUddXPX4cJVhHLdN61uoAdIeKnuf5IKGF8+80Ft29RBgNFEceu0AR/7mPHfwlVSlPbqXBdwIvAs3Xene4FCXSWKPCoyVYU/ot7h/Q/sU2iC0ZRoNygUuBbARWJZ2eNjgHWzQDj3ooclcwCK4XixLjrzVvdlkY3QKTap4xLL8DHf8kIPAle9qltbWSbkL5Vfs+zI9lA7DN5pCcFTLwqLsUrYmDgLipId9qFuhCZFoZXndd1ky9CieKgPAW1CwjLXCulxlH9DJeEyxab8PmCjFH3HBfp1hR8QSru6LO5/yspLBztTd5R9nv3DdDCSPR6A07WsFimo+X5rg0Rp8FZUdEpb+3CCUSQADkmr5okKKY4a+3pWAb5ZcN5SRPegPzgji21RM6rE+WmzqyjeW12rpqRFyT6I4M48C06cpesKrWTTiBahWKTf6CajIlUDkC+n78LPt3xHgvxwI49UFakz1Q9mBGzpwoG46QHA78jiOD6+fPsM3BuzOEWs9RloA8gY8mnyryY0fT5L941fJXm4Sk+FQ9/OJoEL5GUU4F873PqBbUCrMRvV8QYiI73Cjc= + file: "/tmp/build/.pioenvs/megaatmega2560/firmware.hex" + on: + repo: uArm-Developer/SwiftProForArduino +branches: + only: + - travis + - develop diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f27031a..0000000 --- a/LICENSE +++ /dev/null @@ -1,677 +0,0 @@ - - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h deleted file mode 100644 index ff6c6b1..0000000 --- a/Marlin/Conditionals.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Conditionals.h - * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h - */ -#error "Old configurations? Please delete all #include lines from Configuration.h and Configuration_adv.h." diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h deleted file mode 100644 index 29c67bf..0000000 --- a/Marlin/Conditionals_LCD.h +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Conditionals_LCD.h - * LCD Defines that depend on configuration but are not editable. - */ - -#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first -#define CONDITIONALS_LCD_H - - #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT)) - - #if ENABLED(CARTESIO_UI) - #define DOGLCD - #define ULTIPANEL - #define NEWPANEL - #define DEFAULT_LCD_CONTRAST 90 - #define LCD_CONTRAST_MIN 60 - #define LCD_CONTRAST_MAX 140 - #endif - - #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL) - #define DOGLCD - #define ULTIPANEL - #define NEWPANEL - #define DEFAULT_LCD_CONTRAST 17 - #endif - - #if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) - #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. - - #if ENABLED(miniVIKI) - #define LCD_CONTRAST_MIN 75 - #define LCD_CONTRAST_MAX 115 - #define DEFAULT_LCD_CONTRAST 95 - #elif ENABLED(VIKI2) - #define DEFAULT_LCD_CONTRAST 40 - #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define LCD_CONTRAST_MIN 90 - #define LCD_CONTRAST_MAX 130 - #define DEFAULT_LCD_CONTRAST 110 - #define U8GLIB_LM6059_AF - #define SD_DETECT_INVERTED - #endif - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 4 - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - #endif - - // Generic support for SSD1306 / SH1106 OLED based LCDs. - #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) - #define ULTRA_LCD //general LCD support, also 16x2 - #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family) - #endif - - #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106) - #define ULTIMAKERCONTROLLER - #endif - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 4 - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - - #ifndef LONG_FILENAME_HOST_SUPPORT - #define LONG_FILENAME_HOST_SUPPORT - #endif - #endif - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define DOGLCD - #define U8GLIB_ST7920 - #define REPRAP_DISCOUNT_SMART_CONTROLLER - #endif - - #if ENABLED(ULTIMAKERCONTROLLER) \ - || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ - || ENABLED(G3D_PANEL) \ - || ENABLED(RIGIDBOT_PANEL) \ - || ENABLED(REPRAPWORLD_KEYPAD) - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(RA_CONTROL_PANEL) - #define LCD_I2C_TYPE_PCA8574 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define DOGLCD - #define U8GLIB_ST7920 - #define ULTIPANEL - #define NEWPANEL - #endif - - /** - * I2C PANELS - */ - - #if ENABLED(LCD_I2C_SAINSMART_YWROBOT) - // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home ) - // Make sure it is placed in the Arduino libraries directory. - #define LCD_I2C_TYPE_PCF8575 - #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define ULTIPANEL - #define NEWPANEL - #endif - - // PANELOLU2 LCD with status LEDs, separate encoder and click inputs - #if ENABLED(LCD_I2C_PANELOLU2) - #define LCD_I2C_TYPE_MCP23017 - #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 4 - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 1 - #endif - - #define ULTIPANEL - #define NEWPANEL - #endif - - // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs - #if ENABLED(LCD_I2C_VIKI) - // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 ) - // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. - // Note: The pause/stop/resume LCD button pin should be connected to the Arduino - // BTN_ENC pin (or set BTN_ENC to -1 if not used) - #define LCD_I2C_TYPE_MCP23017 - #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander - #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) - #define ULTIPANEL - #define NEWPANEL - - #define ENCODER_FEEDRATE_DEADZONE 4 - - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 1 - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 2 - #endif - #endif - - // Shift register panels - // --------------------- - // 2 wire Non-latching LCD SR from: - // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection - - #if ENABLED(SAV_3DLCD) - #define SR_LCD_2W_NL // Non latching 2 wire shift register - #define ULTIPANEL - #define NEWPANEL - #endif - - #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display - #ifndef LCD_WIDTH - #define LCD_WIDTH 22 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 5 - #endif - #endif - - #if ENABLED(ULTIPANEL) - #define NEWPANEL //enable this if you have a click-encoder panel - #define ULTRA_LCD - #ifndef LCD_WIDTH - #define LCD_WIDTH 20 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 4 - #endif - #else //no panel but just LCD - #if ENABLED(ULTRA_LCD) - #ifndef LCD_WIDTH - #define LCD_WIDTH 16 - #endif - #ifndef LCD_HEIGHT - #define LCD_HEIGHT 2 - #endif - #endif - #endif - - #if ENABLED(DOGLCD) - /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */ - // \x00 intentionally skipped to avoid problems in strings - #define LCD_STR_REFRESH "\x01" - #define LCD_STR_FOLDER "\x02" - #define LCD_STR_ARROW_RIGHT "\x03" - #define LCD_STR_UPLEVEL "\x04" - #define LCD_STR_CLOCK "\x05" - #define LCD_STR_FEEDRATE "\x06" - #define LCD_STR_BEDTEMP "\x07" - #define LCD_STR_THERMOMETER "\x08" - #define LCD_STR_DEGREE "\x09" - - #define LCD_STR_SPECIAL_MAX '\x09' - // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin. - // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here. - #else - /* Custom characters defined in the first 8 characters of the LCD */ - #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string! - #define LCD_STR_DEGREE "\x01" - #define LCD_STR_THERMOMETER "\x02" - #define LCD_STR_UPLEVEL "\x03" - #define LCD_STR_REFRESH "\x04" - #define LCD_STR_FOLDER "\x05" - #define LCD_STR_FEEDRATE "\x06" - #define LCD_STR_CLOCK "\x07" - #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */ - #endif - - /** - * Default LCD contrast for dogm-like LCD displays - */ - #if ENABLED(DOGLCD) - - #define HAS_LCD_CONTRAST ( \ - ENABLED(MAKRPANEL) \ - || ENABLED(CARTESIO_UI) \ - || ENABLED(VIKI2) \ - || ENABLED(miniVIKI) \ - || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \ - ) - - #if HAS_LCD_CONTRAST - #ifndef LCD_CONTRAST_MIN - #define LCD_CONTRAST_MIN 0 - #endif - #ifndef LCD_CONTRAST_MAX - #define LCD_CONTRAST_MAX 63 - #endif - #ifndef DEFAULT_LCD_CONTRAST - #define DEFAULT_LCD_CONTRAST 32 - #endif - #endif - #endif - - #ifndef BOOTSCREEN_TIMEOUT - #define BOOTSCREEN_TIMEOUT 2500 - #endif - - /** - * Extruders have some combination of stepper motors and hotends - * so we separate these concepts into the defines: - * - * EXTRUDERS - Number of Selectable Tools - * HOTENDS - Number of hotends, whether connected or separate - * E_STEPPERS - Number of actual E stepper motors - * TOOL_E_INDEX - Index to use when getting/setting the tool state - * - */ - #if ENABLED(SINGLENOZZLE) // One hotend, multi-extruder - #define HOTENDS 1 - #define E_STEPPERS EXTRUDERS - #define E_MANUAL EXTRUDERS - #define TOOL_E_INDEX current_block->active_extruder - #undef TEMP_SENSOR_1_AS_REDUNDANT - #undef HOTEND_OFFSET_X - #undef HOTEND_OFFSET_Y - #elif ENABLED(SWITCHING_EXTRUDER) // One E stepper, unified E axis, two hotends - #define HOTENDS EXTRUDERS - #define E_STEPPERS 1 - #define E_MANUAL 1 - #define TOOL_E_INDEX 0 - #ifndef HOTEND_OFFSET_Z - #define HOTEND_OFFSET_Z { 0 } - #endif - #elif ENABLED(MIXING_EXTRUDER) // Multi-stepper, unified E axis, one hotend - #define HOTENDS 1 - #define E_STEPPERS MIXING_STEPPERS - #define E_MANUAL 1 - #define TOOL_E_INDEX 0 - #else // One stepper, E axis, and hotend per tool - #define HOTENDS EXTRUDERS - #define E_STEPPERS EXTRUDERS - #define E_MANUAL EXTRUDERS - #define TOOL_E_INDEX current_block->active_extruder - #endif - -#endif //CONDITIONALS_LCD_H diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h deleted file mode 100644 index aa6b28a..0000000 --- a/Marlin/Conditionals_post.h +++ /dev/null @@ -1,663 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Conditionals_post.h - * Defines that depend on configuration but are not editable. - */ - -#ifndef CONDITIONALS_POST_H -#define CONDITIONALS_POST_H - - #if ENABLED(EMERGENCY_PARSER) - #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410" - #else - #define EMERGENCY_PARSER_CAPABILITIES "" - #endif - - /** - * Set ENDSTOPPULLUPS for unused endstop switches - */ - #if ENABLED(ENDSTOPPULLUPS) - #if ENABLED(USE_XMAX_PLUG) - #define ENDSTOPPULLUP_XMAX - #endif - #if ENABLED(USE_YMAX_PLUG) - #define ENDSTOPPULLUP_YMAX - #endif - #if ENABLED(USE_ZMAX_PLUG) - #define ENDSTOPPULLUP_ZMAX - #endif - #if ENABLED(USE_XMIN_PLUG) - #define ENDSTOPPULLUP_XMIN - #endif - #if ENABLED(USE_YMIN_PLUG) - #define ENDSTOPPULLUP_YMIN - #endif - #if ENABLED(USE_ZMIN_PLUG) - #define ENDSTOPPULLUP_ZMIN - #endif - #if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) - #define ENDSTOPPULLUP_ZMIN_PROBE - #endif - #endif - - /** - * Axis lengths - */ - #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) - #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) - #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) - - /** - * CoreXY and CoreXZ - */ - #if ENABLED(COREXY) - #define CORE_AXIS_1 A_AXIS // XY from A + B - #define CORE_AXIS_2 B_AXIS - #define NORMAL_AXIS Z_AXIS - #elif ENABLED(COREXZ) - #define CORE_AXIS_1 A_AXIS // XZ from A + C - #define CORE_AXIS_2 C_AXIS - #define NORMAL_AXIS Y_AXIS - #elif ENABLED(COREYZ) - #define CORE_AXIS_1 B_AXIS // YZ from B + C - #define CORE_AXIS_2 C_AXIS - #define NORMAL_AXIS X_AXIS - #endif - - /** - * SCARA - */ - #if ENABLED(SCARA) - #undef SLOWDOWN - #define QUICK_HOME //SCARA needs Quickhome - #endif - - /** - * Set the home position based on settings or manual overrides - */ - #ifdef MANUAL_X_HOME_POS - #define X_HOME_POS MANUAL_X_HOME_POS - #elif ENABLED(BED_CENTER_AT_0_0) - #if ENABLED(DELTA) - #define X_HOME_POS 0 - #else - #define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5) - #endif - #else - #if ENABLED(DELTA) - #define X_HOME_POS ((X_MAX_LENGTH) * 0.5) - #else - #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) - #endif - #endif - - #ifdef MANUAL_Y_HOME_POS - #define Y_HOME_POS MANUAL_Y_HOME_POS - #elif ENABLED(BED_CENTER_AT_0_0) - #if ENABLED(DELTA) - #define Y_HOME_POS 0 - #else - #define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5) - #endif - #else - #if ENABLED(DELTA) - #define Y_HOME_POS ((Y_MAX_LENGTH) * 0.5) - #else - #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) - #endif - #endif - - #ifdef MANUAL_Z_HOME_POS - #define Z_HOME_POS MANUAL_Z_HOME_POS - #else - #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) - #endif - - /** - * The BLTouch Probe emulates a servo probe - */ - #if ENABLED(BLTOUCH) - #undef Z_ENDSTOP_SERVO_NR - #undef Z_SERVO_ANGLES - #define Z_ENDSTOP_SERVO_NR 0 - #define Z_SERVO_ANGLES {10,90} // For BLTouch 10=deploy, 90=retract - #undef DEACTIVATE_SERVOS_AFTER_MOVE - #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #undef Z_MIN_ENDSTOP_INVERTING - #define Z_MIN_ENDSTOP_INVERTING false - #endif - #endif - - /** - * Auto Bed Leveling and Z Probe Repeatability Test - */ - #define HAS_PROBING_PROCEDURE (ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)) - - // Boundaries for probing based on set limits - #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) - #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) - #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) - #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) - - #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0) - - /** - * Z Sled Probe requires Z_SAFE_HOMING - */ - #if ENABLED(Z_PROBE_SLED) - #define Z_SAFE_HOMING - #endif - - /** - * DELTA should ignore Z_SAFE_HOMING - */ - #if ENABLED(DELTA) - #undef Z_SAFE_HOMING - #endif - - /** - * Safe Homing Options - */ - #if ENABLED(Z_SAFE_HOMING) - #ifndef Z_SAFE_HOMING_X_POINT - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) - #endif - #ifndef Z_SAFE_HOMING_Y_POINT - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) - #endif - #endif - - /** - * Host keep alive - */ - #ifndef DEFAULT_KEEPALIVE_INTERVAL - #define DEFAULT_KEEPALIVE_INTERVAL 2 - #endif - - /** - * MAX_STEP_FREQUENCY differs for TOSHIBA - */ - #if ENABLED(CONFIG_STEPPERS_TOSHIBA) - #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers - #else - #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) - #endif - - // MS1 MS2 Stepper Driver Microstepping mode table - #define MICROSTEP1 LOW,LOW - #define MICROSTEP2 HIGH,LOW - #define MICROSTEP4 LOW,HIGH - #define MICROSTEP8 HIGH,HIGH - #define MICROSTEP16 HIGH,HIGH - - /** - * Advance calculated values - */ - #if ENABLED(ADVANCE) - #define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI) - #define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS] / (EXTRUSION_AREA)) - #endif - - #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #undef SD_DETECT_INVERTED - #endif - - /** - * Set defaults for missing (newer) options - */ - #ifndef DISABLE_INACTIVE_X - #define DISABLE_INACTIVE_X DISABLE_X - #endif - #ifndef DISABLE_INACTIVE_Y - #define DISABLE_INACTIVE_Y DISABLE_Y - #endif - #ifndef DISABLE_INACTIVE_Z - #define DISABLE_INACTIVE_Z DISABLE_Z - #endif - #ifndef DISABLE_INACTIVE_E - #define DISABLE_INACTIVE_E DISABLE_E - #endif - - // Power Signal Control Definitions - // By default use ATX definition - #ifndef POWER_SUPPLY - #define POWER_SUPPLY 1 - #endif - #if (POWER_SUPPLY == 1) // 1 = ATX - #define PS_ON_AWAKE LOW - #define PS_ON_ASLEEP HIGH - #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W - #define PS_ON_AWAKE HIGH - #define PS_ON_ASLEEP LOW - #endif - #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON)) - - /** - * Temp Sensor defines - */ - #if TEMP_SENSOR_0 == -3 - #define HEATER_0_USES_MAX6675 - #define MAX6675_IS_MAX31855 - #elif TEMP_SENSOR_0 == -2 - #define HEATER_0_USES_MAX6675 - #elif TEMP_SENSOR_0 == -1 - #define HEATER_0_USES_AD595 - #elif TEMP_SENSOR_0 == 0 - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP - #elif TEMP_SENSOR_0 > 0 - #define THERMISTORHEATER_0 TEMP_SENSOR_0 - #define HEATER_0_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_1 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1" - #elif TEMP_SENSOR_1 == -1 - #define HEATER_1_USES_AD595 - #elif TEMP_SENSOR_1 == 0 - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP - #elif TEMP_SENSOR_1 > 0 - #define THERMISTORHEATER_1 TEMP_SENSOR_1 - #define HEATER_1_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_2 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2" - #elif TEMP_SENSOR_2 == -1 - #define HEATER_2_USES_AD595 - #elif TEMP_SENSOR_2 == 0 - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP - #elif TEMP_SENSOR_2 > 0 - #define THERMISTORHEATER_2 TEMP_SENSOR_2 - #define HEATER_2_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_3 <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3" - #elif TEMP_SENSOR_3 == -1 - #define HEATER_3_USES_AD595 - #elif TEMP_SENSOR_3 == 0 - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP - #elif TEMP_SENSOR_3 > 0 - #define THERMISTORHEATER_3 TEMP_SENSOR_3 - #define HEATER_3_USES_THERMISTOR - #endif - - #if TEMP_SENSOR_BED <= -2 - #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED" - #elif TEMP_SENSOR_BED == -1 - #define BED_USES_AD595 - #elif TEMP_SENSOR_BED == 0 - #undef BED_MINTEMP - #undef BED_MAXTEMP - #elif TEMP_SENSOR_BED > 0 - #define THERMISTORBED TEMP_SENSOR_BED - #define BED_USES_THERMISTOR - #endif - - /** - * Flags for PID handling - */ - #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)) - #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED)) - - /** - * Default hotend offsets, if not defined - */ - #if HOTENDS > 1 - #ifndef HOTEND_OFFSET_X - #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder - #endif - #ifndef HOTEND_OFFSET_Y - #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder - #endif - #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER)) - #define HOTEND_OFFSET_Z { 0 } - #endif - #endif - - /** - * ARRAY_BY_EXTRUDERS based on EXTRUDERS - */ - #define ARRAY_BY_EXTRUDERS(args...) ARRAY_N(EXTRUDERS, args) - #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1) - - /** - * ARRAY_BY_HOTENDS based on HOTENDS - */ - #define ARRAY_BY_HOTENDS(args...) ARRAY_N(HOTENDS, args) - #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) - - /** - * Z_DUAL_ENDSTOPS endstop reassignment - */ - #if ENABLED(Z_DUAL_ENDSTOPS) - #define _XMIN_ 100 - #define _YMIN_ 200 - #define _ZMIN_ 300 - #define _XMAX_ 101 - #define _YMAX_ 201 - #define _ZMAX_ 301 - #if Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN X_MAX_PIN - #undef USE_XMAX_PLUG - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN Y_MAX_PIN - #undef USE_YMAX_PLUG - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING - #define Z2_MAX_PIN Z_MAX_PIN - #undef USE_ZMAX_PLUG - #elif Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN X_MIN_PIN - #undef USE_XMIN_PLUG - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN Y_MIN_PIN - #undef USE_YMIN_PLUG - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING - #define Z2_MAX_PIN Z_MIN_PIN - #undef USE_ZMIN_PLUG - #else - #define Z2_MAX_ENDSTOP_INVERTING false - #endif - #endif - - /** - * Shorthand for pin tests, used wherever needed - */ - #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2) - #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2) - #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2) - #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2) - #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) - #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) - #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1)) - #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2)) - #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3)) - #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED)) - #define HAS_AUTO_FAN_0 (PIN_EXISTS(EXTRUDER_0_AUTO_FAN)) - #define HAS_AUTO_FAN_1 (PIN_EXISTS(EXTRUDER_1_AUTO_FAN)) - #define HAS_AUTO_FAN_2 (PIN_EXISTS(EXTRUDER_2_AUTO_FAN)) - #define HAS_AUTO_FAN_3 (PIN_EXISTS(EXTRUDER_3_AUTO_FAN)) - #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) - #define HAS_FAN0 (PIN_EXISTS(FAN)) - #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN1_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN1_PIN) - #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && EXTRUDER_0_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_1_AUTO_FAN_PIN != FAN2_PIN && EXTRUDER_2_AUTO_FAN_PIN != FAN2_PIN) - #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN)) - #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) - #define HAS_SERVO_0 (PIN_EXISTS(SERVO0)) - #define HAS_SERVO_1 (PIN_EXISTS(SERVO1)) - #define HAS_SERVO_2 (PIN_EXISTS(SERVO2)) - #define HAS_SERVO_3 (PIN_EXISTS(SERVO3)) - #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH)) - #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT)) - #define HAS_HOME (PIN_EXISTS(HOME)) - #define HAS_KILL (PIN_EXISTS(KILL)) - #define HAS_SUICIDE (PIN_EXISTS(SUICIDE)) - #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH)) - #define HAS_X_MIN (PIN_EXISTS(X_MIN)) - #define HAS_X_MAX (PIN_EXISTS(X_MAX)) - #define HAS_Y_MIN (PIN_EXISTS(Y_MIN)) - #define HAS_Y_MAX (PIN_EXISTS(Y_MAX)) - #define HAS_Z_MIN (PIN_EXISTS(Z_MIN)) - #define HAS_Z_MAX (PIN_EXISTS(Z_MAX)) - #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN)) - #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX)) - #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE)) - #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1)) - #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2)) - #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3)) - #define HAS_MICROSTEPS (PIN_EXISTS(X_MS1)) - #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1)) - #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1)) - #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1)) - #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) - #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE)) - #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE)) - #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE)) - #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE)) - #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE)) - #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE)) - #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE)) - #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE)) - #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE)) - #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE)) - #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE)) - #define HAS_X_DIR (PIN_EXISTS(X_DIR)) - #define HAS_X2_DIR (PIN_EXISTS(X2_DIR)) - #define HAS_Y_DIR (PIN_EXISTS(Y_DIR)) - #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR)) - #define HAS_Z_DIR (PIN_EXISTS(Z_DIR)) - #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR)) - #define HAS_E0_DIR (PIN_EXISTS(E0_DIR)) - #define HAS_E1_DIR (PIN_EXISTS(E1_DIR)) - #define HAS_E2_DIR (PIN_EXISTS(E2_DIR)) - #define HAS_E3_DIR (PIN_EXISTS(E3_DIR)) - #define HAS_E4_DIR (PIN_EXISTS(E4_DIR)) - #define HAS_X_STEP (PIN_EXISTS(X_STEP)) - #define HAS_X2_STEP (PIN_EXISTS(X2_STEP)) - #define HAS_Y_STEP (PIN_EXISTS(Y_STEP)) - #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP)) - #define HAS_Z_STEP (PIN_EXISTS(Z_STEP)) - #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP)) - #define HAS_E0_STEP (PIN_EXISTS(E0_STEP)) - #define HAS_E1_STEP (PIN_EXISTS(E1_STEP)) - #define HAS_E2_STEP (PIN_EXISTS(E2_STEP)) - #define HAS_E3_STEP (PIN_EXISTS(E3_STEP)) - #define HAS_E4_STEP (PIN_EXISTS(E4_STEP)) - #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) - #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER)) - - #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) - - #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) - - #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED)) - - /** - * This value is used by M109 when trying to calculate a ballpark safe margin - * to prevent wait-forever situation. - */ - #ifndef EXTRUDE_MINTEMP - #define EXTRUDE_MINTEMP 170 - #endif - - /** - * Helper Macros for heaters and extruder fan - */ - #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v) - #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) - #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v) - #if HOTENDS > 2 - #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v) - #if HOTENDS > 3 - #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v) - #endif - #endif - #endif - #if ENABLED(HEATERS_PARALLEL) - #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); } - #else - #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v) - #endif - #if HAS_HEATER_BED - #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, v) - #endif - - /** - * Up to 3 PWM fans - */ - #if HAS_FAN2 - #define FAN_COUNT 3 - #elif HAS_FAN1 - #define FAN_COUNT 2 - #elif HAS_FAN0 - #define FAN_COUNT 1 - #else - #define FAN_COUNT 0 - #endif - - #if HAS_FAN0 - #define WRITE_FAN(v) WRITE(FAN_PIN, v) - #define WRITE_FAN0(v) WRITE_FAN(v) - #endif - #if HAS_FAN1 - #define WRITE_FAN1(v) WRITE(FAN1_PIN, v) - #endif - #if HAS_FAN2 - #define WRITE_FAN2(v) WRITE(FAN2_PIN, v) - #endif - #define WRITE_FAN_N(n, v) WRITE_FAN##n(v) - - /** - * Servos and probes - */ - - #if HAS_SERVOS - #ifndef Z_ENDSTOP_SERVO_NR - #define Z_ENDSTOP_SERVO_NR -1 - #endif - #endif - - #define PROBE_SELECTED (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED)) - - #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))) - - #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED) - - #if ENABLED(Z_PROBE_ALLEN_KEY) - #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST - #endif - - /** - * Bed Probe dependencies - */ - #if HAS_BED_PROBE - #ifndef Z_PROBE_OFFSET_RANGE_MIN - #define Z_PROBE_OFFSET_RANGE_MIN -20 - #endif - #ifndef Z_PROBE_OFFSET_RANGE_MAX - #define Z_PROBE_OFFSET_RANGE_MAX 20 - #endif - #ifndef XY_PROBE_SPEED - #ifdef HOMING_FEEDRATE_XY - #define XY_PROBE_SPEED HOMING_FEEDRATE_XY - #else - #define XY_PROBE_SPEED 4000 - #endif - #endif - #if Z_PROBE_TRAVEL_HEIGHT > Z_PROBE_DEPLOY_HEIGHT - #define _Z_PROBE_DEPLOY_HEIGHT Z_PROBE_TRAVEL_HEIGHT - #else - #define _Z_PROBE_DEPLOY_HEIGHT Z_PROBE_DEPLOY_HEIGHT - #endif - #else - #undef X_PROBE_OFFSET_FROM_EXTRUDER - #undef Y_PROBE_OFFSET_FROM_EXTRUDER - #undef Z_PROBE_OFFSET_FROM_EXTRUDER - #define X_PROBE_OFFSET_FROM_EXTRUDER 0 - #define Y_PROBE_OFFSET_FROM_EXTRUDER 0 - #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 - #endif - - /** - * Delta radius/rod trimmers - */ - #if ENABLED(DELTA) - #ifndef DELTA_RADIUS_TRIM_TOWER_1 - #define DELTA_RADIUS_TRIM_TOWER_1 0.0 - #endif - #ifndef DELTA_RADIUS_TRIM_TOWER_2 - #define DELTA_RADIUS_TRIM_TOWER_2 0.0 - #endif - #ifndef DELTA_RADIUS_TRIM_TOWER_3 - #define DELTA_RADIUS_TRIM_TOWER_3 0.0 - #endif - #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1 - #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0 - #endif - #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_2 - #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0 - #endif - #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3 - #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0 - #endif - #if ENABLED(AUTO_BED_LEVELING_GRID) - #define DELTA_BED_LEVELING_GRID - #endif - #endif - - /** - * When not using other bed leveling... - */ - #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(AUTO_BED_LEVELING_GRID) && DISABLED(DELTA_BED_LEVELING_GRID) - #define AUTO_BED_LEVELING_3POINT - #endif - - /** - * Buzzer/Speaker - */ - #if ENABLED(LCD_USE_I2C_BUZZER) - #ifndef LCD_FEEDBACK_FREQUENCY_HZ - #define LCD_FEEDBACK_FREQUENCY_HZ 1000 - #endif - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 - #endif - #elif PIN_EXISTS(BEEPER) - #ifndef LCD_FEEDBACK_FREQUENCY_HZ - #define LCD_FEEDBACK_FREQUENCY_HZ 5000 - #endif - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 - #endif - #else - #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS - #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 - #endif - #endif - - /** - * Z_HOMING_HEIGHT / Z_PROBE_TRAVEL_HEIGHT - */ - #ifndef Z_HOMING_HEIGHT - #ifndef Z_PROBE_TRAVEL_HEIGHT - #define Z_HOMING_HEIGHT 0 - #else - #define Z_HOMING_HEIGHT Z_PROBE_TRAVEL_HEIGHT - #endif - #endif - #ifndef Z_PROBE_TRAVEL_HEIGHT - #define Z_PROBE_TRAVEL_HEIGHT Z_HOMING_HEIGHT - #endif - -#endif // CONDITIONALS_POST_H diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h deleted file mode 100644 index 38e0ded..0000000 --- a/Marlin/Configuration.h +++ /dev/null @@ -1,1363 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_SWIFT_10 -#endif - - -#define UARM_SWIFT - -//#define DEBUG -//#define SWIFT_TEST_MODE - -#define HW_VER "3.3" -#define SW_VER_BASE "3.1.4" - -#ifdef SWIFT_TEST_MODE -#define SW_VER SW_VER_BASE"_t" -#elif defined(DEBUG) -#define SW_VER SW_VER_BASE"_d" -#else -#define SW_VER SW_VER_BASE -#endif - -#define DEVICE_NAME "SwiftPro" - -#define SEGMENTS_PER_SECOND 160 - - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 2 // (seconds) -#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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} - -#define X_ENABLE_ON 1 -#define Y_ENABLE_ON 1 -#define Z_ENABLE_ON 1 -#define E_ENABLE_ON 0 // For all extruders - - - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. - -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -300 -#define Y_MIN_POS -300 -#define Z_MIN_POS -300 -#define X_MAX_POS 300 -#define Y_MAX_POS 300 -#define Z_MAX_POS 300 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings -#define DECELERATE_MULTIPLE (20.0f/36.0f) -#define MIROC 128 -#define GEAR_RATIO 4.5 -#define DEFAULT_AXIS_STEPS_PER_UNIT { DECELERATE_MULTIPLE*MIROC*GEAR_RATIO,\ - DECELERATE_MULTIPLE*MIROC*GEAR_RATIO,\ - DECELERATE_MULTIPLE*MIROC*GEAR_RATIO, 360/3.1415926/12*16/1.8} - - - -//#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 25 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 25 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 100 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 1.0 // (mm/sec) -#define DEFAULT_ZJERK 1.0 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -//#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h deleted file mode 100644 index 2cafe11..0000000 --- a/Marlin/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X false -#define DISABLE_INACTIVE_Y false -#define DISABLE_INACTIVE_Z false // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E false - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -//#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/GroveColorSensor.cpp b/Marlin/GroveColorSensor.cpp deleted file mode 100644 index a6f3e8b..0000000 --- a/Marlin/GroveColorSensor.cpp +++ /dev/null @@ -1,270 +0,0 @@ -#include "GroveColorSensor.h" -#include -//#include - -// Default constructor -GroveColorSensor::GroveColorSensor() - : triggerMode_(INTEG_MODE_FREE | INTEG_PARAM_PULSE_COUNT1) - , interruptSource_(INT_SOURCE_CLEAR) - , interruptMode_(INTR_LEVEL | INTR_PERSIST_EVERY) - , gainAndPrescaler_(GAIN_1 | PRESCALER_1) - , sensorAddress_(COLOR_SENSOR_ADDR) -{ - -} - - -GroveColorSensor::init() -{ - GroveColorSensor::setTimingReg(); - GroveColorSensor::setInterruptSourceReg(); - GroveColorSensor::setInterruptControlReg(); - GroveColorSensor::setGain(); - GroveColorSensor::setEnableADC(); -} - -// Constructor with parameters -GroveColorSensor::GroveColorSensor( - const int& triggerMode - , const int& interruptSource - , const int& interruptMode - , const int& gainAndPrescaler - , const int& sensorAddress) - : triggerMode_(triggerMode) - , interruptSource_(interruptSource) - , interruptMode_(interruptMode) - , gainAndPrescaler_(gainAndPrescaler) - , sensorAddress_(sensorAddress) -{} - -void GroveColorSensor::setTimingReg() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_TIMING); - Wire.write(triggerMode_); - Wire.endTransmission(); - delay(10); -} - -void GroveColorSensor::setInterruptSourceReg() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_INT_SOURCE); - Wire.write(interruptSource_); - Wire.endTransmission(); - delay(10); -} - -void GroveColorSensor::setInterruptControlReg() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_INT); - Wire.write(interruptMode_); - Wire.endTransmission(); - delay(10); -} - -void GroveColorSensor::setGain() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_GAIN); - Wire.write(gainAndPrescaler_); - Wire.endTransmission(); -} - -void GroveColorSensor::setEnableADC() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_CTL); - Wire.write(CTL_DAT_INIITIATE); - Wire.endTransmission(); - delay(10); -} - -void GroveColorSensor::clearInterrupt() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(CLR_INT); - Wire.endTransmission(); -} - -void GroveColorSensor::readRGB() -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_BLOCK_READ); - Wire.endTransmission(); - - Wire.beginTransmission(sensorAddress_); - Wire.requestFrom(sensorAddress_, 8); - delay(100); - - // if two bytes were received - if(8 <= Wire.available()) - { - int i; - for(i = 0; i < 8; ++i) - { - readingdata_[i] = Wire.read(); - Serial.println(readingdata_[i], BIN); - } - } - green_ = readingdata_[1] * 256 + readingdata_[0]; - red_ = readingdata_[3] * 256 + readingdata_[2]; - blue_ = readingdata_[5] * 256 + readingdata_[4]; - clear_ = readingdata_[7] * 256 + readingdata_[6]; - - Serial.print("The RGB value are: RGB( "); - Serial.print(red_,DEC); - Serial.print(", "); - Serial.print(green_,DEC); - Serial.print(", "); - Serial.print(blue_,DEC); - Serial.println(" )"); - Serial.print("The Clear channel value are: "); - Serial.println(clear_,DEC); -} - -void GroveColorSensor::readRGB(int *red, int *green, int *blue) -{ - Wire.beginTransmission(sensorAddress_); - Wire.write(REG_BLOCK_READ); - Wire.endTransmission(); - - Wire.beginTransmission(sensorAddress_); - Wire.requestFrom(sensorAddress_, 8); - delay(100); - - // if two bytes were received - if(8 <= Wire.available()) - { - int i; - for(i = 0; i < 8; ++i) - { - readingdata_[i] = Wire.read(); - //Serial.println(readingdata_[i], BIN); - } - } - green_ = readingdata_[1] * 256 + readingdata_[0]; - red_ = readingdata_[3] * 256 + readingdata_[2]; - blue_ = readingdata_[5] * 256 + readingdata_[4]; - clear_ = readingdata_[7] * 256 + readingdata_[6]; - - double tmp; - int maxColor; - - if ( ledStatus == 1 ) - { - red_ = red_ * 1.70; - blue_ = blue_ * 1.35; - - maxColor = max(red_, green_); - maxColor = max(maxColor, blue_); - - if(maxColor > 255) - { - tmp = 250.0/maxColor; - green_ *= tmp; - red_ *= tmp; - blue_ *= tmp; - } - } - if ( ledStatus == 0 ) - { - maxColor = max(red_, green_); - maxColor = max(maxColor, blue_); - - tmp = 250.0/maxColor; - green_ *= tmp; - red_ *= tmp; - blue_ *= tmp; - - } - - int minColor = min(red_, green_); - minColor = min(maxColor, blue_); - maxColor = max(red_, green_); - maxColor = max(maxColor, blue_); - - int greenTmp = green_; - int redTmp = red_; - int blueTmp = blue_; - -//when turn on LED, need to adjust the RGB data,otherwise it is almost the white color - if(red_ < 0.8*maxColor && red_ >= 0.6*maxColor) - { - red_ *= 0.4; - } - else if(red_ < 0.6*maxColor) - { - red_ *= 0.2; - } - - if(green_ < 0.8*maxColor && green_ >= 0.6*maxColor) - { - green_ *= 0.4; - } - else if(green_ < 0.6*maxColor) - { - if (maxColor == redTmp && greenTmp >= 2*blueTmp && greenTmp >= 0.2*redTmp) //orange - { - green_ *= 5; - } - green_ *= 0.2; - } - - if(blue_ < 0.8*maxColor && blue_ >= 0.6*maxColor) - { - blue_ *= 0.4; - } - else if(blue_ < 0.6*maxColor) - { - if (maxColor == redTmp && greenTmp >= 2*blueTmp && greenTmp >= 0.2*redTmp) //orange - { - blue_ *= 0.5; - } - if (maxColor == redTmp && greenTmp <= blueTmp && blueTmp >= 0.2*redTmp) //pink - { - blue_ *= 5; - } - blue_ *= 0.2; - } - - minColor = min(red_, green_); - minColor = min(maxColor, blue_); - if(maxColor == green_ && red_ >= 0.85*maxColor && minColor == blue_) //yellow - { - red_ = maxColor; - blue_ *= 0.4; - } - - *red = red_; - *green = green_; - *blue = blue_; -} - -void GroveColorSensor::calculateCoordinate() -{ - double X; - double Y; - double Z; - double x; - double y; - - X = (-0.14282) * red_ + (1.54924) * green_ + (-0.95641) * blue_; - Y = (-0.32466) * red_ + (1.57837) * green_ + (-0.73191) * blue_; - Z = (-0.68202) * red_ + (0.77073) * green_ + (0.563320) * blue_; - - x = X / (X + Y + Z); - y = Y / (X + Y + Z); - - if( (X > 0) && ( Y > 0) && ( Z > 0) ) - { - Serial.println("The x,y values are("); - Serial.print(x, 2); - Serial.print(" , "); - Serial.print(y, 2); - Serial.println(")"); - } - else - Serial.println("Error: overflow!"); -} \ No newline at end of file diff --git a/Marlin/GroveColorSensor.h b/Marlin/GroveColorSensor.h deleted file mode 100644 index 06b18d9..0000000 --- a/Marlin/GroveColorSensor.h +++ /dev/null @@ -1,68 +0,0 @@ -/****************************************************************************/ -// Hardware: Grove - I2C Color Sensor -// Arduino IDE: Arduino-1.6 -// -// Refactored version of the library by FrankieChu - www.seeedstudio.com -// -/******************************************************************************/ - -#ifndef GROVECOLORSENSOR -#define GROVECOLORSENSOR - - -#include - -#include "GroveRegisters.h" - -class GroveColorSensor -{ -public: - - // Color Sensor LED Status - int ledStatus; - // Default constructor - GroveColorSensor(); - - init(); - // Constructor with parameters - GroveColorSensor( - const int& triggerMode - , const int& interruptSource - , const int& interruptMode - , const int& gainAndPrescaler - , const int& sensorAddress); - - void readRGB(); - void readRGB(int *red, int *green, int *blue); - void calculateCoordinate(); - void clearInterrupt(); - -private: - - // Set trigger mode. Including free mode, manually mode, single synchronization mode or so. - void setTimingReg(); - // Set interrupt source - void setInterruptSourceReg(); - // Set interrupt mode - void setInterruptControlReg(); - // Set gain value and pre-scaler value - void setGain(); - // Start ADC of the colour sensor - void setEnableADC(); - - // Used for storing the colour data - int readingdata_[8]; - int green_; - int red_; - int blue_; - int clear_; - - int triggerMode_; - int interruptSource_; - int interruptMode_; - int gainAndPrescaler_; - int sensorAddress_; - -}; - -#endif \ No newline at end of file diff --git a/Marlin/GroveRegisters.h b/Marlin/GroveRegisters.h deleted file mode 100644 index 13a28f2..0000000 --- a/Marlin/GroveRegisters.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef GROVECOLORSENSORREG -#define GROVECOLORSENSORREG - -//the I2C address for the color sensor -#define COLOR_SENSOR_ADDR 0x39 -#define REG_CTL 0x80 -#define REG_TIMING 0x81 -#define REG_INT 0x82 -#define REG_INT_SOURCE 0x83 -#define REG_ID 0x84 -#define REG_GAIN 0x87 -#define REG_LOW_THRESH_LOW_BYTE 0x88 -#define REG_LOW_THRESH_HIGH_BYTE 0x89 -#define REG_HIGH_THRESH_LOW_BYTE 0x8A -#define REG_HIGH_THRESH_HIGH_BYTE 0x8B -//The REG_BLOCK_READ and REG_GREEN_LOW direction are the same -#define REG_BLOCK_READ 0xD0 -#define REG_GREEN_LOW 0xD0 -#define REG_GREEN_HIGH 0xD1 -#define REG_RED_LOW 0xD2 -#define REG_RED_HIGH 0xD3 -#define REG_BLUE_LOW 0xD4 -#define REG_BLUE_HIGH 0xD5 -#define REG_CLEAR_LOW 0xD6 -#define REG_CLEAR_HIGH 0xD7 -#define CTL_DAT_INIITIATE 0x03 -#define CLR_INT 0xE0 - -//Timing Register -#define SYNC_EDGE 0x40 -#define INTEG_MODE_FREE 0x00 -#define INTEG_MODE_MANUAL 0x10 -#define INTEG_MODE_SYN_SINGLE 0x20 -#define INTEG_MODE_SYN_MULTI 0x30 - -#define INTEG_PARAM_PULSE_COUNT1 0x00 -#define INTEG_PARAM_PULSE_COUNT2 0x01 -#define INTEG_PARAM_PULSE_COUNT4 0x02 -#define INTEG_PARAM_PULSE_COUNT8 0x03 - -//Interrupt Control Register -#define INTR_STOP 40 -#define INTR_DISABLE 0x00 -#define INTR_LEVEL 0x10 -#define INTR_PERSIST_EVERY 0x00 -#define INTR_PERSIST_SINGLE 0x01 - -//Interrupt Souce Register -#define INT_SOURCE_GREEN 0x00 -#define INT_SOURCE_RED 0x01 -#define INT_SOURCE_BLUE 0x10 -#define INT_SOURCE_CLEAR 0x03 - -//Gain Register -#define GAIN_1 0x00 -#define GAIN_4 0x10 -#define GAIN_16 0x20 -#define GANI_64 0x30 -#define PRESCALER_1 0x00 -#define PRESCALER_2 0x01 -#define PRESCALER_4 0x02 -#define PRESCALER_8 0x03 -#define PRESCALER_16 0x04 -#define PRESCALER_32 0x05 -#define PRESCALER_64 0x06 - -#endif \ No newline at end of file diff --git a/Marlin/M100_Free_Mem_Chk.cpp b/Marlin/M100_Free_Mem_Chk.cpp deleted file mode 100644 index 8268946..0000000 --- a/Marlin/M100_Free_Mem_Chk.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * M100 Free Memory Watcher - * - * This code watches the free memory block between the bottom of the heap and the top of the stack. - * This memory block is initialized and watched via the M100 command. - * - * M100 I Initializes the free memory block and prints vitals statistics about the area - * M100 F Identifies how much of the free memory block remains free and unused. It also - * detects and reports any corruption within the free memory block that may have - * happened due to errant firmware. - * M100 D Does a hex display of the free memory block along with a flag for any errant - * data that does not match the expected value. - * M100 C x Corrupts x locations within the free memory block. This is useful to check the - * correctness of the M100 F and M100 D commands. - * - * Initial version by Roxy-3DPrintBoard - */ -#define M100_FREE_MEMORY_DUMPER // Comment out to remove Dump sub-command -#define M100_FREE_MEMORY_CORRUPTOR // Comment out to remove Corrupt sub-command - -#include "Marlin.h" - -#if ENABLED(M100_FREE_MEMORY_WATCHER) -extern char* __brkval; -extern size_t __heap_start, __heap_end, __flp; -extern char __bss_end; - -// -// Utility functions used by M100 to get its work done. -// - -char* top_of_stack(); -void prt_hex_nibble(unsigned int); -void prt_hex_byte(unsigned int); -void prt_hex_word(unsigned int); -int how_many_E5s_are_here(char*); - -void gcode_M100() { - static bool m100_not_initialized = true; - char* sp, *ptr; - int i, j, n; - // - // M100 D dumps the free memory block from __brkval to the stack pointer. - // malloc() eats memory from the start of the block and the stack grows - // up from the bottom of the block. Solid 0xE5's indicate nothing has - // used that memory yet. There should not be anything but 0xE5's within - // the block of 0xE5's. If there is, that would indicate memory corruption - // probably caused by bad pointers. Any unexpected values will be flagged in - // the right hand column to help spotting them. - // - #if ENABLED(M100_FREE_MEMORY_DUMPER) // Disable to remove Dump sub-command - if (code_seen('D')) { - ptr = __brkval ? __brkval : &__bss_end; - // - // We want to start and end the dump on a nice 16 byte boundry even though - // the values we are using are not 16 byte aligned. - // - SERIAL_ECHOPGM("\nbss_end : "); - prt_hex_word((unsigned int) ptr); - ptr = (char*)((unsigned long) ptr & 0xfff0); - sp = top_of_stack(); - SERIAL_ECHOPGM("\nStack Pointer : "); - prt_hex_word((unsigned int) sp); - SERIAL_EOL; - sp = (char*)((unsigned long) sp | 0x000f); - n = sp - ptr; - // - // This is the main loop of the Dump command. - // - while (ptr < sp) { - prt_hex_word((unsigned int) ptr); // Print the address - SERIAL_CHAR(':'); - for (i = 0; i < 16; i++) { // and 16 data bytes - prt_hex_byte(*(ptr + i)); - SERIAL_CHAR(' '); - } - SERIAL_CHAR('|'); // now show where non 0xE5's are - for (i = 0; i < 16; i++) { - if (*(ptr + i) == (char)0xe5) - SERIAL_CHAR(' '); - else - SERIAL_CHAR('?'); - } - SERIAL_EOL; - ptr += 16; - } - return; - } - #endif - // - // M100 F requests the code to return the number of free bytes in the memory pool along with - // other vital statistics that define the memory pool. - // - if (code_seen('F')) { - #if 0 - int max_addr = (int) __brkval ? __brkval : &__bss_end; - int max_cnt = 0; - #endif - int block_cnt = 0; - ptr = __brkval ? __brkval : &__bss_end; - sp = top_of_stack(); - n = sp - ptr; - // Scan through the range looking for the biggest block of 0xE5's we can find - for (i = 0; i < n; i++) { - if (*(ptr + i) == (char)0xe5) { - j = how_many_E5s_are_here(ptr + i); - if (j > 8) { - SERIAL_ECHOPAIR("Found ", j); - SERIAL_ECHOPGM(" bytes free at 0x"); - prt_hex_word((int) ptr + i); - SERIAL_EOL; - i += j; - block_cnt++; - } - #if 0 - if (j > max_cnt) { // We don't do anything with this information yet - max_cnt = j; // but we do know where the biggest free memory block is. - max_addr = (int) ptr + i; - } - #endif - } - } - if (block_cnt > 1) - SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area."); - return; - } - // - // M100 C x Corrupts x locations in the free memory pool and reports the locations of the corruption. - // This is useful to check the correctness of the M100 D and the M100 F commands. - // - #if ENABLED(M100_FREE_MEMORY_CORRUPTOR) - if (code_seen('C')) { - int x = code_value_int(); // x gets the # of locations to corrupt within the memory pool - SERIAL_ECHOLNPGM("Corrupting free memory block.\n"); - ptr = __brkval ? __brkval : &__bss_end; - SERIAL_ECHOPAIR("\nbss_end : ", ptr); - ptr += 8; - sp = top_of_stack(); - SERIAL_ECHOPAIR("\nStack Pointer : ", sp); - SERIAL_ECHOLNPGM("\n"); - n = sp - ptr - 64; // -64 just to keep us from finding interrupt activity that - // has altered the stack. - j = n / (x + 1); - for (i = 1; i <= x; i++) { - *(ptr + (i * j)) = i; - SERIAL_ECHOPGM("\nCorrupting address: 0x"); - prt_hex_word((unsigned int)(ptr + (i * j))); - } - SERIAL_ECHOLNPGM("\n"); - return; - } - #endif - // - // M100 I Initializes the free memory pool so it can be watched and prints vital - // statistics that define the free memory pool. - // - if (m100_not_initialized || code_seen('I')) { // If no sub-command is specified, the first time - SERIAL_ECHOLNPGM("Initializing free memory block.\n"); // this happens, it will Initialize. - ptr = __brkval ? __brkval : &__bss_end; // Repeated M100 with no sub-command will not destroy the - SERIAL_ECHOPAIR("\nbss_end : ", ptr); // state of the initialized free memory pool. - ptr += 8; - sp = top_of_stack(); - SERIAL_ECHOPAIR("\nStack Pointer : ", sp); - SERIAL_ECHOLNPGM("\n"); - n = sp - ptr - 64; // -64 just to keep us from finding interrupt activity that - // has altered the stack. - SERIAL_ECHO(n); - SERIAL_ECHOLNPGM(" bytes of memory initialized.\n"); - for (i = 0; i < n; i++) - *(ptr + i) = (char)0xe5; - for (i = 0; i < n; i++) { - if (*(ptr + i) != (char)0xe5) { - SERIAL_ECHOPAIR("? address : ", ptr + i); - SERIAL_ECHOPAIR("=", *(ptr + i)); - SERIAL_ECHOLNPGM("\n"); - } - } - m100_not_initialized = false; - return; - } - return; -} - -// top_of_stack() returns the location of a variable on its stack frame. The value returned is above -// the stack once the function returns to the caller. - -char* top_of_stack() { - char x; - return &x + 1; // x is pulled on return; -} - -// -// 3 support routines to print hex numbers. We can print a nibble, byte and word -// - -void prt_hex_nibble(unsigned int n) { - if (n <= 9) - SERIAL_ECHO(n); - else - SERIAL_ECHO((char)('A' + n - 10)); -} - -void prt_hex_byte(unsigned int b) { - prt_hex_nibble((b & 0xf0) >> 4); - prt_hex_nibble(b & 0x0f); -} - -void prt_hex_word(unsigned int w) { - prt_hex_byte((w & 0xff00) >> 8); - prt_hex_byte(w & 0x0ff); -} - -// how_many_E5s_are_here() is a utility function to easily find out how many 0xE5's are -// at the specified location. Having this logic as a function simplifies the search code. -// -int how_many_E5s_are_here(char* p) { - int n; - for (n = 0; n < 32000; n++) { - if (*(p + n) != (char)0xe5) - return n - 1; - } - return -1; -} - -#endif - diff --git a/Marlin/Makefile b/Marlin/Makefile deleted file mode 100644 index 1328053..0000000 --- a/Marlin/Makefile +++ /dev/null @@ -1,521 +0,0 @@ -# Sprinter Arduino Project Makefile -# -# Makefile Based on: -# Arduino 0011 Makefile -# Arduino adaptation by mellis, eighthave, oli.keller -# Marlin adaption by Daid -# -# This has been tested with Arduino 0022. -# -# This makefile allows you to build sketches from the command line -# without the Arduino environment (or Java). -# -# Detailed instructions for using the makefile: -# -# 1. Modify the line containing "ARDUINO_INSTALL_DIR" to point to the directory that -# contains the Arduino installation (for example, under Mac OS X, this -# might be /Applications/Arduino.app/Contents/Resources/Java). -# -# 2. Modify the line containing "UPLOAD_PORT" to refer to the filename -# representing the USB or serial connection to your Arduino board -# (e.g. UPLOAD_PORT = /dev/tty.USB0). If the exact name of this file -# changes, you can use * as a wild card (e.g. UPLOAD_PORT = /dev/tty.usb*). -# -# 3. Set the line containing "MCU" to match your board's processor. -# Older one's are atmega8 based, newer ones like Arduino Mini, Bluetooth -# or Diecimila have the atmega168. If you're using a LilyPad Arduino, -# change F_CPU to 8000000. If you are using Gen7 electronics, you -# probably need to use 20000000. Either way, you must regenerate -# the speed lookup table with create_speed_lookuptable.py. -# -# 4. Type "make" and press enter to compile/verify your program. -# -# 5. Type "make upload", reset your Arduino board, and press enter to -# upload your program to the Arduino board. -# -# Note that all settings are set with ?=, this means you can override them -# from the commandline with "make HARDWARE_MOTHERBOARD=71" for example - -# This defined the board you are compiling for (see boards.h for the options) -HARDWARE_MOTHERBOARD ?= 11 - -# Arduino source install directory, and version number -# On most linuxes this will be /usr/share/arduino -ARDUINO_INSTALL_DIR ?= ${HOME}/Arduino -ARDUINO_VERSION ?= 106 - -# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin) -AVR_TOOLS_PATH ?= - -#Programmer configuration -UPLOAD_RATE ?= 57600 -AVRDUDE_PROGRAMMER ?= arduino -# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1 -UPLOAD_PORT ?= /dev/ttyUSB0 - -#Directory used to build files in, contains all the build files, from object files to the final hex file -#on linux it is best to put an absolute path like /home/username/tmp . -BUILD_DIR ?= applet - -# This defines whether Liquid_TWI2 support will be built -LIQUID_TWI2 ?= 0 - -# this defines if Wire is needed -WIRE ?= 0 - -############################################################################ -# Below here nothing should be changed... - -# Here the Arduino variant is selected by the board type -# HARDWARE_VARIANT = "arduino", "Sanguino", "Gen7", ... -# MCU = "atmega1280", "Mega2560", "atmega2560", "atmega644p", ... - -#Gen7 -ifeq ($(HARDWARE_MOTHERBOARD),10) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644 -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),11) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644p -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),12) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega644p -F_CPU ?= 20000000 -else ifeq ($(HARDWARE_MOTHERBOARD),13) -HARDWARE_VARIANT ?= Gen7 -MCU ?= atmega1284p -F_CPU ?= 20000000 - -#RAMPS -else ifeq ($(HARDWARE_MOTHERBOARD),3) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),33) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),34) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),35) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),36) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),38) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),43) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),44) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),45) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),46) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),48) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -#Gen6 -else ifeq ($(HARDWARE_MOTHERBOARD),5) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),51) -HARDWARE_VARIANT ?= Gen6 -MCU ?= atmega644p - -#Sanguinololu -else ifeq ($(HARDWARE_MOTHERBOARD),6) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),62) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),63) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p -else ifeq ($(HARDWARE_MOTHERBOARD),65) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),66) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega1284p -else ifeq ($(HARDWARE_MOTHERBOARD),69) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega1284p - -#Ultimaker -else ifeq ($(HARDWARE_MOTHERBOARD),7) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),71) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega1280 - -#Teensylu -else ifeq ($(HARDWARE_MOTHERBOARD),8) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),81) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),811) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),82) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb646 -else ifeq ($(HARDWARE_MOTHERBOARD),83) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb1286 -else ifeq ($(HARDWARE_MOTHERBOARD),84) -HARDWARE_VARIANT ?= Teensy -MCU ?= at90usb1286 - -#Gen3+ -else ifeq ($(HARDWARE_MOTHERBOARD),9) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Gen3 Monolithic Electronics -else ifeq ($(HARDWARE_MOTHERBOARD),22) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Megatronics -else ifeq ($(HARDWARE_MOTHERBOARD),70) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -#Alpha OMCA board -else ifeq ($(HARDWARE_MOTHERBOARD),90) -HARDWARE_VARIANT ?= SanguinoA -MCU ?= atmega644 - -#Final OMCA board -else ifeq ($(HARDWARE_MOTHERBOARD),91) -HARDWARE_VARIANT ?= Sanguino -MCU ?= atmega644p - -#Rambo -else ifeq ($(HARDWARE_MOTHERBOARD),301) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -# Azteeg -else ifeq ($(HARDWARE_MOTHERBOARD),67) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 -else ifeq ($(HARDWARE_MOTHERBOARD),68) -HARDWARE_VARIANT ?= arduino -MCU ?= atmega2560 - -endif - -# Be sure to regenerate speed_lookuptable.h with create_speed_lookuptable.py -# if you are setting this to something other than 16MHz -# Set to 16Mhz if not yet set. -F_CPU ?= 16000000 - -# Arduino contained the main source code for the Arduino -# Libraries, the "hardware variant" are for boards -# that derives from that, and their source are present in -# the main Marlin source directory -ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Sanguino)) -HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware -else -ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) -HARDWARE_DIR = ../ArduinoAddons/Arduino_1.x.x -else -HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx -endif -endif -HARDWARE_SRC = $(HARDWARE_DIR)/marlin/avr/cores/arduino - -TARGET = $(notdir $(CURDIR)) - -# VPATH tells make to look into these directory for source files, -# there is no need to specify explicit pathnames as long as the -# directory is added here - -VPATH = . -VPATH += $(BUILD_DIR) -VPATH += $(HARDWARE_SRC) -ifeq ($(HARDWARE_VARIANT), $(filter $(HARDWARE_VARIANT),arduino Teensy Sanguino)) -VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/LiquidCrystal/src -VPATH += $(HARDWARE_DIR)/marlin/avr/libraries/SPI -ifeq ($(LIQUID_TWI2), 1) -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2 -endif -ifeq ($(WIRE), 1) -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire -VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility -endif -else -VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal -VPATH += $(HARDWARE_DIR)/libraries/SPI -ifeq ($(LIQUID_TWI2), 1) -VPATH += $(HARDWARE_DIR)/libraries/Wire -VPATH += $(HARDWARE_DIR)/libraries/Wire/utility -VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2 -endif -ifeq ($(WIRE), 1) -VPATH += $(HARDWARE_DIR)/libraries/Wire -VPATH += $(HARDWARE_DIR)/libraries/Wire/utility -endif -endif -ifeq ($(HARDWARE_VARIANT), arduino) -HARDWARE_SUB_VARIANT ?= mega -VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT) -else -ifeq ($(HARDWARE_VARIANT), Sanguino) -VPATH += $(HARDWARE_DIR)/marlin/avr/variants/sanguino -else -HARDWARE_SUB_VARIANT ?= standard -VPATH += $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT) -endif -endif -SRC = wiring.c \ - wiring_analog.c wiring_digital.c \ - wiring_pulse.c \ - wiring_shift.c WInterrupts.c hooks.c -ifeq ($(HARDWARE_VARIANT), Teensy) -SRC = wiring.c -VPATH += $(ARDUINO_INSTALL_DIR)/hardware/teensy/cores/teensy -endif -CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ - MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ - SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \ - temperature.cpp cardreader.cpp configuration_store.cpp \ - watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \ - dac_mcp4728.cpp vector_3.cpp qr_solve.cpp buzzer.cpp -ifeq ($(LIQUID_TWI2), 0) -CXXSRC += LiquidCrystal.cpp -else -SRC += twi.c -CXXSRC += Wire.cpp LiquidTWI2.cpp -endif - -ifeq ($(WIRE), 1) -SRC += twi.c -CXXSRC += Wire.cpp -endif - -#Check for Arduino 1.0.0 or higher and use the correct source files for that version -ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) -CXXSRC += main.cpp -else -SRC += pins_arduino.c main.c -endif - -FORMAT = ihex - -# Name of this Makefile (used for "make depend"). -MAKEFILE = Makefile - -# Debugging format. -# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2. -# AVR (extended) COFF requires stabs, plus an avr-objcopy run. -DEBUG = stabs - -OPT = s - -DEFINES ?= - -# Program settings -CC = $(AVR_TOOLS_PATH)avr-gcc -CXX = $(AVR_TOOLS_PATH)avr-g++ -OBJCOPY = $(AVR_TOOLS_PATH)avr-objcopy -OBJDUMP = $(AVR_TOOLS_PATH)avr-objdump -AR = $(AVR_TOOLS_PATH)avr-ar -SIZE = $(AVR_TOOLS_PATH)avr-size -NM = $(AVR_TOOLS_PATH)avr-nm -AVRDUDE = avrdude -REMOVE = rm -f -MV = mv -f - -# Place -D or -U options here -CDEFS = -DF_CPU=$(F_CPU) ${addprefix -D , $(DEFINES)} -CXXDEFS = $(CDEFS) - -ifeq ($(HARDWARE_VARIANT), Teensy) -CDEFS += -DUSB_SERIAL -SRC += usb.c pins_teensy.c -CXXSRC += usb_api.cpp -endif - -# Add all the source directories as include directories too -CINCS = ${addprefix -I ,${VPATH}} -CXXINCS = ${addprefix -I ,${VPATH}} - -# Compiler flag to set the C Standard level. -# c89 - "ANSI" C -# gnu89 - c89 plus GCC extensions -# c99 - ISO C99 standard (not yet fully implemented) -# gnu99 - c99 plus GCC extensions -#CSTANDARD = -std=gnu99 -CDEBUG = -g$(DEBUG) -CWARN = -Wall -Wstrict-prototypes -CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \ - -fshort-enums -w -ffunction-sections -fdata-sections \ - -DARDUINO=$(ARDUINO_VERSION) -ifneq ($(HARDWARE_MOTHERBOARD),) -CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} -endif -#CEXTRA = -Wa,-adhlns=$(<:.c=.lst) -CEXTRA = -fno-use-cxa-atexit - -CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) -CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) -#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs -LDFLAGS = -lm - - -# Programming support using avrdude. Settings and variables. -AVRDUDE_PORT = $(UPLOAD_PORT) -AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i -ifeq ($(shell uname -s), Linux) -AVRDUDE_CONF = /etc/avrdude/avrdude.conf -else -AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf -endif -AVRDUDE_FLAGS = -D -C$(AVRDUDE_CONF) \ - -p$(MCU) -P$(AVRDUDE_PORT) -c$(AVRDUDE_PROGRAMMER) \ - -b$(UPLOAD_RATE) - -# Define all object files. -OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}} -OBJ += ${patsubst %.cpp, $(BUILD_DIR)/%.o, ${CXXSRC}} -OBJ += ${patsubst %.S, $(BUILD_DIR)/%.o, ${ASRC}} - -# Define all listing files. -LST = $(ASRC:.S=.lst) $(CXXSRC:.cpp=.lst) $(SRC:.c=.lst) - -# Combine all necessary flags and optional flags. -# Add target processor to flags. -ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) -ALL_CXXFLAGS = -mmcu=$(MCU) $(CXXFLAGS) -ALL_ASFLAGS = -mmcu=$(MCU) -x assembler-with-cpp $(ASFLAGS) - -# set V=1 (eg, "make V=1") to print the full commands etc. -ifneq ($V,1) - Pecho=@echo - P=@ -else - Pecho=@: - P= -endif - -# Default target. -all: sizeafter - -build: $(BUILD_DIR) elf hex - -# Creates the object directory -$(BUILD_DIR): - $P mkdir -p $(BUILD_DIR) - -elf: $(BUILD_DIR)/$(TARGET).elf -hex: $(BUILD_DIR)/$(TARGET).hex -eep: $(BUILD_DIR)/$(TARGET).eep -lss: $(BUILD_DIR)/$(TARGET).lss -sym: $(BUILD_DIR)/$(TARGET).sym - -# Program the device. -# Do not try to reset an Arduino if it's not one -upload: $(BUILD_DIR)/$(TARGET).hex -ifeq (${AVRDUDE_PROGRAMMER}, arduino) - stty hup < $(UPLOAD_PORT); true -endif - $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) -ifeq (${AVRDUDE_PROGRAMMER}, arduino) - stty -hup < $(UPLOAD_PORT); true -endif - - # Display size of file. -HEXSIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex -ELFSIZE = $(SIZE) --mcu=$(MCU) -C $(BUILD_DIR)/$(TARGET).elf; \ - $(SIZE) $(BUILD_DIR)/$(TARGET).elf -sizebefore: - $P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(HEXSIZE); echo; fi - -sizeafter: build - $P if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi - - -# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. -COFFCONVERT=$(OBJCOPY) --debugging \ - --change-section-address .data-0x800000 \ - --change-section-address .bss-0x800000 \ - --change-section-address .noinit-0x800000 \ - --change-section-address .eeprom-0x810000 - - -coff: $(BUILD_DIR)/$(TARGET).elf - $(COFFCONVERT) -O coff-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof - - -extcoff: $(TARGET).elf - $(COFFCONVERT) -O coff-ext-avr $(BUILD_DIR)/$(TARGET).elf $(TARGET).cof - - -.SUFFIXES: .elf .hex .eep .lss .sym -.PRECIOUS: .o - -.elf.hex: - $(Pecho) " COPY $@" - $P $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ - -.elf.eep: - -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ - --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ - -# Create extended listing file from ELF output file. -.elf.lss: - $(OBJDUMP) -h -S $< > $@ - -# Create a symbol table from ELF output file. -.elf.sym: - $(NM) -n $< > $@ - - # Link: create ELF output file from library. -$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h - $(Pecho) " CXX $@" - $P $(CC) $(ALL_CXXFLAGS) -Wl,--gc-sections -o $@ -L. $(OBJ) $(LDFLAGS) - -$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE) - $(Pecho) " CC $<" - $P $(CC) -MMD -c $(ALL_CFLAGS) $< -o $@ - -$(BUILD_DIR)/%.o: $(BUILD_DIR)/%.cpp Configuration.h Configuration_adv.h $(MAKEFILE) - $(Pecho) " CXX $<" - $P $(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@ - -$(BUILD_DIR)/%.o: %.cpp Configuration.h Configuration_adv.h $(MAKEFILE) - $(Pecho) " CXX $<" - $P $(CXX) -MMD -c $(ALL_CXXFLAGS) $< -o $@ - - -# Target: clean project. -clean: - $(Pecho) " RM $(BUILD_DIR)/*" - $P $(REMOVE) $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep $(BUILD_DIR)/$(TARGET).cof $(BUILD_DIR)/$(TARGET).elf \ - $(BUILD_DIR)/$(TARGET).map $(BUILD_DIR)/$(TARGET).sym $(BUILD_DIR)/$(TARGET).lss $(BUILD_DIR)/$(TARGET).cpp \ - $(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d) $(CXXSRC:.cpp=.s) $(CXXSRC:.cpp=.d) - $(Pecho) " RMDIR $(BUILD_DIR)/" - $P rm -rf $(BUILD_DIR) - - -.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter - -# Automaticaly include the dependency files created by gcc --include ${wildcard $(BUILD_DIR)/*.d} diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h deleted file mode 100644 index 7e3fd70..0000000 --- a/Marlin/Marlin.h +++ /dev/null @@ -1,429 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#ifndef MARLIN_H -#define MARLIN_H - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "MarlinConfig.h" - -#include "enum.h" -#include "types.h" -#include "fastio.h" -#include "utility.h" - -#ifdef UARM_SWIFT -#include "uArmParams.h" -#include "uArmLed.h" -#include "uArmButton.h" -#include "uArmSerial.h" -#include "uArmAPI.h" -#include "uArmDebug.h" -#include "uArmIIC.h" -#include "X_IIC.h" -#include "Y_IIC.h" -#include "Z_IIC.h" -#include "uArmCalibration.h" -#include "uArmBuzzer.h" -#include "uArmUtils.h" -#include "uArmReportService.h" -#include "uArmService.h" -#include "uArmSwift.h" -#include "uArmGrove.h" -#include "uArmRecorder.h" -#include "uArmPump.h" -#endif - - -#ifdef UARM_SWIFT - #include "HardwareSerial.h" - #define MYSERIAL commSerial - -#else - -#ifdef USBCON - #include "HardwareSerial.h" - #if ENABLED(BLUETOOTH) - #define MYSERIAL bluetoothSerial - #else - #define MYSERIAL Serial - #endif // BLUETOOTH -#else - #include "MarlinSerial.h" - #define MYSERIAL customizedSerial -#endif - -#endif // UARM_SWIFT - -#include "WString.h" - -#if ENABLED(PRINTCOUNTER) - #include "printcounter.h" -#else - #include "stopwatch.h" -#endif - -#define SERIAL_CHAR(x) MYSERIAL.write(x) -#define SERIAL_EOL SERIAL_CHAR('\n') - -#define SERIAL_PROTOCOLCHAR(x) SERIAL_CHAR(x) -#define SERIAL_PROTOCOL(x) MYSERIAL.print(x) -#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y) -#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x)) -#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x); SERIAL_EOL; }while(0) -#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x "\n")); }while(0) - -#define SERIAL_PROTOCOLPAIR(name, value) SERIAL_ECHOPAIR(name, value) - -extern const char errormagic[] PROGMEM; -extern const char echomagic[] PROGMEM; - -#define SERIAL_ERROR_START serialprintPGM(errormagic) -#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x) -#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x) -#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x) -#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x) - -#define SERIAL_ECHO_START serialprintPGM(echomagic) -#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x) -#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x) -#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) -#define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x) - -#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value))) - -void serial_echopair_P(const char* s_P, char v); -void serial_echopair_P(const char* s_P, int v); -void serial_echopair_P(const char* s_P, long v); -void serial_echopair_P(const char* s_P, float v); -void serial_echopair_P(const char* s_P, double v); -void serial_echopair_P(const char* s_P, unsigned long v); -FORCE_INLINE void serial_echopair_P(const char* s_P, uint8_t v) { serial_echopair_P(s_P, (int)v); } -FORCE_INLINE void serial_echopair_P(const char* s_P, uint16_t v) { serial_echopair_P(s_P, (int)v); } -FORCE_INLINE void serial_echopair_P(const char* s_P, bool v) { serial_echopair_P(s_P, (int)v); } -FORCE_INLINE void serial_echopair_P(const char* s_P, void *v) { serial_echopair_P(s_P, (unsigned long)v); } - -// Things to write to serial from Program memory. Saves 400 to 2k of RAM. -FORCE_INLINE void serialprintPGM(const char* str) { - char ch; - while ((ch = pgm_read_byte(str))) { - MYSERIAL.write(ch); - str++; - } -} - -void idle( - #if ENABLED(FILAMENT_CHANGE_FEATURE) - bool no_stepper_sleep = false // pass true to keep steppers from disabling on timeout - #endif -); - -void manage_inactivity(bool ignore_stepper_queue = false); - -#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - extern bool extruder_duplication_enabled; -#endif - -#if HAS_X2_ENABLE - #define enable_x() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0) - #define disable_x() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0) -#elif HAS_X_ENABLE - #define enable_x() X_ENABLE_WRITE( X_ENABLE_ON) - #define disable_x() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0) -#else - #define enable_x() NOOP - #define disable_x() NOOP -#endif - -#if HAS_Y2_ENABLE - #define enable_y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0) - #define disable_y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0) -#elif HAS_Y_ENABLE - #define enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON) - #define disable_y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0) -#else - #define enable_y() NOOP - #define disable_y() NOOP -#endif - -#if HAS_Z2_ENABLE - #define enable_z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0) - #define disable_z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0) -#elif HAS_Z_ENABLE - #define enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON) - #define disable_z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0) -#else - #define enable_z() NOOP - #define disable_z() NOOP -#endif - -#if ENABLED(MIXING_EXTRUDER) - - /** - * Mixing steppers synchronize their enable (and direction) together - */ - #if MIXING_STEPPERS > 3 - #define enable_e0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); } - #define disable_e0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); } - #elif MIXING_STEPPERS > 2 - #define enable_e0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); } - #define disable_e0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); } - #else - #define enable_e0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); } - #define disable_e0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); } - #endif - #define enable_e1() NOOP - #define disable_e1() NOOP - #define enable_e2() NOOP - #define disable_e2() NOOP - #define enable_e3() NOOP - #define disable_e3() NOOP - -#else // !MIXING_EXTRUDER - - #if HAS_E0_ENABLE - #define enable_e0() E0_ENABLE_WRITE( E_ENABLE_ON) - #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON) - #else - #define enable_e0() NOOP - #define disable_e0() NOOP - #endif - - #if E_STEPPERS > 1 && HAS_E1_ENABLE - #define enable_e1() E1_ENABLE_WRITE( E_ENABLE_ON) - #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON) - #else - #define enable_e1() NOOP - #define disable_e1() NOOP - #endif - - #if E_STEPPERS > 2 && HAS_E2_ENABLE - #define enable_e2() E2_ENABLE_WRITE( E_ENABLE_ON) - #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON) - #else - #define enable_e2() NOOP - #define disable_e2() NOOP - #endif - - #if E_STEPPERS > 3 && HAS_E3_ENABLE - #define enable_e3() E3_ENABLE_WRITE( E_ENABLE_ON) - #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON) - #else - #define enable_e3() NOOP - #define disable_e3() NOOP - #endif - -#endif // !MIXING_EXTRUDER - -/** - * The axis order in all axis related arrays is X, Y, Z, E - */ -#define _AXIS(AXIS) AXIS ##_AXIS - -void enable_all_steppers(); -void disable_all_steppers(); - -void FlushSerialRequestResend(); -void ok_to_send(); - -void reset_bed_level(); -void kill(const char*); - -void quickstop_stepper(); - -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - void handle_filament_runout(); -#endif - -extern uint8_t marlin_debug_flags; -#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F)) - -extern bool Running; -inline bool IsRunning() { return Running; } -inline bool IsStopped() { return !Running; } - -bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); //put a single ASCII command at the end of the current buffer or return false when it is full -void enqueue_and_echo_command_now(const char* cmd); // enqueue now, only return when the command has been enqueued -void enqueue_and_echo_commands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash -void clear_command_queue(); - -void clamp_to_software_endstops(float target[3]); - -extern millis_t previous_cmd_ms; -inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); } - -#if ENABLED(FAST_PWM_FAN) - void setPwmFrequency(uint8_t pin, int val); -#endif - -/** - * Feedrate scaling and conversion - */ -extern int feedrate_percentage; - -#define MMM_TO_MMS(MM_M) ((MM_M)/60.0) -#define MMS_TO_MMM(MM_S) ((MM_S)*60.0) -#define MMM_SCALED(MM_M) ((MM_M)*feedrate_percentage*0.01) -#define MMS_SCALED(MM_S) MMM_SCALED(MM_S) -#define MMM_TO_MMS_SCALED(MM_M) (MMS_SCALED(MMM_TO_MMS(MM_M))) - -extern bool axis_relative_modes[]; -extern bool volumetric_enabled; -extern int extruder_multiplier[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually -extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. -extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner -extern bool axis_known_position[3]; // axis[n].is_known -extern bool axis_homed[3]; // axis[n].is_homed -extern volatile bool wait_for_heatup; - -extern float current_position[NUM_AXIS]; -extern float position_shift[3]; -extern float home_offset[3]; -extern float sw_endstop_min[3]; -extern float sw_endstop_max[3]; - -#define LOGICAL_POSITION(POS, AXIS) (POS + home_offset[AXIS] + position_shift[AXIS]) -#define RAW_POSITION(POS, AXIS) (POS - home_offset[AXIS] - position_shift[AXIS]) -#define LOGICAL_X_POSITION(POS) LOGICAL_POSITION(POS, X_AXIS) -#define LOGICAL_Y_POSITION(POS) LOGICAL_POSITION(POS, Y_AXIS) -#define LOGICAL_Z_POSITION(POS) LOGICAL_POSITION(POS, Z_AXIS) -#define RAW_X_POSITION(POS) RAW_POSITION(POS, X_AXIS) -#define RAW_Y_POSITION(POS) RAW_POSITION(POS, Y_AXIS) -#define RAW_Z_POSITION(POS) RAW_POSITION(POS, Z_AXIS) -#define RAW_CURRENT_POSITION(AXIS) RAW_POSITION(current_position[AXIS], AXIS) - -// GCode support for external objects -bool code_seen(char); -int code_value_int(); -float code_value_temp_abs(); -float code_value_temp_diff(); - -#if ENABLED(DELTA) - extern float delta[3]; - extern float endstop_adj[3]; // axis[n].endstop_adj - extern float delta_radius; - extern float delta_diagonal_rod; - extern float delta_segments_per_second; - extern float delta_diagonal_rod_trim_tower_1; - extern float delta_diagonal_rod_trim_tower_2; - extern float delta_diagonal_rod_trim_tower_3; - void inverse_kinematics(const float cartesian[3]); - void recalc_delta_settings(float radius, float diagonal_rod); - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - extern int delta_grid_spacing[2]; - void adjust_delta(float cartesian[3]); - #endif -#elif ENABLED(SCARA) - extern float delta[3]; - extern float axis_scaling[3]; // Build size scaling - void inverse_kinematics(const float cartesian[3]); - void forward_kinematics_SCARA(float f_scara[3]); -#endif - -#if ENABLED(Z_DUAL_ENDSTOPS) - extern float z_endstop_adj; -#endif - -#if HAS_BED_PROBE - extern float zprobe_zoffset; -#endif - -#if ENABLED(HOST_KEEPALIVE_FEATURE) - extern uint8_t host_keepalive_interval; -#endif - -#if FAN_COUNT > 0 - extern int fanSpeeds[FAN_COUNT]; -#endif - -#if ENABLED(BARICUDA) - extern int baricuda_valve_pressure; - extern int baricuda_e_to_p_pressure; -#endif - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - extern float filament_width_nominal; //holds the theoretical filament diameter i.e., 3.00 or 1.75 - extern bool filament_sensor; //indicates that filament sensor readings should control extrusion - extern float filament_width_meas; //holds the filament diameter as accurately measured - extern int8_t measurement_delay[]; //ring buffer to delay measurement - extern int filwidth_delay_index1, filwidth_delay_index2; //ring buffer index. used by planner, temperature, and main code - extern int meas_delay_cm; //delay distance -#endif - -#if ENABLED(FILAMENT_CHANGE_FEATURE) - extern FilamentChangeMenuResponse filament_change_menu_response; -#endif - -#if ENABLED(PID_EXTRUSION_SCALING) - extern int lpq_len; -#endif - -#if ENABLED(FWRETRACT) - extern bool autoretract_enabled; - extern bool retracted[EXTRUDERS]; // extruder[n].retracted - extern float retract_length, retract_length_swap, retract_feedrate_mm_s, retract_zlift; - extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate_mm_s; -#endif - -// Print job timer -#if ENABLED(PRINTCOUNTER) - extern PrintCounter print_job_timer; -#else - extern Stopwatch print_job_timer; -#endif - -// Handling multiple extruders pins -extern uint8_t active_extruder; - -#if HAS_TEMP_HOTEND || HAS_TEMP_BED - void print_heaterstates(); -#endif - -#if ENABLED(MIXING_EXTRUDER) - extern float mixing_factor[MIXING_STEPPERS]; -#endif - -void calculate_volumetric_multipliers(); - -// Buzzer -#if HAS_BUZZER && PIN_EXISTS(BEEPER) - #include "buzzer.h" -#endif - -/** - * Blocking movement and shorthand functions - */ -inline void do_blocking_move_to(float x, float y, float z, float fr_mm_m=0.0); -inline void do_blocking_move_to_x(float x, float fr_mm_m=0.0); -inline void do_blocking_move_to_z(float z, float fr_mm_m=0.0); -inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m=0.0); - -#endif //MARLIN_H diff --git a/Marlin/Marlin.ino b/Marlin/Marlin.ino deleted file mode 100644 index 70fd8ad..0000000 --- a/Marlin/Marlin.ino +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * About Marlin - * - * This firmware is a mashup between Sprinter and grbl. - * - https://github.com/kliment/Sprinter - * - https://github.com/simen/grbl/tree - * - * It has preliminary support for Matthew Roberts advance algorithm - * - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html - */ - -/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ -/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ - -#include "MarlinConfig.h" - -#if ENABLED(ULTRA_LCD) - #if ENABLED(LCD_I2C_TYPE_PCF8575) - #include - #include - #elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008) - #include - #include - #elif ENABLED(LCM1602) - #include - #include - #include - #elif ENABLED(DOGLCD) - #include // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino) - #else - #include // library for character LCD - #endif -#endif - -#if HAS_DIGIPOTSS - #include -#endif - -#if ENABLED(DIGIPOT_I2C) - #include -#endif - -#if ENABLED(HAVE_TMCDRIVER) - #include - #include -#endif - -#if ENABLED(HAVE_L6470DRIVER) - #include - #include -#endif diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h deleted file mode 100644 index c0202fa..0000000 --- a/Marlin/MarlinConfig.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef MARLIN_CONFIG_H -#define MARLIN_CONFIG_H - -#include "fastio.h" -#include "macros.h" -#include "boards.h" -#include "Version.h" -#include "Configuration.h" -#include "Conditionals_LCD.h" -#include "Configuration_adv.h" -#include "pins.h" -#if !defined(USBCON) && !defined(UARM_SWIFT) - #define HardwareSerial_h // trick to disable the standard HWserial -#endif -#include "Arduino.h" -#include "Conditionals_post.h" -#include "SanityCheck.h" - -#endif // MARLIN_CONFIG_H diff --git a/Marlin/MarlinSerial.cpp b/Marlin/MarlinSerial.cpp deleted file mode 100644 index cb2205e..0000000 --- a/Marlin/MarlinSerial.cpp +++ /dev/null @@ -1,545 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - MarlinSerial.cpp - Hardware serial library for Wiring - Copyright (c) 2006 Nicholas Zambetti. All right reserved. - - Modified 23 November 2006 by David A. Mellis - Modified 28 September 2010 by Mark Sproul - Modified 14 February 2016 by Andreas Hardtung (added tx buffer) -*/ - -#include "MarlinSerial.h" - -#include "stepper.h" - -#include "Marlin.h" - -#ifndef UARM_SWIFT - - -#ifndef USBCON -// this next line disables the entire HardwareSerial.cpp, -// this is so I can support Attiny series and any other chip without a UART -#if defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H) - -#if UART_PRESENT(SERIAL_PORT) - ring_buffer_r rx_buffer = { { 0 }, 0, 0 }; - #if TX_BUFFER_SIZE > 0 - ring_buffer_t tx_buffer = { { 0 }, 0, 0 }; - static bool _written; - #endif -#endif - - -FORCE_INLINE void store_char(unsigned char c) { - CRITICAL_SECTION_START; - uint8_t h = rx_buffer.head; - uint8_t i = (uint8_t)(h + 1) & (RX_BUFFER_SIZE - 1); - - // if we should be storing the received character into the location - // just before the tail (meaning that the head would advance to the - // current location of the tail), we're about to overflow the buffer - // and so we don't write the character or advance the head. - if (i != rx_buffer.tail) { - rx_buffer.buffer[h] = c; - rx_buffer.head = i; - } - CRITICAL_SECTION_END; - - #if ENABLED(EMERGENCY_PARSER) - emergency_parser(c); - #endif -} - -#if TX_BUFFER_SIZE > 0 - FORCE_INLINE void _tx_udr_empty_irq(void) - { - // If interrupts are enabled, there must be more data in the output - // buffer. Send the next byte - uint8_t t = tx_buffer.tail; - uint8_t c = tx_buffer.buffer[t]; - tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1); - - M_UDRx = c; - - // clear the TXC bit -- "can be cleared by writing a one to its bit - // location". This makes sure flush() won't return until the bytes - // actually got written - SBI(M_UCSRxA, M_TXCx); - - if (tx_buffer.head == tx_buffer.tail) { - // Buffer empty, so disable interrupts - CBI(M_UCSRxB, M_UDRIEx); - } - } - - #if defined(M_USARTx_UDRE_vect) - ISR(M_USARTx_UDRE_vect) { - _tx_udr_empty_irq(); - } - #endif - -#endif - -#if defined(M_USARTx_RX_vect) - ISR(M_USARTx_RX_vect) { - unsigned char c = M_UDRx; - store_char(c); - } -#endif - -// Constructors //////////////////////////////////////////////////////////////// - -MarlinSerial::MarlinSerial() { } - -// Public Methods ////////////////////////////////////////////////////////////// - -void MarlinSerial::begin(long baud) { - uint16_t baud_setting; - bool useU2X = true; - - #if F_CPU == 16000000UL && SERIAL_PORT == 0 - // hard-coded exception for compatibility with the bootloader shipped - // with the Duemilanove and previous boards and the firmware on the 8U2 - // on the Uno and Mega 2560. - if (baud == 57600) { - useU2X = false; - } - #endif - - if (useU2X) { - M_UCSRxA = _BV(M_U2Xx); - baud_setting = (F_CPU / 4 / baud - 1) / 2; - } - else { - M_UCSRxA = 0; - baud_setting = (F_CPU / 8 / baud - 1) / 2; - } - - // assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register) - M_UBRRxH = baud_setting >> 8; - M_UBRRxL = baud_setting; - - SBI(M_UCSRxB, M_RXENx); - SBI(M_UCSRxB, M_TXENx); - SBI(M_UCSRxB, M_RXCIEx); - #if TX_BUFFER_SIZE > 0 - CBI(M_UCSRxB, M_UDRIEx); - _written = false; - #endif -} - -void MarlinSerial::end() { - CBI(M_UCSRxB, M_RXENx); - CBI(M_UCSRxB, M_TXENx); - CBI(M_UCSRxB, M_RXCIEx); - CBI(M_UCSRxB, M_UDRIEx); -} - -void MarlinSerial::checkRx(void) { - if (TEST(M_UCSRxA, M_RXCx)) { - uint8_t c = M_UDRx; - store_char(c); - } -} - -int MarlinSerial::peek(void) { - int v; - CRITICAL_SECTION_START; - uint8_t t = rx_buffer.tail; - if (rx_buffer.head == t) { - v = -1; - } - else { - v = rx_buffer.buffer[t]; - } - CRITICAL_SECTION_END; - return v; -} - -int MarlinSerial::read(void) { - int v; - CRITICAL_SECTION_START; - uint8_t t = rx_buffer.tail; - if (rx_buffer.head == t) { - v = -1; - } - else { - v = rx_buffer.buffer[t]; - rx_buffer.tail = (uint8_t)(t + 1) & (RX_BUFFER_SIZE - 1); - } - CRITICAL_SECTION_END; - return v; -} - -uint8_t MarlinSerial::available(void) { - CRITICAL_SECTION_START; - uint8_t h = rx_buffer.head; - uint8_t t = rx_buffer.tail; - CRITICAL_SECTION_END; - return (uint8_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1); -} - -void MarlinSerial::flush(void) { - // RX - // don't reverse this or there may be problems if the RX interrupt - // occurs after reading the value of rx_buffer_head but before writing - // the value to rx_buffer_tail; the previous value of rx_buffer_head - // may be written to rx_buffer_tail, making it appear as if the buffer - // were full, not empty. - CRITICAL_SECTION_START; - rx_buffer.head = rx_buffer.tail; - CRITICAL_SECTION_END; -} - -#if TX_BUFFER_SIZE > 0 - uint8_t MarlinSerial::availableForWrite(void) { - CRITICAL_SECTION_START; - uint8_t h = tx_buffer.head; - uint8_t t = tx_buffer.tail; - CRITICAL_SECTION_END; - return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1); - } - - void MarlinSerial::write(uint8_t c) { - _written = true; - CRITICAL_SECTION_START; - bool emty = (tx_buffer.head == tx_buffer.tail); - CRITICAL_SECTION_END; - // If the buffer and the data register is empty, just write the byte - // to the data register and be done. This shortcut helps - // significantly improve the effective datarate at high (> - // 500kbit/s) bitrates, where interrupt overhead becomes a slowdown. - if (emty && TEST(M_UCSRxA, M_UDREx)) { - CRITICAL_SECTION_START; - M_UDRx = c; - SBI(M_UCSRxA, M_TXCx); - CRITICAL_SECTION_END; - return; - } - uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1); - - // If the output buffer is full, there's nothing for it other than to - // wait for the interrupt handler to empty it a bit - while (i == tx_buffer.tail) { - if (!TEST(SREG, SREG_I)) { - // Interrupts are disabled, so we'll have to poll the data - // register empty flag ourselves. If it is set, pretend an - // interrupt has happened and call the handler to free up - // space for us. - if (TEST(M_UCSRxA, M_UDREx)) - _tx_udr_empty_irq(); - } else { - // nop, the interrupt handler will free up space for us - } - } - - tx_buffer.buffer[tx_buffer.head] = c; - { CRITICAL_SECTION_START; - tx_buffer.head = i; - SBI(M_UCSRxB, M_UDRIEx); - CRITICAL_SECTION_END; - } - return; - } - - void MarlinSerial::flushTX(void) { - // TX - // If we have never written a byte, no need to flush. This special - // case is needed since there is no way to force the TXC (transmit - // complete) bit to 1 during initialization - if (!_written) - return; - - while (TEST(M_UCSRxB, M_UDRIEx) || !TEST(M_UCSRxA, M_TXCx)) { - if (!TEST(SREG, SREG_I) && TEST(M_UCSRxB, M_UDRIEx)) - // Interrupts are globally disabled, but the DR empty - // interrupt should be enabled, so poll the DR empty flag to - // prevent deadlock - if (TEST(M_UCSRxA, M_UDREx)) - _tx_udr_empty_irq(); - } - // If we get here, nothing is queued anymore (DRIE is disabled) and - // the hardware finished tranmission (TXC is set). -} - -#else - void MarlinSerial::write(uint8_t c) { - while (!TEST(M_UCSRxA, M_UDREx)) - ; - M_UDRx = c; - } -#endif - -// end NEW - -/// imports from print.h - - -void MarlinSerial::print(char c, int base) { - print((long) c, base); -} - -void MarlinSerial::print(unsigned char b, int base) { - print((unsigned long) b, base); -} - -void MarlinSerial::print(int n, int base) { - print((long) n, base); -} - -void MarlinSerial::print(unsigned int n, int base) { - print((unsigned long) n, base); -} - -void MarlinSerial::print(long n, int base) { - if (base == 0) { - write(n); - } - else if (base == 10) { - if (n < 0) { - print('-'); - n = -n; - } - printNumber(n, 10); - } - else { - printNumber(n, base); - } -} - -void MarlinSerial::print(unsigned long n, int base) { - if (base == 0) write(n); - else printNumber(n, base); -} - -void MarlinSerial::print(double n, int digits) { - printFloat(n, digits); -} - -void MarlinSerial::println(void) { - print('\r'); - print('\n'); -} - -void MarlinSerial::println(const String& s) { - print(s); - println(); -} - -void MarlinSerial::println(const char c[]) { - print(c); - println(); -} - -void MarlinSerial::println(char c, int base) { - print(c, base); - println(); -} - -void MarlinSerial::println(unsigned char b, int base) { - print(b, base); - println(); -} - -void MarlinSerial::println(int n, int base) { - print(n, base); - println(); -} - -void MarlinSerial::println(unsigned int n, int base) { - print(n, base); - println(); -} - -void MarlinSerial::println(long n, int base) { - print(n, base); - println(); -} - -void MarlinSerial::println(unsigned long n, int base) { - print(n, base); - println(); -} - -void MarlinSerial::println(double n, int digits) { - print(n, digits); - println(); -} - -// Private Methods ///////////////////////////////////////////////////////////// - -void MarlinSerial::printNumber(unsigned long n, uint8_t base) { - unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars. - unsigned long i = 0; - - if (n == 0) { - print('0'); - return; - } - - while (n > 0) { - buf[i++] = n % base; - n /= base; - } - - for (; i > 0; i--) - print((char)(buf[i - 1] < 10 ? - '0' + buf[i - 1] : - 'A' + buf[i - 1] - 10)); -} - -void MarlinSerial::printFloat(double number, uint8_t digits) { - // Handle negative numbers - if (number < 0.0) { - print('-'); - number = -number; - } - - // Round correctly so that print(1.999, 2) prints as "2.00" - double rounding = 0.5; - for (uint8_t i = 0; i < digits; ++i) - rounding /= 10.0; - - number += rounding; - - // Extract the integer part of the number and print it - unsigned long int_part = (unsigned long)number; - double remainder = number - (double)int_part; - print(int_part); - - // Print the decimal point, but only if there are digits beyond - if (digits > 0) print('.'); - - // Extract digits from the remainder one at a time - while (digits-- > 0) { - remainder *= 10.0; - int toPrint = int(remainder); - print(toPrint); - remainder -= toPrint; - } -} -// Preinstantiate Objects ////////////////////////////////////////////////////// - - -MarlinSerial customizedSerial; - -#endif // whole file -#endif // !USBCON - -// For AT90USB targets use the UART for BT interfacing -#if defined(USBCON) && ENABLED(BLUETOOTH) - HardwareSerial bluetoothSerial; -#endif - -#if ENABLED(EMERGENCY_PARSER) - - // Currently looking for: M108, M112, M410 - // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h - - FORCE_INLINE void emergency_parser(unsigned char c) { - - static e_parser_state state = state_RESET; - - switch (state) { - case state_RESET: - switch (c) { - case ' ': break; - case 'N': state = state_N; break; - case 'M': state = state_M; break; - default: state = state_IGNORE; - } - break; - - case state_N: - switch (c) { - case '0': case '1': case '2': - case '3': case '4': case '5': - case '6': case '7': case '8': - case '9': case '-': case ' ': break; - case 'M': state = state_M; break; - default: state = state_IGNORE; - } - break; - - case state_M: - switch (c) { - case ' ': break; - case '1': state = state_M1; break; - case '4': state = state_M4; break; - default: state = state_IGNORE; - } - break; - - case state_M1: - switch (c) { - case '0': state = state_M10; break; - case '1': state = state_M11; break; - default: state = state_IGNORE; - } - break; - - case state_M10: - state = (c == '8') ? state_M108 : state_IGNORE; - break; - - case state_M11: - state = (c == '2') ? state_M112 : state_IGNORE; - break; - - case state_M4: - state = (c == '1') ? state_M41 : state_IGNORE; - break; - - case state_M41: - state = (c == '0') ? state_M410 : state_IGNORE; - break; - - case state_IGNORE: - if (c == '\n') state = state_RESET; - break; - - default: - if (c == '\n') { - switch (state) { - case state_M108: - wait_for_heatup = false; - break; - case state_M112: - kill(PSTR(MSG_KILLED)); - break; - case state_M410: - quickstop_stepper(); - break; - default: - break; - } - state = state_RESET; - } - } - } -#endif - -#endif // UARM_SWIFT - diff --git a/Marlin/MarlinSerial.h b/Marlin/MarlinSerial.h deleted file mode 100644 index 58a6148..0000000 --- a/Marlin/MarlinSerial.h +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - MarlinSerial.h - Hardware serial library for Wiring - Copyright (c) 2006 Nicholas Zambetti. All right reserved. - - Modified 28 September 2010 by Mark Sproul - Modified 14 February 2016 by Andreas Hardtung (added tx buffer) - -*/ - -#ifndef MarlinSerial_h -#define MarlinSerial_h - -#ifndef UARM_SWIFT - -#include "MarlinConfig.h" - -#ifndef SERIAL_PORT - #define SERIAL_PORT 0 -#endif - -// The presence of the UBRRH register is used to detect a UART. -#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \ - (port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \ - (port == 3 && defined(UBRR3H))) - -// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor -// requires two levels of indirection to expand macro values properly) -#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) -#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary - #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##suffix -#else - #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix -#endif - -// Registers used by MarlinSerial class (these are expanded -// depending on selected serial port -#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number -#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B) -#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,) -#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,) -#define M_TXCx SERIAL_REGNAME(TXC,SERIAL_PORT,) -#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,) -#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,) -#define M_UDRIEx SERIAL_REGNAME(UDRIE,SERIAL_PORT,) -#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) -#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H) -#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L) -#define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,) -#define M_USARTx_RX_vect SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect) -#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,) -#define M_USARTx_UDRE_vect SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect) - - -#define DEC 10 -#define HEX 16 -#define OCT 8 -#define BIN 2 -#define BYTE 0 - - -#ifndef USBCON -// Define constants and variables for buffering incoming serial data. We're -// using a ring buffer (I think), in which rx_buffer_head is the index of the -// location to which to write the next incoming character and rx_buffer_tail -// is the index of the location from which to read. -// 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256) -#ifndef RX_BUFFER_SIZE - #define RX_BUFFER_SIZE 128 -#endif -#ifndef TX_BUFFER_SIZE - #define TX_BUFFER_SIZE 32 -#endif -#if !((RX_BUFFER_SIZE == 256) ||(RX_BUFFER_SIZE == 128) ||(RX_BUFFER_SIZE == 64) ||(RX_BUFFER_SIZE == 32) ||(RX_BUFFER_SIZE == 16) ||(RX_BUFFER_SIZE == 8) ||(RX_BUFFER_SIZE == 4) ||(RX_BUFFER_SIZE == 2)) - #error "RX_BUFFER_SIZE has to be a power of 2 and >= 2" -#endif -#if !((TX_BUFFER_SIZE == 256) ||(TX_BUFFER_SIZE == 128) ||(TX_BUFFER_SIZE == 64) ||(TX_BUFFER_SIZE == 32) ||(TX_BUFFER_SIZE == 16) ||(TX_BUFFER_SIZE == 8) ||(TX_BUFFER_SIZE == 4) ||(TX_BUFFER_SIZE == 2) ||(TX_BUFFER_SIZE == 0)) - #error TX_BUFFER_SIZE has to be a power of 2 or 0 -#endif - -struct ring_buffer_r { - unsigned char buffer[RX_BUFFER_SIZE]; - volatile uint8_t head; - volatile uint8_t tail; -}; - -#if TX_BUFFER_SIZE > 0 - struct ring_buffer_t { - unsigned char buffer[TX_BUFFER_SIZE]; - volatile uint8_t head; - volatile uint8_t tail; - }; -#endif - -#if UART_PRESENT(SERIAL_PORT) - extern ring_buffer_r rx_buffer; - #if TX_BUFFER_SIZE > 0 - extern ring_buffer_t tx_buffer; - #endif -#endif - -#if ENABLED(EMERGENCY_PARSER) - #include "language.h" - void emergency_parser(unsigned char c); -#endif - -class MarlinSerial { //: public Stream - - public: - MarlinSerial(); - void begin(long); - void end(); - int peek(void); - int read(void); - void flush(void); - uint8_t available(void); - void checkRx(void); - void write(uint8_t c); - #if TX_BUFFER_SIZE > 0 - uint8_t availableForWrite(void); - void flushTX(void); - #endif - - private: - void printNumber(unsigned long, uint8_t); - void printFloat(double, uint8_t); - - public: - FORCE_INLINE void write(const char* str) { while (*str) write(*str++); } - FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); } - FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); } - FORCE_INLINE void print(const char* str) { write(str); } - - void print(char, int = BYTE); - void print(unsigned char, int = BYTE); - void print(int, int = DEC); - void print(unsigned int, int = DEC); - void print(long, int = DEC); - void print(unsigned long, int = DEC); - void print(double, int = 2); - - void println(const String& s); - void println(const char[]); - void println(char, int = BYTE); - void println(unsigned char, int = BYTE); - void println(int, int = DEC); - void println(unsigned int, int = DEC); - void println(long, int = DEC); - void println(unsigned long, int = DEC); - void println(double, int = 2); - void println(void); -}; - -extern MarlinSerial customizedSerial; -#endif // !USBCON - -// Use the UART for Bluetooth in AT90USB configurations -#if defined(USBCON) && ENABLED(BLUETOOTH) - extern HardwareSerial bluetoothSerial; -#endif - -#endif // UARM_SWIFT - -#endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp deleted file mode 100644 index ac3908b..0000000 --- a/Marlin/Marlin_main.cpp +++ /dev/null @@ -1,9492 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * - * About Marlin - * - * This firmware is a mashup between Sprinter and grbl. - * - https://github.com/kliment/Sprinter - * - https://github.com/simen/grbl/tree - * - * It has preliminary support for Matthew Roberts advance algorithm - * - http://reprap.org/pipermail/reprap-dev/2011-May/003323.html - */ - -#include "Marlin.h" - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - #include "vector_3.h" - #if ENABLED(AUTO_BED_LEVELING_GRID) - #include "qr_solve.h" - #endif -#endif // AUTO_BED_LEVELING_FEATURE - -#if ENABLED(MESH_BED_LEVELING) - #include "mesh_bed_leveling.h" -#endif - -#if ENABLED(BEZIER_CURVE_SUPPORT) - #include "planner_bezier.h" -#endif - -#include "ultralcd.h" -#include "planner.h" -#include "stepper.h" -#include "endstops.h" -#include "temperature.h" -#include "cardreader.h" -#include "configuration_store.h" -#include "language.h" -#include "pins_arduino.h" -#include "math.h" -#include "nozzle.h" -#include "duration_t.h" -#include "types.h" - -#if ENABLED(USE_WATCHDOG) - #include "watchdog.h" -#endif - -#if ENABLED(BLINKM) - #include "blinkm.h" - #include "Wire.h" -#endif - -#if HAS_SERVOS - #include "servo.h" -#endif - -#if HAS_DIGIPOTSS - #include -#endif - -#if ENABLED(DAC_STEPPER_CURRENT) - #include "stepper_dac.h" -#endif - -#if ENABLED(EXPERIMENTAL_I2CBUS) - #include "twibus.h" -#endif - - -#ifdef UARM_SWIFT - extern HardwareSerial* CommSerial; -#endif // UARM_SWIFT -/** - * Look here for descriptions of G-codes: - * - http://linuxcnc.org/handbook/gcode/g-code.html - * - http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes - * - * Help us document these G-codes online: - * - https://github.com/MarlinFirmware/Marlin/wiki/G-Code-in-Marlin - * - http://reprap.org/wiki/G-code - * - * ----------------- - * Implemented Codes - * ----------------- - * - * "G" Codes - * - * G0 -> G1 - * G1 - Coordinated Movement X Y Z E - * G2 - CW ARC - * G3 - CCW ARC - * G4 - Dwell S or P - * G5 - Cubic B-spline with XYZE destination and IJPQ offsets - * G10 - Retract filament according to settings of M207 - * G11 - Retract recover filament according to settings of M208 - * G12 - Clean tool - * G20 - Set input units to inches - * G21 - Set input units to millimeters - * G28 - Home one or more axes - * G29 - Detailed Z probe, probes the bed at 3 or more points. Will fail if you haven't homed yet. - * G30 - Single Z probe, probes bed at current XY location. - * G31 - Dock sled (Z_PROBE_SLED only) - * G32 - Undock sled (Z_PROBE_SLED only) - * G90 - Use Absolute Coordinates - * G91 - Use Relative Coordinates - * G92 - Set current position to coordinates given - * - * "M" Codes - * - * M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled) - * M1 - Same as M0 - * M17 - Enable/Power all stepper motors - * M18 - Disable all stepper motors; same as M84 - * M20 - List SD card - * M21 - Init SD card - * M22 - Release SD card - * M23 - Select SD file (M23 filename.g) - * M24 - Start/resume SD print - * M25 - Pause SD print - * M26 - Set SD position in bytes (M26 S12345) - * M27 - Report SD print status - * M28 - Start SD write (M28 filename.g) - * M29 - Stop SD write - * M30 - Delete file from SD (M30 filename.g) - * M31 - Output time since last M109 or SD card start to serial - * M32 - Select file and start SD print (Can be used _while_ printing from SD card files): - * syntax "M32 /path/filename#", or "M32 S !filename#" - * Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include). - * The '#' is necessary when calling from within sd files, as it stops buffer prereading - * M33 - Get the longname version of a path - * M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used. - * M48 - Measure Z_Probe repeatability. M48 [P # of points] [X position] [Y position] [V_erboseness #] [E_ngage Probe] [L # of legs of travel] - * M75 - Start the print job timer - * M76 - Pause the print job timer - * M77 - Stop the print job timer - * M78 - Show statistical information about the print jobs - * M80 - Turn on Power Supply - * M81 - Turn off Power Supply - * M82 - Set E codes absolute (default) - * M83 - Set E codes relative while in Absolute Coordinates (G90) mode - * M84 - Disable steppers until next move, - * or use S to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout. - * M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default) - * M92 - Set planner.axis_steps_per_mm - same syntax as G92 - * M104 - Set extruder target temp - * M105 - Read current temp - * M106 - Fan on - * M107 - Fan off - * M108 - Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature. - * M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating - * Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling - * IF AUTOTEMP is enabled, S B F. Exit autotemp by any M109 without F - * M110 - Set the current line number - * M111 - Set debug flags with S. See flag bits defined in enum.h. - * M112 - Emergency stop - * M113 - Get or set the timeout interval for Host Keepalive "busy" messages - * M114 - Output current position to serial port - * M115 - Capabilities string - * M117 - Display a message on the controller screen - * M119 - Output Endstop status to serial port - * M120 - Enable endstop detection - * M121 - Disable endstop detection - * M126 - Solenoid Air Valve Open (BariCUDA support by jmil) - * M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil) - * M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil) - * M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil) - * M140 - Set bed target temp - * M145 - Set the heatup state H B F for S (0=PLA, 1=ABS) - * M149 - Set temperature units - * M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work. - * M163 - Set a single proportion for a mixing extruder. Requires MIXING_EXTRUDER. - * M164 - Save the mix as a virtual extruder. Requires MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS. - * M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. Requires MIXING_EXTRUDER. - * M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating - * Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling - * M200 - Set filament diameter, D, setting E axis units to cubic. (Use S0 to revert to linear units.) - * M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000) - * M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!! - * M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec - * M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in units/sec^2 - * M205 - Set advanced settings. Current units apply: - S T minimum speeds - B - X, Z, E - * M206 - Set additional homing offset - * M207 - Set Retract Length: S, Feedrate: F, and Z lift: Z - * M208 - Set Recover (unretract) Additional (!) Length: S and Feedrate: F - * M209 - Turn Automatic Retract Detection on/off: S (For slicers that don't support G10/11). - Every normal extrude-only move will be classified as retract depending on the direction. - * M218 - Set a tool offset: T X Y - * M220 - Set Feedrate Percentage: S ("FR" on your LCD) - * M221 - Set Flow Percentage: S - * M226 - Wait until the specified pin reaches the state required: P S - * M240 - Trigger a camera to take a photograph - * M250 - Set LCD contrast C (value 0..63) - * M280 - Set servo position absolute. P: servo index, S: angle or microseconds - * M300 - Play beep sound S P - * M301 - Set PID parameters P I and D - * M302 - Allow cold extrudes, or set the minimum extrude S. - * M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C) - * M304 - Set bed PID parameters P I and D - * M380 - Activate solenoid on active extruder - * M381 - Disable all solenoids - * M400 - Finish all moves - * M401 - Lower Z probe if present - * M402 - Raise Z probe if present - * M404 - Display or set the Nominal Filament Width: [ N ] - * M405 - Enable Filament Sensor extrusion control. Optional delay between sensor and extruder: D - * M406 - Disable Filament Sensor extrusion control - * M407 - Display measured filament diameter in millimeters - * M410 - Quickstop. Abort all the planned moves - * M420 - Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable - * M421 - Set a single Z coordinate in the Mesh Leveling grid. X Y Z - * M428 - Set the home_offset logically based on the current_position - * M500 - Store parameters in EEPROM - * M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily). - * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. - * M503 - Print the current settings (from memory not from EEPROM). Use S0 to leave off headings. - * M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - * M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] - * M665 - Set delta configurations: L R S - * M666 - Set delta endstop adjustment - * M605 - Set dual x-carriage movement mode: S [ X R ] - * M851 - Set Z probe's Z offset in current units. (Negative values apply to probes that extend below the nozzle.) - * M907 - Set digital trimpot motor current using axis codes. - * M908 - Control digital trimpot directly. - * M909 - DAC_STEPPER_CURRENT: Print digipot/DAC current value - * M910 - DAC_STEPPER_CURRENT: Commit digipot/DAC value to external EEPROM via I2C - * M350 - Set microstepping mode. - * M351 - Toggle MS1 MS2 pins directly. - * - * ************ SCARA Specific - This can change to suit future G-code regulations - * M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration) - * M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree) - * M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration) - * M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree) - * M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position) - * M365 - SCARA calibration: Scaling factor, X, Y, Z axis - * ************* SCARA End *************** - * - * ************ Custom codes - This can change to suit future G-code regulations - * M100 - Watch Free Memory (For Debugging Only) - * M928 - Start SD logging (M928 filename.g) - ended by M29 - * M999 - Restart after being stopped by error - * - * "T" Codes - * - * T0-T3 - Select a tool by index (usually an extruder) [ F ] - * - */ - -#if ENABLED(M100_FREE_MEMORY_WATCHER) - void gcode_M100(); -#endif - -#if ENABLED(SDSUPPORT) - CardReader card; -#endif - -#if ENABLED(EXPERIMENTAL_I2CBUS) - TWIBus i2c; -#endif - -bool Running = true; - -uint8_t marlin_debug_flags = DEBUG_NONE; - -float current_position[NUM_AXIS] = { 0.0 }; - -#ifdef UARM_SWIFT -float destination[NUM_AXIS] = { 0.0 }; -const char polor_axis_codes[NUM_AXIS] = {'S', 'R', 'H', 'E'}; -float feedrate_mm_m = 1500.0, saved_feedrate_mm_m; - - -#else -static float destination[NUM_AXIS] = { 0.0 }; -static float feedrate_mm_m = 1500.0, saved_feedrate_mm_m; - -#endif -bool axis_known_position[3] = { false }; -bool axis_homed[3] = { false }; - -static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0; - -static char command_queue[BUFSIZE][MAX_CMD_SIZE]; -static char* current_command, *current_command_args; -static uint8_t cmd_queue_index_r = 0, - cmd_queue_index_w = 0, - commands_in_queue = 0; - -#if ENABLED(INCH_MODE_SUPPORT) - float linear_unit_factor = 1.0; - float volumetric_unit_factor = 1.0; -#endif -#if ENABLED(TEMPERATURE_UNITS_SUPPORT) - TempUnit input_temp_units = TEMPUNIT_C; -#endif - -/** - * Feed rates are often configured with mm/m - * but the planner and stepper like mm/s units. - */ -const float homing_feedrate_mm_m[] = { - #if ENABLED(DELTA) - HOMING_FEEDRATE_Z, HOMING_FEEDRATE_Z, - #else - HOMING_FEEDRATE_XY, HOMING_FEEDRATE_XY, - #endif - HOMING_FEEDRATE_Z, 0 -}; - -int feedrate_percentage = 100, saved_feedrate_percentage; - -bool axis_relative_modes[] = AXIS_RELATIVE_MODES; -int extruder_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); -bool volumetric_enabled = false; -float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA); -float volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0); - -// The distance that XYZ has been offset by G92. Reset by G28. -float position_shift[3] = { 0 }; - -// This offset is added to the configured home position. -// Set by M206, M428, or menu item. Saved to EEPROM. -float home_offset[3] = { 0 }; - -// Software Endstops. Default to configured limits. -float sw_endstop_min[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }; -float sw_endstop_max[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS }; - -#if FAN_COUNT > 0 - int fanSpeeds[FAN_COUNT] = { 0 }; -#endif - -// The active extruder (tool). Set with T command. -uint8_t active_extruder = 0; - -// Relative Mode. Enable with G91, disable with G90. -static bool relative_mode = false; - -volatile bool wait_for_heatup = true; - -const char errormagic[] PROGMEM = "Error:"; -const char echomagic[] PROGMEM = "echo:"; -const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; - -static int serial_count = 0; - -// GCode parameter pointer used by code_seen(), code_value_float(), etc. -static char* seen_pointer; - -// Next Immediate GCode Command pointer. NULL if none. -const char* queued_commands_P = NULL; - -const int sensitive_pins[] = SENSITIVE_PINS; ///< Sensitive pin list for M42 - -// Inactivity shutdown -millis_t previous_cmd_ms = 0; -static millis_t max_inactive_time = 0; -static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL; - -// Print Job Timer -#if ENABLED(PRINTCOUNTER) - PrintCounter print_job_timer = PrintCounter(); -#else - Stopwatch print_job_timer = Stopwatch(); -#endif - -// Buzzer - I2C on the LCD or a BEEPER_PIN -#if ENABLED(LCD_USE_I2C_BUZZER) - #define BUZZ(d,f) lcd_buzz(d, f) -#elif HAS_BUZZER - Buzzer buzzer; - #define BUZZ(d,f) buzzer.tone(d, f) -#else - #define BUZZ(d,f) NOOP -#endif - -static uint8_t target_extruder; - -#if HAS_BED_PROBE - float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; -#endif - -#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS])) - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - int xy_probe_feedrate_mm_m = XY_PROBE_SPEED; - bool bed_leveling_in_progress = false; - #define XY_PROBE_FEEDRATE_MM_M xy_probe_feedrate_mm_m -#elif defined(XY_PROBE_SPEED) - #define XY_PROBE_FEEDRATE_MM_M XY_PROBE_SPEED -#else - #define XY_PROBE_FEEDRATE_MM_M MMS_TO_MMM(PLANNER_XY_FEEDRATE()) -#endif - -#if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA) - float z_endstop_adj = 0; -#endif - -// Extruder offsets -#if HOTENDS > 1 - float hotend_offset[][HOTENDS] = { - HOTEND_OFFSET_X, - HOTEND_OFFSET_Y - #ifdef HOTEND_OFFSET_Z - , HOTEND_OFFSET_Z - #endif - }; -#endif - -#if HAS_Z_SERVO_ENDSTOP - const int z_servo_angle[2] = Z_SERVO_ANGLES; -#endif - -#if ENABLED(BARICUDA) - int baricuda_valve_pressure = 0; - int baricuda_e_to_p_pressure = 0; -#endif - -#if ENABLED(FWRETRACT) - - bool autoretract_enabled = false; - bool retracted[EXTRUDERS] = { false }; - bool retracted_swap[EXTRUDERS] = { false }; - - float retract_length = RETRACT_LENGTH; - float retract_length_swap = RETRACT_LENGTH_SWAP; - float retract_feedrate_mm_s = RETRACT_FEEDRATE; - float retract_zlift = RETRACT_ZLIFT; - float retract_recover_length = RETRACT_RECOVER_LENGTH; - float retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; - float retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE; - -#endif // FWRETRACT - -#if ENABLED(ULTIPANEL) && HAS_POWER_SWITCH - bool powersupply = - #if ENABLED(PS_DEFAULT_OFF) - false - #else - true - #endif - ; -#endif - -#if ENABLED(DELTA) - - #define TOWER_1 X_AXIS - #define TOWER_2 Y_AXIS - #define TOWER_3 Z_AXIS - - float delta[3]; - float cartesian_position[3] = { 0 }; - #define SIN_60 0.8660254037844386 - #define COS_60 0.5 - float endstop_adj[3] = { 0 }; - // these are the default values, can be overriden with M665 - float delta_radius = DELTA_RADIUS; - float delta_tower1_x = -SIN_60 * (delta_radius + DELTA_RADIUS_TRIM_TOWER_1); // front left tower - float delta_tower1_y = -COS_60 * (delta_radius + DELTA_RADIUS_TRIM_TOWER_1); - float delta_tower2_x = SIN_60 * (delta_radius + DELTA_RADIUS_TRIM_TOWER_2); // front right tower - float delta_tower2_y = -COS_60 * (delta_radius + DELTA_RADIUS_TRIM_TOWER_2); - float delta_tower3_x = 0; // back middle tower - float delta_tower3_y = (delta_radius + DELTA_RADIUS_TRIM_TOWER_3); - float delta_diagonal_rod = DELTA_DIAGONAL_ROD; - float delta_diagonal_rod_trim_tower_1 = DELTA_DIAGONAL_ROD_TRIM_TOWER_1; - float delta_diagonal_rod_trim_tower_2 = DELTA_DIAGONAL_ROD_TRIM_TOWER_2; - float delta_diagonal_rod_trim_tower_3 = DELTA_DIAGONAL_ROD_TRIM_TOWER_3; - float delta_diagonal_rod_2_tower_1 = sq(delta_diagonal_rod + delta_diagonal_rod_trim_tower_1); - float delta_diagonal_rod_2_tower_2 = sq(delta_diagonal_rod + delta_diagonal_rod_trim_tower_2); - float delta_diagonal_rod_2_tower_3 = sq(delta_diagonal_rod + delta_diagonal_rod_trim_tower_3); - float delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; - float delta_clip_start_height = Z_MAX_POS; - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - int delta_grid_spacing[2] = { 0, 0 }; - float bed_level[AUTO_BED_LEVELING_GRID_POINTS][AUTO_BED_LEVELING_GRID_POINTS]; - #endif - float delta_safe_distance_from_top(); -#else - static bool home_all_axis = true; -#endif - -#if ENABLED(SCARA) - float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND; - float delta[3]; - float axis_scaling[3] = { 1, 1, 1 }; // Build size scaling, default to 1 -#endif - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - //Variables for Filament Sensor input - float filament_width_nominal = DEFAULT_NOMINAL_FILAMENT_DIA; //Set nominal filament width, can be changed with M404 - bool filament_sensor = false; //M405 turns on filament_sensor control, M406 turns it off - float filament_width_meas = DEFAULT_MEASURED_FILAMENT_DIA; //Stores the measured filament diameter - int8_t measurement_delay[MAX_MEASUREMENT_DELAY + 1]; //ring buffer to delay measurement store extruder factor after subtracting 100 - int filwidth_delay_index1 = 0; //index into ring buffer - int filwidth_delay_index2 = -1; //index into ring buffer - set to -1 on startup to indicate ring buffer needs to be initialized - int meas_delay_cm = MEASUREMENT_DELAY_CM; //distance delay setting -#endif - -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - static bool filament_ran_out = false; -#endif - -#if ENABLED(FILAMENT_CHANGE_FEATURE) - FilamentChangeMenuResponse filament_change_menu_response; -#endif - -#if ENABLED(MIXING_EXTRUDER) - float mixing_factor[MIXING_STEPPERS]; - #if MIXING_VIRTUAL_TOOLS > 1 - float mixing_virtual_tool_mix[MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS]; - #endif -#endif - -static bool send_ok[BUFSIZE]; - -#if HAS_SERVOS - Servo servo[NUM_SERVOS]; - #define MOVE_SERVO(I, P) servo[I].move(P) - #if HAS_Z_SERVO_ENDSTOP - #define DEPLOY_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[0]) - #define STOW_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[1]) - #endif -#endif - -#ifdef CHDK - millis_t chdkHigh = 0; - boolean chdkActive = false; -#endif - -#if ENABLED(PID_EXTRUSION_SCALING) - int lpq_len = 20; -#endif - -#if ENABLED(HOST_KEEPALIVE_FEATURE) - static MarlinBusyState busy_state = NOT_BUSY; - static millis_t next_busy_signal_ms = 0; - uint8_t host_keepalive_interval = DEFAULT_KEEPALIVE_INTERVAL; - #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0) -#else - #define host_keepalive() ; - #define KEEPALIVE_STATE(n) ; -#endif // HOST_KEEPALIVE_FEATURE - -/** - * *************************************************************************** - * ******************************** FUNCTIONS ******************************** - * *************************************************************************** - */ - -void stop(); - -void get_available_commands(); -void process_next_command(); -void prepare_move_to_destination(); -void set_current_from_steppers_for_axis(AxisEnum axis); - -#if ENABLED(ARC_SUPPORT) - void plan_arc(float target[NUM_AXIS], float* offset, uint8_t clockwise); -#endif - -#if ENABLED(BEZIER_CURVE_SUPPORT) - void plan_cubic_move(const float offset[4]); -#endif - -void serial_echopair_P(const char* s_P, char v) { serialprintPGM(s_P); SERIAL_CHAR(v); } -void serial_echopair_P(const char* s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_P(const char* s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_P(const char* s_P, float v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } - -void tool_change(const uint8_t tmp_extruder, const float fr_mm_m=0.0, bool no_move=false); -static void report_current_position(); - -#if ENABLED(DEBUG_LEVELING_FEATURE) - void print_xyz(const char* prefix, const char* suffix, const float x, const float y, const float z) { - serialprintPGM(prefix); - SERIAL_ECHOPAIR("(", x); - SERIAL_ECHOPAIR(", ", y); - SERIAL_ECHOPAIR(", ", z); - SERIAL_ECHOPGM(")"); - - if (suffix) serialprintPGM(suffix); - else SERIAL_EOL; - } - - void print_xyz(const char* prefix, const char* suffix, const float xyz[]) { - print_xyz(prefix, suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]); - } - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - void print_xyz(const char* prefix, const char* suffix, const vector_3 &xyz) { - print_xyz(prefix, suffix, xyz.x, xyz.y, xyz.z); - } - #endif - - #define DEBUG_POS(SUFFIX,VAR) do { \ - print_xyz(PSTR(STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0) -#endif - -/** - * sync_plan_position - * Set planner / stepper positions to the cartesian current_position. - * The stepper code translates these coordinates into step units. - * Allows translation between steps and millimeters for cartesian & core robots - */ -inline void sync_plan_position() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position); - #endif - planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); -} -inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); } - -#if ENABLED(DELTA) || ENABLED(SCARA) - inline void sync_plan_position_delta() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position_delta", current_position); - #endif - inverse_kinematics(current_position); - planner.set_position_mm(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]); - } - #define SYNC_PLAN_POSITION_KINEMATIC() sync_plan_position_delta() -#else - #define SYNC_PLAN_POSITION_KINEMATIC() sync_plan_position() -#endif - -#if ENABLED(SDSUPPORT) - #include "SdFatUtil.h" - int freeMemory() { return SdFatUtil::FreeRam(); } -#else -extern "C" { - extern unsigned int __bss_end; - extern unsigned int __heap_start; - extern void* __brkval; - - int freeMemory() { - int free_memory; - if ((int)__brkval == 0) - free_memory = ((int)&free_memory) - ((int)&__bss_end); - else - free_memory = ((int)&free_memory) - ((int)__brkval); - return free_memory; - } -} -#endif //!SDSUPPORT - -#if ENABLED(DIGIPOT_I2C) - extern void digipot_i2c_set_current(int channel, float current); - extern void digipot_i2c_init(); -#endif - -/** - * Inject the next "immediate" command, when possible. - * Return true if any immediate commands remain to inject. - */ -static bool drain_queued_commands_P() { - if (queued_commands_P != NULL) { - size_t i = 0; - char c, cmd[30]; - strncpy_P(cmd, queued_commands_P, sizeof(cmd) - 1); - cmd[sizeof(cmd) - 1] = '\0'; - while ((c = cmd[i]) && c != '\n') i++; // find the end of this gcode command - cmd[i] = '\0'; - if (enqueue_and_echo_command(cmd)) { // success? - if (c) // newline char? - queued_commands_P += i + 1; // advance to the next command - else - queued_commands_P = NULL; // nul char? no more commands - } - } - return (queued_commands_P != NULL); // return whether any more remain -} - -/** - * Record one or many commands to run from program memory. - * Aborts the current queue, if any. - * Note: drain_queued_commands_P() must be called repeatedly to drain the commands afterwards - */ -void enqueue_and_echo_commands_P(const char* pgcode) { - queued_commands_P = pgcode; - drain_queued_commands_P(); // first command executed asap (when possible) -} - -void clear_command_queue() { - cmd_queue_index_r = cmd_queue_index_w; - commands_in_queue = 0; -} - -/** - * Once a new command is in the ring buffer, call this to commit it - */ -inline void _commit_command(bool say_ok) { - send_ok[cmd_queue_index_w] = say_ok; - cmd_queue_index_w = (cmd_queue_index_w + 1) % BUFSIZE; - commands_in_queue++; -} - -/** - * Copy a command directly into the main command buffer, from RAM. - * Returns true if successfully adds the command - */ -inline bool _enqueuecommand(const char* cmd, bool say_ok=false) { - if (*cmd == ';' || commands_in_queue >= BUFSIZE) return false; - strcpy(command_queue[cmd_queue_index_w], cmd); - _commit_command(say_ok); - return true; -} - -void enqueue_and_echo_command_now(const char* cmd) { - while (!enqueue_and_echo_command(cmd)) idle(); -} - -/** - * Enqueue with Serial Echo - */ -bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { - if (_enqueuecommand(cmd, say_ok)) { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_Enqueueing); - SERIAL_ECHO(cmd); - SERIAL_ECHOLNPGM("\""); - return true; - } - return false; -} - -void setup_killpin() { - #if HAS_KILL - SET_INPUT(KILL_PIN); - WRITE(KILL_PIN, HIGH); - #endif -} - -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - - void setup_filrunoutpin() { - pinMode(FIL_RUNOUT_PIN, INPUT); - #if ENABLED(ENDSTOPPULLUP_FIL_RUNOUT) - WRITE(FIL_RUNOUT_PIN, HIGH); - #endif - } - -#endif - -// Set home pin -void setup_homepin(void) { - #if HAS_HOME - SET_INPUT(HOME_PIN); - WRITE(HOME_PIN, HIGH); - #endif -} - - -void setup_photpin() { - #if HAS_PHOTOGRAPH - OUT_WRITE(PHOTOGRAPH_PIN, LOW); - #endif -} - -void setup_powerhold() { - #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, HIGH); - #endif - #if HAS_POWER_SWITCH - #if ENABLED(PS_DEFAULT_OFF) - OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP); - #else - OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); - #endif - #endif -} - -void suicide() { - #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, LOW); - #endif -} - -void servo_init() { - #if NUM_SERVOS >= 1 && HAS_SERVO_0 - servo[0].attach(SERVO0_PIN); - servo[0].detach(); // Just set up the pin. We don't have a position yet. Don't move to a random position. - #endif - #if NUM_SERVOS >= 2 && HAS_SERVO_1 - servo[1].attach(SERVO1_PIN); - servo[1].detach(); - #endif - #if NUM_SERVOS >= 3 && HAS_SERVO_2 - servo[2].attach(SERVO2_PIN); - servo[2].detach(); - #endif - #if NUM_SERVOS >= 4 && HAS_SERVO_3 - servo[3].attach(SERVO3_PIN); - servo[3].detach(); - #endif - - #if HAS_Z_SERVO_ENDSTOP - /** - * Set position of Z Servo Endstop - * - * The servo might be deployed and positioned too low to stow - * when starting up the machine or rebooting the board. - * There's no way to know where the nozzle is positioned until - * homing has been done - no homing with z-probe without init! - * - */ - STOW_Z_SERVO(); - #endif - - #if HAS_BED_PROBE - endstops.enable_z_probe(false); - #endif -} - -/** - * Stepper Reset (RigidBoard, et.al.) - */ -#if HAS_STEPPER_RESET - void disableStepperDrivers() { - pinMode(STEPPER_RESET_PIN, OUTPUT); - digitalWrite(STEPPER_RESET_PIN, LOW); // drive it down to hold in reset motor driver chips - } - void enableStepperDrivers() { pinMode(STEPPER_RESET_PIN, INPUT); } // set to input, which allows it to be pulled high by pullups -#endif - - - -/** - * Marlin entry-point: Set up before the program loop - * - Set up the kill pin, filament runout, power hold - * - Start the serial port - * - Print startup messages and diagnostics - * - Get EEPROM or default settings - * - Initialize managers for: - * �temperature - * �planner - * �watchdog - * �stepper - * �photo pin - * �servos - * �LCD controller - * �Digipot I2C - * �Z probe sled - * �status LEDs - */ -void setup() { - - #ifdef DISABLE_JTAG - // Disable JTAG on AT90USB chips to free up pins for IO - MCUCR = 0x80; - MCUCR = 0x80; - #endif - - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - setup_filrunoutpin(); - #endif - - - setup_killpin(); - - setup_powerhold(); - - #if HAS_STEPPER_RESET - disableStepperDrivers(); - #endif - - MYSERIAL.begin(BAUDRATE); - SERIAL_PROTOCOLLNPGM("start"); - SERIAL_ECHO_START; - - - - - // Check startup - does nothing if bootloader sets MCUSR to 0 - byte mcu = MCUSR; - if (mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP); - if (mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET); - if (mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET); - if (mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET); - if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET); - MCUSR = 0; - - SERIAL_ECHOPGM(MSG_MARLIN); - SERIAL_ECHOLNPGM(" " SHORT_BUILD_VERSION); - - #ifdef STRING_DISTRIBUTION_DATE - #ifdef STRING_CONFIG_H_AUTHOR - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_CONFIGURATION_VER); - SERIAL_ECHOPGM(STRING_DISTRIBUTION_DATE); - SERIAL_ECHOPGM(MSG_AUTHOR); - SERIAL_ECHOLNPGM(STRING_CONFIG_H_AUTHOR); - SERIAL_ECHOPGM("Compiled: "); - SERIAL_ECHOLNPGM(__DATE__); - #endif // STRING_CONFIG_H_AUTHOR - #endif // STRING_DISTRIBUTION_DATE - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_FREE_MEMORY); - SERIAL_ECHO(freeMemory()); - SERIAL_ECHOPGM(MSG_PLANNER_BUFFER_BYTES); - SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE); - - // Send "ok" after commands by default - for (int8_t i = 0; i < BUFSIZE; i++) send_ok[i] = true; - - // Load data from EEPROM if available (or use defaults) - // This also updates variables in the planner, elsewhere - Config_RetrieveSettings(); - - // Initialize current position based on home_offset - memcpy(current_position, home_offset, sizeof(home_offset)); - - // Vital to init stepper/planner equivalent for current_position - SYNC_PLAN_POSITION_KINEMATIC(); - - thermalManager.init(); // Initialize temperature loop - - #if ENABLED(USE_WATCHDOG) - watchdog_init(); - #endif - - stepper.init(); // Initialize stepper, this enables interrupts! - setup_photpin(); - servo_init(); - - #if HAS_CONTROLLERFAN - SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan - #endif - - #if HAS_STEPPER_RESET - enableStepperDrivers(); - #endif - - #if ENABLED(DIGIPOT_I2C) - digipot_i2c_init(); - #endif - - #if ENABLED(DAC_STEPPER_CURRENT) - dac_init(); - #endif - - #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED) - pinMode(SLED_PIN, OUTPUT); - digitalWrite(SLED_PIN, LOW); // turn it off - #endif // Z_PROBE_SLED - - setup_homepin(); - - #ifdef STAT_LED_RED - pinMode(STAT_LED_RED, OUTPUT); - digitalWrite(STAT_LED_RED, LOW); // turn it off - #endif - - #ifdef STAT_LED_BLUE - pinMode(STAT_LED_BLUE, OUTPUT); - digitalWrite(STAT_LED_BLUE, LOW); // turn it off - #endif - - lcd_init(); - #if ENABLED(SHOW_BOOTSCREEN) - #if ENABLED(DOGLCD) - safe_delay(BOOTSCREEN_TIMEOUT); - #elif ENABLED(ULTRA_LCD) - bootscreen(); - lcd_init(); - #endif - #endif - - #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 - // Initialize mixing to 100% color 1 - for (uint8_t i = 0; i < MIXING_STEPPERS; i++) - mixing_factor[i] = (i == 0) ? 1 : 0; - for (uint8_t t = 0; t < MIXING_VIRTUAL_TOOLS; t++) - for (uint8_t i = 0; i < MIXING_STEPPERS; i++) - mixing_virtual_tool_mix[t][i] = mixing_factor[i]; - #endif - -#ifdef UARM_SWIFT - debugPrint("\r\nSWIFT DEBUG START\r\n"); - - swift_init(); - - -#endif // UARM_SWIFT -} - -/** - * The main Marlin program loop - * - * - Save or log commands to SD - * - Process available commands (if not saving) - * - Call heater manager - * - Call inactivity manager - * - Call endstop manager - * - Call LCD update - */ -void loop() { - if (commands_in_queue < BUFSIZE) get_available_commands(); - - #if ENABLED(SDSUPPORT) - card.checkautostart(false); - #endif - - if (commands_in_queue) { - - #if ENABLED(SDSUPPORT) - - if (card.saving) { - char* command = command_queue[cmd_queue_index_r]; - if (strstr_P(command, PSTR("M29"))) { - // M29 closes the file - card.closefile(); - SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED); - ok_to_send(); - } - else { - // Write the string from the read buffer to SD - card.write_command(command); - if (card.logging) - process_next_command(); // The card is saving because it's logging - else - ok_to_send(); - } - } - else - process_next_command(); - - #else - - process_next_command(); - - #endif // SDSUPPORT - - // The queue may be reset by a command handler or by code invoked by idle() within a handler - if (commands_in_queue) { - --commands_in_queue; - cmd_queue_index_r = (cmd_queue_index_r + 1) % BUFSIZE; - } - } - endstops.report_state(); - -#ifdef UARM_SWIFT - service.play(); -#endif // UARM_SWIFT - - idle(); -} - -void gcode_line_error(const char* err, bool doFlush = true) { - SERIAL_ERROR_START; - serialprintPGM(err); - SERIAL_ERRORLN(gcode_LastN); - //Serial.println(gcode_N); - if (doFlush) FlushSerialRequestResend(); - serial_count = 0; -} - -inline void get_serial_commands() { - static char serial_line_buffer[MAX_CMD_SIZE]; - static boolean serial_comment_mode = false; - - // If the command buffer is empty for too long, - // send "wait" to indicate Marlin is still waiting. - #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0 - static millis_t last_command_time = 0; - millis_t ms = millis(); - if (commands_in_queue == 0 && !MYSERIAL.available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) { - SERIAL_ECHOLNPGM(MSG_WAIT); - last_command_time = ms; - } - #endif - - /** - * Loop while serial characters are incoming and the queue is not full - */ - while (commands_in_queue < BUFSIZE && MYSERIAL.available() > 0) { - - char serial_char = MYSERIAL.read(); - - /** - * If the character ends the line - */ - if (serial_char == '\n' || serial_char == '\r') { - - serial_comment_mode = false; // end of line == end of comment - - if (!serial_count) continue; // skip empty lines - - serial_line_buffer[serial_count] = 0; // terminate string - serial_count = 0; //reset buffer - - char* command = serial_line_buffer; - - while (*command == ' ') command++; // skip any leading spaces - char* npos = (*command == 'N') ? command : NULL; // Require the N parameter to start the line - char* apos = strchr(command, '*'); - - if (npos) { - - boolean M110 = strstr_P(command, PSTR("M110")) != NULL; - - if (M110) { - char* n2pos = strchr(command + 4, 'N'); - if (n2pos) npos = n2pos; - } - - gcode_N = strtol(npos + 1, NULL, 10); - - if (gcode_N != gcode_LastN + 1 && !M110) { - gcode_line_error(PSTR(MSG_ERR_LINE_NO)); - return; - } - - if (apos) { - byte checksum = 0, count = 0; - while (command[count] != '*') checksum ^= command[count++]; - - if (strtol(apos + 1, NULL, 10) != checksum) { - gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH)); - return; - } - // if no errors, continue parsing - } - else { - gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM)); - return; - } - - gcode_LastN = gcode_N; - // if no errors, continue parsing - } - else if (apos) { // No '*' without 'N' - gcode_line_error(PSTR(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM), false); - return; - } - - // Movement commands alert when stopped - if (IsStopped()) { - char* gpos = strchr(command, 'G'); - if (gpos) { - int codenum = strtol(gpos + 1, NULL, 10); - switch (codenum) { - case 0: - case 1: - case 2: - case 3: - SERIAL_ERRORLNPGM(MSG_ERR_STOPPED); - LCD_MESSAGEPGM(MSG_STOPPED); - break; - } - } - } - - #if DISABLED(EMERGENCY_PARSER) - // If command was e-stop process now - if (strcmp(command, "M108") == 0) wait_for_heatup = false; - if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED)); - if (strcmp(command, "M410") == 0) { quickstop_stepper(); } - #endif - - #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0 - last_command_time = ms; - #endif - - // Add the command to the queue - _enqueuecommand(serial_line_buffer, true); - } - else if (serial_count >= MAX_CMD_SIZE - 1) { - // Keep fetching, but ignore normal characters beyond the max length - // The command will be injected when EOL is reached - } - else if (serial_char == '\\') { // Handle escapes - if (MYSERIAL.available() > 0) { - // if we have one more character, copy it over - serial_char = MYSERIAL.read(); - if (!serial_comment_mode) serial_line_buffer[serial_count++] = serial_char; - } - // otherwise do nothing - } - else { // it's not a newline, carriage return or escape char - if (serial_char == ';') serial_comment_mode = true; - if (!serial_comment_mode) serial_line_buffer[serial_count++] = serial_char; - } - - } // queue has space, serial has data -} - -#if ENABLED(SDSUPPORT) - - inline void get_sdcard_commands() { - static bool stop_buffering = false, - sd_comment_mode = false; - - if (!card.sdprinting) return; - - /** - * '#' stops reading from SD to the buffer prematurely, so procedural - * macro calls are possible. If it occurs, stop_buffering is triggered - * and the buffer is run dry; this character _can_ occur in serial com - * due to checksums, however, no checksums are used in SD printing. - */ - - if (commands_in_queue == 0) stop_buffering = false; - - uint16_t sd_count = 0; - bool card_eof = card.eof(); - while (commands_in_queue < BUFSIZE && !card_eof && !stop_buffering) { - int16_t n = card.get(); - char sd_char = (char)n; - card_eof = card.eof(); - if (card_eof || n == -1 - || sd_char == '\n' || sd_char == '\r' - || ((sd_char == '#' || sd_char == ':') && !sd_comment_mode) - ) { - if (card_eof) { - SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); - card.printingHasFinished(); - card.checkautostart(true); - } - else if (n == -1) { - SERIAL_ERROR_START; - SERIAL_ECHOLNPGM(MSG_SD_ERR_READ); - } - if (sd_char == '#') stop_buffering = true; - - sd_comment_mode = false; //for new command - - if (!sd_count) continue; //skip empty lines - - command_queue[cmd_queue_index_w][sd_count] = '\0'; //terminate string - sd_count = 0; //clear buffer - - _commit_command(false); - } - else if (sd_count >= MAX_CMD_SIZE - 1) { - /** - * Keep fetching, but ignore normal characters beyond the max length - * The command will be injected when EOL is reached - */ - } - else { - if (sd_char == ';') sd_comment_mode = true; - if (!sd_comment_mode) command_queue[cmd_queue_index_w][sd_count++] = sd_char; - } - } - } - -#endif // SDSUPPORT - -/** - * Add to the circular command queue the next command from: - * - The command-injection queue (queued_commands_P) - * - The active serial input (usually USB) - * - The SD card file being actively printed - */ -void get_available_commands() { - - // if any immediate commands remain, don't get other commands yet - if (drain_queued_commands_P()) return; - - get_serial_commands(); - - #if ENABLED(SDSUPPORT) - get_sdcard_commands(); - #endif -} - -inline bool code_has_value() { - int i = 1; - char c = seen_pointer[i]; - while (c == ' ') c = seen_pointer[++i]; - if (c == '-' || c == '+') c = seen_pointer[++i]; - if (c == '.') c = seen_pointer[++i]; - return NUMERIC(c); -} - -inline float code_value_float() { - float ret; - char* e = strchr(seen_pointer, 'E'); - if (e) { - *e = 0; - ret = strtod(seen_pointer + 1, NULL); - *e = 'E'; - } - else - ret = strtod(seen_pointer + 1, NULL); - return ret; -} - -inline unsigned long code_value_ulong() { return strtoul(seen_pointer + 1, NULL, 10); } - -inline long code_value_long() { return strtol(seen_pointer + 1, NULL, 10); } - -inline int code_value_int() { return (int)strtol(seen_pointer + 1, NULL, 10); } - -inline uint16_t code_value_ushort() { return (uint16_t)strtoul(seen_pointer + 1, NULL, 10); } - -inline uint8_t code_value_byte() { return (uint8_t)(constrain(strtol(seen_pointer + 1, NULL, 10), 0, 255)); } - -inline bool code_value_bool() { return code_value_byte() > 0; } - -#if ENABLED(INCH_MODE_SUPPORT) - inline void set_input_linear_units(LinearUnit units) { - switch (units) { - case LINEARUNIT_INCH: - linear_unit_factor = 25.4; - break; - case LINEARUNIT_MM: - default: - linear_unit_factor = 1.0; - break; - } - volumetric_unit_factor = pow(linear_unit_factor, 3.0); - } - - inline float axis_unit_factor(int axis) { - return (axis == E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); - } - - inline float code_value_linear_units() { return code_value_float() * linear_unit_factor; } - inline float code_value_axis_units(int axis) { return code_value_float() * axis_unit_factor(axis); } - inline float code_value_per_axis_unit(int axis) { return code_value_float() / axis_unit_factor(axis); } - -#else - - inline float code_value_linear_units() { return code_value_float(); } - inline float code_value_axis_units(int axis) { UNUSED(axis); return code_value_float(); } - inline float code_value_per_axis_unit(int axis) { UNUSED(axis); return code_value_float(); } - -#endif - -#if ENABLED(TEMPERATURE_UNITS_SUPPORT) - inline void set_input_temp_units(TempUnit units) { input_temp_units = units; } - - float code_value_temp_abs() { - switch (input_temp_units) { - case TEMPUNIT_C: - return code_value_float(); - case TEMPUNIT_F: - return (code_value_float() - 32) * 0.5555555556; - case TEMPUNIT_K: - return code_value_float() - 272.15; - default: - return code_value_float(); - } - } - - float code_value_temp_diff() { - switch (input_temp_units) { - case TEMPUNIT_C: - case TEMPUNIT_K: - return code_value_float(); - case TEMPUNIT_F: - return code_value_float() * 0.5555555556; - default: - return code_value_float(); - } - } -#else - float code_value_temp_abs() { return code_value_float(); } - float code_value_temp_diff() { return code_value_float(); } -#endif - -FORCE_INLINE millis_t code_value_millis() { return code_value_ulong(); } -inline millis_t code_value_millis_from_seconds() { return code_value_float() * 1000; } - -bool code_seen(char code) { - seen_pointer = strchr(current_command_args, code); - return (seen_pointer != NULL); // Return TRUE if the code-letter was found -} - -/** - * Set target_extruder from the T parameter or the active_extruder - * - * Returns TRUE if the target is invalid - */ -bool get_target_extruder_from_command(int code) { - if (code_seen('T')) { - if (code_value_byte() >= EXTRUDERS) { - SERIAL_ECHO_START; - SERIAL_CHAR('M'); - SERIAL_ECHO(code); - SERIAL_ECHOPAIR(" " MSG_INVALID_EXTRUDER " ", code_value_byte()); - SERIAL_EOL; - return true; - } - target_extruder = code_value_byte(); - } - else - target_extruder = active_extruder; - - return false; -} - -#define DEFINE_PGM_READ_ANY(type, reader) \ - static inline type pgm_read_any(const type *p) \ - { return pgm_read_##reader##_near(p); } - -DEFINE_PGM_READ_ANY(float, float); -DEFINE_PGM_READ_ANY(signed char, byte); - -#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ - static const PROGMEM type array##_P[3] = \ - { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \ - static inline type array(int axis) \ - { return pgm_read_any(&array##_P[axis]); } - -XYZ_CONSTS_FROM_CONFIG(float, base_min_pos, MIN_POS); -XYZ_CONSTS_FROM_CONFIG(float, base_max_pos, MAX_POS); -XYZ_CONSTS_FROM_CONFIG(float, base_home_pos, HOME_POS); -XYZ_CONSTS_FROM_CONFIG(float, max_length, MAX_LENGTH); -XYZ_CONSTS_FROM_CONFIG(float, home_bump_mm, HOME_BUMP_MM); -XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); - -#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - bool extruder_duplication_enabled = false; // Used in Dual X mode 2 -#endif - -#if ENABLED(DUAL_X_CARRIAGE) - - #define DXC_FULL_CONTROL_MODE 0 - #define DXC_AUTO_PARK_MODE 1 - #define DXC_DUPLICATION_MODE 2 - - static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; - - static float x_home_pos(int extruder) { - if (extruder == 0) - return LOGICAL_X_POSITION(base_home_pos(X_AXIS)); - else - /** - * In dual carriage mode the extruder offset provides an override of the - * second X-carriage offset when homed - otherwise X2_HOME_POS is used. - * This allow soft recalibration of the second extruder offset position - * without firmware reflash (through the M218 command). - */ - return (hotend_offset[X_AXIS][1] > 0) ? hotend_offset[X_AXIS][1] : X2_HOME_POS; - } - - static int x_home_dir(int extruder) { - return (extruder == 0) ? X_HOME_DIR : X2_HOME_DIR; - } - - static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1 - static bool active_extruder_parked = false; // used in mode 1 & 2 - static float raised_parked_position[NUM_AXIS]; // used in mode 1 - static millis_t delayed_move_time = 0; // used in mode 1 - static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2 - static float duplicate_extruder_temp_offset = 0; // used in mode 2 - -#endif //DUAL_X_CARRIAGE - -/** - * Software endstops can be used to monitor the open end of - * an axis that has a hardware endstop on the other end. Or - * they can prevent axes from moving past endstops and grinding. - * - * To keep doing their job as the coordinate system changes, - * the software endstop positions must be refreshed to remain - * at the same positions relative to the machine. - */ -static void update_software_endstops(AxisEnum axis) { - float offs = LOGICAL_POSITION(0, axis); - - #if ENABLED(DUAL_X_CARRIAGE) - if (axis == X_AXIS) { - float dual_max_x = max(hotend_offset[X_AXIS][1], X2_MAX_POS); - if (active_extruder != 0) { - sw_endstop_min[X_AXIS] = X2_MIN_POS + offs; - sw_endstop_max[X_AXIS] = dual_max_x + offs; - return; - } - else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) { - sw_endstop_min[X_AXIS] = base_min_pos(X_AXIS) + offs; - sw_endstop_max[X_AXIS] = min(base_max_pos(X_AXIS), dual_max_x - duplicate_extruder_x_offset) + offs; - return; - } - } - else - #endif - { - sw_endstop_min[axis] = base_min_pos(axis) + offs; - sw_endstop_max[axis] = base_max_pos(axis) + offs; - } - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("For ", axis_codes[axis]); - SERIAL_ECHOPAIR(" axis:\n home_offset = ", home_offset[axis]); - SERIAL_ECHOPAIR("\n position_shift = ", position_shift[axis]); - SERIAL_ECHOPAIR("\n sw_endstop_min = ", sw_endstop_min[axis]); - SERIAL_ECHOPAIR("\n sw_endstop_max = ", sw_endstop_max[axis]); - SERIAL_EOL; - } - #endif - - #if ENABLED(DELTA) - if (axis == Z_AXIS) { - delta_clip_start_height = sw_endstop_max[axis] - delta_safe_distance_from_top(); - } - #endif - -} - -/** - * Change the home offset for an axis, update the current - * position and the software endstops to retain the same - * relative distance to the new home. - * - * Since this changes the current_position, code should - * call sync_plan_position soon after this. - */ -static void set_home_offset(AxisEnum axis, float v) { - current_position[axis] += v - home_offset[axis]; - home_offset[axis] = v; - update_software_endstops(axis); -} - -static void set_axis_is_at_home(AxisEnum axis) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis); - SERIAL_ECHOLNPGM(")"); - } - #endif - - position_shift[axis] = 0; - - #if ENABLED(DUAL_X_CARRIAGE) - if (axis == X_AXIS && (active_extruder != 0 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) { - if (active_extruder != 0) - current_position[X_AXIS] = x_home_pos(active_extruder); - else - current_position[X_AXIS] = LOGICAL_X_POSITION(base_home_pos(X_AXIS)); - update_software_endstops(X_AXIS); - return; - } - #endif - - #if ENABLED(SCARA) - - if (axis == X_AXIS || axis == Y_AXIS) { - - float homeposition[3]; - LOOP_XYZ(i) homeposition[i] = LOGICAL_POSITION(base_home_pos(i), i); - - // SERIAL_ECHOPGM("homeposition[x]= "); SERIAL_ECHO(homeposition[0]); - // SERIAL_ECHOPGM("homeposition[y]= "); SERIAL_ECHOLN(homeposition[1]); - - /** - * Works out real Homeposition angles using inverse kinematics, - * and calculates homing offset using forward kinematics - */ - inverse_kinematics(homeposition); - forward_kinematics_SCARA(delta); - - // SERIAL_ECHOPAIR("Delta X=", delta[X_AXIS]); - // SERIAL_ECHOPGM(" Delta Y="); SERIAL_ECHOLN(delta[Y_AXIS]); - - current_position[axis] = LOGICAL_POSITION(delta[axis], axis); - - /** - * SCARA home positions are based on configuration since the actual - * limits are determined by the inverse kinematic transform. - */ - sw_endstop_min[axis] = base_min_pos(axis); // + (delta[axis] - base_home_pos(axis)); - sw_endstop_max[axis] = base_max_pos(axis); // + (delta[axis] - base_home_pos(axis)); - } - else - #endif - { - current_position[axis] = LOGICAL_POSITION(base_home_pos(axis), axis); - update_software_endstops(axis); - - #if HAS_BED_PROBE && Z_HOME_DIR < 0 && DISABLED(Z_MIN_PROBE_ENDSTOP) - if (axis == Z_AXIS) { - current_position[Z_AXIS] -= zprobe_zoffset; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> zprobe_zoffset = ", zprobe_zoffset); - SERIAL_EOL; - } - #endif - } - #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> home_offset[", axis_codes[axis]); - SERIAL_ECHOPAIR("] = ", home_offset[axis]); - SERIAL_EOL; - DEBUG_POS("", current_position); - } - #endif - } - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("<<< set_axis_is_at_home(", axis); - SERIAL_ECHOLNPGM(")"); - } - #endif -} - -/** - * Some planner shorthand inline functions - */ -inline float get_homing_bump_feedrate(AxisEnum axis) { - const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR; - int hbd = homing_bump_divisor[axis]; - if (hbd < 1) { - hbd = 10; - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1"); - } - return homing_feedrate_mm_m[axis] / hbd; -} -// -// line_to_current_position -// Move the planner to the current position from wherever it last moved -// (or from wherever it has been told it is located). -// -inline void line_to_current_position() { - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder); -} - -inline void line_to_z(float zPosition) { - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder); -} - -inline void line_to_axis_pos(AxisEnum axis, float where, float fr_mm_m = 0.0) { - float old_feedrate_mm_m = feedrate_mm_m; - current_position[axis] = where; - feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[axis]; - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(feedrate_mm_m), active_extruder); - stepper.synchronize(); - feedrate_mm_m = old_feedrate_mm_m; -} - -// -// line_to_destination -// Move the planner, not necessarily synced with current_position -// - -#ifdef UARM_SWIFT - - - -float delta_angle[3]; -extern float angle_destination[NUM_AXIS]; -//extern float current_angle[NUM_AXIS]; -unsigned char inverse_kinematics(const float in_cartesian[3], float angle[3]); -inline void set_current_to_destination(); -inline void line_to_destination(); - -void get_current_pos_polor(float polor[], float pos[]) -{ - float angle[3]; - double x, y, z; - - x = pos[0]; - y = pos[1]; - z = pos[2]; - - inverse_kinematics(pos, angle); - - double stretch; - stretch = sqrt(x * x + y * y); - - polor[0] = stretch; - polor[1]= angle[0]; - polor[2] = z; -} - - -void get_pos_from_polor(float pos[], float polor[]) -{ - pos[2] = polor[2]; - pos[0] = polor[0] * sin(polor[1] / MATH_TRANS); - pos[1] = -polor[0] * cos(polor[1] / MATH_TRANS); - -} - - -void gcode_get_destination_polor() -{ - float polor_destination[NUM_AXIS]; - float current_polor[NUM_AXIS]; - - get_current_pos_polor(current_polor, current_position); - - debugPrint("cur polor:%f %f %f\r\n", current_polor[0], current_polor[1],current_polor[2]); - - LOOP_XYZE(i) { - if (code_seen(polor_axis_codes[i])) - { - - polor_destination[i] = code_value_float() + (axis_relative_modes[i] || relative_mode ? current_polor[i] : 0); - - } - else - polor_destination[i] = current_polor[i]; - } - - - debugPrint("des polor:%f %f %f\r\n", polor_destination[0], polor_destination[1],polor_destination[2]); - - - get_pos_from_polor(destination, polor_destination); - - - - - debugPrint("destination:%f %f %f\r\n", destination[0], destination[1], destination[2]); - - - if (code_seen('F') && code_value_linear_units() > 0.0) - feedrate_mm_m = code_value_linear_units(); - - - line_to_destination(); - - set_current_to_destination(); - - -} - -void gcode_get_destination_angle(uint8_t index) -{ - // get current angle - float current_angle[NUM_AXIS]; - - inverse_kinematics(current_position, current_angle); - - LOOP_XYZ(i) { - - angle_destination[i] = current_angle[i]; - } - - if (code_seen('V')) - { - - angle_destination[index] = code_value_float() + (axis_relative_modes[index] || relative_mode ? current_angle[index] : 0); - - } - - - - if (code_seen('F') && code_value_linear_units() > 0.0) - feedrate_mm_m = code_value_linear_units(); - -} - -void line_to_destination_angle() -{ - float target[NUM_AXIS]; - LOOP_XYZ(i) target[i] = angle_destination[i]; - - target[E_AXIS] = destination[E_AXIS]; - - debugPrint("target: %f, %f, %f\r\n", target[0], target[1], target[2]); - - - planner.buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder); - - getXYZFromAngle(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], target[X_AXIS], target[Y_AXIS], target[Z_AXIS]); - - set_current_to_destination(); - -} - - -unsigned char inverse_kinematics(const float in_cartesian[3], float angle[3]) { - - float xIn = 0.0; - float zIn = 0.0; - float rightAll = 0.0; - float sqrtZX = 0.0; - float phi = 0.0; - - float x = in_cartesian[0]; - float y = in_cartesian[1]; - float z = in_cartesian[2]; - - float angleRot = 0; - float angleLeft = 0; - float angleRight = 0; - - z += get_height_offset(); - - zIn = (z - MATH_L1) / MATH_LOWER_ARM; - - if (x < 0.1) - { - x = 0.1; - } - - // Calculate value of theta 1: the rotation angle - if (y == 0) - { - angleRot = 90; - } - else - { - - if (y < 0) - { - angleRot = -atan(x / y) * MATH_TRANS;//angle tranfer 0-180 CCW ?????? - } - if (y > 0) - { - angleRot = 180 - atan(x / y) * MATH_TRANS;//angle tranfer 0-180 CCW - } - } - - xIn = (x / sin(angleRot / MATH_TRANS) - MATH_L2 - get_front_end_offset()) / MATH_LOWER_ARM;///(x / cos(angleRot / MATH_TRANS) - MATH_L2 - MATH_FRONT_HEADER) / MATH_LOWER_ARM; - - - - phi = atan(zIn / xIn) * MATH_TRANS;//phi is the angle of line (from joint 2 to joint 4) with the horizon - - sqrtZX = sqrt(zIn*zIn + xIn*xIn); // ??2???4??? - - rightAll = (sqrtZX*sqrtZX + MATH_UPPER_LOWER * MATH_UPPER_LOWER - 1) / (2 * MATH_UPPER_LOWER * sqrtZX);//cosin law - angleRight = acos(rightAll) * MATH_TRANS;//cosin law - - // Calculate value of theta 2 - rightAll = (sqrtZX*sqrtZX + 1 - MATH_UPPER_LOWER * MATH_UPPER_LOWER ) / (2 * sqrtZX);//cosin law - angleLeft = acos(rightAll) * MATH_TRANS;//cosin law - - angleLeft = angleLeft + phi; - angleRight = angleRight - phi; - - if(isnan(angleRot)||isnan(angleLeft)||isnan(angleRight)) - { - return -1; - } - - if (angleLeft > LOWER_ARM_MAX_ANGLE) - { - return -1; - } - else if (angleLeft < LOWER_ARM_MIN_ANGLE) - { - return -1; - } - - if (angleRight > UPPER_ARM_MAX_ANGLE) - { - return -1; - } - else if (angleRight < UPPER_ARM_MIN_ANGLE) - { - return -1; - } - - if (angleLeft + angleRight > (180 - LOWER_UPPER_MIN_ANGLE)) - { - //angleLeft = 180 - LOWER_UPPER_MIN_ANGLE - angleRight; - return -1; - } - - if ((180 - angleLeft - angleRight) > LOWER_UPPER_MAX_ANGLE) - { - //angleRight = 180 - LOWER_UPPER_MAX_ANGLE - angleLeft; - return -1; - } - - - angleRot = constrain(angleRot, 0.00, 180.00); - angleLeft = constrain(angleLeft, 0.00, 180.00); - angleRight = constrain(angleRight, 0.00, 180.00); - - - angle[0] = angleRot; - angle[1] = angleLeft; - angle[2] = angleRight; - - return 0; - -} - - -inline void line_to_destination(float fr_mm_m) { - - float target[NUM_AXIS]; - LOOP_XYZE(i) target[i] = destination[i]; - - - float difference[NUM_AXIS]; - LOOP_XYZE(i) difference[i] = target[i] - current_position[i]; - - - - float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]); - if (cartesian_mm < 0.000001) return false; - float _feedrate_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m); - float seconds = cartesian_mm / _feedrate_mm_s; - int steps = max(1, int(SEGMENTS_PER_SECOND * seconds)); - float inv_steps = 1.0/steps; - - //SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm); - //SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds); - //SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps); - - for (int s = 1; s <= steps; s++) { - - float fraction = float(s) * inv_steps; - - LOOP_XYZE(i) - target[i] = current_position[i] + difference[i] * fraction;\ - - - - if (inverse_kinematics(target, delta_angle) == 0) - { - - #if ENABLED(DELTA) && ENABLED(AUTO_BED_LEVELING_FEATURE) - if (!bed_leveling_in_progress) adjust_delta(target); - #endif - - //DEBUG_POS("target", target); - //DEBUG_POS("delta_angle", delta_angle); - - planner.buffer_line(delta_angle[X_AXIS], delta_angle[Y_AXIS], delta_angle[Z_AXIS], target[E_AXIS], _feedrate_mm_s, active_extruder); - } - - } -} -#else -inline void line_to_destination(float fr_mm_m) { - planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], MMM_TO_MMS(fr_mm_m), active_extruder); -} -#endif -inline void line_to_destination() { line_to_destination(feedrate_mm_m); } - -inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); } -inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); } - -#if ENABLED(DELTA) - /** - * Calculate delta, start a line, and set current_position to destination - */ - void prepare_move_to_destination_raw() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_move_to_destination_raw", destination); - #endif - refresh_cmd_timeout(); - inverse_kinematics(destination); - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder); - set_current_to_destination(); - } -#endif - -/** - * Plan a move to (X, Y, Z) and set the current_position - * The final current_position may not be the one that was requested - */ -void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) { - float old_feedrate_mm_m = feedrate_mm_m; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, x, y, z); - #endif - - #if ENABLED(DELTA) - - feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M; - - set_destination_to_current(); // sync destination at the start - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_to_current", destination); - #endif - - // when in the danger zone - if (current_position[Z_AXIS] > delta_clip_start_height) { - if (z > delta_clip_start_height) { // staying in the danger zone - destination[X_AXIS] = x; // move directly (uninterpolated) - destination[Y_AXIS] = y; - destination[Z_AXIS] = z; - prepare_move_to_destination_raw(); // set_current_to_destination - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position); - #endif - return; - } - else { - destination[Z_AXIS] = delta_clip_start_height; - prepare_move_to_destination_raw(); // set_current_to_destination - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position); - #endif - } - } - - if (z > current_position[Z_AXIS]) { // raising? - destination[Z_AXIS] = z; - prepare_move_to_destination_raw(); // set_current_to_destination - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position); - #endif - } - - destination[X_AXIS] = x; - destination[Y_AXIS] = y; - prepare_move_to_destination(); // set_current_to_destination - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position); - #endif - - if (z < current_position[Z_AXIS]) { // lowering? - destination[Z_AXIS] = z; - prepare_move_to_destination_raw(); // set_current_to_destination - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position); - #endif - } - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< do_blocking_move_to"); - #endif - - #else - - // If Z needs to raise, do it before moving XY - if (current_position[Z_AXIS] < z) { - feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS]; - current_position[Z_AXIS] = z; - line_to_current_position(); - } - - feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M; - current_position[X_AXIS] = x; - current_position[Y_AXIS] = y; - line_to_current_position(); - - // If Z needs to lower, do it after moving XY - if (current_position[Z_AXIS] > z) { - feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : homing_feedrate_mm_m[Z_AXIS]; - current_position[Z_AXIS] = z; - line_to_current_position(); - } - - #endif - - stepper.synchronize(); - - feedrate_mm_m = old_feedrate_mm_m; -} -void do_blocking_move_to_x(float x, float fr_mm_m/*=0.0*/) { - do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m); -} -void do_blocking_move_to_z(float z, float fr_mm_m/*=0.0*/) { - do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_m); -} -void do_blocking_move_to_xy(float x, float y, float fr_mm_m/*=0.0*/) { - do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m); -} - -// -// Prepare to do endstop or probe moves -// with custom feedrates. -// -// - Save current feedrates -// - Reset the rate multiplier -// - Reset the command timeout -// - Enable the endstops (for endstop moves) -// -static void setup_for_endstop_or_probe_move() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("setup_for_endstop_or_probe_move", current_position); - #endif - saved_feedrate_mm_m = feedrate_mm_m; - saved_feedrate_percentage = feedrate_percentage; - feedrate_percentage = 100; - refresh_cmd_timeout(); -} - -static void clean_up_after_endstop_or_probe_move() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("clean_up_after_endstop_or_probe_move", current_position); - #endif - feedrate_mm_m = saved_feedrate_mm_m; - feedrate_percentage = saved_feedrate_percentage; - refresh_cmd_timeout(); -} - -#if HAS_BED_PROBE - /** - * Raise Z to a minimum height to make room for a probe to move - */ - inline void do_probe_raise(float z_raise) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("do_probe_raise(", z_raise); - SERIAL_ECHOLNPGM(")"); - } - #endif - float z_dest = LOGICAL_Z_POSITION(z_raise); - if (z_dest > current_position[Z_AXIS]) - do_blocking_move_to_z(z_dest); - } - -#endif //HAS_BED_PROBE - -#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(Z_SAFE_HOMING) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) - static bool axis_unhomed_error(const bool x, const bool y, const bool z) { - const bool xx = x && !axis_homed[X_AXIS], - yy = y && !axis_homed[Y_AXIS], - zz = z && !axis_homed[Z_AXIS]; - if (xx || yy || zz) { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_HOME " "); - if (xx) SERIAL_ECHOPGM(MSG_X); - if (yy) SERIAL_ECHOPGM(MSG_Y); - if (zz) SERIAL_ECHOPGM(MSG_Z); - SERIAL_ECHOLNPGM(" " MSG_FIRST); - - #if ENABLED(ULTRA_LCD) - char message[3 * (LCD_WIDTH) + 1] = ""; // worst case is kana.utf with up to 3*LCD_WIDTH+1 - strcat_P(message, PSTR(MSG_HOME " ")); - if (xx) strcat_P(message, PSTR(MSG_X)); - if (yy) strcat_P(message, PSTR(MSG_Y)); - if (zz) strcat_P(message, PSTR(MSG_Z)); - strcat_P(message, PSTR(" " MSG_FIRST)); - lcd_setstatus(message); - #endif - return true; - } - return false; - } -#endif - -#if ENABLED(Z_PROBE_SLED) - - #ifndef SLED_DOCKING_OFFSET - #define SLED_DOCKING_OFFSET 0 - #endif - - /** - * Method to dock/undock a sled designed by Charles Bell. - * - * stow[in] If false, move to MAX_X and engage the solenoid - * If true, move to MAX_X and release the solenoid - */ - static void dock_sled(bool stow) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("dock_sled(", stow); - SERIAL_ECHOLNPGM(")"); - } - #endif - - // Dock sled a bit closer to ensure proper capturing - do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0)); - - #if PIN_EXISTS(SLED) - digitalWrite(SLED_PIN, !stow); // switch solenoid - #endif - } - -#endif // Z_PROBE_SLED -#if ENABLED(Z_PROBE_ALLEN_KEY) - void run_deploy_moves_script() { - #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z) - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Y - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z, Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z) - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Y - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z, Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z) - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Y - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z, Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z) - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X - #define Z_PROBE_ALLEN_KEY_DEPLOY_4_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Y - #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_4_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z, Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z) - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X - #define Z_PROBE_ALLEN_KEY_DEPLOY_5_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Y - #define Z_PROBE_ALLEN_KEY_DEPLOY_5_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_5_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE - #define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z, Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE); - #endif - } - void run_stow_moves_script() { - #if defined(Z_PROBE_ALLEN_KEY_STOW_1_X) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_1_Z) - #ifndef Z_PROBE_ALLEN_KEY_STOW_1_X - #define Z_PROBE_ALLEN_KEY_STOW_1_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_1_Y - #define Z_PROBE_ALLEN_KEY_STOW_1_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_1_Z - #define Z_PROBE_ALLEN_KEY_STOW_1_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z, Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z) - #ifndef Z_PROBE_ALLEN_KEY_STOW_2_X - #define Z_PROBE_ALLEN_KEY_STOW_2_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_2_Y - #define Z_PROBE_ALLEN_KEY_STOW_2_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_2_Z - #define Z_PROBE_ALLEN_KEY_STOW_2_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z, Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z) - #ifndef Z_PROBE_ALLEN_KEY_STOW_3_X - #define Z_PROBE_ALLEN_KEY_STOW_3_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_3_Y - #define Z_PROBE_ALLEN_KEY_STOW_3_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_3_Z - #define Z_PROBE_ALLEN_KEY_STOW_3_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z, Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z) - #ifndef Z_PROBE_ALLEN_KEY_STOW_4_X - #define Z_PROBE_ALLEN_KEY_STOW_4_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_4_Y - #define Z_PROBE_ALLEN_KEY_STOW_4_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_4_Z - #define Z_PROBE_ALLEN_KEY_STOW_4_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z, Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE); - #endif - #if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z) - #ifndef Z_PROBE_ALLEN_KEY_STOW_5_X - #define Z_PROBE_ALLEN_KEY_STOW_5_X current_position[X_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_5_Y - #define Z_PROBE_ALLEN_KEY_STOW_5_Y current_position[Y_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_5_Z - #define Z_PROBE_ALLEN_KEY_STOW_5_Z current_position[Z_AXIS] - #endif - #ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE - #define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0 - #endif - do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z, Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE); - #endif - } -#endif - -#if HAS_BED_PROBE - - // TRIGGERED_WHEN_STOWED_TEST can easily be extended to servo probes, ... if needed. - #if ENABLED(PROBE_IS_TRIGGERED_WHEN_STOWED_TEST) - #if ENABLED(Z_MIN_PROBE_ENDSTOP) - #define _TRIGGERED_WHEN_STOWED_TEST (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) - #else - #define _TRIGGERED_WHEN_STOWED_TEST (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) - #endif - #endif - - #define DEPLOY_PROBE() set_probe_deployed( true ) - #define STOW_PROBE() set_probe_deployed( false ) - - // returns false for ok and true for failure - static bool set_probe_deployed(bool deploy) { - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - DEBUG_POS("set_probe_deployed", current_position); - SERIAL_ECHOPAIR("deploy: ", deploy); - SERIAL_EOL; - } - #endif - - if (endstops.z_probe_enabled == deploy) return false; - - // Make room for probe - do_probe_raise(_Z_PROBE_DEPLOY_HEIGHT); - - #if ENABLED(Z_PROBE_SLED) - if (axis_unhomed_error(true, false, false)) { stop(); return true; } - #elif ENABLED(Z_PROBE_ALLEN_KEY) - if (axis_unhomed_error(true, true, true )) { stop(); return true; } - #endif - - float oldXpos = current_position[X_AXIS]; // save x position - float oldYpos = current_position[Y_AXIS]; // save y position - - #ifdef _TRIGGERED_WHEN_STOWED_TEST - // If endstop is already false, the Z probe is deployed - if (_TRIGGERED_WHEN_STOWED_TEST == deploy) { // closed after the probe specific actions. - // Would a goto be less ugly? - //while (!_TRIGGERED_WHEN_STOWED_TEST) { idle(); // would offer the opportunity - // for a triggered when stowed manual probe. - #endif - - #if ENABLED(Z_PROBE_SLED) - dock_sled(!deploy); - #elif HAS_Z_SERVO_ENDSTOP - servo[Z_ENDSTOP_SERVO_NR].move(z_servo_angle[((deploy) ? 0 : 1)]); - #elif ENABLED(Z_PROBE_ALLEN_KEY) - if (!deploy) run_stow_moves_script(); - else run_deploy_moves_script(); - #else - // Nothing to be done. Just enable_z_probe below... - #endif - - #ifdef _TRIGGERED_WHEN_STOWED_TEST - }; // opened before the probe specific actions - - if (_TRIGGERED_WHEN_STOWED_TEST == deploy) { - if (IsRunning()) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("Z-Probe failed"); - LCD_ALERTMESSAGEPGM("Err: ZPROBE"); - } - stop(); - return true; - } - #endif - - do_blocking_move_to(oldXpos, oldYpos, current_position[Z_AXIS]); // return to position before deploy - endstops.enable_z_probe( deploy ); - return false; - } - - // Do a single Z probe and return with current_position[Z_AXIS] - // at the height where the probe triggered. - static float run_z_probe() { - - // Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding - refresh_cmd_timeout(); - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - planner.bed_level_matrix.set_to_identity(); - #endif - - #if ENABLED(PROBE_DOUBLE_TOUCH) - do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), Z_PROBE_SPEED_FAST); - endstops.hit_on_purpose(); - set_current_from_steppers_for_axis(Z_AXIS); - SYNC_PLAN_POSITION_KINEMATIC(); - - // move up the retract distance - do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST); - #else - // move fast, close to the bed - do_blocking_move_to_z(home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST); - #endif - - // move down slowly to find bed - do_blocking_move_to_z(current_position[Z_AXIS] -2.0*home_bump_mm(Z_AXIS), Z_PROBE_SPEED_SLOW); - endstops.hit_on_purpose(); - set_current_from_steppers_for_axis(Z_AXIS); - SYNC_PLAN_POSITION_KINEMATIC(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("run_z_probe", current_position); - #endif - - return current_position[Z_AXIS]; - } - - // - // - Move to the given XY - // - Deploy the probe, if not already deployed - // - Probe the bed, get the Z position - // - Depending on the 'stow' flag - // - Stow the probe, or - // - Raise to the BETWEEN height - // - Return the probed Z position - // - static float probe_pt(float x, float y, bool stow = true, int verbose_level = 1) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR(">>> probe_pt(", x); - SERIAL_ECHOPAIR(", ", y); - SERIAL_ECHOPAIR(", ", stow ? "stow" : "no stow"); - SERIAL_ECHOLNPGM(")"); - DEBUG_POS("", current_position); - } - #endif - - float old_feedrate_mm_m = feedrate_mm_m; - - // Ensure a minimum height before moving the probe - do_probe_raise(Z_PROBE_TRAVEL_HEIGHT); - - // Move to the XY where we shall probe - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> do_blocking_move_to_xy(", x - (X_PROBE_OFFSET_FROM_EXTRUDER)); - SERIAL_ECHOPAIR(", ", y - (Y_PROBE_OFFSET_FROM_EXTRUDER)); - SERIAL_ECHOLNPGM(")"); - } - #endif - feedrate_mm_m = XY_PROBE_FEEDRATE_MM_M; - do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER)); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> "); - #endif - if (DEPLOY_PROBE()) return NAN; - - float measured_z = run_z_probe(); - - if (stow) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> "); - #endif - if (STOW_PROBE()) return NAN; - } - else { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> do_probe_raise"); - #endif - do_probe_raise(Z_PROBE_TRAVEL_HEIGHT); - } - - if (verbose_level > 2) { - SERIAL_PROTOCOLPGM("Bed X: "); - SERIAL_PROTOCOL_F(x, 3); - SERIAL_PROTOCOLPGM(" Y: "); - SERIAL_PROTOCOL_F(y, 3); - SERIAL_PROTOCOLPGM(" Z: "); - SERIAL_PROTOCOL_F(measured_z, 3); - SERIAL_EOL; - } - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< probe_pt"); - #endif - - feedrate_mm_m = old_feedrate_mm_m; - - return measured_z; - } - -#endif // HAS_BED_PROBE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #if DISABLED(DELTA) - - static void set_bed_level_equation_lsq(double* plane_equation_coefficients) { - - //planner.bed_level_matrix.debug("bed level before"); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - planner.bed_level_matrix.set_to_identity(); - if (DEBUGGING(LEVELING)) { - vector_3 uncorrected_position = planner.adjusted_position(); - DEBUG_POS(">>> set_bed_level_equation_lsq", uncorrected_position); - DEBUG_POS(">>> set_bed_level_equation_lsq", current_position); - } - #endif - - vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1); - planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal); - - vector_3 corrected_position = planner.adjusted_position(); - current_position[X_AXIS] = corrected_position.x; - current_position[Y_AXIS] = corrected_position.y; - current_position[Z_AXIS] = corrected_position.z; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("<<< set_bed_level_equation_lsq", corrected_position); - #endif - - SYNC_PLAN_POSITION_KINEMATIC(); - } - - #endif // !DELTA - - #else // !AUTO_BED_LEVELING_GRID - - static void set_bed_level_equation_3pts(float z_at_pt_1, float z_at_pt_2, float z_at_pt_3) { - - planner.bed_level_matrix.set_to_identity(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - vector_3 uncorrected_position = planner.adjusted_position(); - DEBUG_POS("set_bed_level_equation_3pts", uncorrected_position); - } - #endif - - vector_3 pt1 = vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, z_at_pt_1); - vector_3 pt2 = vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, z_at_pt_2); - vector_3 pt3 = vector_3(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, z_at_pt_3); - vector_3 planeNormal = vector_3::cross(pt1 - pt2, pt3 - pt2).get_normal(); - - if (planeNormal.z < 0) { - planeNormal.x = -planeNormal.x; - planeNormal.y = -planeNormal.y; - planeNormal.z = -planeNormal.z; - } - - planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal); - vector_3 corrected_position = planner.adjusted_position(); - - current_position[X_AXIS] = corrected_position.x; - current_position[Y_AXIS] = corrected_position.y; - current_position[Z_AXIS] = corrected_position.z; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("set_bed_level_equation_3pts", corrected_position); - #endif - - SYNC_PLAN_POSITION_KINEMATIC(); - } - - #endif // !AUTO_BED_LEVELING_GRID - - #if ENABLED(DELTA) - - /** - * All DELTA leveling in the Marlin uses NONLINEAR_BED_LEVELING - */ - static void extrapolate_one_point(int x, int y, int xdir, int ydir) { - if (bed_level[x][y] != 0.0) { - return; // Don't overwrite good values. - } - float a = 2 * bed_level[x + xdir][y] - bed_level[x + xdir * 2][y]; // Left to right. - float b = 2 * bed_level[x][y + ydir] - bed_level[x][y + ydir * 2]; // Front to back. - float c = 2 * bed_level[x + xdir][y + ydir] - bed_level[x + xdir * 2][y + ydir * 2]; // Diagonal. - float median = c; // Median is robust (ignores outliers). - if (a < b) { - if (b < c) median = b; - if (c < a) median = a; - } - else { // b <= a - if (c < b) median = b; - if (a < c) median = a; - } - bed_level[x][y] = median; - } - - /** - * Fill in the unprobed points (corners of circular print surface) - * using linear extrapolation, away from the center. - */ - static void extrapolate_unprobed_bed_level() { - int half = (AUTO_BED_LEVELING_GRID_POINTS - 1) / 2; - for (int y = 0; y <= half; y++) { - for (int x = 0; x <= half; x++) { - if (x + y < 3) continue; - extrapolate_one_point(half - x, half - y, x > 1 ? +1 : 0, y > 1 ? +1 : 0); - extrapolate_one_point(half + x, half - y, x > 1 ? -1 : 0, y > 1 ? +1 : 0); - extrapolate_one_point(half - x, half + y, x > 1 ? +1 : 0, y > 1 ? -1 : 0); - extrapolate_one_point(half + x, half + y, x > 1 ? -1 : 0, y > 1 ? -1 : 0); - } - } - } - - /** - * Print calibration results for plotting or manual frame adjustment. - */ - static void print_bed_level() { - for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) { - for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) { - SERIAL_PROTOCOL_F(bed_level[x][y], 2); - SERIAL_PROTOCOLCHAR(' '); - } - SERIAL_EOL; - } - } - - /** - * Reset calibration results to zero. - */ - void reset_bed_level() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level"); - #endif - for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) { - for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) { - bed_level[x][y] = 0.0; - } - } - } - - #endif // DELTA - -#endif // AUTO_BED_LEVELING_FEATURE - -/** - * Home an individual axis - */ - -#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS) - -static void homeaxis(AxisEnum axis) { - #define HOMEAXIS_DO(LETTER) \ - ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1)) - - if (!(axis == X_AXIS ? HOMEAXIS_DO(X) : axis == Y_AXIS ? HOMEAXIS_DO(Y) : axis == Z_AXIS ? HOMEAXIS_DO(Z) : 0)) return; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR(">>> homeaxis(", axis); - SERIAL_ECHOLNPGM(")"); - } - #endif - - int axis_home_dir = - #if ENABLED(DUAL_X_CARRIAGE) - (axis == X_AXIS) ? x_home_dir(active_extruder) : - #endif - home_dir(axis); - - // Homing Z towards the bed? Deploy the Z probe or endstop. - #if HAS_BED_PROBE && DISABLED(Z_MIN_PROBE_ENDSTOP) - if (axis == Z_AXIS && axis_home_dir < 0) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> "); - #endif - if (DEPLOY_PROBE()) return; - } - #endif - - // Set the axis position as setup for the move - current_position[axis] = 0; - sync_plan_position(); - - // Set a flag for Z motor locking - #if ENABLED(Z_DUAL_ENDSTOPS) - if (axis == Z_AXIS) stepper.set_homing_flag(true); - #endif - - // Move towards the endstop until an endstop is triggered - line_to_axis_pos(axis, 1.5 * max_length(axis) * axis_home_dir); - - // Set the axis position as setup for the move - current_position[axis] = 0; - sync_plan_position(); - - // Move away from the endstop by the axis HOME_BUMP_MM - line_to_axis_pos(axis, -home_bump_mm(axis) * axis_home_dir); - - // Move slowly towards the endstop until triggered - line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis)); - - // reset current_position to 0 to reflect hitting endpoint - current_position[axis] = 0; - sync_plan_position(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position); - #endif - - #if ENABLED(Z_DUAL_ENDSTOPS) - if (axis == Z_AXIS) { - float adj = fabs(z_endstop_adj); - bool lockZ1; - if (axis_home_dir > 0) { - adj = -adj; - lockZ1 = (z_endstop_adj > 0); - } - else - lockZ1 = (z_endstop_adj < 0); - - if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true); - - // Move to the adjusted endstop height - line_to_axis_pos(axis, adj); - - if (lockZ1) stepper.set_z_lock(false); else stepper.set_z2_lock(false); - stepper.set_homing_flag(false); - } // Z_AXIS - #endif - - #if ENABLED(DELTA) - // retrace by the amount specified in endstop_adj - if (endstop_adj[axis] * axis_home_dir < 0) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]); - DEBUG_POS("", current_position); - } - #endif - line_to_axis_pos(axis, endstop_adj[axis]); - } - #endif - - // Set the axis position to its home position (plus home offsets) - set_axis_is_at_home(axis); - - SYNC_PLAN_POSITION_KINEMATIC(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> AFTER set_axis_is_at_home", current_position); - #endif - - destination[axis] = current_position[axis]; - endstops.hit_on_purpose(); // clear endstop hit flags - axis_known_position[axis] = true; - axis_homed[axis] = true; - - // Put away the Z probe - #if HAS_BED_PROBE && DISABLED(Z_MIN_PROBE_ENDSTOP) - if (axis == Z_AXIS && axis_home_dir < 0) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> "); - #endif - if (STOW_PROBE()) return; - } - #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("<<< homeaxis(", axis); - SERIAL_ECHOLNPGM(")"); - } - #endif -} - -#if ENABLED(FWRETRACT) - - void retract(bool retracting, bool swapping = false) { - - if (retracting == retracted[active_extruder]) return; - - float old_feedrate_mm_m = feedrate_mm_m; - - set_destination_to_current(); - - if (retracting) { - - feedrate_mm_m = MMS_TO_MMM(retract_feedrate_mm_s); - current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder]; - sync_plan_position_e(); - prepare_move_to_destination(); - - if (retract_zlift > 0.01) { - current_position[Z_AXIS] -= retract_zlift; - SYNC_PLAN_POSITION_KINEMATIC(); - prepare_move_to_destination(); - } - } - else { - - if (retract_zlift > 0.01) { - current_position[Z_AXIS] += retract_zlift; - SYNC_PLAN_POSITION_KINEMATIC(); - } - - feedrate_mm_m = MMS_TO_MMM(retract_recover_feedrate_mm_s); - float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length; - current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder]; - sync_plan_position_e(); - prepare_move_to_destination(); - } - - feedrate_mm_m = old_feedrate_mm_m; - retracted[active_extruder] = retracting; - - } // retract() - -#endif // FWRETRACT - -#if ENABLED(MIXING_EXTRUDER) - - void normalize_mix() { - float mix_total = 0.0; - for (int i = 0; i < MIXING_STEPPERS; i++) { - float v = mixing_factor[i]; - if (v < 0) v = mixing_factor[i] = 0; - mix_total += v; - } - // Scale all values if they don't add up to ~1.0 - if (mix_total < 0.9999 || mix_total > 1.0001) { - SERIAL_PROTOCOLLNPGM("Warning: Mix factors must add up to 1.0. Scaling."); - float mix_scale = 1.0 / mix_total; - for (int i = 0; i < MIXING_STEPPERS; i++) - mixing_factor[i] *= mix_scale; - } - } - - #if ENABLED(DIRECT_MIXING_IN_G1) - // Get mixing parameters from the GCode - // Factors that are left out are set to 0 - // The total "must" be 1.0 (but it will be normalized) - void gcode_get_mix() { - const char* mixing_codes = "ABCDHI"; - for (int i = 0; i < MIXING_STEPPERS; i++) - mixing_factor[i] = code_seen(mixing_codes[i]) ? code_value_float() : 0; - - normalize_mix(); - } - #endif - -#endif - -/** - * *************************************************************************** - * ***************************** G-CODE HANDLING ***************************** - * *************************************************************************** - */ - -/** - * Set XYZE destination and feedrate from the current GCode command - * - * - Set destination from included axis codes - * - Set to current for missing axis codes - * - Set the feedrate, if included - */ -void gcode_get_destination() { - LOOP_XYZE(i) { - if (code_seen(axis_codes[i])) - { - destination[i] = code_value_axis_units(i) + (axis_relative_modes[i] || relative_mode ? current_position[i] : 0); - } - else - destination[i] = current_position[i]; - } - - if (code_seen('F') && code_value_linear_units() > 0.0) - feedrate_mm_m = code_value_linear_units(); - - #if ENABLED(PRINTCOUNTER) - if (!DEBUGGING(DRYRUN)) - print_job_timer.incFilamentUsed(destination[E_AXIS] - current_position[E_AXIS]); - #endif - - // Get ABCDHI mixing factors - #if ENABLED(MIXING_EXTRUDER) && ENABLED(DIRECT_MIXING_IN_G1) - gcode_get_mix(); - #endif -} - -void unknown_command_error() { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND); - SERIAL_ECHO(current_command); - SERIAL_ECHOLNPGM("\""); -} - -#if ENABLED(HOST_KEEPALIVE_FEATURE) - - /** - * Output a "busy" message at regular intervals - * while the machine is not accepting commands. - */ - void host_keepalive() { - millis_t ms = millis(); - if (host_keepalive_interval && busy_state != NOT_BUSY) { - if (PENDING(ms, next_busy_signal_ms)) return; - switch (busy_state) { - case IN_HANDLER: - case IN_PROCESS: - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_BUSY_PROCESSING); - break; - case PAUSED_FOR_USER: - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_BUSY_PAUSED_FOR_USER); - break; - case PAUSED_FOR_INPUT: - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_BUSY_PAUSED_FOR_INPUT); - break; - default: - break; - } - } - next_busy_signal_ms = ms + host_keepalive_interval * 1000UL; - } - -#endif //HOST_KEEPALIVE_FEATURE - -/** - * G0, G1: Coordinated movement of X Y Z E axes - */ -inline void gcode_G0_G1() { - if (IsRunning()) { - gcode_get_destination(); // For X Y Z E F - - #if ENABLED(FWRETRACT) - - if (autoretract_enabled && !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) { - float echange = destination[E_AXIS] - current_position[E_AXIS]; - // Is this move an attempt to retract or recover? - if ((echange < -MIN_RETRACT && !retracted[active_extruder]) || (echange > MIN_RETRACT && retracted[active_extruder])) { - current_position[E_AXIS] = destination[E_AXIS]; // hide the slicer-generated retract/recover from calculations - sync_plan_position_e(); // AND from the planner - retract(!retracted[active_extruder]); - return; - } - } - - #endif //FWRETRACT - - prepare_move_to_destination(); - } -} - -/** - * G2: Clockwise Arc - * G3: Counterclockwise Arc - */ -#if ENABLED(ARC_SUPPORT) - inline void gcode_G2_G3(bool clockwise) { - if (IsRunning()) { - - #if ENABLED(SF_ARC_FIX) - bool relative_mode_backup = relative_mode; - relative_mode = true; - #endif - - gcode_get_destination(); - - #if ENABLED(SF_ARC_FIX) - relative_mode = relative_mode_backup; - #endif - - // Center of arc as offset from current_position - float arc_offset[2] = { - code_seen('I') ? code_value_axis_units(X_AXIS) : 0, - code_seen('J') ? code_value_axis_units(Y_AXIS) : 0 - }; - - // Send an arc to the planner - plan_arc(destination, arc_offset, clockwise); - - refresh_cmd_timeout(); - } - } -#endif - -/** - * G4: Dwell S or P - */ -inline void gcode_G4() { - millis_t dwell_ms = 0; - - if (code_seen('P')) dwell_ms = code_value_millis(); // milliseconds to wait - if (code_seen('S')) dwell_ms = code_value_millis_from_seconds(); // seconds to wait - - stepper.synchronize(); - refresh_cmd_timeout(); - dwell_ms += previous_cmd_ms; // keep track of when we started waiting - - if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL); - - while (PENDING(millis(), dwell_ms)) idle(); -} - -#if ENABLED(BEZIER_CURVE_SUPPORT) - - /** - * Parameters interpreted according to: - * http://linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G5-Cubic-Spline - * However I, J omission is not supported at this point; all - * parameters can be omitted and default to zero. - */ - - /** - * G5: Cubic B-spline - */ - inline void gcode_G5() { - if (IsRunning()) { - - gcode_get_destination(); - - float offset[] = { - code_seen('I') ? code_value_axis_units(X_AXIS) : 0.0, - code_seen('J') ? code_value_axis_units(Y_AXIS) : 0.0, - code_seen('P') ? code_value_axis_units(X_AXIS) : 0.0, - code_seen('Q') ? code_value_axis_units(Y_AXIS) : 0.0 - }; - - plan_cubic_move(offset); - } - } - -#endif // BEZIER_CURVE_SUPPORT - -#if ENABLED(FWRETRACT) - - /** - * G10 - Retract filament according to settings of M207 - * G11 - Recover filament according to settings of M208 - */ - inline void gcode_G10_G11(bool doRetract=false) { - #if EXTRUDERS > 1 - if (doRetract) { - retracted_swap[active_extruder] = (code_seen('S') && code_value_bool()); // checks for swap retract argument - } - #endif - retract(doRetract - #if EXTRUDERS > 1 - , retracted_swap[active_extruder] - #endif - ); - } - -#endif //FWRETRACT - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - /** - * G12: Clean the nozzle - */ - inline void gcode_G12() { - // Don't allow nozzle cleaning without homing first - if (axis_unhomed_error(true, true, true)) { return; } - - uint8_t const pattern = code_seen('P') ? code_value_ushort() : 0; - uint8_t const strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES; - uint8_t const objects = code_seen('T') ? code_value_ushort() : 3; - - Nozzle::clean(pattern, strokes, objects); - } -#endif - -#if ENABLED(INCH_MODE_SUPPORT) - /** - * G20: Set input mode to inches - */ - inline void gcode_G20() { - set_input_linear_units(LINEARUNIT_INCH); - } - - /** - * G21: Set input mode to millimeters - */ - inline void gcode_G21() { - set_input_linear_units(LINEARUNIT_MM); - } -#endif - -#if ENABLED(NOZZLE_PARK_FEATURE) - /** - * G27: Park the nozzle - */ - inline void gcode_G27() { - // Don't allow nozzle parking without homing first - if (axis_unhomed_error(true, true, true)) { return; } - uint8_t const z_action = code_seen('P') ? code_value_ushort() : 0; - Nozzle::park(z_action); - } -#endif // NOZZLE_PARK_FEATURE - -#if ENABLED(QUICK_HOME) - - static void quick_home_xy() { - - // Pretend the current position is 0,0 - current_position[X_AXIS] = current_position[Y_AXIS] = 0.0; - sync_plan_position(); - - int x_axis_home_dir = - #if ENABLED(DUAL_X_CARRIAGE) - x_home_dir(active_extruder) - #else - home_dir(X_AXIS) - #endif - ; - - float mlx = max_length(X_AXIS), - mly = max_length(Y_AXIS), - mlratio = mlx > mly ? mly / mlx : mlx / mly, - fr_mm_m = min(homing_feedrate_mm_m[X_AXIS], homing_feedrate_mm_m[Y_AXIS]) * sqrt(sq(mlratio) + 1.0); - - do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_m); - endstops.hit_on_purpose(); // clear endstop hit flags - current_position[X_AXIS] = current_position[Y_AXIS] = 0.0; - - } - -#endif // QUICK_HOME - -/** - * G28: Home all axes according to settings - * - * Parameters - * - * None Home to all axes with no parameters. - * With QUICK_HOME enabled XY will home together, then Z. - * - * Cartesian parameters - * - * X Home to the X endstop - * Y Home to the Y endstop - * Z Home to the Z endstop - * - */ -inline void gcode_G28() { - - #ifdef UARM_SWIFT - return; - #endif // UARM_SWIFT - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM(">>> gcode_G28"); - #endif - - // Wait for planner moves to finish! - stepper.synchronize(); - - // For auto bed leveling, clear the level matrix - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - planner.bed_level_matrix.set_to_identity(); - #if ENABLED(DELTA) - reset_bed_level(); - #endif - #endif - - // Always home with tool 0 active - #if HOTENDS > 1 - uint8_t old_tool_index = active_extruder; - tool_change(0, 0, true); - #endif - - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - extruder_duplication_enabled = false; - #endif - - /** - * For mesh bed leveling deactivate the mesh calculations, will be turned - * on again when homing all axis - */ - #if ENABLED(MESH_BED_LEVELING) - float pre_home_z = MESH_HOME_SEARCH_Z; - if (mbl.active()) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL was active"); - #endif - // Save known Z position if already homed - if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) { - pre_home_z = current_position[Z_AXIS]; - pre_home_z += mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS)); - } - mbl.set_active(false); - current_position[Z_AXIS] = pre_home_z; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Set Z to pre_home_z", current_position); - #endif - } - #endif - - setup_for_endstop_or_probe_move(); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> endstops.enable(true)"); - #endif - endstops.enable(true); // Enable endstops for next homing move - - - #if ENABLED(DELTA) - /** - * A delta can only safely home all axes at the same time - */ - - // Pretend the current position is 0,0,0 - // This is like quick_home_xy() but for 3 towers. - current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = 0.0; - sync_plan_position(); - - // Move all carriages up together until the first endstop is hit. - current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = 3.0 * (Z_MAX_LENGTH); - feedrate_mm_m = 1.732 * homing_feedrate_mm_m[X_AXIS]; - line_to_current_position(); - stepper.synchronize(); - endstops.hit_on_purpose(); // clear endstop hit flags - current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = 0.0; - - // take care of back off and rehome. Now one carriage is at the top. - HOMEAXIS(X); - HOMEAXIS(Y); - HOMEAXIS(Z); - - SYNC_PLAN_POSITION_KINEMATIC(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("(DELTA)", current_position); - #endif - - #else // NOT DELTA - - bool homeX = code_seen('X'), homeY = code_seen('Y'), homeZ = code_seen('Z'); - - home_all_axis = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ); - - set_destination_to_current(); - - #if Z_HOME_DIR > 0 // If homing away from BED do Z first - - if (home_all_axis || homeZ) { - HOMEAXIS(Z); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> HOMEAXIS(Z)", current_position); - #endif - } - - #else - - if (home_all_axis || homeX || homeY) { - // Raise Z before homing any other axes and z is not already high enough (never lower z) - destination[Z_AXIS] = LOGICAL_Z_POSITION(Z_HOMING_HEIGHT); - if (destination[Z_AXIS] > current_position[Z_AXIS]) { - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("Raise Z (before homing) to ", destination[Z_AXIS]); - SERIAL_EOL; - } - #endif - - do_blocking_move_to_z(destination[Z_AXIS]); - } - } - - #endif - - #if ENABLED(QUICK_HOME) - - if (home_all_axis || (homeX && homeY)) quick_home_xy(); - - #endif - - #if ENABLED(HOME_Y_BEFORE_X) - - // Home Y - if (home_all_axis || homeY) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } - - #endif - - // Home X - if (home_all_axis || homeX) { - #if ENABLED(DUAL_X_CARRIAGE) - int tmp_extruder = active_extruder; - active_extruder = !active_extruder; - HOMEAXIS(X); - inactive_extruder_x_pos = RAW_X_POSITION(current_position[X_AXIS]); - active_extruder = tmp_extruder; - HOMEAXIS(X); - // reset state used by the different modes - memcpy(raised_parked_position, current_position, sizeof(raised_parked_position)); - delayed_move_time = 0; - active_extruder_parked = true; - #else - HOMEAXIS(X); - #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeX", current_position); - #endif - } - - #if DISABLED(HOME_Y_BEFORE_X) - // Home Y - if (home_all_axis || homeY) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } - #endif - - // Home Z last if homing towards the bed - #if Z_HOME_DIR < 0 - - if (home_all_axis || homeZ) { - - #if ENABLED(Z_SAFE_HOMING) - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM("> Z_SAFE_HOMING >>>"); - } - #endif - - if (home_all_axis) { - - /** - * At this point we already have Z at Z_HOMING_HEIGHT height - * No need to move Z any more as this height should already be safe - * enough to reach Z_SAFE_HOMING XY positions. - * Just make sure the planner is in sync. - */ - SYNC_PLAN_POSITION_KINEMATIC(); - - /** - * Move the Z probe (or just the nozzle) to the safe homing point - */ - destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER)); - destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER)); - destination[Z_AXIS] = current_position[Z_AXIS]; // Z is already at the right height - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - DEBUG_POS("> Z_SAFE_HOMING > home_all_axis", current_position); - DEBUG_POS("> Z_SAFE_HOMING > home_all_axis", destination); - } - #endif - - // Move in the XY plane - do_blocking_move_to_xy(destination[X_AXIS], destination[Y_AXIS]); - } - - // Let's see if X and Y are homed - if (axis_unhomed_error(true, true, false)) return; - - /** - * Make sure the Z probe is within the physical limits - * NOTE: This doesn't necessarily ensure the Z probe is also - * within the bed! - */ - float cpx = RAW_CURRENT_POSITION(X_AXIS), cpy = RAW_CURRENT_POSITION(Y_AXIS); - if ( cpx >= X_MIN_POS - (X_PROBE_OFFSET_FROM_EXTRUDER) - && cpx <= X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER) - && cpy >= Y_MIN_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER) - && cpy <= Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)) { - - // Home the Z axis - HOMEAXIS(Z); - } - else { - LCD_MESSAGEPGM(MSG_ZPROBE_OUT); - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ZPROBE_OUT); - } - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM("<<< Z_SAFE_HOMING"); - } - #endif - - #else // !Z_SAFE_HOMING - - HOMEAXIS(Z); - - #endif // !Z_SAFE_HOMING - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> (home_all_axis || homeZ) > final", current_position); - #endif - - } // home_all_axis || homeZ - - #endif // Z_HOME_DIR < 0 - - SYNC_PLAN_POSITION_KINEMATIC(); - - #endif // !DELTA (gcode_G28) - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> endstops.not_homing()"); - #endif - endstops.not_homing(); - endstops.hit_on_purpose(); // clear endstop hit flags - - // Enable mesh leveling again - #if ENABLED(MESH_BED_LEVELING) - if (mbl.has_mesh()) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL has mesh"); - #endif - if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL Z homing"); - #endif - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - #if Z_HOME_DIR > 0 - + Z_MAX_POS - #endif - ; - SYNC_PLAN_POSITION_KINEMATIC(); - mbl.set_active(true); - #if ENABLED(MESH_G28_REST_ORIGIN) - current_position[Z_AXIS] = 0.0; - set_destination_to_current(); - feedrate_mm_m = homing_feedrate_mm_m[Z_AXIS]; - line_to_destination(); - stepper.synchronize(); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Rest Origin", current_position); - #endif - #else - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - - mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS)) - #if Z_HOME_DIR > 0 - + Z_MAX_POS - #endif - ; - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("MBL adjusted MESH_HOME_SEARCH_Z", current_position); - #endif - #endif - } - else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) { - current_position[Z_AXIS] = pre_home_z; - SYNC_PLAN_POSITION_KINEMATIC(); - mbl.set_active(true); - current_position[Z_AXIS] = pre_home_z - - mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS)); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Home X or Y", current_position); - #endif - } - } - #endif - - #if ENABLED(DELTA) - // move to a height where we can use the full xy-area - do_blocking_move_to_z(delta_clip_start_height); - #endif - - clean_up_after_endstop_or_probe_move(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28"); - #endif - - // Restore the active tool after homing - #if HOTENDS > 1 - tool_change(old_tool_index, 0, true); - #endif - - report_current_position(); -} - -#if HAS_PROBING_PROCEDURE - - void out_of_range_error(const char* p_edge) { - SERIAL_PROTOCOLPGM("?Probe "); - serialprintPGM(p_edge); - SERIAL_PROTOCOLLNPGM(" position out of range."); - } - -#endif - -#if ENABLED(MESH_BED_LEVELING) - inline void _mbl_goto_xy(float x, float y) { - float old_feedrate_mm_m = feedrate_mm_m; - feedrate_mm_m = homing_feedrate_mm_m[X_AXIS]; - - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - #if Z_PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT - + Z_PROBE_TRAVEL_HEIGHT - #elif Z_HOMING_HEIGHT > 0 - + Z_HOMING_HEIGHT - #endif - ; - line_to_current_position(); - - current_position[X_AXIS] = LOGICAL_X_POSITION(x); - current_position[Y_AXIS] = LOGICAL_Y_POSITION(y); - line_to_current_position(); - - #if Z_PROBE_TRAVEL_HEIGHT > 0 || Z_HOMING_HEIGHT > 0 - current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z); - line_to_current_position(); - #endif - - feedrate_mm_m = old_feedrate_mm_m; - stepper.synchronize(); - } - - /** - * G29: Mesh-based Z probe, probes a grid and produces a - * mesh to compensate for variable bed height - * - * Parameters With MESH_BED_LEVELING: - * - * S0 Produce a mesh report - * S1 Start probing mesh points - * S2 Probe the next mesh point - * S3 Xn Yn Zn.nn Manually modify a single point - * S4 Zn.nn Set z offset. Positive away from bed, negative closer to bed. - * S5 Reset and disable mesh - * - * The S0 report the points as below - * - * +----> X-axis 1-n - * | - * | - * v Y-axis 1-n - * - */ - inline void gcode_G29() { - - static int probe_point = -1; - MeshLevelingState state = code_seen('S') ? (MeshLevelingState)code_value_byte() : MeshReport; - if (state < 0 || state > 5) { - SERIAL_PROTOCOLLNPGM("S out of range (0-5)."); - return; - } - - int8_t px, py; - - switch (state) { - case MeshReport: - if (mbl.has_mesh()) { - SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? "On" : "Off"); - SERIAL_PROTOCOLPAIR("\nNum X,Y: ", MESH_NUM_X_POINTS); - SERIAL_PROTOCOLCHAR(','); SERIAL_PROTOCOL(MESH_NUM_Y_POINTS); - SERIAL_PROTOCOLPAIR("\nZ search height: ", MESH_HOME_SEARCH_Z); - SERIAL_PROTOCOLPGM("\nZ offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5); - SERIAL_PROTOCOLLNPGM("\nMeasured points:"); - for (py = 0; py < MESH_NUM_Y_POINTS; py++) { - for (px = 0; px < MESH_NUM_X_POINTS; px++) { - SERIAL_PROTOCOLPGM(" "); - SERIAL_PROTOCOL_F(mbl.z_values[py][px], 5); - } - SERIAL_EOL; - } - } - else - SERIAL_PROTOCOLLNPGM("Mesh bed leveling not active."); - break; - - case MeshStart: - mbl.reset(); - probe_point = 0; - enqueue_and_echo_commands_P(PSTR("G28\nG29 S2")); - break; - - case MeshNext: - if (probe_point < 0) { - SERIAL_PROTOCOLLNPGM("Start mesh probing with \"G29 S1\" first."); - return; - } - // For each G29 S2... - if (probe_point == 0) { - // For the initial G29 S2 make Z a positive value (e.g., 4.0) - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - #if Z_HOME_DIR > 0 - + Z_MAX_POS - #endif - ; - SYNC_PLAN_POSITION_KINEMATIC(); - } - else { - // For G29 S2 after adjusting Z. - mbl.set_zigzag_z(probe_point - 1, current_position[Z_AXIS]); - } - // If there's another point to sample, move there with optional lift. - if (probe_point < (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) { - mbl.zigzag(probe_point, px, py); - _mbl_goto_xy(mbl.get_probe_x(px), mbl.get_probe_y(py)); - probe_point++; - } - else { - // One last "return to the bed" (as originally coded) at completion - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - #if Z_PROBE_TRAVEL_HEIGHT > Z_HOMING_HEIGHT - + Z_PROBE_TRAVEL_HEIGHT - #elif Z_HOMING_HEIGHT > 0 - + Z_HOMING_HEIGHT - #endif - ; - line_to_current_position(); - stepper.synchronize(); - - // After recording the last point, activate the mbl and home - SERIAL_PROTOCOLLNPGM("Mesh probing done."); - probe_point = -1; - mbl.set_has_mesh(true); - enqueue_and_echo_commands_P(PSTR("G28")); - } - break; - - case MeshSet: - if (code_seen('X')) { - px = code_value_int() - 1; - if (px < 0 || px >= MESH_NUM_X_POINTS) { - SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(MESH_NUM_X_POINTS) ")."); - return; - } - } - else { - SERIAL_PROTOCOLLNPGM("X not entered."); - return; - } - if (code_seen('Y')) { - py = code_value_int() - 1; - if (py < 0 || py >= MESH_NUM_Y_POINTS) { - SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(MESH_NUM_Y_POINTS) ")."); - return; - } - } - else { - SERIAL_PROTOCOLLNPGM("Y not entered."); - return; - } - if (code_seen('Z')) { - mbl.z_values[py][px] = code_value_axis_units(Z_AXIS); - } - else { - SERIAL_PROTOCOLLNPGM("Z not entered."); - return; - } - break; - - case MeshSetZOffset: - if (code_seen('Z')) { - mbl.z_offset = code_value_axis_units(Z_AXIS); - } - else { - SERIAL_PROTOCOLLNPGM("Z not entered."); - return; - } - break; - - case MeshReset: - if (mbl.active()) { - current_position[Z_AXIS] += - mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS)) - MESH_HOME_SEARCH_Z; - mbl.reset(); - SYNC_PLAN_POSITION_KINEMATIC(); - } - else - mbl.reset(); - - } // switch(state) - - report_current_position(); - } - -#elif ENABLED(AUTO_BED_LEVELING_FEATURE) - - /** - * G29: Detailed Z probe, probes the bed at 3 or more points. - * Will fail if the printer has not been homed with G28. - * - * Enhanced G29 Auto Bed Leveling Probe Routine - * - * Parameters With AUTO_BED_LEVELING_GRID: - * - * P Set the size of the grid that will be probed (P x P points). - * Not supported by non-linear delta printer bed leveling. - * Example: "G29 P4" - * - * S Set the XY travel speed between probe points (in units/min) - * - * D Dry-Run mode. Just evaluate the bed Topology - Don't apply - * or clean the rotation Matrix. Useful to check the topology - * after a first run of G29. - * - * V Set the verbose level (0-4). Example: "G29 V3" - * - * T Generate a Bed Topology Report. Example: "G29 P5 T" for a detailed report. - * This is useful for manual bed leveling and finding flaws in the bed (to - * assist with part placement). - * Not supported by non-linear delta printer bed leveling. - * - * F Set the Front limit of the probing grid - * B Set the Back limit of the probing grid - * L Set the Left limit of the probing grid - * R Set the Right limit of the probing grid - * - * Global Parameters: - * - * E/e By default G29 will engage the Z probe, test the bed, then disengage. - * Include "E" to engage/disengage the Z probe for each sample. - * There's no extra effect if you have a fixed Z probe. - * Usage: "G29 E" or "G29 e" - * - */ - inline void gcode_G29() { - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM(">>> gcode_G29"); - DEBUG_POS("", current_position); - } - #endif - - // Don't allow auto-leveling without homing first - if (axis_unhomed_error(true, true, true)) return; - - int verbose_level = code_seen('V') ? code_value_int() : 1; - if (verbose_level < 0 || verbose_level > 4) { - SERIAL_ECHOLNPGM("?(V)erbose Level is implausible (0-4)."); - return; - } - - bool dryrun = code_seen('D'); - bool stow_probe_after_each = code_seen('E'); - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #if DISABLED(DELTA) - bool do_topography_map = verbose_level > 2 || code_seen('T'); - #endif - - if (verbose_level > 0) { - SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling"); - if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode"); - } - - int auto_bed_leveling_grid_points = AUTO_BED_LEVELING_GRID_POINTS; - - #if DISABLED(DELTA) - if (code_seen('P')) auto_bed_leveling_grid_points = code_value_int(); - if (auto_bed_leveling_grid_points < 2) { - SERIAL_PROTOCOLLNPGM("?Number of probed (P)oints is implausible (2 minimum)."); - return; - } - #endif - - xy_probe_feedrate_mm_m = code_seen('S') ? (int)code_value_linear_units() : XY_PROBE_SPEED; - - int left_probe_bed_position = code_seen('L') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(LEFT_PROBE_BED_POSITION), - right_probe_bed_position = code_seen('R') ? (int)code_value_axis_units(X_AXIS) : LOGICAL_X_POSITION(RIGHT_PROBE_BED_POSITION), - front_probe_bed_position = code_seen('F') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(FRONT_PROBE_BED_POSITION), - back_probe_bed_position = code_seen('B') ? (int)code_value_axis_units(Y_AXIS) : LOGICAL_Y_POSITION(BACK_PROBE_BED_POSITION); - - bool left_out_l = left_probe_bed_position < LOGICAL_X_POSITION(MIN_PROBE_X), - left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - (MIN_PROBE_EDGE), - right_out_r = right_probe_bed_position > LOGICAL_X_POSITION(MAX_PROBE_X), - right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE, - front_out_f = front_probe_bed_position < LOGICAL_Y_POSITION(MIN_PROBE_Y), - front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - (MIN_PROBE_EDGE), - back_out_b = back_probe_bed_position > LOGICAL_Y_POSITION(MAX_PROBE_Y), - back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE; - - if (left_out || right_out || front_out || back_out) { - if (left_out) { - out_of_range_error(PSTR("(L)eft")); - left_probe_bed_position = left_out_l ? LOGICAL_X_POSITION(MIN_PROBE_X) : right_probe_bed_position - (MIN_PROBE_EDGE); - } - if (right_out) { - out_of_range_error(PSTR("(R)ight")); - right_probe_bed_position = right_out_r ? LOGICAL_Y_POSITION(MAX_PROBE_X) : left_probe_bed_position + MIN_PROBE_EDGE; - } - if (front_out) { - out_of_range_error(PSTR("(F)ront")); - front_probe_bed_position = front_out_f ? LOGICAL_Y_POSITION(MIN_PROBE_Y) : back_probe_bed_position - (MIN_PROBE_EDGE); - } - if (back_out) { - out_of_range_error(PSTR("(B)ack")); - back_probe_bed_position = back_out_b ? LOGICAL_Y_POSITION(MAX_PROBE_Y) : front_probe_bed_position + MIN_PROBE_EDGE; - } - return; - } - - #endif // AUTO_BED_LEVELING_GRID - - if (!dryrun) { - - #if ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(DELTA) - if (DEBUGGING(LEVELING)) { - vector_3 corrected_position = planner.adjusted_position(); - DEBUG_POS("BEFORE matrix.set_to_identity", corrected_position); - DEBUG_POS("BEFORE matrix.set_to_identity", current_position); - } - #endif - - // make sure the bed_level_rotation_matrix is identity or the planner will get it wrong - planner.bed_level_matrix.set_to_identity(); - - #if ENABLED(DELTA) - reset_bed_level(); - #else //!DELTA - - //vector_3 corrected_position = planner.adjusted_position(); - //corrected_position.debug("position before G29"); - vector_3 uncorrected_position = planner.adjusted_position(); - //uncorrected_position.debug("position during G29"); - current_position[X_AXIS] = uncorrected_position.x; - current_position[Y_AXIS] = uncorrected_position.y; - current_position[Z_AXIS] = uncorrected_position.z; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("AFTER matrix.set_to_identity", uncorrected_position); - #endif - - SYNC_PLAN_POSITION_KINEMATIC(); - - #endif // !DELTA - } - - stepper.synchronize(); - - setup_for_endstop_or_probe_move(); - - // Deploy the probe. Probe will raise if needed. - if (DEPLOY_PROBE()) return; - - bed_leveling_in_progress = true; - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // probe at the points of a lattice grid - const int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points - 1), - yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (auto_bed_leveling_grid_points - 1); - - #if ENABLED(DELTA) - delta_grid_spacing[0] = xGridSpacing; - delta_grid_spacing[1] = yGridSpacing; - float zoffset = zprobe_zoffset; - if (code_seen('Z')) zoffset += code_value_axis_units(Z_AXIS); - #else // !DELTA - /** - * solve the plane equation ax + by + d = z - * A is the matrix with rows [x y 1] for all the probed points - * B is the vector of the Z positions - * the normal vector to the plane is formed by the coefficients of the - * plane equation in the standard form, which is Vx*x+Vy*y+Vz*z+d = 0 - * so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z - */ - - int abl2 = sq(auto_bed_leveling_grid_points); - - double eqnAMatrix[abl2 * 3], // "A" matrix of the linear system of equations - eqnBVector[abl2], // "B" vector of Z points - mean = 0.0; - int8_t indexIntoAB[auto_bed_leveling_grid_points][auto_bed_leveling_grid_points]; - #endif // !DELTA - - int probePointCounter = 0; - bool zig = (auto_bed_leveling_grid_points & 1) ? true : false; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION] - - for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) { - double yProbe = front_probe_bed_position + yGridSpacing * yCount; - int xStart, xStop, xInc; - - if (zig) { - xStart = 0; - xStop = auto_bed_leveling_grid_points; - xInc = 1; - } - else { - xStart = auto_bed_leveling_grid_points - 1; - xStop = -1; - xInc = -1; - } - - zig = !zig; - - for (int xCount = xStart; xCount != xStop; xCount += xInc) { - double xProbe = left_probe_bed_position + xGridSpacing * xCount; - - #if ENABLED(DELTA) - // Avoid probing the corners (outside the round or hexagon print surface) on a delta printer. - float distance_from_center = HYPOT(xProbe, yProbe); - if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue; - #endif //DELTA - - float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level); - - #if DISABLED(DELTA) - mean += measured_z; - - eqnBVector[probePointCounter] = measured_z; - eqnAMatrix[probePointCounter + 0 * abl2] = xProbe; - eqnAMatrix[probePointCounter + 1 * abl2] = yProbe; - eqnAMatrix[probePointCounter + 2 * abl2] = 1; - indexIntoAB[xCount][yCount] = probePointCounter; - #else - bed_level[xCount][yCount] = measured_z + zoffset; - #endif - - probePointCounter++; - - idle(); - - } //xProbe - } //yProbe - - #else // !AUTO_BED_LEVELING_GRID - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> 3-point Leveling"); - #endif - - // Probe at 3 arbitrary points - float z_at_pt_1 = probe_pt( LOGICAL_X_POSITION(ABL_PROBE_PT_1_X), - LOGICAL_Y_POSITION(ABL_PROBE_PT_1_Y), - stow_probe_after_each, verbose_level), - z_at_pt_2 = probe_pt( LOGICAL_X_POSITION(ABL_PROBE_PT_2_X), - LOGICAL_Y_POSITION(ABL_PROBE_PT_2_Y), - stow_probe_after_each, verbose_level), - z_at_pt_3 = probe_pt( LOGICAL_X_POSITION(ABL_PROBE_PT_3_X), - LOGICAL_Y_POSITION(ABL_PROBE_PT_3_Y), - stow_probe_after_each, verbose_level); - - if (!dryrun) set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3); - - #endif // !AUTO_BED_LEVELING_GRID - - // Raise to _Z_PROBE_DEPLOY_HEIGHT. Stow the probe. - if (STOW_PROBE()) return; - - // Restore state after probing - clean_up_after_endstop_or_probe_move(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> probing complete", current_position); - #endif - - // Calculate leveling, print reports, correct the position - #if ENABLED(AUTO_BED_LEVELING_GRID) - #if ENABLED(DELTA) - - if (!dryrun) extrapolate_unprobed_bed_level(); - print_bed_level(); - - #else // !DELTA - - // solve lsq problem - double plane_equation_coefficients[3]; - qr_solve(plane_equation_coefficients, abl2, 3, eqnAMatrix, eqnBVector); - - mean /= abl2; - - if (verbose_level) { - SERIAL_PROTOCOLPGM("Eqn coefficients: a: "); - SERIAL_PROTOCOL_F(plane_equation_coefficients[0], 8); - SERIAL_PROTOCOLPGM(" b: "); - SERIAL_PROTOCOL_F(plane_equation_coefficients[1], 8); - SERIAL_PROTOCOLPGM(" d: "); - SERIAL_PROTOCOL_F(plane_equation_coefficients[2], 8); - SERIAL_EOL; - if (verbose_level > 2) { - SERIAL_PROTOCOLPGM("Mean of sampled points: "); - SERIAL_PROTOCOL_F(mean, 8); - SERIAL_EOL; - } - } - - if (!dryrun) set_bed_level_equation_lsq(plane_equation_coefficients); - - // Show the Topography map if enabled - if (do_topography_map) { - - SERIAL_PROTOCOLLNPGM("\nBed Height Topography:\n" - " +--- BACK --+\n" - " | |\n" - " L | (+) | R\n" - " E | | I\n" - " F | (-) N (+) | G\n" - " T | | H\n" - " | (-) | T\n" - " | |\n" - " O-- FRONT --+\n" - " (0,0)"); - - float min_diff = 999; - - for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { - for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) { - int ind = indexIntoAB[xx][yy]; - float diff = eqnBVector[ind] - mean; - - float x_tmp = eqnAMatrix[ind + 0 * abl2], - y_tmp = eqnAMatrix[ind + 1 * abl2], - z_tmp = 0; - - apply_rotation_xyz(planner.bed_level_matrix, x_tmp, y_tmp, z_tmp); - - NOMORE(min_diff, eqnBVector[ind] - z_tmp); - - if (diff >= 0.0) - SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment - else - SERIAL_PROTOCOLCHAR(' '); - SERIAL_PROTOCOL_F(diff, 5); - } // xx - SERIAL_EOL; - } // yy - SERIAL_EOL; - if (verbose_level > 3) { - SERIAL_PROTOCOLLNPGM("\nCorrected Bed Height vs. Bed Topology:"); - - for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { - for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) { - int ind = indexIntoAB[xx][yy]; - float x_tmp = eqnAMatrix[ind + 0 * abl2], - y_tmp = eqnAMatrix[ind + 1 * abl2], - z_tmp = 0; - - apply_rotation_xyz(planner.bed_level_matrix, x_tmp, y_tmp, z_tmp); - - float diff = eqnBVector[ind] - z_tmp - min_diff; - if (diff >= 0.0) - SERIAL_PROTOCOLPGM(" +"); - // Include + for column alignment - else - SERIAL_PROTOCOLCHAR(' '); - SERIAL_PROTOCOL_F(diff, 5); - } // xx - SERIAL_EOL; - } // yy - SERIAL_EOL; - } - } //do_topography_map - #endif //!DELTA - #endif // AUTO_BED_LEVELING_GRID - - #if DISABLED(DELTA) - if (verbose_level > 0) - planner.bed_level_matrix.debug("\n\nBed Level Correction Matrix:"); - - if (!dryrun) { - /** - * Correct the Z height difference from Z probe position and nozzle tip position. - * The Z height on homing is measured by Z probe, but the Z probe is quite far - * from the nozzle. When the bed is uneven, this height must be corrected. - */ - float x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER, - y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER, - z_tmp = current_position[Z_AXIS], - stepper_z = stepper.get_axis_position_mm(Z_AXIS); //get the real Z (since planner.adjusted_position is now correcting the plane) - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> BEFORE apply_rotation_xyz > stepper_z = ", stepper_z); - SERIAL_ECHOPAIR(" ... z_tmp = ", z_tmp); - SERIAL_EOL; - } - #endif - - // Apply the correction sending the Z probe offset - apply_rotation_xyz(planner.bed_level_matrix, x_tmp, y_tmp, z_tmp); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("> AFTER apply_rotation_xyz > z_tmp = ", z_tmp); - SERIAL_EOL; - } - #endif - - // Adjust the current Z and send it to the planner. - current_position[Z_AXIS] += z_tmp - stepper_z; - SYNC_PLAN_POSITION_KINEMATIC(); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> corrected Z in G29", current_position); - #endif - } - #endif // !DELTA - - #ifdef Z_PROBE_END_SCRIPT - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPGM("Z Probe End Script: "); - SERIAL_ECHOLNPGM(Z_PROBE_END_SCRIPT); - } - #endif - enqueue_and_echo_commands_P(PSTR(Z_PROBE_END_SCRIPT)); - stepper.synchronize(); - #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G29"); - #endif - - bed_leveling_in_progress = false; - - report_current_position(); - - KEEPALIVE_STATE(IN_HANDLER); - } - -#endif //AUTO_BED_LEVELING_FEATURE - -#if HAS_BED_PROBE - - /** - * G30: Do a single Z probe at the current XY - */ - inline void gcode_G30() { - - setup_for_endstop_or_probe_move(); - - // TODO: clear the leveling matrix or the planner will be set incorrectly - float measured_z = probe_pt(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER, - current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER, - true, 1); - - SERIAL_PROTOCOLPGM("Bed X: "); - SERIAL_PROTOCOL(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER + 0.0001); - SERIAL_PROTOCOLPGM(" Y: "); - SERIAL_PROTOCOL(current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER + 0.0001); - SERIAL_PROTOCOLPGM(" Z: "); - SERIAL_PROTOCOL(measured_z + 0.0001); - SERIAL_EOL; - - clean_up_after_endstop_or_probe_move(); - - report_current_position(); - } - - #if ENABLED(Z_PROBE_SLED) - - /** - * G31: Deploy the Z probe - */ - inline void gcode_G31() { DEPLOY_PROBE(); } - - /** - * G32: Stow the Z probe - */ - inline void gcode_G32() { STOW_PROBE(); } - - #endif // Z_PROBE_SLED - -#endif // HAS_BED_PROBE - -/** - * G92: Set current position to given X Y Z E - */ -inline void gcode_G92() { - bool didE = code_seen('E'); - - if (!didE) stepper.synchronize(); - - bool didXYZ = false; - LOOP_XYZE(i) { - if (code_seen(axis_codes[i])) { - float p = current_position[i], - v = code_value_axis_units(i); - - current_position[i] = v; - - if (i != E_AXIS) { - position_shift[i] += v - p; // Offset the coordinate space - update_software_endstops((AxisEnum)i); - didXYZ = true; - } - } - } - if (didXYZ) - SYNC_PLAN_POSITION_KINEMATIC(); - else if (didE) - sync_plan_position_e(); -} - -#if ENABLED(ULTIPANEL) - - /** - * M0: Unconditional stop - Wait for user button press on LCD - * M1: Conditional stop - Wait for user button press on LCD - */ - inline void gcode_M0_M1() { - char* args = current_command_args; - - millis_t codenum = 0; - bool hasP = false, hasS = false; - if (code_seen('P')) { - codenum = code_value_millis(); // milliseconds to wait - hasP = codenum > 0; - } - if (code_seen('S')) { - codenum = code_value_millis_from_seconds(); // seconds to wait - hasS = codenum > 0; - } - - if (!hasP && !hasS && *args != '\0') - lcd_setstatus(args, true); - else { - LCD_MESSAGEPGM(MSG_USERWAIT); - #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0 - dontExpireStatus(); - #endif - } - - lcd_ignore_click(); - stepper.synchronize(); - refresh_cmd_timeout(); - if (codenum > 0) { - codenum += previous_cmd_ms; // wait until this time for a click - KEEPALIVE_STATE(PAUSED_FOR_USER); - while (PENDING(millis(), codenum) && !lcd_clicked()) idle(); - KEEPALIVE_STATE(IN_HANDLER); - lcd_ignore_click(false); - } - else { - if (!lcd_detected()) return; - KEEPALIVE_STATE(PAUSED_FOR_USER); - while (!lcd_clicked()) idle(); - KEEPALIVE_STATE(IN_HANDLER); - } - if (IS_SD_PRINTING) - LCD_MESSAGEPGM(MSG_RESUMING); - else - LCD_MESSAGEPGM(WELCOME_MSG); - } - -#endif // ULTIPANEL - -/** - * M17: Enable power on all stepper motors - */ -inline void gcode_M17() { - LCD_MESSAGEPGM(MSG_NO_MOVE); - enable_all_steppers(); - - #ifdef UARM_SWIFT - delay(1000); - update_current_pos(); - #endif -} - -#if ENABLED(SDSUPPORT) - - /** - * M20: List SD card to serial output - */ - inline void gcode_M20() { - SERIAL_PROTOCOLLNPGM(MSG_BEGIN_FILE_LIST); - card.ls(); - SERIAL_PROTOCOLLNPGM(MSG_END_FILE_LIST); - } - - /** - * M21: Init SD Card - */ - inline void gcode_M21() { - card.initsd(); - } - - /** - * M22: Release SD Card - */ - inline void gcode_M22() { - card.release(); - } - - /** - * M23: Open a file - */ - inline void gcode_M23() { - card.openFile(current_command_args, true); - } - - /** - * M24: Start SD Print - */ - inline void gcode_M24() { - card.startFileprint(); - print_job_timer.start(); - } - - /** - * M25: Pause SD Print - */ - inline void gcode_M25() { - card.pauseSDPrint(); - } - - /** - * M26: Set SD Card file index - */ - inline void gcode_M26() { - if (card.cardOK && code_seen('S')) - card.setIndex(code_value_long()); - } - - /** - * M27: Get SD Card status - */ - inline void gcode_M27() { - card.getStatus(); - } - - /** - * M28: Start SD Write - */ - inline void gcode_M28() { - card.openFile(current_command_args, false); - } - - /** - * M29: Stop SD Write - * Processed in write to file routine above - */ - inline void gcode_M29() { - // card.saving = false; - } - - /** - * M30 : Delete SD Card file - */ - inline void gcode_M30() { - if (card.cardOK) { - card.closefile(); - card.removeFile(current_command_args); - } - } - -#endif //SDSUPPORT - -/** - * M31: Get the time since the start of SD Print (or last M109) - */ -inline void gcode_M31() { - char buffer[21]; - duration_t elapsed = print_job_timer.duration(); - elapsed.toString(buffer); - - lcd_setstatus(buffer); - - SERIAL_ECHO_START; - SERIAL_ECHOPGM("Print time: "); - SERIAL_ECHOLN(buffer); - - thermalManager.autotempShutdown(); -} - -#if ENABLED(SDSUPPORT) - - /** - * M32: Select file and start SD Print - */ - inline void gcode_M32() { - if (card.sdprinting) - stepper.synchronize(); - - char* namestartpos = strchr(current_command_args, '!'); // Find ! to indicate filename string start. - if (!namestartpos) - namestartpos = current_command_args; // Default name position, 4 letters after the M - else - namestartpos++; //to skip the '!' - - bool call_procedure = code_seen('P') && (seen_pointer < namestartpos); - - if (card.cardOK) { - card.openFile(namestartpos, true, call_procedure); - - if (code_seen('S') && seen_pointer < namestartpos) // "S" (must occur _before_ the filename!) - card.setIndex(code_value_long()); - - card.startFileprint(); - - // Procedure calls count as normal print time. - if (!call_procedure) print_job_timer.start(); - } - } - - #if ENABLED(LONG_FILENAME_HOST_SUPPORT) - - /** - * M33: Get the long full path of a file or folder - * - * Parameters: - * Case-insensitive DOS-style path to a file or folder - * - * Example: - * M33 miscel~1/armchair/armcha~1.gco - * - * Output: - * /Miscellaneous/Armchair/Armchair.gcode - */ - inline void gcode_M33() { - card.printLongPath(current_command_args); - } - - #endif - - /** - * M928: Start SD Write - */ - inline void gcode_M928() { - card.openLogFile(current_command_args); - } - -#endif // SDSUPPORT - -/** - * M42: Change pin status via GCode - * - * P Pin number (LED if omitted) - * S Pin status from 0 - 255 - */ -inline void gcode_M42() { - if (!code_seen('S')) return; - - int pin_status = code_value_int(); - if (pin_status < 0 || pin_status > 255) return; - - int pin_number = code_seen('P') ? code_value_int() : LED_PIN; - if (pin_number < 0) return; - - for (uint8_t i = 0; i < COUNT(sensitive_pins); i++) - if (pin_number == sensitive_pins[i]) return; - - pinMode(pin_number, OUTPUT); - digitalWrite(pin_number, pin_status); - analogWrite(pin_number, pin_status); - - #if FAN_COUNT > 0 - switch (pin_number) { - #if HAS_FAN0 - case FAN_PIN: fanSpeeds[0] = pin_status; break; - #endif - #if HAS_FAN1 - case FAN1_PIN: fanSpeeds[1] = pin_status; break; - #endif - #if HAS_FAN2 - case FAN2_PIN: fanSpeeds[2] = pin_status; break; - #endif - } - #endif -} - -#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) - - /** - * M48: Z probe repeatability measurement function. - * - * Usage: - * M48 - * P = Number of sampled points (4-50, default 10) - * X = Sample X position - * Y = Sample Y position - * V = Verbose level (0-4, default=1) - * E = Engage Z probe for each reading - * L = Number of legs of movement before probe - * S = Schizoid (Or Star if you prefer) - * - * This function assumes the bed has been homed. Specifically, that a G28 command - * as been issued prior to invoking the M48 Z probe repeatability measurement function. - * Any information generated by a prior G29 Bed leveling command will be lost and need to be - * regenerated. - */ - inline void gcode_M48() { - - if (axis_unhomed_error(true, true, true)) return; - - int8_t verbose_level = code_seen('V') ? code_value_byte() : 1; - if (verbose_level < 0 || verbose_level > 4) { - SERIAL_PROTOCOLLNPGM("?Verbose Level not plausible (0-4)."); - return; - } - - if (verbose_level > 0) - SERIAL_PROTOCOLLNPGM("M48 Z-Probe Repeatability test"); - - int8_t n_samples = code_seen('P') ? code_value_byte() : 10; - if (n_samples < 4 || n_samples > 50) { - SERIAL_PROTOCOLLNPGM("?Sample size not plausible (4-50)."); - return; - } - - float X_current = current_position[X_AXIS], - Y_current = current_position[Y_AXIS]; - - bool stow_probe_after_each = code_seen('E'); - - float X_probe_location = code_seen('X') ? code_value_axis_units(X_AXIS) : X_current + X_PROBE_OFFSET_FROM_EXTRUDER; - #if DISABLED(DELTA) - if (X_probe_location < LOGICAL_X_POSITION(MIN_PROBE_X) || X_probe_location > LOGICAL_X_POSITION(MAX_PROBE_X)) { - out_of_range_error(PSTR("X")); - return; - } - #endif - - float Y_probe_location = code_seen('Y') ? code_value_axis_units(Y_AXIS) : Y_current + Y_PROBE_OFFSET_FROM_EXTRUDER; - #if DISABLED(DELTA) - if (Y_probe_location < LOGICAL_Y_POSITION(MIN_PROBE_Y) || Y_probe_location > LOGICAL_Y_POSITION(MAX_PROBE_Y)) { - out_of_range_error(PSTR("Y")); - return; - } - #else - if (HYPOT(RAW_X_POSITION(X_probe_location), RAW_Y_POSITION(Y_probe_location)) > DELTA_PROBEABLE_RADIUS) { - SERIAL_PROTOCOLLNPGM("? (X,Y) location outside of probeable radius."); - return; - } - #endif - - bool seen_L = code_seen('L'); - uint8_t n_legs = seen_L ? code_value_byte() : 0; - if (n_legs > 15) { - SERIAL_PROTOCOLLNPGM("?Number of legs in movement not plausible (0-15)."); - return; - } - if (n_legs == 1) n_legs = 2; - - bool schizoid_flag = code_seen('S'); - if (schizoid_flag && !seen_L) n_legs = 7; - - /** - * Now get everything to the specified probe point So we can safely do a - * probe to get us close to the bed. If the Z-Axis is far from the bed, - * we don't want to use that as a starting point for each probe. - */ - if (verbose_level > 2) - SERIAL_PROTOCOLLNPGM("Positioning the probe..."); - - #if ENABLED(DELTA) - // we don't do bed level correction in M48 because we want the raw data when we probe - reset_bed_level(); - #elif ENABLED(AUTO_BED_LEVELING_FEATURE) - // we don't do bed level correction in M48 because we want the raw data when we probe - planner.bed_level_matrix.set_to_identity(); - #endif - - setup_for_endstop_or_probe_move(); - - // Move to the first point, deploy, and probe - probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level); - - randomSeed(millis()); - - double mean = 0, sigma = 0, sample_set[n_samples]; - for (uint8_t n = 0; n < n_samples; n++) { - if (n_legs) { - int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise - float angle = random(0.0, 360.0), - radius = random( - #if ENABLED(DELTA) - DELTA_PROBEABLE_RADIUS / 8, DELTA_PROBEABLE_RADIUS / 3 - #else - 5, X_MAX_LENGTH / 8 - #endif - ); - - if (verbose_level > 3) { - SERIAL_ECHOPAIR("Starting radius: ", radius); - SERIAL_ECHOPAIR(" angle: ", angle); - SERIAL_ECHOPGM(" Direction: "); - if (dir > 0) SERIAL_ECHOPGM("Counter-"); - SERIAL_ECHOLNPGM("Clockwise"); - } - - for (uint8_t l = 0; l < n_legs - 1; l++) { - double delta_angle; - - if (schizoid_flag) - // The points of a 5 point star are 72 degrees apart. We need to - // skip a point and go to the next one on the star. - delta_angle = dir * 2.0 * 72.0; - - else - // If we do this line, we are just trying to move further - // around the circle. - delta_angle = dir * (float) random(25, 45); - - angle += delta_angle; - - while (angle > 360.0) // We probably do not need to keep the angle between 0 and 2*PI, but the - angle -= 360.0; // Arduino documentation says the trig functions should not be given values - while (angle < 0.0) // outside of this range. It looks like they behave correctly with - angle += 360.0; // numbers outside of the range, but just to be safe we clamp them. - - X_current = X_probe_location - (X_PROBE_OFFSET_FROM_EXTRUDER) + cos(RADIANS(angle)) * radius; - Y_current = Y_probe_location - (Y_PROBE_OFFSET_FROM_EXTRUDER) + sin(RADIANS(angle)) * radius; - - #if DISABLED(DELTA) - X_current = constrain(X_current, X_MIN_POS, X_MAX_POS); - Y_current = constrain(Y_current, Y_MIN_POS, Y_MAX_POS); - #else - // If we have gone out too far, we can do a simple fix and scale the numbers - // back in closer to the origin. - while (HYPOT(X_current, Y_current) > DELTA_PROBEABLE_RADIUS) { - X_current /= 1.25; - Y_current /= 1.25; - if (verbose_level > 3) { - SERIAL_ECHOPAIR("Pulling point towards center:", X_current); - SERIAL_ECHOPAIR(", ", Y_current); - SERIAL_EOL; - } - } - #endif - if (verbose_level > 3) { - SERIAL_PROTOCOLPGM("Going to:"); - SERIAL_ECHOPAIR(" X", X_current); - SERIAL_ECHOPAIR(" Y", Y_current); - SERIAL_ECHOPAIR(" Z", current_position[Z_AXIS]); - SERIAL_EOL; - } - do_blocking_move_to_xy(X_current, Y_current); - } // n_legs loop - } // n_legs - - // Probe a single point - sample_set[n] = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level); - - /** - * Get the current mean for the data points we have so far - */ - double sum = 0.0; - for (uint8_t j = 0; j <= n; j++) sum += sample_set[j]; - mean = sum / (n + 1); - - /** - * Now, use that mean to calculate the standard deviation for the - * data points we have so far - */ - sum = 0.0; - for (uint8_t j = 0; j <= n; j++) - sum += sq(sample_set[j] - mean); - - sigma = sqrt(sum / (n + 1)); - if (verbose_level > 0) { - if (verbose_level > 1) { - SERIAL_PROTOCOL(n + 1); - SERIAL_PROTOCOLPGM(" of "); - SERIAL_PROTOCOL((int)n_samples); - SERIAL_PROTOCOLPGM(" z: "); - SERIAL_PROTOCOL_F(current_position[Z_AXIS], 6); - if (verbose_level > 2) { - SERIAL_PROTOCOLPGM(" mean: "); - SERIAL_PROTOCOL_F(mean, 6); - SERIAL_PROTOCOLPGM(" sigma: "); - SERIAL_PROTOCOL_F(sigma, 6); - } - } - SERIAL_EOL; - } - - } // End of probe loop - - if (STOW_PROBE()) return; - - if (verbose_level > 0) { - SERIAL_PROTOCOLPGM("Mean: "); - SERIAL_PROTOCOL_F(mean, 6); - SERIAL_EOL; - } - - SERIAL_PROTOCOLPGM("Standard Deviation: "); - SERIAL_PROTOCOL_F(sigma, 6); - SERIAL_EOL; SERIAL_EOL; - - clean_up_after_endstop_or_probe_move(); - - report_current_position(); - } - -#endif // Z_MIN_PROBE_REPEATABILITY_TEST - -/** - * M75: Start print timer - */ -inline void gcode_M75() { print_job_timer.start(); } - -/** - * M76: Pause print timer - */ -inline void gcode_M76() { print_job_timer.pause(); } - -/** - * M77: Stop print timer - */ -inline void gcode_M77() { print_job_timer.stop(); } - -#if ENABLED(PRINTCOUNTER) - /** - * M78: Show print statistics - */ - inline void gcode_M78() { - // "M78 S78" will reset the statistics - if (code_seen('S') && code_value_int() == 78) - print_job_timer.initStats(); - else print_job_timer.showStats(); - } -#endif - -/** - * M104: Set hot end temperature - */ -inline void gcode_M104() { - if (get_target_extruder_from_command(104)) return; - if (DEBUGGING(DRYRUN)) return; - - #if ENABLED(SINGLENOZZLE) - if (target_extruder != active_extruder) return; - #endif - - if (code_seen('S')) { - thermalManager.setTargetHotend(code_value_temp_abs(), target_extruder); - #if ENABLED(DUAL_X_CARRIAGE) - if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0) - thermalManager.setTargetHotend(code_value_temp_abs() == 0.0 ? 0.0 : code_value_temp_abs() + duplicate_extruder_temp_offset, 1); - #endif - - #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - /** - * Stop the timer at the end of print, starting is managed by - * 'heat and wait' M109. - * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot - * stand by mode, for instance in a dual extruder setup, without affecting - * the running print timer. - */ - if (code_value_temp_abs() <= (EXTRUDE_MINTEMP)/2) { - print_job_timer.stop(); - LCD_MESSAGEPGM(WELCOME_MSG); - } - #endif - - if (code_value_temp_abs() > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING); - } -} - -#if HAS_TEMP_HOTEND || HAS_TEMP_BED - - void print_heaterstates() { - #if HAS_TEMP_HOTEND - SERIAL_PROTOCOLPGM(" T:"); - SERIAL_PROTOCOL_F(thermalManager.degHotend(target_extruder), 1); - SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(target_extruder), 1); - #if ENABLED(SHOW_TEMP_ADC_VALUES) - SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_raw[target_extruder] / OVERSAMPLENR); - SERIAL_CHAR(')'); - #endif - #endif - #if HAS_TEMP_BED - SERIAL_PROTOCOLPGM(" B:"); - SERIAL_PROTOCOL_F(thermalManager.degBed(), 1); - SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetBed(), 1); - #if ENABLED(SHOW_TEMP_ADC_VALUES) - SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_bed_raw / OVERSAMPLENR); - SERIAL_CHAR(')'); - #endif - #endif - #if HOTENDS > 1 - HOTEND_LOOP() { - SERIAL_PROTOCOLPAIR(" T", e); - SERIAL_PROTOCOLCHAR(':'); - SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1); - SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(e), 1); - #if ENABLED(SHOW_TEMP_ADC_VALUES) - SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_raw[e] / OVERSAMPLENR); - SERIAL_CHAR(')'); - #endif - } - #endif - SERIAL_PROTOCOLPGM(" @:"); - SERIAL_PROTOCOL(thermalManager.getHeaterPower(target_extruder)); - #if HAS_TEMP_BED - SERIAL_PROTOCOLPGM(" B@:"); - SERIAL_PROTOCOL(thermalManager.getHeaterPower(-1)); - #endif - #if HOTENDS > 1 - HOTEND_LOOP() { - SERIAL_PROTOCOLPAIR(" @", e); - SERIAL_PROTOCOLCHAR(':'); - SERIAL_PROTOCOL(thermalManager.getHeaterPower(e)); - } - #endif - } -#endif - -/** - * M105: Read hot end and bed temperature - */ -inline void gcode_M105() { - if (get_target_extruder_from_command(105)) return; - - #if HAS_TEMP_HOTEND || HAS_TEMP_BED - SERIAL_PROTOCOLPGM(MSG_OK); - print_heaterstates(); - #else // !HAS_TEMP_HOTEND && !HAS_TEMP_BED - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); - #endif - - SERIAL_EOL; -} - -#if FAN_COUNT > 0 - - /** - * M106: Set Fan Speed - * - * S Speed between 0-255 - * P Fan index, if more than one fan - */ - inline void gcode_M106() { - uint16_t s = code_seen('S') ? code_value_ushort() : 255, - p = code_seen('P') ? code_value_ushort() : 0; - NOMORE(s, 255); - if (p < FAN_COUNT) fanSpeeds[p] = s; - } - - /** - * M107: Fan Off - */ - inline void gcode_M107() { - uint16_t p = code_seen('P') ? code_value_ushort() : 0; - if (p < FAN_COUNT) fanSpeeds[p] = 0; - } - -#endif // FAN_COUNT > 0 - -#if DISABLED(EMERGENCY_PARSER) - - /** - * M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature. - */ - inline void gcode_M108() { wait_for_heatup = false; } - - - /** - * M112: Emergency Stop - */ - inline void gcode_M112() { kill(PSTR(MSG_KILLED)); } - - - /** - * M410: Quickstop - Abort all planned moves - * - * This will stop the carriages mid-move, so most likely they - * will be out of sync with the stepper position after this. - */ - inline void gcode_M410() { quickstop_stepper(); } - -#endif - - #ifndef MIN_COOLING_SLOPE_DEG - #define MIN_COOLING_SLOPE_DEG 1.50 - #endif - #ifndef MIN_COOLING_SLOPE_TIME - #define MIN_COOLING_SLOPE_TIME 60 - #endif - -/** - * M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating. - * Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling. - */ -inline void gcode_M109() { - - if (get_target_extruder_from_command(109)) return; - if (DEBUGGING(DRYRUN)) return; - - #if ENABLED(SINGLENOZZLE) - if (target_extruder != active_extruder) return; - #endif - - bool no_wait_for_cooling = code_seen('S'); - if (no_wait_for_cooling || code_seen('R')) { - thermalManager.setTargetHotend(code_value_temp_abs(), target_extruder); - #if ENABLED(DUAL_X_CARRIAGE) - if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0) - thermalManager.setTargetHotend(code_value_temp_abs() == 0.0 ? 0.0 : code_value_temp_abs() + duplicate_extruder_temp_offset, 1); - #endif - - #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - /** - * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot - * stand by mode, for instance in a dual extruder setup, without affecting - * the running print timer. - */ - if (code_value_temp_abs() <= (EXTRUDE_MINTEMP)/2) { - print_job_timer.stop(); - LCD_MESSAGEPGM(WELCOME_MSG); - } - /** - * We do not check if the timer is already running because this check will - * be done for us inside the Stopwatch::start() method thus a running timer - * will not restart. - */ - else print_job_timer.start(); - #endif - - if (thermalManager.isHeatingHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING); - } - - #if ENABLED(AUTOTEMP) - planner.autotemp_M109(); - #endif - - #if TEMP_RESIDENCY_TIME > 0 - millis_t residency_start_ms = 0; - // Loop until the temperature has stabilized - #define TEMP_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_RESIDENCY_TIME) * 1000UL)) - #else - // Loop until the temperature is very close target - #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder)) - #endif //TEMP_RESIDENCY_TIME > 0 - - float theTarget = -1.0, old_temp = 9999.0; - bool wants_to_cool = false; - wait_for_heatup = true; - millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; - - KEEPALIVE_STATE(NOT_BUSY); - - do { - // Target temperature might be changed during the loop - if (theTarget != thermalManager.degTargetHotend(target_extruder)) { - wants_to_cool = thermalManager.isCoolingHotend(target_extruder); - theTarget = thermalManager.degTargetHotend(target_extruder); - - // Exit if S, continue if S, R, or R - if (no_wait_for_cooling && wants_to_cool) break; - } - - now = millis(); - if (ELAPSED(now, next_temp_ms)) { //Print temp & remaining time every 1s while waiting - next_temp_ms = now + 1000UL; - print_heaterstates(); - #if TEMP_RESIDENCY_TIME > 0 - SERIAL_PROTOCOLPGM(" W:"); - if (residency_start_ms) { - long rem = (((TEMP_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL; - SERIAL_PROTOCOLLN(rem); - } - else { - SERIAL_PROTOCOLLNPGM("?"); - } - #else - SERIAL_EOL; - #endif - } - - idle(); - refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out - - float temp = thermalManager.degHotend(target_extruder); - - #if TEMP_RESIDENCY_TIME > 0 - - float temp_diff = fabs(theTarget - temp); - - if (!residency_start_ms) { - // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time. - if (temp_diff < TEMP_WINDOW) residency_start_ms = now; - } - else if (temp_diff > TEMP_HYSTERESIS) { - // Restart the timer whenever the temperature falls outside the hysteresis. - residency_start_ms = now; - } - - #endif //TEMP_RESIDENCY_TIME > 0 - - // Prevent a wait-forever situation if R is misused i.e. M109 R0 - if (wants_to_cool) { - // break after MIN_COOLING_SLOPE_TIME seconds - // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG - if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) { - if (old_temp - temp < MIN_COOLING_SLOPE_DEG) break; - next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME; - old_temp = temp; - } - } - - } while (wait_for_heatup && TEMP_CONDITIONS); - - LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); - KEEPALIVE_STATE(IN_HANDLER); -} - -#if HAS_TEMP_BED - - #ifndef MIN_COOLING_SLOPE_DEG_BED - #define MIN_COOLING_SLOPE_DEG_BED 1.50 - #endif - #ifndef MIN_COOLING_SLOPE_TIME_BED - #define MIN_COOLING_SLOPE_TIME_BED 60 - #endif - - /** - * M190: Sxxx Wait for bed current temp to reach target temp. Waits only when heating - * Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling - */ - inline void gcode_M190() { - if (DEBUGGING(DRYRUN)) return; - - LCD_MESSAGEPGM(MSG_BED_HEATING); - bool no_wait_for_cooling = code_seen('S'); - if (no_wait_for_cooling || code_seen('R')) { - thermalManager.setTargetBed(code_value_temp_abs()); - #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - if (code_value_temp_abs() > BED_MINTEMP) { - /** - * We start the timer when 'heating and waiting' command arrives, LCD - * functions never wait. Cooling down managed by extruders. - * - * We do not check if the timer is already running because this check will - * be done for us inside the Stopwatch::start() method thus a running timer - * will not restart. - */ - print_job_timer.start(); - } - #endif - } - - #if TEMP_BED_RESIDENCY_TIME > 0 - millis_t residency_start_ms = 0; - // Loop until the temperature has stabilized - #define TEMP_BED_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_BED_RESIDENCY_TIME) * 1000UL)) - #else - // Loop until the temperature is very close target - #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed()) - #endif //TEMP_BED_RESIDENCY_TIME > 0 - - float theTarget = -1.0, old_temp = 9999.0; - bool wants_to_cool = false; - wait_for_heatup = true; - millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; - - KEEPALIVE_STATE(NOT_BUSY); - - target_extruder = active_extruder; // for print_heaterstates - - do { - // Target temperature might be changed during the loop - if (theTarget != thermalManager.degTargetBed()) { - wants_to_cool = thermalManager.isCoolingBed(); - theTarget = thermalManager.degTargetBed(); - - // Exit if S, continue if S, R, or R - if (no_wait_for_cooling && wants_to_cool) break; - } - - now = millis(); - if (ELAPSED(now, next_temp_ms)) { //Print Temp Reading every 1 second while heating up. - next_temp_ms = now + 1000UL; - print_heaterstates(); - #if TEMP_BED_RESIDENCY_TIME > 0 - SERIAL_PROTOCOLPGM(" W:"); - if (residency_start_ms) { - long rem = (((TEMP_BED_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL; - SERIAL_PROTOCOLLN(rem); - } - else { - SERIAL_PROTOCOLLNPGM("?"); - } - #else - SERIAL_EOL; - #endif - } - - idle(); - refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out - - float temp = thermalManager.degBed(); - - #if TEMP_BED_RESIDENCY_TIME > 0 - - float temp_diff = fabs(theTarget - temp); - - if (!residency_start_ms) { - // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time. - if (temp_diff < TEMP_BED_WINDOW) residency_start_ms = now; - } - else if (temp_diff > TEMP_BED_HYSTERESIS) { - // Restart the timer whenever the temperature falls outside the hysteresis. - residency_start_ms = now; - } - - #endif //TEMP_BED_RESIDENCY_TIME > 0 - - // Prevent a wait-forever situation if R is misused i.e. M190 R0 - if (wants_to_cool) { - // break after MIN_COOLING_SLOPE_TIME_BED seconds - // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_BED - if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) { - if (old_temp - temp < MIN_COOLING_SLOPE_DEG_BED) break; - next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME_BED; - old_temp = temp; - } - } - - } while (wait_for_heatup && TEMP_BED_CONDITIONS); - - LCD_MESSAGEPGM(MSG_BED_DONE); - KEEPALIVE_STATE(IN_HANDLER); - } - -#endif // HAS_TEMP_BED - -/** - * M110: Set Current Line Number - */ -inline void gcode_M110() { - if (code_seen('N')) gcode_N = code_value_long(); -} - -/** - * M111: Set the debug level - */ -inline void gcode_M111() { - marlin_debug_flags = code_seen('S') ? code_value_byte() : (uint8_t) DEBUG_NONE; - - const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO; - const static char str_debug_2[] PROGMEM = MSG_DEBUG_INFO; - const static char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS; - const static char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN; - const static char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION; - #if ENABLED(DEBUG_LEVELING_FEATURE) - const static char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING; - #endif - - const static char* const debug_strings[] PROGMEM = { - str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16, - #if ENABLED(DEBUG_LEVELING_FEATURE) - str_debug_32 - #endif - }; - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_DEBUG_PREFIX); - if (marlin_debug_flags) { - uint8_t comma = 0; - for (uint8_t i = 0; i < COUNT(debug_strings); i++) { - if (TEST(marlin_debug_flags, i)) { - if (comma++) SERIAL_CHAR(','); - serialprintPGM((char*)pgm_read_word(&(debug_strings[i]))); - } - } - } - else { - SERIAL_ECHOPGM(MSG_DEBUG_OFF); - } - SERIAL_EOL; -} - -#if ENABLED(HOST_KEEPALIVE_FEATURE) - - /** - * M113: Get or set Host Keepalive interval (0 to disable) - * - * S Optional. Set the keepalive interval. - */ - inline void gcode_M113() { - if (code_seen('S')) { - host_keepalive_interval = code_value_byte(); - NOMORE(host_keepalive_interval, 60); - } - else { - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("M113 S", (unsigned long)host_keepalive_interval); - SERIAL_EOL; - } - } - -#endif - -#if ENABLED(BARICUDA) - - #if HAS_HEATER_1 - /** - * M126: Heater 1 valve open - */ - inline void gcode_M126() { baricuda_valve_pressure = code_seen('S') ? code_value_byte() : 255; } - /** - * M127: Heater 1 valve close - */ - inline void gcode_M127() { baricuda_valve_pressure = 0; } - #endif - - #if HAS_HEATER_2 - /** - * M128: Heater 2 valve open - */ - inline void gcode_M128() { baricuda_e_to_p_pressure = code_seen('S') ? code_value_byte() : 255; } - /** - * M129: Heater 2 valve close - */ - inline void gcode_M129() { baricuda_e_to_p_pressure = 0; } - #endif - -#endif //BARICUDA - -/** - * M140: Set bed temperature - */ -inline void gcode_M140() { - if (DEBUGGING(DRYRUN)) return; - if (code_seen('S')) thermalManager.setTargetBed(code_value_temp_abs()); -} - -#if ENABLED(ULTIPANEL) - - /** - * M145: Set the heatup state for a material in the LCD menu - * S (0=PLA, 1=ABS) - * H - * B - * F - */ - inline void gcode_M145() { - int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0; - if (material < 0 || material > 1) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX); - } - else { - int v; - switch (material) { - case 0: - if (code_seen('H')) { - v = code_value_int(); - preheatHotendTemp1 = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15); - } - if (code_seen('F')) { - v = code_value_int(); - preheatFanSpeed1 = constrain(v, 0, 255); - } - #if TEMP_SENSOR_BED != 0 - if (code_seen('B')) { - v = code_value_int(); - preheatBedTemp1 = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15); - } - #endif - break; - case 1: - if (code_seen('H')) { - v = code_value_int(); - preheatHotendTemp2 = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15); - } - if (code_seen('F')) { - v = code_value_int(); - preheatFanSpeed2 = constrain(v, 0, 255); - } - #if TEMP_SENSOR_BED != 0 - if (code_seen('B')) { - v = code_value_int(); - preheatBedTemp2 = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15); - } - #endif - break; - } - } - } - -#endif - -#if ENABLED(TEMPERATURE_UNITS_SUPPORT) - /** - * M149: Set temperature units - */ - inline void gcode_M149() { - if (code_seen('C')) { - set_input_temp_units(TEMPUNIT_C); - } else if (code_seen('K')) { - set_input_temp_units(TEMPUNIT_K); - } else if (code_seen('F')) { - set_input_temp_units(TEMPUNIT_F); - } - } -#endif - -#if HAS_POWER_SWITCH - - /** - * M80: Turn on Power Supply - */ - inline void gcode_M80() { - OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE); //GND - - /** - * If you have a switch on suicide pin, this is useful - * if you want to start another print with suicide feature after - * a print without suicide... - */ - #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, HIGH); - #endif - - #if ENABLED(ULTIPANEL) - powersupply = true; - LCD_MESSAGEPGM(WELCOME_MSG); - lcd_update(); - #endif - } - -#endif // HAS_POWER_SWITCH - -/** - * M81: Turn off Power, including Power Supply, if there is one. - * - * This code should ALWAYS be available for EMERGENCY SHUTDOWN! - */ -inline void gcode_M81() { - thermalManager.disable_all_heaters(); - stepper.finish_and_disable(); - #if FAN_COUNT > 0 - #if FAN_COUNT > 1 - for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; - #else - fanSpeeds[0] = 0; - #endif - #endif - delay(1000); // Wait 1 second before switching off - #if HAS_SUICIDE - stepper.synchronize(); - suicide(); - #elif HAS_POWER_SWITCH - OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP); - #endif - #if ENABLED(ULTIPANEL) - #if HAS_POWER_SWITCH - powersupply = false; - #endif - LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF "."); - lcd_update(); - #endif -} - - -/** - * M82: Set E codes absolute (default) - */ -inline void gcode_M82() { axis_relative_modes[E_AXIS] = false; } - -/** - * M83: Set E codes relative while in Absolute Coordinates (G90) mode - */ -inline void gcode_M83() { axis_relative_modes[E_AXIS] = true; } - -/** - * M18, M84: Disable all stepper motors - */ -inline void gcode_M18_M84() { - if (code_seen('S')) { - stepper_inactive_time = code_value_millis_from_seconds(); - } - else { - bool all_axis = !((code_seen('X')) || (code_seen('Y')) || (code_seen('Z')) || (code_seen('E'))); - if (all_axis) { - stepper.finish_and_disable(); - } - else { - stepper.synchronize(); - if (code_seen('X')) disable_x(); - if (code_seen('Y')) disable_y(); - if (code_seen('Z')) disable_z(); - #if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS - if (code_seen('E')) { - disable_e0(); - disable_e1(); - disable_e2(); - disable_e3(); - } - #endif - } - } -} - -/** - * M85: Set inactivity shutdown timer with parameter S. To disable set zero (default) - */ -inline void gcode_M85() { - if (code_seen('S')) max_inactive_time = code_value_millis_from_seconds(); -} - -/** - * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E. - * (Follows the same syntax as G92) - */ -inline void gcode_M92() { - LOOP_XYZE(i) { - if (code_seen(axis_codes[i])) { - if (i == E_AXIS) { - float value = code_value_per_axis_unit(i); - if (value < 20.0) { - float factor = planner.axis_steps_per_mm[i] / value; // increase e constants if M92 E14 is given for netfab. - planner.max_e_jerk *= factor; - planner.max_feedrate_mm_s[i] *= factor; - planner.max_acceleration_steps_per_s2[i] *= factor; - } - planner.axis_steps_per_mm[i] = value; - } - else { - planner.axis_steps_per_mm[i] = code_value_per_axis_unit(i); - } - } - } - planner.refresh_positioning(); -} - -/** - * Output the current position to serial - */ -static void report_current_position() { - SERIAL_PROTOCOLPGM("X:"); - SERIAL_PROTOCOL(current_position[X_AXIS]); - SERIAL_PROTOCOLPGM(" Y:"); - SERIAL_PROTOCOL(current_position[Y_AXIS]); - SERIAL_PROTOCOLPGM(" Z:"); - SERIAL_PROTOCOL(current_position[Z_AXIS]); - SERIAL_PROTOCOLPGM(" E:"); - SERIAL_PROTOCOL(current_position[E_AXIS]); - - stepper.report_positions(); - - #if ENABLED(SCARA) - SERIAL_PROTOCOLPGM("SCARA Theta:"); - SERIAL_PROTOCOL(delta[X_AXIS]); - SERIAL_PROTOCOLPGM(" Psi+Theta:"); - SERIAL_PROTOCOL(delta[Y_AXIS]); - SERIAL_EOL; - - SERIAL_PROTOCOLPGM("SCARA Cal - Theta:"); - SERIAL_PROTOCOL(delta[X_AXIS]); - SERIAL_PROTOCOLPGM(" Psi+Theta (90):"); - SERIAL_PROTOCOL(delta[Y_AXIS] - delta[X_AXIS] - 90); - SERIAL_EOL; - - SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:"); - SERIAL_PROTOCOL(delta[X_AXIS] / 90 * planner.axis_steps_per_mm[X_AXIS]); - SERIAL_PROTOCOLPGM(" Psi+Theta:"); - SERIAL_PROTOCOL((delta[Y_AXIS] - delta[X_AXIS]) / 90 * planner.axis_steps_per_mm[Y_AXIS]); - SERIAL_EOL; SERIAL_EOL; - #endif -} - -/** - * M114: Output current position to serial port - */ -inline void gcode_M114() { report_current_position(); } - -/** - * M115: Capabilities string - */ -inline void gcode_M115() { - SERIAL_PROTOCOLPGM(MSG_M115_REPORT); -} - -/** - * M117: Set LCD Status Message - */ -inline void gcode_M117() { - lcd_setstatus(current_command_args); -} - -/** - * M119: Output endstop states to serial output - */ -inline void gcode_M119() { endstops.M119(); } - -/** - * M120: Enable endstops and set non-homing endstop state to "enabled" - */ -inline void gcode_M120() { endstops.enable_globally(true); } - -/** - * M121: Disable endstops and set non-homing endstop state to "disabled" - */ -inline void gcode_M121() { endstops.enable_globally(false); } - -#if ENABLED(BLINKM) - - /** - * M150: Set Status LED Color - Use R-U-B for R-G-B - */ - inline void gcode_M150() { - SendColors( - code_seen('R') ? code_value_byte() : 0, - code_seen('U') ? code_value_byte() : 0, - code_seen('B') ? code_value_byte() : 0 - ); - } - -#endif // BLINKM - -#if ENABLED(EXPERIMENTAL_I2CBUS) - - /** - * M155: Send data to a I2C slave device - * - * This is a PoC, the formating and arguments for the GCODE will - * change to be more compatible, the current proposal is: - * - * M155 A ; Sets the I2C slave address the data will be sent to - * - * M155 B - * M155 B - * M155 B - * - * M155 S1 ; Send the buffered data and reset the buffer - * M155 R1 ; Reset the buffer without sending data - * - */ - inline void gcode_M155() { - // Set the target address - if (code_seen('A')) - i2c.address(code_value_byte()); - - // Add a new byte to the buffer - else if (code_seen('B')) - i2c.addbyte(code_value_int()); - - // Flush the buffer to the bus - else if (code_seen('S')) i2c.send(); - - // Reset and rewind the buffer - else if (code_seen('R')) i2c.reset(); - } - - /** - * M156: Request X bytes from I2C slave device - * - * Usage: M156 A B - */ - inline void gcode_M156() { - uint8_t addr = code_seen('A') ? code_value_byte() : 0; - int bytes = code_seen('B') ? code_value_int() : 1; - - if (addr && bytes > 0 && bytes <= 32) { - i2c.address(addr); - i2c.reqbytes(bytes); - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLN("Bad i2c request"); - } - } - -#endif //EXPERIMENTAL_I2CBUS - -/** - * M200: Set filament diameter and set E axis units to cubic units - * - * T - Optional extruder number. Current extruder if omitted. - * D - Diameter of the filament. Use "D0" to switch back to linear units on the E axis. - */ -inline void gcode_M200() { - - if (get_target_extruder_from_command(200)) return; - - if (code_seen('D')) { - // setting any extruder filament size disables volumetric on the assumption that - // slicers either generate in extruder values as cubic mm or as as filament feeds - // for all extruders - volumetric_enabled = (code_value_linear_units() != 0.0); - if (volumetric_enabled) { - filament_size[target_extruder] = code_value_linear_units(); - // make sure all extruders have some sane value for the filament size - for (uint8_t i = 0; i < COUNT(filament_size); i++) - if (! filament_size[i]) filament_size[i] = DEFAULT_NOMINAL_FILAMENT_DIA; - } - } - else { - //reserved for setting filament diameter via UFID or filament measuring device - return; - } - calculate_volumetric_multipliers(); -} - -/** - * M201: Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000) - */ -inline void gcode_M201() { - LOOP_XYZE(i) { - if (code_seen(axis_codes[i])) { - planner.max_acceleration_mm_per_s2[i] = code_value_axis_units(i); - } - } - // steps per sq second need to be updated to agree with the units per sq second (as they are what is used in the planner) - planner.reset_acceleration_rates(); -} - -#if 0 // Not used for Sprinter/grbl gen6 - inline void gcode_M202() { - LOOP_XYZE(i) { - if (code_seen(axis_codes[i])) axis_travel_steps_per_sqr_second[i] = code_value_axis_units(i) * planner.axis_steps_per_mm[i]; - } - } -#endif - - -/** - * M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec - */ -inline void gcode_M203() { - LOOP_XYZE(i) - if (code_seen(axis_codes[i])) - planner.max_feedrate_mm_s[i] = code_value_axis_units(i); -} - -/** - * M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000) - * - * P = Printing moves - * R = Retract only (no X, Y, Z) moves - * T = Travel (non printing) moves - * - * Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate - */ -inline void gcode_M204() { - if (code_seen('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments. - planner.travel_acceleration = planner.acceleration = code_value_linear_units(); - SERIAL_ECHOPAIR("Setting Print and Travel Acceleration: ", planner.acceleration); - SERIAL_EOL; - } - if (code_seen('P')) { - planner.acceleration = code_value_linear_units(); - SERIAL_ECHOPAIR("Setting Print Acceleration: ", planner.acceleration); - SERIAL_EOL; - } - if (code_seen('R')) { - planner.retract_acceleration = code_value_linear_units(); - SERIAL_ECHOPAIR("Setting Retract Acceleration: ", planner.retract_acceleration); - SERIAL_EOL; - } - if (code_seen('T')) { - planner.travel_acceleration = code_value_linear_units(); - SERIAL_ECHOPAIR("Setting Travel Acceleration: ", planner.travel_acceleration); - SERIAL_EOL; - } -} - -/** - * M205: Set Advanced Settings - * - * S = Min Feed Rate (units/s) - * T = Min Travel Feed Rate (units/s) - * B = Min Segment Time (µs) - * X = Max XY Jerk (units/sec^2) - * Z = Max Z Jerk (units/sec^2) - * E = Max E Jerk (units/sec^2) - */ -inline void gcode_M205() { - if (code_seen('S')) planner.min_feedrate_mm_s = code_value_linear_units(); - if (code_seen('T')) planner.min_travel_feedrate_mm_s = code_value_linear_units(); - if (code_seen('B')) planner.min_segment_time = code_value_millis(); - if (code_seen('X')) planner.max_xy_jerk = code_value_linear_units(); - if (code_seen('Z')) planner.max_z_jerk = code_value_axis_units(Z_AXIS); - if (code_seen('E')) planner.max_e_jerk = code_value_axis_units(E_AXIS); -} - -/** - * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y - */ -inline void gcode_M206() { - LOOP_XYZ(i) - if (code_seen(axis_codes[i])) - set_home_offset((AxisEnum)i, code_value_axis_units(i)); - - #if ENABLED(SCARA) - if (code_seen('T')) set_home_offset(X_AXIS, code_value_axis_units(X_AXIS)); // Theta - if (code_seen('P')) set_home_offset(Y_AXIS, code_value_axis_units(Y_AXIS)); // Psi - #endif - - SYNC_PLAN_POSITION_KINEMATIC(); - report_current_position(); -} - -#if ENABLED(DELTA) - /** - * M665: Set delta configurations - * - * L = diagonal rod - * R = delta radius - * S = segments per second - * A = Alpha (Tower 1) diagonal rod trim - * B = Beta (Tower 2) diagonal rod trim - * C = Gamma (Tower 3) diagonal rod trim - */ - inline void gcode_M665() { - if (code_seen('L')) delta_diagonal_rod = code_value_linear_units(); - if (code_seen('R')) delta_radius = code_value_linear_units(); - if (code_seen('S')) delta_segments_per_second = code_value_float(); - if (code_seen('A')) delta_diagonal_rod_trim_tower_1 = code_value_linear_units(); - if (code_seen('B')) delta_diagonal_rod_trim_tower_2 = code_value_linear_units(); - if (code_seen('C')) delta_diagonal_rod_trim_tower_3 = code_value_linear_units(); - recalc_delta_settings(delta_radius, delta_diagonal_rod); - } - /** - * M666: Set delta endstop adjustment - */ - inline void gcode_M666() { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM(">>> gcode_M666"); - } - #endif - LOOP_XYZ(i) { - if (code_seen(axis_codes[i])) { - endstop_adj[i] = code_value_axis_units(i); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPGM("endstop_adj["); - SERIAL_ECHO(axis_codes[i]); - SERIAL_ECHOPAIR("] = ", endstop_adj[i]); - SERIAL_EOL; - } - #endif - } - } - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM("<<< gcode_M666"); - } - #endif - } - -#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS) - - /** - * M666: For Z Dual Endstop setup, set z axis offset to the z2 axis. - */ - inline void gcode_M666() { - if (code_seen('Z')) z_endstop_adj = code_value_axis_units(Z_AXIS); - SERIAL_ECHOPAIR("Z Endstop Adjustment set to (mm):", z_endstop_adj); - SERIAL_EOL; - } - -#endif // !DELTA && Z_DUAL_ENDSTOPS - -#if ENABLED(FWRETRACT) - - /** - * M207: Set firmware retraction values - * - * S[+units] retract_length - * W[+units] retract_length_swap (multi-extruder) - * F[units/min] retract_feedrate_mm_s - * Z[units] retract_zlift - */ - inline void gcode_M207() { - if (code_seen('S')) retract_length = code_value_axis_units(E_AXIS); - if (code_seen('F')) retract_feedrate_mm_s = MMM_TO_MMS(code_value_axis_units(E_AXIS)); - if (code_seen('Z')) retract_zlift = code_value_axis_units(Z_AXIS); - #if EXTRUDERS > 1 - if (code_seen('W')) retract_length_swap = code_value_axis_units(E_AXIS); - #endif - } - - /** - * M208: Set firmware un-retraction values - * - * S[+units] retract_recover_length (in addition to M207 S*) - * W[+units] retract_recover_length_swap (multi-extruder) - * F[units/min] retract_recover_feedrate_mm_s - */ - inline void gcode_M208() { - if (code_seen('S')) retract_recover_length = code_value_axis_units(E_AXIS); - if (code_seen('F')) retract_recover_feedrate_mm_s = MMM_TO_MMS(code_value_axis_units(E_AXIS)); - #if EXTRUDERS > 1 - if (code_seen('W')) retract_recover_length_swap = code_value_axis_units(E_AXIS); - #endif - } - - /** - * M209: Enable automatic retract (M209 S1) - * detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction. - */ - inline void gcode_M209() { - if (code_seen('S')) { - int t = code_value_int(); - switch (t) { - case 0: - autoretract_enabled = false; - break; - case 1: - autoretract_enabled = true; - break; - default: - unknown_command_error(); - return; - } - for (int i = 0; i < EXTRUDERS; i++) retracted[i] = false; - } - } - -#endif // FWRETRACT - -#if HOTENDS > 1 - - /** - * M218 - set hotend offset (in linear units) - * - * T - * X - * Y - * Z - Available with DUAL_X_CARRIAGE and SWITCHING_EXTRUDER - */ - inline void gcode_M218() { - if (get_target_extruder_from_command(218)) return; - - if (code_seen('X')) hotend_offset[X_AXIS][target_extruder] = code_value_axis_units(X_AXIS); - if (code_seen('Y')) hotend_offset[Y_AXIS][target_extruder] = code_value_axis_units(Y_AXIS); - - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER) - if (code_seen('Z')) hotend_offset[Z_AXIS][target_extruder] = code_value_axis_units(Z_AXIS); - #endif - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_HOTEND_OFFSET); - HOTEND_LOOP() { - SERIAL_CHAR(' '); - SERIAL_ECHO(hotend_offset[X_AXIS][e]); - SERIAL_CHAR(','); - SERIAL_ECHO(hotend_offset[Y_AXIS][e]); - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_EXTRUDER) - SERIAL_CHAR(','); - SERIAL_ECHO(hotend_offset[Z_AXIS][e]); - #endif - } - SERIAL_EOL; - } - -#endif // HOTENDS > 1 - -/** - * M220: Set speed percentage factor, aka "Feed Rate" (M220 S95) - */ -inline void gcode_M220() { - if (code_seen('S')) feedrate_percentage = code_value_int(); -} - -/** - * M221: Set extrusion percentage (M221 T0 S95) - */ -inline void gcode_M221() { - if (get_target_extruder_from_command(221)) return; - if (code_seen('S')) - extruder_multiplier[target_extruder] = code_value_int(); -} - -/** - * M226: Wait until the specified pin reaches the state required (M226 P S) - */ -inline void gcode_M226() { - if (code_seen('P')) { - int pin_number = code_value_int(); - - int pin_state = code_seen('S') ? code_value_int() : -1; // required pin state - default is inverted - - if (pin_state >= -1 && pin_state <= 1) { - - for (uint8_t i = 0; i < COUNT(sensitive_pins); i++) { - if (sensitive_pins[i] == pin_number) { - pin_number = -1; - break; - } - } - - if (pin_number > -1) { - int target = LOW; - - stepper.synchronize(); - - pinMode(pin_number, INPUT); - - switch (pin_state) { - case 1: - target = HIGH; - break; - - case 0: - target = LOW; - break; - - case -1: - target = !digitalRead(pin_number); - break; - } - - while (digitalRead(pin_number) != target) idle(); - - } // pin_number > -1 - } // pin_state -1 0 1 - } // code_seen('P') -} - -#if HAS_SERVOS - - /** - * M280: Get or set servo position. P [S] - */ - inline void gcode_M280() { - if (!code_seen('P')) return; - int servo_index = code_value_int(); - if (servo_index >= 0 && servo_index < NUM_SERVOS) { - if (code_seen('S')) - MOVE_SERVO(servo_index, code_value_int()); - else { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(" Servo "); - SERIAL_ECHO(servo_index); - SERIAL_ECHOPGM(": "); - SERIAL_ECHOLN(servo[servo_index].read()); - } - } - else { - SERIAL_ERROR_START; - SERIAL_ERROR("Servo "); - SERIAL_ERROR(servo_index); - SERIAL_ERRORLN(" out of range"); - } - } - -#endif // HAS_SERVOS - -#if HAS_BUZZER - - /** - * M300: Play beep sound S P - */ - inline void gcode_M300() { - uint16_t const frequency = code_seen('S') ? code_value_ushort() : 260; - uint16_t duration = code_seen('P') ? code_value_ushort() : 1000; - - // Limits the tone duration to 0-5 seconds. - NOMORE(duration, 5000); -#ifdef UARM_SWIFT - swift_buzzer.tone(duration, frequency); -#else - BUZZ(duration, frequency); -#endif - } - -#endif // HAS_BUZZER - -#if ENABLED(PIDTEMP) - - /** - * M301: Set PID parameters P I D (and optionally C, L) - * - * P[float] Kp term - * I[float] Ki term (unscaled) - * D[float] Kd term (unscaled) - * - * With PID_EXTRUSION_SCALING: - * - * C[float] Kc term - * L[float] LPQ length - */ - inline void gcode_M301() { - - // multi-extruder PID patch: M301 updates or prints a single extruder's PID values - // default behaviour (omitting E parameter) is to update for extruder 0 only - int e = code_seen('E') ? code_value_int() : 0; // extruder being updated - - if (e < HOTENDS) { // catch bad input value - if (code_seen('P')) PID_PARAM(Kp, e) = code_value_float(); - if (code_seen('I')) PID_PARAM(Ki, e) = scalePID_i(code_value_float()); - if (code_seen('D')) PID_PARAM(Kd, e) = scalePID_d(code_value_float()); - #if ENABLED(PID_EXTRUSION_SCALING) - if (code_seen('C')) PID_PARAM(Kc, e) = code_value_float(); - if (code_seen('L')) lpq_len = code_value_float(); - NOMORE(lpq_len, LPQ_MAX_LEN); - #endif - - thermalManager.updatePID(); - SERIAL_ECHO_START; - #if ENABLED(PID_PARAMS_PER_HOTEND) - SERIAL_ECHOPGM(" e:"); // specify extruder in serial output - SERIAL_ECHO(e); - #endif // PID_PARAMS_PER_HOTEND - SERIAL_ECHOPGM(" p:"); - SERIAL_ECHO(PID_PARAM(Kp, e)); - SERIAL_ECHOPGM(" i:"); - SERIAL_ECHO(unscalePID_i(PID_PARAM(Ki, e))); - SERIAL_ECHOPGM(" d:"); - SERIAL_ECHO(unscalePID_d(PID_PARAM(Kd, e))); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPGM(" c:"); - //Kc does not have scaling applied above, or in resetting defaults - SERIAL_ECHO(PID_PARAM(Kc, e)); - #endif - SERIAL_EOL; - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLN(MSG_INVALID_EXTRUDER); - } - } - -#endif // PIDTEMP - -#if ENABLED(PIDTEMPBED) - - inline void gcode_M304() { - if (code_seen('P')) thermalManager.bedKp = code_value_float(); - if (code_seen('I')) thermalManager.bedKi = scalePID_i(code_value_float()); - if (code_seen('D')) thermalManager.bedKd = scalePID_d(code_value_float()); - - thermalManager.updatePID(); - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(" p:"); - SERIAL_ECHO(thermalManager.bedKp); - SERIAL_ECHOPGM(" i:"); - SERIAL_ECHO(unscalePID_i(thermalManager.bedKi)); - SERIAL_ECHOPGM(" d:"); - SERIAL_ECHOLN(unscalePID_d(thermalManager.bedKd)); - } - -#endif // PIDTEMPBED - -#if defined(CHDK) || HAS_PHOTOGRAPH - - /** - * M240: Trigger a camera by emulating a Canon RC-1 - * See http://www.doc-diy.net/photo/rc-1_hacked/ - */ - inline void gcode_M240() { - #ifdef CHDK - - OUT_WRITE(CHDK, HIGH); - chdkHigh = millis(); - chdkActive = true; - - #elif HAS_PHOTOGRAPH - - const uint8_t NUM_PULSES = 16; - const float PULSE_LENGTH = 0.01524; - for (int i = 0; i < NUM_PULSES; i++) { - WRITE(PHOTOGRAPH_PIN, HIGH); - _delay_ms(PULSE_LENGTH); - WRITE(PHOTOGRAPH_PIN, LOW); - _delay_ms(PULSE_LENGTH); - } - delay(7.33); - for (int i = 0; i < NUM_PULSES; i++) { - WRITE(PHOTOGRAPH_PIN, HIGH); - _delay_ms(PULSE_LENGTH); - WRITE(PHOTOGRAPH_PIN, LOW); - _delay_ms(PULSE_LENGTH); - } - - #endif // !CHDK && HAS_PHOTOGRAPH - } - -#endif // CHDK || PHOTOGRAPH_PIN - -#if HAS_LCD_CONTRAST - - /** - * M250: Read and optionally set the LCD contrast - */ - inline void gcode_M250() { - if (code_seen('C')) set_lcd_contrast(code_value_int()); - SERIAL_PROTOCOLPGM("lcd contrast value: "); - SERIAL_PROTOCOL(lcd_contrast); - SERIAL_EOL; - } - -#endif // HAS_LCD_CONTRAST - -#if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - - /** - * M302: Allow cold extrudes, or set the minimum extrude temperature - * - * S sets the minimum extrude temperature - * P enables (1) or disables (0) cold extrusion - * - * Examples: - * - * M302 ; report current cold extrusion state - * M302 P0 ; enable cold extrusion checking - * M302 P1 ; disables cold extrusion checking - * M302 S0 ; always allow extrusion (disables checking) - * M302 S170 ; only allow extrusion above 170 - * M302 S170 P1 ; set min extrude temp to 170 but leave disabled - */ - inline void gcode_M302() { - bool seen_S = code_seen('S'); - if (seen_S) { - thermalManager.extrude_min_temp = code_value_temp_abs(); - thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0); - } - - if (code_seen('P')) - thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0) || code_value_bool(); - else if (!seen_S) { - // Report current state - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("Cold extrudes are ", (thermalManager.allow_cold_extrude ? "en" : "dis")); - SERIAL_ECHOPAIR("abled (min temp ", int(thermalManager.extrude_min_temp + 0.5)); - SERIAL_ECHOLNPGM("C)"); - } - } - -#endif // PREVENT_DANGEROUS_EXTRUDE - -/** - * M303: PID relay autotune - * - * S sets the target temperature. (default 150C) - * E (-1 for the bed) (default 0) - * C - * U with a non-zero value will apply the result to current settings - */ -inline void gcode_M303() { - #if HAS_PID_HEATING - int e = code_seen('E') ? code_value_int() : 0; - int c = code_seen('C') ? code_value_int() : 5; - bool u = code_seen('U') && code_value_bool(); - - float temp = code_seen('S') ? code_value_temp_abs() : (e < 0 ? 70.0 : 150.0); - - if (e >= 0 && e < HOTENDS) - target_extruder = e; - - KEEPALIVE_STATE(NOT_BUSY); // don't send "busy: processing" messages during autotune output - - thermalManager.PID_autotune(temp, e, c, u); - - KEEPALIVE_STATE(IN_HANDLER); - #else - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_M303_DISABLED); - #endif -} - -#if ENABLED(SCARA) - bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) { - //SoftEndsEnabled = false; // Ignore soft endstops during calibration - //SERIAL_ECHOLNPGM(" Soft endstops disabled"); - if (IsRunning()) { - //gcode_get_destination(); // For X Y Z E F - delta[X_AXIS] = delta_x; - delta[Y_AXIS] = delta_y; - forward_kinematics_SCARA(delta); - destination[X_AXIS] = delta[X_AXIS] / axis_scaling[X_AXIS]; - destination[Y_AXIS] = delta[Y_AXIS] / axis_scaling[Y_AXIS]; - prepare_move_to_destination(); - //ok_to_send(); - return true; - } - return false; - } - - /** - * M360: SCARA calibration: Move to cal-position ThetaA (0 deg calibration) - */ - inline bool gcode_M360() { - SERIAL_ECHOLNPGM(" Cal: Theta 0"); - return SCARA_move_to_cal(0, 120); - } - - /** - * M361: SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree) - */ - inline bool gcode_M361() { - SERIAL_ECHOLNPGM(" Cal: Theta 90"); - return SCARA_move_to_cal(90, 130); - } - - /** - * M362: SCARA calibration: Move to cal-position PsiA (0 deg calibration) - */ - inline bool gcode_M362() { - SERIAL_ECHOLNPGM(" Cal: Psi 0"); - return SCARA_move_to_cal(60, 180); - } - - /** - * M363: SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree) - */ - inline bool gcode_M363() { - SERIAL_ECHOLNPGM(" Cal: Psi 90"); - return SCARA_move_to_cal(50, 90); - } - - /** - * M364: SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position) - */ - inline bool gcode_M364() { - SERIAL_ECHOLNPGM(" Cal: Theta-Psi 90"); - return SCARA_move_to_cal(45, 135); - } - - /** - * M365: SCARA calibration: Scaling factor, X, Y, Z axis - */ - inline void gcode_M365() { - LOOP_XYZ(i) - if (code_seen(axis_codes[i])) - axis_scaling[i] = code_value_float(); - } - -#endif // SCARA - -#if ENABLED(EXT_SOLENOID) - - void enable_solenoid(uint8_t num) { - switch (num) { - case 0: - OUT_WRITE(SOL0_PIN, HIGH); - break; - #if HAS_SOLENOID_1 - case 1: - OUT_WRITE(SOL1_PIN, HIGH); - break; - #endif - #if HAS_SOLENOID_2 - case 2: - OUT_WRITE(SOL2_PIN, HIGH); - break; - #endif - #if HAS_SOLENOID_3 - case 3: - OUT_WRITE(SOL3_PIN, HIGH); - break; - #endif - default: - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_INVALID_SOLENOID); - break; - } - } - - void enable_solenoid_on_active_extruder() { enable_solenoid(active_extruder); } - - void disable_all_solenoids() { - OUT_WRITE(SOL0_PIN, LOW); - OUT_WRITE(SOL1_PIN, LOW); - OUT_WRITE(SOL2_PIN, LOW); - OUT_WRITE(SOL3_PIN, LOW); - } - - /** - * M380: Enable solenoid on the active extruder - */ - inline void gcode_M380() { enable_solenoid_on_active_extruder(); } - - /** - * M381: Disable all solenoids - */ - inline void gcode_M381() { disable_all_solenoids(); } - -#endif // EXT_SOLENOID - -/** - * M400: Finish all moves - */ -inline void gcode_M400() { stepper.synchronize(); } - -#if HAS_BED_PROBE - - /** - * M401: Engage Z Servo endstop if available - */ - inline void gcode_M401() { DEPLOY_PROBE(); } - - /** - * M402: Retract Z Servo endstop if enabled - */ - inline void gcode_M402() { STOW_PROBE(); } - -#endif // HAS_BED_PROBE - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - - /** - * M404: Display or set (in current units) the nominal filament width (3mm, 1.75mm ) W<3.0> - */ - inline void gcode_M404() { - if (code_seen('W')) { - filament_width_nominal = code_value_linear_units(); - } - else { - SERIAL_PROTOCOLPGM("Filament dia (nominal mm):"); - SERIAL_PROTOCOLLN(filament_width_nominal); - } - } - - /** - * M405: Turn on filament sensor for control - */ - inline void gcode_M405() { - // This is technically a linear measurement, but since it's quantized to centimeters and is a different unit than - // everything else, it uses code_value_int() instead of code_value_linear_units(). - if (code_seen('D')) meas_delay_cm = code_value_int(); - NOMORE(meas_delay_cm, MAX_MEASUREMENT_DELAY); - - if (filwidth_delay_index2 == -1) { // Initialize the ring buffer if not done since startup - int temp_ratio = thermalManager.widthFil_to_size_ratio(); - - for (uint8_t i = 0; i < COUNT(measurement_delay); ++i) - measurement_delay[i] = temp_ratio - 100; // Subtract 100 to scale within a signed byte - - filwidth_delay_index1 = filwidth_delay_index2 = 0; - } - - filament_sensor = true; - - //SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); - //SERIAL_PROTOCOL(filament_width_meas); - //SERIAL_PROTOCOLPGM("Extrusion ratio(%):"); - //SERIAL_PROTOCOL(extruder_multiplier[active_extruder]); - } - - /** - * M406: Turn off filament sensor for control - */ - inline void gcode_M406() { filament_sensor = false; } - - /** - * M407: Get measured filament diameter on serial output - */ - inline void gcode_M407() { - SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); - SERIAL_PROTOCOLLN(filament_width_meas); - } - -#endif // FILAMENT_WIDTH_SENSOR - -void quickstop_stepper() { - stepper.quick_stop(); - #if DISABLED(SCARA) - stepper.synchronize(); - LOOP_XYZ(i) set_current_from_steppers_for_axis((AxisEnum)i); - SYNC_PLAN_POSITION_KINEMATIC(); - #endif -} - -#if ENABLED(MESH_BED_LEVELING) - - /** - * M420: Enable/Disable Mesh Bed Leveling - */ - inline void gcode_M420() { if (code_seen('S') && code_has_value()) mbl.set_has_mesh(code_value_bool()); } - - /** - * M421: Set a single Mesh Bed Leveling Z coordinate - * Use either 'M421 X Y Z' or 'M421 I J Z' - */ - inline void gcode_M421() { - int8_t px = 0, py = 0; - float z = 0; - bool hasX, hasY, hasZ, hasI, hasJ; - if ((hasX = code_seen('X'))) px = mbl.probe_index_x(code_value_axis_units(X_AXIS)); - if ((hasY = code_seen('Y'))) py = mbl.probe_index_y(code_value_axis_units(Y_AXIS)); - if ((hasI = code_seen('I'))) px = code_value_axis_units(X_AXIS); - if ((hasJ = code_seen('J'))) py = code_value_axis_units(Y_AXIS); - if ((hasZ = code_seen('Z'))) z = code_value_axis_units(Z_AXIS); - - if (hasX && hasY && hasZ) { - - if (px >= 0 && py >= 0) - mbl.set_z(px, py, z); - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY); - } - } - else if (hasI && hasJ && hasZ) { - if (px >= 0 && px < MESH_NUM_X_POINTS && py >= 0 && py < MESH_NUM_Y_POINTS) - mbl.set_z(px, py, z); - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_MESH_XY); - } - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_M421_PARAMETERS); - } - } - -#endif - -/** - * M428: Set home_offset based on the distance between the - * current_position and the nearest "reference point." - * If an axis is past center its endstop position - * is the reference-point. Otherwise it uses 0. This allows - * the Z offset to be set near the bed when using a max endstop. - * - * M428 can't be used more than 2cm away from 0 or an endstop. - * - * Use M206 to set these values directly. - */ -inline void gcode_M428() { - bool err = false; - LOOP_XYZ(i) { - if (axis_homed[i]) { - float base = (current_position[i] > (sw_endstop_min[i] + sw_endstop_max[i]) * 0.5) ? base_home_pos(i) : 0, - diff = current_position[i] - LOGICAL_POSITION(base, i); - if (diff > -20 && diff < 20) { - set_home_offset((AxisEnum)i, home_offset[i] - diff); - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_M428_TOO_FAR); - LCD_ALERTMESSAGEPGM("Err: Too far!"); - BUZZ(200, 40); - err = true; - break; - } - } - } - - if (!err) { - SYNC_PLAN_POSITION_KINEMATIC(); - report_current_position(); - LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED); - BUZZ(200, 659); - BUZZ(200, 698); - } -} - -/** - * M500: Store settings in EEPROM - */ -inline void gcode_M500() { - Config_StoreSettings(); -} - -/** - * M501: Read settings from EEPROM - */ -inline void gcode_M501() { - Config_RetrieveSettings(); -} - -/** - * M502: Revert to default settings - */ -inline void gcode_M502() { - Config_ResetDefault(); -} - -/** - * M503: print settings currently in memory - */ -inline void gcode_M503() { - Config_PrintSettings(code_seen('S') && !code_value_bool()); -} - -#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - - /** - * M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>) - */ - inline void gcode_M540() { - if (code_seen('S')) stepper.abort_on_endstop_hit = code_value_bool(); - } - -#endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#if HAS_BED_PROBE - - inline void gcode_M851() { - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET); - SERIAL_CHAR(' '); - - if (code_seen('Z')) { - float value = code_value_axis_units(Z_AXIS); - if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) { - zprobe_zoffset = value; - SERIAL_ECHO(zprobe_zoffset); - } - else { - SERIAL_ECHOPGM(MSG_Z_MIN); - SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN); - SERIAL_CHAR(' '); - SERIAL_ECHOPGM(MSG_Z_MAX); - SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX); - } - } - else { - SERIAL_ECHOPAIR(": ", zprobe_zoffset); - } - - SERIAL_EOL; - } - -#endif // HAS_BED_PROBE - -#if ENABLED(FILAMENT_CHANGE_FEATURE) - - /** - * M600: Pause for filament change - * - * E[distance] - Retract the filament this far (negative value) - * Z[distance] - Move the Z axis by this distance - * X[position] - Move to this X position, with Y - * Y[position] - Move to this Y position, with X - * L[distance] - Retract distance for removal (manual reload) - * - * Default values are used for omitted arguments. - * - */ - inline void gcode_M600() { - - if (thermalManager.tooColdToExtrude(active_extruder)) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_TOO_COLD_FOR_M600); - return; - } - - // Show initial message and wait for synchronize steppers - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INIT); - stepper.synchronize(); - - float lastpos[NUM_AXIS]; - - // Save current position of all axes - LOOP_XYZE(i) - lastpos[i] = destination[i] = current_position[i]; - - // Define runplan for move axes - #if ENABLED(DELTA) - #define RUNPLAN(RATE_MM_S) inverse_kinematics(destination); \ - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], RATE_MM_S, active_extruder); - #else - #define RUNPLAN(RATE_MM_S) line_to_destination(MMS_TO_MMM(RATE_MM_S)); - #endif - - KEEPALIVE_STATE(IN_HANDLER); - - // Initial retract before move to filament change position - if (code_seen('E')) destination[E_AXIS] += code_value_axis_units(E_AXIS); - #if defined(FILAMENT_CHANGE_RETRACT_LENGTH) && FILAMENT_CHANGE_RETRACT_LENGTH > 0 - else destination[E_AXIS] -= FILAMENT_CHANGE_RETRACT_LENGTH; - #endif - - RUNPLAN(FILAMENT_CHANGE_RETRACT_FEEDRATE); - - // Lift Z axis - float z_lift = code_seen('Z') ? code_value_axis_units(Z_AXIS) : - #if defined(FILAMENT_CHANGE_Z_ADD) && FILAMENT_CHANGE_Z_ADD > 0 - FILAMENT_CHANGE_Z_ADD - #else - 0 - #endif - ; - - if (z_lift > 0) { - destination[Z_AXIS] += z_lift; - NOMORE(destination[Z_AXIS], Z_MAX_POS); - RUNPLAN(FILAMENT_CHANGE_Z_FEEDRATE); - } - - // Move XY axes to filament exchange position - if (code_seen('X')) destination[X_AXIS] = code_value_axis_units(X_AXIS); - #ifdef FILAMENT_CHANGE_X_POS - else destination[X_AXIS] = FILAMENT_CHANGE_X_POS; - #endif - - if (code_seen('Y')) destination[Y_AXIS] = code_value_axis_units(Y_AXIS); - #ifdef FILAMENT_CHANGE_Y_POS - else destination[Y_AXIS] = FILAMENT_CHANGE_Y_POS; - #endif - - RUNPLAN(FILAMENT_CHANGE_XY_FEEDRATE); - - stepper.synchronize(); - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_UNLOAD); - - // Unload filament - if (code_seen('L')) destination[E_AXIS] += code_value_axis_units(E_AXIS); - #if defined(FILAMENT_CHANGE_UNLOAD_LENGTH) && FILAMENT_CHANGE_UNLOAD_LENGTH > 0 - else destination[E_AXIS] -= FILAMENT_CHANGE_UNLOAD_LENGTH; - #endif - - RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE); - - // Synchronize steppers and then disable extruders steppers for manual filament changing - stepper.synchronize(); - disable_e0(); - disable_e1(); - disable_e2(); - disable_e3(); - delay(100); - - #if HAS_BUZZER - millis_t next_tick = 0; - #endif - - // Wait for filament insert by user and press button - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INSERT); - - while (!lcd_clicked()) { - #if HAS_BUZZER - millis_t ms = millis(); - if (ms >= next_tick) { - BUZZ(300, 2000); - next_tick = ms + 2500; // Beep every 2.5s while waiting - } - #endif - idle(true); - } - delay(100); - while (lcd_clicked()) idle(true); - delay(100); - - // Show load message - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_LOAD); - - // Load filament - if (code_seen('L')) destination[E_AXIS] -= code_value_axis_units(E_AXIS); - #if defined(FILAMENT_CHANGE_LOAD_LENGTH) && FILAMENT_CHANGE_LOAD_LENGTH > 0 - else destination[E_AXIS] += FILAMENT_CHANGE_LOAD_LENGTH; - #endif - - RUNPLAN(FILAMENT_CHANGE_LOAD_FEEDRATE); - stepper.synchronize(); - - #if defined(FILAMENT_CHANGE_EXTRUDE_LENGTH) && FILAMENT_CHANGE_EXTRUDE_LENGTH > 0 - do { - // Extrude filament to get into hotend - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_EXTRUDE); - destination[E_AXIS] += FILAMENT_CHANGE_EXTRUDE_LENGTH; - RUNPLAN(FILAMENT_CHANGE_EXTRUDE_FEEDRATE); - stepper.synchronize(); - // Ask user if more filament should be extruded - KEEPALIVE_STATE(PAUSED_FOR_USER); - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_OPTION); - while (filament_change_menu_response == FILAMENT_CHANGE_RESPONSE_WAIT_FOR) idle(true); - KEEPALIVE_STATE(IN_HANDLER); - } while (filament_change_menu_response != FILAMENT_CHANGE_RESPONSE_RESUME_PRINT); - #endif - - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_RESUME); - - KEEPALIVE_STATE(IN_HANDLER); - - // Set extruder to saved position - current_position[E_AXIS] = lastpos[E_AXIS]; - destination[E_AXIS] = lastpos[E_AXIS]; - planner.set_e_position_mm(current_position[E_AXIS]); - - #if ENABLED(DELTA) - // Move XYZ to starting position, then E - inverse_kinematics(lastpos); - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], FILAMENT_CHANGE_XY_FEEDRATE, active_extruder); - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], lastpos[E_AXIS], FILAMENT_CHANGE_XY_FEEDRATE, active_extruder); - #else - // Move XY to starting position, then Z, then E - destination[X_AXIS] = lastpos[X_AXIS]; - destination[Y_AXIS] = lastpos[Y_AXIS]; - RUNPLAN(FILAMENT_CHANGE_XY_FEEDRATE); - destination[Z_AXIS] = lastpos[Z_AXIS]; - RUNPLAN(FILAMENT_CHANGE_Z_FEEDRATE); - #endif - stepper.synchronize(); - - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - filament_ran_out = false; - #endif - - // Show status screen - lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_STATUS); - } - -#endif // FILAMENT_CHANGE_FEATURE - -#if ENABLED(DUAL_X_CARRIAGE) - - /** - * M605: Set dual x-carriage movement mode - * - * M605 S0: Full control mode. The slicer has full control over x-carriage movement - * M605 S1: Auto-park mode. The inactive head will auto park/unpark without slicer involvement - * M605 S2 [Xnnn] [Rmmm]: Duplication mode. The second extruder will duplicate the first with nnn - * units x-offset and an optional differential hotend temperature of - * mmm degrees. E.g., with "M605 S2 X100 R2" the second extruder will duplicate - * the first with a spacing of 100mm in the x direction and 2 degrees hotter. - * - * Note: the X axis should be homed after changing dual x-carriage mode. - */ - inline void gcode_M605() { - stepper.synchronize(); - if (code_seen('S')) dual_x_carriage_mode = code_value_byte(); - switch (dual_x_carriage_mode) { - case DXC_DUPLICATION_MODE: - if (code_seen('X')) duplicate_extruder_x_offset = max(code_value_axis_units(X_AXIS), X2_MIN_POS - x_home_pos(0)); - if (code_seen('R')) duplicate_extruder_temp_offset = code_value_temp_diff(); - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_HOTEND_OFFSET); - SERIAL_CHAR(' '); - SERIAL_ECHO(hotend_offset[X_AXIS][0]); - SERIAL_CHAR(','); - SERIAL_ECHO(hotend_offset[Y_AXIS][0]); - SERIAL_CHAR(' '); - SERIAL_ECHO(duplicate_extruder_x_offset); - SERIAL_CHAR(','); - SERIAL_ECHOLN(hotend_offset[Y_AXIS][1]); - break; - case DXC_FULL_CONTROL_MODE: - case DXC_AUTO_PARK_MODE: - break; - default: - dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; - break; - } - active_extruder_parked = false; - extruder_duplication_enabled = false; - delayed_move_time = 0; - } - -#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - - inline void gcode_M605() { - stepper.synchronize(); - extruder_duplication_enabled = code_seen('S') && code_value_int() == 2; - SERIAL_ECHO_START; - SERIAL_ECHOPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF); - SERIAL_EOL; - } - -#endif // M605 - -#if ENABLED(LIN_ADVANCE) - /** - * M905: Set advance factor - */ - inline void gcode_M905() { - stepper.synchronize(); - stepper.advance_M905(code_seen('K') ? code_value_float() : -1.0); - } -#endif - -/** - * M907: Set digital trimpot motor current using axis codes X, Y, Z, E, B, S - */ -inline void gcode_M907() { - #if HAS_DIGIPOTSS - LOOP_XYZE(i) - if (code_seen(axis_codes[i])) stepper.digipot_current(i, code_value_int()); - if (code_seen('B')) stepper.digipot_current(4, code_value_int()); - if (code_seen('S')) for (int i = 0; i <= 4; i++) stepper.digipot_current(i, code_value_int()); - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) - if (code_seen('X')) stepper.digipot_current(0, code_value_int()); - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) - if (code_seen('Z')) stepper.digipot_current(1, code_value_int()); - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) - if (code_seen('E')) stepper.digipot_current(2, code_value_int()); - #endif - #if ENABLED(DIGIPOT_I2C) - // this one uses actual amps in floating point - LOOP_XYZE(i) if (code_seen(axis_codes[i])) digipot_i2c_set_current(i, code_value_float()); - // for each additional extruder (named B,C,D,E..., channels 4,5,6,7...) - for (int i = NUM_AXIS; i < DIGIPOT_I2C_NUM_CHANNELS; i++) if (code_seen('B' + i - (NUM_AXIS))) digipot_i2c_set_current(i, code_value_float()); - #endif - #if ENABLED(DAC_STEPPER_CURRENT) - if (code_seen('S')) { - float dac_percent = code_value_float(); - for (uint8_t i = 0; i <= 4; i++) dac_current_percent(i, dac_percent); - } - LOOP_XYZE(i) if (code_seen(axis_codes[i])) dac_current_percent(i, code_value_float()); - #endif -} - -#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT) - - /** - * M908: Control digital trimpot directly (M908 P S) - */ - inline void gcode_M908() { - #if HAS_DIGIPOTSS - stepper.digitalPotWrite( - code_seen('P') ? code_value_int() : 0, - code_seen('S') ? code_value_int() : 0 - ); - #endif - #ifdef DAC_STEPPER_CURRENT - dac_current_raw( - code_seen('P') ? code_value_byte() : -1, - code_seen('S') ? code_value_ushort() : 0 - ); - #endif - } - - #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF - - inline void gcode_M909() { dac_print_values(); } - - inline void gcode_M910() { dac_commit_eeprom(); } - - #endif - -#endif // HAS_DIGIPOTSS || DAC_STEPPER_CURRENT - -#if HAS_MICROSTEPS - - // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers. - inline void gcode_M350() { - if (code_seen('S')) for (int i = 0; i <= 4; i++) stepper.microstep_mode(i, code_value_byte()); - LOOP_XYZE(i) if (code_seen(axis_codes[i])) stepper.microstep_mode(i, code_value_byte()); - if (code_seen('B')) stepper.microstep_mode(4, code_value_byte()); - stepper.microstep_readings(); - } - - /** - * M351: Toggle MS1 MS2 pins directly with axis codes X Y Z E B - * S# determines MS1 or MS2, X# sets the pin high/low. - */ - inline void gcode_M351() { - if (code_seen('S')) switch (code_value_byte()) { - case 1: - LOOP_XYZE(i) if (code_seen(axis_codes[i])) stepper.microstep_ms(i, code_value_byte(), -1); - if (code_seen('B')) stepper.microstep_ms(4, code_value_byte(), -1); - break; - case 2: - LOOP_XYZE(i) if (code_seen(axis_codes[i])) stepper.microstep_ms(i, -1, code_value_byte()); - if (code_seen('B')) stepper.microstep_ms(4, -1, code_value_byte()); - break; - } - stepper.microstep_readings(); - } - -#endif // HAS_MICROSTEPS - -#if ENABLED(MIXING_EXTRUDER) - - /** - * M163: Set a single mix factor for a mixing extruder - * This is called "weight" by some systems. - * - * S[index] The channel index to set - * P[float] The mix value - * - */ - inline void gcode_M163() { - int mix_index = code_seen('S') ? code_value_int() : 0; - float mix_value = code_seen('P') ? code_value_float() : 0.0; - if (mix_index < MIXING_STEPPERS) mixing_factor[mix_index] = mix_value; - } - - #if MIXING_VIRTUAL_TOOLS > 1 - - /** - * M164: Store the current mix factors as a virtual tool. - * - * S[index] The virtual tool to store - * - */ - inline void gcode_M164() { - int tool_index = code_seen('S') ? code_value_int() : 0; - if (tool_index < MIXING_VIRTUAL_TOOLS) { - normalize_mix(); - for (uint8_t i = 0; i < MIXING_STEPPERS; i++) - mixing_virtual_tool_mix[tool_index][i] = mixing_factor[i]; - } - } - - #endif - - #if ENABLED(DIRECT_MIXING_IN_G1) - /** - * M165: Set multiple mix factors for a mixing extruder. - * Factors that are left out will be set to 0. - * All factors together must add up to 1.0. - * - * A[factor] Mix factor for extruder stepper 1 - * B[factor] Mix factor for extruder stepper 2 - * C[factor] Mix factor for extruder stepper 3 - * D[factor] Mix factor for extruder stepper 4 - * H[factor] Mix factor for extruder stepper 5 - * I[factor] Mix factor for extruder stepper 6 - * - */ - inline void gcode_M165() { gcode_get_mix(); } - #endif - -#endif // MIXING_EXTRUDER - -/** - * M999: Restart after being stopped - * - * Default behaviour is to flush the serial buffer and request - * a resend to the host starting on the last N line received. - * - * Sending "M999 S1" will resume printing without flushing the - * existing command buffer. - * - */ -inline void gcode_M999() { - Running = true; - lcd_reset_alert_level(); - - if (code_seen('S') && code_value_bool()) return; - - // gcode_LastN = Stopped_gcode_LastN; - FlushSerialRequestResend(); -} - -#if ENABLED(SWITCHING_EXTRUDER) - inline void move_extruder_servo(uint8_t e) { - const int angles[2] = SWITCHING_EXTRUDER_SERVO_ANGLES; - MOVE_SERVO(SWITCHING_EXTRUDER_SERVO_NR, angles[e]); - } -#endif - -inline void invalid_extruder_error(const uint8_t &e) { - SERIAL_ECHO_START; - SERIAL_CHAR('T'); - SERIAL_PROTOCOL_F(e, DEC); - SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); -} - -void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool no_move/*=false*/) { - #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 - - if (tmp_extruder >= MIXING_VIRTUAL_TOOLS) { - invalid_extruder_error(tmp_extruder); - return; - } - - // T0-Tnnn: Switch virtual tool by changing the mix - for (uint8_t j = 0; j < MIXING_STEPPERS; j++) - mixing_factor[j] = mixing_virtual_tool_mix[tmp_extruder][j]; - - #else //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1 - - #if HOTENDS > 1 - - if (tmp_extruder >= EXTRUDERS) { - invalid_extruder_error(tmp_extruder); - return; - } - - float old_feedrate_mm_m = feedrate_mm_m; - - feedrate_mm_m = fr_mm_m > 0.0 ? (old_feedrate_mm_m = fr_mm_m) : XY_PROBE_FEEDRATE_MM_M; - - if (tmp_extruder != active_extruder) { - if (!no_move && axis_unhomed_error(true, true, true)) { - SERIAL_ECHOLNPGM("No move on toolchange"); - no_move = true; - } - - // Save current position to destination, for use later - set_destination_to_current(); - - #if ENABLED(DUAL_X_CARRIAGE) - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPGM("Dual X Carriage Mode "); - switch (dual_x_carriage_mode) { - case DXC_DUPLICATION_MODE: SERIAL_ECHOLNPGM("DXC_DUPLICATION_MODE"); break; - case DXC_AUTO_PARK_MODE: SERIAL_ECHOLNPGM("DXC_AUTO_PARK_MODE"); break; - case DXC_FULL_CONTROL_MODE: SERIAL_ECHOLNPGM("DXC_FULL_CONTROL_MODE"); break; - } - } - #endif - - if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() && - (delayed_move_time || current_position[X_AXIS] != x_home_pos(active_extruder)) - ) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("Raise to ", current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT); SERIAL_EOL; - SERIAL_ECHOPAIR("MoveX to ", x_home_pos(active_extruder)); SERIAL_EOL; - SERIAL_ECHOPAIR("Lower to ", current_position[Z_AXIS]); SERIAL_EOL; - } - #endif - // Park old head: 1) raise 2) move to park position 3) lower - for (uint8_t i = 0; i < 3; i++) - planner.buffer_line( - i == 0 ? current_position[X_AXIS] : x_home_pos(active_extruder), - current_position[Y_AXIS], - current_position[Z_AXIS] + (i == 2 ? 0 : TOOLCHANGE_PARK_ZLIFT), - current_position[E_AXIS], - planner.max_feedrate_mm_s[i == 1 ? X_AXIS : Z_AXIS], - active_extruder - ); - stepper.synchronize(); - } - - // apply Y & Z extruder offset (x offset is already used in determining home pos) - current_position[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder]; - current_position[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder]; - active_extruder = tmp_extruder; - - // This function resets the max/min values - the current position may be overwritten below. - set_axis_is_at_home(X_AXIS); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("New Extruder", current_position); - #endif - - switch (dual_x_carriage_mode) { - case DXC_FULL_CONTROL_MODE: - current_position[X_AXIS] = LOGICAL_X_POSITION(inactive_extruder_x_pos); - inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]); - break; - case DXC_DUPLICATION_MODE: - active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position - if (active_extruder_parked) - current_position[X_AXIS] = LOGICAL_X_POSITION(inactive_extruder_x_pos); - else - current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset; - inactive_extruder_x_pos = RAW_X_POSITION(destination[X_AXIS]); - extruder_duplication_enabled = false; - break; - default: - // record raised toolhead position for use by unpark - memcpy(raised_parked_position, current_position, sizeof(raised_parked_position)); - raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT; - active_extruder_parked = true; - delayed_move_time = 0; - break; - } - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); - SERIAL_EOL; - DEBUG_POS("New extruder (parked)", current_position); - } - #endif - - // No extra case for AUTO_BED_LEVELING_FEATURE in DUAL_X_CARRIAGE. Does that mean they don't work together? - #else // !DUAL_X_CARRIAGE - - #if ENABLED(SWITCHING_EXTRUDER) - // <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower. - float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder], - z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0); - - // Always raise by some amount - planner.buffer_line( - current_position[X_AXIS], - current_position[Y_AXIS], - current_position[Z_AXIS] + z_raise, - current_position[E_AXIS], - planner.max_feedrate_mm_s[Z_AXIS], - active_extruder - ); - stepper.synchronize(); - - move_extruder_servo(active_extruder); - delay(500); - - // Move back down, if needed - if (z_raise != z_diff) { - planner.buffer_line( - current_position[X_AXIS], - current_position[Y_AXIS], - current_position[Z_AXIS] + z_diff, - current_position[E_AXIS], - planner.max_feedrate_mm_s[Z_AXIS], - active_extruder - ); - stepper.synchronize(); - } - #endif - - /** - * Set current_position to the position of the new nozzle. - * Offsets are based on linear distance, so we need to get - * the resulting position in coordinate space. - * - * - With grid or 3-point leveling, offset XYZ by a tilted vector - * - With mesh leveling, update Z for the new position - * - Otherwise, just use the raw linear distance - * - * Software endstops are altered here too. Consider a case where: - * E0 at X=0 ... E1 at X=10 - * When we switch to E1 now X=10, but E1 can't move left. - * To express this we apply the change in XY to the software endstops. - * E1 can move farther right than E0, so the right limit is extended. - * - * Note that we don't adjust the Z software endstops. Why not? - * Consider a case where Z=0 (here) and switching to E1 makes Z=1 - * because the bed is 1mm lower at the new position. As long as - * the first nozzle is out of the way, the carriage should be - * allowed to move 1mm lower. This technically "breaks" the - * Z software endstop. But this is technically correct (and - * there is no viable alternative). - */ - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - // Offset extruder, make sure to apply the bed level rotation matrix - vector_3 tmp_offset_vec = vector_3(hotend_offset[X_AXIS][tmp_extruder], - hotend_offset[Y_AXIS][tmp_extruder], - 0), - act_offset_vec = vector_3(hotend_offset[X_AXIS][active_extruder], - hotend_offset[Y_AXIS][active_extruder], - 0), - offset_vec = tmp_offset_vec - act_offset_vec; - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - tmp_offset_vec.debug("tmp_offset_vec"); - act_offset_vec.debug("act_offset_vec"); - offset_vec.debug("offset_vec (BEFORE)"); - } - #endif - - offset_vec.apply_rotation(planner.bed_level_matrix.transpose(planner.bed_level_matrix)); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) offset_vec.debug("offset_vec (AFTER)"); - #endif - - // Adjustments to the current position - float xydiff[2] = { offset_vec.x, offset_vec.y }; - current_position[Z_AXIS] += offset_vec.z; - - #else // !AUTO_BED_LEVELING_FEATURE - - float xydiff[2] = { - hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder], - hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder] - }; - - #if ENABLED(MESH_BED_LEVELING) - - if (mbl.active()) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) SERIAL_ECHOPAIR("Z before MBL: ", current_position[Z_AXIS]); - #endif - float xpos = RAW_CURRENT_POSITION(X_AXIS), - ypos = RAW_CURRENT_POSITION(Y_AXIS); - current_position[Z_AXIS] += mbl.get_z(xpos + xydiff[X_AXIS], ypos + xydiff[Y_AXIS]) - mbl.get_z(xpos, ypos); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR(" after: ", current_position[Z_AXIS]); - SERIAL_EOL; - } - #endif - } - - #endif // MESH_BED_LEVELING - - #endif // !AUTO_BED_LEVELING_FEATURE - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("Offset Tool XY by { ", xydiff[X_AXIS]); - SERIAL_ECHOPAIR(", ", xydiff[Y_AXIS]); - SERIAL_ECHOLNPGM(" }"); - } - #endif - - // The newly-selected extruder XY is actually at... - current_position[X_AXIS] += xydiff[X_AXIS]; - current_position[Y_AXIS] += xydiff[Y_AXIS]; - for (uint8_t i = X_AXIS; i <= Y_AXIS; i++) { - position_shift[i] += xydiff[i]; - update_software_endstops((AxisEnum)i); - } - - // Set the new active extruder - active_extruder = tmp_extruder; - - #endif // !DUAL_X_CARRIAGE - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Sync After Toolchange", current_position); - #endif - - // Tell the planner the new "current position" - SYNC_PLAN_POSITION_KINEMATIC(); - - // Move to the "old position" (move the extruder into place) - if (!no_move && IsRunning()) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination); - #endif - prepare_move_to_destination(); - } - - } // (tmp_extruder != active_extruder) - - stepper.synchronize(); - - #if ENABLED(EXT_SOLENOID) - disable_all_solenoids(); - enable_solenoid_on_active_extruder(); - #endif // EXT_SOLENOID - - feedrate_mm_m = old_feedrate_mm_m; - - #else // HOTENDS <= 1 - - // Set the new active extruder - active_extruder = tmp_extruder; - - UNUSED(fr_mm_m); - UNUSED(no_move); - - #endif // HOTENDS <= 1 - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER); - SERIAL_PROTOCOLLN((int)active_extruder); - - #endif //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1 -} - -/** - * T0-T3: Switch tool, usually switching extruders - * - * F[units/min] Set the movement feedrate - * S1 Don't move the tool in XY after change - */ -inline void gcode_T(uint8_t tmp_extruder) { - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR(">>> gcode_T(", tmp_extruder); - SERIAL_ECHOLNPGM(")"); - DEBUG_POS("BEFORE", current_position); - } - #endif - - #if HOTENDS == 1 || (ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1) - - tool_change(tmp_extruder); - - #elif HOTENDS > 1 - - tool_change( - tmp_extruder, - code_seen('F') ? code_value_axis_units(X_AXIS) : 0.0, - (tmp_extruder == active_extruder) || (code_seen('S') && code_value_bool()) - ); - - #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - DEBUG_POS("AFTER", current_position); - SERIAL_ECHOLNPGM("<<< gcode_T"); - } - #endif -} - -/** - * Process a single command and dispatch it to its handler - * This is called from the main loop() - */ -void process_next_command() { - current_command = command_queue[cmd_queue_index_r]; - - if (DEBUGGING(ECHO)) { - SERIAL_ECHO_START; - SERIAL_ECHOLN(current_command); - } - - // Sanitize the current command: - // - Skip leading spaces - // - Bypass N[-0-9][0-9]*[ ]* - // - Overwrite * with nul to mark the end - while (*current_command == ' ') ++current_command; - -#ifdef UARM_SWIFT - uint32_t serialNum = 0; - - uint8_t needReply = 0; - char replyBuf[RESULT_BUFFER_SIZE]; - uint8_t result = 0; - char *pch; - - pch = strstr(current_command, "M2245 V"); - if (pch != NULL) - { - pch += strlen("M2245 V"); - int strLength = strlen(pch); - char btName[20]; - - if (strLength <= 0) - { - return ; - } - else if (strLength > BT_NAME_MAX_LEN) - { - strncpy(btName, pch, BT_NAME_MAX_LEN); - btName[BT_NAME_MAX_LEN] = '\0'; - } - else - { - strcpy(btName, pch); - } - - if (setBtName(btName)) - { - MYSERIAL.println(MSG_OK); - } - else - { - MYSERIAL.print("E25"); - } - - return; - } - - - - if (*current_command == '#') - { - // Get and skip the code number - current_command++; - do { - serialNum = (serialNum * 10) + (*current_command - '0'); - current_command++; - } while (NUMERIC(*current_command)); - - while (*current_command == ' ') ++current_command; - } - - debugPrint("serianNum = %d\r\n", serialNum); -#endif // UARM_SWIFT - - - - if (*current_command == 'N' && NUMERIC_SIGNED(current_command[1])) { - current_command += 2; // skip N[-0-9] - while (NUMERIC(*current_command)) ++current_command; // skip [0-9]* - while (*current_command == ' ') ++current_command; // skip [ ]* - } - char* starpos = strchr(current_command, '*'); // * should always be the last parameter - if (starpos) while (*starpos == ' ' || *starpos == '*') *starpos-- = '\0'; // nullify '*' and ' ' - - char *cmd_ptr = current_command; - - // Get the command code, which must be G, M, or T - char command_code = *cmd_ptr++; - - // Skip spaces to get the numeric part - while (*cmd_ptr == ' ') cmd_ptr++; - - uint16_t codenum = 0; // define ahead of goto - - // Bail early if there's no code - bool code_is_good = NUMERIC(*cmd_ptr); - if (!code_is_good) goto ExitUnknownCommand; - - // Get and skip the code number - do { - codenum = (codenum * 10) + (*cmd_ptr - '0'); - cmd_ptr++; - } while (NUMERIC(*cmd_ptr)); - - // Skip all spaces to get to the first argument, or nul - while (*cmd_ptr == ' ') cmd_ptr++; - - // The command's arguments (if any) start here, for sure! - current_command_args = cmd_ptr; - - KEEPALIVE_STATE(IN_HANDLER); - - // Handle a known G, M, or T - switch (command_code) { - case 'G': switch (codenum) { - - // G0, G1 - case 0: - #ifdef UARM_SWIFT - uarm_gcode_G0(); - #endif - gcode_G0_G1(); - break; - case 1: - #ifdef UARM_SWIFT - uarm_gcode_G1(); - #endif - gcode_G0_G1(); - break; - - // G2, G3 - #if ENABLED(ARC_SUPPORT) && DISABLED(SCARA) - case 2: // G2 - CW ARC - case 3: // G3 - CCW ARC - gcode_G2_G3(codenum == 2); - break; - #endif - - // G4 Dwell - case 4: - gcode_G4(); - break; - - #if ENABLED(BEZIER_CURVE_SUPPORT) - // G5 - case 5: // G5 - Cubic B_spline - gcode_G5(); - break; - #endif // BEZIER_CURVE_SUPPORT - - #if ENABLED(FWRETRACT) - case 10: // G10: retract - case 11: // G11: retract_recover - gcode_G10_G11(codenum == 10); - break; - #endif // FWRETRACT - - #if ENABLED(NOZZLE_CLEAN_FEATURE) - case 12: - gcode_G12(); // G12: Nozzle Clean - break; - #endif // NOZZLE_CLEAN_FEATURE - - #if ENABLED(INCH_MODE_SUPPORT) - case 20: //G20: Inch Mode - gcode_G20(); - break; - - case 21: //G21: MM Mode - gcode_G21(); - break; - #endif // INCH_MODE_SUPPORT - - #if ENABLED(NOZZLE_PARK_FEATURE) - case 27: // G27: Nozzle Park - gcode_G27(); - break; - #endif // NOZZLE_PARK_FEATURE - - case 28: // G28: Home all axes, one at a time - gcode_G28(); - break; - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING) - case 29: // G29 Detailed Z probe, probes the bed at 3 or more points. - gcode_G29(); - break; - #endif // AUTO_BED_LEVELING_FEATURE - - #if HAS_BED_PROBE - - case 30: // G30 Single Z probe - gcode_G30(); - break; - - #if ENABLED(Z_PROBE_SLED) - - case 31: // G31: dock the sled - gcode_G31(); - break; - - case 32: // G32: undock the sled - gcode_G32(); - break; - - #endif // Z_PROBE_SLED - #endif // HAS_BED_PROBE - - case 90: // G90 - relative_mode = false; - break; - - case 91: // G91 - relative_mode = true; - break; - - case 92: // G92 - gcode_G92(); - break; - -#ifdef UARM_SWIFT - // G cmd - case 2004: - gcode_G4(); - break; - - case 2201: - gcode_get_destination_polor(); - break; - - // rotate stepper motor - case 2202: - - - if (code_seen('N')) - { - uint8_t index = code_value_byte(); - - if (index < 3) - { - - gcode_get_destination_angle(index); - line_to_destination_angle(); - } - else if (index == 3) - { - rotate_frontend_motor(); - - } - } - break; - - // stop - case 2203: - stepper.synchronize(); - refresh_cmd_timeout(); - break; - - // 2204 relative move use G90 G91 - case 2204: - relative_mode = true; - gcode_G0_G1(); - relative_mode = false; - break; - - case 2205: - relative_mode = true; - gcode_get_destination_polor(); - relative_mode = false; - break; - -#endif // UARM_SWIFT - - } - break; - - case 'M': switch (codenum) { - #if ENABLED(ULTIPANEL) - case 0: // M0 - Unconditional stop - Wait for user button press on LCD - case 1: // M1 - Conditional stop - Wait for user button press on LCD - gcode_M0_M1(); - break; - #endif // ULTIPANEL - - case 3: - uarm_gcode_G0(); - break; - - case 5: - uarm_gcode_G1(); - break; - - case 17: - gcode_M17(); - break; - - #if ENABLED(SDSUPPORT) - case 20: // M20 - list SD card - gcode_M20(); break; - case 21: // M21 - init SD card - gcode_M21(); break; - case 22: //M22 - release SD card - gcode_M22(); break; - case 23: //M23 - Select file - gcode_M23(); break; - case 24: //M24 - Start SD print - gcode_M24(); break; - case 25: //M25 - Pause SD print - gcode_M25(); break; - case 26: //M26 - Set SD index - gcode_M26(); break; - case 27: //M27 - Get SD status - gcode_M27(); break; - case 28: //M28 - Start SD write - gcode_M28(); break; - case 29: //M29 - Stop SD write - gcode_M29(); break; - case 30: //M30 Delete File - gcode_M30(); break; - case 32: //M32 - Select file and start SD print - gcode_M32(); break; - - #if ENABLED(LONG_FILENAME_HOST_SUPPORT) - case 33: //M33 - Get the long full path to a file or folder - gcode_M33(); break; - #endif // LONG_FILENAME_HOST_SUPPORT - - case 928: //M928 - Start SD write - gcode_M928(); break; - #endif //SDSUPPORT - - case 31: //M31 take time since the start of the SD print or an M109 command - gcode_M31(); - break; - - case 42: //M42 -Change pin status via gcode - gcode_M42(); - break; - - #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) - case 48: // M48 Z probe repeatability - gcode_M48(); - break; - #endif // Z_MIN_PROBE_REPEATABILITY_TEST - - case 75: // Start print timer - gcode_M75(); - break; - - case 76: // Pause print timer - gcode_M76(); - break; - - case 77: // Stop print timer - gcode_M77(); - break; - - #if ENABLED(PRINTCOUNTER) - case 78: // Show print statistics - gcode_M78(); - break; - #endif - - #if ENABLED(M100_FREE_MEMORY_WATCHER) - case 100: - gcode_M100(); - break; - #endif - - case 104: // M104 - gcode_M104(); - break; - - case 110: // M110: Set Current Line Number - gcode_M110(); - break; - - case 111: // M111: Set debug level - gcode_M111(); - break; - - #if DISABLED(EMERGENCY_PARSER) - - case 108: // M108: Cancel Waiting - gcode_M108(); - break; - - case 112: // M112: Emergency Stop - gcode_M112(); - break; - - case 410: // M410 quickstop - Abort all the planned moves. - gcode_M410(); - break; - - #endif - - #if ENABLED(HOST_KEEPALIVE_FEATURE) - case 113: // M113: Set Host Keepalive interval - gcode_M113(); - break; - #endif - - case 140: // M140: Set bed temp - gcode_M140(); - break; - - case 105: // M105: Read current temperature - gcode_M105(); - KEEPALIVE_STATE(NOT_BUSY); - return; // "ok" already printed - - case 109: // M109: Wait for temperature - gcode_M109(); - break; - - #if HAS_TEMP_BED - case 190: // M190: Wait for bed heater to reach target - gcode_M190(); - break; - #endif // HAS_TEMP_BED - - #if FAN_COUNT > 0 - case 106: // M106: Fan On - gcode_M106(); - break; - case 107: // M107: Fan Off - gcode_M107(); - break; - #endif // FAN_COUNT > 0 - - #if ENABLED(BARICUDA) - // PWM for HEATER_1_PIN - #if HAS_HEATER_1 - case 126: // M126: valve open - gcode_M126(); - break; - case 127: // M127: valve closed - gcode_M127(); - break; - #endif // HAS_HEATER_1 - - // PWM for HEATER_2_PIN - #if HAS_HEATER_2 - case 128: // M128: valve open - gcode_M128(); - break; - case 129: // M129: valve closed - gcode_M129(); - break; - #endif // HAS_HEATER_2 - #endif // BARICUDA - - #if HAS_POWER_SWITCH - - case 80: // M80: Turn on Power Supply - gcode_M80(); - break; - - #endif // HAS_POWER_SWITCH - - case 81: // M81: Turn off Power, including Power Supply, if possible - gcode_M81(); - break; - - case 82: - gcode_M82(); - break; - case 83: - gcode_M83(); - break; - case 18: // (for compatibility) - case 84: // M84 - gcode_M18_M84(); - break; - case 85: // M85 - gcode_M85(); - break; - case 92: // M92: Set the steps-per-unit for one or more axes - gcode_M92(); - break; - case 115: // M115: Report capabilities - gcode_M115(); - break; - case 117: // M117: Set LCD message text, if possible - gcode_M117(); - break; - case 114: // M114: Report current position - gcode_M114(); - break; - case 120: // M120: Enable endstops - gcode_M120(); - break; - case 121: // M121: Disable endstops - gcode_M121(); - break; - case 119: // M119: Report endstop states - gcode_M119(); - break; - - #if ENABLED(ULTIPANEL) - - case 145: // M145: Set material heatup parameters - gcode_M145(); - break; - - #endif - - #if ENABLED(TEMPERATURE_UNITS_SUPPORT) - case 149: - gcode_M149(); - break; - #endif - - #if ENABLED(BLINKM) - - case 150: // M150 - gcode_M150(); - break; - - #endif //BLINKM - - #if ENABLED(EXPERIMENTAL_I2CBUS) - - case 155: - gcode_M155(); - break; - - case 156: - gcode_M156(); - break; - - #endif //EXPERIMENTAL_I2CBUS - - #if ENABLED(MIXING_EXTRUDER) - case 163: // M163 S P set weight for a mixing extruder - gcode_M163(); - break; - #if MIXING_VIRTUAL_TOOLS > 1 - case 164: // M164 S save current mix as a virtual extruder - gcode_M164(); - break; - #endif - #if ENABLED(DIRECT_MIXING_IN_G1) - case 165: // M165 [ABCDHI] set multiple mix weights - gcode_M165(); - break; - #endif - #endif - - case 200: // M200 D Set filament diameter and set E axis units to cubic. (Use S0 to revert to linear units.) - gcode_M200(); - break; - case 201: // M201 - gcode_M201(); - break; - #if 0 // Not used for Sprinter/grbl gen6 - case 202: // M202 - gcode_M202(); - break; - #endif - case 203: // M203 max feedrate units/sec - gcode_M203(); - break; - case 204: // M204 acclereration S normal moves T filmanent only moves - gcode_M204(); - break; - case 205: //M205 advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk - gcode_M205(); - break; - case 206: // M206 additional homing offset - gcode_M206(); - break; - - #if ENABLED(DELTA) - case 665: // M665 set delta configurations L R S - gcode_M665(); - break; - #endif - - #if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS) - case 666: // M666 set delta / dual endstop adjustment - gcode_M666(); - break; - #endif - - #if ENABLED(FWRETRACT) - case 207: // M207 - Set Retract Length: S, Feedrate: F, and Z lift: Z - gcode_M207(); - break; - case 208: // M208 - Set Recover (unretract) Additional (!) Length: S and Feedrate: F - gcode_M208(); - break; - case 209: // M209 - Turn Automatic Retract Detection on/off: S (For slicers that don't support G10/11). Every normal extrude-only move will be classified as retract depending on the direction. - gcode_M209(); - break; - #endif // FWRETRACT - - #if HOTENDS > 1 - case 218: // M218 - Set a tool offset: T X Y - gcode_M218(); - break; - #endif - - case 220: // M220 - Set Feedrate Percentage: S ("FR" on your LCD) - gcode_M220(); - break; - - case 221: // M221 - Set Flow Percentage: S - gcode_M221(); - break; - - case 226: // M226 P S- Wait until the specified pin reaches the state required - gcode_M226(); - break; - - #if HAS_SERVOS - case 280: // M280 - set servo position absolute. P: servo index, S: angle or microseconds - gcode_M280(); - break; - #endif // HAS_SERVOS - - #if HAS_BUZZER - case 300: // M300 - Play beep tone - gcode_M300(); - break; - #endif // HAS_BUZZER - - #if ENABLED(PIDTEMP) - case 301: // M301 - gcode_M301(); - break; - #endif // PIDTEMP - - #if ENABLED(PIDTEMPBED) - case 304: // M304 - gcode_M304(); - break; - #endif // PIDTEMPBED - - #if defined(CHDK) || HAS_PHOTOGRAPH - case 240: // M240 Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/ - gcode_M240(); - break; - #endif // CHDK || PHOTOGRAPH_PIN - - #if HAS_LCD_CONTRAST - case 250: // M250 Set LCD contrast value: C (value 0..63) - gcode_M250(); - break; - #endif // HAS_LCD_CONTRAST - - #if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - case 302: // allow cold extrudes, or set the minimum extrude temperature - gcode_M302(); - break; - #endif // PREVENT_DANGEROUS_EXTRUDE - - case 303: // M303 PID autotune - gcode_M303(); - break; - - #if ENABLED(SCARA) - case 360: // M360 SCARA Theta pos1 - if (gcode_M360()) return; - break; - case 361: // M361 SCARA Theta pos2 - if (gcode_M361()) return; - break; - case 362: // M362 SCARA Psi pos1 - if (gcode_M362()) return; - break; - case 363: // M363 SCARA Psi pos2 - if (gcode_M363()) return; - break; - case 364: // M364 SCARA Psi pos3 (90 deg to Theta) - if (gcode_M364()) return; - break; - case 365: // M365 Set SCARA scaling for X Y Z - gcode_M365(); - break; - #endif // SCARA - - case 400: // M400 finish all moves - gcode_M400(); - break; - - #if HAS_BED_PROBE - case 401: - gcode_M401(); - break; - case 402: - gcode_M402(); - break; - #endif // HAS_BED_PROBE - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width - gcode_M404(); - break; - case 405: //M405 Turn on filament sensor for control - gcode_M405(); - break; - case 406: //M406 Turn off filament sensor for control - gcode_M406(); - break; - case 407: //M407 Display measured filament diameter - gcode_M407(); - break; - #endif // ENABLED(FILAMENT_WIDTH_SENSOR) - - #if ENABLED(MESH_BED_LEVELING) - case 420: // M420 Enable/Disable Mesh Bed Leveling - gcode_M420(); - break; - case 421: // M421 Set a Mesh Bed Leveling Z coordinate - gcode_M421(); - break; - #endif - - case 428: // M428 Apply current_position to home_offset - gcode_M428(); - break; - - case 500: // M500 Store settings in EEPROM - gcode_M500(); - break; - case 501: // M501 Read settings from EEPROM - gcode_M501(); - break; - case 502: // M502 Revert to default settings - gcode_M502(); - break; - case 503: // M503 print settings currently in memory - gcode_M503(); - break; - - #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - case 540: - gcode_M540(); - break; - #endif - - #if HAS_BED_PROBE - case 851: - gcode_M851(); - break; - #endif // HAS_BED_PROBE - - #if ENABLED(FILAMENT_CHANGE_FEATURE) - case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] - gcode_M600(); - break; - #endif // FILAMENT_CHANGE_FEATURE - - #if ENABLED(DUAL_X_CARRIAGE) - case 605: - gcode_M605(); - break; - #endif // DUAL_X_CARRIAGE - - #if ENABLED(LIN_ADVANCE) - case 905: // M905 Set advance factor. - gcode_M905(); - break; - #endif - - case 907: // M907 Set digital trimpot motor current using axis codes. - gcode_M907(); - break; - - #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT) - - case 908: // M908 Control digital trimpot directly. - gcode_M908(); - break; - - #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF - - case 909: // M909 Print digipot/DAC current value - gcode_M909(); - break; - - case 910: // M910 Commit digipot/DAC value to external EEPROM - gcode_M910(); - break; - - #endif - - #endif // HAS_DIGIPOTSS || DAC_STEPPER_CURRENT - - #if HAS_MICROSTEPS - - case 350: // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers. - gcode_M350(); - break; - - case 351: // M351 Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low. - gcode_M351(); - break; - - #endif // HAS_MICROSTEPS - - case 999: // M999: Restart after being Stopped - gcode_M999(); - break; - -#ifdef UARM_SWIFT - // - - case 2019: - disable_all_steppers(); - break; - - case 2120: - uarm_gcode_M2120(); - break; - - case 2200: - needReply = 1; - result = uarm_gcode_M2200(replyBuf); - break; - - case 2201: - uarm_gcode_M2201(); - break; - - case 2202: - uarm_gcode_M2202(); - break; - - case 2203: - needReply = 1; - result = uarm_gcode_M2203(replyBuf); - break; - - case 2210: - uarm_gcode_M2210(); - break; - - case 2211: - needReply = 1; - result = uarm_gcode_M2211(replyBuf); - break; - - case 2212: - uarm_gcode_M2212(); - break; - - case 2213: - uarm_gcode_M2213(); - break; - - case 2220: - needReply = 1; - result = uarm_gcode_M2220(replyBuf); - break; - - case 2221: - needReply = 1; - result = uarm_gcode_M2221(replyBuf); - break; - - case 2222: - needReply = 1; - result = uarm_gcode_M2222(replyBuf); - break; - - case 2231: - uarm_gcode_M2231(); - break; - - - case 2232: - uarm_gcode_M2232(); - break; - - case 2233: - uarm_gcode_M2233(); - break; - - case 2234: - uarm_gcode_M2234(); - break; - - case 2300: - uarm_gcode_M2300(); - break; - - case 2301: - uarm_gcode_M2301(); - break; - - case 2240: - uarm_gcode_M2240(); - break; - - case 2400: - uarm_gcode_M2400(); - break; - - case 2401: - needReply = 1; - result = uarm_gcode_M2401(replyBuf); - break; - - case 2410: - uarm_gcode_M2410(); - break; - - case 2411: - uarm_gcode_M2411(); - break; - - -#endif //UARM_SWIFT - } - break; - - case 'T': - gcode_T(codenum); - break; - - case 'P': - switch (codenum) { - case 2200: - needReply = 1; - result = uarm_gcode_P2200(replyBuf); - break; - - case 2201: - needReply = 1; - result = uarm_gcode_P2201(replyBuf); - break; - - case 2202: - needReply = 1; - result = uarm_gcode_P2202(replyBuf); - break; - - case 2203: - needReply = 1; - result = uarm_gcode_P2203(replyBuf); - break; - - case 2204: - needReply = 1; - result = uarm_gcode_P2204(replyBuf); - break; - - case 2205: - needReply = 1; - result = uarm_gcode_P2205(replyBuf); - break; - - case 2206: - needReply = 1; - result = uarm_gcode_P2206(replyBuf); - break; - - case 2220: - needReply = 1; - result = uarm_gcode_P2220(replyBuf); - break; - - case 2221: - needReply = 1; - result = uarm_gcode_P2221(replyBuf); - break; - - case 2231: - needReply = 1; - result = uarm_gcode_P2231(replyBuf); - break; - - case 2232: - needReply = 1; - result = uarm_gcode_P2232(replyBuf); - break; - - case 2233: - needReply = 1; - result = uarm_gcode_P2233(replyBuf); - break; - - case 2234: - needReply = 1; - result = uarm_gcode_P2234(replyBuf); - break; - - case 2240: - needReply = 1; - result = uarm_gcode_P2240(replyBuf); - break; - - case 2241: - needReply = 1; - result = uarm_gcode_P2241(replyBuf); - break; - - case 2242: - needReply = 1; - result = uarm_gcode_P2242(replyBuf); - break; - - case 2245: - needReply = 1; - result = uarm_gcode_P2245(replyBuf); - break; - - case 2400: - needReply = 1; - result = uarm_gcode_P2400(replyBuf); - break; - -#ifdef SWIFT_TEST_MODE - case 2250: - needReply = 1; - result = uarm_gcode_P2250(replyBuf); - break; -#endif - } - break; - - default: code_is_good = false; - } - - KEEPALIVE_STATE(NOT_BUSY); - -ExitUnknownCommand: - - // Still unknown command? Throw an error - if (!code_is_good) unknown_command_error(); - -#ifdef UARM_SWIFT - if (code_is_good) - { - if (serialNum > 0) - { - MYSERIAL.print("$"); - MYSERIAL.print(serialNum); - MYSERIAL.print(" "); - - - } - - if (needReply) - { - if (result == E_OK) - { - MYSERIAL.print(MSG_OK); - MYSERIAL.print(" "); - MYSERIAL.println(replyBuf); - } - else - { - MYSERIAL.print("E"); - MYSERIAL.println(result); - } - } - else - { - ok_to_send(); - } - } - -#else - ok_to_send(); -#endif // UARM_SWIFT -} - -void FlushSerialRequestResend() { - //char command_queue[cmd_queue_index_r][100]="Resend:"; - MYSERIAL.flush(); - SERIAL_PROTOCOLPGM(MSG_RESEND); - SERIAL_PROTOCOLLN(gcode_LastN + 1); - ok_to_send(); -} - -void ok_to_send() { - refresh_cmd_timeout(); - if (!send_ok[cmd_queue_index_r]) return; - SERIAL_PROTOCOLPGM(MSG_OK); - #if ENABLED(ADVANCED_OK) - char* p = command_queue[cmd_queue_index_r]; - if (*p == 'N') { - SERIAL_PROTOCOL(' '); - SERIAL_ECHO(*p++); - while (NUMERIC_SIGNED(*p)) - SERIAL_ECHO(*p++); - } - SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - planner.movesplanned() - 1)); - SERIAL_PROTOCOLPGM(" B"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue); - #endif - SERIAL_EOL; -} - -void clamp_to_software_endstops(float target[3]) { - if (min_software_endstops) { - NOLESS(target[X_AXIS], sw_endstop_min[X_AXIS]); - NOLESS(target[Y_AXIS], sw_endstop_min[Y_AXIS]); - NOLESS(target[Z_AXIS], sw_endstop_min[Z_AXIS]); - } - if (max_software_endstops) { - NOMORE(target[X_AXIS], sw_endstop_max[X_AXIS]); - NOMORE(target[Y_AXIS], sw_endstop_max[Y_AXIS]); - NOMORE(target[Z_AXIS], sw_endstop_max[Z_AXIS]); - } -} - -#if ENABLED(DELTA) - - void recalc_delta_settings(float radius, float diagonal_rod) { - delta_tower1_x = -SIN_60 * (radius + DELTA_RADIUS_TRIM_TOWER_1); // front left tower - delta_tower1_y = -COS_60 * (radius + DELTA_RADIUS_TRIM_TOWER_1); - delta_tower2_x = SIN_60 * (radius + DELTA_RADIUS_TRIM_TOWER_2); // front right tower - delta_tower2_y = -COS_60 * (radius + DELTA_RADIUS_TRIM_TOWER_2); - delta_tower3_x = 0.0; // back middle tower - delta_tower3_y = (radius + DELTA_RADIUS_TRIM_TOWER_3); - delta_diagonal_rod_2_tower_1 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_1); - delta_diagonal_rod_2_tower_2 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_2); - delta_diagonal_rod_2_tower_3 = sq(diagonal_rod + delta_diagonal_rod_trim_tower_3); - } - - void inverse_kinematics(const float in_cartesian[3]) { - - const float cartesian[3] = { - RAW_X_POSITION(in_cartesian[X_AXIS]), - RAW_Y_POSITION(in_cartesian[Y_AXIS]), - RAW_Z_POSITION(in_cartesian[Z_AXIS]) - }; - - delta[TOWER_1] = sqrt(delta_diagonal_rod_2_tower_1 - - sq(delta_tower1_x - cartesian[X_AXIS]) - - sq(delta_tower1_y - cartesian[Y_AXIS]) - ) + cartesian[Z_AXIS]; - delta[TOWER_2] = sqrt(delta_diagonal_rod_2_tower_2 - - sq(delta_tower2_x - cartesian[X_AXIS]) - - sq(delta_tower2_y - cartesian[Y_AXIS]) - ) + cartesian[Z_AXIS]; - delta[TOWER_3] = sqrt(delta_diagonal_rod_2_tower_3 - - sq(delta_tower3_x - cartesian[X_AXIS]) - - sq(delta_tower3_y - cartesian[Y_AXIS]) - ) + cartesian[Z_AXIS]; - /** - SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]); - SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]); - - SERIAL_ECHOPGM("delta a="); SERIAL_ECHO(delta[TOWER_1]); - SERIAL_ECHOPGM(" b="); SERIAL_ECHO(delta[TOWER_2]); - SERIAL_ECHOPGM(" c="); SERIAL_ECHOLN(delta[TOWER_3]); - */ - } - - float delta_safe_distance_from_top() { - float cartesian[3] = { - LOGICAL_X_POSITION(0), - LOGICAL_Y_POSITION(0), - LOGICAL_Z_POSITION(0) - }; - inverse_kinematics(cartesian); - float distance = delta[TOWER_3]; - cartesian[Y_AXIS] = LOGICAL_Y_POSITION(DELTA_PRINTABLE_RADIUS); - inverse_kinematics(cartesian); - return abs(distance - delta[TOWER_3]); - } - - void forward_kinematics_DELTA(float z1, float z2, float z3) { - //As discussed in Wikipedia "Trilateration" - //we are establishing a new coordinate - //system in the plane of the three carriage points. - //This system will have the origin at tower1 and - //tower2 is on the x axis. tower3 is in the X-Y - //plane with a Z component of zero. We will define unit - //vectors in this coordinate system in our original - //coordinate system. Then when we calculate the - //Xnew, Ynew and Znew values, we can translate back into - //the original system by moving along those unit vectors - //by the corresponding values. - // https://en.wikipedia.org/wiki/Trilateration - - // Variable names matched to Marlin, c-version - // and avoiding a vector library - // by Andreas Hardtung 2016-06-7 - // based on a Java function from - // "Delta Robot Kinematics by Steve Graves" V3 - - // Result is in cartesian_position[]. - - //Create a vector in old coordinates along x axis of new coordinate - float p12[3] = { delta_tower2_x - delta_tower1_x, delta_tower2_y - delta_tower1_y, z2 - z1 }; - - //Get the Magnitude of vector. - float d = sqrt( p12[0]*p12[0] + p12[1]*p12[1] + p12[2]*p12[2] ); - - //Create unit vector by dividing by magnitude. - float ex[3] = { p12[0]/d, p12[1]/d, p12[2]/d }; - - //Now find vector from the origin of the new system to the third point. - float p13[3] = { delta_tower3_x - delta_tower1_x, delta_tower3_y - delta_tower1_y, z3 - z1 }; - - //Now use dot product to find the component of this vector on the X axis. - float i = ex[0]*p13[0] + ex[1]*p13[1] + ex[2]*p13[2]; - - //Now create a vector along the x axis that represents the x component of p13. - float iex[3] = { ex[0]*i, ex[1]*i, ex[2]*i }; - - //Now subtract the X component away from the original vector leaving only the Y component. We use the - //variable that will be the unit vector after we scale it. - float ey[3] = { p13[0] - iex[0], p13[1] - iex[1], p13[2] - iex[2]}; - - //The magnitude of Y component - float j = sqrt(sq(ey[0]) + sq(ey[1]) + sq(ey[2])); - - //Now make vector a unit vector - ey[0] /= j; ey[1] /= j; ey[2] /= j; - - //The cross product of the unit x and y is the unit z - //float[] ez = vectorCrossProd(ex, ey); - float ez[3] = { ex[1]*ey[2] - ex[2]*ey[1], ex[2]*ey[0] - ex[0]*ey[2], ex[0]*ey[1] - ex[1]*ey[0] }; - - //Now we have the d, i and j values defined in Wikipedia. - //We can plug them into the equations defined in - //Wikipedia for Xnew, Ynew and Znew - float Xnew = (delta_diagonal_rod_2_tower_1 - delta_diagonal_rod_2_tower_2 + d*d)/(d*2); - float Ynew = ((delta_diagonal_rod_2_tower_1 - delta_diagonal_rod_2_tower_3 + i*i + j*j)/2 - i*Xnew) /j; - float Znew = sqrt(delta_diagonal_rod_2_tower_1 - Xnew*Xnew - Ynew*Ynew); - - //Now we can start from the origin in the old coords and - //add vectors in the old coords that represent the - //Xnew, Ynew and Znew to find the point in the old system - cartesian_position[X_AXIS] = delta_tower1_x + ex[0]*Xnew + ey[0]*Ynew - ez[0]*Znew; - cartesian_position[Y_AXIS] = delta_tower1_y + ex[1]*Xnew + ey[1]*Ynew - ez[1]*Znew; - cartesian_position[Z_AXIS] = z1 + ex[2]*Xnew + ey[2]*Ynew - ez[2]*Znew; - }; - - void forward_kinematics_DELTA(float point[3]) { - forward_kinematics_DELTA(point[X_AXIS], point[Y_AXIS], point[Z_AXIS]); - } - - void set_cartesian_from_steppers() { - forward_kinematics_DELTA(stepper.get_axis_position_mm(X_AXIS), - stepper.get_axis_position_mm(Y_AXIS), - stepper.get_axis_position_mm(Z_AXIS)); - } - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // Adjust print surface height by linear interpolation over the bed_level array. - void adjust_delta(float cartesian[3]) { - if (delta_grid_spacing[0] == 0 || delta_grid_spacing[1] == 0) return; // G29 not done! - - int half = (AUTO_BED_LEVELING_GRID_POINTS - 1) / 2; - float h1 = 0.001 - half, h2 = half - 0.001, - grid_x = max(h1, min(h2, RAW_X_POSITION(cartesian[X_AXIS]) / delta_grid_spacing[0])), - grid_y = max(h1, min(h2, RAW_Y_POSITION(cartesian[Y_AXIS]) / delta_grid_spacing[1])); - int floor_x = floor(grid_x), floor_y = floor(grid_y); - float ratio_x = grid_x - floor_x, ratio_y = grid_y - floor_y, - z1 = bed_level[floor_x + half][floor_y + half], - z2 = bed_level[floor_x + half][floor_y + half + 1], - z3 = bed_level[floor_x + half + 1][floor_y + half], - z4 = bed_level[floor_x + half + 1][floor_y + half + 1], - left = (1 - ratio_y) * z1 + ratio_y * z2, - right = (1 - ratio_y) * z3 + ratio_y * z4, - offset = (1 - ratio_x) * left + ratio_x * right; - - delta[X_AXIS] += offset; - delta[Y_AXIS] += offset; - delta[Z_AXIS] += offset; - - /** - SERIAL_ECHOPGM("grid_x="); SERIAL_ECHO(grid_x); - SERIAL_ECHOPGM(" grid_y="); SERIAL_ECHO(grid_y); - SERIAL_ECHOPGM(" floor_x="); SERIAL_ECHO(floor_x); - SERIAL_ECHOPGM(" floor_y="); SERIAL_ECHO(floor_y); - SERIAL_ECHOPGM(" ratio_x="); SERIAL_ECHO(ratio_x); - SERIAL_ECHOPGM(" ratio_y="); SERIAL_ECHO(ratio_y); - SERIAL_ECHOPGM(" z1="); SERIAL_ECHO(z1); - SERIAL_ECHOPGM(" z2="); SERIAL_ECHO(z2); - SERIAL_ECHOPGM(" z3="); SERIAL_ECHO(z3); - SERIAL_ECHOPGM(" z4="); SERIAL_ECHO(z4); - SERIAL_ECHOPGM(" left="); SERIAL_ECHO(left); - SERIAL_ECHOPGM(" right="); SERIAL_ECHO(right); - SERIAL_ECHOPGM(" offset="); SERIAL_ECHOLN(offset); - */ - } - #endif // AUTO_BED_LEVELING_FEATURE - -#endif // DELTA - -void set_current_from_steppers_for_axis(AxisEnum axis) { - #if ENABLED(DELTA) - set_cartesian_from_steppers(); - current_position[axis] = LOGICAL_POSITION(cartesian_position[axis], axis); - #elif ENABLED(AUTO_BED_LEVELING_FEATURE) - vector_3 pos = planner.adjusted_position(); - current_position[axis] = axis == X_AXIS ? pos.x : axis == Y_AXIS ? pos.y : pos.z; - #else - current_position[axis] = stepper.get_axis_position_mm(axis); // CORE handled transparently - #endif -} - -#if ENABLED(MESH_BED_LEVELING) - -// This function is used to split lines on mesh borders so each segment is only part of one mesh area -void mesh_line_to_destination(float fr_mm_m, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) { - int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X_AXIS)), - cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)), - cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])), - cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS])); - NOMORE(cx1, MESH_NUM_X_POINTS - 2); - NOMORE(cy1, MESH_NUM_Y_POINTS - 2); - NOMORE(cx2, MESH_NUM_X_POINTS - 2); - NOMORE(cy2, MESH_NUM_Y_POINTS - 2); - - if (cx1 == cx2 && cy1 == cy2) { - // Start and end on same mesh square - line_to_destination(fr_mm_m); - set_current_to_destination(); - return; - } - - #define MBL_SEGMENT_END(A) (current_position[A ##_AXIS] + (destination[A ##_AXIS] - current_position[A ##_AXIS]) * normalized_dist) - - float normalized_dist, end[NUM_AXIS]; - - // Split at the left/front border of the right/top square - int8_t gcx = max(cx1, cx2), gcy = max(cy1, cy2); - if (cx2 != cx1 && TEST(x_splits, gcx)) { - memcpy(end, destination, sizeof(end)); - destination[X_AXIS] = LOGICAL_X_POSITION(mbl.get_probe_x(gcx)); - normalized_dist = (destination[X_AXIS] - current_position[X_AXIS]) / (end[X_AXIS] - current_position[X_AXIS]); - destination[Y_AXIS] = MBL_SEGMENT_END(Y); - CBI(x_splits, gcx); - } - else if (cy2 != cy1 && TEST(y_splits, gcy)) { - memcpy(end, destination, sizeof(end)); - destination[Y_AXIS] = LOGICAL_Y_POSITION(mbl.get_probe_y(gcy)); - normalized_dist = (destination[Y_AXIS] - current_position[Y_AXIS]) / (end[Y_AXIS] - current_position[Y_AXIS]); - destination[X_AXIS] = MBL_SEGMENT_END(X); - CBI(y_splits, gcy); - } - else { - // Already split on a border - line_to_destination(fr_mm_m); - set_current_to_destination(); - return; - } - - destination[Z_AXIS] = MBL_SEGMENT_END(Z); - destination[E_AXIS] = MBL_SEGMENT_END(E); - - // Do the split and look for more borders - mesh_line_to_destination(fr_mm_m, x_splits, y_splits); - - // Restore destination from stack - memcpy(destination, end, sizeof(end)); - mesh_line_to_destination(fr_mm_m, x_splits, y_splits); -} -#endif // MESH_BED_LEVELING - -#if ENABLED(DELTA) || ENABLED(SCARA) - - inline bool prepare_kinematic_move_to(float target[NUM_AXIS]) { - float difference[NUM_AXIS]; - LOOP_XYZE(i) difference[i] = target[i] - current_position[i]; - - float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]); - if (cartesian_mm < 0.000001) return false; - float _feedrate_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m); - float seconds = cartesian_mm / _feedrate_mm_s; - int steps = max(1, int(delta_segments_per_second * seconds)); - float inv_steps = 1.0/steps; - - // SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm); - // SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds); - // SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps); - - for (int s = 1; s <= steps; s++) { - - float fraction = float(s) * inv_steps; - - LOOP_XYZE(i) - target[i] = current_position[i] + difference[i] * fraction; - - inverse_kinematics(target); - - #if ENABLED(DELTA) && ENABLED(AUTO_BED_LEVELING_FEATURE) - if (!bed_leveling_in_progress) adjust_delta(target); - #endif - - //DEBUG_POS("prepare_kinematic_move_to", target); - //DEBUG_POS("prepare_kinematic_move_to", delta); - - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], _feedrate_mm_s, active_extruder); - } - return true; - } - -#endif // DELTA || SCARA - -#if ENABLED(DUAL_X_CARRIAGE) - - inline bool prepare_move_to_destination_dualx() { - if (active_extruder_parked) { - if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) { - // move duplicate extruder into correct duplication position. - planner.set_position_mm( - LOGICAL_X_POSITION(inactive_extruder_x_pos), - current_position[Y_AXIS], - current_position[Z_AXIS], - current_position[E_AXIS] - ); - planner.buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, - current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[X_AXIS], 1); - SYNC_PLAN_POSITION_KINEMATIC(); - stepper.synchronize(); - extruder_duplication_enabled = true; - active_extruder_parked = false; - } - else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) { // handle unparking of head - if (current_position[E_AXIS] == destination[E_AXIS]) { - // This is a travel move (with no extrusion) - // Skip it, but keep track of the current position - // (so it can be used as the start of the next non-travel move) - if (delayed_move_time != 0xFFFFFFFFUL) { - set_current_to_destination(); - NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]); - delayed_move_time = millis(); - return false; - } - } - delayed_move_time = 0; - // unpark extruder: 1) raise, 2) move into starting XY position, 3) lower - planner.buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[Z_AXIS], active_extruder); - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], PLANNER_XY_FEEDRATE(), active_extruder); - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate_mm_s[Z_AXIS], active_extruder); - active_extruder_parked = false; - } - } - return true; - } - -#endif // DUAL_X_CARRIAGE - -#if DISABLED(DELTA) && DISABLED(SCARA) - - inline bool prepare_move_to_destination_cartesian() { - // Do not use feedrate_percentage for E or Z only moves - if (current_position[X_AXIS] == destination[X_AXIS] && current_position[Y_AXIS] == destination[Y_AXIS]) { - line_to_destination(); - } - else { - #if ENABLED(MESH_BED_LEVELING) - if (mbl.active()) { - mesh_line_to_destination(MMM_SCALED(feedrate_mm_m)); - return false; - } - else - #endif - line_to_destination(MMM_SCALED(feedrate_mm_m)); - } - return true; - } - -#endif // !DELTA && !SCARA - -#if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - - inline void prevent_dangerous_extrude(float& curr_e, float& dest_e) { - if (DEBUGGING(DRYRUN)) return; - float de = dest_e - curr_e; - if (de) { - if (thermalManager.tooColdToExtrude(active_extruder)) { - curr_e = dest_e; // Behave as if the move really took place, but ignore E part - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); - } - #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - if (labs(de) > EXTRUDE_MAXLENGTH) { - curr_e = dest_e; // Behave as if the move really took place, but ignore E part - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); - } - #endif - } - } - -#endif // PREVENT_DANGEROUS_EXTRUDE - -/** - * Prepare a single move and get ready for the next one - * - * (This may call planner.buffer_line several times to put - * smaller moves into the planner for DELTA or SCARA.) - */ -void prepare_move_to_destination() { - clamp_to_software_endstops(destination); - refresh_cmd_timeout(); - - #if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - prevent_dangerous_extrude(current_position[E_AXIS], destination[E_AXIS]); - #endif - - #if ENABLED(DELTA) || ENABLED(SCARA) - if (!prepare_kinematic_move_to(destination)) return; - #else - #if ENABLED(DUAL_X_CARRIAGE) - if (!prepare_move_to_destination_dualx()) return; - #endif - if (!prepare_move_to_destination_cartesian()) return; - #endif - - set_current_to_destination(); -} - -#if ENABLED(ARC_SUPPORT) - /** - * Plan an arc in 2 dimensions - * - * The arc is approximated by generating many small linear segments. - * The length of each segment is configured in MM_PER_ARC_SEGMENT (Default 1mm) - * Arcs should only be made relatively large (over 5mm), as larger arcs with - * larger segments will tend to be more efficient. Your slicer should have - * options for G2/G3 arc generation. In future these options may be GCode tunable. - */ - void plan_arc( - float target[NUM_AXIS], // Destination position - float* offset, // Center of rotation relative to current_position - uint8_t clockwise // Clockwise? - ) { - - float radius = HYPOT(offset[X_AXIS], offset[Y_AXIS]), - center_X = current_position[X_AXIS] + offset[X_AXIS], - center_Y = current_position[Y_AXIS] + offset[Y_AXIS], - linear_travel = target[Z_AXIS] - current_position[Z_AXIS], - extruder_travel = target[E_AXIS] - current_position[E_AXIS], - r_X = -offset[X_AXIS], // Radius vector from center to current location - r_Y = -offset[Y_AXIS], - rt_X = target[X_AXIS] - center_X, - rt_Y = target[Y_AXIS] - center_Y; - - // CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required. - float angular_travel = atan2(r_X * rt_Y - r_Y * rt_X, r_X * rt_X + r_Y * rt_Y); - if (angular_travel < 0) angular_travel += RADIANS(360); - if (clockwise) angular_travel -= RADIANS(360); - - // Make a circle if the angular rotation is 0 - if (angular_travel == 0 && current_position[X_AXIS] == target[X_AXIS] && current_position[Y_AXIS] == target[Y_AXIS]) - angular_travel += RADIANS(360); - - float mm_of_travel = HYPOT(angular_travel * radius, fabs(linear_travel)); - if (mm_of_travel < 0.001) return; - uint16_t segments = floor(mm_of_travel / (MM_PER_ARC_SEGMENT)); - if (segments == 0) segments = 1; - - float theta_per_segment = angular_travel / segments; - float linear_per_segment = linear_travel / segments; - float extruder_per_segment = extruder_travel / segments; - - /** - * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, - * and phi is the angle of rotation. Based on the solution approach by Jens Geisler. - * r_T = [cos(phi) -sin(phi); - * sin(phi) cos(phi] * r ; - * - * For arc generation, the center of the circle is the axis of rotation and the radius vector is - * defined from the circle center to the initial position. Each line segment is formed by successive - * vector rotations. This requires only two cos() and sin() computations to form the rotation - * matrix for the duration of the entire arc. Error may accumulate from numerical round-off, since - * all double numbers are single precision on the Arduino. (True double precision will not have - * round off issues for CNC applications.) Single precision error can accumulate to be greater than - * tool precision in some cases. Therefore, arc path correction is implemented. - * - * Small angle approximation may be used to reduce computation overhead further. This approximation - * holds for everything, but very small circles and large MM_PER_ARC_SEGMENT values. In other words, - * theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large - * to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for - * numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an - * issue for CNC machines with the single precision Arduino calculations. - * - * This approximation also allows plan_arc to immediately insert a line segment into the planner - * without the initial overhead of computing cos() or sin(). By the time the arc needs to be applied - * a correction, the planner should have caught up to the lag caused by the initial plan_arc overhead. - * This is important when there are successive arc motions. - */ - // Vector rotation matrix values - float cos_T = 1 - 0.5 * sq(theta_per_segment); // Small angle approximation - float sin_T = theta_per_segment; - - float arc_target[NUM_AXIS]; - float sin_Ti, cos_Ti, r_new_Y; - uint16_t i; - int8_t count = 0; - - // Initialize the linear axis - arc_target[Z_AXIS] = current_position[Z_AXIS]; - - // Initialize the extruder axis - arc_target[E_AXIS] = current_position[E_AXIS]; - - float fr_mm_s = MMM_TO_MMS_SCALED(feedrate_mm_m); - - millis_t next_idle_ms = millis() + 200UL; - - for (i = 1; i < segments; i++) { // Iterate (segments-1) times - - thermalManager.manage_heater(); - millis_t now = millis(); - if (ELAPSED(now, next_idle_ms)) { - next_idle_ms = now + 200UL; - idle(); - } - - if (++count < N_ARC_CORRECTION) { - // Apply vector rotation matrix to previous r_X / 1 - r_new_Y = r_X * sin_T + r_Y * cos_T; - r_X = r_X * cos_T - r_Y * sin_T; - r_Y = r_new_Y; - } - else { - // Arc correction to radius vector. Computed only every N_ARC_CORRECTION increments. - // Compute exact location by applying transformation matrix from initial radius vector(=-offset). - // To reduce stuttering, the sin and cos could be computed at different times. - // For now, compute both at the same time. - cos_Ti = cos(i * theta_per_segment); - sin_Ti = sin(i * theta_per_segment); - r_X = -offset[X_AXIS] * cos_Ti + offset[Y_AXIS] * sin_Ti; - r_Y = -offset[X_AXIS] * sin_Ti - offset[Y_AXIS] * cos_Ti; - count = 0; - } - - // Update arc_target location - arc_target[X_AXIS] = center_X + r_X; - arc_target[Y_AXIS] = center_Y + r_Y; - arc_target[Z_AXIS] += linear_per_segment; - arc_target[E_AXIS] += extruder_per_segment; - - clamp_to_software_endstops(arc_target); - - #if ENABLED(DELTA) || ENABLED(SCARA) - inverse_kinematics(arc_target); - #if ENABLED(DELTA) && ENABLED(AUTO_BED_LEVELING_FEATURE) - adjust_delta(arc_target); - #endif - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder); - #else - planner.buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], fr_mm_s, active_extruder); - #endif - } - - // Ensure last segment arrives at target location. - #if ENABLED(DELTA) || ENABLED(SCARA) - inverse_kinematics(target); - #if ENABLED(DELTA) && ENABLED(AUTO_BED_LEVELING_FEATURE) - adjust_delta(target); - #endif - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], fr_mm_s, active_extruder); - #else - planner.buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], fr_mm_s, active_extruder); - #endif - - // As far as the parser is concerned, the position is now == target. In reality the - // motion control system might still be processing the action and the real tool position - // in any intermediate location. - set_current_to_destination(); - } -#endif - -#if ENABLED(BEZIER_CURVE_SUPPORT) - - void plan_cubic_move(const float offset[4]) { - cubic_b_spline(current_position, destination, offset, MMM_TO_MMS_SCALED(feedrate_mm_m), active_extruder); - - // As far as the parser is concerned, the position is now == target. In reality the - // motion control system might still be processing the action and the real tool position - // in any intermediate location. - set_current_to_destination(); - } - -#endif // BEZIER_CURVE_SUPPORT - -#if HAS_CONTROLLERFAN - - void controllerFan() { - static millis_t lastMotorOn = 0; // Last time a motor was turned on - static millis_t nextMotorCheck = 0; // Last time the state was checked - millis_t ms = millis(); - if (ELAPSED(ms, nextMotorCheck)) { - nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s - if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || thermalManager.soft_pwm_bed > 0 - || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled... - #if E_STEPPERS > 1 - || E1_ENABLE_READ == E_ENABLE_ON - #if HAS_X2_ENABLE - || X2_ENABLE_READ == X_ENABLE_ON - #endif - #if E_STEPPERS > 2 - || E2_ENABLE_READ == E_ENABLE_ON - #if E_STEPPERS > 3 - || E3_ENABLE_READ == E_ENABLE_ON - #endif - #endif - #endif - ) { - lastMotorOn = ms; //... set time to NOW so the fan will turn on - } - - // Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds - uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED; - - // allows digital or PWM fan output to be used (see M42 handling) - digitalWrite(CONTROLLERFAN_PIN, speed); - analogWrite(CONTROLLERFAN_PIN, speed); - } - } - -#endif // HAS_CONTROLLERFAN - -#if ENABLED(SCARA) - - void forward_kinematics_SCARA(float f_scara[3]) { - // Perform forward kinematics, and place results in delta[3] - // The maths and first version has been done by QHARLEY . Integrated into masterbranch 06/2014 and slightly restructured by Joachim Cerny in June 2014 - - float x_sin, x_cos, y_sin, y_cos; - - //SERIAL_ECHOPGM("f_delta x="); SERIAL_ECHO(f_scara[X_AXIS]); - //SERIAL_ECHOPGM(" y="); SERIAL_ECHO(f_scara[Y_AXIS]); - - x_sin = sin(f_scara[X_AXIS] / SCARA_RAD2DEG) * Linkage_1; - x_cos = cos(f_scara[X_AXIS] / SCARA_RAD2DEG) * Linkage_1; - y_sin = sin(f_scara[Y_AXIS] / SCARA_RAD2DEG) * Linkage_2; - y_cos = cos(f_scara[Y_AXIS] / SCARA_RAD2DEG) * Linkage_2; - - //SERIAL_ECHOPGM(" x_sin="); SERIAL_ECHO(x_sin); - //SERIAL_ECHOPGM(" x_cos="); SERIAL_ECHO(x_cos); - //SERIAL_ECHOPGM(" y_sin="); SERIAL_ECHO(y_sin); - //SERIAL_ECHOPGM(" y_cos="); SERIAL_ECHOLN(y_cos); - - delta[X_AXIS] = x_cos + y_cos + SCARA_offset_x; //theta - delta[Y_AXIS] = x_sin + y_sin + SCARA_offset_y; //theta+phi - - //SERIAL_ECHOPGM(" delta[X_AXIS]="); SERIAL_ECHO(delta[X_AXIS]); - //SERIAL_ECHOPGM(" delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]); - } - - void inverse_kinematics(const float cartesian[3]) { - // Inverse kinematics. - // Perform SCARA IK and place results in delta[3]. - // The maths and first version were done by QHARLEY. - // Integrated, tweaked by Joachim Cerny in June 2014. - - float SCARA_pos[2]; - static float SCARA_C2, SCARA_S2, SCARA_K1, SCARA_K2, SCARA_theta, SCARA_psi; - - SCARA_pos[X_AXIS] = RAW_X_POSITION(cartesian[X_AXIS]) * axis_scaling[X_AXIS] - SCARA_offset_x; //Translate SCARA to standard X Y - SCARA_pos[Y_AXIS] = RAW_Y_POSITION(cartesian[Y_AXIS]) * axis_scaling[Y_AXIS] - SCARA_offset_y; // With scaling factor. - - #if (Linkage_1 == Linkage_2) - SCARA_C2 = ((sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS])) / (2 * (float)L1_2)) - 1; - #else - SCARA_C2 = (sq(SCARA_pos[X_AXIS]) + sq(SCARA_pos[Y_AXIS]) - (float)L1_2 - (float)L2_2) / 45000; - #endif - - SCARA_S2 = sqrt(1 - sq(SCARA_C2)); - - SCARA_K1 = Linkage_1 + Linkage_2 * SCARA_C2; - SCARA_K2 = Linkage_2 * SCARA_S2; - - SCARA_theta = (atan2(SCARA_pos[X_AXIS], SCARA_pos[Y_AXIS]) - atan2(SCARA_K1, SCARA_K2)) * -1; - SCARA_psi = atan2(SCARA_S2, SCARA_C2); - - delta[X_AXIS] = SCARA_theta * SCARA_RAD2DEG; // Multiply by 180/Pi - theta is support arm angle - delta[Y_AXIS] = (SCARA_theta + SCARA_psi) * SCARA_RAD2DEG; // - equal to sub arm angle (inverted motor) - delta[Z_AXIS] = RAW_Z_POSITION(cartesian[Z_AXIS]); - - /** - SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]); - SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]); - - SERIAL_ECHOPGM("scara x="); SERIAL_ECHO(SCARA_pos[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHOLN(SCARA_pos[Y_AXIS]); - - SERIAL_ECHOPGM("delta x="); SERIAL_ECHO(delta[X_AXIS]); - SERIAL_ECHOPGM(" y="); SERIAL_ECHO(delta[Y_AXIS]); - SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(delta[Z_AXIS]); - - SERIAL_ECHOPGM("C2="); SERIAL_ECHO(SCARA_C2); - SERIAL_ECHOPGM(" S2="); SERIAL_ECHO(SCARA_S2); - SERIAL_ECHOPGM(" Theta="); SERIAL_ECHO(SCARA_theta); - SERIAL_ECHOPGM(" Psi="); SERIAL_ECHOLN(SCARA_psi); - SERIAL_EOL; - */ - } - -#endif // SCARA - -#if ENABLED(TEMP_STAT_LEDS) - - static bool red_led = false; - static millis_t next_status_led_update_ms = 0; - - void handle_status_leds(void) { - float max_temp = 0.0; - if (ELAPSED(millis(), next_status_led_update_ms)) { - next_status_led_update_ms += 500; // Update every 0.5s - HOTEND_LOOP() { - max_temp = max(max(max_temp, thermalManager.degHotend(e)), thermalManager.degTargetHotend(e)); - } - #if HAS_TEMP_BED - max_temp = max(max(max_temp, thermalManager.degTargetBed()), thermalManager.degBed()); - #endif - bool new_led = (max_temp > 55.0) ? true : (max_temp < 54.0) ? false : red_led; - if (new_led != red_led) { - red_led = new_led; - digitalWrite(STAT_LED_RED, new_led ? HIGH : LOW); - digitalWrite(STAT_LED_BLUE, new_led ? LOW : HIGH); - } - } - } - -#endif - -void enable_all_steppers() { - enable_x(); - enable_y(); - enable_z(); - enable_e0(); - enable_e1(); - enable_e2(); - enable_e3(); -} - -void disable_all_steppers() { - disable_x(); - disable_y(); - disable_z(); - disable_e0(); - disable_e1(); - disable_e2(); - disable_e3(); -} - -/** - * Standard idle routine keeps the machine alive - */ -void idle( - #if ENABLED(FILAMENT_CHANGE_FEATURE) - bool no_stepper_sleep/*=false*/ - #endif -) { - lcd_update(); - host_keepalive(); - manage_inactivity( - #if ENABLED(FILAMENT_CHANGE_FEATURE) - no_stepper_sleep - #endif - ); - - thermalManager.manage_heater(); - - #if ENABLED(PRINTCOUNTER) - print_job_timer.tick(); - #endif - - #if HAS_BUZZER && PIN_EXISTS(BEEPER) - buzzer.tick(); - #endif - - #ifdef UARM_SWIFT - swift_run(); - #endif // UARM_SWIFT -} - -/** - * Manage several activities: - * - Check for Filament Runout - * - Keep the command buffer full - * - Check for maximum inactive time between commands - * - Check for maximum inactive time between stepper commands - * - Check if pin CHDK needs to go LOW - * - Check for KILL button held down - * - Check for HOME button held down - * - Check if cooling fan needs to be switched on - * - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT) - */ -void manage_inactivity(bool ignore_stepper_queue/*=false*/) { - - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - if ((IS_SD_PRINTING || print_job_timer.isRunning()) && !(READ(FIL_RUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) - handle_filament_runout(); - #endif - - if (commands_in_queue < BUFSIZE) get_available_commands(); - - millis_t ms = millis(); - - if (max_inactive_time && ELAPSED(ms, previous_cmd_ms + max_inactive_time)) kill(PSTR(MSG_KILLED)); - - if (stepper_inactive_time && ELAPSED(ms, previous_cmd_ms + stepper_inactive_time) - && !ignore_stepper_queue && !planner.blocks_queued()) { - #if ENABLED(DISABLE_INACTIVE_X) - disable_x(); - #endif - #if ENABLED(DISABLE_INACTIVE_Y) - disable_y(); - #endif - #if ENABLED(DISABLE_INACTIVE_Z) - disable_z(); - #endif - #if ENABLED(DISABLE_INACTIVE_E) - disable_e0(); - disable_e1(); - disable_e2(); - disable_e3(); - #endif - } - - #ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH - if (chdkActive && PENDING(ms, chdkHigh + CHDK_DELAY)) { - chdkActive = false; - WRITE(CHDK, LOW); - } - #endif - - #if HAS_KILL - - // Check if the kill button was pressed and wait just in case it was an accidental - // key kill key press - // ------------------------------------------------------------------------------- - static int killCount = 0; // make the inactivity button a bit less responsive - const int KILL_DELAY = 750; - if (!READ(KILL_PIN)) - killCount++; - else if (killCount > 0) - killCount--; - - // Exceeded threshold and we can confirm that it was not accidental - // KILL the machine - // ---------------------------------------------------------------- - if (killCount >= KILL_DELAY) kill(PSTR(MSG_KILLED)); - #endif - - #if HAS_HOME - // Check to see if we have to home, use poor man's debouncer - // --------------------------------------------------------- - static int homeDebounceCount = 0; // poor man's debouncing count - const int HOME_DEBOUNCE_DELAY = 2500; - if (!READ(HOME_PIN)) { - if (!homeDebounceCount) { - enqueue_and_echo_commands_P(PSTR("G28")); - LCD_MESSAGEPGM(MSG_AUTO_HOME); - } - if (homeDebounceCount < HOME_DEBOUNCE_DELAY) - homeDebounceCount++; - else - homeDebounceCount = 0; - } - #endif - - #if HAS_CONTROLLERFAN - controllerFan(); // Check if fan should be turned on to cool stepper drivers down - #endif - - #if ENABLED(EXTRUDER_RUNOUT_PREVENT) - if (ELAPSED(ms, previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000UL) - && thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) { - #if ENABLED(SWITCHING_EXTRUDER) - bool oldstatus = E0_ENABLE_READ; - enable_e0(); - #else // !SWITCHING_EXTRUDER - bool oldstatus; - switch (active_extruder) { - case 0: - oldstatus = E0_ENABLE_READ; - enable_e0(); - break; - #if E_STEPPERS > 1 - case 1: - oldstatus = E1_ENABLE_READ; - enable_e1(); - break; - #if E_STEPPERS > 2 - case 2: - oldstatus = E2_ENABLE_READ; - enable_e2(); - break; - #if E_STEPPERS > 3 - case 3: - oldstatus = E3_ENABLE_READ; - enable_e3(); - break; - #endif - #endif - #endif - } - #endif // !SWITCHING_EXTRUDER - - float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS]; - planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], - destination[E_AXIS] + (EXTRUDER_RUNOUT_EXTRUDE) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS], - MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED) * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_mm[E_AXIS], active_extruder); - current_position[E_AXIS] = oldepos; - destination[E_AXIS] = oldedes; - planner.set_e_position_mm(oldepos); - previous_cmd_ms = ms; // refresh_cmd_timeout() - stepper.synchronize(); - #if ENABLED(SWITCHING_EXTRUDER) - E0_ENABLE_WRITE(oldstatus); - #else - switch (active_extruder) { - case 0: - E0_ENABLE_WRITE(oldstatus); - break; - #if E_STEPPERS > 1 - case 1: - E1_ENABLE_WRITE(oldstatus); - break; - #if E_STEPPERS > 2 - case 2: - E2_ENABLE_WRITE(oldstatus); - break; - #if E_STEPPERS > 3 - case 3: - E3_ENABLE_WRITE(oldstatus); - break; - #endif - #endif - #endif - } - #endif // !SWITCHING_EXTRUDER - } - #endif // EXTRUDER_RUNOUT_PREVENT - - #if ENABLED(DUAL_X_CARRIAGE) - // handle delayed move timeout - if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) { - // travel moves have been received so enact them - delayed_move_time = 0xFFFFFFFFUL; // force moves to be done - set_destination_to_current(); - prepare_move_to_destination(); - } - #endif - - #if ENABLED(TEMP_STAT_LEDS) - handle_status_leds(); - #endif - - planner.check_axes_activity(); -} - -void kill(const char* lcd_msg) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_KILLED); - - #if ENABLED(ULTRA_LCD) - kill_screen(lcd_msg); - #else - UNUSED(lcd_msg); - #endif - - for (int i = 5; i--;) delay(100); // Wait a short time - - cli(); // Stop interrupts - thermalManager.disable_all_heaters(); - disable_all_steppers(); - - #if HAS_POWER_SWITCH - pinMode(PS_ON_PIN, INPUT); - #endif - - suicide(); - while (1) { - #if ENABLED(USE_WATCHDOG) - watchdog_reset(); - #endif - } // Wait for reset -} - -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - - void handle_filament_runout() { - if (!filament_ran_out) { - filament_ran_out = true; - enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); - stepper.synchronize(); - } - } - -#endif // FILAMENT_RUNOUT_SENSOR - -#if ENABLED(FAST_PWM_FAN) - - void setPwmFrequency(uint8_t pin, int val) { - val &= 0x07; - switch (digitalPinToTimer(pin)) { - #if defined(TCCR0A) - case TIMER0A: - case TIMER0B: - // TCCR0B &= ~(_BV(CS00) | _BV(CS01) | _BV(CS02)); - // TCCR0B |= val; - break; - #endif - #if defined(TCCR1A) - case TIMER1A: - case TIMER1B: - // TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); - // TCCR1B |= val; - break; - #endif - #if defined(TCCR2) - case TIMER2: - case TIMER2: - TCCR2 &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); - TCCR2 |= val; - break; - #endif - #if defined(TCCR2A) - case TIMER2A: - case TIMER2B: - TCCR2B &= ~(_BV(CS20) | _BV(CS21) | _BV(CS22)); - TCCR2B |= val; - break; - #endif - #if defined(TCCR3A) - case TIMER3A: - case TIMER3B: - case TIMER3C: - TCCR3B &= ~(_BV(CS30) | _BV(CS31) | _BV(CS32)); - TCCR3B |= val; - break; - #endif - #if defined(TCCR4A) - case TIMER4A: - case TIMER4B: - case TIMER4C: - TCCR4B &= ~(_BV(CS40) | _BV(CS41) | _BV(CS42)); - TCCR4B |= val; - break; - #endif - #if defined(TCCR5A) - case TIMER5A: - case TIMER5B: - case TIMER5C: - TCCR5B &= ~(_BV(CS50) | _BV(CS51) | _BV(CS52)); - TCCR5B |= val; - break; - #endif - } - } -#endif // FAST_PWM_FAN - -void stop() { - thermalManager.disable_all_heaters(); - if (IsRunning()) { - Running = false; - Stopped_gcode_LastN = gcode_LastN; // Save last g_code for restart - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_ERR_STOPPED); - LCD_MESSAGEPGM(MSG_STOPPED); - } -} - -float calculate_volumetric_multiplier(float diameter) { - if (!volumetric_enabled || diameter == 0) return 1.0; - float d2 = diameter * 0.5; - return 1.0 / (M_PI * d2 * d2); -} - -void calculate_volumetric_multipliers() { - for (uint8_t i = 0; i < COUNT(filament_size); i++) - volumetric_multiplier[i] = calculate_volumetric_multiplier(filament_size[i]); -} diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h deleted file mode 100644 index bec3d46..0000000 --- a/Marlin/SanityCheck.h +++ /dev/null @@ -1,736 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * SanityCheck.h - * - * Test configuration values for errors at compile-time. - */ - -/** - * Due to the high number of issues related with old versions of Arduino IDE - * we now prevent Marlin from compiling with older toolkits. - */ -#if !defined(ARDUINO) || ARDUINO < 10600 - #error "Versions of Arduino IDE prior to 1.6.0 are no longer supported, please update your toolkit." -#endif - -/** - * We try our best to include sanity checks for all the changes configuration - * directives because people have a tendency to use outdated config files with - * the bleding edge source code, but sometimes this is not enough. This check - * will force a minimum config file revision, otherwise Marlin will not build. - */ -#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION - #error "You are using an old Configuration.h file, update it before building Marlin." -#endif - -#if ! defined(CONFIGURATION_ADV_H_VERSION) || CONFIGURATION_ADV_H_VERSION < REQUIRED_CONFIGURATION_ADV_H_VERSION - #error "You are using an old Configuration_adv.h file, update it before building Marlin." -#endif - -/** - * Marlin release, version and default string - */ -#ifndef SHORT_BUILD_VERSION - #error "SHORT_BUILD_VERSION must be specified." -#elif !defined(DETAILED_BUILD_VERSION) - #error "BUILD_VERSION must be specified." -#elif !defined(STRING_DISTRIBUTION_DATE) - #error "STRING_DISTRIBUTION_DATE must be specified." -#elif !defined(PROTOCOL_VERSION) - #error "PROTOCOL_VERSION must be specified." -#elif !defined(MACHINE_NAME) - #error "MACHINE_NAME must be specified." -#elif !defined(SOURCE_CODE_URL) - #error "SOURCE_CODE_URL must be specified." -#elif !defined(DEFAULT_MACHINE_UUID) - #error "DEFAULT_MACHINE_UUID must be specified." -#elif !defined(WEBSITE_URL) - #error "WEBSITE_URL must be specified." -#endif - -/** - * Dual Stepper Drivers - */ -#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE) - #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS." -#elif ENABLED(X_DUAL_STEPPER_DRIVERS) && (!HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR) - #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)." -#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && (!HAS_Y2_ENABLE || !HAS_Y2_STEP || !HAS_Y2_DIR) - #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)." -#elif ENABLED(Z_DUAL_STEPPER_DRIVERS) && (!HAS_Z2_ENABLE || !HAS_Z2_STEP || !HAS_Z2_DIR) - #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)." -#endif - -/** - * Progress Bar - */ -#if ENABLED(LCD_PROGRESS_BAR) - #if DISABLED(SDSUPPORT) - #error "LCD_PROGRESS_BAR requires SDSUPPORT." - #endif - #if ENABLED(DOGLCD) - #error "LCD_PROGRESS_BAR does not apply to graphical displays." - #endif - #if ENABLED(FILAMENT_LCD_DISPLAY) - #error "LCD_PROGRESS_BAR and FILAMENT_LCD_DISPLAY are not fully compatible. Comment out this line to use both." - #endif -#endif - -/** - * Babystepping - */ -#if ENABLED(BABYSTEPPING) - #if DISABLED(ULTRA_LCD) - #error "BABYSTEPPING requires an LCD controller." - #endif - #if ENABLED(SCARA) - #error "BABYSTEPPING is not implemented for SCARA yet." - #endif - #if ENABLED(DELTA) && ENABLED(BABYSTEP_XY) - #error "BABYSTEPPING only implemented for Z axis on deltabots." - #endif -#endif - -/** - * Filament Runout needs a pin and either SD Support or Auto print start detection - */ -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - #if !HAS_FIL_RUNOUT - #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN." - #elif DISABLED(SDSUPPORT) && DISABLED(PRINTJOB_TIMER_AUTOSTART) - #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART." - #endif -#endif - -/** - * Filament Change with Extruder Runout Prevention - */ -#if ENABLED(FILAMENT_CHANGE_FEATURE) && ENABLED(EXTRUDER_RUNOUT_PREVENT) - #error "EXTRUDER_RUNOUT_PREVENT is incompatible with FILAMENT_CHANGE_FEATURE." -#endif - -/** - * Individual axis homing is useless for DELTAS - */ -#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) && ENABLED(DELTA) - #error "INDIVIDUAL_AXIS_HOMING_MENU is incompatible with DELTA kinematics." -#endif - -/** - * Options only for EXTRUDERS > 1 - */ -#if EXTRUDERS > 1 - - #if EXTRUDERS > 4 - #error "The maximum number of EXTRUDERS in Marlin is 4." - #endif - - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - #error "EXTRUDERS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT." - #endif - - #if ENABLED(HEATERS_PARALLEL) - #error "EXTRUDERS must be 1 with HEATERS_PARALLEL." - #endif - -#elif ENABLED(SINGLENOZZLE) - #error "SINGLENOZZLE requires 2 or more EXTRUDERS." -#endif - -/** - * Only one type of extruder allowed - */ -#if (ENABLED(SWITCHING_EXTRUDER) && (ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER))) \ - || (ENABLED(SINGLENOZZLE) && ENABLED(MIXING_EXTRUDER)) - #error "Please define only one type of extruder: SINGLENOZZLE, SWITCHING_EXTRUDER, or MIXING_EXTRUDER." -#endif - -/** - * Single Stepper Dual Extruder with switching servo - */ -#if ENABLED(SWITCHING_EXTRUDER) - #if ENABLED(DUAL_X_CARRIAGE) - #error "SWITCHING_EXTRUDER and DUAL_X_CARRIAGE are incompatible." - #elif EXTRUDERS != 2 - #error "SWITCHING_EXTRUDER requires exactly 2 EXTRUDERS." - #elif NUM_SERVOS < 1 - #error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1." - #endif -#endif - -/** - * Mixing Extruder requirements - */ -#if ENABLED(MIXING_EXTRUDER) - #if EXTRUDERS > 1 - #error "MIXING_EXTRUDER currently only supports one extruder." - #endif - #if MIXING_STEPPERS < 2 - #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder." - #endif - #if ENABLED(FILAMENT_SENSOR) - #error "MIXING_EXTRUDER is incompatible with FILAMENT_SENSOR. Comment out this line to use it anyway." - #endif -#endif - -/** - * Limited number of servos - */ -#if defined(NUM_SERVOS) && NUM_SERVOS > 0 - #if NUM_SERVOS > 4 - #error "The maximum number of SERVOS in Marlin is 4." - #elif HAS_Z_SERVO_ENDSTOP && Z_ENDSTOP_SERVO_NR >= NUM_SERVOS - #error "Z_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS." - #endif -#endif - -/** - * Servo deactivation depends on servo endstops - */ -#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_ENDSTOP - #error "Z_ENDSTOP_SERVO_NR is required for DEACTIVATE_SERVOS_AFTER_MOVE." -#endif - -/** - * Required LCD language - */ -#if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780) - #error "You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller." -#endif - -/** - * Bed Heating Options - PID vs Limit Switching - */ -#if ENABLED(PIDTEMPBED) && ENABLED(BED_LIMIT_SWITCHING) - #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." -#endif - -/** - * Mesh Bed Leveling - */ -#if ENABLED(MESH_BED_LEVELING) - #if ENABLED(DELTA) - #error "MESH_BED_LEVELING does not yet support DELTA printers." - #elif ENABLED(AUTO_BED_LEVELING_FEATURE) - #error "Select AUTO_BED_LEVELING_FEATURE or MESH_BED_LEVELING, not both." - #elif MESH_NUM_X_POINTS > 9 || MESH_NUM_Y_POINTS > 9 - #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS must be less than 10." - #endif -#elif ENABLED(MANUAL_BED_LEVELING) - #error "MESH_BED_LEVELING is required for MANUAL_BED_LEVELING." -#endif - -/** - * Probes - */ - -#if PROBE_SELECTED - - #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA) - #error "You cannot use Z_PROBE_SLED with DELTA." - #endif - - /** - * NUM_SERVOS is required for a Z servo probe - */ - #if HAS_Z_SERVO_ENDSTOP - #ifndef NUM_SERVOS - #error "You must set NUM_SERVOS for a Z servo probe (Z_ENDSTOP_SERVO_NR)." - #elif Z_ENDSTOP_SERVO_NR >= NUM_SERVOS - #error "Z_ENDSTOP_SERVO_NR must be less than NUM_SERVOS." - #endif - #endif - - /** - * A probe needs a pin - */ - #if !PROBE_PIN_CONFIGURED - #error "A probe needs a pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN." - #endif - - /** - * Require a Z min pin - */ - #if HAS_Z_MIN - // Z_MIN_PIN and Z_MIN_PROBE_PIN can't co-exist when Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - #if HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #error "A probe cannot have more than one pin! Use Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN or Z_MIN_PROBE_PIN." - #endif - #elif !HAS_Z_MIN_PROBE_PIN || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) - // A pin was set for the Z probe, but not enabled. - #error "A probe requires a Z_MIN or Z_PROBE pin. Z_MIN_PIN or Z_MIN_PROBE_PIN must point to a valid hardware pin." - #endif - - /** - * Make sure the plug is enabled if it's used - */ - #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && DISABLED(USE_ZMIN_PLUG) - #error "You must enable USE_ZMIN_PLUG if any probe or endstop is connected to the ZMIN plug." - #endif - - /** - * Only allow one probe option to be defined - */ - #if (ENABLED(FIX_MOUNTED_PROBE) && (ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \ - || (ENABLED(Z_PROBE_ALLEN_KEY) && (HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))) \ - || (HAS_Z_SERVO_ENDSTOP && ENABLED(Z_PROBE_SLED)) - #error "Please define only one type of probe: Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." - #endif - - /** - * Don't allow nonsense probe-pin settings - */ - #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(Z_MIN_PROBE_ENDSTOP) - #error "You can't enable both Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN and Z_MIN_PROBE_ENDSTOP." - #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) - #error "Don't enable DISABLE_Z_MIN_PROBE_ENDSTOP with Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN." - #elif ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) && DISABLED(Z_MIN_PROBE_ENDSTOP) - #error "DISABLE_Z_MIN_PROBE_ENDSTOP requires Z_MIN_PROBE_ENDSTOP to be set." - #endif - - /** - * Require a Z probe pin if Z_MIN_PROBE_ENDSTOP is enabled. - */ - #if ENABLED(Z_MIN_PROBE_ENDSTOP) - #if !HAS_Z_MIN_PROBE_PIN - #error "Z_MIN_PROBE_ENDSTOP requires a Z_MIN_PROBE_PIN in your board's pins_XXXX.h file." - #endif - // Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment. - //#ifndef NUM_SERVOS - // #error "You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_MIN_PROBE_ENDSTOP." - //#endif - //#if defined(NUM_SERVOS) && NUM_SERVOS < 1 - // #error "You must have at least 1 servo defined for NUM_SERVOS to use Z_MIN_PROBE_ENDSTOP." - //#endif - //#if Z_ENDSTOP_SERVO_NR < 0 - // #error "You must have Z_ENDSTOP_SERVO_NR set to at least 0 or above to use Z_MIN_PROBE_ENDSTOP." - //#endif - //#ifndef Z_SERVO_ANGLES - // #error "You must have Z_SERVO_ANGLES defined for Z Extend and Retract to use Z_MIN_PROBE_ENDSTOP." - //#endif - #endif - - /** - * Make sure Z raise values are set - */ - #if !defined(Z_PROBE_DEPLOY_HEIGHT) - #error "You must set Z_PROBE_DEPLOY_HEIGHT in your configuration." - #elif !defined(Z_PROBE_TRAVEL_HEIGHT) - #error "You must set Z_PROBE_TRAVEL_HEIGHT in your configuration." - #elif Z_PROBE_DEPLOY_HEIGHT < 0 - #error "Probes need Z_PROBE_DEPLOY_HEIGHT >= 0." - #elif Z_PROBE_TRAVEL_HEIGHT < 0 - #error "Probes need Z_PROBE_TRAVEL_HEIGHT >= 0." - #endif - -#else - - /** - * Require some kind of probe for bed leveling and probe testing - */ - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - #error "AUTO_BED_LEVELING_FEATURE requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." - #elif ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) - #error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe! Define a Z Servo, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or FIX_MOUNTED_PROBE." - #endif - -#endif - -/** - * Make sure Z_SAFE_HOMING point is reachable - */ -#if ENABLED(Z_SAFE_HOMING) - #if Z_SAFE_HOMING_X_POINT < MIN_PROBE_X || Z_SAFE_HOMING_X_POINT > MAX_PROBE_X - #if HAS_BED_PROBE - #error "Z_SAFE_HOMING_X_POINT can't be reached by the Z probe." - #else - #error "Z_SAFE_HOMING_X_POINT can't be reached by the nozzle." - #endif - #elif Z_SAFE_HOMING_Y_POINT < MIN_PROBE_Y || Z_SAFE_HOMING_Y_POINT > MAX_PROBE_Y - #if HAS_BED_PROBE - #error "Z_SAFE_HOMING_Y_POINT can't be reached by the Z probe." - #else - #error "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle." - #endif - #endif -#endif // Z_SAFE_HOMING - -/** - * Auto Bed Leveling - */ -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - /** - * Delta has limited bed leveling options - */ - #if ENABLED(DELTA) && DISABLED(AUTO_BED_LEVELING_GRID) - #error "You must use AUTO_BED_LEVELING_GRID for DELTA bed leveling." - #endif - - /** - * Check if Probe_Offset * Grid Points is greater than Probing Range - */ - #if ENABLED(AUTO_BED_LEVELING_GRID) - #ifndef DELTA_PROBEABLE_RADIUS - // Be sure points are in the right order - #if LEFT_PROBE_BED_POSITION > RIGHT_PROBE_BED_POSITION - #error "LEFT_PROBE_BED_POSITION must be less than RIGHT_PROBE_BED_POSITION." - #elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION - #error "FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION." - #endif - // Make sure probing points are reachable - #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X - #error "The given LEFT_PROBE_BED_POSITION can't be reached by the Z probe." - #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X - #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe." - #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y - #error "The given FRONT_PROBE_BED_POSITION can't be reached by the Z probe." - #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y - #error "The given BACK_PROBE_BED_POSITION can't be reached by the Z probe." - #endif - #endif - #else // !AUTO_BED_LEVELING_GRID - - // Check the triangulation points - #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X - #error "The given ABL_PROBE_PT_1_X can't be reached by the Z probe." - #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X - #error "The given ABL_PROBE_PT_2_X can't be reached by the Z probe." - #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X - #error "The given ABL_PROBE_PT_3_X can't be reached by the Z probe." - #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y - #error "The given ABL_PROBE_PT_1_Y can't be reached by the Z probe." - #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y - #error "The given ABL_PROBE_PT_2_Y can't be reached by the Z probe." - #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y - #error "The given ABL_PROBE_PT_3_Y can't be reached by the Z probe." - #endif - - #endif // !AUTO_BED_LEVELING_GRID - -#endif // AUTO_BED_LEVELING_FEATURE - -/** - * Advance Extrusion - */ -#if ENABLED(ADVANCE) && ENABLED(LIN_ADVANCE) - #error "You can enable ADVANCE or LIN_ADVANCE, but not both." -#endif - -/** - * Filament Width Sensor - */ -#if ENABLED(FILAMENT_WIDTH_SENSOR) && !HAS_FILAMENT_WIDTH_SENSOR - #error "FILAMENT_WIDTH_SENSOR requires a FILWIDTH_PIN to be defined." -#endif - -/** - * ULTIPANEL encoder - */ -#if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK) - #error "ULTIPANEL requires some kind of encoder." -#endif - -#if ENCODER_PULSES_PER_STEP < 0 - #error "ENCODER_PULSES_PER_STEP should not be negative, use REVERSE_MENU_DIRECTION instead." -#endif - -/** - * SAV_3DGLCD display options - */ -#if ENABLED(U8GLIB_SSD1306) && ENABLED(U8GLIB_SH1106) - #error "Only enable one SAV_3DGLCD display type: U8GLIB_SSD1306 or U8GLIB_SH1106." -#endif - -/** - * Don't set more than one kinematic type - */ -#if (ENABLED(DELTA) && (ENABLED(SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \ - || (ENABLED(SCARA) && (ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \ - || (ENABLED(COREXY) && (ENABLED(COREXZ) || ENABLED(COREYZ))) \ - || (ENABLED(COREXZ) && ENABLED(COREYZ)) - #error "Please enable only one of DELTA, SCARA, COREXY, COREXZ, or COREYZ." -#endif - -/** - * Allen Key - * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis. - */ -#if ENABLED(Z_PROBE_ALLEN_KEY) && (Z_HOME_DIR < 0) && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #error "You can't home to a z min endstop with a Z_PROBE_ALLEN_KEY" -#endif - -/** - * Dual X Carriage requirements - */ -#if ENABLED(DUAL_X_CARRIAGE) - #if EXTRUDERS == 1 - #error "DUAL_X_CARRIAGE requires 2 (or more) extruders." - #elif ENABLED(COREXY) || ENABLED(COREXZ) - #error "DUAL_X_CARRIAGE cannot be used with COREXY or COREXZ." - #elif !HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR - #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined." - #elif !HAS_X_MAX - #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." - #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) - #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS." - #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1 - #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1." - #endif -#endif // DUAL_X_CARRIAGE - -/** - * Make sure auto fan pins don't conflict with the fan pin - */ -#if HAS_AUTO_FAN - #if HAS_FAN0 - #if EXTRUDER_0_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to FAN_PIN." - #elif EXTRUDER_1_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to FAN_PIN." - #elif EXTRUDER_2_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to FAN_PIN." - #elif EXTRUDER_3_AUTO_FAN_PIN == FAN_PIN - #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to FAN_PIN." - #endif - #endif -#endif - -#if HAS_FAN0 && CONTROLLERFAN_PIN == FAN_PIN - #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN." -#endif - -#if HAS_CONTROLLERFAN - #if EXTRUDER_0_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set EXTRUDER_0_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif EXTRUDER_1_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set EXTRUDER_1_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif EXTRUDER_2_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set EXTRUDER_2_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #elif EXTRUDER_3_AUTO_FAN_PIN == CONTROLLERFAN_PIN - #error "You cannot set EXTRUDER_3_AUTO_FAN_PIN equal to CONTROLLERFAN_PIN." - #endif -#endif - -/** - * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set. - */ -#if !HAS_HEATER_0 - #error "HEATER_0_PIN not defined for this board." -#elif !PIN_EXISTS(TEMP_0) - #error "TEMP_0_PIN not defined for this board." -#elif !PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE) - #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." -#elif TEMP_SENSOR_0 == 0 - #error "TEMP_SENSOR_0 is required." -#endif - -#if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL) - #if !HAS_HEATER_1 - #error "HEATER_1_PIN not defined for this board." - #endif -#endif - -#if HOTENDS > 1 - #if TEMP_SENSOR_1 == 0 - #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." - #elif !PIN_EXISTS(TEMP_1) - #error "TEMP_1_PIN not defined for this board." - #endif - #if HOTENDS > 2 - #if TEMP_SENSOR_2 == 0 - #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS." - #elif !HAS_HEATER_2 - #error "HEATER_2_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_2) - #error "TEMP_2_PIN not defined for this board." - #endif - #if HOTENDS > 3 - #if TEMP_SENSOR_3 == 0 - #error "TEMP_SENSOR_3 is required with 4 HOTENDS." - #elif !HAS_HEATER_3 - #error "HEATER_3_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_3) - #error "TEMP_3_PIN not defined for this board." - #endif - #elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders." - #endif - #elif TEMP_SENSOR_2 != 0 - #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders." - #elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders." - #endif -#elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT) - #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder." -#elif TEMP_SENSOR_2 != 0 - #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder." -#elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder." -#endif - -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0 - #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT." -#endif - -/** - * Basic 2-nozzle duplication mode - */ -#if ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - #if HOTENDS != 2 - #error "DUAL_NOZZLE_DUPLICATION_MODE requires exactly 2 hotends." - #elif ENABLED(DUAL_X_CARRIAGE) - #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with DUAL_X_CARRIAGE." - #elif ENABLED(SINGLENOZZLE) - #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SINGLENOZZLE." - #elif ENABLED(MIXING_EXTRUDER) - #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with MIXING_EXTRUDER." - #elif ENABLED(SWITCHING_EXTRUDER) - #error "DUAL_NOZZLE_DUPLICATION_MODE is incompatible with SWITCHING_EXTRUDER." - #endif -#endif - -/** - * Test Extruder Pins - */ -#if EXTRUDERS > 3 - #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE) - #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board." - #endif -#elif EXTRUDERS > 2 - #if !PIN_EXISTS(E2_STEP) || !PIN_EXISTS(E2_DIR) || !PIN_EXISTS(E2_ENABLE) - #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board." - #endif -#elif EXTRUDERS > 1 - #if !PIN_EXISTS(E1_STEP) || !PIN_EXISTS(E1_DIR) || !PIN_EXISTS(E1_ENABLE) - #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board." - #endif -#endif - -/** - * Endstops - */ -#if DISABLED(USE_XMIN_PLUG) && DISABLED(USE_XMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _XMAX_ && Z2_USE_ENDSTOP <= _XMIN_) - #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG" -#elif DISABLED(USE_YMIN_PLUG) && DISABLED(USE_YMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _YMAX_ && Z2_USE_ENDSTOP <= _YMIN_) - #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG" -#elif DISABLED(USE_ZMIN_PLUG) && DISABLED(USE_ZMAX_PLUG) && !(ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP >= _ZMAX_ && Z2_USE_ENDSTOP <= _ZMIN_) - #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG" -#elif ENABLED(Z_DUAL_ENDSTOPS) && !Z2_USE_ENDSTOP - #error "You must set Z2_USE_ENDSTOP with Z_DUAL_ENDSTOPS" -#endif - -/** - * emergency-command parser - */ -#if ENABLED(EMERGENCY_PARSER) && ENABLED(USBCON) - #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)." -#endif - - /** - * Warnings for old configurations - */ -#if WATCH_TEMP_PERIOD > 500 - #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds." -#elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) - #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS." -#elif DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) - #error "Thermal Runaway Protection for the bed is now enabled with THERMAL_PROTECTION_BED." -#elif ENABLED(COREXZ) && ENABLED(Z_LATE_ENABLE) - #error "Z_LATE_ENABLE can't be used with COREXZ." -#elif defined(X_HOME_RETRACT_MM) - #error "[XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM." -#elif defined(BEEPER) - #error "BEEPER is now BEEPER_PIN. Please update your pins definitions." -#elif defined(SDCARDDETECT) - #error "SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions." -#elif defined(SDCARDDETECTINVERTED) - #error "SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration." -#elif defined(BTENABLED) - #error "BTENABLED is now BLUETOOTH. Please update your configuration." -#elif defined(CUSTOM_MENDEL_NAME) - #error "CUSTOM_MENDEL_NAME is now CUSTOM_MACHINE_NAME. Please update your configuration." -#elif defined(HAS_AUTOMATIC_VERSIONING) - #error "HAS_AUTOMATIC_VERSIONING is now USE_AUTOMATIC_VERSIONING. Please update your configuration." -#elif defined(ENABLE_AUTO_BED_LEVELING) - #error "ENABLE_AUTO_BED_LEVELING is now AUTO_BED_LEVELING_FEATURE. Please update your configuration." -#elif defined(SDSLOW) - #error "SDSLOW deprecated. Set SPI_SPEED to SPI_HALF_SPEED instead." -#elif defined(SDEXTRASLOW) - #error "SDEXTRASLOW deprecated. Set SPI_SPEED to SPI_QUARTER_SPEED instead." -#elif defined(FILAMENT_SENSOR) - #error "FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead." -#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS) - #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead." -#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP) - #error "Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2" -#elif defined(LANGUAGE_INCLUDE) - #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration." -#elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y) - #error "EXTRUDER_OFFSET_[XY] is deprecated. Use HOTEND_OFFSET_[XY] instead." -#elif defined(PID_PARAMS_PER_EXTRUDER) - #error "PID_PARAMS_PER_EXTRUDER is deprecated. Use PID_PARAMS_PER_HOTEND instead." -#elif defined(EXTRUDER_WATTS) || defined(BED_WATTS) - #error "EXTRUDER_WATTS and BED_WATTS are deprecated. Remove them from your configuration." -#elif defined(SERVO_ENDSTOP_ANGLES) - #error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead." -#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR) - #error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed." -#elif defined(XY_TRAVEL_SPEED) - #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead." -#elif defined(PROBE_SERVO_DEACTIVATION_DELAY) - #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead." -#elif defined(SERVO_DEACTIVATION_DELAY) - #error "SERVO_DEACTIVATION_DELAY is deprecated. Use SERVO_DELAY instead." -#elif ENABLED(FILAMENTCHANGEENABLE) - #error "FILAMENTCHANGEENABLE is now FILAMENT_CHANGE_FEATURE. Please update your configuration." -#elif defined(PLA_PREHEAT_HOTEND_TEMP) - #error "PLA_PREHEAT_HOTEND_TEMP is now PREHEAT_1_TEMP_HOTEND. Please update your configuration." -#elif defined(PLA_PREHEAT_HPB_TEMP) - #error "PLA_PREHEAT_HPB_TEMP is now PREHEAT_1_TEMP_BED. Please update your configuration." -#elif defined(PLA_PREHEAT_FAN_SPEED) - #error "PLA_PREHEAT_FAN_SPEED is now PREHEAT_1_FAN_SPEED. Please update your configuration." -#elif defined(ABS_PREHEAT_HOTEND_TEMP) - #error "ABS_PREHEAT_HOTEND_TEMP is now PREHEAT_2_TEMP_HOTEND. Please update your configuration." -#elif defined(ABS_PREHEAT_HPB_TEMP) - #error "ABS_PREHEAT_HPB_TEMP is now PREHEAT_2_TEMP_BED. Please update your configuration." -#elif defined(ABS_PREHEAT_FAN_SPEED) - #error "ABS_PREHEAT_FAN_SPEED is now PREHEAT_2_FAN_SPEED. Please update your configuration." -#elif defined(ENDSTOPS_ONLY_FOR_HOMING) - #error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead." -#elif defined(HOMING_FEEDRATE) - #error "HOMING_FEEDRATE is deprecated. Set individual rates with HOMING_FEEDRATE_(XY|Z|E) instead." -#elif defined(MANUAL_HOME_POSITIONS) - #error "MANUAL_HOME_POSITIONS is deprecated. Set MANUAL_[XYZ]_HOME_POS as-needed instead." -#elif defined(PID_ADD_EXTRUSION_RATE) - #error "PID_ADD_EXTRUSION_RATE is now PID_EXTRUSION_SCALING and is DISABLED by default. Are you sure you want to use this option? Please update your configuration." -#elif defined(Z_RAISE_BEFORE_HOMING) - #error "Z_RAISE_BEFORE_HOMING is now Z_HOMING_HEIGHT. Please update your configuration." -#elif defined(MIN_Z_HEIGHT_FOR_HOMING) - #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration." -#elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING) - #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_PROBE_DEPLOY_HEIGHT instead." -#elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS) - #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT Please update your configuration." -#endif diff --git a/Marlin/Sd2Card.cpp b/Marlin/Sd2Card.cpp deleted file mode 100644 index 190e4ad..0000000 --- a/Marlin/Sd2Card.cpp +++ /dev/null @@ -1,719 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" - -#if ENABLED(SDSUPPORT) -#include "Sd2Card.h" - -//------------------------------------------------------------------------------ -#if DISABLED(SOFTWARE_SPI) - // functions for hardware SPI - //------------------------------------------------------------------------------ - // make sure SPCR rate is in expected bits - #if (SPR0 != 0 || SPR1 != 1) - #error "unexpected SPCR bits" - #endif - /** - * Initialize hardware SPI - * Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6] - */ - static void spiInit(uint8_t spiRate) { - // See avr processor documentation - SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1); - SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X); - } - //------------------------------------------------------------------------------ - /** SPI receive a byte */ - static uint8_t spiRec() { - SPDR = 0XFF; - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - return SPDR; - } - //------------------------------------------------------------------------------ - /** SPI read data - only one call so force inline */ - static inline __attribute__((always_inline)) - void spiRead(uint8_t* buf, uint16_t nbyte) { - if (nbyte-- == 0) return; - SPDR = 0XFF; - for (uint16_t i = 0; i < nbyte; i++) { - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - buf[i] = SPDR; - SPDR = 0XFF; - } - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - buf[nbyte] = SPDR; - } - //------------------------------------------------------------------------------ - /** SPI send a byte */ - static void spiSend(uint8_t b) { - SPDR = b; - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - } - //------------------------------------------------------------------------------ - /** SPI send block - only one call so force inline */ - static inline __attribute__((always_inline)) - void spiSendBlock(uint8_t token, const uint8_t* buf) { - SPDR = token; - for (uint16_t i = 0; i < 512; i += 2) { - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - SPDR = buf[i]; - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - SPDR = buf[i + 1]; - } - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } - } - //------------------------------------------------------------------------------ -#else // SOFTWARE_SPI - //------------------------------------------------------------------------------ - /** nop to tune soft SPI timing */ - #define nop asm volatile ("nop\n\t") - //------------------------------------------------------------------------------ - /** Soft SPI receive byte */ - static uint8_t spiRec() { - uint8_t data = 0; - // no interrupts during byte receive - about 8 us - cli(); - // output pin high - like sending 0XFF - WRITE(SPI_MOSI_PIN, HIGH); - - for (uint8_t i = 0; i < 8; i++) { - WRITE(SPI_SCK_PIN, HIGH); - - // adjust so SCK is nice - nop; - nop; - - data <<= 1; - - if (READ(SPI_MISO_PIN)) data |= 1; - - WRITE(SPI_SCK_PIN, LOW); - } - // enable interrupts - sei(); - return data; - } - //------------------------------------------------------------------------------ - /** Soft SPI read data */ - static void spiRead(uint8_t* buf, uint16_t nbyte) { - for (uint16_t i = 0; i < nbyte; i++) - buf[i] = spiRec(); - } - //------------------------------------------------------------------------------ - /** Soft SPI send byte */ - static void spiSend(uint8_t data) { - // no interrupts during byte send - about 8 us - cli(); - for (uint8_t i = 0; i < 8; i++) { - WRITE(SPI_SCK_PIN, LOW); - - WRITE(SPI_MOSI_PIN, data & 0X80); - - data <<= 1; - - WRITE(SPI_SCK_PIN, HIGH); - } - // hold SCK high for a few ns - nop; - nop; - nop; - nop; - - WRITE(SPI_SCK_PIN, LOW); - // enable interrupts - sei(); - } - //------------------------------------------------------------------------------ - /** Soft SPI send block */ - void spiSendBlock(uint8_t token, const uint8_t* buf) { - spiSend(token); - for (uint16_t i = 0; i < 512; i++) - spiSend(buf[i]); - } -#endif // SOFTWARE_SPI -//------------------------------------------------------------------------------ -// send command and return error code. Return zero for OK -uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) { - // select card - chipSelectLow(); - - // wait up to 300 ms if busy - waitNotBusy(300); - - // send command - spiSend(cmd | 0x40); - - // send argument - for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s); - - // send CRC - uint8_t crc = 0XFF; - if (cmd == CMD0) crc = 0X95; // correct crc for CMD0 with arg 0 - if (cmd == CMD8) crc = 0X87; // correct crc for CMD8 with arg 0X1AA - spiSend(crc); - - // skip stuff byte for stop read - if (cmd == CMD12) spiRec(); - - // wait for response - for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++) { /* Intentionally left empty */ } - return status_; -} -//------------------------------------------------------------------------------ -/** - * Determine the size of an SD flash memory card. - * - * \return The number of 512 byte data blocks in the card - * or zero if an error occurs. - */ -uint32_t Sd2Card::cardSize() { - csd_t csd; - if (!readCSD(&csd)) return 0; - if (csd.v1.csd_ver == 0) { - uint8_t read_bl_len = csd.v1.read_bl_len; - uint16_t c_size = (csd.v1.c_size_high << 10) - | (csd.v1.c_size_mid << 2) | csd.v1.c_size_low; - uint8_t c_size_mult = (csd.v1.c_size_mult_high << 1) - | csd.v1.c_size_mult_low; - return (uint32_t)(c_size + 1) << (c_size_mult + read_bl_len - 7); - } - else if (csd.v2.csd_ver == 1) { - uint32_t c_size = ((uint32_t)csd.v2.c_size_high << 16) - | (csd.v2.c_size_mid << 8) | csd.v2.c_size_low; - return (c_size + 1) << 10; - } - else { - error(SD_CARD_ERROR_BAD_CSD); - return 0; - } -} -//------------------------------------------------------------------------------ -void Sd2Card::chipSelectHigh() { - digitalWrite(chipSelectPin_, HIGH); -} -//------------------------------------------------------------------------------ -void Sd2Card::chipSelectLow() { - #if DISABLED(SOFTWARE_SPI) - spiInit(spiRate_); - #endif // SOFTWARE_SPI - digitalWrite(chipSelectPin_, LOW); -} -//------------------------------------------------------------------------------ -/** Erase a range of blocks. - * - * \param[in] firstBlock The address of the first block in the range. - * \param[in] lastBlock The address of the last block in the range. - * - * \note This function requests the SD card to do a flash erase for a - * range of blocks. The data on the card after an erase operation is - * either 0 or 1, depends on the card vendor. The card must support - * single block erase. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) { - csd_t csd; - if (!readCSD(&csd)) goto fail; - // check for single block erase - if (!csd.v1.erase_blk_en) { - // erase size mask - uint8_t m = (csd.v1.sector_size_high << 1) | csd.v1.sector_size_low; - if ((firstBlock & m) != 0 || ((lastBlock + 1) & m) != 0) { - // error card can't erase specified area - error(SD_CARD_ERROR_ERASE_SINGLE_BLOCK); - goto fail; - } - } - if (type_ != SD_CARD_TYPE_SDHC) { - firstBlock <<= 9; - lastBlock <<= 9; - } - if (cardCommand(CMD32, firstBlock) - || cardCommand(CMD33, lastBlock) - || cardCommand(CMD38, 0)) { - error(SD_CARD_ERROR_ERASE); - goto fail; - } - if (!waitNotBusy(SD_ERASE_TIMEOUT)) { - error(SD_CARD_ERROR_ERASE_TIMEOUT); - goto fail; - } - chipSelectHigh(); - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** Determine if card supports single block erase. - * - * \return The value one, true, is returned if single block erase is supported. - * The value zero, false, is returned if single block erase is not supported. - */ -bool Sd2Card::eraseSingleBlockEnable() { - csd_t csd; - return readCSD(&csd) ? csd.v1.erase_blk_en : false; -} -//------------------------------------------------------------------------------ -/** - * Initialize an SD flash memory card. - * - * \param[in] sckRateID SPI clock rate selector. See setSckRate(). - * \param[in] chipSelectPin SD chip select pin number. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. The reason for failure - * can be determined by calling errorCode() and errorData(). - */ -bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) { - errorCode_ = type_ = 0; - chipSelectPin_ = chipSelectPin; - // 16-bit init start time allows over a minute - uint16_t t0 = (uint16_t)millis(); - uint32_t arg; - - // set pin modes - pinMode(chipSelectPin_, OUTPUT); - chipSelectHigh(); - pinMode(SPI_MISO_PIN, INPUT); - pinMode(SPI_MOSI_PIN, OUTPUT); - pinMode(SPI_SCK_PIN, OUTPUT); - - #if DISABLED(SOFTWARE_SPI) - // SS must be in output mode even it is not chip select - pinMode(SS_PIN, OUTPUT); - // set SS high - may be chip select for another SPI device - #if SET_SPI_SS_HIGH - digitalWrite(SS_PIN, HIGH); - #endif // SET_SPI_SS_HIGH - // set SCK rate for initialization commands - spiRate_ = SPI_SD_INIT_RATE; - spiInit(spiRate_); - #endif // SOFTWARE_SPI - - // must supply min of 74 clock cycles with CS high. - for (uint8_t i = 0; i < 10; i++) spiSend(0XFF); - - // command to go idle in SPI mode - while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) { - if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { - error(SD_CARD_ERROR_CMD0); - goto fail; - } - } - // check SD version - if ((cardCommand(CMD8, 0x1AA) & R1_ILLEGAL_COMMAND)) { - type(SD_CARD_TYPE_SD1); - } - else { - // only need last byte of r7 response - for (uint8_t i = 0; i < 4; i++) status_ = spiRec(); - if (status_ != 0XAA) { - error(SD_CARD_ERROR_CMD8); - goto fail; - } - type(SD_CARD_TYPE_SD2); - } - // initialize card and send host supports SDHC if SD2 - arg = type() == SD_CARD_TYPE_SD2 ? 0X40000000 : 0; - - while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) { - // check for timeout - if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) { - error(SD_CARD_ERROR_ACMD41); - goto fail; - } - } - // if SD2 read OCR register to check for SDHC card - if (type() == SD_CARD_TYPE_SD2) { - if (cardCommand(CMD58, 0)) { - error(SD_CARD_ERROR_CMD58); - goto fail; - } - if ((spiRec() & 0XC0) == 0XC0) type(SD_CARD_TYPE_SDHC); - // discard rest of ocr - contains allowed voltage range - for (uint8_t i = 0; i < 3; i++) spiRec(); - } - chipSelectHigh(); - - #if DISABLED(SOFTWARE_SPI) - return setSckRate(sckRateID); - #else // SOFTWARE_SPI - UNUSED(sckRateID); - return true; - #endif // SOFTWARE_SPI - -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** - * Read a 512 byte block from an SD card. - * - * \param[in] blockNumber Logical block to be read. - * \param[out] dst Pointer to the location that will receive the data. - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) { - // use address if not SDHC card - if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; - - #if ENABLED(SD_CHECK_AND_RETRY) - uint8_t retryCnt = 3; - do { - if (!cardCommand(CMD17, blockNumber)) { - if (readData(dst, 512)) return true; - } - else - error(SD_CARD_ERROR_CMD17); - - if (--retryCnt) break; - - chipSelectHigh(); - cardCommand(CMD12, 0); // Try sending a stop command, ignore the result. - errorCode_ = 0; - } while (true); - #else - if (cardCommand(CMD17, blockNumber)) - error(SD_CARD_ERROR_CMD17); - else - return readData(dst, 512); - #endif - - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** Read one data block in a multiple block read sequence - * - * \param[in] dst Pointer to the location for the data to be read. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::readData(uint8_t* dst) { - chipSelectLow(); - return readData(dst, 512); -} - -#if ENABLED(SD_CHECK_AND_RETRY) -static const uint16_t crctab[] PROGMEM = { - 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, - 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, - 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, - 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, - 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, - 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, - 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, - 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, - 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, - 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, - 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, - 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, - 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, - 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, - 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, - 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, - 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, - 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, - 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, - 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, - 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, - 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, - 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, - 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, - 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, - 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, - 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, - 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, - 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, - 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, - 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, - 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 -}; -static uint16_t CRC_CCITT(const uint8_t* data, size_t n) { - uint16_t crc = 0; - for (size_t i = 0; i < n; i++) { - crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0XFF]) ^ (crc << 8); - } - return crc; -} -#endif - -//------------------------------------------------------------------------------ -bool Sd2Card::readData(uint8_t* dst, uint16_t count) { - // wait for start block token - uint16_t t0 = millis(); - while ((status_ = spiRec()) == 0XFF) { - if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) { - error(SD_CARD_ERROR_READ_TIMEOUT); - goto fail; - } - } - if (status_ != DATA_START_BLOCK) { - error(SD_CARD_ERROR_READ); - goto fail; - } - // transfer data - spiRead(dst, count); - -#if ENABLED(SD_CHECK_AND_RETRY) - { - uint16_t calcCrc = CRC_CCITT(dst, count); - uint16_t recvCrc = spiRec() << 8; - recvCrc |= spiRec(); - if (calcCrc != recvCrc) { - error(SD_CARD_ERROR_CRC); - goto fail; - } - } -#else - // discard CRC - spiRec(); - spiRec(); -#endif - chipSelectHigh(); - // Send an additional dummy byte, required by Toshiba Flash Air SD Card - spiSend(0XFF); - return true; -fail: - chipSelectHigh(); - // Send an additional dummy byte, required by Toshiba Flash Air SD Card - spiSend(0XFF); - return false; -} -//------------------------------------------------------------------------------ -/** read CID or CSR register */ -bool Sd2Card::readRegister(uint8_t cmd, void* buf) { - uint8_t* dst = reinterpret_cast(buf); - if (cardCommand(cmd, 0)) { - error(SD_CARD_ERROR_READ_REG); - goto fail; - } - return readData(dst, 16); -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** Start a read multiple blocks sequence. - * - * \param[in] blockNumber Address of first block in sequence. - * - * \note This function is used with readData() and readStop() for optimized - * multiple block reads. SPI chipSelect must be low for the entire sequence. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::readStart(uint32_t blockNumber) { - if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; - if (cardCommand(CMD18, blockNumber)) { - error(SD_CARD_ERROR_CMD18); - goto fail; - } - chipSelectHigh(); - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** End a read multiple blocks sequence. - * -* \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::readStop() { - chipSelectLow(); - if (cardCommand(CMD12, 0)) { - error(SD_CARD_ERROR_CMD12); - goto fail; - } - chipSelectHigh(); - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** - * Set the SPI clock rate. - * - * \param[in] sckRateID A value in the range [0, 6]. - * - * The SPI clock will be set to F_CPU/pow(2, 1 + sckRateID). The maximum - * SPI rate is F_CPU/2 for \a sckRateID = 0 and the minimum rate is F_CPU/128 - * for \a scsRateID = 6. - * - * \return The value one, true, is returned for success and the value zero, - * false, is returned for an invalid value of \a sckRateID. - */ -bool Sd2Card::setSckRate(uint8_t sckRateID) { - if (sckRateID > 6) { - error(SD_CARD_ERROR_SCK_RATE); - return false; - } - spiRate_ = sckRateID; - return true; -} -//------------------------------------------------------------------------------ -// wait for card to go not busy -bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) { - uint16_t t0 = millis(); - while (spiRec() != 0XFF) { - if (((uint16_t)millis() - t0) >= timeoutMillis) goto fail; - } - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** - * Writes a 512 byte block to an SD card. - * - * \param[in] blockNumber Logical block to be written. - * \param[in] src Pointer to the location of the data to be written. - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { - // use address if not SDHC card - if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; - if (cardCommand(CMD24, blockNumber)) { - error(SD_CARD_ERROR_CMD24); - goto fail; - } - if (!writeData(DATA_START_BLOCK, src)) goto fail; - - // wait for flash programming to complete - if (!waitNotBusy(SD_WRITE_TIMEOUT)) { - error(SD_CARD_ERROR_WRITE_TIMEOUT); - goto fail; - } - // response is r2 so get and check two bytes for nonzero - if (cardCommand(CMD13, 0) || spiRec()) { - error(SD_CARD_ERROR_WRITE_PROGRAMMING); - goto fail; - } - chipSelectHigh(); - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** Write one data block in a multiple block write sequence - * \param[in] src Pointer to the location of the data to be written. - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::writeData(const uint8_t* src) { - chipSelectLow(); - // wait for previous write to finish - if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; - if (!writeData(WRITE_MULTIPLE_TOKEN, src)) goto fail; - chipSelectHigh(); - return true; -fail: - error(SD_CARD_ERROR_WRITE_MULTIPLE); - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -// send one block of data for write block or write multiple blocks -bool Sd2Card::writeData(uint8_t token, const uint8_t* src) { - spiSendBlock(token, src); - - spiSend(0xff); // dummy crc - spiSend(0xff); // dummy crc - - status_ = spiRec(); - if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) { - error(SD_CARD_ERROR_WRITE); - goto fail; - } - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** Start a write multiple blocks sequence. - * - * \param[in] blockNumber Address of first block in sequence. - * \param[in] eraseCount The number of blocks to be pre-erased. - * - * \note This function is used with writeData() and writeStop() - * for optimized multiple block writes. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) { - // send pre-erase count - if (cardAcmd(ACMD23, eraseCount)) { - error(SD_CARD_ERROR_ACMD23); - goto fail; - } - // use address if not SDHC card - if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; - if (cardCommand(CMD25, blockNumber)) { - error(SD_CARD_ERROR_CMD25); - goto fail; - } - chipSelectHigh(); - return true; -fail: - chipSelectHigh(); - return false; -} -//------------------------------------------------------------------------------ -/** End a write multiple blocks sequence. - * -* \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool Sd2Card::writeStop() { - chipSelectLow(); - if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; - spiSend(STOP_TRAN_TOKEN); - if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto fail; - chipSelectHigh(); - return true; -fail: - error(SD_CARD_ERROR_STOP_TRAN); - chipSelectHigh(); - return false; -} - -#endif diff --git a/Marlin/Sd2Card.h b/Marlin/Sd2Card.h deleted file mode 100644 index b1f442c..0000000 --- a/Marlin/Sd2Card.h +++ /dev/null @@ -1,251 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ - -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef Sd2Card_h -#define Sd2Card_h -/** - * \file - * \brief Sd2Card class for V2 SD/SDHC cards - */ -#include "SdFatConfig.h" -#include "SdInfo.h" -//------------------------------------------------------------------------------ -// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6 -/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */ -uint8_t const SPI_FULL_SPEED = 0; -/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */ -uint8_t const SPI_HALF_SPEED = 1; -/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */ -uint8_t const SPI_QUARTER_SPEED = 2; -/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */ -uint8_t const SPI_EIGHTH_SPEED = 3; -/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */ -uint8_t const SPI_SIXTEENTH_SPEED = 4; -//------------------------------------------------------------------------------ -/** init timeout ms */ -uint16_t const SD_INIT_TIMEOUT = 2000; -/** erase timeout ms */ -uint16_t const SD_ERASE_TIMEOUT = 10000; -/** read timeout ms */ -uint16_t const SD_READ_TIMEOUT = 300; -/** write time out ms */ -uint16_t const SD_WRITE_TIMEOUT = 600; -//------------------------------------------------------------------------------ -// SD card errors -/** timeout error for command CMD0 (initialize card in SPI mode) */ -uint8_t const SD_CARD_ERROR_CMD0 = 0X1; -/** CMD8 was not accepted - not a valid SD card*/ -uint8_t const SD_CARD_ERROR_CMD8 = 0X2; -/** card returned an error response for CMD12 (write stop) */ -uint8_t const SD_CARD_ERROR_CMD12 = 0X3; -/** card returned an error response for CMD17 (read block) */ -uint8_t const SD_CARD_ERROR_CMD17 = 0X4; -/** card returned an error response for CMD18 (read multiple block) */ -uint8_t const SD_CARD_ERROR_CMD18 = 0X5; -/** card returned an error response for CMD24 (write block) */ -uint8_t const SD_CARD_ERROR_CMD24 = 0X6; -/** WRITE_MULTIPLE_BLOCKS command failed */ -uint8_t const SD_CARD_ERROR_CMD25 = 0X7; -/** card returned an error response for CMD58 (read OCR) */ -uint8_t const SD_CARD_ERROR_CMD58 = 0X8; -/** SET_WR_BLK_ERASE_COUNT failed */ -uint8_t const SD_CARD_ERROR_ACMD23 = 0X9; -/** ACMD41 initialization process timeout */ -uint8_t const SD_CARD_ERROR_ACMD41 = 0XA; -/** card returned a bad CSR version field */ -uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB; -/** erase block group command failed */ -uint8_t const SD_CARD_ERROR_ERASE = 0XC; -/** card not capable of single block erase */ -uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD; -/** Erase sequence timed out */ -uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE; -/** card returned an error token instead of read data */ -uint8_t const SD_CARD_ERROR_READ = 0XF; -/** read CID or CSD failed */ -uint8_t const SD_CARD_ERROR_READ_REG = 0X10; -/** timeout while waiting for start of read data */ -uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0X11; -/** card did not accept STOP_TRAN_TOKEN */ -uint8_t const SD_CARD_ERROR_STOP_TRAN = 0X12; -/** card returned an error token as a response to a write operation */ -uint8_t const SD_CARD_ERROR_WRITE = 0X13; -/** attempt to write protected block zero */ -uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0X14; // REMOVE - not used -/** card did not go ready for a multiple block write */ -uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0X15; -/** card returned an error to a CMD13 status check after a write */ -uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0X16; -/** timeout occurred during write programming */ -uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0X17; -/** incorrect rate selected */ -uint8_t const SD_CARD_ERROR_SCK_RATE = 0X18; -/** init() not called */ -uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0X19; -/** crc check error */ -uint8_t const SD_CARD_ERROR_CRC = 0X20; -//------------------------------------------------------------------------------ -// card types -/** Standard capacity V1 SD card */ -uint8_t const SD_CARD_TYPE_SD1 = 1; -/** Standard capacity V2 SD card */ -uint8_t const SD_CARD_TYPE_SD2 = 2; -/** High Capacity SD card */ -uint8_t const SD_CARD_TYPE_SDHC = 3; -/** - * define SOFTWARE_SPI to use bit-bang SPI - */ -//------------------------------------------------------------------------------ -#if MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)||defined(__AVR_ATmega2560__)) - #define SOFTWARE_SPI -#elif USE_SOFTWARE_SPI - #define SOFTWARE_SPI -#endif // MEGA_SOFT_SPI -//------------------------------------------------------------------------------ -// SPI pin definitions - do not edit here - change in SdFatConfig.h -// -#if DISABLED(SOFTWARE_SPI) - // hardware pin defs - /** The default chip select pin for the SD card is SS. */ - #define SD_CHIP_SELECT_PIN SS_PIN - // The following three pins must not be redefined for hardware SPI. - /** SPI Master Out Slave In pin */ - #define SPI_MOSI_PIN MOSI_PIN - /** SPI Master In Slave Out pin */ - #define SPI_MISO_PIN MISO_PIN - /** SPI Clock pin */ - #define SPI_SCK_PIN SCK_PIN - -#else // SOFTWARE_SPI - - /** SPI chip select pin */ - #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN - /** SPI Master Out Slave In pin */ - #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN - /** SPI Master In Slave Out pin */ - #define SPI_MISO_PIN SOFT_SPI_MISO_PIN - /** SPI Clock pin */ - #define SPI_SCK_PIN SOFT_SPI_SCK_PIN -#endif // SOFTWARE_SPI -//------------------------------------------------------------------------------ -/** - * \class Sd2Card - * \brief Raw access to SD and SDHC flash memory cards. - */ -class Sd2Card { - public: - /** Construct an instance of Sd2Card. */ - Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {} - uint32_t cardSize(); - bool erase(uint32_t firstBlock, uint32_t lastBlock); - bool eraseSingleBlockEnable(); - /** - * Set SD error code. - * \param[in] code value for error code. - */ - void error(uint8_t code) {errorCode_ = code;} - /** - * \return error code for last error. See Sd2Card.h for a list of error codes. - */ - int errorCode() const {return errorCode_;} - /** \return error data for last error. */ - int errorData() const {return status_;} - /** - * Initialize an SD flash memory card with default clock rate and chip - * select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin). - * - * \return true for success or false for failure. - */ - bool init(uint8_t sckRateID = SPI_FULL_SPEED, - uint8_t chipSelectPin = SD_CHIP_SELECT_PIN); - bool readBlock(uint32_t block, uint8_t* dst); - /** - * Read a card's CID register. The CID contains card identification - * information such as Manufacturer ID, Product name, Product serial - * number and Manufacturing date. - * - * \param[out] cid pointer to area for returned data. - * - * \return true for success or false for failure. - */ - bool readCID(cid_t* cid) { - return readRegister(CMD10, cid); - } - /** - * Read a card's CSD register. The CSD contains Card-Specific Data that - * provides information regarding access to the card's contents. - * - * \param[out] csd pointer to area for returned data. - * - * \return true for success or false for failure. - */ - bool readCSD(csd_t* csd) { - return readRegister(CMD9, csd); - } - bool readData(uint8_t* dst); - bool readStart(uint32_t blockNumber); - bool readStop(); - bool setSckRate(uint8_t sckRateID); - /** Return the card type: SD V1, SD V2 or SDHC - * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC. - */ - int type() const {return type_;} - bool writeBlock(uint32_t blockNumber, const uint8_t* src); - bool writeData(const uint8_t* src); - bool writeStart(uint32_t blockNumber, uint32_t eraseCount); - bool writeStop(); - private: - //---------------------------------------------------------------------------- - uint8_t chipSelectPin_; - uint8_t errorCode_; - uint8_t spiRate_; - uint8_t status_; - uint8_t type_; - // private functions - uint8_t cardAcmd(uint8_t cmd, uint32_t arg) { - cardCommand(CMD55, 0); - return cardCommand(cmd, arg); - } - uint8_t cardCommand(uint8_t cmd, uint32_t arg); - - bool readData(uint8_t* dst, uint16_t count); - bool readRegister(uint8_t cmd, void* buf); - void chipSelectHigh(); - void chipSelectLow(); - void type(uint8_t value) {type_ = value;} - bool waitNotBusy(uint16_t timeoutMillis); - bool writeData(uint8_t token, const uint8_t* src); -}; -#endif // Sd2Card_h - - -#endif diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp deleted file mode 100644 index 95765f9..0000000 --- a/Marlin/SdBaseFile.cpp +++ /dev/null @@ -1,1826 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ - -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#include "SdBaseFile.h" -//------------------------------------------------------------------------------ -// pointer to cwd directory -SdBaseFile* SdBaseFile::cwd_ = 0; -// callback function for date/time -void (*SdBaseFile::dateTime_)(uint16_t* date, uint16_t* time) = 0; -//------------------------------------------------------------------------------ -// add a cluster to a file -bool SdBaseFile::addCluster() { - if (!vol_->allocContiguous(1, &curCluster_)) goto fail; - - // if first cluster of file link to directory entry - if (firstCluster_ == 0) { - firstCluster_ = curCluster_; - flags_ |= F_FILE_DIR_DIRTY; - } - return true; - - fail: - return false; -} -//------------------------------------------------------------------------------ -// Add a cluster to a directory file and zero the cluster. -// return with first block of cluster in the cache -bool SdBaseFile::addDirCluster() { - uint32_t block; - // max folder size - if (fileSize_ / sizeof(dir_t) >= 0XFFFF) goto fail; - - if (!addCluster()) goto fail; - if (!vol_->cacheFlush()) goto fail; - - block = vol_->clusterStartBlock(curCluster_); - - // set cache to first block of cluster - vol_->cacheSetBlockNumber(block, true); - - // zero first block of cluster - memset(vol_->cacheBuffer_.data, 0, 512); - - // zero rest of cluster - for (uint8_t i = 1; i < vol_->blocksPerCluster_; i++) { - if (!vol_->writeBlock(block + i, vol_->cacheBuffer_.data)) goto fail; - } - // Increase directory file size by cluster size - fileSize_ += 512UL << vol_->clusterSizeShift_; - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -// cache a file's directory entry -// return pointer to cached entry or null for failure -dir_t* SdBaseFile::cacheDirEntry(uint8_t action) { - if (!vol_->cacheRawBlock(dirBlock_, action)) goto fail; - return vol_->cache()->dir + dirIndex_; -fail: - return 0; -} -//------------------------------------------------------------------------------ -/** Close a file and force cached data and directory information - * to be written to the storage device. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include no file is open or an I/O error. - */ -bool SdBaseFile::close() { - bool rtn = sync(); - type_ = FAT_FILE_TYPE_CLOSED; - return rtn; -} -//------------------------------------------------------------------------------ -/** Check for contiguous file and return its raw block range. - * - * \param[out] bgnBlock the first block address for the file. - * \param[out] endBlock the last block address for the file. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include file is not contiguous, file has zero length - * or an I/O error occurred. - */ -bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) { - // error if no blocks - if (firstCluster_ == 0) goto fail; - - for (uint32_t c = firstCluster_; ; c++) { - uint32_t next; - if (!vol_->fatGet(c, &next)) goto fail; - - // check for contiguous - if (next != (c + 1)) { - // error if not end of chain - if (!vol_->isEOC(next)) goto fail; - *bgnBlock = vol_->clusterStartBlock(firstCluster_); - *endBlock = vol_->clusterStartBlock(c) - + vol_->blocksPerCluster_ - 1; - return true; - } - } - -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Create and open a new contiguous file of a specified size. - * - * \note This function only supports short DOS 8.3 names. - * See open() for more information. - * - * \param[in] dirFile The directory where the file will be created. - * \param[in] path A path with a valid DOS 8.3 file name. - * \param[in] size The desired file size. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include \a path contains - * an invalid DOS 8.3 file name, the FAT volume has not been initialized, - * a file is already open, the file already exists, the root - * directory is full or an I/O error. - * - */ -bool SdBaseFile::createContiguous(SdBaseFile* dirFile, - const char* path, uint32_t size) { - uint32_t count; - // don't allow zero length file - if (size == 0) goto fail; - if (!open(dirFile, path, O_CREAT | O_EXCL | O_RDWR)) goto fail; - - // calculate number of clusters needed - count = ((size - 1) >> (vol_->clusterSizeShift_ + 9)) + 1; - - // allocate clusters - if (!vol_->allocContiguous(count, &firstCluster_)) { - remove(); - goto fail; - } - fileSize_ = size; - - // insure sync() will update dir entry - flags_ |= F_FILE_DIR_DIRTY; - - return sync(); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Return a file's directory entry. - * - * \param[out] dir Location for return of the file's directory entry. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::dirEntry(dir_t* dir) { - dir_t* p; - // make sure fields on SD are correct - if (!sync()) goto fail; - - // read entry - p = cacheDirEntry(SdVolume::CACHE_FOR_READ); - if (!p) goto fail; - - // copy to caller's struct - memcpy(dir, p, sizeof(dir_t)); - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Format the name field of \a dir into the 13 byte array - * \a name in standard 8.3 short name format. - * - * \param[in] dir The directory structure containing the name. - * \param[out] name A 13 byte char array for the formatted name. - */ -void SdBaseFile::dirName(const dir_t& dir, char* name) { - uint8_t j = 0; - for (uint8_t i = 0; i < 11; i++) { - if (dir.name[i] == ' ')continue; - if (i == 8) name[j++] = '.'; - name[j++] = dir.name[i]; - } - name[j] = 0; -} -//------------------------------------------------------------------------------ -/** Test for the existence of a file in a directory - * - * \param[in] name Name of the file to be tested for. - * - * The calling instance must be an open directory file. - * - * dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory - * dirFile. - * - * \return true if the file exists else false. - */ -bool SdBaseFile::exists(const char* name) { - SdBaseFile file; - return file.open(this, name, O_READ); -} -//------------------------------------------------------------------------------ -/** - * Get a string from a file. - * - * fgets() reads bytes from a file into the array pointed to by \a str, until - * \a num - 1 bytes are read, or a delimiter is read and transferred to \a str, - * or end-of-file is encountered. The string is then terminated - * with a null byte. - * - * fgets() deletes CR, '\\r', from the string. This insures only a '\\n' - * terminates the string for Windows text files which use CRLF for newline. - * - * \param[out] str Pointer to the array where the string is stored. - * \param[in] num Maximum number of characters to be read - * (including the final null byte). Usually the length - * of the array \a str is used. - * \param[in] delim Optional set of delimiters. The default is "\n". - * - * \return For success fgets() returns the length of the string in \a str. - * If no data is read, fgets() returns zero for EOF or -1 if an error occurred. - **/ -int16_t SdBaseFile::fgets(char* str, int16_t num, char* delim) { - char ch; - int16_t n = 0; - int16_t r = -1; - while ((n + 1) < num && (r = read(&ch, 1)) == 1) { - // delete CR - if (ch == '\r') continue; - str[n++] = ch; - if (!delim) { - if (ch == '\n') break; - } - else { - if (strchr(delim, ch)) break; - } - } - if (r < 0) { - // read error - return -1; - } - str[n] = '\0'; - return n; -} -//------------------------------------------------------------------------------ -/** Get a file's name - * - * \param[out] name An array of 13 characters for the file's name. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::getFilename(char* name) { - if (!isOpen()) return false; - - if (isRoot()) { - name[0] = '/'; - name[1] = '\0'; - return true; - } - // cache entry - dir_t* p = cacheDirEntry(SdVolume::CACHE_FOR_READ); - if (!p) return false; - - // format name - dirName(*p, name); - return true; -} -//------------------------------------------------------------------------------ -void SdBaseFile::getpos(filepos_t* pos) { - pos->position = curPosition_; - pos->cluster = curCluster_; -} - -//------------------------------------------------------------------------------ -/** List directory contents. - * - * \param[in] pr Print stream for list. - * - * \param[in] flags The inclusive OR of - * - * LS_DATE - %Print file modification date - * - * LS_SIZE - %Print file size. - * - * LS_R - Recursive list of subdirectories. - * - * \param[in] indent Amount of space before file name. Used for recursive - * list to indicate subdirectory level. - */ -void SdBaseFile::ls(uint8_t flags, uint8_t indent) { - rewind(); - int8_t status; - while ((status = lsPrintNext(flags, indent))) { - if (status > 1 && (flags & LS_R)) { - uint16_t index = curPosition() / 32 - 1; - SdBaseFile s; - if (s.open(this, index, O_READ)) s.ls(flags, indent + 2); - seekSet(32 * (index + 1)); - } - } -} -//------------------------------------------------------------------------------ -// saves 32 bytes on stack for ls recursion -// return 0 - EOF, 1 - normal file, or 2 - directory -int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) { - dir_t dir; - uint8_t w = 0; - - while (1) { - if (read(&dir, sizeof(dir)) != sizeof(dir)) return 0; - if (dir.name[0] == DIR_NAME_FREE) return 0; - - // skip deleted entry and entries for . and .. - if (dir.name[0] != DIR_NAME_DELETED && dir.name[0] != '.' - && DIR_IS_FILE_OR_SUBDIR(&dir)) break; - } - // indent for dir level - for (uint8_t i = 0; i < indent; i++) MYSERIAL.write(' '); - - // print name - for (uint8_t i = 0; i < 11; i++) { - if (dir.name[i] == ' ')continue; - if (i == 8) { - MYSERIAL.write('.'); - w++; - } - MYSERIAL.write(dir.name[i]); - w++; - } - if (DIR_IS_SUBDIR(&dir)) { - MYSERIAL.write('/'); - w++; - } - if (flags & (LS_DATE | LS_SIZE)) { - while (w++ < 14) MYSERIAL.write(' '); - } - // print modify date/time if requested - if (flags & LS_DATE) { - MYSERIAL.write(' '); - printFatDate(dir.lastWriteDate); - MYSERIAL.write(' '); - printFatTime(dir.lastWriteTime); - } - // print size if requested - if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) { - MYSERIAL.write(' '); - MYSERIAL.print(dir.fileSize); - } - MYSERIAL.println(); - return DIR_IS_FILE(&dir) ? 1 : 2; -} -//------------------------------------------------------------------------------ -// format directory name field from a 8.3 name string -bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) { - uint8_t c; - uint8_t n = 7; // max index for part before dot - uint8_t i = 0; - // blank fill name and extension - while (i < 11) name[i++] = ' '; - i = 0; - while (*str != '\0' && *str != '/') { - c = *str++; - if (c == '.') { - if (n == 10) goto fail; // only one dot allowed - n = 10; // max index for full 8.3 name - i = 8; // place for extension - } - else { - // illegal FAT characters - PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - uint8_t b; - while ((b = pgm_read_byte(p++))) if (b == c) goto fail; - // check size and only allow ASCII printable characters - if (i > n || c < 0x21 || c == 0x7F) goto fail; - // only upper case allowed in 8.3 names - convert lower to upper - name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); - } - } - *ptr = str; - // must have a file name, extension is optional - return name[0] != ' '; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Make a new directory. - * - * \param[in] parent An open SdFat instance for the directory that will contain - * the new directory. - * - * \param[in] path A path with a valid 8.3 DOS name for the new directory. - * - * \param[in] pFlag Create missing parent directories if true. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include this file is already open, \a parent is not a - * directory, \a path is invalid or already exists in \a parent. - */ -bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) { - uint8_t dname[11]; - SdBaseFile dir1, dir2; - SdBaseFile* sub = &dir1; - SdBaseFile* start = parent; - - if (!parent || isOpen()) goto fail; - - if (*path == '/') { - while (*path == '/') path++; - if (!parent->isRoot()) { - if (!dir2.openRoot(parent->vol_)) goto fail; - parent = &dir2; - } - } - while (1) { - if (!make83Name(path, dname, &path)) goto fail; - while (*path == '/') path++; - if (!*path) break; - if (!sub->open(parent, dname, O_READ)) { - if (!pFlag || !sub->mkdir(parent, dname)) { - goto fail; - } - } - if (parent != start) parent->close(); - parent = sub; - sub = parent != &dir1 ? &dir1 : &dir2; - } - return mkdir(parent, dname); -fail: - return false; -} -//------------------------------------------------------------------------------ -bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { - uint32_t block; - dir_t d; - dir_t* p; - - if (!parent->isDir()) goto fail; - - // create a normal file - if (!open(parent, dname, O_CREAT | O_EXCL | O_RDWR)) goto fail; - - // convert file to directory - flags_ = O_READ; - type_ = FAT_FILE_TYPE_SUBDIR; - - // allocate and zero first cluster - if (!addDirCluster())goto fail; - - // force entry to SD - if (!sync()) goto fail; - - // cache entry - should already be in cache due to sync() call - p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!p) goto fail; - - // change directory entry attribute - p->attributes = DIR_ATT_DIRECTORY; - - // make entry for '.' - memcpy(&d, p, sizeof(d)); - d.name[0] = '.'; - for (uint8_t i = 1; i < 11; i++) d.name[i] = ' '; - - // cache block for '.' and '..' - block = vol_->clusterStartBlock(firstCluster_); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; - - // copy '.' to block - memcpy(&vol_->cache()->dir[0], &d, sizeof(d)); - - // make entry for '..' - d.name[1] = '.'; - if (parent->isRoot()) { - d.firstClusterLow = 0; - d.firstClusterHigh = 0; - } - else { - d.firstClusterLow = parent->firstCluster_ & 0XFFFF; - d.firstClusterHigh = parent->firstCluster_ >> 16; - } - // copy '..' to block - memcpy(&vol_->cache()->dir[1], &d, sizeof(d)); - - // write first block - return vol_->cacheFlush(); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Open a file in the current working directory. - * - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::open(const char* path, uint8_t oflag) { - return open(cwd_, path, oflag); -} -//------------------------------------------------------------------------------ -/** Open a file or directory by name. - * - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags from the following list - * - * O_READ - Open for reading. - * - * O_RDONLY - Same as O_READ. - * - * O_WRITE - Open for writing. - * - * O_WRONLY - Same as O_WRITE. - * - * O_RDWR - Open for reading and writing. - * - * O_APPEND - If set, the file offset shall be set to the end of the - * file prior to each write. - * - * O_AT_END - Set the initial position at the end of the file. - * - * O_CREAT - If the file exists, this flag has no effect except as noted - * under O_EXCL below. Otherwise, the file shall be created - * - * O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists. - * - * O_SYNC - Call sync() after each write. This flag should not be used with - * write(uint8_t), write_P(PGM_P), writeln_P(PGM_P), or the Arduino Print class. - * These functions do character at a time writes so sync() will be called - * after each byte. - * - * O_TRUNC - If the file exists and is a regular file, and the file is - * successfully opened and is not read only, its length shall be truncated to 0. - * - * WARNING: A given file must not be opened by more than one SdBaseFile object - * of file corruption may occur. - * - * \note Directory files must be opened read only. Write and truncation is - * not allowed for directory files. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include this file is already open, \a dirFile is not - * a directory, \a path is invalid, the file does not exist - * or can't be opened in the access mode specified by oflag. - */ -bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) { - uint8_t dname[11]; - SdBaseFile dir1, dir2; - SdBaseFile* parent = dirFile; - SdBaseFile* sub = &dir1; - - if (!dirFile) goto fail; - - // error if already open - if (isOpen()) goto fail; - - if (*path == '/') { - while (*path == '/') path++; - if (!dirFile->isRoot()) { - if (!dir2.openRoot(dirFile->vol_)) goto fail; - parent = &dir2; - } - } - while (1) { - if (!make83Name(path, dname, &path)) goto fail; - while (*path == '/') path++; - if (!*path) break; - if (!sub->open(parent, dname, O_READ)) goto fail; - if (parent != dirFile) parent->close(); - parent = sub; - sub = parent != &dir1 ? &dir1 : &dir2; - } - return open(parent, dname, oflag); -fail: - return false; -} -//------------------------------------------------------------------------------ -// open with filename in dname -bool SdBaseFile::open(SdBaseFile* dirFile, - const uint8_t dname[11], uint8_t oflag) { - bool emptyFound = false; - bool fileFound = false; - uint8_t index; - dir_t* p; - - vol_ = dirFile->vol_; - - dirFile->rewind(); - // search for file - - while (dirFile->curPosition_ < dirFile->fileSize_) { - index = 0XF & (dirFile->curPosition_ >> 5); - p = dirFile->readDirCache(); - if (!p) goto fail; - - if (p->name[0] == DIR_NAME_FREE || p->name[0] == DIR_NAME_DELETED) { - // remember first empty slot - if (!emptyFound) { - dirBlock_ = dirFile->vol_->cacheBlockNumber(); - dirIndex_ = index; - emptyFound = true; - } - // done if no entries follow - if (p->name[0] == DIR_NAME_FREE) break; - } - else if (!memcmp(dname, p->name, 11)) { - fileFound = true; - break; - } - } - if (fileFound) { - // don't open existing file if O_EXCL - if (oflag & O_EXCL) goto fail; - } - else { - // don't create unless O_CREAT and O_WRITE - if (!(oflag & O_CREAT) || !(oflag & O_WRITE)) goto fail; - if (emptyFound) { - index = dirIndex_; - p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!p) goto fail; - } - else { - if (dirFile->type_ == FAT_FILE_TYPE_ROOT_FIXED) goto fail; - - // add and zero cluster for dirFile - first cluster is in cache for write - if (!dirFile->addDirCluster()) goto fail; - - // use first entry in cluster - p = dirFile->vol_->cache()->dir; - index = 0; - } - // initialize as empty file - memset(p, 0, sizeof(dir_t)); - memcpy(p->name, dname, 11); - - // set timestamps - if (dateTime_) { - // call user date/time function - dateTime_(&p->creationDate, &p->creationTime); - } - else { - // use default date/time - p->creationDate = FAT_DEFAULT_DATE; - p->creationTime = FAT_DEFAULT_TIME; - } - p->lastAccessDate = p->creationDate; - p->lastWriteDate = p->creationDate; - p->lastWriteTime = p->creationTime; - - // write entry to SD - if (!dirFile->vol_->cacheFlush()) goto fail; - } - // open entry in cache - return openCachedEntry(index, oflag); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Open a file by index. - * - * \param[in] dirFile An open SdFat instance for the directory. - * - * \param[in] index The \a index of the directory entry for the file to be - * opened. The value for \a index is (directory file position)/32. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * - * See open() by path for definition of flags. - * \return true for success or false for failure. - */ -bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { - dir_t* p; - - vol_ = dirFile->vol_; - - // error if already open - if (isOpen() || !dirFile) goto fail; - - // don't open existing file if O_EXCL - user call error - if (oflag & O_EXCL) goto fail; - - // seek to location of entry - if (!dirFile->seekSet(32 * index)) goto fail; - - // read entry into cache - p = dirFile->readDirCache(); - if (!p) goto fail; - - // error if empty slot or '.' or '..' - if (p->name[0] == DIR_NAME_FREE || - p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') { - goto fail; - } - // open cached entry - return openCachedEntry(index & 0XF, oflag); -fail: - return false; -} -//------------------------------------------------------------------------------ -// open a cached directory entry. Assumes vol_ is initialized -bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { - // location of entry in cache - dir_t* p = &vol_->cache()->dir[dirIndex]; - - // write or truncate is an error for a directory or read-only file - if (p->attributes & (DIR_ATT_READ_ONLY | DIR_ATT_DIRECTORY)) { - if (oflag & (O_WRITE | O_TRUNC)) goto fail; - } - // remember location of directory entry on SD - dirBlock_ = vol_->cacheBlockNumber(); - dirIndex_ = dirIndex; - - // copy first cluster number for directory fields - firstCluster_ = (uint32_t)p->firstClusterHigh << 16; - firstCluster_ |= p->firstClusterLow; - - // make sure it is a normal file or subdirectory - if (DIR_IS_FILE(p)) { - fileSize_ = p->fileSize; - type_ = FAT_FILE_TYPE_NORMAL; - } - else if (DIR_IS_SUBDIR(p)) { - if (!vol_->chainSize(firstCluster_, &fileSize_)) goto fail; - type_ = FAT_FILE_TYPE_SUBDIR; - } - else { - goto fail; - } - // save open flags for read/write - flags_ = oflag & F_OFLAG; - - // set to start of file - curCluster_ = 0; - curPosition_ = 0; - if ((oflag & O_TRUNC) && !truncate(0)) return false; - return oflag & O_AT_END ? seekEnd(0) : true; -fail: - type_ = FAT_FILE_TYPE_CLOSED; - return false; -} -//------------------------------------------------------------------------------ -/** Open the next file or subdirectory in a directory. - * - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * - * See open() by path for definition of flags. - * \return true for success or false for failure. - */ -bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) { - dir_t* p; - uint8_t index; - - if (!dirFile) goto fail; - - // error if already open - if (isOpen()) goto fail; - - vol_ = dirFile->vol_; - - while (1) { - index = 0XF & (dirFile->curPosition_ >> 5); - - // read entry into cache - p = dirFile->readDirCache(); - if (!p) goto fail; - - // done if last entry - if (p->name[0] == DIR_NAME_FREE) goto fail; - - // skip empty slot or '.' or '..' - if (p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') { - continue; - } - // must be file or dir - if (DIR_IS_FILE_OR_SUBDIR(p)) { - return openCachedEntry(index, oflag); - } - } -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Open a directory's parent directory. - * - * \param[in] dir Parent of this directory will be opened. Must not be root. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::openParent(SdBaseFile* dir) { - dir_t entry; - dir_t* p; - SdBaseFile file; - uint32_t c; - uint32_t cluster; - uint32_t lbn; - // error if already open or dir is root or dir is not a directory - if (isOpen() || !dir || dir->isRoot() || !dir->isDir()) goto fail; - vol_ = dir->vol_; - // position to '..' - if (!dir->seekSet(32)) goto fail; - // read '..' entry - if (dir->read(&entry, sizeof(entry)) != 32) goto fail; - // verify it is '..' - if (entry.name[0] != '.' || entry.name[1] != '.') goto fail; - // start cluster for '..' - cluster = entry.firstClusterLow; - cluster |= (uint32_t)entry.firstClusterHigh << 16; - if (cluster == 0) return openRoot(vol_); - // start block for '..' - lbn = vol_->clusterStartBlock(cluster); - // first block of parent dir - if (!vol_->cacheRawBlock(lbn, SdVolume::CACHE_FOR_READ)) { - goto fail; - } - p = &vol_->cacheBuffer_.dir[1]; - // verify name for '../..' - if (p->name[0] != '.' || p->name[1] != '.') goto fail; - // '..' is pointer to first cluster of parent. open '../..' to find parent - if (p->firstClusterHigh == 0 && p->firstClusterLow == 0) { - if (!file.openRoot(dir->volume())) goto fail; - } - else if (!file.openCachedEntry(1, O_READ)) { - goto fail; - } - // search for parent in '../..' - do { - if (file.readDir(&entry, NULL) != 32) goto fail; - c = entry.firstClusterLow; - c |= (uint32_t)entry.firstClusterHigh << 16; - } while (c != cluster); - // open parent - return open(&file, file.curPosition() / 32 - 1, O_READ); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Open a volume's root directory. - * - * \param[in] vol The FAT volume containing the root directory to be opened. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include the file is already open, the FAT volume has - * not been initialized or it a FAT12 volume. - */ -bool SdBaseFile::openRoot(SdVolume* vol) { - // error if file is already open - if (isOpen()) goto fail; - - if (vol->fatType() == 16 || (FAT12_SUPPORT && vol->fatType() == 12)) { - type_ = FAT_FILE_TYPE_ROOT_FIXED; - firstCluster_ = 0; - fileSize_ = 32 * vol->rootDirEntryCount(); - } - else if (vol->fatType() == 32) { - type_ = FAT_FILE_TYPE_ROOT32; - firstCluster_ = vol->rootDirStart(); - if (!vol->chainSize(firstCluster_, &fileSize_)) goto fail; - } - else { - // volume is not initialized, invalid, or FAT12 without support - return false; - } - vol_ = vol; - // read only - flags_ = O_READ; - - // set to start of file - curCluster_ = 0; - curPosition_ = 0; - - // root has no directory entry - dirBlock_ = 0; - dirIndex_ = 0; - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Return the next available byte without consuming it. - * - * \return The byte if no error and not at eof else -1; - */ -int SdBaseFile::peek() { - filepos_t pos; - getpos(&pos); - int c = read(); - if (c >= 0) setpos(&pos); - return c; -} - -//------------------------------------------------------------------------------ -/** %Print the name field of a directory entry in 8.3 format. - * \param[in] pr Print stream for output. - * \param[in] dir The directory structure containing the name. - * \param[in] width Blank fill name if length is less than \a width. - * \param[in] printSlash Print '/' after directory names if true. - */ -void SdBaseFile::printDirName(const dir_t& dir, - uint8_t width, bool printSlash) { - uint8_t w = 0; - for (uint8_t i = 0; i < 11; i++) { - if (dir.name[i] == ' ')continue; - if (i == 8) { - MYSERIAL.write('.'); - w++; - } - MYSERIAL.write(dir.name[i]); - w++; - } - if (DIR_IS_SUBDIR(&dir) && printSlash) { - MYSERIAL.write('/'); - w++; - } - while (w < width) { - MYSERIAL.write(' '); - w++; - } -} -//------------------------------------------------------------------------------ -// print uint8_t with width 2 -static void print2u(uint8_t v) { - if (v < 10) MYSERIAL.write('0'); - MYSERIAL.print(v, DEC); -} -//------------------------------------------------------------------------------ -/** %Print a directory date field to Serial. - * - * Format is yyyy-mm-dd. - * - * \param[in] fatDate The date field from a directory entry. - */ - -//------------------------------------------------------------------------------ -/** %Print a directory date field. - * - * Format is yyyy-mm-dd. - * - * \param[in] pr Print stream for output. - * \param[in] fatDate The date field from a directory entry. - */ -void SdBaseFile::printFatDate(uint16_t fatDate) { - MYSERIAL.print(FAT_YEAR(fatDate)); - MYSERIAL.write('-'); - print2u(FAT_MONTH(fatDate)); - MYSERIAL.write('-'); - print2u(FAT_DAY(fatDate)); -} - -//------------------------------------------------------------------------------ -/** %Print a directory time field. - * - * Format is hh:mm:ss. - * - * \param[in] pr Print stream for output. - * \param[in] fatTime The time field from a directory entry. - */ -void SdBaseFile::printFatTime(uint16_t fatTime) { - print2u(FAT_HOUR(fatTime)); - MYSERIAL.write(':'); - print2u(FAT_MINUTE(fatTime)); - MYSERIAL.write(':'); - print2u(FAT_SECOND(fatTime)); -} -//------------------------------------------------------------------------------ -/** Print a file's name to Serial - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::printName() { - char name[FILENAME_LENGTH]; - if (!getFilename(name)) return false; - MYSERIAL.print(name); - return true; -} -//------------------------------------------------------------------------------ -/** Read the next byte from a file. - * - * \return For success read returns the next byte in the file as an int. - * If an error occurs or end of file is reached -1 is returned. - */ -int16_t SdBaseFile::read() { - uint8_t b; - return read(&b, 1) == 1 ? b : -1; -} -//------------------------------------------------------------------------------ -/** Read data from a file starting at the current position. - * - * \param[out] buf Pointer to the location that will receive the data. - * - * \param[in] nbyte Maximum number of bytes to read. - * - * \return For success read() returns the number of bytes read. - * A value less than \a nbyte, including zero, will be returned - * if end of file is reached. - * If an error occurs, read() returns -1. Possible errors include - * read() called before a file has been opened, corrupt file system - * or an I/O error occurred. - */ -int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { - uint8_t* dst = reinterpret_cast(buf); - uint16_t offset; - uint16_t toRead; - uint32_t block; // raw device block number - - // error if not open or write only - if (!isOpen() || !(flags_ & O_READ)) goto fail; - - // max bytes left in file - NOMORE(nbyte, fileSize_ - curPosition_); - - // amount left to read - toRead = nbyte; - while (toRead > 0) { - offset = curPosition_ & 0X1FF; // offset in block - if (type_ == FAT_FILE_TYPE_ROOT_FIXED) { - block = vol_->rootDirStart() + (curPosition_ >> 9); - } - else { - uint8_t blockOfCluster = vol_->blockOfCluster(curPosition_); - if (offset == 0 && blockOfCluster == 0) { - // start of new cluster - if (curPosition_ == 0) { - // use first cluster in file - curCluster_ = firstCluster_; - } - else { - // get next cluster from FAT - if (!vol_->fatGet(curCluster_, &curCluster_)) goto fail; - } - } - block = vol_->clusterStartBlock(curCluster_) + blockOfCluster; - } - uint16_t n = toRead; - - // amount to be read from current block - NOMORE(n, 512 - offset); - - // no buffering needed if n == 512 - if (n == 512 && block != vol_->cacheBlockNumber()) { - if (!vol_->readBlock(block, dst)) goto fail; - } - else { - // read block to cache and copy data to caller - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) goto fail; - uint8_t* src = vol_->cache()->data + offset; - memcpy(dst, src, n); - } - dst += n; - curPosition_ += n; - toRead -= n; - } - return nbyte; -fail: - return -1; -} - -/** - * Read the next entry in a directory. - * - * \param[out] dir The dir_t struct that will receive the data. - * - * \return For success readDir() returns the number of bytes read. - * A value of zero will be returned if end of file is reached. - * If an error occurs, readDir() returns -1. Possible errors include - * readDir() called before a directory has been opened, this is not - * a directory file or an I/O error occurred. - */ -int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { - int16_t n; - // if not a directory file or miss-positioned return an error - if (!isDir() || (0X1F & curPosition_)) return -1; - - //If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly. - if (longFilename != NULL) longFilename[0] = '\0'; - - while (1) { - - n = read(dir, sizeof(dir_t)); - if (n != sizeof(dir_t)) return n == 0 ? 0 : -1; - - // last entry if DIR_NAME_FREE - if (dir->name[0] == DIR_NAME_FREE) return 0; - - // skip empty entries and entry for . and .. - if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') continue; - - // Fill the long filename if we have a long filename entry. - // Long filename entries are stored before the short filename. - if (longFilename != NULL && DIR_IS_LONG_NAME(dir)) { - vfat_t* VFAT = (vfat_t*)dir; - // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 - if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) { - // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table. - n = ((VFAT->sequenceNumber & 0x1F) - 1) * (FILENAME_LENGTH); - for (uint8_t i = 0; i < FILENAME_LENGTH; i++) - longFilename[n + i] = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i - 5] : VFAT->name3[i - 11]; - // If this VFAT entry is the last one, add a NUL terminator at the end of the string - if (VFAT->sequenceNumber & 0x40) longFilename[n + FILENAME_LENGTH] = '\0'; - } - } - // Return if normal file or subdirectory - if (DIR_IS_FILE_OR_SUBDIR(dir)) return n; - } -} - -//------------------------------------------------------------------------------ -// Read next directory entry into the cache -// Assumes file is correctly positioned -dir_t* SdBaseFile::readDirCache() { - uint8_t i; - // error if not directory - if (!isDir()) goto fail; - - // index of entry in cache - i = (curPosition_ >> 5) & 0XF; - - // use read to locate and cache block - if (read() < 0) goto fail; - - // advance to next entry - curPosition_ += 31; - - // return pointer to entry - return vol_->cache()->dir + i; -fail: - return 0; -} -//------------------------------------------------------------------------------ -/** Remove a file. - * - * The directory entry and all data for the file are deleted. - * - * \note This function should not be used to delete the 8.3 version of a - * file that has a long name. For example if a file has the long name - * "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT". - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include the file read-only, is a directory, - * or an I/O error occurred. - */ -bool SdBaseFile::remove() { - dir_t* d; - // free any clusters - will fail if read-only or directory - if (!truncate(0)) goto fail; - - // cache directory entry - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - - // mark entry deleted - d->name[0] = DIR_NAME_DELETED; - - // set this file closed - type_ = FAT_FILE_TYPE_CLOSED; - - // write entry to SD - return vol_->cacheFlush(); - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Remove a file. - * - * The directory entry and all data for the file are deleted. - * - * \param[in] dirFile The directory that contains the file. - * \param[in] path Path for the file to be removed. - * - * \note This function should not be used to delete the 8.3 version of a - * file that has a long name. For example if a file has the long name - * "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT". - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include the file is a directory, is read only, - * \a dirFile is not a directory, \a path is not found - * or an I/O error occurred. - */ -bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) { - SdBaseFile file; - if (!file.open(dirFile, path, O_WRITE)) goto fail; - return file.remove(); -fail: - // can't set iostate - static function - return false; -} -//------------------------------------------------------------------------------ -/** Rename a file or subdirectory. - * - * \param[in] dirFile Directory for the new path. - * \param[in] newPath New path name for the file/directory. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include \a dirFile is not open or is not a directory - * file, newPath is invalid or already exists, or an I/O error occurs. - */ -bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { - dir_t entry; - uint32_t dirCluster = 0; - SdBaseFile file; - dir_t* d; - - // must be an open file or subdirectory - if (!(isFile() || isSubDir())) goto fail; - - // can't move file - if (vol_ != dirFile->vol_) goto fail; - - // sync() and cache directory entry - sync(); - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - - // save directory entry - memcpy(&entry, d, sizeof(entry)); - - // mark entry deleted - d->name[0] = DIR_NAME_DELETED; - - // make directory entry for new path - if (isFile()) { - if (!file.open(dirFile, newPath, O_CREAT | O_EXCL | O_WRITE)) { - goto restore; - } - } - else { - // don't create missing path prefix components - if (!file.mkdir(dirFile, newPath, false)) { - goto restore; - } - // save cluster containing new dot dot - dirCluster = file.firstCluster_; - } - // change to new directory entry - dirBlock_ = file.dirBlock_; - dirIndex_ = file.dirIndex_; - - // mark closed to avoid possible destructor close call - file.type_ = FAT_FILE_TYPE_CLOSED; - - // cache new directory entry - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - - // copy all but name field to new directory entry - memcpy(&d->attributes, &entry.attributes, sizeof(entry) - sizeof(d->name)); - - // update dot dot if directory - if (dirCluster) { - // get new dot dot - uint32_t block = vol_->clusterStartBlock(dirCluster); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) goto fail; - memcpy(&entry, &vol_->cache()->dir[1], sizeof(entry)); - - // free unused cluster - if (!vol_->freeChain(dirCluster)) goto fail; - - // store new dot dot - block = vol_->clusterStartBlock(firstCluster_); - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; - memcpy(&vol_->cache()->dir[1], &entry, sizeof(entry)); - } - return vol_->cacheFlush(); - -restore: - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - // restore entry - d->name[0] = entry.name[0]; - vol_->cacheFlush(); - -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Remove a directory file. - * - * The directory file will be removed only if it is empty and is not the - * root directory. rmdir() follows DOS and Windows and ignores the - * read-only attribute for the directory. - * - * \note This function should not be used to delete the 8.3 version of a - * directory that has a long name. For example if a directory has the - * long name "New folder" you should not delete the 8.3 name "NEWFOL~1". - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include the file is not a directory, is the root - * directory, is not empty, or an I/O error occurred. - */ -bool SdBaseFile::rmdir() { - // must be open subdirectory - if (!isSubDir()) goto fail; - - rewind(); - - // make sure directory is empty - while (curPosition_ < fileSize_) { - dir_t* p = readDirCache(); - if (!p) goto fail; - // done if past last used entry - if (p->name[0] == DIR_NAME_FREE) break; - // skip empty slot, '.' or '..' - if (p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') continue; - // error not empty - if (DIR_IS_FILE_OR_SUBDIR(p)) goto fail; - } - // convert empty directory to normal file for remove - type_ = FAT_FILE_TYPE_NORMAL; - flags_ |= O_WRITE; - return remove(); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Recursively delete a directory and all contained files. - * - * This is like the Unix/Linux 'rm -rf *' if called with the root directory - * hence the name. - * - * Warning - This will remove all contents of the directory including - * subdirectories. The directory will then be removed if it is not root. - * The read-only attribute for files will be ignored. - * - * \note This function should not be used to delete the 8.3 version of - * a directory that has a long name. See remove() and rmdir(). - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::rmRfStar() { - uint16_t index; - SdBaseFile f; - rewind(); - while (curPosition_ < fileSize_) { - // remember position - index = curPosition_ / 32; - - dir_t* p = readDirCache(); - if (!p) goto fail; - - // done if past last entry - if (p->name[0] == DIR_NAME_FREE) break; - - // skip empty slot or '.' or '..' - if (p->name[0] == DIR_NAME_DELETED || p->name[0] == '.') continue; - - // skip if part of long file name or volume label in root - if (!DIR_IS_FILE_OR_SUBDIR(p)) continue; - - if (!f.open(this, index, O_READ)) goto fail; - if (f.isSubDir()) { - // recursively delete - if (!f.rmRfStar()) goto fail; - } - else { - // ignore read-only - f.flags_ |= O_WRITE; - if (!f.remove()) goto fail; - } - // position to next entry if required - if (curPosition_ != (32 * (index + 1))) { - if (!seekSet(32 * (index + 1))) goto fail; - } - } - // don't try to delete root - if (!isRoot()) { - if (!rmdir()) goto fail; - } - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Create a file object and open it in the current working directory. - * - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). - */ -SdBaseFile::SdBaseFile(const char* path, uint8_t oflag) { - type_ = FAT_FILE_TYPE_CLOSED; - writeError = false; - open(path, oflag); -} -//------------------------------------------------------------------------------ -/** Sets a file's position. - * - * \param[in] pos The new position in bytes from the beginning of the file. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::seekSet(uint32_t pos) { - uint32_t nCur; - uint32_t nNew; - // error if file not open or seek past end of file - if (!isOpen() || pos > fileSize_) goto fail; - - if (type_ == FAT_FILE_TYPE_ROOT_FIXED) { - curPosition_ = pos; - goto done; - } - if (pos == 0) { - // set position to start of file - curCluster_ = 0; - curPosition_ = 0; - goto done; - } - // calculate cluster index for cur and new position - nCur = (curPosition_ - 1) >> (vol_->clusterSizeShift_ + 9); - nNew = (pos - 1) >> (vol_->clusterSizeShift_ + 9); - - if (nNew < nCur || curPosition_ == 0) { - // must follow chain from first cluster - curCluster_ = firstCluster_; - } - else { - // advance from curPosition - nNew -= nCur; - } - while (nNew--) { - if (!vol_->fatGet(curCluster_, &curCluster_)) goto fail; - } - curPosition_ = pos; - -done: - return true; - -fail: - return false; -} -//------------------------------------------------------------------------------ -void SdBaseFile::setpos(filepos_t* pos) { - curPosition_ = pos->position; - curCluster_ = pos->cluster; -} -//------------------------------------------------------------------------------ -/** The sync() call causes all modified data and directory fields - * to be written to the storage device. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include a call to sync() before a file has been - * opened or an I/O error. - */ -bool SdBaseFile::sync() { - // only allow open files and directories - if (!isOpen()) goto fail; - - if (flags_ & F_FILE_DIR_DIRTY) { - dir_t* d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - // check for deleted by another open file object - if (!d || d->name[0] == DIR_NAME_DELETED) goto fail; - - // do not set filesize for dir files - if (!isDir()) d->fileSize = fileSize_; - - // update first cluster fields - d->firstClusterLow = firstCluster_ & 0XFFFF; - d->firstClusterHigh = firstCluster_ >> 16; - - // set modify time if user supplied a callback date/time function - if (dateTime_) { - dateTime_(&d->lastWriteDate, &d->lastWriteTime); - d->lastAccessDate = d->lastWriteDate; - } - // clear directory dirty - flags_ &= ~F_FILE_DIR_DIRTY; - } - return vol_->cacheFlush(); - -fail: - writeError = true; - return false; -} -//------------------------------------------------------------------------------ -/** Copy a file's timestamps - * - * \param[in] file File to copy timestamps from. - * - * \note - * Modify and access timestamps may be overwritten if a date time callback - * function has been set by dateTimeCallback(). - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::timestamp(SdBaseFile* file) { - dir_t* d; - dir_t dir; - - // get timestamps - if (!file->dirEntry(&dir)) goto fail; - - // update directory fields - if (!sync()) goto fail; - - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - - // copy timestamps - d->lastAccessDate = dir.lastAccessDate; - d->creationDate = dir.creationDate; - d->creationTime = dir.creationTime; - d->creationTimeTenths = dir.creationTimeTenths; - d->lastWriteDate = dir.lastWriteDate; - d->lastWriteTime = dir.lastWriteTime; - - // write back entry - return vol_->cacheFlush(); - -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Set a file's timestamps in its directory entry. - * - * \param[in] flags Values for \a flags are constructed by a bitwise-inclusive - * OR of flags from the following list - * - * T_ACCESS - Set the file's last access date. - * - * T_CREATE - Set the file's creation date and time. - * - * T_WRITE - Set the file's last write/modification date and time. - * - * \param[in] year Valid range 1980 - 2107 inclusive. - * - * \param[in] month Valid range 1 - 12 inclusive. - * - * \param[in] day Valid range 1 - 31 inclusive. - * - * \param[in] hour Valid range 0 - 23 inclusive. - * - * \param[in] minute Valid range 0 - 59 inclusive. - * - * \param[in] second Valid range 0 - 59 inclusive - * - * \note It is possible to set an invalid date since there is no check for - * the number of days in a month. - * - * \note - * Modify and access timestamps may be overwritten if a date time callback - * function has been set by dateTimeCallback(). - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - */ -bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, - uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) { - uint16_t dirDate; - uint16_t dirTime; - dir_t* d; - - if (!isOpen() - || year < 1980 - || year > 2107 - || month < 1 - || month > 12 - || day < 1 - || day > 31 - || hour > 23 - || minute > 59 - || second > 59) { - goto fail; - } - // update directory entry - if (!sync()) goto fail; - - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); - if (!d) goto fail; - - dirDate = FAT_DATE(year, month, day); - dirTime = FAT_TIME(hour, minute, second); - if (flags & T_ACCESS) { - d->lastAccessDate = dirDate; - } - if (flags & T_CREATE) { - d->creationDate = dirDate; - d->creationTime = dirTime; - // seems to be units of 1/100 second not 1/10 as Microsoft states - d->creationTimeTenths = second & 1 ? 100 : 0; - } - if (flags & T_WRITE) { - d->lastWriteDate = dirDate; - d->lastWriteTime = dirTime; - } - return vol_->cacheFlush(); -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Truncate a file to a specified length. The current file position - * will be maintained if it is less than or equal to \a length otherwise - * it will be set to end of file. - * - * \param[in] length The desired length for the file. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. - * Reasons for failure include file is read only, file is a directory, - * \a length is greater than the current file size or an I/O error occurs. - */ -bool SdBaseFile::truncate(uint32_t length) { - uint32_t newPos; - // error if not a normal file or read-only - if (!isFile() || !(flags_ & O_WRITE)) goto fail; - - // error if length is greater than current size - if (length > fileSize_) goto fail; - - // fileSize and length are zero - nothing to do - if (fileSize_ == 0) return true; - - // remember position for seek after truncation - newPos = curPosition_ > length ? length : curPosition_; - - // position to last cluster in truncated file - if (!seekSet(length)) goto fail; - - if (length == 0) { - // free all clusters - if (!vol_->freeChain(firstCluster_)) goto fail; - firstCluster_ = 0; - } - else { - uint32_t toFree; - if (!vol_->fatGet(curCluster_, &toFree)) goto fail; - - if (!vol_->isEOC(toFree)) { - // free extra clusters - if (!vol_->freeChain(toFree)) goto fail; - - // current cluster is end of chain - if (!vol_->fatPutEOC(curCluster_)) goto fail; - } - } - fileSize_ = length; - - // need to update directory entry - flags_ |= F_FILE_DIR_DIRTY; - - if (!sync()) goto fail; - - // set file to correct position - return seekSet(newPos); - -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Write data to an open file. - * - * \note Data is moved to the cache but may not be written to the - * storage device until sync() is called. - * - * \param[in] buf Pointer to the location of the data to be written. - * - * \param[in] nbyte Number of bytes to write. - * - * \return For success write() returns the number of bytes written, always - * \a nbyte. If an error occurs, write() returns -1. Possible errors - * include write() is called before a file has been opened, write is called - * for a read-only file, device is full, a corrupt file system or an I/O error. - * - */ -int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { - // convert void* to uint8_t* - must be before goto statements - const uint8_t* src = reinterpret_cast(buf); - - // number of bytes left to write - must be before goto statements - uint16_t nToWrite = nbyte; - - // error if not a normal file or is read-only - if (!isFile() || !(flags_ & O_WRITE)) goto fail; - - // seek to end of file if append flag - if ((flags_ & O_APPEND) && curPosition_ != fileSize_) { - if (!seekEnd()) goto fail; - } - - while (nToWrite > 0) { - uint8_t blockOfCluster = vol_->blockOfCluster(curPosition_); - uint16_t blockOffset = curPosition_ & 0X1FF; - if (blockOfCluster == 0 && blockOffset == 0) { - // start of new cluster - if (curCluster_ == 0) { - if (firstCluster_ == 0) { - // allocate first cluster of file - if (!addCluster()) goto fail; - } - else { - curCluster_ = firstCluster_; - } - } - else { - uint32_t next; - if (!vol_->fatGet(curCluster_, &next)) goto fail; - if (vol_->isEOC(next)) { - // add cluster if at end of chain - if (!addCluster()) goto fail; - } - else { - curCluster_ = next; - } - } - } - // max space in block - uint16_t n = 512 - blockOffset; - - // lesser of space and amount to write - NOMORE(n, nToWrite); - - // block for data write - uint32_t block = vol_->clusterStartBlock(curCluster_) + blockOfCluster; - if (n == 512) { - // full block - don't need to use cache - if (vol_->cacheBlockNumber() == block) { - // invalidate cache if block is in cache - vol_->cacheSetBlockNumber(0XFFFFFFFF, false); - } - if (!vol_->writeBlock(block, src)) goto fail; - } - else { - if (blockOffset == 0 && curPosition_ >= fileSize_) { - // start of new block don't need to read into cache - if (!vol_->cacheFlush()) goto fail; - // set cache dirty and SD address of block - vol_->cacheSetBlockNumber(block, true); - } - else { - // rewrite part of block - if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto fail; - } - uint8_t* dst = vol_->cache()->data + blockOffset; - memcpy(dst, src, n); - } - curPosition_ += n; - src += n; - nToWrite -= n; - } - if (curPosition_ > fileSize_) { - // update fileSize and insure sync will update dir entry - fileSize_ = curPosition_; - flags_ |= F_FILE_DIR_DIRTY; - } - else if (dateTime_ && nbyte) { - // insure sync will update modified date and time - flags_ |= F_FILE_DIR_DIRTY; - } - - if (flags_ & O_SYNC) { - if (!sync()) goto fail; - } - return nbyte; - -fail: - // return for write error - writeError = true; - return -1; -} -//------------------------------------------------------------------------------ -// suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) - void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT -#endif // ALLOW_DEPRECATED_FUNCTIONS - - -#endif diff --git a/Marlin/SdBaseFile.h b/Marlin/SdBaseFile.h deleted file mode 100644 index 2b912d2..0000000 --- a/Marlin/SdBaseFile.h +++ /dev/null @@ -1,492 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef SdBaseFile_h -#define SdBaseFile_h -/** - * \file - * \brief SdBaseFile class - */ -#include "Marlin.h" -#include "SdFatConfig.h" -#include "SdVolume.h" -//------------------------------------------------------------------------------ -/** - * \struct filepos_t - * \brief internal type for istream - * do not use in user apps - */ -struct filepos_t { - /** stream position */ - uint32_t position; - /** cluster for position */ - uint32_t cluster; - filepos_t() : position(0), cluster(0) {} -}; - -// use the gnu style oflag in open() -/** open() oflag for reading */ -uint8_t const O_READ = 0X01; -/** open() oflag - same as O_IN */ -uint8_t const O_RDONLY = O_READ; -/** open() oflag for write */ -uint8_t const O_WRITE = 0X02; -/** open() oflag - same as O_WRITE */ -uint8_t const O_WRONLY = O_WRITE; -/** open() oflag for reading and writing */ -uint8_t const O_RDWR = (O_READ | O_WRITE); -/** open() oflag mask for access modes */ -uint8_t const O_ACCMODE = (O_READ | O_WRITE); -/** The file offset shall be set to the end of the file prior to each write. */ -uint8_t const O_APPEND = 0X04; -/** synchronous writes - call sync() after each write */ -uint8_t const O_SYNC = 0X08; -/** truncate the file to zero length */ -uint8_t const O_TRUNC = 0X10; -/** set the initial position at the end of the file */ -uint8_t const O_AT_END = 0X20; -/** create the file if nonexistent */ -uint8_t const O_CREAT = 0X40; -/** If O_CREAT and O_EXCL are set, open() shall fail if the file exists */ -uint8_t const O_EXCL = 0X80; - -// SdBaseFile class static and const definitions -// flags for ls() -/** ls() flag to print modify date */ -uint8_t const LS_DATE = 1; -/** ls() flag to print file size */ -uint8_t const LS_SIZE = 2; -/** ls() flag for recursive list of subdirectories */ -uint8_t const LS_R = 4; - - -// flags for timestamp -/** set the file's last access date */ -uint8_t const T_ACCESS = 1; -/** set the file's creation date and time */ -uint8_t const T_CREATE = 2; -/** Set the file's write date and time */ -uint8_t const T_WRITE = 4; -// values for type_ -/** This file has not been opened. */ -uint8_t const FAT_FILE_TYPE_CLOSED = 0; -/** A normal file */ -uint8_t const FAT_FILE_TYPE_NORMAL = 1; -/** A FAT12 or FAT16 root directory */ -uint8_t const FAT_FILE_TYPE_ROOT_FIXED = 2; -/** A FAT32 root directory */ -uint8_t const FAT_FILE_TYPE_ROOT32 = 3; -/** A subdirectory file*/ -uint8_t const FAT_FILE_TYPE_SUBDIR = 4; -/** Test value for directory type */ -uint8_t const FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED; - -/** date field for FAT directory entry - * \param[in] year [1980,2107] - * \param[in] month [1,12] - * \param[in] day [1,31] - * - * \return Packed date for dir_t entry. - */ -static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { - return (year - 1980) << 9 | month << 5 | day; -} -/** year part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted year [1980,2107] - */ -static inline uint16_t FAT_YEAR(uint16_t fatDate) { - return 1980 + (fatDate >> 9); -} -/** month part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted month [1,12] - */ -static inline uint8_t FAT_MONTH(uint16_t fatDate) { - return (fatDate >> 5) & 0XF; -} -/** day part of FAT directory date field - * \param[in] fatDate Date in packed dir format. - * - * \return Extracted day [1,31] - */ -static inline uint8_t FAT_DAY(uint16_t fatDate) { - return fatDate & 0X1F; -} -/** time field for FAT directory entry - * \param[in] hour [0,23] - * \param[in] minute [0,59] - * \param[in] second [0,59] - * - * \return Packed time for dir_t entry. - */ -static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { - return hour << 11 | minute << 5 | second >> 1; -} -/** hour part of FAT directory time field - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted hour [0,23] - */ -static inline uint8_t FAT_HOUR(uint16_t fatTime) { - return fatTime >> 11; -} -/** minute part of FAT directory time field - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted minute [0,59] - */ -static inline uint8_t FAT_MINUTE(uint16_t fatTime) { - return (fatTime >> 5) & 0X3F; -} -/** second part of FAT directory time field - * Note second/2 is stored in packed time. - * - * \param[in] fatTime Time in packed dir format. - * - * \return Extracted second [0,58] - */ -static inline uint8_t FAT_SECOND(uint16_t fatTime) { - return 2 * (fatTime & 0X1F); -} -/** Default date for file timestamps is 1 Jan 2000 */ -uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; -/** Default time for file timestamp is 1 am */ -uint16_t const FAT_DEFAULT_TIME = (1 << 11); -//------------------------------------------------------------------------------ -/** - * \class SdBaseFile - * \brief Base class for SdFile with Print and C++ streams. - */ -class SdBaseFile { - public: - /** Create an instance. */ - SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {} - SdBaseFile(const char* path, uint8_t oflag); - ~SdBaseFile() {if (isOpen()) close();} - /** - * writeError is set to true if an error occurs during a write(). - * Set writeError to false before calling print() and/or write() and check - * for true after calls to print() and/or write(). - */ - bool writeError; - //---------------------------------------------------------------------------- - // helpers for stream classes - /** get position for streams - * \param[out] pos struct to receive position - */ - void getpos(filepos_t* pos); - /** set position for streams - * \param[out] pos struct with value for new position - */ - void setpos(filepos_t* pos); - //---------------------------------------------------------------------------- - bool close(); - bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); - bool createContiguous(SdBaseFile* dirFile, - const char* path, uint32_t size); - /** \return The current cluster number for a file or directory. */ - uint32_t curCluster() const {return curCluster_;} - /** \return The current position for a file or directory. */ - uint32_t curPosition() const {return curPosition_;} - /** \return Current working directory */ - static SdBaseFile* cwd() {return cwd_;} - /** Set the date/time callback function - * - * \param[in] dateTime The user's call back function. The callback - * function is of the form: - * - * \code - * void dateTime(uint16_t* date, uint16_t* time) { - * uint16_t year; - * uint8_t month, day, hour, minute, second; - * - * // User gets date and time from GPS or real-time clock here - * - * // return date using FAT_DATE macro to format fields - * *date = FAT_DATE(year, month, day); - * - * // return time using FAT_TIME macro to format fields - * *time = FAT_TIME(hour, minute, second); - * } - * \endcode - * - * Sets the function that is called when a file is created or when - * a file's directory entry is modified by sync(). All timestamps, - * access, creation, and modify, are set when a file is created. - * sync() maintains the last access date and last modify date/time. - * - * See the timestamp() function. - */ - static void dateTimeCallback( - void (*dateTime)(uint16_t* date, uint16_t* time)) { - dateTime_ = dateTime; - } - /** Cancel the date/time callback function. */ - static void dateTimeCallbackCancel() {dateTime_ = 0;} - bool dirEntry(dir_t* dir); - static void dirName(const dir_t& dir, char* name); - bool exists(const char* name); - int16_t fgets(char* str, int16_t num, char* delim = 0); - /** \return The total number of bytes in a file or directory. */ - uint32_t fileSize() const {return fileSize_;} - /** \return The first cluster number for a file or directory. */ - uint32_t firstCluster() const {return firstCluster_;} - bool getFilename(char* name); - /** \return True if this is a directory else false. */ - bool isDir() const {return type_ >= FAT_FILE_TYPE_MIN_DIR;} - /** \return True if this is a normal file else false. */ - bool isFile() const {return type_ == FAT_FILE_TYPE_NORMAL;} - /** \return True if this is an open file/directory else false. */ - bool isOpen() const {return type_ != FAT_FILE_TYPE_CLOSED;} - /** \return True if this is a subdirectory else false. */ - bool isSubDir() const {return type_ == FAT_FILE_TYPE_SUBDIR;} - /** \return True if this is the root directory. */ - bool isRoot() const { - return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; - } - void ls(uint8_t flags = 0, uint8_t indent = 0); - bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true); - // alias for backward compactability - bool makeDir(SdBaseFile* dir, const char* path) { - return mkdir(dir, path, false); - } - bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); - bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); - bool open(const char* path, uint8_t oflag = O_READ); - bool openNext(SdBaseFile* dirFile, uint8_t oflag); - bool openRoot(SdVolume* vol); - int peek(); - static void printFatDate(uint16_t fatDate); - static void printFatTime(uint16_t fatTime); - bool printName(); - int16_t read(); - int16_t read(void* buf, uint16_t nbyte); - int8_t readDir(dir_t* dir, char* longFilename); - static bool remove(SdBaseFile* dirFile, const char* path); - bool remove(); - /** Set the file's current position to zero. */ - void rewind() {seekSet(0);} - bool rename(SdBaseFile* dirFile, const char* newPath); - bool rmdir(); - // for backward compatibility - bool rmDir() {return rmdir();} - bool rmRfStar(); - /** Set the files position to current position + \a pos. See seekSet(). - * \param[in] offset The new position in bytes from the current position. - * \return true for success or false for failure. - */ - bool seekCur(int32_t offset) { - return seekSet(curPosition_ + offset); - } - /** Set the files position to end-of-file + \a offset. See seekSet(). - * \param[in] offset The new position in bytes from end-of-file. - * \return true for success or false for failure. - */ - bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);} - bool seekSet(uint32_t pos); - bool sync(); - bool timestamp(SdBaseFile* file); - bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, - uint8_t hour, uint8_t minute, uint8_t second); - /** Type of file. You should use isFile() or isDir() instead of type() - * if possible. - * - * \return The file or directory type. - */ - uint8_t type() const {return type_;} - bool truncate(uint32_t size); - /** \return SdVolume that contains this file. */ - SdVolume* volume() const {return vol_;} - int16_t write(const void* buf, uint16_t nbyte); - //------------------------------------------------------------------------------ - private: - // allow SdFat to set cwd_ - friend class SdFat; - // global pointer to cwd dir - static SdBaseFile* cwd_; - // data time callback function - static void (*dateTime_)(uint16_t* date, uint16_t* time); - // bits defined in flags_ - // should be 0X0F - static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC); - // sync of directory entry required - static uint8_t const F_FILE_DIR_DIRTY = 0X80; - - // private data - uint8_t flags_; // See above for definition of flags_ bits - uint8_t fstate_; // error and eof indicator - uint8_t type_; // type of file see above for values - uint32_t curCluster_; // cluster for current file position - uint32_t curPosition_; // current file position in bytes from beginning - uint32_t dirBlock_; // block for this files directory entry - uint8_t dirIndex_; // index of directory entry in dirBlock - uint32_t fileSize_; // file size in bytes - uint32_t firstCluster_; // first cluster of file - SdVolume* vol_; // volume where file is located - - /** experimental don't use */ - bool openParent(SdBaseFile* dir); - // private functions - bool addCluster(); - bool addDirCluster(); - dir_t* cacheDirEntry(uint8_t action); - int8_t lsPrintNext(uint8_t flags, uint8_t indent); - static bool make83Name(const char* str, uint8_t* name, const char** ptr); - bool mkdir(SdBaseFile* parent, const uint8_t dname[11]); - bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag); - bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); - dir_t* readDirCache(); - //------------------------------------------------------------------------------ - // to be deleted - static void printDirName(const dir_t& dir, - uint8_t width, bool printSlash); - //------------------------------------------------------------------------------ - // Deprecated functions - suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) - public: - /** \deprecated Use: - * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); - * \param[out] bgnBlock the first block address for the file. - * \param[out] endBlock the last block address for the file. - * \return true for success or false for failure. - */ - bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) { // NOLINT - return contiguousRange(&bgnBlock, &endBlock); - } - /** \deprecated Use: - * bool createContiguous(SdBaseFile* dirFile, - * const char* path, uint32_t size) - * \param[in] dirFile The directory where the file will be created. - * \param[in] path A path with a valid DOS 8.3 file name. - * \param[in] size The desired file size. - * \return true for success or false for failure. - */ - bool createContiguous(SdBaseFile& dirFile, // NOLINT - const char* path, uint32_t size) { - return createContiguous(&dirFile, path, size); - } - /** \deprecated Use: - * static void dateTimeCallback( - * void (*dateTime)(uint16_t* date, uint16_t* time)); - * \param[in] dateTime The user's call back function. - */ - static void dateTimeCallback( - void (*dateTime)(uint16_t& date, uint16_t& time)) { // NOLINT - oldDateTime_ = dateTime; - dateTime_ = dateTime ? oldToNew : 0; - } - /** \deprecated Use: bool dirEntry(dir_t* dir); - * \param[out] dir Location for return of the file's directory entry. - * \return true for success or false for failure. - */ - bool dirEntry(dir_t& dir) {return dirEntry(&dir);} // NOLINT - /** \deprecated Use: - * bool mkdir(SdBaseFile* dir, const char* path); - * \param[in] dir An open SdFat instance for the directory that will contain - * the new directory. - * \param[in] path A path with a valid 8.3 DOS name for the new directory. - * \return true for success or false for failure. - */ - bool mkdir(SdBaseFile& dir, const char* path) { // NOLINT - return mkdir(&dir, path); - } - /** \deprecated Use: - * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * \param[in] path A path with a valid 8.3 DOS name for the file. - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, // NOLINT - const char* path, uint8_t oflag) { - return open(&dirFile, path, oflag); - } - /** \deprecated Do not use in new apps - * \param[in] dirFile An open SdFat instance for the directory containing the - * file to be opened. - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, const char* path) { // NOLINT - return open(dirFile, path, O_RDWR); - } - /** \deprecated Use: - * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); - * \param[in] dirFile An open SdFat instance for the directory. - * \param[in] index The \a index of the directory entry for the file to be - * opened. The value for \a index is (directory file position)/32. - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC. - * \return true for success or false for failure. - */ - bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) { // NOLINT - return open(&dirFile, index, oflag); - } - /** \deprecated Use: bool openRoot(SdVolume* vol); - * \param[in] vol The FAT volume containing the root directory to be opened. - * \return true for success or false for failure. - */ - bool openRoot(SdVolume& vol) {return openRoot(&vol);} // NOLINT - /** \deprecated Use: int8_t readDir(dir_t* dir); - * \param[out] dir The dir_t struct that will receive the data. - * \return bytes read for success zero for eof or -1 for failure. - */ - int8_t readDir(dir_t& dir, char* longFilename) {return readDir(&dir, longFilename);} // NOLINT - /** \deprecated Use: - * static uint8_t remove(SdBaseFile* dirFile, const char* path); - * \param[in] dirFile The directory that contains the file. - * \param[in] path The name of the file to be removed. - * \return true for success or false for failure. - */ - static bool remove(SdBaseFile& dirFile, const char* path) { // NOLINT - return remove(&dirFile, path); - } - //------------------------------------------------------------------------------ - // rest are private - private: - static void (*oldDateTime_)(uint16_t& date, uint16_t& time); // NOLINT - static void oldToNew(uint16_t* date, uint16_t* time) { - uint16_t d; - uint16_t t; - oldDateTime_(d, t); - *date = d; - *time = t; - } -#endif // ALLOW_DEPRECATED_FUNCTIONS -}; - -#endif // SdBaseFile_h -#endif diff --git a/Marlin/SdFatConfig.h b/Marlin/SdFatConfig.h deleted file mode 100644 index d3406a0..0000000 --- a/Marlin/SdFatConfig.h +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -/** - * \file - * \brief configuration definitions - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef SdFatConfig_h - #define SdFatConfig_h - #include - //------------------------------------------------------------------------------ - /** - * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero. - * - * Using multiple cards costs 400 - 500 bytes of flash. - * - * Each card requires about 550 bytes of SRAM so use of a Mega is recommended. - */ - #define USE_MULTIPLE_CARDS 0 - //------------------------------------------------------------------------------ - /** - * Call flush for endl if ENDL_CALLS_FLUSH is nonzero - * - * The standard for iostreams is to call flush. This is very costly for - * SdFat. Each call to flush causes 2048 bytes of I/O to the SD. - * - * SdFat has a single 512 byte buffer for SD I/O so it must write the current - * data block to the SD, read the directory block from the SD, update the - * directory entry, write the directory block to the SD and read the data - * block back into the buffer. - * - * The SD flash memory controller is not designed for this many rewrites - * so performance may be reduced by more than a factor of 100. - * - * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force - * all data to be written to the SD. - */ - #define ENDL_CALLS_FLUSH 0 - //------------------------------------------------------------------------------ - /** - * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero - */ - #define ALLOW_DEPRECATED_FUNCTIONS 1 - //------------------------------------------------------------------------------ - /** - * Allow FAT12 volumes if FAT12_SUPPORT is nonzero. - * FAT12 has not been well tested. - */ - #define FAT12_SUPPORT 0 - //------------------------------------------------------------------------------ - /** - * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64) - * or 6 (F_CPU/128). - */ - #define SPI_SD_INIT_RATE 5 - //------------------------------------------------------------------------------ - /** - * Set the SS pin high for hardware SPI. If SS is chip select for another SPI - * device this will disable that device during the SD init phase. - */ - #define SET_SPI_SS_HIGH 1 - //------------------------------------------------------------------------------ - /** - * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos. - * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13. - * - * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used - * on Mega Arduinos. Software SPI works well with GPS Shield V1.1 - * but many SD cards will fail with GPS Shield V1.0. - */ - #define MEGA_SOFT_SPI 0 - //------------------------------------------------------------------------------ - /** - * Set USE_SOFTWARE_SPI nonzero to always use software SPI. - */ - #define USE_SOFTWARE_SPI 0 - // define software SPI pins so Mega can use unmodified 168/328 shields - /** Software SPI chip select pin for the SD */ - #define SOFT_SPI_CS_PIN 10 - /** Software SPI Master Out Slave In pin */ - #define SOFT_SPI_MOSI_PIN 11 - /** Software SPI Master In Slave Out pin */ - #define SOFT_SPI_MISO_PIN 12 - /** Software SPI Clock pin */ - #define SOFT_SPI_SCK_PIN 13 - //------------------------------------------------------------------------------ - /** - * The __cxa_pure_virtual function is an error handler that is invoked when - * a pure virtual function is called. - */ - #define USE_CXA_PURE_VIRTUAL 1 - - /** Number of UTF-16 characters per entry */ - #define FILENAME_LENGTH 13 - - /** - * Defines for long (vfat) filenames - */ - /** Number of VFAT entries used. Every entry has 13 UTF-16 characters */ - #define MAX_VFAT_ENTRIES (2) - /** Total size of the buffer used to store the long filenames */ - #define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1) -#endif // SdFatConfig_h - - -#endif diff --git a/Marlin/SdFatStructs.h b/Marlin/SdFatStructs.h deleted file mode 100644 index 3e989de..0000000 --- a/Marlin/SdFatStructs.h +++ /dev/null @@ -1,655 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef SdFatStructs_h -#define SdFatStructs_h - -#define PACKED __attribute__((__packed__)) -/** - * \file - * \brief FAT file structures - */ -/** - * mostly from Microsoft document fatgen103.doc - * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx - */ -//------------------------------------------------------------------------------ -/** Value for byte 510 of boot block or MBR */ -uint8_t const BOOTSIG0 = 0X55; -/** Value for byte 511 of boot block or MBR */ -uint8_t const BOOTSIG1 = 0XAA; -/** Value for bootSignature field int FAT/FAT32 boot sector */ -uint8_t const EXTENDED_BOOT_SIG = 0X29; -//------------------------------------------------------------------------------ -/** - * \struct partitionTable - * \brief MBR partition table entry - * - * A partition table entry for a MBR formatted storage device. - * The MBR partition table has four entries. - */ -struct partitionTable { - /** - * Boot Indicator . Indicates whether the volume is the active - * partition. Legal values include: 0X00. Do not use for booting. - * 0X80 Active partition. - */ - uint8_t boot; - /** - * Head part of Cylinder-head-sector address of the first block in - * the partition. Legal values are 0-255. Only used in old PC BIOS. - */ - uint8_t beginHead; - /** - * Sector part of Cylinder-head-sector address of the first block in - * the partition. Legal values are 1-63. Only used in old PC BIOS. - */ - unsigned beginSector : 6; - /** High bits cylinder for first block in partition. */ - unsigned beginCylinderHigh : 2; - /** - * Combine beginCylinderLow with beginCylinderHigh. Legal values - * are 0-1023. Only used in old PC BIOS. - */ - uint8_t beginCylinderLow; - /** - * Partition type. See defines that begin with PART_TYPE_ for - * some Microsoft partition types. - */ - uint8_t type; - /** - * head part of cylinder-head-sector address of the last sector in the - * partition. Legal values are 0-255. Only used in old PC BIOS. - */ - uint8_t endHead; - /** - * Sector part of cylinder-head-sector address of the last sector in - * the partition. Legal values are 1-63. Only used in old PC BIOS. - */ - unsigned endSector : 6; - /** High bits of end cylinder */ - unsigned endCylinderHigh : 2; - /** - * Combine endCylinderLow with endCylinderHigh. Legal values - * are 0-1023. Only used in old PC BIOS. - */ - uint8_t endCylinderLow; - /** Logical block address of the first block in the partition. */ - uint32_t firstSector; - /** Length of the partition, in blocks. */ - uint32_t totalSectors; -} PACKED; -/** Type name for partitionTable */ -typedef struct partitionTable part_t; -//------------------------------------------------------------------------------ -/** - * \struct masterBootRecord - * - * \brief Master Boot Record - * - * The first block of a storage device that is formatted with a MBR. - */ -struct masterBootRecord { - /** Code Area for master boot program. */ - uint8_t codeArea[440]; - /** Optional Windows NT disk signature. May contain boot code. */ - uint32_t diskSignature; - /** Usually zero but may be more boot code. */ - uint16_t usuallyZero; - /** Partition tables. */ - part_t part[4]; - /** First MBR signature byte. Must be 0X55 */ - uint8_t mbrSig0; - /** Second MBR signature byte. Must be 0XAA */ - uint8_t mbrSig1; -} PACKED; -/** Type name for masterBootRecord */ -typedef struct masterBootRecord mbr_t; -//------------------------------------------------------------------------------ -/** - * \struct fat_boot - * - * \brief Boot sector for a FAT12/FAT16 volume. - * - */ -struct fat_boot { - /** - * The first three bytes of the boot sector must be valid, - * executable x 86-based CPU instructions. This includes a - * jump instruction that skips the next nonexecutable bytes. - */ - uint8_t jump[3]; - /** - * This is typically a string of characters that identifies - * the operating system that formatted the volume. - */ - char oemId[8]; - /** - * The size of a hardware sector. Valid decimal values for this - * field are 512, 1024, 2048, and 4096. For most disks used in - * the United States, the value of this field is 512. - */ - uint16_t bytesPerSector; - /** - * Number of sectors per allocation unit. This value must be a - * power of 2 that is greater than 0. The legal values are - * 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided. - */ - uint8_t sectorsPerCluster; - /** - * The number of sectors preceding the start of the first FAT, - * including the boot sector. The value of this field is always 1. - */ - uint16_t reservedSectorCount; - /** - * The number of copies of the FAT on the volume. - * The value of this field is always 2. - */ - uint8_t fatCount; - /** - * For FAT12 and FAT16 volumes, this field contains the count of - * 32-byte directory entries in the root directory. For FAT32 volumes, - * this field must be set to 0. For FAT12 and FAT16 volumes, this - * value should always specify a count that when multiplied by 32 - * results in a multiple of bytesPerSector. FAT16 volumes should - * use the value 512. - */ - uint16_t rootDirEntryCount; - /** - * This field is the old 16-bit total count of sectors on the volume. - * This count includes the count of all sectors in all four regions - * of the volume. This field can be 0; if it is 0, then totalSectors32 - * must be nonzero. For FAT32 volumes, this field must be 0. For - * FAT12 and FAT16 volumes, this field contains the sector count, and - * totalSectors32 is 0 if the total sector count fits - * (is less than 0x10000). - */ - uint16_t totalSectors16; - /** - * This dates back to the old MS-DOS 1.x media determination and is - * no longer usually used for anything. 0xF8 is the standard value - * for fixed (nonremovable) media. For removable media, 0xF0 is - * frequently used. Legal values are 0xF0 or 0xF8-0xFF. - */ - uint8_t mediaType; - /** - * Count of sectors occupied by one FAT on FAT12/FAT16 volumes. - * On FAT32 volumes this field must be 0, and sectorsPerFat32 - * contains the FAT size count. - */ - uint16_t sectorsPerFat16; - /** Sectors per track for interrupt 0x13. Not used otherwise. */ - uint16_t sectorsPerTrack; - /** Number of heads for interrupt 0x13. Not used otherwise. */ - uint16_t headCount; - /** - * Count of hidden sectors preceding the partition that contains this - * FAT volume. This field is generally only relevant for media - * visible on interrupt 0x13. - */ - uint32_t hidddenSectors; - /** - * This field is the new 32-bit total count of sectors on the volume. - * This count includes the count of all sectors in all four regions - * of the volume. This field can be 0; if it is 0, then - * totalSectors16 must be nonzero. - */ - uint32_t totalSectors32; - /** - * Related to the BIOS physical drive number. Floppy drives are - * identified as 0x00 and physical hard disks are identified as - * 0x80, regardless of the number of physical disk drives. - * Typically, this value is set prior to issuing an INT 13h BIOS - * call to specify the device to access. The value is only - * relevant if the device is a boot device. - */ - uint8_t driveNumber; - /** used by Windows NT - should be zero for FAT */ - uint8_t reserved1; - /** 0X29 if next three fields are valid */ - uint8_t bootSignature; - /** - * A random serial number created when formatting a disk, - * which helps to distinguish between disks. - * Usually generated by combining date and time. - */ - uint32_t volumeSerialNumber; - /** - * A field once used to store the volume label. The volume label - * is now stored as a special file in the root directory. - */ - char volumeLabel[11]; - /** - * A field with a value of either FAT, FAT12 or FAT16, - * depending on the disk format. - */ - char fileSystemType[8]; - /** X86 boot code */ - uint8_t bootCode[448]; - /** must be 0X55 */ - uint8_t bootSectorSig0; - /** must be 0XAA */ - uint8_t bootSectorSig1; -} PACKED; -/** Type name for FAT Boot Sector */ -typedef struct fat_boot fat_boot_t; -//------------------------------------------------------------------------------ -/** - * \struct fat32_boot - * - * \brief Boot sector for a FAT32 volume. - * - */ -struct fat32_boot { - /** - * The first three bytes of the boot sector must be valid, - * executable x 86-based CPU instructions. This includes a - * jump instruction that skips the next nonexecutable bytes. - */ - uint8_t jump[3]; - /** - * This is typically a string of characters that identifies - * the operating system that formatted the volume. - */ - char oemId[8]; - /** - * The size of a hardware sector. Valid decimal values for this - * field are 512, 1024, 2048, and 4096. For most disks used in - * the United States, the value of this field is 512. - */ - uint16_t bytesPerSector; - /** - * Number of sectors per allocation unit. This value must be a - * power of 2 that is greater than 0. The legal values are - * 1, 2, 4, 8, 16, 32, 64, and 128. 128 should be avoided. - */ - uint8_t sectorsPerCluster; - /** - * The number of sectors preceding the start of the first FAT, - * including the boot sector. Must not be zero - */ - uint16_t reservedSectorCount; - /** - * The number of copies of the FAT on the volume. - * The value of this field is always 2. - */ - uint8_t fatCount; - /** - * FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0. - */ - uint16_t rootDirEntryCount; - /** - * For FAT32 volumes, this field must be 0. - */ - uint16_t totalSectors16; - /** - * This dates back to the old MS-DOS 1.x media determination and is - * no longer usually used for anything. 0xF8 is the standard value - * for fixed (nonremovable) media. For removable media, 0xF0 is - * frequently used. Legal values are 0xF0 or 0xF8-0xFF. - */ - uint8_t mediaType; - /** - * On FAT32 volumes this field must be 0, and sectorsPerFat32 - * contains the FAT size count. - */ - uint16_t sectorsPerFat16; - /** Sectors per track for interrupt 0x13. Not used otherwise. */ - uint16_t sectorsPerTrack; - /** Number of heads for interrupt 0x13. Not used otherwise. */ - uint16_t headCount; - /** - * Count of hidden sectors preceding the partition that contains this - * FAT volume. This field is generally only relevant for media - * visible on interrupt 0x13. - */ - uint32_t hidddenSectors; - /** - * Contains the total number of sectors in the FAT32 volume. - */ - uint32_t totalSectors32; - /** - * Count of sectors occupied by one FAT on FAT32 volumes. - */ - uint32_t sectorsPerFat32; - /** - * This field is only defined for FAT32 media and does not exist on - * FAT12 and FAT16 media. - * Bits 0-3 -- Zero-based number of active FAT. - * Only valid if mirroring is disabled. - * Bits 4-6 -- Reserved. - * Bit 7 -- 0 means the FAT is mirrored at runtime into all FATs. - * -- 1 means only one FAT is active; it is the one referenced - * in bits 0-3. - * Bits 8-15 -- Reserved. - */ - uint16_t fat32Flags; - /** - * FAT32 version. High byte is major revision number. - * Low byte is minor revision number. Only 0.0 define. - */ - uint16_t fat32Version; - /** - * Cluster number of the first cluster of the root directory for FAT32. - * This usually 2 but not required to be 2. - */ - uint32_t fat32RootCluster; - /** - * Sector number of FSINFO structure in the reserved area of the - * FAT32 volume. Usually 1. - */ - uint16_t fat32FSInfo; - /** - * If nonzero, indicates the sector number in the reserved area - * of the volume of a copy of the boot record. Usually 6. - * No value other than 6 is recommended. - */ - uint16_t fat32BackBootBlock; - /** - * Reserved for future expansion. Code that formats FAT32 volumes - * should always set all of the bytes of this field to 0. - */ - uint8_t fat32Reserved[12]; - /** - * Related to the BIOS physical drive number. Floppy drives are - * identified as 0x00 and physical hard disks are identified as - * 0x80, regardless of the number of physical disk drives. - * Typically, this value is set prior to issuing an INT 13h BIOS - * call to specify the device to access. The value is only - * relevant if the device is a boot device. - */ - uint8_t driveNumber; - /** used by Windows NT - should be zero for FAT */ - uint8_t reserved1; - /** 0X29 if next three fields are valid */ - uint8_t bootSignature; - /** - * A random serial number created when formatting a disk, - * which helps to distinguish between disks. - * Usually generated by combining date and time. - */ - uint32_t volumeSerialNumber; - /** - * A field once used to store the volume label. The volume label - * is now stored as a special file in the root directory. - */ - char volumeLabel[11]; - /** - * A text field with a value of FAT32. - */ - char fileSystemType[8]; - /** X86 boot code */ - uint8_t bootCode[420]; - /** must be 0X55 */ - uint8_t bootSectorSig0; - /** must be 0XAA */ - uint8_t bootSectorSig1; -} PACKED; -/** Type name for FAT32 Boot Sector */ -typedef struct fat32_boot fat32_boot_t; -//------------------------------------------------------------------------------ -/** Lead signature for a FSINFO sector */ -uint32_t const FSINFO_LEAD_SIG = 0x41615252; -/** Struct signature for a FSINFO sector */ -uint32_t const FSINFO_STRUCT_SIG = 0x61417272; -/** - * \struct fat32_fsinfo - * - * \brief FSINFO sector for a FAT32 volume. - * - */ -struct fat32_fsinfo { - /** must be 0X52, 0X52, 0X61, 0X41 */ - uint32_t leadSignature; - /** must be zero */ - uint8_t reserved1[480]; - /** must be 0X72, 0X72, 0X41, 0X61 */ - uint32_t structSignature; - /** - * Contains the last known free cluster count on the volume. - * If the value is 0xFFFFFFFF, then the free count is unknown - * and must be computed. Any other value can be used, but is - * not necessarily correct. It should be range checked at least - * to make sure it is <= volume cluster count. - */ - uint32_t freeCount; - /** - * This is a hint for the FAT driver. It indicates the cluster - * number at which the driver should start looking for free clusters. - * If the value is 0xFFFFFFFF, then there is no hint and the driver - * should start looking at cluster 2. - */ - uint32_t nextFree; - /** must be zero */ - uint8_t reserved2[12]; - /** must be 0X00, 0X00, 0X55, 0XAA */ - uint8_t tailSignature[4]; -} PACKED; -/** Type name for FAT32 FSINFO Sector */ -typedef struct fat32_fsinfo fat32_fsinfo_t; -//------------------------------------------------------------------------------ -// End Of Chain values for FAT entries -/** FAT12 end of chain value used by Microsoft. */ -uint16_t const FAT12EOC = 0XFFF; -/** Minimum value for FAT12 EOC. Use to test for EOC. */ -uint16_t const FAT12EOC_MIN = 0XFF8; -/** FAT16 end of chain value used by Microsoft. */ -uint16_t const FAT16EOC = 0XFFFF; -/** Minimum value for FAT16 EOC. Use to test for EOC. */ -uint16_t const FAT16EOC_MIN = 0XFFF8; -/** FAT32 end of chain value used by Microsoft. */ -uint32_t const FAT32EOC = 0X0FFFFFFF; -/** Minimum value for FAT32 EOC. Use to test for EOC. */ -uint32_t const FAT32EOC_MIN = 0X0FFFFFF8; -/** Mask a for FAT32 entry. Entries are 28 bits. */ -uint32_t const FAT32MASK = 0X0FFFFFFF; -//------------------------------------------------------------------------------ -/** - * \struct directoryEntry - * \brief FAT short directory entry - * - * Short means short 8.3 name, not the entry size. - * - * Date Format. A FAT directory entry date stamp is a 16-bit field that is - * basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the - * format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the - * 16-bit word): - * - * Bits 9-15: Count of years from 1980, valid value range 0-127 - * inclusive (1980-2107). - * - * Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive. - * - * Bits 0-4: Day of month, valid value range 1-31 inclusive. - * - * Time Format. A FAT directory entry time stamp is a 16-bit field that has - * a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the - * 16-bit word, bit 15 is the MSB of the 16-bit word). - * - * Bits 11-15: Hours, valid value range 0-23 inclusive. - * - * Bits 5-10: Minutes, valid value range 0-59 inclusive. - * - * Bits 0-4: 2-second count, valid value range 0-29 inclusive (0 - 58 seconds). - * - * The valid time range is from Midnight 00:00:00 to 23:59:58. - */ -struct directoryEntry { - /** Short 8.3 name. - * - * The first eight bytes contain the file name with blank fill. - * The last three bytes contain the file extension with blank fill. - */ - uint8_t name[11]; - /** Entry attributes. - * - * The upper two bits of the attribute byte are reserved and should - * always be set to 0 when a file is created and never modified or - * looked at after that. See defines that begin with DIR_ATT_. - */ - uint8_t attributes; - /** - * Reserved for use by Windows NT. Set value to 0 when a file is - * created and never modify or look at it after that. - */ - uint8_t reservedNT; - /** - * The granularity of the seconds part of creationTime is 2 seconds - * so this field is a count of tenths of a second and its valid - * value range is 0-199 inclusive. (WHG note - seems to be hundredths) - */ - uint8_t creationTimeTenths; - /** Time file was created. */ - uint16_t creationTime; - /** Date file was created. */ - uint16_t creationDate; - /** - * Last access date. Note that there is no last access time, only - * a date. This is the date of last read or write. In the case of - * a write, this should be set to the same date as lastWriteDate. - */ - uint16_t lastAccessDate; - /** - * High word of this entry's first cluster number (always 0 for a - * FAT12 or FAT16 volume). - */ - uint16_t firstClusterHigh; - /** Time of last write. File creation is considered a write. */ - uint16_t lastWriteTime; - /** Date of last write. File creation is considered a write. */ - uint16_t lastWriteDate; - /** Low word of this entry's first cluster number. */ - uint16_t firstClusterLow; - /** 32-bit unsigned holding this file's size in bytes. */ - uint32_t fileSize; -} PACKED; -/** - * \struct directoryVFATEntry - * \brief VFAT long filename directory entry - * - * directoryVFATEntries are found in the same list as normal directoryEntry. - * But have the attribute field set to DIR_ATT_LONG_NAME. - * - * Long filenames are saved in multiple directoryVFATEntries. - * Each entry containing 13 UTF-16 characters. - */ -struct directoryVFATEntry { - /** - * Sequence number. Consists of 2 parts: - * bit 6: indicates first long filename block for the next file - * bit 0-4: the position of this long filename block (first block is 1) - */ - uint8_t sequenceNumber; - /** First set of UTF-16 characters */ - uint16_t name1[5];//UTF-16 - /** attributes (at the same location as in directoryEntry), always 0x0F */ - uint8_t attributes; - /** Reserved for use by Windows NT. Always 0. */ - uint8_t reservedNT; - /** Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation. */ - uint8_t checksum; - /** Second set of UTF-16 characters */ - uint16_t name2[6];//UTF-16 - /** firstClusterLow is always zero for longFilenames */ - uint16_t firstClusterLow; - /** Third set of UTF-16 characters */ - uint16_t name3[2];//UTF-16 -} PACKED; -//------------------------------------------------------------------------------ -// Definitions for directory entries -// -/** Type name for directoryEntry */ -typedef struct directoryEntry dir_t; -/** Type name for directoryVFATEntry */ -typedef struct directoryVFATEntry vfat_t; -/** escape for name[0] = 0XE5 */ -uint8_t const DIR_NAME_0XE5 = 0X05; -/** name[0] value for entry that is free after being "deleted" */ -uint8_t const DIR_NAME_DELETED = 0XE5; -/** name[0] value for entry that is free and no allocated entries follow */ -uint8_t const DIR_NAME_FREE = 0X00; -/** file is read-only */ -uint8_t const DIR_ATT_READ_ONLY = 0X01; -/** File should hidden in directory listings */ -uint8_t const DIR_ATT_HIDDEN = 0X02; -/** Entry is for a system file */ -uint8_t const DIR_ATT_SYSTEM = 0X04; -/** Directory entry contains the volume label */ -uint8_t const DIR_ATT_VOLUME_ID = 0X08; -/** Entry is for a directory */ -uint8_t const DIR_ATT_DIRECTORY = 0X10; -/** Old DOS archive bit for backup support */ -uint8_t const DIR_ATT_ARCHIVE = 0X20; -/** Test value for long name entry. Test is - (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME. */ -uint8_t const DIR_ATT_LONG_NAME = 0X0F; -/** Test mask for long name entry */ -uint8_t const DIR_ATT_LONG_NAME_MASK = 0X3F; -/** defined attribute bits */ -uint8_t const DIR_ATT_DEFINED_BITS = 0X3F; -/** Directory entry is part of a long name - * \param[in] dir Pointer to a directory entry. - * - * \return true if the entry is for part of a long name else false. - */ -static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) { - return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME; -} -/** Mask for file/subdirectory tests */ -uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY); -/** Directory entry is for a file - * \param[in] dir Pointer to a directory entry. - * - * \return true if the entry is for a normal file else false. - */ -static inline uint8_t DIR_IS_FILE(const dir_t* dir) { - return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0; -} -/** Directory entry is for a subdirectory - * \param[in] dir Pointer to a directory entry. - * - * \return true if the entry is for a subdirectory else false. - */ -static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) { - return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY; -} -/** Directory entry is for a file or subdirectory - * \param[in] dir Pointer to a directory entry. - * - * \return true if the entry is for a normal file or subdirectory else false. - */ -static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) { - return (dir->attributes & DIR_ATT_VOLUME_ID) == 0; -} -#endif // SdFatStructs_h - - -#endif diff --git a/Marlin/SdFatUtil.cpp b/Marlin/SdFatUtil.cpp deleted file mode 100644 index 48d91df..0000000 --- a/Marlin/SdFatUtil.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2008 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" - -#if ENABLED(SDSUPPORT) -#include "SdFatUtil.h" - -//------------------------------------------------------------------------------ -/** Amount of free RAM - * \return The number of free bytes. - */ -#ifdef __arm__ -extern "C" char* sbrk(int incr); -int SdFatUtil::FreeRam() { - char top; - return &top - reinterpret_cast(sbrk(0)); -} -#else // __arm__ -extern char* __brkval; -extern char __bss_end; -/** Amount of free RAM - * \return The number of free bytes. - */ -int SdFatUtil::FreeRam() { - char top; - return __brkval ? &top - __brkval : &top - &__bss_end; -} -#endif // __arm - -//------------------------------------------------------------------------------ -/** %Print a string in flash memory. - * - * \param[in] pr Print object for output. - * \param[in] str Pointer to string stored in flash memory. - */ -void SdFatUtil::print_P(PGM_P str) { - for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c); -} -//------------------------------------------------------------------------------ -/** %Print a string in flash memory followed by a CR/LF. - * - * \param[in] pr Print object for output. - * \param[in] str Pointer to string stored in flash memory. - */ -void SdFatUtil::println_P(PGM_P str) { - print_P(str); - MYSERIAL.println(); -} -//------------------------------------------------------------------------------ -/** %Print a string in flash memory to Serial. - * - * \param[in] str Pointer to string stored in flash memory. - */ -void SdFatUtil::SerialPrint_P(PGM_P str) { - print_P(str); -} -//------------------------------------------------------------------------------ -/** %Print a string in flash memory to Serial followed by a CR/LF. - * - * \param[in] str Pointer to string stored in flash memory. - */ -void SdFatUtil::SerialPrintln_P(PGM_P str) { - println_P(str); -} -#endif diff --git a/Marlin/SdFatUtil.h b/Marlin/SdFatUtil.h deleted file mode 100644 index 9db81ac..0000000 --- a/Marlin/SdFatUtil.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2008 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef SdFatUtil_h -#define SdFatUtil_h -/** - * \file - * \brief Useful utility functions. - */ -#include "Marlin.h" -#include "MarlinSerial.h" -/** Store and print a string in flash memory.*/ -#define PgmPrint(x) SerialPrint_P(PSTR(x)) -/** Store and print a string in flash memory followed by a CR/LF.*/ -#define PgmPrintln(x) SerialPrintln_P(PSTR(x)) - -namespace SdFatUtil { - int FreeRam(); - void print_P(PGM_P str); - void println_P(PGM_P str); - void SerialPrint_P(PGM_P str); - void SerialPrintln_P(PGM_P str); -} - -using namespace SdFatUtil; // NOLINT -#endif //#define SdFatUtil_h - - -#endif diff --git a/Marlin/SdFile.cpp b/Marlin/SdFile.cpp deleted file mode 100644 index fc66f41..0000000 --- a/Marlin/SdFile.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" - -#if ENABLED(SDSUPPORT) -#include "SdFile.h" -/** Create a file object and open it in the current working directory. - * - * \param[in] path A path with a valid 8.3 DOS name for a file to be opened. - * - * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive - * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). - */ -SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { -} -//------------------------------------------------------------------------------ -/** Write data to an open file. - * - * \note Data is moved to the cache but may not be written to the - * storage device until sync() is called. - * - * \param[in] buf Pointer to the location of the data to be written. - * - * \param[in] nbyte Number of bytes to write. - * - * \return For success write() returns the number of bytes written, always - * \a nbyte. If an error occurs, write() returns -1. Possible errors - * include write() is called before a file has been opened, write is called - * for a read-only file, device is full, a corrupt file system or an I/O error. - * - */ -int16_t SdFile::write(const void* buf, uint16_t nbyte) { - return SdBaseFile::write(buf, nbyte); -} -//------------------------------------------------------------------------------ -/** Write a byte to a file. Required by the Arduino Print class. - * \param[in] b the byte to be written. - * Use writeError to check for errors. - */ -#if ARDUINO >= 100 - size_t SdFile::write(uint8_t b) { - return SdBaseFile::write(&b, 1); - } -#else - void SdFile::write(uint8_t b) { - SdBaseFile::write(&b, 1); - } -#endif -//------------------------------------------------------------------------------ -/** Write a string to a file. Used by the Arduino Print class. - * \param[in] str Pointer to the string. - * Use writeError to check for errors. - */ -void SdFile::write(const char* str) { - SdBaseFile::write(str, strlen(str)); -} -//------------------------------------------------------------------------------ -/** Write a PROGMEM string to a file. - * \param[in] str Pointer to the PROGMEM string. - * Use writeError to check for errors. - */ -void SdFile::write_P(PGM_P str) { - for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c); -} -//------------------------------------------------------------------------------ -/** Write a PROGMEM string followed by CR/LF to a file. - * \param[in] str Pointer to the PROGMEM string. - * Use writeError to check for errors. - */ -void SdFile::writeln_P(PGM_P str) { - write_P(str); - write_P(PSTR("\r\n")); -} - - -#endif diff --git a/Marlin/SdFile.h b/Marlin/SdFile.h deleted file mode 100644 index 53f3825..0000000 --- a/Marlin/SdFile.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -/** - * \file - * \brief SdFile class - */ -#include "Marlin.h" - -#if ENABLED(SDSUPPORT) -#include "SdBaseFile.h" -#include -#ifndef SdFile_h -#define SdFile_h -//------------------------------------------------------------------------------ -/** - * \class SdFile - * \brief SdBaseFile with Print. - */ -class SdFile : public SdBaseFile, public Print { - public: - SdFile() {} - SdFile(const char* name, uint8_t oflag); - #if ARDUINO >= 100 - size_t write(uint8_t b); - #else - void write(uint8_t b); - #endif - - int16_t write(const void* buf, uint16_t nbyte); - void write(const char* str); - void write_P(PGM_P str); - void writeln_P(PGM_P str); -}; -#endif // SdFile_h - - -#endif diff --git a/Marlin/SdInfo.h b/Marlin/SdInfo.h deleted file mode 100644 index f4b36b7..0000000 --- a/Marlin/SdInfo.h +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Sd2Card Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#ifndef SdInfo_h -#define SdInfo_h -#include -// Based on the document: -// -// SD Specifications -// Part 1 -// Physical Layer -// Simplified Specification -// Version 3.01 -// May 18, 2010 -// -// http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs -//------------------------------------------------------------------------------ -// SD card commands -/** GO_IDLE_STATE - init card in spi mode if CS low */ -uint8_t const CMD0 = 0X00; -/** SEND_IF_COND - verify SD Memory Card interface operating condition.*/ -uint8_t const CMD8 = 0X08; -/** SEND_CSD - read the Card Specific Data (CSD register) */ -uint8_t const CMD9 = 0X09; -/** SEND_CID - read the card identification information (CID register) */ -uint8_t const CMD10 = 0X0A; -/** STOP_TRANSMISSION - end multiple block read sequence */ -uint8_t const CMD12 = 0X0C; -/** SEND_STATUS - read the card status register */ -uint8_t const CMD13 = 0X0D; -/** READ_SINGLE_BLOCK - read a single data block from the card */ -uint8_t const CMD17 = 0X11; -/** READ_MULTIPLE_BLOCK - read a multiple data blocks from the card */ -uint8_t const CMD18 = 0X12; -/** WRITE_BLOCK - write a single data block to the card */ -uint8_t const CMD24 = 0X18; -/** WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION */ -uint8_t const CMD25 = 0X19; -/** ERASE_WR_BLK_START - sets the address of the first block to be erased */ -uint8_t const CMD32 = 0X20; -/** ERASE_WR_BLK_END - sets the address of the last block of the continuous - range to be erased*/ -uint8_t const CMD33 = 0X21; -/** ERASE - erase all previously selected blocks */ -uint8_t const CMD38 = 0X26; -/** APP_CMD - escape for application specific command */ -uint8_t const CMD55 = 0X37; -/** READ_OCR - read the OCR register of a card */ -uint8_t const CMD58 = 0X3A; -/** SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be - pre-erased before writing */ -uint8_t const ACMD23 = 0X17; -/** SD_SEND_OP_COMD - Sends host capacity support information and - activates the card's initialization process */ -uint8_t const ACMD41 = 0X29; -//------------------------------------------------------------------------------ -/** status for card in the ready state */ -uint8_t const R1_READY_STATE = 0X00; -/** status for card in the idle state */ -uint8_t const R1_IDLE_STATE = 0X01; -/** status bit for illegal command */ -uint8_t const R1_ILLEGAL_COMMAND = 0X04; -/** start data token for read or write single block*/ -uint8_t const DATA_START_BLOCK = 0XFE; -/** stop token for write multiple blocks*/ -uint8_t const STOP_TRAN_TOKEN = 0XFD; -/** start data token for write multiple blocks*/ -uint8_t const WRITE_MULTIPLE_TOKEN = 0XFC; -/** mask for data response tokens after a write block operation */ -uint8_t const DATA_RES_MASK = 0X1F; -/** write data accepted token */ -uint8_t const DATA_RES_ACCEPTED = 0X05; -//------------------------------------------------------------------------------ -/** Card IDentification (CID) register */ -typedef struct CID { - // byte 0 - /** Manufacturer ID */ - unsigned char mid; - // byte 1-2 - /** OEM/Application ID */ - char oid[2]; - // byte 3-7 - /** Product name */ - char pnm[5]; - // byte 8 - /** Product revision least significant digit */ - unsigned char prv_m : 4; - /** Product revision most significant digit */ - unsigned char prv_n : 4; - // byte 9-12 - /** Product serial number */ - uint32_t psn; - // byte 13 - /** Manufacturing date year low digit */ - unsigned char mdt_year_high : 4; - /** not used */ - unsigned char reserved : 4; - // byte 14 - /** Manufacturing date month */ - unsigned char mdt_month : 4; - /** Manufacturing date year low digit */ - unsigned char mdt_year_low : 4; - // byte 15 - /** not used always 1 */ - unsigned char always1 : 1; - /** CRC7 checksum */ - unsigned char crc : 7; -} cid_t; -//------------------------------------------------------------------------------ -/** CSD for version 1.00 cards */ -typedef struct CSDV1 { - // byte 0 - unsigned char reserved1 : 6; - unsigned char csd_ver : 2; - // byte 1 - unsigned char taac; - // byte 2 - unsigned char nsac; - // byte 3 - unsigned char tran_speed; - // byte 4 - unsigned char ccc_high; - // byte 5 - unsigned char read_bl_len : 4; - unsigned char ccc_low : 4; - // byte 6 - unsigned char c_size_high : 2; - unsigned char reserved2 : 2; - unsigned char dsr_imp : 1; - unsigned char read_blk_misalign : 1; - unsigned char write_blk_misalign : 1; - unsigned char read_bl_partial : 1; - // byte 7 - unsigned char c_size_mid; - // byte 8 - unsigned char vdd_r_curr_max : 3; - unsigned char vdd_r_curr_min : 3; - unsigned char c_size_low : 2; - // byte 9 - unsigned char c_size_mult_high : 2; - unsigned char vdd_w_cur_max : 3; - unsigned char vdd_w_curr_min : 3; - // byte 10 - unsigned char sector_size_high : 6; - unsigned char erase_blk_en : 1; - unsigned char c_size_mult_low : 1; - // byte 11 - unsigned char wp_grp_size : 7; - unsigned char sector_size_low : 1; - // byte 12 - unsigned char write_bl_len_high : 2; - unsigned char r2w_factor : 3; - unsigned char reserved3 : 2; - unsigned char wp_grp_enable : 1; - // byte 13 - unsigned char reserved4 : 5; - unsigned char write_partial : 1; - unsigned char write_bl_len_low : 2; - // byte 14 - unsigned char reserved5: 2; - unsigned char file_format : 2; - unsigned char tmp_write_protect : 1; - unsigned char perm_write_protect : 1; - unsigned char copy : 1; - /** Indicates the file format on the card */ - unsigned char file_format_grp : 1; - // byte 15 - unsigned char always1 : 1; - unsigned char crc : 7; -} csd1_t; -//------------------------------------------------------------------------------ -/** CSD for version 2.00 cards */ -typedef struct CSDV2 { - // byte 0 - unsigned char reserved1 : 6; - unsigned char csd_ver : 2; - // byte 1 - /** fixed to 0X0E */ - unsigned char taac; - // byte 2 - /** fixed to 0 */ - unsigned char nsac; - // byte 3 - unsigned char tran_speed; - // byte 4 - unsigned char ccc_high; - // byte 5 - /** This field is fixed to 9h, which indicates READ_BL_LEN=512 Byte */ - unsigned char read_bl_len : 4; - unsigned char ccc_low : 4; - // byte 6 - /** not used */ - unsigned char reserved2 : 4; - unsigned char dsr_imp : 1; - /** fixed to 0 */ - unsigned char read_blk_misalign : 1; - /** fixed to 0 */ - unsigned char write_blk_misalign : 1; - /** fixed to 0 - no partial read */ - unsigned char read_bl_partial : 1; - // byte 7 - /** not used */ - unsigned char reserved3 : 2; - /** high part of card size */ - unsigned char c_size_high : 6; - // byte 8 - /** middle part of card size */ - unsigned char c_size_mid; - // byte 9 - /** low part of card size */ - unsigned char c_size_low; - // byte 10 - /** sector size is fixed at 64 KB */ - unsigned char sector_size_high : 6; - /** fixed to 1 - erase single is supported */ - unsigned char erase_blk_en : 1; - /** not used */ - unsigned char reserved4 : 1; - // byte 11 - unsigned char wp_grp_size : 7; - /** sector size is fixed at 64 KB */ - unsigned char sector_size_low : 1; - // byte 12 - /** write_bl_len fixed for 512 byte blocks */ - unsigned char write_bl_len_high : 2; - /** fixed value of 2 */ - unsigned char r2w_factor : 3; - /** not used */ - unsigned char reserved5 : 2; - /** fixed value of 0 - no write protect groups */ - unsigned char wp_grp_enable : 1; - // byte 13 - unsigned char reserved6 : 5; - /** always zero - no partial block read*/ - unsigned char write_partial : 1; - /** write_bl_len fixed for 512 byte blocks */ - unsigned char write_bl_len_low : 2; - // byte 14 - unsigned char reserved7: 2; - /** Do not use always 0 */ - unsigned char file_format : 2; - unsigned char tmp_write_protect : 1; - unsigned char perm_write_protect : 1; - unsigned char copy : 1; - /** Do not use always 0 */ - unsigned char file_format_grp : 1; - // byte 15 - /** not used always 1 */ - unsigned char always1 : 1; - /** checksum */ - unsigned char crc : 7; -} csd2_t; -//------------------------------------------------------------------------------ -/** union of old and new style CSD register */ -union csd_t { - csd1_t v1; - csd2_t v2; -}; -#endif // SdInfo_h - -#endif diff --git a/Marlin/SdVolume.cpp b/Marlin/SdVolume.cpp deleted file mode 100644 index 4166c06..0000000 --- a/Marlin/SdVolume.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) - -#include "SdVolume.h" -//------------------------------------------------------------------------------ -#if !USE_MULTIPLE_CARDS - // raw block cache - uint32_t SdVolume::cacheBlockNumber_; // current block number - cache_t SdVolume::cacheBuffer_; // 512 byte cache for Sd2Card - Sd2Card* SdVolume::sdCard_; // pointer to SD card object - bool SdVolume::cacheDirty_; // cacheFlush() will write block if true - uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT -#endif // USE_MULTIPLE_CARDS -//------------------------------------------------------------------------------ -// find a contiguous group of clusters -bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) { - // start of group - uint32_t bgnCluster; - // end of group - uint32_t endCluster; - // last cluster of FAT - uint32_t fatEnd = clusterCount_ + 1; - - // flag to save place to start next search - bool setStart; - - // set search start cluster - if (*curCluster) { - // try to make file contiguous - bgnCluster = *curCluster + 1; - - // don't save new start location - setStart = false; - } - else { - // start at likely place for free cluster - bgnCluster = allocSearchStart_; - - // save next search start if one cluster - setStart = count == 1; - } - // end of group - endCluster = bgnCluster; - - // search the FAT for free clusters - for (uint32_t n = 0;; n++, endCluster++) { - // can't find space checked all clusters - if (n >= clusterCount_) goto fail; - - // past end - start from beginning of FAT - if (endCluster > fatEnd) { - bgnCluster = endCluster = 2; - } - uint32_t f; - if (!fatGet(endCluster, &f)) goto fail; - - if (f != 0) { - // cluster in use try next cluster as bgnCluster - bgnCluster = endCluster + 1; - } - else if ((endCluster - bgnCluster + 1) == count) { - // done - found space - break; - } - } - // mark end of chain - if (!fatPutEOC(endCluster)) goto fail; - - // link clusters - while (endCluster > bgnCluster) { - if (!fatPut(endCluster - 1, endCluster)) goto fail; - endCluster--; - } - if (*curCluster != 0) { - // connect chains - if (!fatPut(*curCluster, bgnCluster)) goto fail; - } - // return first cluster number to caller - *curCluster = bgnCluster; - - // remember possible next free cluster - if (setStart) allocSearchStart_ = bgnCluster + 1; - - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -bool SdVolume::cacheFlush() { - if (cacheDirty_) { - if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data)) { - goto fail; - } - // mirror FAT tables - if (cacheMirrorBlock_) { - if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data)) { - goto fail; - } - cacheMirrorBlock_ = 0; - } - cacheDirty_ = 0; - } - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { - if (cacheBlockNumber_ != blockNumber) { - if (!cacheFlush()) goto fail; - if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) goto fail; - cacheBlockNumber_ = blockNumber; - } - if (dirty) cacheDirty_ = true; - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -// return the size in bytes of a cluster chain -bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) { - uint32_t s = 0; - do { - if (!fatGet(cluster, &cluster)) goto fail; - s += 512UL << clusterSizeShift_; - } while (!isEOC(cluster)); - *size = s; - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -// Fetch a FAT entry -bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) { - uint32_t lba; - if (cluster > (clusterCount_ + 1)) goto fail; - if (FAT12_SUPPORT && fatType_ == 12) { - uint16_t index = cluster; - index += index >> 1; - lba = fatStartBlock_ + (index >> 9); - if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail; - index &= 0X1FF; - uint16_t tmp = cacheBuffer_.data[index]; - index++; - if (index == 512) { - if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) goto fail; - index = 0; - } - tmp |= cacheBuffer_.data[index] << 8; - *value = cluster & 1 ? tmp >> 4 : tmp & 0XFFF; - return true; - } - if (fatType_ == 16) { - lba = fatStartBlock_ + (cluster >> 8); - } - else if (fatType_ == 32) { - lba = fatStartBlock_ + (cluster >> 7); - } - else { - goto fail; - } - if (lba != cacheBlockNumber_) { - if (!cacheRawBlock(lba, CACHE_FOR_READ)) goto fail; - } - if (fatType_ == 16) { - *value = cacheBuffer_.fat16[cluster & 0XFF]; - } - else { - *value = cacheBuffer_.fat32[cluster & 0X7F] & FAT32MASK; - } - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -// Store a FAT entry -bool SdVolume::fatPut(uint32_t cluster, uint32_t value) { - uint32_t lba; - // error if reserved cluster - if (cluster < 2) goto fail; - - // error if not in FAT - if (cluster > (clusterCount_ + 1)) goto fail; - - if (FAT12_SUPPORT && fatType_ == 12) { - uint16_t index = cluster; - index += index >> 1; - lba = fatStartBlock_ + (index >> 9); - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - index &= 0X1FF; - uint8_t tmp = value; - if (cluster & 1) { - tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4; - } - cacheBuffer_.data[index] = tmp; - index++; - if (index == 512) { - lba++; - index = 0; - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - } - tmp = value >> 4; - if (!(cluster & 1)) { - tmp = ((cacheBuffer_.data[index] & 0XF0)) | tmp >> 4; - } - cacheBuffer_.data[index] = tmp; - return true; - } - if (fatType_ == 16) { - lba = fatStartBlock_ + (cluster >> 8); - } - else if (fatType_ == 32) { - lba = fatStartBlock_ + (cluster >> 7); - } - else { - goto fail; - } - if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) goto fail; - // store entry - if (fatType_ == 16) { - cacheBuffer_.fat16[cluster & 0XFF] = value; - } - else { - cacheBuffer_.fat32[cluster & 0X7F] = value; - } - // mirror second FAT - if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_; - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -// free a cluster chain -bool SdVolume::freeChain(uint32_t cluster) { - uint32_t next; - - // clear free cluster location - allocSearchStart_ = 2; - - do { - if (!fatGet(cluster, &next)) goto fail; - - // free cluster - if (!fatPut(cluster, 0)) goto fail; - - cluster = next; - } while (!isEOC(cluster)); - - return true; -fail: - return false; -} -//------------------------------------------------------------------------------ -/** Volume free space in clusters. - * - * \return Count of free clusters for success or -1 if an error occurs. - */ -int32_t SdVolume::freeClusterCount() { - uint32_t free = 0; - uint16_t n; - uint32_t todo = clusterCount_ + 2; - - if (fatType_ == 16) { - n = 256; - } - else if (fatType_ == 32) { - n = 128; - } - else { - // put FAT12 here - return -1; - } - - for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) { - if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1; - NOMORE(n, todo); - if (fatType_ == 16) { - for (uint16_t i = 0; i < n; i++) { - if (cacheBuffer_.fat16[i] == 0) free++; - } - } - else { - for (uint16_t i = 0; i < n; i++) { - if (cacheBuffer_.fat32[i] == 0) free++; - } - } - } - return free; -} -//------------------------------------------------------------------------------ -/** Initialize a FAT volume. - * - * \param[in] dev The SD card where the volume is located. - * - * \param[in] part The partition to be used. Legal values for \a part are - * 1-4 to use the corresponding partition on a device formatted with - * a MBR, Master Boot Record, or zero if the device is formatted as - * a super floppy with the FAT boot sector in block zero. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. Reasons for - * failure include not finding a valid partition, not finding a valid - * FAT file system in the specified partition or an I/O error. - */ -bool SdVolume::init(Sd2Card* dev, uint8_t part) { - uint32_t totalBlocks; - uint32_t volumeStartBlock = 0; - fat32_boot_t* fbs; - - sdCard_ = dev; - fatType_ = 0; - allocSearchStart_ = 2; - cacheDirty_ = 0; // cacheFlush() will write block if true - cacheMirrorBlock_ = 0; - cacheBlockNumber_ = 0XFFFFFFFF; - - // if part == 0 assume super floppy with FAT boot sector in block zero - // if part > 0 assume mbr volume with partition table - if (part) { - if (part > 4)goto fail; - if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; - part_t* p = &cacheBuffer_.mbr.part[part - 1]; - if ((p->boot & 0X7F) != 0 || - p->totalSectors < 100 || - p->firstSector == 0) { - // not a valid partition - goto fail; - } - volumeStartBlock = p->firstSector; - } - if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) goto fail; - fbs = &cacheBuffer_.fbs32; - if (fbs->bytesPerSector != 512 || - fbs->fatCount == 0 || - fbs->reservedSectorCount == 0 || - fbs->sectorsPerCluster == 0) { - // not valid FAT volume - goto fail; - } - fatCount_ = fbs->fatCount; - blocksPerCluster_ = fbs->sectorsPerCluster; - // determine shift that is same as multiply by blocksPerCluster_ - clusterSizeShift_ = 0; - while (blocksPerCluster_ != _BV(clusterSizeShift_)) { - // error if not power of 2 - if (clusterSizeShift_++ > 7) goto fail; - } - blocksPerFat_ = fbs->sectorsPerFat16 ? - fbs->sectorsPerFat16 : fbs->sectorsPerFat32; - - fatStartBlock_ = volumeStartBlock + fbs->reservedSectorCount; - - // count for FAT16 zero for FAT32 - rootDirEntryCount_ = fbs->rootDirEntryCount; - - // directory start for FAT16 dataStart for FAT32 - rootDirStart_ = fatStartBlock_ + fbs->fatCount * blocksPerFat_; - - // data start for FAT16 and FAT32 - dataStartBlock_ = rootDirStart_ + ((32 * fbs->rootDirEntryCount + 511) / 512); - - // total blocks for FAT16 or FAT32 - totalBlocks = fbs->totalSectors16 ? - fbs->totalSectors16 : fbs->totalSectors32; - - // total data blocks - clusterCount_ = totalBlocks - (dataStartBlock_ - volumeStartBlock); - - // divide by cluster size to get cluster count - clusterCount_ >>= clusterSizeShift_; - - // FAT type is determined by cluster count - if (clusterCount_ < 4085) { - fatType_ = 12; - if (!FAT12_SUPPORT) goto fail; - } - else if (clusterCount_ < 65525) { - fatType_ = 16; - } - else { - rootDirStart_ = fbs->fat32RootCluster; - fatType_ = 32; - } - return true; -fail: - return false; -} -#endif diff --git a/Marlin/SdVolume.h b/Marlin/SdVolume.h deleted file mode 100644 index 990248d..0000000 --- a/Marlin/SdVolume.h +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino SdFat Library - * Copyright (C) 2009 by William Greiman - * - * This file is part of the Arduino Sd2Card Library - */ -#include "Marlin.h" -#if ENABLED(SDSUPPORT) -#ifndef SdVolume_h -#define SdVolume_h -/** - * \file - * \brief SdVolume class - */ -#include "SdFatConfig.h" -#include "Sd2Card.h" -#include "SdFatStructs.h" - -//============================================================================== -// SdVolume class -/** - * \brief Cache for an SD data block - */ -union cache_t { - /** Used to access cached file data blocks. */ - uint8_t data[512]; - /** Used to access cached FAT16 entries. */ - uint16_t fat16[256]; - /** Used to access cached FAT32 entries. */ - uint32_t fat32[128]; - /** Used to access cached directory entries. */ - dir_t dir[16]; - /** Used to access a cached Master Boot Record. */ - mbr_t mbr; - /** Used to access to a cached FAT boot sector. */ - fat_boot_t fbs; - /** Used to access to a cached FAT32 boot sector. */ - fat32_boot_t fbs32; - /** Used to access to a cached FAT32 FSINFO sector. */ - fat32_fsinfo_t fsinfo; -}; -//------------------------------------------------------------------------------ -/** - * \class SdVolume - * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards. - */ -class SdVolume { - public: - /** Create an instance of SdVolume */ - SdVolume() : fatType_(0) {} - /** Clear the cache and returns a pointer to the cache. Used by the WaveRP - * recorder to do raw write to the SD card. Not for normal apps. - * \return A pointer to the cache buffer or zero if an error occurs. - */ - cache_t* cacheClear() { - if (!cacheFlush()) return 0; - cacheBlockNumber_ = 0XFFFFFFFF; - return &cacheBuffer_; - } - /** Initialize a FAT volume. Try partition one first then try super - * floppy format. - * - * \param[in] dev The Sd2Card where the volume is located. - * - * \return The value one, true, is returned for success and - * the value zero, false, is returned for failure. Reasons for - * failure include not finding a valid partition, not finding a valid - * FAT file system or an I/O error. - */ - bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0);} - bool init(Sd2Card* dev, uint8_t part); - - // inline functions that return volume info - /** \return The volume's cluster size in blocks. */ - uint8_t blocksPerCluster() const {return blocksPerCluster_;} - /** \return The number of blocks in one FAT. */ - uint32_t blocksPerFat() const {return blocksPerFat_;} - /** \return The total number of clusters in the volume. */ - uint32_t clusterCount() const {return clusterCount_;} - /** \return The shift count required to multiply by blocksPerCluster. */ - uint8_t clusterSizeShift() const {return clusterSizeShift_;} - /** \return The logical block number for the start of file data. */ - uint32_t dataStartBlock() const {return dataStartBlock_;} - /** \return The number of FAT structures on the volume. */ - uint8_t fatCount() const {return fatCount_;} - /** \return The logical block number for the start of the first FAT. */ - uint32_t fatStartBlock() const {return fatStartBlock_;} - /** \return The FAT type of the volume. Values are 12, 16 or 32. */ - uint8_t fatType() const {return fatType_;} - int32_t freeClusterCount(); - /** \return The number of entries in the root directory for FAT16 volumes. */ - uint32_t rootDirEntryCount() const {return rootDirEntryCount_;} - /** \return The logical block number for the start of the root directory - on FAT16 volumes or the first cluster number on FAT32 volumes. */ - uint32_t rootDirStart() const {return rootDirStart_;} - /** Sd2Card object for this volume - * \return pointer to Sd2Card object. - */ - Sd2Card* sdCard() {return sdCard_;} - /** Debug access to FAT table - * - * \param[in] n cluster number. - * \param[out] v value of entry - * \return true for success or false for failure - */ - bool dbgFat(uint32_t n, uint32_t* v) {return fatGet(n, v);} - //------------------------------------------------------------------------------ - private: - // Allow SdBaseFile access to SdVolume private data. - friend class SdBaseFile; - - // value for dirty argument in cacheRawBlock to indicate read from cache - static bool const CACHE_FOR_READ = false; - // value for dirty argument in cacheRawBlock to indicate write to cache - static bool const CACHE_FOR_WRITE = true; - -#if USE_MULTIPLE_CARDS - cache_t cacheBuffer_; // 512 byte cache for device blocks - uint32_t cacheBlockNumber_; // Logical number of block in the cache - Sd2Card* sdCard_; // Sd2Card object for cache - bool cacheDirty_; // cacheFlush() will write block if true - uint32_t cacheMirrorBlock_; // block number for mirror FAT -#else // USE_MULTIPLE_CARDS - static cache_t cacheBuffer_; // 512 byte cache for device blocks - static uint32_t cacheBlockNumber_; // Logical number of block in the cache - static Sd2Card* sdCard_; // Sd2Card object for cache - static bool cacheDirty_; // cacheFlush() will write block if true - static uint32_t cacheMirrorBlock_; // block number for mirror FAT -#endif // USE_MULTIPLE_CARDS - uint32_t allocSearchStart_; // start cluster for alloc search - uint8_t blocksPerCluster_; // cluster size in blocks - uint32_t blocksPerFat_; // FAT size in blocks - uint32_t clusterCount_; // clusters in one FAT - uint8_t clusterSizeShift_; // shift to convert cluster count to block count - uint32_t dataStartBlock_; // first data block number - uint8_t fatCount_; // number of FATs on volume - uint32_t fatStartBlock_; // start block for first FAT - uint8_t fatType_; // volume type (12, 16, OR 32) - uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir - uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32 - //---------------------------------------------------------------------------- - bool allocContiguous(uint32_t count, uint32_t* curCluster); - uint8_t blockOfCluster(uint32_t position) const { - return (position >> 9) & (blocksPerCluster_ - 1); - } - uint32_t clusterStartBlock(uint32_t cluster) const { - return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); - } - uint32_t blockNumber(uint32_t cluster, uint32_t position) const { - return clusterStartBlock(cluster) + blockOfCluster(position); - } - cache_t* cache() {return &cacheBuffer_;} - uint32_t cacheBlockNumber() {return cacheBlockNumber_;} -#if USE_MULTIPLE_CARDS - bool cacheFlush(); - bool cacheRawBlock(uint32_t blockNumber, bool dirty); -#else // USE_MULTIPLE_CARDS - static bool cacheFlush(); - static bool cacheRawBlock(uint32_t blockNumber, bool dirty); -#endif // USE_MULTIPLE_CARDS - // used by SdBaseFile write to assign cache to SD location - void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) { - cacheDirty_ = dirty; - cacheBlockNumber_ = blockNumber; - } - void cacheSetDirty() {cacheDirty_ |= CACHE_FOR_WRITE;} - bool chainSize(uint32_t beginCluster, uint32_t* size); - bool fatGet(uint32_t cluster, uint32_t* value); - bool fatPut(uint32_t cluster, uint32_t value); - bool fatPutEOC(uint32_t cluster) { - return fatPut(cluster, 0x0FFFFFFF); - } - bool freeChain(uint32_t cluster); - bool isEOC(uint32_t cluster) const { - if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN; - if (fatType_ == 16) return cluster >= FAT16EOC_MIN; - return cluster >= FAT32EOC_MIN; - } - bool readBlock(uint32_t block, uint8_t* dst) { - return sdCard_->readBlock(block, dst); - } - bool writeBlock(uint32_t block, const uint8_t* dst) { - return sdCard_->writeBlock(block, dst); - } - //------------------------------------------------------------------------------ - // Deprecated functions - suppress cpplint warnings with NOLINT comment -#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) - public: - /** \deprecated Use: bool SdVolume::init(Sd2Card* dev); - * \param[in] dev The SD card where the volume is located. - * \return true for success or false for failure. - */ - bool init(Sd2Card& dev) {return init(&dev);} // NOLINT - /** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol); - * \param[in] dev The SD card where the volume is located. - * \param[in] part The partition to be used. - * \return true for success or false for failure. - */ - bool init(Sd2Card& dev, uint8_t part) { // NOLINT - return init(&dev, part); - } -#endif // ALLOW_DEPRECATED_FUNCTIONS -}; -#endif // SdVolume -#endif diff --git a/Marlin/Ultrasonic.cpp b/Marlin/Ultrasonic.cpp deleted file mode 100644 index 0387771..0000000 --- a/Marlin/Ultrasonic.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Ultrasonic.h - Ultrasonic driver Library - 2011 Copyright (c) Seeed Technology Inc. All right reserved. - For Ultrasonic v1.0 firmware. - - Original Author: LG - - 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 -#include -#include -#include "Ultrasonic.h" - -#if defined(ARDUINO) && ARDUINO >= 100 -#include "Arduino.h" -#else -#include "WProgram.h" -#endif - -Ultrasonic::Ultrasonic(int pin) -{ - _pin = pin; -} -void Ultrasonic::MeasureInCentimeters(void) -{ - pinMode(_pin, OUTPUT); - digitalWrite(_pin, LOW); - delayMicroseconds(2); - digitalWrite(_pin, HIGH); - delayMicroseconds(5); - digitalWrite(_pin,LOW); - pinMode(_pin,INPUT); - duration = pulseIn(_pin,HIGH); - RangeInCentimeters = duration/29/2; -} -void Ultrasonic::MeasureInInches(void) -{ - pinMode(_pin, OUTPUT); - digitalWrite(_pin, LOW); - delayMicroseconds(2); - digitalWrite(_pin, HIGH); - delayMicroseconds(5); - digitalWrite(_pin,LOW); - pinMode(_pin,INPUT); - duration = pulseIn(_pin,HIGH); - RangeInInches = duration/74/2; -} \ No newline at end of file diff --git a/Marlin/Ultrasonic.h b/Marlin/Ultrasonic.h deleted file mode 100644 index 9006a41..0000000 --- a/Marlin/Ultrasonic.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Ultrasonic.h - Ultrasonic driver Library - 2011 Copyright (c) Seeed Technology Inc. All right reserved. - For Ultrasonic v1.0 firmware. - - Original Author: LG - - 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 Ultrasonic_H -#define Ultrasonic_H - -class Ultrasonic -{ - public: - Ultrasonic(int pin); - long RangeInCentimeters; - long RangeInInches; - long duration; - void MeasureInCentimeters(void); - void MeasureInInches(void); - private: - int _pin; -}; -#endif diff --git a/Marlin/Version.h b/Marlin/Version.h deleted file mode 100644 index 520835e..0000000 --- a/Marlin/Version.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * This file is the standard Marlin version identifier file, all fields can be - * overriden by the ones defined on _Version.h by using the Configuration.h - * directive USE_AUTOMATIC_VERSIONING. - */ - -#if ENABLED(USE_AUTOMATIC_VERSIONING) - - #include "_Version.h" - -#else - - /** - * Marlin release version identifier - */ - #define SHORT_BUILD_VERSION "1.1.0-RC7" - - /** - * Verbose version identifier which should contain a reference to the location - * from where the binary was downloaded or the source code was compiled. - */ - #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)" - - /** - * The STRING_DISTRIBUTION_DATE represents when the binary file was built, - * here we define this default string as the date where the latest release - * version was tagged. - */ - #define STRING_DISTRIBUTION_DATE "2016-07-31 12:00" - - /** - * Required minimum Configuration.h and Configuration_adv.h file versions. - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on - * the configuration files. - */ - #define REQUIRED_CONFIGURATION_H_VERSION 010100 - #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100 - - /** - * @todo: Missing documentation block - */ - #define PROTOCOL_VERSION "1.0" - - /** - * Defines a generic printer name to be output to the LCD after booting Marlin. - */ - #define MACHINE_NAME "3D Printer" - - /** - * The SOURCE_CODE_URL is the location where users will find the Marlin Source - * Code which is installed on the device. In most cases —unless the manufacturer - * has a distinct Github fork— the Source Code URL should just be the main - * Marlin repository. - */ - #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin" - - /** - * Default generic printer UUID. - */ - #define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff" - - /** - * The WEBSITE_URL is the location where users can get more information such as - * documentation about a specific Marlin release. - */ - #define WEBSITE_URL "http://marlinfw.org" - -#endif // USE_AUTOMATIC_VERSIONING diff --git a/Marlin/X_IIC.cpp b/Marlin/X_IIC.cpp deleted file mode 100644 index 74969f6..0000000 --- a/Marlin/X_IIC.cpp +++ /dev/null @@ -1,217 +0,0 @@ -#include "X_IIC.h" - -#define X_SDA_SET PORTD |= 0x20 -#define X_SDA_CLEAR PORTD &= 0xDF -#define X_SCL_SET PORTD |= 0x40 -#define X_SCL_CLEAR PORTD &= 0xBF - -#define X_SDA_INPUT DDRD &= 0xDF -#define X_SDA_OUTPUT DDRD |= 0x20 - -#define X_SCL_INPUT DDRD &= 0xBF -#define X_SCL_OUTPUT DDRD |= 0x40 - -#define X_SDA_READ PIND & 0x20 - -#define X_PORT_DDR DDRD - - -#define X_SCK_H {X_SCL_SET; } -#define X_SCK_L {X_SCL_CLEAR; } -#define X_SDA_H {X_SDA_OUTPUT;X_SDA_SET; } -#define X_SDA_L {X_SDA_OUTPUT;X_SDA_CLEAR; } - -#define X_READ_SDA X_SDA_READ - -#define AS5600_DEFAULT_ADDRESS 0x36 - - - - -void X_IIC_Init(void) -{ - -X_SDA_OUTPUT; -X_SCL_OUTPUT; -X_SDA_SET; -X_SCL_SET; -} - - -void X_IIC_Start(void) -{ - X_SDA_H; - X_SCK_H; - delayMicroseconds(5); - X_SDA_L; - delayMicroseconds(5); - - X_SCK_L; - delayMicroseconds(2); - -} - - -void X_IIC_Stop(void) -{ - X_SCK_L; - X_SDA_L; - delayMicroseconds(5); - X_SCK_H; - delayMicroseconds(5); - X_SDA_H; - delayMicroseconds(5); - - -} - - -u8 X_IIC_Wait_Ack(void) -{ - u8 ucErrTime=0; - X_SDA_H;delayMicroseconds(2); - X_SCK_H;delayMicroseconds(2); - - - X_SDA_INPUT; - - while(X_READ_SDA) - { - ucErrTime++; - if(ucErrTime>250) - { - X_IIC_Stop(); - return 1; - } - } - - X_SCK_L; - delayMicroseconds(2); - return 0; -} - - -void X_IIC_Ack(void) -{ - X_SCK_L; - X_SDA_L; - delayMicroseconds(2); - X_SCK_H; - delayMicroseconds(5); - - X_SCK_L; - delayMicroseconds(2); - X_SDA_H; - delayMicroseconds(2); -} - - -void X_IIC_Nack(void) -{ - X_SCK_L; - X_SDA_H; - delayMicroseconds(2); - X_SCK_H; - delayMicroseconds(5); - - X_SCK_L; - delayMicroseconds(2); - X_SDA_H; - delayMicroseconds(2); -} - - -void X_IIC_SendByte(u8 Txdata) -{ - u8 i; - for(i=0;i<8;i++) - { - X_SCK_L; - if(Txdata&0x80) - X_SDA_H - else - X_SDA_L - delayMicroseconds(5); - X_SCK_H; - delayMicroseconds(5); - X_SCK_L; - Txdata<<=1; - delayMicroseconds(5); - } - - delayMicroseconds(2); - X_SDA_H; - delayMicroseconds(2); -} - -u8 X_IIC_ReadByte(u8 ack) -{ - u8 i,receive=0; - - delayMicroseconds(2); - X_SDA_H; - delayMicroseconds(2); - - for(i=0;i<8;i++) - { - X_SCK_L; - delayMicroseconds(5); - X_SCK_H; - receive<<=1; - delayMicroseconds(5); - X_SDA_INPUT; - - if(X_READ_SDA) - receive|=0x01; - else - receive&=0xfe; - delayMicroseconds(5); - } - if(!ack) - X_IIC_Nack(); - else - X_IIC_Ack(); - - X_SCK_L; - delayMicroseconds(2); - - return receive; -} - -void X_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata) -{ - X_IIC_Start(); - X_IIC_SendByte(deviceaddr&0xfe); - X_IIC_Wait_Ack(); - X_IIC_SendByte(writeaddr); - X_IIC_Wait_Ack(); - X_IIC_SendByte(writedata); - X_IIC_Wait_Ack(); - X_IIC_Stop(); - delay(10); -} - - - -u8 X_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr) -{ - u8 temp; - X_IIC_Start(); - X_IIC_SendByte(deviceaddr&0xfe); - X_IIC_Wait_Ack(); - X_IIC_SendByte(readaddr); - X_IIC_Wait_Ack(); - - X_IIC_Start(); - X_IIC_SendByte(deviceaddr|0x01); - X_IIC_Wait_Ack(); - temp=X_IIC_ReadByte(0); - X_IIC_Stop(); - return temp; -} - - - - - - diff --git a/Marlin/X_IIC.h b/Marlin/X_IIC.h deleted file mode 100644 index b56a030..0000000 --- a/Marlin/X_IIC.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _X_IIC_H -#define _X_IIC_H - -#include - -void X_IIC_Init(void); - -void X_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata); - -u8 X_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr); - - -#endif // _X_IIC_H \ No newline at end of file diff --git a/Marlin/Y_IIC.cpp b/Marlin/Y_IIC.cpp deleted file mode 100644 index 39d2342..0000000 --- a/Marlin/Y_IIC.cpp +++ /dev/null @@ -1,202 +0,0 @@ - -#include "Y_IIC.h" - -#define Y_SCK_PIN 34 -#define Y_SDA_PIN 36 -#define Y_SCK_H {digitalWrite(Y_SCK_PIN,1); } -#define Y_SCK_L {digitalWrite(Y_SCK_PIN,0); } -#define Y_SDA_H {pinMode(Y_SDA_PIN,OUTPUT);digitalWrite(Y_SDA_PIN,1); } -#define Y_SDA_L {pinMode(Y_SDA_PIN,OUTPUT);digitalWrite(Y_SDA_PIN,0); } - -#define Y_READ_SDA digitalRead(Y_SDA_PIN) - -#define AS5600_DEFAULT_ADDRESS 0x36 - - - - - - -void Y_IIC_Init(void) -{ - pinMode(Y_SCK_PIN, OUTPUT); - pinMode(Y_SDA_PIN, OUTPUT);//INPUT, - digitalWrite(Y_SCK_PIN,1); - digitalWrite(Y_SDA_PIN,1);//digitalRead() -} - - -void Y_IIC_Start(void) -{ - Y_SDA_H; - Y_SCK_H; - delayMicroseconds(5); - Y_SDA_L; - delayMicroseconds(5); - - Y_SCK_L; - delayMicroseconds(2); - -} - - -void Y_IIC_Stop(void) -{ - Y_SCK_L; - Y_SDA_L; - delayMicroseconds(5); - Y_SCK_H; - delayMicroseconds(5); - Y_SDA_H; - delayMicroseconds(5); - - -} - - -u8 Y_IIC_Wait_Ack(void) -{ - u8 ucErrTime=0; - Y_SDA_H;delayMicroseconds(2); - Y_SCK_H;delayMicroseconds(2); - - pinMode(Y_SDA_PIN, INPUT); - while(Y_READ_SDA) - { - ucErrTime++; - if(ucErrTime>250) - { - Y_IIC_Stop(); - return 1; - } - } - - Y_SCK_L; - delayMicroseconds(2); - return 0; -} - - -void Y_IIC_Ack(void) -{ - Y_SCK_L; - Y_SDA_L; - delayMicroseconds(2); - Y_SCK_H; - delayMicroseconds(5); - - Y_SCK_L; - delayMicroseconds(2); - Y_SDA_H; - delayMicroseconds(2); -} - - -void Y_IIC_Nack(void) -{ - Y_SCK_L; - Y_SDA_H; - delayMicroseconds(2); - Y_SCK_H; - delayMicroseconds(5); - - Y_SCK_L; - delayMicroseconds(2); - Y_SDA_H; - delayMicroseconds(2); -} - - -void Y_IIC_SendByte(u8 Txdata) -{ - u8 i; - for(i=0;i<8;i++) - { - Y_SCK_L; - if(Txdata&0x80) - Y_SDA_H - else - Y_SDA_L - delayMicroseconds(5); - Y_SCK_H; - delayMicroseconds(5); - Y_SCK_L; - Txdata<<=1; - delayMicroseconds(5); - } - - delayMicroseconds(2); - Y_SDA_H; - delayMicroseconds(2); -} - -u8 Y_IIC_ReadByte(u8 ack) -{ - u8 i,receive=0; - - delayMicroseconds(2); - Y_SDA_H; - delayMicroseconds(2); - - for(i=0;i<8;i++) - { - Y_SCK_L; - delayMicroseconds(5); - Y_SCK_H; - receive<<=1; - delayMicroseconds(5); - pinMode(Y_SDA_PIN, INPUT); - if(Y_READ_SDA) - receive|=0x01; - else - receive&=0xfe; - delayMicroseconds(5); - } - if(!ack) - Y_IIC_Nack(); - else - Y_IIC_Ack(); - - Y_SCK_L; - delayMicroseconds(2); - - return receive; -} - -void Y_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata) -{ - Y_IIC_Start(); - Y_IIC_SendByte(deviceaddr&0xfe); - Y_IIC_Wait_Ack(); - Y_IIC_SendByte(writeaddr); - Y_IIC_Wait_Ack(); - Y_IIC_SendByte(writedata); - Y_IIC_Wait_Ack(); - Y_IIC_Stop(); - delay(10); -} - - -//res1 = Y_IIC_Read_OneByte((0x36<<1),0x0f); -u8 Y_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr) -{ - u8 temp; - Y_IIC_Start(); - Y_IIC_SendByte(deviceaddr&0xfe); - Y_IIC_Wait_Ack(); - Y_IIC_SendByte(readaddr); - Y_IIC_Wait_Ack(); - - Y_IIC_Start(); - Y_IIC_SendByte(deviceaddr|0x01); - Y_IIC_Wait_Ack(); - temp=Y_IIC_ReadByte(0); - Y_IIC_Stop(); - return temp; -} - - - - - - diff --git a/Marlin/Y_IIC.h b/Marlin/Y_IIC.h deleted file mode 100644 index 300f27c..0000000 --- a/Marlin/Y_IIC.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _Y_IIC_H -#define _Y_IIC_H - -#include - -void Y_IIC_Init(void); - -void Y_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata); - -u8 Y_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr); - - -#endif // _Y_IIC_H \ No newline at end of file diff --git a/Marlin/Z_IIC.cpp b/Marlin/Z_IIC.cpp deleted file mode 100644 index dbc6222..0000000 --- a/Marlin/Z_IIC.cpp +++ /dev/null @@ -1,213 +0,0 @@ -#include "Z_IIC.h" - -#define Z_SDA_SET PORTH |= 0x04 -#define Z_SDA_CLEAR PORTH &= 0xFB -#define Z_SCL_SET PORTH |= 0x80 -#define Z_SCL_CLEAR PORTH &= 0x7F - -#define Z_SDA_INPUT DDRH &= 0xFB -#define Z_SDA_OUTPUT DDRH |= 0x04 - -#define Z_SCL_INPUT DDRH &= 0x7F -#define Z_SCL_OUTPUT DDRH |= 0x80 - -#define Z_SDA_READ PINH & 0x04 - -#define Z_PORT_DDR DDRH - -#define Z_SCK_H {Z_SCL_SET; } -#define Z_SCK_L {Z_SCL_CLEAR; } -#define Z_SDA_H {Z_SDA_OUTPUT;Z_SDA_SET; } -#define Z_SDA_L {Z_SDA_OUTPUT;Z_SDA_CLEAR; } - -#define Z_READ_SDA Z_SDA_READ - -#define AS5600_DEFAULT_ADDRESS 0x36 - - -void Z_IIC_Init(void) -{ - Z_SDA_OUTPUT; - Z_SCL_OUTPUT; - Z_SDA_SET; - Z_SCL_SET; -} - - -void Z_IIC_Start(void) -{ - Z_SDA_H; - Z_SCK_H; - delayMicroseconds(5); - Z_SDA_L; - delayMicroseconds(5); - - Z_SCK_L; - delayMicroseconds(2); - -} - - -void Z_IIC_Stop(void) -{ - Z_SCK_L; - Z_SDA_L; - delayMicroseconds(5); - Z_SCK_H; - delayMicroseconds(5); - Z_SDA_H; - delayMicroseconds(5); - - -} - - -u8 Z_IIC_Wait_Ack(void) -{ - u8 ucErrTime=0; - Z_SDA_H;delayMicroseconds(2); - Z_SCK_H;delayMicroseconds(2); - - - Z_SDA_INPUT; - - while(Z_READ_SDA) - { - ucErrTime++; - if(ucErrTime>250) - { - Z_IIC_Stop(); - return 1; - } - } - - Z_SCK_L; - delayMicroseconds(2); - return 0; -} - - -void Z_IIC_Ack(void) -{ - Z_SCK_L; - Z_SDA_L; - delayMicroseconds(2); - Z_SCK_H; - delayMicroseconds(5); - - Z_SCK_L; - delayMicroseconds(2); - Z_SDA_H; - delayMicroseconds(2); -} - - -void Z_IIC_Nack(void) -{ - Z_SCK_L; - Z_SDA_H; - delayMicroseconds(2); - Z_SCK_H; - delayMicroseconds(5); - - Z_SCK_L; - delayMicroseconds(2); - Z_SDA_H; - delayMicroseconds(2); -} - - -void Z_IIC_SendByte(u8 Txdata) -{ - u8 i; - for(i=0;i<8;i++) - { - Z_SCK_L; - if(Txdata&0x80) - Z_SDA_H - else - Z_SDA_L - delayMicroseconds(5); - Z_SCK_H; - delayMicroseconds(5); - Z_SCK_L; - Txdata<<=1; - delayMicroseconds(5); - } - - delayMicroseconds(2); - Z_SDA_H; - delayMicroseconds(2); -} - -u8 Z_IIC_ReadByte(u8 ack) -{ - u8 i,receive=0; - - delayMicroseconds(2); - Z_SDA_H; - delayMicroseconds(2); - - for(i=0;i<8;i++) - { - Z_SCK_L; - delayMicroseconds(5); - Z_SCK_H; - receive<<=1; - delayMicroseconds(5); - Z_SDA_INPUT; - - if(Z_READ_SDA) - receive|=0x01; - else - receive&=0xfe; - delayMicroseconds(5); - } - if(!ack) - Z_IIC_Nack(); - else - Z_IIC_Ack(); - - Z_SCK_L; - delayMicroseconds(2); - - return receive; -} - -void Z_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata) -{ - Z_IIC_Start(); - Z_IIC_SendByte(deviceaddr&0xfe); - Z_IIC_Wait_Ack(); - Z_IIC_SendByte(writeaddr); - Z_IIC_Wait_Ack(); - Z_IIC_SendByte(writedata); - Z_IIC_Wait_Ack(); - Z_IIC_Stop(); - delay(10); -} - - - -u8 Z_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr) -{ - u8 temp; - Z_IIC_Start(); - Z_IIC_SendByte(deviceaddr&0xfe); - Z_IIC_Wait_Ack(); - Z_IIC_SendByte(readaddr); - Z_IIC_Wait_Ack(); - - Z_IIC_Start(); - Z_IIC_SendByte(deviceaddr|0x01); - Z_IIC_Wait_Ack(); - temp=Z_IIC_ReadByte(0); - Z_IIC_Stop(); - return temp; -} - - - - - - diff --git a/Marlin/Z_IIC.h b/Marlin/Z_IIC.h deleted file mode 100644 index 2846424..0000000 --- a/Marlin/Z_IIC.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _Z_IIC_H -#define _Z_IIC_H - -#include - -void Z_IIC_Init(void); - -void Z_IIC_Write_OneByte(u8 deviceaddr,u8 writeaddr,u8 writedata); - -u8 Z_IIC_Read_OneByte(u8 deviceaddr,u8 readaddr); - - -#endif // _Z_IIC_H \ No newline at end of file diff --git a/Marlin/blinkm.cpp b/Marlin/blinkm.cpp deleted file mode 100644 index c495a5d..0000000 --- a/Marlin/blinkm.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * blinkm.cpp - Library for controlling a BlinkM over i2c - * Created by Tim Koster, August 21 2013. - */ - -#include "Marlin.h" - -#if ENABLED(BLINKM) - -#include "blinkm.h" - -void SendColors(byte red, byte grn, byte blu) { - Wire.begin(); - Wire.beginTransmission(0x09); - Wire.write('o'); //to disable ongoing script, only needs to be used once - Wire.write('n'); - Wire.write(red); - Wire.write(grn); - Wire.write(blu); - Wire.endTransmission(); -} - -#endif //BLINKM - diff --git a/Marlin/blinkm.h b/Marlin/blinkm.h deleted file mode 100644 index ed2ad79..0000000 --- a/Marlin/blinkm.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * blinkm.h - Library for controlling a BlinkM over i2c - * Created by Tim Koster, August 21 2013. - */ - -#include "Arduino.h" -#include "Wire.h" - -void SendColors(byte red, byte grn, byte blu); diff --git a/Marlin/boards.h b/Marlin/boards.h deleted file mode 100644 index dae3a1c..0000000 --- a/Marlin/boards.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef BOARDS_H -#define BOARDS_H - -#define BOARD_UNKNOWN -1 - -#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics" -#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2 -#define BOARD_GEN7_13 12 // Gen7 v1.3 -#define BOARD_GEN7_14 13 // Gen7 v1.4 -#define BOARD_CNCONTROLS_11 111 // Cartesio CN Controls V11 -#define BOARD_CNCONTROLS_12 112 // Cartesio CN Controls V12 -#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0 -#define BOARD_SETHI 20 // Sethi 3D_1 -#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2 -#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed) -#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed) -#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1) -#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan) -#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan) -#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like) -#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard -#define BOARD_RIGIDBOARD_V2 52 // Invent-A-Part RigidBoard V2 -#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed) -#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed) -#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1) -#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan) -#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan) -#define BOARD_GEN6 5 // Gen6 -#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe -#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2 -#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above -#define BOARD_MELZI 63 // Melzi -#define BOARD_STB_11 64 // STB V1.1 -#define BOARD_AZTEEG_X1 65 // Azteeg X1 -#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version) -#define BOARD_AZTEEG_X3 67 // Azteeg X3 -#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro -#define BOARD_ULTIMAKER 7 // Ultimaker -#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) -#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) -#define BOARD_3DRAG 77 // 3Drag Controller -#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 3Drag Controller) -#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller) -#define BOARD_TEENSYLU 8 // Teensylu -#define BOARD_RUMBA 80 // Rumba -#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286) -#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286) -#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646) -#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286) -#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make -#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286) -#define BOARD_GEN3_PLUS 9 // Gen3+ -#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics -#define BOARD_MEGATRONICS 70 // Megatronics -#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0 -#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1 -#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0 -#define BOARD_OMCA_A 90 // Alpha OMCA board -#define BOARD_OMCA 91 // Final OMCA board -#define BOARD_RAMBO 301 // Rambo -#define BOARD_MINIRAMBO 302 // Mini-Rambo -#define BOARD_AJ4P 303 // AJ4P -#define BOARD_MEGACONTROLLER 310 // Mega controller -#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3) -#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board -#define BOARD_LEAPFROG 999 // Leapfrog -#define BOARD_MKS_BASE 40 // MKS BASE 1.0 -#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher) -#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board -#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers -#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers -#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D - -#define BOARD_SWIFT_10 510 // Swift - -#define BOARD_99 99 // This is in pins.h but...? - -#define MB(board) (MOTHERBOARD==BOARD_##board) - -#endif //__BOARDS_H diff --git a/Marlin/buzzer.h b/Marlin/buzzer.h deleted file mode 100644 index 199d64e..0000000 --- a/Marlin/buzzer.h +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __BUZZER_H__ -#define __BUZZER_H__ - -#include "types.h" -#include "fastio.h" -#include "circularqueue.h" -#include "temperature.h" - -#include "MarlinConfig.h" - -#define TONE_QUEUE_LENGTH 4 - -/** - * @brief Tone structure - * @details Simple abstraction of a tone based on a duration and a frequency. - */ -struct tone_t { - uint16_t duration; - uint16_t frequency; -}; - -/** - * @brief Buzzer class - */ -class Buzzer { - private: - struct state_t { - tone_t tone; - uint32_t endtime; - } state; - - protected: - CircularQueue buffer; - - /** - * @brief Inverts the sate of a digital PIN - * @details This will invert the current state of an digital IO pin. - */ - void invert() { - TOGGLE(BEEPER_PIN); - } - - /** - * @brief Turn off a digital PIN - * @details Alias of digitalWrite(PIN, LOW) using FastIO - */ - void off() { - WRITE(BEEPER_PIN, LOW); - } - - /** - * @brief Turn on a digital PIN - * @details Alias of digitalWrite(PIN, HIGH) using FastIO - */ - void on() { - WRITE(BEEPER_PIN, HIGH); - } - - /** - * @brief Resets the state of the class - * @details Brings the class state to a known one. - */ - void reset() { - this->off(); - this->state.endtime = 0; - } - - public: - /** - * @brief Class constructor - */ - Buzzer() { - SET_OUTPUT(BEEPER_PIN); - this->reset(); - } - - /** - * @brief Add a tone to the queue - * @details Adds a tone_t structure to the ring buffer, will block IO if the - * queue is full waiting for one slot to get available. - * - * @param duration Duration of the tone in milliseconds - * @param frequency Frequency of the tone in hertz - */ - void tone(uint16_t const &duration, uint16_t const &frequency = 0) { - while (buffer.isFull()) { - this->tick(); - thermalManager.manage_heater(); - } - this->buffer.enqueue((tone_t) { duration, frequency }); - } - - /** - * @brief Loop function - * @details This function should be called at loop, it will take care of - * playing the tones in the queue. - */ - virtual void tick() { - const millis_t now = millis(); - - if (!this->state.endtime) { - if (this->buffer.isEmpty()) return; - - this->state.tone = this->buffer.dequeue(); - this->state.endtime = now + this->state.tone.duration; - - if (this->state.tone.frequency > 0) { - #if ENABLED(SPEAKER) - CRITICAL_SECTION_START; - ::tone(BEEPER_PIN, this->state.tone.frequency, this->state.tone.duration); - CRITICAL_SECTION_END; - #else - this->on(); - #endif - } - } - else if (ELAPSED(now, this->state.endtime)) this->reset(); - } -}; - -extern Buzzer buzzer; - -#endif diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp deleted file mode 100644 index 65b4093..0000000 --- a/Marlin/cardreader.cpp +++ /dev/null @@ -1,624 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "cardreader.h" - -#include "ultralcd.h" -#include "stepper.h" -#include "temperature.h" -#include "language.h" - -#include "Marlin.h" - -#if ENABLED(SDSUPPORT) - -CardReader::CardReader() { - filesize = 0; - sdpos = 0; - sdprinting = false; - cardOK = false; - saving = false; - logging = false; - workDirDepth = 0; - file_subcall_ctr = 0; - memset(workDirParents, 0, sizeof(workDirParents)); - - autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software. - autostart_index = 0; - - //power to SD reader - #if SDPOWER > -1 - OUT_WRITE(SDPOWER, HIGH); - #endif //SDPOWER - - next_autostart_ms = millis() + 5000; -} - -char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters - char *pos = buffer; - for (uint8_t i = 0; i < 11; i++) { - if (p.name[i] == ' ') continue; - if (i == 8) *pos++ = '.'; - *pos++ = p.name[i]; - } - *pos++ = 0; - return buffer; -} - -/** - * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction: - * LS_Count - Add +1 to nrFiles for every file within the parent - * LS_GetFilename - Get the filename of the file indexed by nrFiles - * LS_SerialPrint - Print the full path of each file to serial output - */ -void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) { - dir_t p; - uint8_t cnt = 0; - - // Read the next entry from a directory - while (parent.readDir(p, longFilename) > 0) { - - // If the entry is a directory and the action is LS_SerialPrint - if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) { - - // Get the short name for the item, which we know is a folder - char lfilename[FILENAME_LENGTH]; - createFilename(lfilename, p); - - // Allocate enough stack space for the full path to a folder, trailing slash, and nul - boolean prepend_is_empty = (prepend[0] == '\0'); - int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(lfilename) + 1 + 1; - char path[len]; - - // Append the FOLDERNAME12/ to the passed string. - // It contains the full path to the "parent" argument. - // We now have the full path to the item in this folder. - strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty - strcat(path, lfilename); // FILENAME_LENGTH-1 characters maximum - strcat(path, "/"); // 1 character - - // Serial.print(path); - - // Get a new directory object using the full path - // and dive recursively into it. - SdFile dir; - if (!dir.open(parent, lfilename, O_READ)) { - if (lsAction == LS_SerialPrint) { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR); - SERIAL_ECHOLN(lfilename); - } - } - lsDive(path, dir); - // close() is done automatically by destructor of SdFile - } - else { - uint8_t pn0 = p.name[0]; - if (pn0 == DIR_NAME_FREE) break; - if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue; - if (longFilename[0] == '.') continue; - - if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue; - - filenameIsDir = DIR_IS_SUBDIR(&p); - - if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue; - - switch (lsAction) { - case LS_Count: - nrFiles++; - break; - case LS_SerialPrint: - createFilename(filename, p); - SERIAL_PROTOCOL(prepend); - SERIAL_PROTOCOLLN(filename); - break; - case LS_GetFilename: - createFilename(filename, p); - if (match != NULL) { - if (strcasecmp(match, filename) == 0) return; - } - else if (cnt == nrFiles) return; - cnt++; - break; - } - - } - } // while readDir -} - -void CardReader::ls() { - lsAction = LS_SerialPrint; - root.rewind(); - lsDive("", root); -} - -#if ENABLED(LONG_FILENAME_HOST_SUPPORT) - - /** - * Get a long pretty path based on a DOS 8.3 path - */ - void CardReader::printLongPath(char *path) { - lsAction = LS_GetFilename; - - int i, pathLen = strlen(path); - - // SERIAL_ECHOPGM("Full Path: "); SERIAL_ECHOLN(path); - - // Zero out slashes to make segments - for (i = 0; i < pathLen; i++) if (path[i] == '/') path[i] = '\0'; - - SdFile diveDir = root; // start from the root for segment 1 - for (i = 0; i < pathLen;) { - - if (path[i] == '\0') i++; // move past a single nul - - char *segment = &path[i]; // The segment after most slashes - - // If a segment is empty (extra-slash) then exit - if (!*segment) break; - - // Go to the next segment - while (path[++i]) { } - - // SERIAL_ECHOPGM("Looking for segment: "); SERIAL_ECHOLN(segment); - - // Find the item, setting the long filename - diveDir.rewind(); - lsDive("", diveDir, segment); - - // Print /LongNamePart to serial output - SERIAL_PROTOCOLCHAR('/'); - SERIAL_PROTOCOL(longFilename[0] ? longFilename : "???"); - - // If the filename was printed then that's it - if (!filenameIsDir) break; - - // SERIAL_ECHOPGM("Opening dir: "); SERIAL_ECHOLN(segment); - - // Open the sub-item as the new dive parent - SdFile dir; - if (!dir.open(diveDir, segment, O_READ)) { - SERIAL_EOL; - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR); - SERIAL_ECHO(segment); - break; - } - - diveDir.close(); - diveDir = dir; - - } // while i SD_PROCEDURE_DEPTH - 1) { - SERIAL_ERROR_START; - SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:"); - SERIAL_ERRORLN(SD_PROCEDURE_DEPTH); - kill(PSTR(MSG_KILLED)); - return; - } - - SERIAL_ECHO_START; - SERIAL_ECHOPGM("SUBROUTINE CALL target:\""); - SERIAL_ECHO(name); - SERIAL_ECHOPGM("\" parent:\""); - - //store current filename and position - getAbsFilename(proc_filenames[file_subcall_ctr]); - - SERIAL_ECHO(proc_filenames[file_subcall_ctr]); - SERIAL_ECHOPGM("\" pos"); - SERIAL_ECHOLN(sdpos); - filespos[file_subcall_ctr] = sdpos; - file_subcall_ctr++; - } - else { - SERIAL_ECHO_START; - SERIAL_ECHOPGM("Now doing file: "); - SERIAL_ECHOLN(name); - } - file.close(); - } - else { //opening fresh file - file_subcall_ctr = 0; //resetting procedure depth in case user cancels print while in procedure - SERIAL_ECHO_START; - SERIAL_ECHOPGM("Now fresh file: "); - SERIAL_ECHOLN(name); - } - sdprinting = false; - - SdFile myDir; - curDir = &root; - char *fname = name; - - char *dirname_start, *dirname_end; - if (name[0] == '/') { - dirname_start = &name[1]; - while (dirname_start != NULL) { - dirname_end = strchr(dirname_start, '/'); - //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name)); - //SERIAL_ECHOPGM("end :");SERIAL_ECHOLN((int)(dirname_end - name)); - if (dirname_end != NULL && dirname_end > dirname_start) { - char subdirname[FILENAME_LENGTH]; - strncpy(subdirname, dirname_start, dirname_end - dirname_start); - subdirname[dirname_end - dirname_start] = 0; - SERIAL_ECHOLN(subdirname); - if (!myDir.open(curDir, subdirname, O_READ)) { - SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); - SERIAL_PROTOCOL(subdirname); - SERIAL_PROTOCOLCHAR('.'); - return; - } - else { - //SERIAL_ECHOLNPGM("dive ok"); - } - - curDir = &myDir; - dirname_start = dirname_end + 1; - } - else { // the remainder after all /fsa/fdsa/ is the filename - fname = dirname_start; - //SERIAL_ECHOLNPGM("remainder"); - //SERIAL_ECHOLN(fname); - break; - } - } - } - else { //relative path - curDir = &workDir; - } - - if (read) { - if (file.open(curDir, fname, O_READ)) { - filesize = file.fileSize(); - SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname); - SERIAL_PROTOCOLPAIR(MSG_SD_SIZE, filesize); - SERIAL_EOL; - sdpos = 0; - - SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED); - getfilename(0, fname); - lcd_setstatus(longFilename[0] ? longFilename : fname); - } - else { - SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname); - SERIAL_PROTOCOLCHAR('.'); - SERIAL_EOL; - } - } - else { //write - if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { - SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname); - SERIAL_PROTOCOLCHAR('.'); - SERIAL_EOL; - } - else { - saving = true; - SERIAL_PROTOCOLPAIR(MSG_SD_WRITE_TO_FILE, name); - SERIAL_EOL; - lcd_setstatus(fname); - } - } -} - -void CardReader::removeFile(char* name) { - if (!cardOK) return; - - file.close(); - sdprinting = false; - - SdFile myDir; - curDir = &root; - char *fname = name; - - char *dirname_start, *dirname_end; - if (name[0] == '/') { - dirname_start = strchr(name, '/') + 1; - while (dirname_start != NULL) { - dirname_end = strchr(dirname_start, '/'); - //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name)); - //SERIAL_ECHOPGM("end :");SERIAL_ECHOLN((int)(dirname_end - name)); - if (dirname_end != NULL && dirname_end > dirname_start) { - char subdirname[FILENAME_LENGTH]; - strncpy(subdirname, dirname_start, dirname_end - dirname_start); - subdirname[dirname_end - dirname_start] = 0; - SERIAL_ECHOLN(subdirname); - if (!myDir.open(curDir, subdirname, O_READ)) { - SERIAL_PROTOCOLPAIR("open failed, File: ", subdirname); - SERIAL_PROTOCOLCHAR('.'); - return; - } - else { - //SERIAL_ECHOLNPGM("dive ok"); - } - - curDir = &myDir; - dirname_start = dirname_end + 1; - } - else { // the remainder after all /fsa/fdsa/ is the filename - fname = dirname_start; - //SERIAL_ECHOLNPGM("remainder"); - //SERIAL_ECHOLN(fname); - break; - } - } - } - else { // relative path - curDir = &workDir; - } - - if (file.remove(curDir, fname)) { - SERIAL_PROTOCOLPGM("File deleted:"); - SERIAL_PROTOCOLLN(fname); - sdpos = 0; - } - else { - SERIAL_PROTOCOLPGM("Deletion failed, File: "); - SERIAL_PROTOCOL(fname); - SERIAL_PROTOCOLCHAR('.'); - } -} - -void CardReader::getStatus() { - if (cardOK) { - SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE); - SERIAL_PROTOCOL(sdpos); - SERIAL_PROTOCOLCHAR('/'); - SERIAL_PROTOCOLLN(filesize); - } - else { - SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING); - } -} - -void CardReader::write_command(char *buf) { - char* begin = buf; - char* npos = 0; - char* end = buf + strlen(buf) - 1; - - file.writeError = false; - if ((npos = strchr(buf, 'N')) != NULL) { - begin = strchr(npos, ' ') + 1; - end = strchr(npos, '*') - 1; - } - end[1] = '\r'; - end[2] = '\n'; - end[3] = '\0'; - file.write(begin); - if (file.writeError) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE); - } -} - -void CardReader::checkautostart(bool force) { - if (!force && (!autostart_stilltocheck || ELAPSED(millis(), next_autostart_ms))) - return; - - autostart_stilltocheck = false; - - if (!cardOK) { - initsd(); - if (!cardOK) return; // fail - } - - char autoname[10]; - sprintf_P(autoname, PSTR("auto%i.g"), autostart_index); - for (int8_t i = 0; i < (int8_t)strlen(autoname); i++) autoname[i] = tolower(autoname[i]); - - dir_t p; - - root.rewind(); - - bool found = false; - while (root.readDir(p, NULL) > 0) { - for (int8_t i = 0; i < (int8_t)strlen((char*)p.name); i++) p.name[i] = tolower(p.name[i]); - if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) { - openAndPrintFile(autoname); - found = true; - } - } - if (!found) - autostart_index = -1; - else - autostart_index++; -} - -void CardReader::closefile(bool store_location) { - file.sync(); - file.close(); - saving = logging = false; - - if (store_location) { - //future: store printer state, filename and position for continuing a stopped print - // so one can unplug the printer and continue printing the next day. - } -} - -/** - * Get the name of a file in the current directory by index - */ -void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) { - curDir = &workDir; - lsAction = LS_GetFilename; - nrFiles = nr; - curDir->rewind(); - lsDive("", *curDir, match); -} - -uint16_t CardReader::getnrfilenames() { - curDir = &workDir; - lsAction = LS_Count; - nrFiles = 0; - curDir->rewind(); - lsDive("", *curDir); - //SERIAL_ECHOLN(nrFiles); - return nrFiles; -} - -void CardReader::chdir(const char * relpath) { - SdFile newfile; - SdFile *parent = &root; - - if (workDir.isOpen()) parent = &workDir; - - if (!newfile.open(*parent, relpath, O_READ)) { - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR); - SERIAL_ECHOLN(relpath); - } - else { - if (workDirDepth < MAX_DIR_DEPTH) - workDirParents[workDirDepth++] = *parent; - workDir = newfile; - } -} - -void CardReader::updir() { - if (workDirDepth > 0) - workDir = workDirParents[--workDirDepth]; -} - -void CardReader::printingHasFinished() { - stepper.synchronize(); - file.close(); - if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure. - file_subcall_ctr--; - openFile(proc_filenames[file_subcall_ctr], true, true); - setIndex(filespos[file_subcall_ctr]); - startFileprint(); - } - else { - sdprinting = false; - if (SD_FINISHED_STEPPERRELEASE) - enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); - print_job_timer.stop(); - if (print_job_timer.duration() > 60) - enqueue_and_echo_commands_P(PSTR("M31")); - } -} - -#endif //SDSUPPORT diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h deleted file mode 100644 index 8c22e58..0000000 --- a/Marlin/cardreader.h +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef CARDREADER_H -#define CARDREADER_H - -#include "MarlinConfig.h" - -#if ENABLED(SDSUPPORT) - -#define MAX_DIR_DEPTH 10 // Maximum folder depth - -#include "SdFile.h" - -#include "types.h" -#include "enum.h" - -class CardReader { -public: - CardReader(); - - void initsd(); - void write_command(char *buf); - //files auto[0-9].g on the sd card are performed in a row - //this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset - - void checkautostart(bool x); - void openFile(char* name, bool read, bool push_current=false); - void openLogFile(char* name); - void removeFile(char* name); - void closefile(bool store_location=false); - void release(); - void openAndPrintFile(const char *name); - void startFileprint(); - void pauseSDPrint(); - void stopSDPrint(); - void getStatus(); - void printingHasFinished(); - - #if ENABLED(LONG_FILENAME_HOST_SUPPORT) - void printLongPath(char *path); - #endif - - void getfilename(uint16_t nr, const char* const match=NULL); - uint16_t getnrfilenames(); - - void getAbsFilename(char *t); - - void ls(); - void chdir(const char *relpath); - void updir(); - void setroot(); - - FORCE_INLINE bool isFileOpen() { return file.isOpen(); } - FORCE_INLINE bool eof() { return sdpos >= filesize; } - FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); } - FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); } - FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; } - FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; } - -public: - bool saving, logging, sdprinting, cardOK, filenameIsDir; - char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH]; - int autostart_index; -private: - SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH]; - uint8_t workDirDepth; - Sd2Card card; - SdVolume volume; - SdFile file; - - #define SD_PROCEDURE_DEPTH 1 - #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1) - uint8_t file_subcall_ctr; - uint32_t filespos[SD_PROCEDURE_DEPTH]; - char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH]; - uint32_t filesize; - uint32_t sdpos; - - millis_t next_autostart_ms; - bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware. - - LsAction lsAction; //stored for recursion. - uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory. - char* diveDirName; - void lsDive(const char *prepend, SdFile parent, const char * const match=NULL); -}; - -extern CardReader card; - -#define IS_SD_PRINTING (card.sdprinting) - -#if PIN_EXISTS(SD_DETECT) - #if ENABLED(SD_DETECT_INVERTED) - #define IS_SD_INSERTED (READ(SD_DETECT_PIN) != 0) - #else - #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == 0) - #endif -#else - //No card detect line? Assume the card is inserted. - #define IS_SD_INSERTED true -#endif - -#else - -#define IS_SD_PRINTING (false) - -#endif //SDSUPPORT - -#endif //__CARDREADER_H diff --git a/Marlin/circularqueue.h b/Marlin/circularqueue.h deleted file mode 100644 index 9aafb99..0000000 --- a/Marlin/circularqueue.h +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __CIRCULARQUEUE_H__ -#define __CIRCULARQUEUE_H__ - -#include - -/** - * @brief Circular Queue class - * @details Implementation of the classic ring buffer data structure - */ -template -class CircularQueue { - private: - - /** - * @brief Buffer structure - * @details This structure consolidates all the overhead required to handle - * a circular queue such as the pointers and the buffer vector. - */ - struct buffer_t { - uint8_t head; - uint8_t tail; - uint8_t count; - uint8_t size; - T queue[N]; - } buffer; - - public: - /** - * @brief Class constructor - * @details This class requires two template parameters, T defines the type - * of item this queue will handle and N defines the maximum number of - * items that can be stored on the queue. - */ - CircularQueue() { - this->buffer.size = N; - this->buffer.count = this->buffer.head = this->buffer.tail = 0; - } - - /** - * @brief Removes and returns a item from the queue - * @details Removes the oldest item on the queue, pointed to by the - * buffer_t head field. The item is returned to the caller. - * @return type T item - */ - T dequeue() { - if (this->isEmpty()) return T(); - - uint8_t index = this->buffer.head; - - --this->buffer.count; - if (++this->buffer.head == this->buffer.size) - this->buffer.head = 0; - - return this->buffer.queue[index]; - } - - /** - * @brief Adds an item to the queue - * @details Adds an item to the queue on the location pointed by the buffer_t - * tail variable. Returns false if no queue space is available. - * @param item Item to be added to the queue - * @return true if the operation was successful - */ - bool enqueue(T const &item) { - if (this->isFull()) return false; - - this->buffer.queue[this->buffer.tail] = item; - - ++this->buffer.count; - if (++this->buffer.tail == this->buffer.size) - this->buffer.tail = 0; - - return true; - } - - /** - * @brief Checks if the queue has no items - * @details Returns true if there are no items on the queue, false otherwise. - * @return true if queue is empty - */ - bool isEmpty() { - return this->buffer.count == 0; - } - - /** - * @brief Checks if the queue is full - * @details Returns true if the queue is full, false otherwise. - * @return true if queue is full - */ - bool isFull() { - return this->buffer.count == this->buffer.size; - } - - /** - * @brief Gets the queue size - * @details Returns the maximum number of items a queue can have. - * @return the queue size - */ - uint8_t size() { - return this->buffer.size; - } - - /** - * @brief Gets the next item from the queue without removing it - * @details Returns the next item in the queue without removing it - * or updating the pointers. - * @return first item in the queue - */ - T peek() { - return this->buffer.queue[this->buffer.head]; - } - - /** - * @brief Gets the number of items on the queue - * @details Returns the current number of items stored on the queue. - * @return number of items in the queue - */ - uint8_t count() { - return this->buffer.count; - } -}; - -#endif diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp deleted file mode 100644 index db10bba..0000000 --- a/Marlin/configuration_store.cpp +++ /dev/null @@ -1,994 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * configuration_store.cpp - * - * Configuration and EEPROM storage - * - * IMPORTANT: Whenever there are changes made to the variables stored in EEPROM - * in the functions below, also increment the version number. This makes sure that - * the default values are used whenever there is a change to the data, to prevent - * wrong data being written to the variables. - * - * ALSO: Variables in the Store and Retrieve sections must be in the same order. - * If a feature is disabled, some data must still be written that, when read, - * either sets a Sane Default, or results in No Change to the existing value. - * - */ - -#define EEPROM_VERSION "V24" - -// Change EEPROM version if these are changed: -#define EEPROM_OFFSET 100 -#define MAX_EXTRUDERS 4 - -/** - * V24 EEPROM Layout: - * - * 100 Version (char x4) - * 104 EEPROM Checksum (uint16_t) - * - * 106 M92 XYZE planner.axis_steps_per_mm (float x4) - * 122 M203 XYZE planner.max_feedrate_mm_s (float x4) - * 138 M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4) - * 154 M204 P planner.acceleration (float) - * 158 M204 R planner.retract_acceleration (float) - * 162 M204 T planner.travel_acceleration (float) - * 166 M205 S planner.min_feedrate_mm_s (float) - * 170 M205 T planner.min_travel_feedrate_mm_s (float) - * 174 M205 B planner.min_segment_time (ulong) - * 178 M205 X planner.max_xy_jerk (float) - * 182 M205 Z planner.max_z_jerk (float) - * 186 M205 E planner.max_e_jerk (float) - * 190 M206 XYZ home_offset (float x3) - * - * Mesh bed leveling: - * 202 M420 S status (uint8) - * 203 z_offset (float) - * 207 mesh_num_x (uint8 as set in firmware) - * 208 mesh_num_y (uint8 as set in firmware) - * 209 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81) - * - * AUTO BED LEVELING - * 245 M851 zprobe_zoffset (float) - * - * DELTA: - * 249 M666 XYZ endstop_adj (float x3) - * 261 M665 R delta_radius (float) - * 265 M665 L delta_diagonal_rod (float) - * 269 M665 S delta_segments_per_second (float) - * 273 M665 A delta_diagonal_rod_trim_tower_1 (float) - * 277 M665 B delta_diagonal_rod_trim_tower_2 (float) - * 281 M665 C delta_diagonal_rod_trim_tower_3 (float) - * - * Z_DUAL_ENDSTOPS: - * 285 M666 Z z_endstop_adj (float) - * - * ULTIPANEL: - * 289 M145 S0 H preheatHotendTemp1 (int) - * 291 M145 S0 B preheatBedTemp1 (int) - * 293 M145 S0 F preheatFanSpeed1 (int) - * 295 M145 S1 H preheatHotendTemp2 (int) - * 297 M145 S1 B preheatBedTemp2 (int) - * 299 M145 S1 F preheatFanSpeed2 (int) - * - * PIDTEMP: - * 301 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4) - * 317 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4) - * 333 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4) - * 349 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4) - * 365 M301 L lpq_len (int) - * - * PIDTEMPBED: - * 367 M304 PID thermalManager.bedKp, thermalManager.bedKi, thermalManager.bedKd (float x3) - * - * DOGLCD: - * 379 M250 C lcd_contrast (int) - * - * SCARA: - * 381 M365 XYZ axis_scaling (float x3) - * - * FWRETRACT: - * 393 M209 S autoretract_enabled (bool) - * 394 M207 S retract_length (float) - * 398 M207 W retract_length_swap (float) - * 402 M207 F retract_feedrate_mm_s (float) - * 406 M207 Z retract_zlift (float) - * 410 M208 S retract_recover_length (float) - * 414 M208 W retract_recover_length_swap (float) - * 418 M208 F retract_recover_feedrate_mm_s (float) - * - * Volumetric Extrusion: - * 422 M200 D volumetric_enabled (bool) - * 423 M200 T D filament_size (float x4) (T0..3) - * - * 439 This Slot is Available! - * - */ -#include "Marlin.h" -#include "language.h" -#include "endstops.h" -#include "planner.h" -#include "temperature.h" -#include "ultralcd.h" -#include "configuration_store.h" - -#if ENABLED(MESH_BED_LEVELING) - #include "mesh_bed_leveling.h" -#endif - -uint16_t eeprom_checksum; -const char version[4] = EEPROM_VERSION; - -void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) { - uint8_t c; - while (size--) { - eeprom_write_byte((unsigned char*)pos, *value); - c = eeprom_read_byte((unsigned char*)pos); - if (c != *value) { - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE); - } - eeprom_checksum += c; - pos++; - value++; - }; -} -void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) { - do { - uint8_t c = eeprom_read_byte((unsigned char*)pos); - *value = c; - eeprom_checksum += c; - pos++; - value++; - } while (--size); -} - -/** - * Post-process after Retrieve or Reset - */ -void Config_Postprocess() { - // steps per s2 needs to be updated to agree with units per s2 - planner.reset_acceleration_rates(); - - // Make sure delta kinematics are updated before refreshing the - // planner position so the stepper counts will be set correctly. - #if ENABLED(DELTA) - recalc_delta_settings(delta_radius, delta_diagonal_rod); - #endif - - // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm - // and init stepper.count[], planner.position[] with current_position - planner.refresh_positioning(); - - #if ENABLED(PIDTEMP) - thermalManager.updatePID(); - #endif - - calculate_volumetric_multipliers(); -} - -#if ENABLED(EEPROM_SETTINGS) - - #define DUMMY_PID_VALUE 3000.0f - #define EEPROM_START() int eeprom_index = EEPROM_OFFSET - #define EEPROM_SKIP(VAR) eeprom_index += sizeof(VAR) - #define EEPROM_WRITE(VAR) _EEPROM_writeData(eeprom_index, (uint8_t*)&VAR, sizeof(VAR)) - #define EEPROM_READ(VAR) _EEPROM_readData(eeprom_index, (uint8_t*)&VAR, sizeof(VAR)) - -/** - * M500 - Store Configuration - */ -void Config_StoreSettings() { - float dummy = 0.0f; - char ver[4] = "000"; - - EEPROM_START(); - - EEPROM_WRITE(ver); // invalidate data first - EEPROM_SKIP(eeprom_checksum); // Skip the checksum slot - - eeprom_checksum = 0; // clear before first "real data" - - EEPROM_WRITE(planner.axis_steps_per_mm); - EEPROM_WRITE(planner.max_feedrate_mm_s); - EEPROM_WRITE(planner.max_acceleration_mm_per_s2); - EEPROM_WRITE(planner.acceleration); - EEPROM_WRITE(planner.retract_acceleration); - EEPROM_WRITE(planner.travel_acceleration); - EEPROM_WRITE(planner.min_feedrate_mm_s); - EEPROM_WRITE(planner.min_travel_feedrate_mm_s); - EEPROM_WRITE(planner.min_segment_time); - EEPROM_WRITE(planner.max_xy_jerk); - EEPROM_WRITE(planner.max_z_jerk); - EEPROM_WRITE(planner.max_e_jerk); - EEPROM_WRITE(home_offset); - - #if ENABLED(MESH_BED_LEVELING) - // Compile time test that sizeof(mbl.z_values) is as expected - typedef char c_assert[(sizeof(mbl.z_values) == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS) * sizeof(dummy)) ? 1 : -1]; - uint8_t mesh_num_x = MESH_NUM_X_POINTS, - mesh_num_y = MESH_NUM_Y_POINTS, - dummy_uint8 = mbl.status & _BV(MBL_STATUS_HAS_MESH_BIT); - EEPROM_WRITE(dummy_uint8); - EEPROM_WRITE(mbl.z_offset); - EEPROM_WRITE(mesh_num_x); - EEPROM_WRITE(mesh_num_y); - EEPROM_WRITE(mbl.z_values); - #else - // For disabled MBL write a default mesh - uint8_t mesh_num_x = 3, - mesh_num_y = 3, - dummy_uint8 = 0; - dummy = 0.0f; - EEPROM_WRITE(dummy_uint8); - EEPROM_WRITE(dummy); - EEPROM_WRITE(mesh_num_x); - EEPROM_WRITE(mesh_num_y); - for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_WRITE(dummy); - #endif // MESH_BED_LEVELING - - #if !HAS_BED_PROBE - float zprobe_zoffset = 0; - #endif - EEPROM_WRITE(zprobe_zoffset); - - // 9 floats for DELTA / Z_DUAL_ENDSTOPS - #if ENABLED(DELTA) - EEPROM_WRITE(endstop_adj); // 3 floats - EEPROM_WRITE(delta_radius); // 1 float - EEPROM_WRITE(delta_diagonal_rod); // 1 float - EEPROM_WRITE(delta_segments_per_second); // 1 float - EEPROM_WRITE(delta_diagonal_rod_trim_tower_1); // 1 float - EEPROM_WRITE(delta_diagonal_rod_trim_tower_2); // 1 float - EEPROM_WRITE(delta_diagonal_rod_trim_tower_3); // 1 float - #elif ENABLED(Z_DUAL_ENDSTOPS) - EEPROM_WRITE(z_endstop_adj); // 1 float - dummy = 0.0f; - for (uint8_t q = 8; q--;) EEPROM_WRITE(dummy); - #else - dummy = 0.0f; - for (uint8_t q = 9; q--;) EEPROM_WRITE(dummy); - #endif - - #if DISABLED(ULTIPANEL) - int preheatHotendTemp1 = PREHEAT_1_TEMP_HOTEND, preheatBedTemp1 = PREHEAT_1_TEMP_BED, preheatFanSpeed1 = PREHEAT_1_FAN_SPEED, - preheatHotendTemp2 = PREHEAT_2_TEMP_HOTEND, preheatBedTemp2 = PREHEAT_2_TEMP_BED, preheatFanSpeed2 = PREHEAT_2_FAN_SPEED; - #endif // !ULTIPANEL - - EEPROM_WRITE(preheatHotendTemp1); - EEPROM_WRITE(preheatBedTemp1); - EEPROM_WRITE(preheatFanSpeed1); - EEPROM_WRITE(preheatHotendTemp2); - EEPROM_WRITE(preheatBedTemp2); - EEPROM_WRITE(preheatFanSpeed2); - - for (uint8_t e = 0; e < MAX_EXTRUDERS; e++) { - - #if ENABLED(PIDTEMP) - if (e < HOTENDS) { - EEPROM_WRITE(PID_PARAM(Kp, e)); - EEPROM_WRITE(PID_PARAM(Ki, e)); - EEPROM_WRITE(PID_PARAM(Kd, e)); - #if ENABLED(PID_EXTRUSION_SCALING) - EEPROM_WRITE(PID_PARAM(Kc, e)); - #else - dummy = 1.0f; // 1.0 = default kc - EEPROM_WRITE(dummy); - #endif - } - else - #endif // !PIDTEMP - { - dummy = DUMMY_PID_VALUE; // When read, will not change the existing value - EEPROM_WRITE(dummy); // Kp - dummy = 0.0f; - for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); // Ki, Kd, Kc - } - - } // Hotends Loop - - #if DISABLED(PID_EXTRUSION_SCALING) - int lpq_len = 20; - #endif - EEPROM_WRITE(lpq_len); - - #if DISABLED(PIDTEMPBED) - dummy = DUMMY_PID_VALUE; - for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); - #else - EEPROM_WRITE(thermalManager.bedKp); - EEPROM_WRITE(thermalManager.bedKi); - EEPROM_WRITE(thermalManager.bedKd); - #endif - - #if !HAS_LCD_CONTRAST - const int lcd_contrast = 32; - #endif - EEPROM_WRITE(lcd_contrast); - - #if ENABLED(SCARA) - EEPROM_WRITE(axis_scaling); // 3 floats - #else - dummy = 1.0f; - EEPROM_WRITE(dummy); - #endif - - #if ENABLED(FWRETRACT) - EEPROM_WRITE(autoretract_enabled); - EEPROM_WRITE(retract_length); - #if EXTRUDERS > 1 - EEPROM_WRITE(retract_length_swap); - #else - dummy = 0.0f; - EEPROM_WRITE(dummy); - #endif - EEPROM_WRITE(retract_feedrate_mm_s); - EEPROM_WRITE(retract_zlift); - EEPROM_WRITE(retract_recover_length); - #if EXTRUDERS > 1 - EEPROM_WRITE(retract_recover_length_swap); - #else - dummy = 0.0f; - EEPROM_WRITE(dummy); - #endif - EEPROM_WRITE(retract_recover_feedrate_mm_s); - #endif // FWRETRACT - - EEPROM_WRITE(volumetric_enabled); - - // Save filament sizes - for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) { - if (q < COUNT(filament_size)) dummy = filament_size[q]; - EEPROM_WRITE(dummy); - } - - uint16_t final_checksum = eeprom_checksum, - eeprom_size = eeprom_index; - - eeprom_index = EEPROM_OFFSET; - EEPROM_WRITE(version); - EEPROM_WRITE(final_checksum); - - // Report storage size - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("Settings Stored (", eeprom_size); - SERIAL_ECHOLNPGM(" bytes)"); -} - -/** - * M501 - Retrieve Configuration - */ -void Config_RetrieveSettings() { - - EEPROM_START(); - - char stored_ver[4]; - EEPROM_READ(stored_ver); - - uint16_t stored_checksum; - EEPROM_READ(stored_checksum); - - // SERIAL_ECHOPAIR("Version: [", ver); - // SERIAL_ECHOPAIR("] Stored version: [", stored_ver); - // SERIAL_ECHOLNPGM("]"); - - if (strncmp(version, stored_ver, 3) != 0) { - Config_ResetDefault(); - } - else { - float dummy = 0; - - eeprom_checksum = 0; // clear before reading first "real data" - - // version number match - EEPROM_READ(planner.axis_steps_per_mm); - EEPROM_READ(planner.max_feedrate_mm_s); - EEPROM_READ(planner.max_acceleration_mm_per_s2); - - EEPROM_READ(planner.acceleration); - EEPROM_READ(planner.retract_acceleration); - EEPROM_READ(planner.travel_acceleration); - EEPROM_READ(planner.min_feedrate_mm_s); - EEPROM_READ(planner.min_travel_feedrate_mm_s); - EEPROM_READ(planner.min_segment_time); - EEPROM_READ(planner.max_xy_jerk); - EEPROM_READ(planner.max_z_jerk); - EEPROM_READ(planner.max_e_jerk); - EEPROM_READ(home_offset); - - uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0; - EEPROM_READ(dummy_uint8); - EEPROM_READ(dummy); - EEPROM_READ(mesh_num_x); - EEPROM_READ(mesh_num_y); - #if ENABLED(MESH_BED_LEVELING) - mbl.status = dummy_uint8; - mbl.z_offset = dummy; - if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) { - // EEPROM data fits the current mesh - EEPROM_READ(mbl.z_values); - } - else { - // EEPROM data is stale - mbl.reset(); - for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ(dummy); - } - #else - // MBL is disabled - skip the stored data - for (uint8_t q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ(dummy); - #endif // MESH_BED_LEVELING - - #if !HAS_BED_PROBE - float zprobe_zoffset = 0; - #endif - EEPROM_READ(zprobe_zoffset); - - #if ENABLED(DELTA) - EEPROM_READ(endstop_adj); // 3 floats - EEPROM_READ(delta_radius); // 1 float - EEPROM_READ(delta_diagonal_rod); // 1 float - EEPROM_READ(delta_segments_per_second); // 1 float - EEPROM_READ(delta_diagonal_rod_trim_tower_1); // 1 float - EEPROM_READ(delta_diagonal_rod_trim_tower_2); // 1 float - EEPROM_READ(delta_diagonal_rod_trim_tower_3); // 1 float - #elif ENABLED(Z_DUAL_ENDSTOPS) - EEPROM_READ(z_endstop_adj); - dummy = 0.0f; - for (uint8_t q=8; q--;) EEPROM_READ(dummy); - #else - dummy = 0.0f; - for (uint8_t q=9; q--;) EEPROM_READ(dummy); - #endif - - #if DISABLED(ULTIPANEL) - int preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1, - preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2; - #endif - - EEPROM_READ(preheatHotendTemp1); - EEPROM_READ(preheatBedTemp1); - EEPROM_READ(preheatFanSpeed1); - EEPROM_READ(preheatHotendTemp2); - EEPROM_READ(preheatBedTemp2); - EEPROM_READ(preheatFanSpeed2); - - #if ENABLED(PIDTEMP) - for (uint8_t e = 0; e < MAX_EXTRUDERS; e++) { - EEPROM_READ(dummy); // Kp - if (e < HOTENDS && dummy != DUMMY_PID_VALUE) { - // do not need to scale PID values as the values in EEPROM are already scaled - PID_PARAM(Kp, e) = dummy; - EEPROM_READ(PID_PARAM(Ki, e)); - EEPROM_READ(PID_PARAM(Kd, e)); - #if ENABLED(PID_EXTRUSION_SCALING) - EEPROM_READ(PID_PARAM(Kc, e)); - #else - EEPROM_READ(dummy); - #endif - } - else { - for (uint8_t q=3; q--;) EEPROM_READ(dummy); // Ki, Kd, Kc - } - } - #else // !PIDTEMP - // 4 x 4 = 16 slots for PID parameters - for (uint8_t q = MAX_EXTRUDERS * 4; q--;) EEPROM_READ(dummy); // Kp, Ki, Kd, Kc - #endif // !PIDTEMP - - #if DISABLED(PID_EXTRUSION_SCALING) - int lpq_len; - #endif - EEPROM_READ(lpq_len); - - #if ENABLED(PIDTEMPBED) - EEPROM_READ(dummy); // bedKp - if (dummy != DUMMY_PID_VALUE) { - thermalManager.bedKp = dummy; - EEPROM_READ(thermalManager.bedKi); - EEPROM_READ(thermalManager.bedKd); - } - #else - for (uint8_t q=3; q--;) EEPROM_READ(dummy); // bedKp, bedKi, bedKd - #endif - - #if !HAS_LCD_CONTRAST - int lcd_contrast; - #endif - EEPROM_READ(lcd_contrast); - - #if ENABLED(SCARA) - EEPROM_READ(axis_scaling); // 3 floats - #else - EEPROM_READ(dummy); - #endif - - #if ENABLED(FWRETRACT) - EEPROM_READ(autoretract_enabled); - EEPROM_READ(retract_length); - #if EXTRUDERS > 1 - EEPROM_READ(retract_length_swap); - #else - EEPROM_READ(dummy); - #endif - EEPROM_READ(retract_feedrate_mm_s); - EEPROM_READ(retract_zlift); - EEPROM_READ(retract_recover_length); - #if EXTRUDERS > 1 - EEPROM_READ(retract_recover_length_swap); - #else - EEPROM_READ(dummy); - #endif - EEPROM_READ(retract_recover_feedrate_mm_s); - #endif // FWRETRACT - - EEPROM_READ(volumetric_enabled); - - for (uint8_t q = 0; q < MAX_EXTRUDERS; q++) { - EEPROM_READ(dummy); - if (q < COUNT(filament_size)) filament_size[q] = dummy; - } - - if (eeprom_checksum == stored_checksum) { - Config_Postprocess(); - SERIAL_ECHO_START; - SERIAL_ECHO(version); - SERIAL_ECHOPAIR(" stored settings retrieved (", eeprom_index); - SERIAL_ECHOLNPGM(" bytes)"); - } - else { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("EEPROM checksum mismatch"); - Config_ResetDefault(); - } - } - - #if ENABLED(EEPROM_CHITCHAT) - Config_PrintSettings(); - #endif -} - -#endif // EEPROM_SETTINGS - -/** - * M502 - Reset Configuration - */ -void Config_ResetDefault() { - float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; - float tmp2[] = DEFAULT_MAX_FEEDRATE; - long tmp3[] = DEFAULT_MAX_ACCELERATION; - LOOP_XYZE(i) { - planner.axis_steps_per_mm[i] = tmp1[i]; - planner.max_feedrate_mm_s[i] = tmp2[i]; - planner.max_acceleration_mm_per_s2[i] = tmp3[i]; - #if ENABLED(SCARA) - if (i < COUNT(axis_scaling)) - axis_scaling[i] = 1; - #endif - } - - planner.acceleration = DEFAULT_ACCELERATION; - planner.retract_acceleration = DEFAULT_RETRACT_ACCELERATION; - planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; - planner.min_feedrate_mm_s = DEFAULT_MINIMUMFEEDRATE; - planner.min_segment_time = DEFAULT_MINSEGMENTTIME; - planner.min_travel_feedrate_mm_s = DEFAULT_MINTRAVELFEEDRATE; - planner.max_xy_jerk = DEFAULT_XYJERK; - planner.max_z_jerk = DEFAULT_ZJERK; - planner.max_e_jerk = DEFAULT_EJERK; - home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; - - #if ENABLED(MESH_BED_LEVELING) - mbl.reset(); - #endif - - #if HAS_BED_PROBE - zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; - #endif - - #if ENABLED(DELTA) - endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; - delta_radius = DELTA_RADIUS; - delta_diagonal_rod = DELTA_DIAGONAL_ROD; - delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; - delta_diagonal_rod_trim_tower_1 = DELTA_DIAGONAL_ROD_TRIM_TOWER_1; - delta_diagonal_rod_trim_tower_2 = DELTA_DIAGONAL_ROD_TRIM_TOWER_2; - delta_diagonal_rod_trim_tower_3 = DELTA_DIAGONAL_ROD_TRIM_TOWER_3; - #elif ENABLED(Z_DUAL_ENDSTOPS) - z_endstop_adj = 0; - #endif - - #if ENABLED(ULTIPANEL) - preheatHotendTemp1 = PREHEAT_1_TEMP_HOTEND; - preheatBedTemp1 = PREHEAT_1_TEMP_BED; - preheatFanSpeed1 = PREHEAT_1_FAN_SPEED; - preheatHotendTemp2 = PREHEAT_2_TEMP_HOTEND; - preheatBedTemp2 = PREHEAT_2_TEMP_BED; - preheatFanSpeed2 = PREHEAT_2_FAN_SPEED; - #endif - - #if HAS_LCD_CONTRAST - lcd_contrast = DEFAULT_LCD_CONTRAST; - #endif - - #if ENABLED(PIDTEMP) - #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1 - HOTEND_LOOP() - #else - int e = 0; UNUSED(e); // only need to write once - #endif - { - PID_PARAM(Kp, e) = DEFAULT_Kp; - PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki); - PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd); - #if ENABLED(PID_EXTRUSION_SCALING) - PID_PARAM(Kc, e) = DEFAULT_Kc; - #endif - } - #if ENABLED(PID_EXTRUSION_SCALING) - lpq_len = 20; // default last-position-queue size - #endif - #endif // PIDTEMP - - #if ENABLED(PIDTEMPBED) - thermalManager.bedKp = DEFAULT_bedKp; - thermalManager.bedKi = scalePID_i(DEFAULT_bedKi); - thermalManager.bedKd = scalePID_d(DEFAULT_bedKd); - #endif - - #if ENABLED(FWRETRACT) - autoretract_enabled = false; - retract_length = RETRACT_LENGTH; - #if EXTRUDERS > 1 - retract_length_swap = RETRACT_LENGTH_SWAP; - #endif - retract_feedrate_mm_s = RETRACT_FEEDRATE; - retract_zlift = RETRACT_ZLIFT; - retract_recover_length = RETRACT_RECOVER_LENGTH; - #if EXTRUDERS > 1 - retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; - #endif - retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE; - #endif - - volumetric_enabled = false; - for (uint8_t q = 0; q < COUNT(filament_size); q++) - filament_size[q] = DEFAULT_NOMINAL_FILAMENT_DIA; - - endstops.enable_globally( - #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) - (true) - #else - (false) - #endif - ); - - Config_Postprocess(); - - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); -} - -#if DISABLED(DISABLE_M503) - -#define CONFIG_ECHO_START do{ if (!forReplay) SERIAL_ECHO_START; }while(0) - -/** - * M503 - Print Configuration - */ -void Config_PrintSettings(bool forReplay) { - // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown - - CONFIG_ECHO_START; - - if (!forReplay) { - SERIAL_ECHOLNPGM("Steps per unit:"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M92 X", planner.axis_steps_per_mm[X_AXIS]); - SERIAL_ECHOPAIR(" Y", planner.axis_steps_per_mm[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", planner.axis_steps_per_mm[Z_AXIS]); - SERIAL_ECHOPAIR(" E", planner.axis_steps_per_mm[E_AXIS]); - SERIAL_EOL; - - CONFIG_ECHO_START; - - #if ENABLED(SCARA) - if (!forReplay) { - SERIAL_ECHOLNPGM("Scaling factors:"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M365 X", axis_scaling[X_AXIS]); - SERIAL_ECHOPAIR(" Y", axis_scaling[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", axis_scaling[Z_AXIS]); - SERIAL_EOL; - CONFIG_ECHO_START; - #endif // SCARA - - if (!forReplay) { - SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M203 X", planner.max_feedrate_mm_s[X_AXIS]); - SERIAL_ECHOPAIR(" Y", planner.max_feedrate_mm_s[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", planner.max_feedrate_mm_s[Z_AXIS]); - SERIAL_ECHOPAIR(" E", planner.max_feedrate_mm_s[E_AXIS]); - SERIAL_EOL; - - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M201 X", planner.max_acceleration_mm_per_s2[X_AXIS]); - SERIAL_ECHOPAIR(" Y", planner.max_acceleration_mm_per_s2[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", planner.max_acceleration_mm_per_s2[Z_AXIS]); - SERIAL_ECHOPAIR(" E", planner.max_acceleration_mm_per_s2[E_AXIS]); - SERIAL_EOL; - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M204 P", planner.acceleration); - SERIAL_ECHOPAIR(" R", planner.retract_acceleration); - SERIAL_ECHOPAIR(" T", planner.travel_acceleration); - SERIAL_EOL; - - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M205 S", planner.min_feedrate_mm_s); - SERIAL_ECHOPAIR(" T", planner.min_travel_feedrate_mm_s); - SERIAL_ECHOPAIR(" B", planner.min_segment_time); - SERIAL_ECHOPAIR(" X", planner.max_xy_jerk); - SERIAL_ECHOPAIR(" Z", planner.max_z_jerk); - SERIAL_ECHOPAIR(" E", planner.max_e_jerk); - SERIAL_EOL; - - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Home offset (mm)"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M206 X", home_offset[X_AXIS]); - SERIAL_ECHOPAIR(" Y", home_offset[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]); - SERIAL_EOL; - - #if ENABLED(MESH_BED_LEVELING) - if (!forReplay) { - SERIAL_ECHOLNPGM("Mesh bed leveling:"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M420 S", mbl.has_mesh() ? 1 : 0); - SERIAL_ECHOPAIR(" X", MESH_NUM_X_POINTS); - SERIAL_ECHOPAIR(" Y", MESH_NUM_Y_POINTS); - SERIAL_EOL; - for (uint8_t py = 1; py <= MESH_NUM_Y_POINTS; py++) { - for (uint8_t px = 1; px <= MESH_NUM_X_POINTS; px++) { - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" G29 S3 X", px); - SERIAL_ECHOPAIR(" Y", py); - SERIAL_ECHOPGM(" Z"); - SERIAL_PROTOCOL_F(mbl.z_values[py-1][px-1], 5); - SERIAL_EOL; - } - } - #endif - - #if ENABLED(DELTA) - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Endstop adjustment (mm):"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M666 X", endstop_adj[X_AXIS]); - SERIAL_ECHOPAIR(" Y", endstop_adj[Y_AXIS]); - SERIAL_ECHOPAIR(" Z", endstop_adj[Z_AXIS]); - SERIAL_EOL; - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Delta settings: L=diagonal_rod, R=radius, S=segments_per_second, ABC=diagonal_rod_trim_tower_[123]"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M665 L", delta_diagonal_rod); - SERIAL_ECHOPAIR(" R", delta_radius); - SERIAL_ECHOPAIR(" S", delta_segments_per_second); - SERIAL_ECHOPAIR(" A", delta_diagonal_rod_trim_tower_1); - SERIAL_ECHOPAIR(" B", delta_diagonal_rod_trim_tower_2); - SERIAL_ECHOPAIR(" C", delta_diagonal_rod_trim_tower_3); - SERIAL_EOL; - #elif ENABLED(Z_DUAL_ENDSTOPS) - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M666 Z", z_endstop_adj); - SERIAL_EOL; - #endif // DELTA - - #if ENABLED(ULTIPANEL) - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Material heatup parameters:"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M145 S0 H", preheatHotendTemp1); - SERIAL_ECHOPAIR(" B", preheatBedTemp1); - SERIAL_ECHOPAIR(" F", preheatFanSpeed1); - SERIAL_EOL; - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M145 S1 H", preheatHotendTemp2); - SERIAL_ECHOPAIR(" B", preheatBedTemp2); - SERIAL_ECHOPAIR(" F", preheatFanSpeed2); - SERIAL_EOL; - #endif // ULTIPANEL - - #if HAS_PID_HEATING - - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("PID settings:"); - } - #if ENABLED(PIDTEMP) - #if HOTENDS > 1 - if (forReplay) { - HOTEND_LOOP() { - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M301 E", e); - SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, e)); - SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, e))); - SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, e))); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, e)); - if (e == 0) SERIAL_ECHOPAIR(" L", lpq_len); - #endif - SERIAL_EOL; - } - } - else - #endif // HOTENDS > 1 - // !forReplay || HOTENDS == 1 - { - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0 - SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0))); - SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0))); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0)); - SERIAL_ECHOPAIR(" L", lpq_len); - #endif - SERIAL_EOL; - } - #endif // PIDTEMP - - #if ENABLED(PIDTEMPBED) - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M304 P", thermalManager.bedKp); - SERIAL_ECHOPAIR(" I", unscalePID_i(thermalManager.bedKi)); - SERIAL_ECHOPAIR(" D", unscalePID_d(thermalManager.bedKd)); - SERIAL_EOL; - #endif - - #endif // PIDTEMP || PIDTEMPBED - - #if HAS_LCD_CONTRAST - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("LCD Contrast:"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M250 C", lcd_contrast); - SERIAL_EOL; - #endif - - #if ENABLED(FWRETRACT) - - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M207 S", retract_length); - #if EXTRUDERS > 1 - SERIAL_ECHOPAIR(" W", retract_length_swap); - #endif - SERIAL_ECHOPAIR(" F", MMS_TO_MMM(retract_feedrate_mm_s)); - SERIAL_ECHOPAIR(" Z", retract_zlift); - SERIAL_EOL; - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M208 S", retract_recover_length); - #if EXTRUDERS > 1 - SERIAL_ECHOPAIR(" W", retract_recover_length_swap); - #endif - SERIAL_ECHOPAIR(" F", MMS_TO_MMM(retract_recover_feedrate_mm_s)); - SERIAL_EOL; - CONFIG_ECHO_START; - if (!forReplay) { - SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries"); - CONFIG_ECHO_START; - } - SERIAL_ECHOPAIR(" M209 S", autoretract_enabled ? 1 : 0); - SERIAL_EOL; - - #endif // FWRETRACT - - /** - * Volumetric extrusion M200 - */ - if (!forReplay) { - CONFIG_ECHO_START; - SERIAL_ECHOPGM("Filament settings:"); - if (volumetric_enabled) - SERIAL_EOL; - else - SERIAL_ECHOLNPGM(" Disabled"); - } - - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M200 D", filament_size[0]); - SERIAL_EOL; - #if EXTRUDERS > 1 - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]); - SERIAL_EOL; - #if EXTRUDERS > 2 - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]); - SERIAL_EOL; - #if EXTRUDERS > 3 - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M200 T3 D", filament_size[3]); - SERIAL_EOL; - #endif - #endif - #endif - - if (!volumetric_enabled) { - CONFIG_ECHO_START; - SERIAL_ECHOLNPGM(" M200 D0"); - } - - /** - * Auto Bed Leveling - */ - #if HAS_BED_PROBE - if (!forReplay) { - CONFIG_ECHO_START; - SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); - } - CONFIG_ECHO_START; - SERIAL_ECHOPAIR(" M851 Z", zprobe_zoffset); - SERIAL_EOL; - #endif -} - -#endif // !DISABLE_M503 diff --git a/Marlin/configuration_store.h b/Marlin/configuration_store.h deleted file mode 100644 index 891f19f..0000000 --- a/Marlin/configuration_store.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef CONFIGURATION_STORE_H -#define CONFIGURATION_STORE_H - -#include "MarlinConfig.h" - -void Config_ResetDefault(); - -#if DISABLED(DISABLE_M503) - void Config_PrintSettings(bool forReplay=false); -#else - FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {} -#endif - -#if ENABLED(EEPROM_SETTINGS) - void Config_StoreSettings(); - void Config_RetrieveSettings(); -#else - FORCE_INLINE void Config_StoreSettings() {} - FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); } -#endif - -#endif //CONFIGURATION_STORE_H diff --git a/Marlin/dac_mcp4728.cpp b/Marlin/dac_mcp4728.cpp deleted file mode 100644 index 01e38ed..0000000 --- a/Marlin/dac_mcp4728.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * mcp4728.cpp - Arduino library for MicroChip MCP4728 I2C D/A converter - * - * For implementation details, please take a look at the datasheet: - * http://ww1.microchip.com/downloads/en/DeviceDoc/22187a.pdf - * - * For discussion and feedback, please go to: - * http://arduino.cc/forum/index.php/topic,51842.0.html - */ - -#include "dac_mcp4728.h" - -#if ENABLED(DAC_STEPPER_CURRENT) - -uint16_t mcp4728_values[4]; - -/** - * Begin I2C, get current values (input register and eeprom) of mcp4728 - */ -void mcp4728_init() { - Wire.begin(); - Wire.requestFrom(int(DAC_DEV_ADDRESS), 24); - while(Wire.available()) { - int deviceID = Wire.read(); - int hiByte = Wire.read(); - int loByte = Wire.read(); - - int isEEPROM = (deviceID & 0B00001000) >> 3; - int channel = (deviceID & 0B00110000) >> 4; - if (isEEPROM != 1) { - mcp4728_values[channel] = word((hiByte & 0B00001111), loByte); - } - } -} - -/** - * Write input resister value to specified channel using fastwrite method. - * Channel : 0-3, Values : 0-4095 - */ -uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) { - mcp4728_values[channel] = value; - return mcp4728_fastWrite(); -} -/** - * Write all input resistor values to EEPROM using SequencialWrite method. - * This will update both input register and EEPROM value - * This will also write current Vref, PowerDown, Gain settings to EEPROM - */ -uint8_t mcp4728_eepromWrite() { - Wire.beginTransmission(DAC_DEV_ADDRESS); - Wire.write(SEQWRITE); - for (uint8_t channel=0; channel <= 3; channel++) { - Wire.write(DAC_STEPPER_VREF << 7 | 0 << 5 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[channel])); - Wire.write(lowByte(mcp4728_values[channel])); - } - return Wire.endTransmission(); -} - -/** - * Write Voltage reference setting to all input regiters - */ -uint8_t mcp4728_setVref_all(uint8_t value) { - Wire.beginTransmission(DAC_DEV_ADDRESS); - Wire.write(VREFWRITE | value << 3 | value << 2 | value << 1 | value); - return Wire.endTransmission(); -} -/** - * Write Gain setting to all input regiters - */ -uint8_t mcp4728_setGain_all(uint8_t value) { - Wire.beginTransmission(DAC_DEV_ADDRESS); - Wire.write(GAINWRITE | value << 3 | value << 2 | value << 1 | value); - return Wire.endTransmission(); -} - -/** - * Return Input Regiter value - */ -uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; } - -/** - * Steph: Might be useful in the future - * Return Vout - * -uint16_t mcp4728_getVout(uint8_t channel) { - uint32_t vref = 2048; - uint32_t vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096; - if (vOut > defaultVDD) vOut = defaultVDD; - return vOut; -} -*/ - -/** - * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1 - * DAC Input and PowerDown bits update. - * No EEPROM update - */ -uint8_t mcp4728_fastWrite() { - Wire.beginTransmission(DAC_DEV_ADDRESS); - for (uint8_t channel=0; channel <= 3; channel++) { - Wire.write(highByte(mcp4728_values[channel])); - Wire.write(lowByte(mcp4728_values[channel])); - } - return Wire.endTransmission(); -} - -/** - * Common function for simple general commands - */ -uint8_t mcp4728_simpleCommand(byte simpleCommand) { - Wire.beginTransmission(GENERALCALL); - Wire.write(simpleCommand); - return Wire.endTransmission(); -} - -#endif // DAC_STEPPER_CURRENT diff --git a/Marlin/dac_mcp4728.h b/Marlin/dac_mcp4728.h deleted file mode 100644 index c096c85..0000000 --- a/Marlin/dac_mcp4728.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino library for MicroChip MCP4728 I2C D/A converter. - */ - -#ifndef mcp4728_h -#define mcp4728_h - -#include "MarlinConfig.h" - -#if ENABLED(DAC_STEPPER_CURRENT) -#include "Wire.h" - -#define defaultVDD 5000 -#define BASE_ADDR 0x60 -#define RESET 0B00000110 -#define WAKE 0B00001001 -#define UPDATE 0B00001000 -#define MULTIWRITE 0B01000000 -#define SINGLEWRITE 0B01011000 -#define SEQWRITE 0B01010000 -#define VREFWRITE 0B10000000 -#define GAINWRITE 0B11000000 -#define POWERDOWNWRITE 0B10100000 -#define GENERALCALL 0B00000000 -#define GAINWRITE 0B11000000 - -// This is taken from the original lib, makes it easy to edit if needed -// DAC_OR_ADDRESS defined in pins_BOARD.h file -#define DAC_DEV_ADDRESS (BASE_ADDR | DAC_OR_ADDRESS) - - -void mcp4728_init(); -uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value); -uint8_t mcp4728_eepromWrite(); -uint8_t mcp4728_setVref_all(uint8_t value); -uint8_t mcp4728_setGain_all(uint8_t value); -uint16_t mcp4728_getValue(uint8_t channel); -uint8_t mcp4728_fastWrite(); -uint8_t mcp4728_simpleCommand(byte simpleCommand); - -#endif -#endif - diff --git a/Marlin/digipot_mcp4451.cpp b/Marlin/digipot_mcp4451.cpp deleted file mode 100644 index c6a0191..0000000 --- a/Marlin/digipot_mcp4451.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "MarlinConfig.h" - -#if ENABLED(DIGIPOT_I2C) - -#include "Stream.h" -#include "utility/twi.h" -#include "Wire.h" - -// Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro -#if MB(5DPRINT) - #define DIGIPOT_I2C_FACTOR 117.96 - #define DIGIPOT_I2C_MAX_CURRENT 1.736 -#else - #define DIGIPOT_I2C_FACTOR 106.7 - #define DIGIPOT_I2C_MAX_CURRENT 2.5 -#endif - -static byte current_to_wiper(float current) { - return byte(ceil(float((DIGIPOT_I2C_FACTOR * current)))); -} - -static void i2c_send(byte addr, byte a, byte b) { - Wire.beginTransmission(addr); - Wire.write(a); - Wire.write(b); - Wire.endTransmission(); -} - -// This is for the MCP4451 I2C based digipot -void digipot_i2c_set_current(int channel, float current) { - current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT); - // these addresses are specific to Azteeg X3 Pro, can be set to others, - // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1 - byte addr = 0x2C; // channel 0-3 - if (channel >= 4) { - addr = 0x2E; // channel 4-7 - channel -= 4; - } - - // Initial setup - i2c_send(addr, 0x40, 0xff); - i2c_send(addr, 0xA0, 0xff); - - // Set actual wiper value - byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 }; - i2c_send(addr, addresses[channel], current_to_wiper(current)); -} - -void digipot_i2c_init() { - const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS; - Wire.begin(); - // setup initial currents as defined in Configuration_adv.h - for (int i = 0; i < COUNT(digipot_motor_current); i++) - digipot_i2c_set_current(i, digipot_motor_current[i]); -} - -#endif //DIGIPOT_I2C diff --git a/Marlin/dogm_bitmaps.h b/Marlin/dogm_bitmaps.h deleted file mode 100644 index e020d24..0000000 --- a/Marlin/dogm_bitmaps.h +++ /dev/null @@ -1,422 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Standard Marlin Bitmap for splashscreen - * - * You may use one of the following tools to generate the C++ bitmap array from - * a black and white image: - * - * - http://www.marlinfw.org/tools/u8glib/converter.html - * - http://www.digole.com/tools/PicturetoC_Hex_converter.php - * - * Please note that using the high-res version takes 402Bytes of PROGMEM. - */ - -//#define START_BMPHIGH - -#if ENABLED(SHOW_BOOTSCREEN) - #if ENABLED(START_BMPHIGH) - #define START_BMPWIDTH 112 - #define START_BMPHEIGHT 38 - #define START_BMPBYTEWIDTH 14 - #define START_BMPBYTES 532 // START_BMPWIDTH * START_BMPHEIGHT / 8 - - const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, - 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, - 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xFF, - 0xC0, 0x0F, 0xC0, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x00, 0x1F, 0xFF, - 0xC0, 0x3F, 0xE1, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x0F, 0xFF, - 0xC0, 0x7F, 0xF3, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x07, 0xFF, - 0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x03, 0xFF, - 0xC1, 0xF8, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xFF, - 0xC1, 0xF0, 0x3F, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFF, - 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x1F, 0x00, 0x03, 0xE0, 0x78, 0x3C, 0x03, 0xF0, 0x7F, - 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0xC0, 0x0F, 0xF8, 0x78, 0x3C, 0x07, 0xFC, 0x3F, - 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0xE0, 0x1F, 0xFC, 0x78, 0x3C, 0x0F, 0xFE, 0x1F, - 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0xF0, 0x3F, 0xFE, 0x78, 0x3C, 0x1F, 0xFE, 0x0F, - 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xF3, 0xF8, 0x3F, 0x3E, 0x78, 0x3C, 0x3F, 0x3F, 0x07, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xE0, 0xFC, 0x7C, 0x1F, 0x78, 0x3C, 0x3E, 0x1F, 0x07, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x7C, 0x7C, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x7C, 0x78, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xE0, 0x3C, 0x78, 0x00, 0x7C, 0x3C, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0x3F, 0xF8, 0x00, 0x7F, 0xBC, 0x3C, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0x3F, 0xF8, 0x00, 0x3F, 0xBF, 0xFC, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0xFF, 0x3F, 0xF8, 0x00, 0x1F, 0xBF, 0xFC, 0x0F, 0x03, - 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0x3F, 0xF8, 0x00, 0x0F, 0xBF, 0xFC, 0x0F, 0x03, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, - 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80 }; - #else - #define START_BMPWIDTH 56 - #define START_BMPHEIGHT 19 - #define START_BMPBYTEWIDTH 7 - #define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8 - - const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { - 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, - 0x83, 0xCF, 0x00, 0x00, 0x0C, 0x30, 0x3F, - 0x87, 0xFF, 0x80, 0x00, 0x0C, 0x30, 0x1F, - 0x86, 0x79, 0x80, 0x00, 0x0C, 0x00, 0x0F, - 0x8C, 0x30, 0xC7, 0x83, 0x8C, 0x30, 0xE7, - 0x8C, 0x30, 0xCF, 0xC7, 0xCC, 0x31, 0xF3, - 0x8C, 0x30, 0xDC, 0xEC, 0xEC, 0x33, 0xB9, - 0x8C, 0x30, 0xD8, 0x6C, 0x6C, 0x33, 0x19, - 0x8C, 0x30, 0xD0, 0x6C, 0x0C, 0x33, 0x19, - 0x8C, 0x30, 0xD8, 0x6C, 0x0C, 0x33, 0x19, - 0x8C, 0x30, 0xDC, 0x6C, 0x0E, 0x3B, 0x19, - 0x8C, 0x30, 0xCF, 0x7C, 0x07, 0x9F, 0x19, - 0x8C, 0x30, 0xC7, 0x7C, 0x03, 0x8F, 0x19, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8 }; - #endif -#endif - -// Here comes a compile-time operation to match the extruder symbols -// on the info screen to the set number of extruders in configuration.h -// -// When only one extruder is selected, the "1" on the symbol will not -// be displayed. - -#if HAS_TEMP_BED - #if HOTENDS == 1 - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - #elif HOTENDS == 2 - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - #else - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 - }; - #endif // Extruders -#else - #if HOTENDS == 1 - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - #elif HOTENDS == 2 - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - #else - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - - #define STATUS_SCREENWIDTH 115 //Width in pixels - #define STATUS_SCREENHEIGHT 19 //Height in pixels - #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes - const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, - 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, - 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, - 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, - 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, - 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, - 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, - 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, - 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, - 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - #endif // Extruders -#endif // HAS_TEMP_BED diff --git a/Marlin/dogm_font_data_6x9_marlin.h b/Marlin/dogm_font_data_6x9_marlin.h deleted file mode 100644 index f298a6a..0000000 --- a/Marlin/dogm_font_data_6x9_marlin.h +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1 - Copyright: Public domain font. Share and enjoy. - Capital A Height: 6, '1' Height: 6 - Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 7 len= 9 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 - Pure Font ascent = 6 descent=-2 - X Font ascent = 6 descent=-2 - Max Font ascent = 7 descent=-2 -*/ -#include -const u8g_fntpgm_uint8_t u8g_font_6x9[2300] U8G_SECTION(".progmem.u8g_font_6x9") = { - 0, 6, 9, 0, 254, 6, 1, 137, 2, 254, 32, 255, 254, 7, 254, 6, - 254, 0, 0, 0, 6, 0, 7, 1, 6, 6, 6, 2, 0, 128, 128, 128, - 128, 0, 128, 3, 3, 3, 6, 1, 3, 160, 160, 160, 5, 7, 7, 6, - 0, 255, 80, 80, 248, 80, 248, 80, 80, 5, 9, 9, 6, 0, 254, 32, - 112, 168, 160, 112, 40, 168, 112, 32, 6, 8, 8, 6, 0, 255, 64, 168, - 72, 16, 32, 72, 84, 8, 5, 7, 7, 6, 0, 255, 96, 144, 144, 96, - 152, 144, 104, 1, 3, 3, 6, 2, 3, 128, 128, 128, 2, 7, 7, 6, - 2, 255, 64, 128, 128, 128, 128, 128, 64, 2, 7, 7, 6, 2, 255, 128, - 64, 64, 64, 64, 64, 128, 5, 5, 5, 6, 0, 0, 136, 80, 248, 80, - 136, 5, 5, 5, 6, 0, 0, 32, 32, 248, 32, 32, 2, 4, 4, 6, - 2, 254, 192, 64, 64, 128, 5, 1, 1, 6, 0, 2, 248, 2, 2, 2, - 6, 2, 0, 192, 192, 4, 6, 6, 6, 1, 0, 16, 16, 32, 64, 128, - 128, 4, 6, 6, 6, 1, 0, 96, 144, 144, 144, 144, 96, 3, 6, 6, - 6, 1, 0, 64, 192, 64, 64, 64, 224, 4, 6, 6, 6, 1, 0, 96, - 144, 16, 32, 64, 240, 4, 6, 6, 6, 1, 0, 240, 32, 96, 16, 16, - 224, 5, 6, 6, 6, 0, 0, 16, 48, 80, 144, 248, 16, 4, 6, 6, - 6, 1, 0, 240, 128, 224, 16, 16, 224, 4, 6, 6, 6, 1, 0, 96, - 128, 224, 144, 144, 96, 4, 6, 6, 6, 1, 0, 240, 16, 16, 32, 64, - 64, 4, 6, 6, 6, 1, 0, 96, 144, 96, 144, 144, 96, 4, 6, 6, - 6, 1, 0, 96, 144, 144, 112, 16, 96, 2, 5, 5, 6, 2, 0, 192, - 192, 0, 192, 192, 2, 7, 7, 6, 2, 254, 192, 192, 0, 192, 64, 64, - 128, 5, 5, 5, 6, 0, 0, 24, 96, 128, 96, 24, 5, 3, 3, 6, - 0, 1, 248, 0, 248, 5, 5, 5, 6, 0, 0, 192, 48, 8, 48, 192, - 4, 7, 7, 6, 1, 0, 96, 144, 16, 96, 64, 0, 64, 5, 6, 6, - 6, 0, 0, 112, 144, 168, 176, 128, 112, 5, 6, 6, 6, 0, 0, 32, - 80, 136, 248, 136, 136, 5, 6, 6, 6, 0, 0, 240, 136, 240, 136, 136, - 240, 4, 6, 6, 6, 1, 0, 96, 144, 128, 128, 144, 96, 4, 6, 6, - 6, 1, 0, 224, 144, 144, 144, 144, 224, 4, 6, 6, 6, 1, 0, 240, - 128, 224, 128, 128, 240, 4, 6, 6, 6, 1, 0, 240, 128, 224, 128, 128, - 128, 4, 6, 6, 6, 1, 0, 96, 144, 128, 176, 144, 96, 4, 6, 6, - 6, 1, 0, 144, 144, 240, 144, 144, 144, 3, 6, 6, 6, 1, 0, 224, - 64, 64, 64, 64, 224, 5, 6, 6, 6, 0, 0, 56, 16, 16, 16, 144, - 96, 4, 6, 6, 6, 1, 0, 144, 160, 192, 160, 144, 144, 4, 6, 6, - 6, 1, 0, 128, 128, 128, 128, 128, 240, 5, 6, 6, 6, 0, 0, 136, - 216, 168, 168, 136, 136, 4, 6, 6, 6, 1, 0, 144, 208, 176, 144, 144, - 144, 5, 6, 6, 6, 0, 0, 112, 136, 136, 136, 136, 112, 4, 6, 6, - 6, 1, 0, 224, 144, 144, 224, 128, 128, 4, 7, 7, 6, 1, 255, 96, - 144, 144, 208, 176, 96, 16, 4, 6, 6, 6, 1, 0, 224, 144, 144, 224, - 144, 144, 4, 6, 6, 6, 1, 0, 96, 144, 64, 32, 144, 96, 5, 6, - 6, 6, 0, 0, 248, 32, 32, 32, 32, 32, 4, 6, 6, 6, 1, 0, - 144, 144, 144, 144, 144, 96, 4, 6, 6, 6, 1, 0, 144, 144, 144, 240, - 96, 96, 5, 6, 6, 6, 0, 0, 136, 136, 168, 168, 216, 136, 5, 6, - 6, 6, 0, 0, 136, 80, 32, 32, 80, 136, 5, 6, 6, 6, 0, 0, - 136, 136, 80, 32, 32, 32, 4, 6, 6, 6, 1, 0, 240, 16, 32, 64, - 128, 240, 3, 6, 6, 6, 1, 0, 224, 128, 128, 128, 128, 224, 4, 6, - 6, 6, 1, 0, 128, 128, 64, 32, 16, 16, 3, 6, 6, 6, 1, 0, - 224, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 3, 32, 80, 136, 5, - 1, 1, 6, 0, 254, 248, 2, 2, 2, 6, 2, 4, 128, 64, 4, 4, - 4, 6, 1, 0, 112, 144, 144, 112, 4, 6, 6, 6, 1, 0, 128, 128, - 224, 144, 144, 224, 4, 4, 4, 6, 1, 0, 112, 128, 128, 112, 4, 6, - 6, 6, 1, 0, 16, 16, 112, 144, 144, 112, 4, 4, 4, 6, 1, 0, - 96, 176, 192, 112, 4, 6, 6, 6, 1, 0, 32, 80, 64, 224, 64, 64, - 4, 6, 6, 6, 1, 254, 96, 144, 144, 112, 16, 96, 4, 6, 6, 6, - 1, 0, 128, 128, 224, 144, 144, 144, 3, 6, 6, 6, 1, 0, 64, 0, - 192, 64, 64, 224, 3, 8, 8, 6, 1, 254, 32, 0, 96, 32, 32, 32, - 160, 64, 4, 6, 6, 6, 1, 0, 128, 128, 160, 192, 160, 144, 3, 6, - 6, 6, 1, 0, 192, 64, 64, 64, 64, 224, 5, 4, 4, 6, 0, 0, - 208, 168, 168, 136, 4, 4, 4, 6, 1, 0, 224, 144, 144, 144, 4, 4, - 4, 6, 1, 0, 96, 144, 144, 96, 4, 6, 6, 6, 1, 254, 224, 144, - 144, 224, 128, 128, 4, 6, 6, 6, 1, 254, 112, 144, 144, 112, 16, 16, - 4, 4, 4, 6, 1, 0, 160, 208, 128, 128, 4, 4, 4, 6, 1, 0, - 112, 192, 48, 224, 4, 6, 6, 6, 1, 0, 64, 64, 224, 64, 80, 32, - 4, 4, 4, 6, 1, 0, 144, 144, 144, 112, 4, 4, 4, 6, 1, 0, - 144, 144, 96, 96, 5, 4, 4, 6, 0, 0, 136, 168, 168, 80, 4, 4, - 4, 6, 1, 0, 144, 96, 96, 144, 4, 6, 6, 6, 1, 254, 144, 144, - 144, 112, 144, 96, 4, 4, 4, 6, 1, 0, 240, 32, 64, 240, 3, 7, - 7, 6, 1, 0, 32, 64, 64, 128, 64, 64, 32, 1, 7, 7, 6, 2, - 255, 128, 128, 128, 128, 128, 128, 128, 3, 7, 7, 6, 1, 0, 128, 64, - 64, 32, 64, 64, 128, 4, 2, 2, 6, 1, 3, 80, 160, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, - 0, 6, 0, 7, 1, 6, 6, 6, 2, 0, 128, 0, 128, 128, 128, 128, - 4, 6, 6, 6, 1, 255, 32, 112, 160, 160, 112, 32, 5, 7, 7, 6, - 0, 255, 48, 72, 64, 240, 64, 64, 248, 5, 5, 5, 6, 0, 0, 168, - 80, 136, 80, 168, 5, 6, 6, 6, 0, 0, 136, 80, 248, 32, 248, 32, - 1, 7, 7, 6, 2, 255, 128, 128, 128, 0, 128, 128, 128, 4, 7, 7, - 6, 1, 255, 112, 128, 96, 144, 96, 16, 224, 3, 1, 1, 6, 1, 5, - 160, 6, 7, 7, 6, 0, 0, 120, 132, 148, 164, 148, 132, 120, 3, 5, - 5, 6, 1, 1, 96, 160, 96, 0, 224, 5, 5, 5, 6, 0, 0, 40, - 80, 160, 80, 40, 4, 3, 3, 6, 1, 0, 240, 16, 16, 4, 1, 1, - 6, 1, 2, 240, 6, 7, 7, 6, 0, 0, 120, 132, 180, 164, 164, 132, - 120, 4, 1, 1, 6, 1, 5, 240, 4, 3, 3, 6, 1, 2, 96, 144, - 96, 5, 7, 7, 6, 0, 255, 32, 32, 248, 32, 32, 0, 248, 3, 5, - 5, 6, 1, 1, 64, 160, 32, 64, 224, 3, 5, 5, 6, 1, 1, 192, - 32, 64, 32, 192, 2, 2, 2, 6, 2, 4, 64, 128, 4, 5, 5, 6, - 1, 255, 144, 144, 176, 208, 128, 5, 6, 6, 6, 0, 0, 120, 232, 232, - 104, 40, 40, 1, 1, 1, 6, 2, 2, 128, 2, 2, 2, 6, 2, 254, - 64, 128, 3, 5, 5, 6, 1, 1, 64, 192, 64, 64, 224, 3, 5, 5, - 6, 1, 1, 64, 160, 64, 0, 224, 5, 5, 5, 6, 0, 0, 160, 80, - 40, 80, 160, 5, 8, 8, 6, 0, 255, 64, 192, 64, 80, 112, 48, 120, - 16, 5, 8, 8, 6, 0, 255, 64, 192, 64, 80, 104, 8, 16, 56, 5, - 8, 8, 6, 0, 255, 192, 32, 64, 48, 240, 48, 120, 16, 4, 7, 7, - 6, 1, 0, 32, 0, 32, 96, 128, 144, 96, 5, 7, 7, 6, 0, 0, - 64, 32, 32, 80, 112, 136, 136, 5, 7, 7, 6, 0, 0, 16, 32, 32, - 80, 112, 136, 136, 5, 7, 7, 6, 0, 0, 32, 80, 32, 80, 112, 136, - 136, 5, 7, 7, 6, 0, 0, 40, 80, 32, 80, 112, 136, 136, 5, 7, - 7, 6, 0, 0, 80, 0, 32, 80, 112, 136, 136, 5, 7, 7, 6, 0, - 0, 32, 80, 32, 80, 112, 136, 136, 5, 6, 6, 6, 0, 0, 120, 160, - 240, 160, 160, 184, 4, 8, 8, 6, 1, 254, 96, 144, 128, 128, 144, 96, - 32, 64, 4, 7, 7, 6, 1, 0, 64, 32, 240, 128, 224, 128, 240, 4, - 7, 7, 6, 1, 0, 32, 64, 240, 128, 224, 128, 240, 4, 7, 7, 6, - 1, 0, 32, 80, 240, 128, 224, 128, 240, 4, 7, 7, 6, 1, 0, 80, - 0, 240, 128, 224, 128, 240, 3, 7, 7, 6, 1, 0, 128, 64, 224, 64, - 64, 64, 224, 3, 7, 7, 6, 1, 0, 32, 64, 224, 64, 64, 64, 224, - 3, 7, 7, 6, 1, 0, 64, 160, 224, 64, 64, 64, 224, 3, 7, 7, - 6, 1, 0, 160, 0, 224, 64, 64, 64, 224, 5, 6, 6, 6, 0, 0, - 112, 72, 232, 72, 72, 112, 4, 7, 7, 6, 1, 0, 80, 160, 144, 208, - 176, 144, 144, 4, 7, 7, 6, 1, 0, 64, 32, 96, 144, 144, 144, 96, - 4, 7, 7, 6, 1, 0, 32, 64, 96, 144, 144, 144, 96, 4, 7, 7, - 6, 1, 0, 32, 80, 96, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, - 80, 160, 96, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 80, 0, 96, - 144, 144, 144, 96, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 4, - 8, 8, 6, 1, 255, 16, 112, 176, 176, 208, 208, 224, 128, 4, 7, 7, - 6, 1, 0, 64, 32, 144, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, - 32, 64, 144, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 80, 144, - 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 80, 0, 144, 144, 144, 144, - 96, 5, 7, 7, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, 4, 6, - 6, 6, 1, 0, 128, 224, 144, 144, 224, 128, 4, 6, 6, 6, 1, 0, - 96, 144, 160, 160, 144, 160, 4, 7, 7, 6, 1, 0, 64, 32, 0, 112, - 144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 64, 0, 112, 144, 144, 112, - 4, 7, 7, 6, 1, 0, 32, 80, 0, 112, 144, 144, 112, 4, 7, 7, - 6, 1, 0, 80, 160, 0, 112, 144, 144, 112, 4, 6, 6, 6, 1, 0, - 80, 0, 112, 144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 80, 32, 112, - 144, 144, 112, 5, 4, 4, 6, 0, 0, 112, 168, 176, 120, 4, 6, 6, - 6, 1, 254, 112, 128, 128, 112, 32, 64, 4, 7, 7, 6, 1, 0, 64, - 32, 0, 96, 176, 192, 112, 4, 7, 7, 6, 1, 0, 32, 64, 0, 96, - 176, 192, 112, 4, 7, 7, 6, 1, 0, 32, 80, 0, 96, 176, 192, 112, - 4, 6, 6, 6, 1, 0, 80, 0, 96, 176, 192, 112, 3, 7, 7, 6, - 1, 0, 128, 64, 0, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 32, - 64, 0, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 64, 160, 0, 192, - 64, 64, 224, 3, 6, 6, 6, 1, 0, 160, 0, 192, 64, 64, 224, 4, - 7, 7, 6, 1, 0, 48, 96, 16, 112, 144, 144, 96, 4, 7, 7, 6, - 1, 0, 80, 160, 0, 224, 144, 144, 144, 4, 7, 7, 6, 1, 0, 64, - 32, 0, 96, 144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 64, 0, 96, - 144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 80, 0, 96, 144, 144, 96, - 4, 7, 7, 6, 1, 0, 80, 160, 0, 96, 144, 144, 96, 4, 6, 6, - 6, 1, 0, 80, 0, 96, 144, 144, 96, 5, 5, 5, 6, 0, 0, 32, - 0, 248, 0, 32, 4, 4, 4, 6, 1, 0, 112, 176, 208, 224, 4, 7, - 7, 6, 1, 0, 64, 32, 0, 144, 144, 144, 112, 4, 7, 7, 6, 1, - 0, 32, 64, 0, 144, 144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 80, - 0, 144, 144, 144, 112, 4, 6, 6, 6, 1, 0, 80, 0, 144, 144, 144, - 112, 4, 9, 9, 6, 1, 254, 32, 64, 0, 144, 144, 144, 112, 144, 96, - 4, 8, 8, 6, 1, 254, 128, 128, 224, 144, 144, 224, 128, 128, 4, 8, - 8, 6, 1, 254, 80, 0, 144, 144, 144, 112, 144, 96 -}; diff --git a/Marlin/dogm_font_data_HD44780_C.h b/Marlin/dogm_font_data_HD44780_C.h deleted file mode 100644 index 21d4aaa..0000000 --- a/Marlin/dogm_font_data_HD44780_C.h +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: HD44780_C v1.2 - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h= 8 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 8 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t HD44780_C_5x7[2522] U8G_SECTION(".progmem.HD44780_C_5x7") = { - 0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 255, 7, - 255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, - 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, - 136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, - 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, - 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, - 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, - 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, - 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, - 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, - 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, - 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, - 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, - 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, - 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, - 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, - 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, - 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, - 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, - 5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 3, 7, 7, - 6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, - 32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, - 128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, - 6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, - 112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, - 136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, - 6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, - 112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, - 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, - 3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, - 7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, - 0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, - 168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, - 5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, - 136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, - 8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, - 0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, - 64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, - 5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, - 136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, - 5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, - 0, 0, 248, 16, 32, 64, 248, 5, 5, 5, 6, 0, 2, 184, 168, 168, - 168, 184, 5, 5, 5, 6, 0, 2, 184, 136, 184, 160, 184, 5, 5, 5, - 6, 0, 2, 184, 160, 184, 136, 184, 5, 6, 6, 6, 0, 1, 8, 40, - 72, 248, 64, 32, 5, 5, 5, 6, 0, 0, 56, 112, 224, 136, 240, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, - 7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240, 5, 7, 7, 6, - 0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 80, - 0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112, - 168, 168, 168, 5, 7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8, - 6, 0, 0, 80, 32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0, - 0, 120, 40, 40, 40, 40, 168, 72, 5, 7, 7, 6, 0, 0, 248, 136, - 136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136, 80, 32, - 64, 128, 5, 7, 7, 6, 0, 0, 32, 112, 168, 168, 168, 112, 32, 5, - 7, 7, 6, 0, 0, 136, 136, 136, 120, 8, 8, 8, 5, 7, 7, 6, - 0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 7, 7, 6, 0, 0, 192, - 64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200, - 168, 168, 200, 5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112, - 5, 7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, - 6, 0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0, - 24, 96, 128, 240, 136, 136, 112, 4, 5, 5, 6, 0, 0, 224, 144, 224, - 144, 224, 5, 5, 5, 6, 0, 0, 248, 136, 128, 128, 128, 5, 7, 7, - 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6, 0, 0, - 168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48, 8, 240, - 5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7, 6, 0, - 0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0, 144, 160, - 192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72, 5, 5, - 5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0, 0, 136, - 136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5, - 5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 5, 5, 6, 0, 0, - 136, 136, 120, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168, 168, 168, 248, - 5, 5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0, - 0, 136, 136, 200, 168, 200, 4, 5, 5, 6, 0, 0, 128, 128, 224, 144, - 224, 5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6, - 0, 0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120, - 40, 72, 5, 5, 5, 6, 0, 1, 32, 72, 144, 72, 32, 5, 5, 5, - 6, 0, 1, 32, 144, 72, 144, 32, 5, 3, 3, 6, 0, 0, 72, 144, - 216, 5, 3, 3, 6, 0, 4, 216, 72, 144, 5, 7, 7, 6, 0, 0, - 144, 208, 176, 144, 56, 40, 56, 5, 7, 7, 6, 0, 0, 32, 0, 32, - 64, 128, 136, 112, 5, 7, 7, 6, 0, 0, 24, 32, 32, 112, 32, 32, - 192, 5, 7, 7, 6, 0, 0, 32, 80, 64, 240, 64, 64, 120, 1, 2, - 2, 6, 2, 0, 128, 128, 1, 4, 4, 6, 2, 0, 128, 128, 128, 128, - 3, 5, 5, 6, 1, 0, 160, 160, 160, 0, 224, 3, 5, 5, 6, 1, - 0, 160, 160, 160, 0, 160, 5, 7, 7, 6, 0, 0, 160, 0, 232, 16, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 216, 112, 32, 112, 216, 5, 7, - 7, 6, 0, 0, 160, 64, 168, 16, 32, 64, 128, 3, 6, 6, 6, 1, - 1, 224, 64, 64, 64, 64, 224, 5, 6, 6, 6, 0, 1, 248, 80, 80, - 80, 80, 248, 5, 7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32, - 5, 7, 7, 6, 0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 7, 7, - 6, 0, 0, 128, 144, 176, 248, 176, 144, 128, 5, 7, 7, 6, 0, 0, - 8, 72, 104, 248, 104, 72, 8, 5, 7, 7, 6, 0, 0, 128, 136, 168, - 248, 168, 136, 128, 5, 7, 7, 6, 0, 0, 128, 224, 136, 16, 32, 64, - 128, 2, 2, 2, 6, 2, 2, 192, 192, 5, 8, 8, 6, 0, 255, 120, - 40, 40, 40, 72, 136, 248, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136, - 136, 136, 136, 248, 8, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168, - 168, 248, 8, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248, 136, 5, - 7, 7, 6, 0, 255, 32, 32, 112, 168, 168, 112, 32, 5, 6, 6, 6, - 0, 255, 136, 136, 136, 136, 248, 8, 5, 6, 6, 6, 0, 255, 168, 168, - 168, 168, 248, 8, 2, 2, 2, 6, 2, 6, 64, 128, 3, 1, 1, 6, - 1, 7, 160, 5, 2, 2, 6, 0, 6, 72, 176, 5, 8, 8, 6, 0, - 0, 16, 32, 0, 112, 136, 248, 128, 112, 5, 6, 6, 6, 0, 255, 112, - 128, 136, 112, 32, 96, 3, 7, 7, 6, 1, 0, 160, 0, 160, 160, 160, - 32, 192, 5, 6, 6, 6, 0, 1, 32, 112, 112, 112, 248, 32, 5, 5, - 5, 6, 0, 1, 80, 0, 136, 0, 80, 5, 5, 5, 6, 0, 1, 112, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, - 8, 5, 7, 7, 6, 0, 0, 136, 144, 184, 72, 184, 8, 56, 5, 7, - 7, 6, 0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, - 0, 192, 64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 136, - 248, 136, 248, 136, 248, 136, 4, 5, 5, 6, 0, 2, 192, 0, 48, 0, - 96, 5, 8, 8, 6, 0, 0, 64, 160, 224, 168, 8, 40, 120, 32, 5, - 8, 8, 6, 0, 0, 64, 112, 64, 120, 64, 112, 64, 224, 5, 8, 8, - 6, 0, 0, 32, 112, 32, 248, 32, 112, 32, 112, 5, 7, 7, 6, 0, - 0, 104, 0, 232, 0, 104, 16, 56, 5, 8, 8, 6, 0, 0, 16, 112, - 16, 240, 16, 112, 16, 56, 5, 7, 7, 6, 0, 1, 32, 112, 32, 248, - 32, 112, 32, 5, 8, 8, 6, 0, 0, 16, 144, 80, 48, 80, 144, 16, - 56, 5, 8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5, - 7, 7, 6, 0, 0, 120, 168, 168, 120, 40, 40, 40, 5, 8, 8, 6, - 0, 0, 248, 248, 248, 248, 248, 248, 248, 248 -}; diff --git a/Marlin/dogm_font_data_HD44780_J.h b/Marlin/dogm_font_data_HD44780_J.h deleted file mode 100644 index e4884c7..0000000 --- a/Marlin/dogm_font_data_HD44780_J.h +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: HD44780_J - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 6 h=10 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-2 -*/ -#include -const u8g_fntpgm_uint8_t HD44780_J_5x7[2492] U8G_SECTION(".progmem.HD44780_J_5x7") = { - 0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 254, 7, - 255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, - 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, - 136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, - 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, - 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, - 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, - 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, - 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, - 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, - 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, - 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, - 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, - 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, - 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, - 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, - 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, - 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, - 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, - 5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248, 32, 32, 3, 7, 7, - 6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, - 32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, - 128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, - 6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, - 112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, - 136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, - 6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, - 112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, - 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, - 3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, - 7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, - 0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, - 168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, - 5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, - 136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, - 8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, - 0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, - 64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, - 5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, - 136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, - 5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, - 0, 0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, - 128, 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, - 128, 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 5, - 5, 6, 0, 1, 32, 16, 248, 16, 32, 5, 5, 5, 6, 0, 1, 32, - 64, 248, 64, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 3, 3, 3, 6, 0, 0, - 224, 160, 224, 3, 4, 4, 6, 2, 3, 224, 128, 128, 128, 3, 4, 4, - 6, 0, 0, 32, 32, 32, 224, 3, 3, 3, 6, 0, 0, 128, 64, 32, - 2, 2, 2, 6, 1, 2, 192, 192, 5, 6, 6, 6, 0, 0, 248, 8, - 248, 8, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 48, 32, 64, 4, - 5, 5, 6, 0, 0, 16, 32, 96, 160, 32, 5, 5, 5, 6, 0, 0, - 32, 248, 136, 8, 48, 5, 4, 4, 6, 0, 0, 248, 32, 32, 248, 5, - 5, 5, 6, 0, 0, 16, 248, 48, 80, 144, 5, 5, 5, 6, 0, 0, - 64, 248, 72, 80, 64, 5, 4, 4, 6, 0, 0, 112, 16, 16, 248, 4, - 5, 5, 6, 0, 0, 240, 16, 240, 16, 240, 5, 4, 4, 6, 0, 0, - 168, 168, 8, 48, 5, 1, 1, 6, 0, 3, 248, 5, 7, 7, 6, 0, - 0, 248, 8, 40, 48, 32, 32, 64, 5, 7, 7, 6, 0, 0, 8, 16, - 32, 96, 160, 32, 32, 5, 7, 7, 6, 0, 0, 32, 248, 136, 136, 8, - 16, 32, 5, 6, 6, 6, 0, 0, 248, 32, 32, 32, 32, 248, 5, 7, - 7, 6, 0, 0, 16, 248, 16, 48, 80, 144, 16, 5, 7, 7, 6, 0, - 0, 64, 248, 72, 72, 72, 72, 144, 5, 7, 7, 6, 0, 0, 32, 248, - 32, 248, 32, 32, 32, 5, 6, 6, 6, 0, 0, 120, 72, 136, 8, 16, - 96, 5, 7, 7, 6, 0, 0, 64, 120, 144, 16, 16, 16, 32, 5, 6, - 6, 6, 0, 0, 248, 8, 8, 8, 8, 248, 5, 7, 7, 6, 0, 0, - 80, 248, 80, 80, 16, 32, 64, 5, 6, 6, 6, 0, 0, 192, 8, 200, - 8, 16, 224, 5, 6, 6, 6, 0, 0, 248, 8, 16, 32, 80, 136, 5, - 7, 7, 6, 0, 0, 64, 248, 72, 80, 64, 64, 56, 5, 6, 6, 6, - 0, 0, 136, 136, 72, 8, 16, 96, 5, 6, 6, 6, 0, 0, 120, 72, - 168, 24, 16, 96, 5, 7, 7, 6, 0, 0, 16, 224, 32, 248, 32, 32, - 64, 5, 6, 6, 6, 0, 0, 168, 168, 168, 8, 16, 32, 5, 7, 7, - 6, 0, 0, 112, 0, 248, 32, 32, 32, 64, 3, 7, 7, 6, 1, 0, - 128, 128, 128, 192, 160, 128, 128, 5, 7, 7, 6, 0, 0, 32, 32, 248, - 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 112, 0, 0, 0, 0, 248, - 5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5, 7, 7, 6, - 0, 0, 32, 248, 16, 32, 112, 168, 32, 3, 7, 7, 6, 1, 0, 32, - 32, 32, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 32, 16, 136, 136, - 136, 136, 5, 7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5, - 6, 6, 6, 0, 0, 248, 8, 8, 8, 16, 96, 5, 5, 5, 6, 0, - 1, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 0, 32, 248, 32, 32, - 168, 168, 32, 5, 6, 6, 6, 0, 0, 248, 8, 8, 80, 32, 16, 4, - 6, 6, 6, 1, 0, 224, 0, 224, 0, 224, 16, 5, 6, 6, 6, 0, - 0, 32, 64, 128, 136, 248, 8, 5, 6, 6, 6, 0, 0, 8, 8, 80, - 32, 80, 128, 5, 6, 6, 6, 0, 0, 248, 64, 248, 64, 64, 56, 5, - 7, 7, 6, 0, 0, 64, 64, 248, 72, 80, 64, 64, 5, 7, 7, 6, - 0, 0, 112, 16, 16, 16, 16, 16, 248, 5, 6, 6, 6, 0, 0, 248, - 8, 248, 8, 8, 248, 5, 7, 7, 6, 0, 0, 112, 0, 248, 8, 8, - 16, 32, 4, 7, 7, 6, 0, 0, 144, 144, 144, 144, 16, 32, 64, 5, - 6, 6, 6, 0, 0, 32, 160, 160, 168, 168, 176, 5, 7, 7, 6, 0, - 0, 128, 128, 128, 136, 144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136, - 136, 136, 136, 248, 5, 6, 6, 6, 0, 0, 248, 136, 136, 8, 16, 32, - 5, 6, 6, 6, 0, 0, 192, 0, 8, 8, 16, 224, 4, 3, 3, 6, - 0, 4, 32, 144, 64, 3, 3, 3, 6, 0, 4, 224, 160, 224, 5, 5, - 5, 6, 0, 1, 72, 168, 144, 144, 104, 5, 7, 7, 6, 0, 0, 80, - 0, 112, 8, 120, 136, 120, 4, 8, 8, 6, 1, 255, 96, 144, 144, 224, - 144, 144, 224, 128, 5, 5, 5, 6, 0, 0, 112, 128, 96, 136, 112, 5, - 6, 6, 6, 0, 255, 136, 136, 152, 232, 136, 128, 5, 5, 5, 6, 0, - 0, 120, 160, 144, 136, 112, 5, 7, 7, 6, 0, 254, 48, 72, 136, 136, - 240, 128, 128, 5, 8, 8, 6, 0, 254, 120, 136, 136, 136, 120, 8, 8, - 112, 5, 5, 5, 6, 0, 1, 56, 32, 32, 160, 64, 4, 3, 3, 6, - 0, 3, 16, 208, 16, 4, 8, 8, 6, 0, 255, 16, 0, 48, 16, 16, - 16, 144, 96, 3, 3, 3, 6, 0, 4, 160, 64, 160, 5, 7, 7, 6, - 0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, 6, 0, 0, 64, - 64, 224, 64, 224, 64, 120, 5, 7, 7, 6, 0, 0, 112, 0, 176, 200, - 136, 136, 136, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, 112, - 5, 7, 7, 6, 0, 255, 176, 200, 136, 136, 240, 128, 128, 5, 7, 7, - 6, 0, 255, 104, 152, 136, 136, 120, 8, 8, 5, 6, 6, 6, 0, 0, - 112, 136, 248, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, 168, 208, 5, - 5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, 0, 0, - 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 248, 128, 64, - 32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 248, 80, 80, 80, 152, 5, - 7, 7, 6, 0, 0, 248, 0, 136, 80, 32, 80, 136, 5, 7, 7, 6, - 0, 255, 136, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0, 8, - 240, 32, 248, 32, 32, 5, 5, 5, 6, 0, 0, 248, 64, 120, 72, 136, - 5, 5, 5, 6, 0, 0, 248, 168, 248, 136, 136, 5, 5, 5, 6, 0, - 1, 32, 0, 248, 0, 32, 0, 0, 0, 6, 0, 0, 6, 10, 10, 6, - 0, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 -}; diff --git a/Marlin/dogm_font_data_HD44780_W.h b/Marlin/dogm_font_data_HD44780_W.h deleted file mode 100644 index 86b4bf4..0000000 --- a/Marlin/dogm_font_data_HD44780_W.h +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: HD44780_W - Copyright: A.Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t HD44780_W_5x7[3034] U8G_SECTION(".progmem.HD44780_W_5x7") = { - 0, 6, 9, 0, 254, 7, 2, 79, 3, 222, 16, 255, 255, 8, 255, 7, - 255, 4, 7, 7, 6, 0, 0, 16, 48, 112, 240, 112, 48, 16, 4, 7, - 7, 6, 1, 0, 128, 192, 224, 240, 224, 192, 128, 5, 3, 3, 6, 0, - 4, 216, 72, 144, 5, 3, 3, 6, 0, 4, 216, 144, 72, 5, 7, 7, - 6, 0, 0, 32, 112, 248, 0, 32, 112, 248, 5, 7, 7, 6, 0, 0, - 248, 112, 32, 0, 248, 112, 32, 5, 5, 5, 6, 0, 1, 112, 248, 248, - 248, 112, 5, 7, 7, 6, 0, 0, 8, 8, 40, 72, 248, 64, 32, 5, - 7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32, 5, 7, 7, 6, - 0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 5, 5, 6, 0, 1, 32, - 64, 248, 64, 32, 5, 5, 5, 6, 0, 1, 32, 16, 248, 16, 32, 5, - 7, 7, 6, 0, 0, 16, 32, 64, 32, 16, 0, 248, 5, 7, 7, 6, - 0, 0, 64, 32, 16, 32, 64, 0, 248, 5, 5, 5, 6, 0, 1, 32, - 32, 112, 112, 248, 5, 5, 5, 6, 0, 0, 248, 112, 112, 32, 32, 0, - 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, - 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, 0, 0, - 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, 120, 160, - 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, 64, 152, - 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, 2, 3, - 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, 64, 128, - 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, 32, 64, - 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, 5, 6, - 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, 64, 128, - 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, 192, 5, - 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, - 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, 192, 64, - 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, 128, 128, - 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, 5, 7, - 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, 6, 0, - 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, 48, 64, - 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 32, - 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, 112, 5, - 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, 5, 6, - 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, 192, 0, - 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, 32, 16, - 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, 0, 128, - 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, 8, 16, - 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, 112, 5, - 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6, - 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0, 112, - 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, 136, 136, - 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 248, - 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, 7, 7, - 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, 0, 0, - 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, 16, 144, - 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, 5, 7, - 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, 6, 0, - 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, - 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 136, - 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, 128, 5, - 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, 7, 6, - 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120, - 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, 32, 32, - 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 136, 112, - 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, 7, 7, - 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, 0, 0, - 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136, - 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 64, 128, - 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, 5, 5, - 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1, 0, 224, - 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80, 136, 5, - 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64, 5, 5, - 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 128, - 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128, 128, 136, - 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120, 5, 5, - 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0, 0, 48, - 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136, 136, 120, - 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136, 136, 1, - 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8, 8, 6, - 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6, 0, 0, - 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192, 64, 64, - 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168, 168, 5, - 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6, 0, 0, - 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136, 240, 128, - 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5, 5, 5, - 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128, - 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64, 72, 48, - 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5, 6, 0, - 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136, 168, 168, - 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6, 6, 6, - 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0, 248, 16, - 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64, 64, 32, - 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3, 7, 7, - 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 6, 6, 6, 0, 1, - 8, 40, 72, 248, 64, 32, 5, 7, 7, 6, 0, 0, 32, 80, 136, 136, - 136, 136, 248, 5, 7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240, - 5, 8, 8, 6, 0, 255, 120, 40, 40, 40, 72, 136, 248, 136, 5, 7, - 7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5, 7, 7, 6, 0, - 0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 136, 136, - 152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80, 32, 136, 152, 168, - 168, 200, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168, 72, - 5, 7, 7, 6, 0, 0, 248, 136, 136, 136, 136, 136, 136, 5, 7, 7, - 6, 0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 8, 8, 6, 0, 255, - 136, 136, 136, 136, 136, 136, 248, 8, 5, 7, 7, 6, 0, 0, 136, 136, - 136, 120, 8, 8, 8, 5, 7, 7, 6, 0, 0, 168, 168, 168, 168, 168, - 168, 248, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168, 168, 248, 8, - 5, 7, 7, 6, 0, 0, 192, 64, 64, 112, 72, 72, 112, 5, 7, 7, - 6, 0, 0, 136, 136, 136, 200, 168, 168, 200, 5, 7, 7, 6, 0, 0, - 112, 136, 40, 80, 8, 136, 112, 5, 5, 5, 6, 0, 0, 64, 160, 144, - 144, 104, 5, 7, 7, 6, 0, 0, 32, 48, 40, 40, 32, 224, 224, 5, - 7, 7, 6, 0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 5, 5, 6, - 0, 0, 248, 80, 80, 80, 152, 5, 7, 7, 6, 0, 0, 248, 128, 64, - 32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 120, 144, 144, 144, 96, 5, - 7, 7, 6, 0, 0, 48, 40, 56, 40, 200, 216, 24, 5, 6, 6, 6, - 0, 0, 8, 112, 160, 32, 32, 16, 5, 6, 6, 6, 0, 1, 32, 112, - 112, 112, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, - 112, 5, 5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, - 0, 0, 48, 72, 32, 80, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, - 168, 208, 5, 6, 6, 6, 0, 0, 80, 248, 248, 248, 112, 32, 5, 5, - 5, 6, 0, 0, 112, 128, 96, 136, 112, 5, 7, 7, 6, 0, 0, 112, - 136, 136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 216, 216, 216, 216, - 216, 216, 216, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, - 5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, - 6, 0, 0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, - 136, 112, 80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248, - 32, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, - 8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5, 7, 7, - 6, 0, 0, 24, 32, 32, 112, 32, 32, 192, 5, 7, 7, 6, 0, 0, - 248, 136, 184, 184, 184, 136, 248, 5, 7, 7, 6, 0, 0, 112, 8, 120, - 136, 120, 0, 248, 5, 5, 5, 6, 0, 1, 40, 80, 160, 80, 40, 5, - 7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6, - 0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0, 248, - 136, 168, 136, 152, 168, 248, 2, 3, 3, 6, 2, 4, 64, 128, 192, 4, - 5, 5, 6, 0, 3, 96, 144, 144, 144, 96, 5, 7, 7, 6, 0, 0, - 32, 32, 248, 32, 32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, - 64, 240, 3, 5, 5, 6, 0, 3, 224, 32, 224, 32, 224, 5, 8, 8, - 6, 0, 0, 224, 144, 224, 128, 144, 184, 144, 24, 5, 8, 8, 6, 0, - 255, 136, 136, 136, 136, 152, 232, 128, 128, 5, 7, 7, 6, 0, 0, 120, - 152, 152, 120, 24, 24, 24, 2, 2, 2, 6, 2, 2, 192, 192, 5, 5, - 5, 6, 0, 0, 80, 136, 168, 168, 80, 3, 5, 5, 6, 0, 3, 64, - 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 112, 0, - 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5, 7, 7, 6, - 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6, 0, 0, 136, - 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192, 64, 192, 72, - 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32, 64, 128, 136, - 112, 5, 8, 8, 6, 0, 0, 64, 32, 32, 80, 136, 248, 136, 136, 5, - 8, 8, 6, 0, 0, 16, 32, 32, 80, 136, 248, 136, 136, 5, 8, 8, - 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0, - 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 80, - 0, 32, 80, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 32, 80, 32, - 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96, 160, 184, 224, - 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136, 112, 32, 96, - 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128, 248, 5, 8, - 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5, 8, 8, 6, - 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0, - 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0, 128, 64, 0, - 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64, 0, 224, 64, - 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224, 64, 64, 64, - 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64, 224, 5, 7, - 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8, 8, 6, 0, - 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6, 0, 0, 64, - 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 112, - 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, - 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 136, 136, 136, - 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136, 136, 112, 5, - 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 7, 7, 6, 0, 0, - 112, 32, 112, 168, 112, 32, 112, 5, 8, 8, 6, 0, 0, 64, 32, 136, - 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 136, 136, - 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136, 136, 136, - 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136, 136, 136, 112, 5, - 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, 32, 5, 8, 8, - 6, 0, 0, 192, 64, 112, 72, 72, 112, 64, 224, 5, 7, 7, 6, 0, - 0, 48, 72, 72, 112, 72, 72, 176, 5, 8, 8, 6, 0, 0, 64, 32, - 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, - 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 8, 120, - 136, 120, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 8, 120, 136, 120, - 5, 7, 7, 6, 0, 0, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, - 6, 0, 0, 32, 80, 32, 112, 8, 120, 136, 120, 5, 6, 6, 6, 0, - 0, 208, 40, 120, 160, 168, 80, 5, 6, 6, 6, 0, 255, 112, 128, 136, - 112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128, - 112, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 128, 112, 5, - 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 128, 112, 5, 7, 7, - 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 3, 8, 8, 6, 1, 0, - 128, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64, - 0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 64, - 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 64, 192, 64, 64, - 224, 5, 7, 7, 6, 0, 0, 160, 64, 160, 16, 120, 136, 112, 5, 8, - 8, 6, 0, 0, 104, 144, 0, 176, 200, 136, 136, 136, 5, 8, 8, 6, - 0, 0, 64, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, - 16, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, - 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, - 112, 5, 5, 5, 6, 0, 1, 32, 0, 248, 0, 32, 5, 7, 7, 6, - 0, 0, 16, 32, 112, 168, 112, 32, 64, 5, 8, 8, 6, 0, 0, 64, - 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 16, 32, 0, - 136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136, - 136, 152, 104, 5, 7, 7, 6, 0, 0, 80, 0, 136, 136, 136, 152, 104, - 5, 9, 9, 6, 0, 255, 16, 32, 0, 136, 136, 136, 248, 8, 112, 4, - 7, 7, 6, 1, 0, 192, 64, 96, 80, 96, 64, 224, 5, 8, 8, 6, - 0, 255, 80, 0, 136, 136, 136, 248, 8, 112 -}; diff --git a/Marlin/dogm_font_data_ISO10646_1.h b/Marlin/dogm_font_data_ISO10646_1.h deleted file mode 100644 index 8ff40d0..0000000 --- a/Marlin/dogm_font_data_ISO10646_1.h +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: ISO10646-1 - Copyright: A.Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = { - 0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7, - 255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168, - 168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, - 7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, - 0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240, - 136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, - 5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, - 6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, - 128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, - 16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, - 136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, - 7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, - 0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, - 136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, - 128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, - 7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, - 0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, - 32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, - 136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, - 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, - 6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, - 224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, - 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, - 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, - 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, - 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, - 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, - 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, - 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, - 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, - 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, - 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, - 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, - 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, - 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, - 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, - 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, - 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, - 0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64, - 64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, - 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, - 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, - 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, - 0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, - 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, - 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, - 6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, - 0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7, - 7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0, - 0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112, - 80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32, - 1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8, - 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1, - 7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5, - 7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6, - 0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8, - 2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136, - 168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6, - 0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32, - 32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5, - 5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64, - 128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5, - 7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6, - 2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6, - 0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136, - 136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5, - 7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6, - 0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192, - 64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32, - 64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, - 136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136, - 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8, - 8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, - 0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, - 32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96, - 160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136, - 112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128, - 248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5, - 8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7, - 6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0, - 128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64, - 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224, - 64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64, - 224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8, - 8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6, - 0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, - 16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, - 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, - 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136, - 136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8, - 6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0, - 0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, - 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, - 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136, - 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, - 32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224, - 4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8, - 8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, - 0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, - 32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144, - 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8, - 120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136, - 120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6, - 6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64, - 32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0, - 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, - 248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, - 3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8, - 8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6, - 1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, - 160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160, - 16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136, - 136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112, - 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8, - 8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, - 0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, - 80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248, - 0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5, - 8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, - 6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0, - 0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80, - 0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136, - 136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96, - 64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112 -}; diff --git a/Marlin/dogm_font_data_ISO10646_5_Cyrillic.h b/Marlin/dogm_font_data_ISO10646_5_Cyrillic.h deleted file mode 100644 index 75e779f..0000000 --- a/Marlin/dogm_font_data_ISO10646_5_Cyrillic.h +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: ISO10646_5_Cyrillic - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t ISO10646_5_Cyrillic_5x7[2560] U8G_SECTION(".progmem.ISO10646_5_Cyrillic_5x7") = { - 0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7, - 255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, - 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, - 136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, - 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, - 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, - 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, - 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, - 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, - 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, - 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, - 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, - 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, - 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, - 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, - 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, - 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, - 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, - 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, - 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1, - 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80, - 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64, - 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, - 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128, - 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120, - 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0, - 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136, - 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136, - 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8, - 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6, - 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192, - 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168, - 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6, - 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136, - 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5, - 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0, - 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64, - 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5, - 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136, - 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6, - 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0, - 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64, - 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3, - 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6, - 0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 8, 8, 6, 0, 0, - 64, 248, 128, 128, 240, 128, 128, 248, 5, 8, 8, 6, 0, 0, 80, 248, - 128, 128, 240, 128, 128, 248, 5, 7, 7, 6, 0, 0, 224, 64, 64, 112, - 72, 72, 112, 5, 8, 8, 6, 0, 0, 16, 32, 248, 136, 128, 128, 128, - 128, 5, 7, 7, 6, 0, 0, 48, 72, 128, 224, 128, 72, 48, 5, 7, - 7, 6, 0, 0, 112, 136, 128, 112, 8, 136, 112, 3, 7, 7, 6, 1, - 0, 224, 64, 64, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 160, 0, - 224, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, - 16, 144, 96, 5, 7, 7, 6, 0, 0, 160, 160, 160, 184, 168, 168, 184, - 5, 7, 7, 6, 0, 0, 160, 160, 160, 248, 168, 168, 184, 4, 7, 7, - 6, 0, 0, 224, 64, 112, 80, 80, 80, 80, 5, 8, 8, 6, 0, 0, - 16, 32, 136, 144, 160, 224, 144, 136, 5, 8, 8, 6, 0, 0, 64, 32, - 136, 152, 168, 200, 136, 136, 5, 9, 9, 6, 0, 255, 80, 32, 136, 136, - 136, 80, 32, 32, 32, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136, - 136, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, - 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 136, 136, 240, 5, 7, 7, - 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0, - 248, 136, 128, 128, 128, 128, 128, 5, 8, 8, 6, 0, 255, 120, 40, 40, - 40, 72, 136, 248, 136, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, - 128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5, - 7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6, - 0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80, - 32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0, 0, 136, 144, 160, - 192, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168, - 72, 5, 7, 7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, - 7, 6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6, 0, - 0, 112, 136, 136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 136, - 136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, - 128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 128, 128, 128, 136, 112, 5, - 7, 7, 6, 0, 0, 248, 32, 32, 32, 32, 32, 32, 5, 7, 7, 6, - 0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 7, 7, 6, 0, 0, 32, - 112, 168, 168, 168, 112, 32, 5, 7, 7, 6, 0, 0, 136, 136, 80, 32, - 80, 136, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136, 136, 248, - 8, 5, 7, 7, 6, 0, 0, 136, 136, 136, 152, 104, 8, 8, 5, 7, - 7, 6, 0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 8, 8, 6, 0, - 255, 168, 168, 168, 168, 168, 168, 248, 8, 5, 7, 7, 6, 0, 0, 192, - 64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200, - 168, 168, 200, 5, 7, 7, 6, 0, 0, 128, 128, 128, 240, 136, 136, 240, - 5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112, 5, 7, 7, - 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6, 0, 0, - 120, 136, 136, 120, 40, 72, 136, 5, 5, 5, 6, 0, 0, 112, 8, 120, - 136, 120, 5, 7, 7, 6, 0, 0, 24, 96, 128, 240, 136, 136, 112, 4, - 5, 5, 6, 0, 0, 224, 144, 224, 144, 224, 5, 5, 5, 6, 0, 0, - 248, 136, 128, 128, 128, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248, - 136, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6, - 0, 0, 168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48, - 8, 240, 5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7, - 6, 0, 0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0, - 144, 160, 192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72, - 5, 5, 5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0, - 0, 136, 136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 112, 136, 136, 136, - 112, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5, 6, 6, 6, - 0, 255, 240, 136, 136, 240, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128, - 128, 136, 112, 5, 5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 6, - 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0, - 32, 112, 168, 168, 112, 32, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, - 136, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 8, 5, 5, 5, - 6, 0, 0, 136, 136, 248, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168, - 168, 168, 248, 5, 6, 6, 6, 0, 255, 168, 168, 168, 168, 248, 8, 5, - 5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0, 0, - 136, 136, 200, 168, 200, 3, 5, 5, 6, 1, 0, 128, 128, 192, 160, 192, - 5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6, 0, - 0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120, 40, - 72, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128, 112, 5, - 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 9, 9, 6, - 0, 255, 64, 224, 64, 64, 120, 72, 72, 72, 16, 5, 8, 8, 6, 0, - 0, 16, 32, 0, 248, 136, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112, - 136, 96, 136, 112, 5, 5, 5, 6, 0, 0, 112, 128, 112, 8, 240, 1, - 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 7, 7, 6, - 1, 0, 160, 0, 64, 64, 64, 64, 64, 3, 8, 8, 6, 1, 255, 32, - 0, 32, 32, 32, 32, 160, 64, 5, 5, 5, 6, 0, 0, 160, 160, 184, - 168, 184, 5, 5, 5, 6, 0, 0, 160, 160, 248, 168, 184, 5, 6, 6, - 6, 0, 0, 64, 224, 64, 120, 72, 72, 4, 8, 8, 6, 0, 0, 16, - 32, 0, 144, 160, 192, 160, 144, 5, 8, 8, 6, 0, 0, 64, 32, 0, - 136, 152, 168, 200, 136, 5, 9, 9, 6, 0, 255, 80, 32, 0, 136, 136, - 136, 120, 8, 112, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 32 -}; diff --git a/Marlin/dogm_font_data_ISO10646_CN.h b/Marlin/dogm_font_data_ISO10646_CN.h deleted file mode 100644 index 11fdb22..0000000 --- a/Marlin/dogm_font_data_ISO10646_CN.h +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: ISO10646_CN - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w=11 h=11 x= 2 y=10 dx=12 dy= 0 ascent=10 len=22 - Font Bounding box w=12 h=11 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent =10 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t ISO10646_CN[4105] U8G_SECTION(".progmem.ISO10646_CN") = { - 0, 12, 11, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 10, 255, 7, - 255, 0, 0, 0, 6, 0, 10, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 0, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168, - 168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, - 7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, - 0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240, - 136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, - 5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, - 6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, - 128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, - 16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, - 136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, - 7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, - 0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, - 136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, - 128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, - 7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, - 0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, - 32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, - 136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, - 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, - 6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 64, 128, 248, 3, 7, 7, 6, 0, 0, 224, 128, 128, 128, 128, 128, - 224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, - 0, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, - 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, - 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, - 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, - 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, - 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, - 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, - 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, - 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, - 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, - 6, 1, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, - 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, - 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, - 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, - 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, - 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, - 0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64, - 64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, - 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, - 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, - 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, - 0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, - 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, - 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, - 6, 0, 3, 104, 144, 0, 0, 0, 6, 0, 10, 0, 0, 0, 12, 0, - 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, - 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, - 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, - 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, - 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, - 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, - 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, - 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, - 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, - 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, - 12, 0, 10, 0, 0, 0, 12, 0, 10, 11, 11, 22, 12, 0, 255, 255, - 224, 2, 0, 2, 0, 4, 0, 13, 0, 20, 128, 36, 64, 196, 32, 4, - 0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 249, 0, 138, 0, 171, - 224, 172, 64, 170, 64, 170, 64, 170, 64, 170, 128, 33, 0, 82, 128, 140, - 96, 11, 11, 22, 12, 0, 255, 36, 0, 36, 0, 63, 128, 68, 0, 132, - 0, 4, 0, 255, 224, 10, 0, 17, 0, 32, 128, 192, 96, 11, 11, 22, - 12, 0, 255, 36, 0, 36, 0, 63, 192, 68, 0, 4, 0, 255, 224, 9, - 0, 9, 0, 17, 32, 33, 32, 64, 224, 11, 11, 22, 12, 0, 255, 32, - 0, 61, 224, 81, 32, 145, 32, 17, 32, 255, 32, 17, 32, 41, 32, 37, - 224, 69, 32, 128, 0, 11, 11, 22, 12, 0, 255, 32, 128, 127, 192, 8, - 64, 255, 224, 17, 0, 32, 128, 95, 64, 128, 32, 63, 128, 0, 0, 127, - 192, 11, 11, 22, 12, 0, 255, 34, 64, 71, 224, 148, 128, 228, 128, 47, - 224, 68, 128, 244, 128, 7, 224, 52, 128, 196, 128, 7, 224, 11, 11, 22, - 12, 0, 255, 4, 128, 143, 224, 73, 0, 25, 0, 47, 192, 9, 0, 9, - 0, 47, 192, 73, 0, 137, 0, 15, 224, 11, 11, 22, 12, 0, 255, 16, - 0, 63, 128, 81, 0, 14, 0, 49, 128, 192, 96, 63, 128, 36, 128, 63, - 128, 36, 128, 63, 128, 11, 11, 22, 12, 0, 255, 34, 128, 250, 64, 7, - 224, 250, 128, 138, 128, 138, 128, 250, 128, 34, 128, 178, 128, 170, 160, 100, - 224, 11, 11, 22, 12, 0, 255, 34, 32, 71, 64, 146, 128, 239, 224, 34, - 0, 71, 192, 236, 64, 7, 192, 52, 64, 199, 192, 4, 64, 11, 11, 22, - 12, 0, 255, 8, 0, 15, 192, 8, 0, 8, 0, 255, 224, 8, 0, 14, - 0, 9, 128, 8, 64, 8, 0, 8, 0, 10, 11, 22, 12, 0, 255, 255, - 128, 0, 128, 0, 128, 128, 128, 128, 128, 255, 128, 128, 0, 128, 0, 128, - 64, 128, 64, 127, 192, 11, 11, 22, 12, 0, 255, 71, 192, 65, 0, 239, - 224, 65, 0, 69, 0, 105, 96, 201, 32, 77, 96, 73, 32, 79, 224, 200, - 32, 11, 11, 22, 12, 0, 255, 8, 0, 4, 0, 4, 0, 10, 0, 10, - 0, 10, 0, 17, 0, 17, 0, 32, 128, 64, 64, 128, 32, 11, 11, 22, - 12, 0, 255, 34, 64, 34, 0, 247, 224, 34, 0, 35, 224, 53, 32, 229, - 32, 37, 64, 40, 128, 41, 64, 114, 32, 11, 10, 20, 12, 0, 0, 68, - 64, 68, 64, 68, 64, 127, 192, 4, 0, 4, 0, 132, 32, 132, 32, 132, - 32, 255, 224, 11, 11, 22, 12, 0, 255, 4, 0, 0, 0, 127, 192, 4, - 0, 4, 0, 4, 0, 127, 192, 4, 0, 4, 0, 4, 0, 255, 224, 11, - 11, 22, 12, 0, 255, 255, 224, 17, 0, 1, 192, 254, 0, 72, 128, 37, - 0, 4, 0, 255, 224, 21, 0, 36, 128, 196, 96, 11, 11, 22, 12, 0, - 255, 17, 0, 127, 192, 68, 64, 127, 192, 68, 64, 127, 192, 4, 0, 255, - 224, 4, 0, 4, 0, 4, 0, 9, 11, 22, 12, 0, 255, 16, 0, 255, - 128, 128, 128, 128, 128, 255, 128, 128, 128, 128, 128, 255, 128, 128, 128, 128, - 128, 255, 128, 11, 11, 22, 12, 0, 255, 113, 0, 1, 0, 3, 224, 249, - 32, 33, 32, 65, 32, 81, 32, 137, 32, 250, 32, 2, 32, 4, 192, 11, - 11, 22, 12, 0, 255, 127, 192, 17, 0, 17, 0, 17, 0, 17, 0, 255, - 224, 17, 0, 17, 0, 33, 0, 33, 0, 65, 0, 11, 11, 22, 12, 0, - 255, 33, 0, 34, 0, 244, 64, 87, 224, 80, 32, 87, 192, 148, 64, 84, - 64, 36, 64, 87, 192, 148, 64, 11, 11, 22, 12, 0, 255, 17, 0, 10, - 0, 127, 192, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 17, 0, 32, - 128, 192, 96, 10, 11, 22, 12, 0, 255, 95, 192, 0, 64, 132, 64, 132, - 64, 191, 64, 132, 64, 140, 64, 148, 64, 164, 64, 140, 64, 129, 192, 11, - 11, 22, 12, 0, 255, 36, 0, 39, 192, 36, 0, 36, 0, 255, 224, 0, - 0, 20, 64, 36, 128, 71, 0, 12, 0, 112, 0, 11, 11, 22, 12, 0, - 255, 36, 128, 4, 128, 15, 192, 228, 128, 36, 128, 63, 224, 36, 128, 36, - 128, 40, 128, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 8, 0, 8, - 0, 255, 128, 136, 128, 136, 128, 255, 128, 136, 128, 136, 128, 255, 160, 136, - 32, 7, 224, 11, 11, 22, 12, 0, 255, 39, 128, 36, 128, 244, 128, 36, - 128, 116, 128, 108, 128, 164, 128, 36, 128, 36, 160, 40, 160, 48, 96, 10, - 11, 22, 12, 0, 255, 255, 192, 128, 64, 128, 64, 158, 64, 146, 64, 146, - 64, 158, 64, 128, 64, 128, 64, 255, 192, 128, 64, 11, 11, 22, 12, 0, - 255, 127, 192, 68, 0, 95, 192, 80, 64, 95, 192, 80, 64, 95, 192, 66, - 0, 74, 128, 82, 64, 166, 32, 11, 11, 22, 12, 0, 255, 4, 0, 7, - 224, 4, 0, 127, 192, 64, 64, 64, 64, 64, 64, 127, 192, 0, 0, 82, - 64, 137, 32, 11, 11, 22, 12, 0, 255, 71, 128, 36, 128, 4, 128, 4, - 128, 232, 96, 32, 0, 47, 192, 36, 64, 34, 128, 49, 0, 38, 192, 11, - 11, 22, 12, 0, 255, 127, 192, 74, 64, 127, 192, 4, 0, 255, 224, 4, - 0, 63, 128, 32, 128, 36, 128, 36, 128, 255, 224, 11, 11, 22, 12, 0, - 255, 34, 0, 79, 224, 72, 32, 79, 224, 200, 0, 79, 224, 74, 160, 90, - 160, 111, 224, 74, 160, 72, 96, 11, 11, 22, 12, 0, 255, 243, 192, 36, - 64, 42, 128, 241, 0, 34, 128, 101, 224, 114, 32, 165, 64, 32, 128, 35, - 0, 44, 0, 11, 11, 22, 12, 0, 255, 4, 0, 255, 224, 128, 32, 0, - 0, 255, 224, 4, 0, 36, 0, 39, 192, 36, 0, 84, 0, 143, 224, 11, - 11, 22, 12, 0, 255, 115, 224, 16, 128, 81, 0, 35, 224, 250, 32, 42, - 160, 34, 160, 34, 160, 32, 128, 33, 64, 98, 32, 11, 11, 22, 12, 0, - 255, 34, 0, 247, 128, 34, 128, 54, 128, 226, 160, 37, 160, 36, 96, 104, - 32, 0, 0, 82, 64, 137, 32, 11, 11, 22, 12, 0, 255, 115, 192, 66, - 0, 66, 0, 123, 224, 74, 64, 74, 64, 122, 64, 74, 64, 66, 64, 68, - 64, 136, 64, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 8, 0, 31, - 192, 48, 64, 95, 192, 144, 64, 31, 192, 16, 64, 16, 64, 16, 192, 11, - 11, 22, 12, 0, 255, 2, 0, 127, 224, 66, 0, 66, 0, 95, 192, 66, - 0, 71, 0, 74, 128, 82, 64, 98, 32, 130, 0, 11, 11, 22, 12, 0, - 255, 243, 192, 150, 64, 145, 128, 166, 96, 161, 0, 151, 192, 145, 0, 149, - 0, 231, 224, 129, 0, 129, 0, 11, 11, 22, 12, 0, 255, 15, 128, 136, - 128, 79, 128, 8, 128, 143, 128, 64, 0, 31, 192, 53, 64, 85, 64, 149, - 64, 63, 224, 11, 11, 22, 12, 0, 255, 39, 224, 32, 128, 248, 128, 32, - 128, 32, 128, 56, 128, 224, 128, 32, 128, 32, 128, 32, 128, 97, 128, 11, - 11, 22, 12, 0, 255, 31, 224, 145, 0, 87, 192, 20, 64, 23, 192, 148, - 64, 87, 192, 17, 0, 85, 64, 153, 32, 35, 0, 11, 11, 22, 12, 0, - 255, 32, 128, 39, 224, 242, 64, 33, 128, 34, 64, 52, 32, 226, 64, 34, - 64, 34, 64, 34, 64, 100, 64, 11, 11, 22, 12, 0, 255, 65, 0, 65, - 0, 79, 224, 233, 32, 73, 32, 73, 32, 111, 224, 201, 32, 73, 32, 73, - 32, 207, 224, 11, 11, 22, 12, 0, 255, 33, 0, 241, 0, 79, 224, 169, - 32, 249, 32, 47, 224, 57, 32, 233, 32, 41, 32, 47, 224, 40, 32, 11, - 11, 22, 12, 0, 255, 143, 224, 73, 32, 9, 32, 203, 160, 73, 32, 79, - 224, 72, 32, 75, 160, 74, 160, 107, 160, 80, 224, 11, 11, 22, 12, 0, - 255, 127, 192, 4, 0, 68, 64, 36, 64, 36, 128, 4, 0, 255, 224, 4, - 0, 4, 0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 130, 0, 66, - 0, 31, 224, 194, 0, 95, 192, 82, 64, 95, 192, 71, 0, 74, 128, 82, - 64, 191, 224, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 72, 128, 127, - 224, 72, 128, 79, 128, 64, 0, 95, 192, 72, 64, 71, 128, 152, 96, 11, - 11, 22, 12, 0, 255, 1, 0, 239, 224, 161, 0, 164, 64, 175, 224, 164, - 64, 175, 224, 169, 32, 233, 32, 2, 128, 12, 96, 11, 11, 22, 12, 0, - 255, 20, 192, 246, 160, 188, 96, 167, 128, 168, 128, 191, 224, 169, 32, 239, - 224, 9, 32, 15, 224, 9, 32, 11, 11, 22, 12, 0, 255, 127, 128, 64, - 128, 66, 128, 98, 128, 84, 128, 72, 128, 72, 128, 84, 160, 98, 160, 64, - 96, 128, 32, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 64, 32, 127, - 224, 64, 0, 125, 224, 84, 32, 76, 160, 84, 96, 100, 160, 141, 96, 11, - 11, 22, 12, 0, 255, 130, 0, 95, 224, 4, 0, 8, 64, 159, 224, 64, - 32, 10, 128, 10, 128, 74, 160, 146, 160, 34, 96, 11, 11, 22, 12, 0, - 255, 65, 0, 79, 224, 232, 32, 66, 128, 68, 64, 104, 32, 199, 192, 65, - 0, 65, 0, 65, 0, 207, 224, 11, 11, 22, 12, 0, 255, 80, 32, 125, - 32, 145, 32, 255, 32, 17, 32, 125, 32, 85, 32, 85, 32, 84, 32, 92, - 32, 16, 224, 11, 11, 22, 12, 0, 255, 63, 128, 32, 128, 63, 128, 32, - 128, 255, 224, 72, 0, 123, 192, 73, 64, 121, 64, 72, 128, 251, 96, 11, - 11, 22, 12, 0, 255, 4, 0, 4, 0, 4, 0, 36, 128, 36, 64, 68, - 64, 68, 32, 132, 32, 4, 0, 4, 0, 28, 0, 11, 11, 22, 12, 0, - 255, 4, 0, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 10, 0, 17, - 0, 17, 0, 32, 128, 192, 96, 9, 10, 20, 10, 0, 0, 136, 128, 73, - 0, 8, 0, 255, 128, 0, 128, 0, 128, 127, 128, 0, 128, 0, 128, 255, - 128, 11, 11, 22, 12, 0, 255, 33, 0, 18, 0, 255, 224, 0, 0, 120, - 128, 74, 128, 122, 128, 74, 128, 122, 128, 72, 128, 89, 128, 11, 11, 22, - 12, 0, 255, 39, 192, 0, 0, 0, 0, 239, 224, 33, 0, 34, 0, 36, - 64, 47, 224, 32, 32, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 32, - 128, 39, 0, 249, 0, 33, 192, 119, 0, 33, 0, 249, 224, 39, 0, 113, - 32, 169, 32, 32, 224, 11, 11, 22, 12, 0, 255, 16, 64, 16, 64, 253, - 224, 16, 64, 56, 192, 53, 64, 82, 64, 148, 64, 16, 64, 16, 64, 16, - 192, 11, 11, 22, 12, 0, 255, 0, 64, 248, 64, 11, 224, 8, 64, 136, - 64, 82, 64, 81, 64, 33, 64, 80, 64, 72, 64, 137, 192, 10, 11, 22, - 12, 0, 255, 132, 0, 132, 64, 132, 128, 245, 0, 134, 0, 132, 0, 132, - 0, 148, 0, 164, 64, 196, 64, 131, 192, 11, 11, 22, 12, 0, 255, 17, - 32, 125, 0, 17, 0, 255, 224, 41, 0, 253, 64, 73, 64, 124, 128, 8, - 160, 253, 96, 10, 32, 11, 11, 22, 12, 0, 255, 23, 192, 36, 64, 36, - 64, 103, 192, 161, 0, 47, 224, 33, 0, 35, 128, 37, 64, 41, 32, 33, - 0, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 16, 0, 39, 192, 32, - 128, 97, 0, 175, 224, 33, 0, 33, 0, 33, 0, 35, 0, 11, 11, 22, - 12, 0, 255, 36, 0, 47, 224, 180, 0, 164, 128, 164, 160, 170, 192, 42, - 128, 40, 128, 41, 64, 50, 64, 36, 32, 11, 11, 22, 12, 0, 255, 127, - 224, 128, 0, 63, 192, 32, 64, 63, 192, 16, 0, 31, 192, 16, 64, 40, - 128, 71, 0, 56, 224, 11, 11, 22, 12, 0, 255, 127, 224, 64, 0, 64, - 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 128, - 0, 11, 11, 22, 12, 0, 255, 255, 224, 4, 0, 127, 192, 68, 64, 127, - 192, 68, 64, 127, 192, 68, 0, 36, 0, 24, 0, 231, 224, 11, 11, 22, - 12, 0, 255, 17, 224, 253, 0, 69, 0, 41, 224, 253, 64, 17, 64, 125, - 64, 17, 64, 85, 64, 146, 64, 52, 64, 11, 11, 22, 12, 0, 255, 33, - 0, 95, 224, 64, 0, 207, 192, 64, 0, 79, 192, 64, 0, 79, 192, 72, - 64, 79, 192, 72, 64, 11, 11, 22, 12, 0, 255, 4, 0, 127, 192, 64, - 64, 127, 192, 64, 64, 127, 192, 64, 64, 127, 192, 4, 64, 82, 32, 191, - 160, 11, 11, 22, 12, 0, 255, 127, 192, 68, 64, 127, 192, 68, 64, 127, - 192, 4, 0, 27, 0, 224, 224, 17, 0, 17, 0, 97, 0, 11, 11, 22, - 12, 0, 255, 255, 224, 4, 0, 8, 0, 127, 224, 73, 32, 79, 32, 73, - 32, 79, 32, 73, 32, 73, 32, 127, 224, 11, 11, 22, 12, 0, 255, 253, - 224, 86, 64, 121, 64, 56, 128, 85, 64, 146, 32, 255, 224, 4, 0, 39, - 192, 36, 0, 255, 224, 11, 11, 22, 12, 0, 255, 251, 128, 82, 0, 123, - 224, 18, 64, 250, 64, 20, 64, 63, 128, 32, 128, 63, 128, 32, 128, 63, - 128, 11, 11, 22, 12, 0, 255, 31, 224, 32, 0, 39, 192, 100, 64, 167, - 192, 32, 0, 47, 224, 40, 32, 39, 192, 33, 0, 35, 0, 11, 11, 22, - 12, 0, 255, 243, 224, 130, 32, 130, 32, 250, 32, 130, 32, 130, 32, 138, - 32, 178, 32, 194, 224, 2, 0, 2, 0, 11, 11, 22, 12, 0, 255, 36, - 128, 70, 160, 149, 192, 228, 128, 39, 224, 68, 128, 245, 192, 6, 160, 52, - 128, 196, 128, 7, 224, 11, 11, 22, 12, 0, 255, 39, 192, 65, 0, 135, - 224, 224, 32, 34, 128, 69, 128, 242, 128, 15, 224, 48, 128, 193, 64, 2, - 32, 11, 11, 22, 12, 0, 255, 2, 0, 2, 0, 34, 0, 35, 192, 34, - 0, 34, 0, 34, 0, 34, 0, 34, 0, 34, 0, 255, 224, 9, 11, 22, - 12, 0, 255, 8, 0, 8, 0, 255, 128, 136, 128, 136, 128, 136, 128, 255, - 128, 136, 128, 136, 128, 136, 128, 255, 128, 11, 11, 22, 12, 0, 255, 33, - 0, 83, 160, 65, 0, 247, 224, 81, 0, 83, 192, 86, 64, 83, 192, 90, - 64, 83, 192, 66, 64, 11, 11, 22, 12, 0, 255, 127, 192, 4, 0, 4, - 0, 4, 0, 255, 224, 10, 0, 10, 0, 18, 0, 34, 32, 66, 32, 129, - 224, 11, 11, 22, 12, 0, 255, 17, 0, 33, 0, 47, 224, 97, 0, 163, - 128, 35, 128, 37, 64, 37, 64, 41, 32, 33, 0, 33, 0, 11, 11, 22, - 12, 0, 255, 247, 224, 148, 32, 244, 32, 151, 224, 148, 128, 244, 128, 151, - 224, 148, 128, 244, 160, 150, 96, 4, 32, 11, 11, 22, 12, 0, 255, 123, - 224, 148, 128, 4, 0, 127, 192, 4, 0, 255, 224, 1, 0, 255, 224, 33, - 0, 17, 0, 7, 0, 11, 11, 22, 12, 0, 255, 33, 0, 71, 192, 145, - 0, 47, 224, 96, 128, 175, 224, 32, 128, 36, 128, 34, 128, 32, 128, 35, - 128, 11, 11, 22, 12, 0, 255, 39, 192, 36, 64, 247, 192, 46, 224, 42, - 160, 62, 224, 225, 0, 47, 224, 35, 128, 37, 64, 105, 32, 11, 11, 22, - 12, 0, 255, 20, 0, 39, 224, 42, 0, 98, 0, 163, 192, 34, 0, 34, - 0, 35, 224, 34, 0, 34, 0, 34, 0 -}; diff --git a/Marlin/dogm_font_data_ISO10646_Greek.h b/Marlin/dogm_font_data_ISO10646_Greek.h deleted file mode 100644 index 0abb08d..0000000 --- a/Marlin/dogm_font_data_ISO10646_Greek.h +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/* - Fontname: ISO10646_4_Greek - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h=10 x= 2 y= 6 dx= 6 dy= 0 ascent= 8 len=10 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-2 -*/ -#include -const u8g_fntpgm_uint8_t ISO10646_Greek_5x7[2728] U8G_SECTION(".progmem.ISO10646_Greek_5x7") = { - 0,6,9,0,254,7,1,145,3,32,32,255,255,8,254,7, - 255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128, - 128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6, - 0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32, - 120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32, - 64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104, - 2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32, - 64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32, - 32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5, - 5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192, - 64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192, - 192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6, - 0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64, - 192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112, - 128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240, - 5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7, - 6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0, - 48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16, - 32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136, - 112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5, - 5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192, - 192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64, - 32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1, - 0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136, - 8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168, - 112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7, - 7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0, - 0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144, - 136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128, - 128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5, - 7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6, - 0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128, - 128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16, - 16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136, - 5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7, - 6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0, - 136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136, - 136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128, - 128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7, - 7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0, - 0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32, - 32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136, - 136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5, - 7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6, - 0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136, - 136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32, - 64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224, - 5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,1, - 0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,80, - 136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,64, - 5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,0, - 0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,128, - 128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,120, - 5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,0, - 0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,136, - 136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,136, - 136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,8, - 8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,6, - 0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,192, - 64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,168, - 168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,6, - 0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,136, - 240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,5, - 5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,0, - 112,128,112,8,240,5,7,7,6,0,0,64,64,224,64,64, - 72,48,5,5,5,6,0,0,136,136,136,152,104,5,5,5, - 6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,136, - 168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,6, - 6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,0, - 248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,64, - 64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,3, - 7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,6, - 0,3,104,144,0,0,0,6,0,0,0,0,0,6,0,0, - 0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6, - 0,0,2,2,2,6,1,6,64,128,3,3,3,6,1,5, - 32,64,160,5,8,8,6,0,0,64,160,80,80,136,248,136, - 136,2,2,2,6,1,2,192,192,5,8,8,6,0,0,64, - 128,248,128,240,128,128,248,5,8,8,6,0,0,64,128,136, - 136,248,136,136,136,4,8,8,6,0,0,64,128,112,32,32, - 32,32,112,0,0,0,6,0,0,5,8,8,6,0,0,64, - 128,112,136,136,136,136,112,0,0,0,6,0,0,5,8,8, - 6,0,0,64,128,8,136,112,32,32,32,5,8,8,6,0, - 0,64,128,112,136,136,136,80,216,3,8,8,6,1,0,32, - 64,160,0,64,64,64,32,5,7,7,6,0,0,32,80,136, - 136,248,136,136,5,7,7,6,0,0,240,72,72,112,72,72, - 240,5,7,7,6,0,0,248,128,128,128,128,128,128,5,6, - 6,6,0,0,32,80,80,136,136,248,5,7,7,6,0,0, - 248,128,128,240,128,128,248,5,7,7,6,0,0,248,8,16, - 32,64,128,248,5,7,7,6,0,0,136,136,136,248,136,136, - 136,5,7,7,6,0,0,112,136,136,168,136,136,112,3,7, - 7,6,1,0,224,64,64,64,64,64,224,5,7,7,6,0, - 0,136,144,160,192,160,144,136,5,7,7,6,0,0,32,80, - 136,136,136,136,136,5,7,7,6,0,0,136,216,168,168,136, - 136,136,5,7,7,6,0,0,136,200,200,168,152,152,136,5, - 7,7,6,0,0,248,0,0,112,0,0,248,5,7,7,6, - 0,0,112,136,136,136,136,136,112,5,7,7,6,0,0,248, - 80,80,80,80,80,80,5,7,7,6,0,0,240,136,136,240, - 128,128,128,0,0,0,6,0,0,5,7,7,6,0,0,248, - 128,64,32,64,128,248,5,7,7,6,0,0,248,32,32,32, - 32,32,32,5,7,7,6,0,0,136,136,80,32,32,32,32, - 5,7,7,6,0,0,112,32,112,168,112,32,112,5,7,7, - 6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0, - 168,168,168,168,112,32,32,5,6,6,6,0,0,112,136,136, - 80,80,216,3,8,8,6,1,0,160,0,224,64,64,64,64, - 224,5,8,8,6,0,0,80,0,136,136,136,80,32,32,5, - 8,8,6,0,0,32,64,8,104,152,144,144,104,5,8,8, - 6,0,0,32,64,0,112,136,224,136,112,5,10,10,6,0, - 254,32,64,0,112,136,136,136,136,8,8,2,8,8,6,1, - 0,64,128,0,128,128,128,128,64,5,8,8,6,0,0,16, - 32,80,0,136,136,136,112,5,6,6,6,0,0,8,104,152, - 144,144,104,4,7,7,6,0,254,96,144,240,144,224,128,128, - 5,6,6,6,0,255,136,72,80,32,32,64,5,6,6,6, - 0,0,48,64,112,136,136,112,5,5,5,6,0,0,112,136, - 224,136,112,5,9,9,6,0,254,128,112,64,128,128,128,112, - 8,112,5,7,7,6,0,254,184,200,136,136,136,8,8,5, - 5,5,6,0,0,112,136,248,136,112,3,5,5,6,1,0, - 128,128,128,128,96,4,5,5,6,0,0,144,160,192,160,144, - 5,6,6,6,0,0,64,32,32,80,80,136,5,7,7,6, - 0,254,136,136,136,216,168,128,128,5,5,5,6,0,0,136, - 136,80,96,32,5,10,10,6,0,254,128,224,128,112,32,64, - 128,112,8,112,5,5,5,6,0,0,112,136,136,136,112,5, - 5,5,6,0,0,248,80,80,80,80,5,7,7,6,0,254, - 112,136,136,200,176,128,128,5,7,7,6,0,254,48,64,128, - 64,48,8,112,5,5,5,6,0,0,104,144,144,144,96,4, - 5,5,6,0,0,240,64,64,64,48,5,5,5,6,0,0, - 136,136,144,144,224,5,8,8,6,0,254,48,168,168,168,168, - 112,32,32,5,6,6,6,0,255,136,80,32,32,80,136,5, - 7,7,6,0,254,168,168,168,168,112,32,32,5,5,5,6, - 0,0,80,136,136,168,112,4,7,7,6,0,0,160,0,64, - 64,64,64,48,5,7,7,6,0,0,80,0,136,136,144,144, - 224,4,8,8,6,0,0,32,64,0,96,144,144,144,96,5, - 8,8,6,0,0,32,64,0,136,136,144,144,96,5,8,8, - 6,0,0,32,64,0,80,136,136,168,112,5,7,7,6,0, - 255,144,160,192,160,144,136,16,5,8,8,6,0,0,96,144, - 160,128,240,136,136,112,5,7,7,6,0,0,112,80,56,144, - 144,144,96,5,6,6,6,0,0,152,80,32,32,32,32,5, - 8,8,6,0,0,64,128,152,80,32,32,32,32,5,8,8, - 6,0,0,80,0,152,80,32,32,32,32,5,7,7,6,0, - 255,48,168,168,168,168,112,32,5,5,5,6,0,0,248,80, - 80,80,88,5,6,6,6,0,255,136,80,112,80,136,16,5, - 7,7,6,0,255,112,136,136,136,112,32,112,5,6,6,6, - 0,255,112,136,136,112,32,112,5,6,6,6,0,0,112,136, - 128,112,32,112,5,7,7,6,0,254,8,112,128,128,112,16, - 96,5,6,6,6,0,0,248,128,128,240,128,128,4,5,5, - 6,0,0,240,128,224,128,128,5,6,6,6,0,0,248,0, - 0,112,0,248,4,5,5,6,0,0,64,128,240,16,32,5, - 7,7,6,0,0,224,80,40,40,8,8,16,5,7,7,6, - 0,0,192,32,80,40,8,8,8,5,8,8,6,0,254,168, - 168,168,168,168,88,8,112,5,7,7,6,0,254,168,168,168, - 168,88,8,112,5,6,6,6,0,0,104,136,136,120,8,8, - 5,6,6,6,0,255,104,136,136,120,8,8,4,8,8,6, - 0,254,128,224,144,144,144,144,32,192,5,5,5,6,0,0, - 104,144,112,16,224,5,6,6,6,0,0,96,144,16,96,136, - 112,4,6,6,6,0,0,96,144,16,96,128,112,5,6,6, - 6,0,0,136,80,32,80,136,248,5,5,5,6,0,0,136, - 80,32,80,112,5,6,6,6,0,0,120,128,240,136,136,112, - 4,5,5,6,0,0,240,128,224,144,96,3,6,6,6,1, - 0,64,224,64,64,64,64,3,6,6,6,1,255,64,224,64, - 64,64,128,5,5,5,6,0,0,136,80,112,80,136,5,7, - 7,6,0,254,112,136,136,136,240,128,112,4,5,5,6,0, - 0,112,128,128,128,112,2,8,8,6,1,255,64,0,192,64, - 64,64,64,128,5,7,7,6,0,0,112,136,136,248,136,136, - 112,4,5,5,6,0,0,112,128,224,128,112,4,5,5,6, - 0,0,224,16,112,16,224,5,7,7,6,0,0,128,240,136, - 136,136,240,128,4,7,7,6,0,255,128,224,144,144,144,224, - 128,5,6,6,6,0,0,112,136,128,128,136,112,5,6,6, - 6,0,0,136,216,168,136,136,136,5,7,7,6,0,254,136, - 216,168,136,136,128,128,5,8,8,6,0,254,112,136,136,136, - 112,64,224,64,5,6,6,6,0,0,112,136,8,8,136,112, - 5,6,6,6,0,0,112,136,160,128,136,112,5,6,6,6, - 0,0,112,136,40,8,136,112}; diff --git a/Marlin/dogm_font_data_ISO10646_Kana.h b/Marlin/dogm_font_data_ISO10646_Kana.h deleted file mode 100644 index 6968374..0000000 --- a/Marlin/dogm_font_data_ISO10646_Kana.h +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: ISO10646_Kana - Copyright: A. Hardtung, public domain - Capital A Height: 7, '1' Height: 7 - Calculated Max Values w= 5 h= 8 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-1 dx= 0 dy= 0 - Pure Font ascent = 7 descent=-1 - X Font ascent = 7 descent=-1 - Max Font ascent = 8 descent=-1 -*/ -#include -const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2482] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = { - 0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7, - 255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, - 128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, - 0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, - 120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, - 64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, - 2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, - 64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, - 32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, - 5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, - 64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, - 192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, - 0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, - 192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, - 128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, - 5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, - 6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, - 48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, - 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, - 5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, - 192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, - 32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, - 0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, - 8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, - 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, - 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, - 136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, - 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, - 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, - 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, - 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, - 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, - 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, - 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, - 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, - 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, - 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, - 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, - 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, - 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, - 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, - 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, - 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, - 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, - 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, - 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1, - 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80, - 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64, - 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, - 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128, - 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120, - 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0, - 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136, - 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136, - 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8, - 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6, - 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192, - 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168, - 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6, - 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136, - 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5, - 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0, - 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64, - 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5, - 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136, - 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6, - 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0, - 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64, - 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3, - 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6, - 0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 3, 3, 6, 0, 1, - 248, 0, 248, 4, 4, 4, 6, 0, 0, 240, 16, 96, 64, 5, 6, 6, - 6, 0, 0, 248, 8, 40, 48, 32, 64, 3, 4, 4, 6, 1, 0, 32, - 64, 192, 64, 4, 6, 6, 6, 0, 0, 16, 32, 96, 160, 32, 32, 4, - 4, 4, 6, 0, 0, 32, 240, 144, 32, 5, 6, 6, 6, 0, 0, 32, - 248, 136, 8, 16, 32, 3, 4, 4, 6, 1, 0, 224, 64, 64, 224, 5, - 5, 5, 6, 0, 0, 248, 32, 32, 32, 248, 4, 4, 4, 6, 0, 0, - 32, 240, 96, 160, 5, 6, 6, 6, 0, 0, 16, 248, 48, 80, 144, 16, - 5, 6, 6, 6, 0, 0, 64, 248, 72, 72, 72, 144, 5, 8, 8, 6, - 0, 0, 40, 0, 64, 248, 72, 72, 72, 144, 5, 6, 6, 6, 0, 0, - 32, 248, 32, 248, 32, 32, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248, - 32, 248, 32, 32, 4, 5, 5, 6, 0, 0, 112, 144, 16, 32, 192, 5, - 7, 7, 6, 0, 0, 40, 0, 112, 144, 16, 32, 192, 5, 6, 6, 6, - 0, 0, 64, 120, 144, 16, 16, 32, 5, 8, 8, 6, 0, 0, 40, 0, - 64, 120, 144, 16, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 8, 8, - 248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 8, 248, 5, 6, - 6, 6, 0, 0, 80, 248, 80, 16, 32, 64, 5, 8, 8, 6, 0, 0, - 40, 0, 80, 248, 80, 16, 32, 64, 5, 5, 5, 6, 0, 0, 192, 8, - 200, 16, 224, 5, 7, 7, 6, 0, 0, 40, 0, 192, 8, 200, 16, 224, - 5, 5, 5, 6, 0, 0, 248, 16, 32, 80, 136, 5, 7, 7, 6, 0, - 0, 40, 0, 248, 16, 32, 80, 136, 5, 6, 6, 6, 0, 0, 64, 248, - 72, 80, 64, 56, 5, 8, 8, 6, 0, 0, 40, 0, 64, 248, 72, 80, - 64, 56, 5, 5, 5, 6, 0, 0, 136, 136, 72, 16, 96, 5, 7, 7, - 6, 0, 0, 40, 0, 136, 136, 72, 16, 96, 5, 5, 5, 6, 0, 0, - 120, 72, 168, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 120, 72, 168, - 16, 96, 5, 6, 6, 6, 0, 0, 16, 224, 32, 248, 32, 64, 5, 8, - 8, 6, 0, 0, 40, 0, 16, 224, 32, 248, 32, 64, 5, 4, 4, 6, - 0, 0, 168, 168, 8, 48, 5, 5, 5, 6, 0, 0, 168, 168, 8, 16, - 32, 5, 7, 7, 6, 0, 0, 40, 0, 168, 168, 8, 16, 32, 5, 6, - 6, 6, 0, 0, 112, 0, 248, 32, 32, 64, 5, 8, 8, 6, 0, 0, - 40, 0, 112, 0, 248, 32, 32, 64, 3, 6, 6, 6, 1, 0, 128, 128, - 192, 160, 128, 128, 4, 8, 8, 6, 1, 0, 80, 0, 128, 128, 192, 160, - 128, 128, 5, 6, 6, 6, 0, 0, 32, 248, 32, 32, 64, 128, 5, 5, - 5, 6, 0, 0, 112, 0, 0, 0, 248, 5, 5, 5, 6, 0, 0, 248, - 8, 80, 32, 208, 5, 6, 6, 6, 0, 0, 32, 248, 16, 32, 112, 168, - 3, 6, 6, 6, 1, 0, 32, 32, 32, 32, 64, 128, 5, 5, 5, 6, - 0, 0, 16, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 40, 0, 16, - 136, 136, 136, 136, 5, 8, 8, 6, 0, 0, 24, 24, 0, 16, 136, 136, - 136, 136, 5, 6, 6, 6, 0, 0, 128, 128, 248, 128, 128, 120, 5, 7, - 7, 6, 0, 0, 40, 128, 128, 248, 128, 128, 120, 5, 7, 7, 6, 0, - 0, 24, 152, 128, 248, 128, 128, 120, 5, 5, 5, 6, 0, 0, 248, 8, - 8, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 16, 96, - 5, 8, 8, 6, 0, 0, 24, 24, 0, 248, 8, 8, 16, 96, 5, 4, - 4, 6, 0, 1, 64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 40, 0, - 64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 24, 24, 64, 160, 16, 8, - 5, 6, 6, 6, 0, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6, - 0, 0, 40, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6, 0, 0, - 24, 24, 32, 248, 32, 168, 168, 32, 5, 5, 5, 6, 0, 0, 248, 8, - 80, 32, 16, 4, 5, 5, 6, 1, 0, 224, 0, 224, 0, 240, 5, 5, - 5, 6, 0, 0, 32, 64, 136, 248, 8, 5, 5, 5, 6, 0, 0, 8, - 40, 16, 40, 192, 5, 5, 5, 6, 0, 0, 248, 64, 248, 64, 56, 5, - 4, 4, 6, 0, 0, 64, 248, 80, 64, 5, 6, 6, 6, 0, 0, 64, - 248, 72, 80, 64, 64, 4, 4, 4, 6, 0, 0, 96, 32, 32, 240, 5, - 5, 5, 6, 0, 0, 112, 16, 16, 16, 248, 4, 5, 5, 6, 0, 0, - 240, 16, 240, 16, 240, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 248, - 5, 6, 6, 6, 0, 0, 112, 0, 248, 8, 16, 32, 4, 6, 6, 6, - 0, 0, 144, 144, 144, 144, 16, 32, 5, 5, 5, 6, 0, 0, 32, 160, - 168, 168, 176, 4, 5, 5, 6, 0, 0, 128, 128, 144, 160, 192, 5, 5, - 5, 6, 0, 0, 248, 136, 136, 136, 248, 4, 4, 4, 6, 0, 0, 240, - 144, 16, 32, 5, 5, 5, 6, 0, 0, 248, 136, 8, 16, 32, 5, 6, - 6, 6, 0, 0, 16, 248, 80, 80, 248, 16, 5, 5, 5, 6, 0, 0, - 248, 8, 48, 32, 248, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 48, - 5, 5, 5, 6, 0, 0, 192, 8, 8, 16, 224, 5, 8, 8, 6, 0, - 0, 40, 0, 32, 248, 136, 8, 16, 32, 4, 4, 4, 6, 0, 0, 64, - 240, 80, 160, 4, 4, 4, 6, 0, 0, 64, 240, 32, 64, 5, 7, 7, - 6, 0, 0, 40, 0, 248, 136, 8, 16, 96, 5, 8, 8, 6, 0, 0, - 40, 0, 16, 248, 80, 80, 248, 16, 5, 7, 7, 6, 0, 0, 40, 0, - 248, 8, 48, 32, 248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 248, - 8, 48, 2, 2, 2, 6, 2, 2, 192, 192, 5, 1, 1, 6, 0, 2, - 248, 5, 4, 4, 6, 0, 1, 128, 96, 16, 8, 5, 5, 5, 6, 0, - 1, 40, 128, 96, 16, 8, 5, 6, 6, 6, 0, 0, 248, 8, 8, 8, - 8, 8 -}; diff --git a/Marlin/dogm_font_data_Marlin_symbols.h b/Marlin/dogm_font_data_Marlin_symbols.h deleted file mode 100644 index ad9b983..0000000 --- a/Marlin/dogm_font_data_Marlin_symbols.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - Fontname: Marlin_symbols - Copyright: Created with Fony 1.4.7 - Capital A Height: 0, '1' Height: 0 - Calculated Max Values w= 5 h=10 x= 0 y= 3 dx= 6 dy= 0 ascent= 8 len=10 - Font Bounding box w= 6 h= 9 x= 0 y=-2 - Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 - Pure Font ascent = 0 descent= 0 - X Font ascent = 0 descent= 0 - Max Font ascent = 8 descent=-2 -*/ -#include -const u8g_fntpgm_uint8_t Marlin_symbols[140] U8G_SECTION(".progmem.Marlin_symbols") = { - 0, 6, 9, 0, 254, 0, 0, 0, 0, 0, 1, 9, 0, 8, 254, 0, - 0, 5, 8, 8, 6, 0, 0, 64, 240, 200, 136, 136, 152, 120, 16, 5, - 8, 8, 6, 0, 0, 192, 248, 136, 136, 136, 136, 136, 248, 5, 5, 5, - 6, 0, 1, 32, 48, 248, 48, 32, 5, 8, 8, 6, 0, 0, 32, 112, - 248, 32, 32, 32, 32, 224, 5, 9, 9, 6, 0, 255, 32, 112, 168, 168, - 184, 136, 136, 112, 32, 5, 9, 9, 6, 0, 255, 224, 128, 192, 176, 168, - 40, 48, 40, 40, 5, 9, 9, 6, 0, 255, 248, 168, 136, 136, 136, 136, - 136, 168, 248, 5, 10, 10, 6, 0, 254, 32, 80, 80, 80, 80, 136, 168, - 168, 136, 112, 3, 3, 3, 6, 0, 3, 64, 160, 64 -}; diff --git a/Marlin/duration_t.h b/Marlin/duration_t.h deleted file mode 100644 index 25ea9bb..0000000 --- a/Marlin/duration_t.h +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __DURATION_T__ -#define __DURATION_T__ - -struct duration_t { - /** - * @brief Duration is stored in seconds - */ - uint32_t value; - - /** - * @brief Constructor - */ - duration_t() - : duration_t(0) {}; - - /** - * @brief Constructor - * - * @param seconds The number of seconds - */ - duration_t(uint32_t const &seconds) { - this->value = seconds; - } - - /** - * @brief Equality comparison - * @details Overloads the equality comparison operator - * - * @param value The number of seconds to compare to - * @return True if both durations are equal - */ - bool operator==(const uint32_t &value) const { - return (this->value == value); - } - - /** - * @brief Inequality comparison - * @details Overloads the inequality comparison operator - * - * @param value The number of seconds to compare to - * @return False if both durations are equal - */ - bool operator!=(const uint32_t &value) const { - return ! this->operator==(value); - } - - /** - * @brief Formats the duration as years - * @return The number of years - */ - inline uint8_t year() const { - return this->day() / 365; - } - - /** - * @brief Formats the duration as days - * @return The number of days - */ - inline uint16_t day() const { - return this->hour() / 24; - } - - /** - * @brief Formats the duration as hours - * @return The number of hours - */ - inline uint32_t hour() const { - return this->minute() / 60; - } - - /** - * @brief Formats the duration as minutes - * @return The number of minutes - */ - inline uint32_t minute() const { - return this->second() / 60; - } - - /** - * @brief Formats the duration as seconds - * @return The number of seconds - */ - inline uint32_t second() const { - return this->value; - } - - /** - * @brief Formats the duration as a string - * @details String will be formated using a "full" representation of duration - * - * @param buffer The array pointed to must be able to accommodate 21 bytes - * - * Output examples: - * 123456789012345678901 (strlen) - * 135y 364d 23h 59m 59s - * 364d 23h 59m 59s - * 23h 59m 59s - * 59m 59s - * 59s - */ - void toString(char *buffer) const { - int y = this->year(), - d = this->day() % 365, - h = this->hour() % 24, - m = this->minute() % 60, - s = this->second() % 60; - - if (y) sprintf_P(buffer, PSTR("%iy %id %ih %im %is"), y, d, h, m, s); - else if (d) sprintf_P(buffer, PSTR("%id %ih %im %is"), d, h, m, s); - else if (h) sprintf_P(buffer, PSTR("%ih %im %is"), h, m, s); - else if (m) sprintf_P(buffer, PSTR("%im %is"), m, s); - else sprintf_P(buffer, PSTR("%is"), s); - } - - /** - * @brief Formats the duration as a string - * @details String will be formated using a "digital" representation of duration - * - * @param buffer The array pointed to must be able to accommodate 10 bytes - * - * Output examples: - * 1234567890 (strlen) - * 1193046:59 - */ - void toDigital(char *buffer) const { - int h = this->hour() % 24, - m = this->minute() % 60; - - sprintf_P(buffer, PSTR("%02i:%02i"), h, m); - } -}; - -#endif // __DURATION_T__ diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp deleted file mode 100644 index 6cee905..0000000 --- a/Marlin/endstops.cpp +++ /dev/null @@ -1,382 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * endstops.cpp - A singleton object to manage endstops - */ - -#include "Marlin.h" -#include "cardreader.h" -#include "endstops.h" -#include "temperature.h" -#include "stepper.h" -#include "ultralcd.h" - -// TEST_ENDSTOP: test the old and the current status of an endstop -#define TEST_ENDSTOP(ENDSTOP) (TEST(current_endstop_bits & old_endstop_bits, ENDSTOP)) - -Endstops endstops; - -// public: - -bool Endstops::enabled = true, - Endstops::enabled_globally = - #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) - (true) - #else - (false) - #endif - ; -volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value - -#if ENABLED(Z_DUAL_ENDSTOPS) - uint16_t -#else - byte -#endif - Endstops::current_endstop_bits = 0, - Endstops::old_endstop_bits = 0; - -#if HAS_BED_PROBE - volatile bool Endstops::z_probe_enabled = false; -#endif - -/** - * Class and Instance Methods - */ - -void Endstops::init() { - - #if HAS_X_MIN - SET_INPUT(X_MIN_PIN); - #if ENABLED(ENDSTOPPULLUP_XMIN) - WRITE(X_MIN_PIN,HIGH); - #endif - #endif - - #if HAS_Y_MIN - SET_INPUT(Y_MIN_PIN); - #if ENABLED(ENDSTOPPULLUP_YMIN) - WRITE(Y_MIN_PIN,HIGH); - #endif - #endif - - #if HAS_Z_MIN - SET_INPUT(Z_MIN_PIN); - #if ENABLED(ENDSTOPPULLUP_ZMIN) - WRITE(Z_MIN_PIN,HIGH); - #endif - #endif - - #if HAS_Z2_MIN - SET_INPUT(Z2_MIN_PIN); - #if ENABLED(ENDSTOPPULLUP_ZMIN) - WRITE(Z2_MIN_PIN,HIGH); - #endif - #endif - - #if HAS_X_MAX - SET_INPUT(X_MAX_PIN); - #if ENABLED(ENDSTOPPULLUP_XMAX) - WRITE(X_MAX_PIN,HIGH); - #endif - #endif - - #if HAS_Y_MAX - SET_INPUT(Y_MAX_PIN); - #if ENABLED(ENDSTOPPULLUP_YMAX) - WRITE(Y_MAX_PIN,HIGH); - #endif - #endif - - #if HAS_Z_MAX - SET_INPUT(Z_MAX_PIN); - #if ENABLED(ENDSTOPPULLUP_ZMAX) - WRITE(Z_MAX_PIN,HIGH); - #endif - #endif - - #if HAS_Z2_MAX - SET_INPUT(Z2_MAX_PIN); - #if ENABLED(ENDSTOPPULLUP_ZMAX) - WRITE(Z2_MAX_PIN,HIGH); - #endif - #endif - - #if HAS_Z_MIN_PROBE_PIN && ENABLED(Z_MIN_PROBE_ENDSTOP) // Check for Z_MIN_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used. - SET_INPUT(Z_MIN_PROBE_PIN); - #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE) - WRITE(Z_MIN_PROBE_PIN,HIGH); - #endif - #endif - -} // Endstops::init - -void Endstops::report_state() { - if (endstop_hit_bits) { - #if ENABLED(ULTRA_LCD) - char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' '; - #define _SET_STOP_CHAR(A,C) (chr## A = C) - #else - #define _SET_STOP_CHAR(A,C) ; - #endif - - #define _ENDSTOP_HIT_ECHO(A,C) do{ \ - SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \ - _SET_STOP_CHAR(A,C); }while(0) - - #define _ENDSTOP_HIT_TEST(A,C) \ - if (TEST(endstop_hit_bits, A ##_MIN) || TEST(endstop_hit_bits, A ##_MAX)) \ - _ENDSTOP_HIT_ECHO(A,C) - - SERIAL_ECHO_START; - SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); - _ENDSTOP_HIT_TEST(X, 'X'); - _ENDSTOP_HIT_TEST(Y, 'Y'); - _ENDSTOP_HIT_TEST(Z, 'Z'); - - #if ENABLED(Z_MIN_PROBE_ENDSTOP) - #define P_AXIS Z_AXIS - if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P'); - #endif - SERIAL_EOL; - - #if ENABLED(ULTRA_LCD) - char msg[3 * strlen(MSG_LCD_ENDSTOPS) + 8 + 1]; // Room for a UTF 8 string - sprintf_P(msg, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP); - lcd_setstatus(msg); - #endif - - hit_on_purpose(); - - #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT) - if (stepper.abort_on_endstop_hit) { - card.sdprinting = false; - card.closefile(); - quickstop_stepper(); - thermalManager.disable_all_heaters(); // switch off all heaters. - } - #endif - } -} // Endstops::report_state - -void Endstops::M119() { - SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT); - #if HAS_X_MIN - SERIAL_PROTOCOLPGM(MSG_X_MIN); - SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_X_MAX - SERIAL_PROTOCOLPGM(MSG_X_MAX); - SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Y_MIN - SERIAL_PROTOCOLPGM(MSG_Y_MIN); - SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Y_MAX - SERIAL_PROTOCOLPGM(MSG_Y_MAX); - SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Z_MIN - SERIAL_PROTOCOLPGM(MSG_Z_MIN); - SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Z_MAX - SERIAL_PROTOCOLPGM(MSG_Z_MAX); - SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Z2_MAX - SERIAL_PROTOCOLPGM(MSG_Z2_MAX); - SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif - #if HAS_Z_MIN_PROBE_PIN - SERIAL_PROTOCOLPGM(MSG_Z_PROBE); - SERIAL_PROTOCOLLN(((READ(Z_MIN_PROBE_PIN)^Z_MIN_PROBE_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); - #endif -} // Endstops::M119 - -#if ENABLED(Z_DUAL_ENDSTOPS) - - // Pass the result of the endstop test - void Endstops::test_dual_z_endstops(EndstopEnum es1, EndstopEnum es2) { - byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2 - if (stepper.current_block->steps[Z_AXIS] > 0) { - stepper.endstop_triggered(Z_AXIS); - SBI(endstop_hit_bits, Z_MIN); - if (!stepper.performing_homing || (z_test == 0x3)) //if not performing home or if both endstops were trigged during homing... - stepper.kill_current_block(); - } - } - -#endif - -// Check endstops - Called from ISR! -void Endstops::update() { - - #ifdef UARM_SWIFT - return; - #endif - - #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN - #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING - #define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN)) - #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX - - // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status - #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) - // COPY_BIT: copy the value of COPY_BIT to BIT in bits - #define COPY_BIT(bits, COPY_BIT, BIT) SET_BIT(bits, BIT, TEST(bits, COPY_BIT)) - - #define UPDATE_ENDSTOP(AXIS,MINMAX) do { \ - UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \ - if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \ - _ENDSTOP_HIT(AXIS); \ - stepper.endstop_triggered(_AXIS(AXIS)); \ - } \ - } while(0) - - #if ENABLED(COREXY) || ENABLED(COREXZ) - // Head direction in -X axis for CoreXY and CoreXZ bots. - // If DeltaA == -DeltaB, the movement is only in Y or Z axis - if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) == stepper.motor_direction(CORE_AXIS_2))) { - if (stepper.motor_direction(X_HEAD)) - #else - if (stepper.motor_direction(X_AXIS)) // stepping along -X axis (regular Cartesian bot) - #endif - { // -direction - #if ENABLED(DUAL_X_CARRIAGE) - // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder - if ((stepper.current_block->active_extruder == 0 && X_HOME_DIR == -1) || (stepper.current_block->active_extruder != 0 && X2_HOME_DIR == -1)) - #endif - { - #if HAS_X_MIN - UPDATE_ENDSTOP(X, MIN); - #endif - } - } - else { // +direction - #if ENABLED(DUAL_X_CARRIAGE) - // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder - if ((stepper.current_block->active_extruder == 0 && X_HOME_DIR == 1) || (stepper.current_block->active_extruder != 0 && X2_HOME_DIR == 1)) - #endif - { - #if HAS_X_MAX - UPDATE_ENDSTOP(X, MAX); - #endif - } - } - #if ENABLED(COREXY) || ENABLED(COREXZ) - } - #endif - - #if ENABLED(COREXY) || ENABLED(COREYZ) - // Head direction in -Y axis for CoreXY / CoreYZ bots. - // If DeltaA == DeltaB, the movement is only in X or Y axis - if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) { - if (stepper.motor_direction(Y_HEAD)) - #else - if (stepper.motor_direction(Y_AXIS)) // -direction - #endif - { // -direction - #if HAS_Y_MIN - UPDATE_ENDSTOP(Y, MIN); - #endif - } - else { // +direction - #if HAS_Y_MAX - UPDATE_ENDSTOP(Y, MAX); - #endif - } - #if ENABLED(COREXY) || ENABLED(COREYZ) - } - #endif - - #if ENABLED(COREXZ) || ENABLED(COREYZ) - // Head direction in -Z axis for CoreXZ or CoreYZ bots. - // If DeltaA == DeltaB, the movement is only in X or Y axis - if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) { - if (stepper.motor_direction(Z_HEAD)) - #else - if (stepper.motor_direction(Z_AXIS)) - #endif - { // z -direction - #if HAS_Z_MIN - - #if ENABLED(Z_DUAL_ENDSTOPS) - - UPDATE_ENDSTOP_BIT(Z, MIN); - #if HAS_Z2_MIN - UPDATE_ENDSTOP_BIT(Z2, MIN); - #else - COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN); - #endif - - test_dual_z_endstops(Z_MIN, Z2_MIN); - - #else // !Z_DUAL_ENDSTOPS - - #if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN); - #else - UPDATE_ENDSTOP(Z, MIN); - #endif - - #endif // !Z_DUAL_ENDSTOPS - - #endif // HAS_Z_MIN - - #if HAS_BED_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP) && DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - if (z_probe_enabled) { - UPDATE_ENDSTOP(Z, MIN_PROBE); - if (TEST_ENDSTOP(Z_MIN_PROBE)) SBI(endstop_hit_bits, Z_MIN_PROBE); - } - #endif - } - else { // z +direction - #if HAS_Z_MAX - - #if ENABLED(Z_DUAL_ENDSTOPS) - - UPDATE_ENDSTOP_BIT(Z, MAX); - #if HAS_Z2_MAX - UPDATE_ENDSTOP_BIT(Z2, MAX); - #else - COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX); - #endif - - test_dual_z_endstops(Z_MAX, Z2_MAX); - - #else // !Z_DUAL_ENDSTOPS - - UPDATE_ENDSTOP(Z, MAX); - - #endif // !Z_DUAL_ENDSTOPS - #endif // Z_MAX_PIN - } - #if ENABLED(COREXZ) - } - #endif - - old_endstop_bits = current_endstop_bits; - -} // Endstops::update() diff --git a/Marlin/endstops.h b/Marlin/endstops.h deleted file mode 100644 index 22c2468..0000000 --- a/Marlin/endstops.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * endstops.h - manages endstops - */ - -#ifndef ENDSTOPS_H -#define ENDSTOPS_H - -#include "enum.h" - -class Endstops { - - public: - - static bool enabled, enabled_globally; - static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value - - #if ENABLED(Z_DUAL_ENDSTOPS) - static uint16_t - #else - static byte - #endif - current_endstop_bits, old_endstop_bits; - - Endstops() {}; - - /** - * Initialize the endstop pins - */ - void init(); - - /** - * Update the endstops bits from the pins - */ - static void update(); - - /** - * Print an error message reporting the position when the endstops were last hit. - */ - static void report_state(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered - - /** - * Report endstop positions in response to M119 - */ - static void M119(); - - // Enable / disable endstop checking globally - static void enable_globally(bool onoff=true) { enabled_globally = enabled = onoff; } - - // Enable / disable endstop checking - static void enable(bool onoff=true) { enabled = onoff; } - - // Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable - static void not_homing() { enabled = enabled_globally; } - - // Clear endstops (i.e., they were hit intentionally) to suppress the report - static void hit_on_purpose() { endstop_hit_bits = 0; } - - // Enable / disable endstop z-probe checking - #if HAS_BED_PROBE - static volatile bool z_probe_enabled; - static void enable_z_probe(bool onoff=true) { z_probe_enabled = onoff; } - #endif - - private: - - #if ENABLED(Z_DUAL_ENDSTOPS) - static void test_dual_z_endstops(EndstopEnum es1, EndstopEnum es2); - #endif -}; - -extern Endstops endstops; - -#endif // ENDSTOPS_H diff --git a/Marlin/enum.h b/Marlin/enum.h deleted file mode 100644 index a51d208..0000000 --- a/Marlin/enum.h +++ /dev/null @@ -1,193 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __ENUM_H__ -#define __ENUM_H__ - -/** - * Axis indices as enumerated constants - * - * Special axis: - * - A_AXIS and B_AXIS are used by COREXY printers - * - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship - * between X_AXIS and X Head movement, like CoreXY bots - */ -enum AxisEnum { - NO_AXIS = -1, - X_AXIS = 0, - A_AXIS = 0, - Y_AXIS = 1, - B_AXIS = 1, - Z_AXIS = 2, - C_AXIS = 2, - E_AXIS = 3, - X_HEAD = 4, - Y_HEAD = 5, - Z_HEAD = 6 -}; - -#define LOOP_XYZ(VAR) for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++) -#define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++) - -typedef enum { - LINEARUNIT_MM, - LINEARUNIT_INCH -} LinearUnit; - -typedef enum { - TEMPUNIT_C, - TEMPUNIT_K, - TEMPUNIT_F -} TempUnit; - -/** - * Debug flags - * Not yet widely applied - */ -enum DebugFlags { - DEBUG_NONE = 0, - DEBUG_ECHO = _BV(0), ///< Echo commands in order as they are processed - DEBUG_INFO = _BV(1), ///< Print messages for code that has debug output - DEBUG_ERRORS = _BV(2), ///< Not implemented - DEBUG_DRYRUN = _BV(3), ///< Ignore temperature setting and E movement commands - DEBUG_COMMUNICATION = _BV(4), ///< Not implemented - DEBUG_LEVELING = _BV(5) ///< Print detailed output for homing and leveling -}; - -enum EndstopEnum { - X_MIN, - Y_MIN, - Z_MIN, - Z_MIN_PROBE, - X_MAX, - Y_MAX, - Z_MAX, - Z2_MIN, - Z2_MAX -}; - -/** - * Temperature - * Stages in the ISR loop - */ -enum TempState { - PrepareTemp_0, - MeasureTemp_0, - PrepareTemp_BED, - MeasureTemp_BED, - PrepareTemp_1, - MeasureTemp_1, - PrepareTemp_2, - MeasureTemp_2, - PrepareTemp_3, - MeasureTemp_3, - Prepare_FILWIDTH, - Measure_FILWIDTH, - StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle -}; - -#if ENABLED(EMERGENCY_PARSER) - enum e_parser_state { - state_RESET, - state_N, - state_M, - state_M1, - state_M10, - state_M108, - state_M11, - state_M112, - state_M4, - state_M41, - state_M410, - state_IGNORE // to '\n' - }; -#endif - -#if ENABLED(FILAMENT_CHANGE_FEATURE) - enum FilamentChangeMenuResponse { - FILAMENT_CHANGE_RESPONSE_WAIT_FOR, - FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE, - FILAMENT_CHANGE_RESPONSE_RESUME_PRINT - }; - - #if ENABLED(ULTIPANEL) - enum FilamentChangeMessage { - FILAMENT_CHANGE_MESSAGE_INIT, - FILAMENT_CHANGE_MESSAGE_UNLOAD, - FILAMENT_CHANGE_MESSAGE_INSERT, - FILAMENT_CHANGE_MESSAGE_LOAD, - FILAMENT_CHANGE_MESSAGE_EXTRUDE, - FILAMENT_CHANGE_MESSAGE_OPTION, - FILAMENT_CHANGE_MESSAGE_RESUME, - FILAMENT_CHANGE_MESSAGE_STATUS - }; - #endif -#endif - -/** - * States for managing Marlin and host communication - * Marlin sends messages if blocked or busy - */ -#if ENABLED(HOST_KEEPALIVE_FEATURE) - enum MarlinBusyState { - NOT_BUSY, // Not in a handler - IN_HANDLER, // Processing a GCode - IN_PROCESS, // Known to be blocking command input (as in G29) - PAUSED_FOR_USER, // Blocking pending any input - PAUSED_FOR_INPUT // Blocking pending text input (concept) - }; -#endif - -#if ENABLED(MESH_BED_LEVELING) - enum MeshLevelingState { - MeshReport, - MeshStart, - MeshNext, - MeshSet, - MeshSetZOffset, - MeshReset - }; - - enum MBLStatus { - MBL_STATUS_NONE = 0, - MBL_STATUS_HAS_MESH_BIT = 0, - MBL_STATUS_ACTIVE_BIT = 1 - }; -#endif - -/** - * SD Card - */ -enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename }; - -/** - * Ultra LCD - */ -enum LCDViewAction { - LCDVIEW_NONE, - LCDVIEW_REDRAW_NOW, - LCDVIEW_CALL_REDRAW_NEXT, - LCDVIEW_CLEAR_CALL_REDRAW, - LCDVIEW_CALL_NO_REDRAW -}; - -#endif // __ENUM_H__ diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h deleted file mode 100644 index 0d0c60b..0000000 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(MaukCC, CartesioE)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - //#define MOTHERBOARD BOARD_CNCONTROLS_11 - #define MOTHERBOARD BOARD_CNCONTROLS_12 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "CartesioE" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 3 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 -1 -#define TEMP_SENSOR_1 -1 -#define TEMP_SENSOR_2 1 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 4 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 1 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 415 -#define HEATER_1_MAXTEMP 415 -#define HEATER_2_MAXTEMP 415 -#define HEATER_3_MAXTEMP 415 -#define BED_MAXTEMP 165 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - - // Cartesio extruderV6 40W Normal - #define DEFAULT_Kp 18 - #define DEFAULT_Ki 1 - #define DEFAULT_Kd 100 - - // Cartesio extruderV6 40W Volcano - //#define DEFAULT_Kp 50 - //#define DEFAULT_Ki 9 - //#define DEFAULT_Kd 70 - - // Cartesio extruderV6 40W Cyclops - //#define DEFAULT_Kp 18 - //#define DEFAULT_Ki 1 - //#define DEFAULT_Kd 100 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //24V 500W silicone heater on to 4mm glass CartesioW - #define DEFAULT_bedKp 390 - #define DEFAULT_bedKi 70 - #define DEFAULT_bedKd 546 - - //24V 250W silicone heater on to 4mm glass CartesioM - //#define DEFAULT_bedKp 303 - //#define DEFAULT_bedKi 42 - //#define DEFAULT_bedKd 539 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 18 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 1 -#define Y_ENABLE_ON 1 -#define Z_ENABLE_ON 1 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 435 -#define Y_MAX_POS 270 -#define Z_MAX_POS 400 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (10*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {71.128,71.128,640,152} -#define DEFAULT_MAX_FEEDRATE {200,200,20,20} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {1000,1000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 10000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 190 -#define PREHEAT_1_TEMP_BED 50 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -#define ENCODER_PULSES_PER_STEP 2 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -#define ENCODER_STEPS_PER_MENU_ITEM 1 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -#define REPRAPWORLD_KEYPAD -#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h deleted file mode 100644 index 3e10c3f..0000000 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 3.0 -#define TEMP_SENSOR_AD595_GAIN 2.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN 7 -#define EXTRUDER_1_AUTO_FAN_PIN 7 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 35 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 30 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 10 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 1 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - //#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Cartesio/_Bootscreen.h b/Marlin/example_configurations/Cartesio/_Bootscreen.h deleted file mode 100644 index a365cae..0000000 --- a/Marlin/example_configurations/Cartesio/_Bootscreen.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Custom Bitmap for splashscreen - * - * You may use one of the following tools to generate the C++ bitmap array from - * a black and white image: - * - * - http://www.marlinfw.org/tools/u8glib/converter.html - * - http://www.digole.com/tools/PicturetoC_Hex_converter.php - */ -#include - -#define CUSTOM_BOOTSCREEN_TIMEOUT 2500 -#define CUSTOM_BOOTSCREEN_BMPWIDTH 63 -#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64 - -const unsigned char custom_start_bmp[512] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, - 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x0f, 0x07, 0x87, 0xff, 0xff, 0xe0, 0x00, - 0x00, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x00, - 0x01, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x80, - 0x03, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0x80, - 0x07, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xc0, - 0x07, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xe0, - 0x0f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xe0, - 0x0f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xf0, - 0x1f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xf0, - 0x1f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xf0, - 0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, - 0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, - 0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xf1, 0xf8, - 0x3f, 0x1f, 0x8f, 0xc7, 0xff, 0xff, 0xe1, 0xf8, - 0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, - 0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, - 0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, - 0x7f, 0x1f, 0x8f, 0xc7, 0xc0, 0x00, 0x01, 0xfc, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, - 0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, - 0x7f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xfc, - 0x3f, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, - 0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, - 0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, - 0x3f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf8, - 0x1f, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf0, - 0x1f, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xf0, - 0x1f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xe0, - 0x0f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xe0, - 0x0f, 0x00, 0x00, 0x07, 0xc7, 0xe3, 0xf1, 0xc0, - 0x07, 0x0f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0xc0, - 0x03, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0x80, - 0x03, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf1, 0x00, - 0x01, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf0, 0x00, - 0x00, 0x1f, 0xff, 0xff, 0xc7, 0xe3, 0xf0, 0x00, - 0x00, 0x0f, 0xff, 0xff, 0xc3, 0xc1, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, - 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, - 0x00, 0x01, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00, - 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h deleted file mode 100644 index bb8f643..0000000 --- a/Marlin/example_configurations/Felix/Configuration.h +++ /dev/null @@ -1,1310 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_FELIX2 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Felix" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 15 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Felix 2.0+ electronics with v4 Hotend - #define DEFAULT_Kp 12 - #define DEFAULT_Ki 0.84 - #define DEFAULT_Kd 85 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - // Felix Foil Heater - #define DEFAULT_bedKp 103.37 - #define DEFAULT_bedKi 2.79 - #define DEFAULT_bedKd 956.94 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 255 -#define Y_MAX_POS 205 -#define Z_MAX_POS 235 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 180 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -// default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error. -#define DEFAULT_AXIS_STEPS_PER_UNIT {76.190476, 76.190476, 1600, 164} -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {5000,5000,100,80000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 1750 //1500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 5000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10 // (mm/sec) -#define DEFAULT_ZJERK 0.3 //0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h deleted file mode 100644 index 5700735..0000000 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 3 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h deleted file mode 100644 index 59f45c4..0000000 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ /dev/null @@ -1,1308 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_FELIX2 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Felix Dual" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 2 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 1 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 15 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Felix 2.0+ electronics with v4 Hotend - #define DEFAULT_Kp 12 - #define DEFAULT_Ki 0.84 - #define DEFAULT_Kd 85 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - // Felix Foil Heater - #define DEFAULT_bedKp 103.37 - #define DEFAULT_bedKi 2.79 - #define DEFAULT_bedKd 956.94 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR true -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 255 -#define Y_MAX_POS 205 -#define Z_MAX_POS 235 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 180 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -// default steps per unit for Felix 2.0/3.0: 0.00249mm x/y rounding error with 3mm pitch HTD belt and 14 tooth pulleys. 0 z error. -#define DEFAULT_AXIS_STEPS_PER_UNIT {76.190476, 76.190476, 1600, 164} -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {5000,5000,100,80000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 1750 //1500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 5000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10 // (mm/sec) -#define DEFAULT_ZJERK 0.3 //0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Felix/README.md b/Marlin/example_configurations/Felix/README.md deleted file mode 100644 index b1b8f36..0000000 --- a/Marlin/example_configurations/Felix/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Felix 2.0/3.0 Configuration for Marlin Firmware - -Bringing silky smooth prints to Felix. - -## Build HOWTO - - - Install the latest non-beta Arduino software IDE/toolset: http://www.arduino.cc/en/Main/Software - - Download the Marlin firmware - - [Latest developement version](https://github.com/MarlinFirmware/Marlin/tree/Development) - - [Stable version](https://github.com/MarlinFirmware/Marlin/tree/Development) - - In both cases use the "Download Zip" button on the right. - -``` -cd Marlin/Marlin -cp example_configurations/Felix/Configuration_adv.h . -``` - -The next step depends on your setup: - -### Single Extruder Configuration - - cp example_configurations/Felix/Configuration.h . - -### Dual Extruder Configuration - - cp example_configurations/Felix/DUAL/Configuration.h Configuration.h - -### Compile Firmware - - - Start the Arduino IDE. - - Select Tools -> Board -> Arduino Mega 2560 - - Select the correct serial port in Tools -> Serial Port (usually /dev/ttyUSB0) - - Open Marlin.pde or .ino - - Click the Verify/Compile button - -### Flash Firmware - -#### Connected directly via USB - - - Click the Upload button. If all goes well the firmware is uploading - -#### Remote update - -Find the latest Arduino build: - - ls -altr /tmp/ - drwxr-xr-x 5 chrono users 12288 Mar 3 21:41 build6072035599686630843.tmp - -Copy the firmware to your printer host: - - scp /tmp/build6072035599686630843.tmp/Marlin.cpp.hex a.b.c.d:/tmp/ - -Connect to your printer host via ssh, stop Octoprint or any other service that may block your USB device and make sure you have avrdude installed, then run: - - avrdude -C/etc/avrdude.conf -v -v -v -patmega2560 -cwiring -P/dev/ttyUSB0 \ - -b115200 -D -Uflash:w:/tmp/Marlin.cpp.hex:i - -## Acknowledgements - -Mashed together and tested on https://apollo.open-resource.org/mission:resources:picoprint based on collaborative teamwork of @andrewsil1 and @thinkyhead. diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h deleted file mode 100644 index feab873..0000000 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ /dev/null @@ -1,1319 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "HEPHESTOS" - -// Added for BQ -#define SOURCE_CODE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 260 -#define HEATER_1_MAXTEMP 260 -#define HEATER_2_MAXTEMP 260 -#define HEATER_3_MAXTEMP 260 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Hephestos i3 - #define DEFAULT_Kp 23.05 - #define DEFAULT_Ki 2.00 - #define DEFAULT_Kd 66.47 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR false -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 215 -#define Y_MAX_POS 210 -#define Z_MAX_POS 180 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY 2000 -#define HOMING_FEEDRATE_Z 150 - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,100.47095761381482} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {250, 250, 3.3, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 200 -#define PREHEAT_1_TEMP_BED 0 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 220 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h deleted file mode 100644 index b719e60..0000000 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 1.75 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 80 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - //#define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h deleted file mode 100644 index 060f4f4..0000000 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ /dev/null @@ -1,1321 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "@jbrazio" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "BQ Hephestos 2" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -#define MACHINE_UUID "8d083632-40c5-4649-85b8-43d9ae6c5d55" // BQ Hephestos 2 standard config - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 70 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 15 -//#define HEATER_1_MINTEMP 5 -//#define HEATER_2_MINTEMP 5 -//#define HEATER_3_MINTEMP 5 -//#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 250 -//#define HEATER_1_MAXTEMP 275 -//#define HEATER_2_MAXTEMP 275 -//#define HEATER_3_MAXTEMP 275 -//#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 250 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Tuned PID values using M303 - #define DEFAULT_Kp 19.18 - #define DEFAULT_Ki 1.36 - #define DEFAULT_Kd 67.42 - - // BQ firmware stock PID values - //#define DEFAULT_Kp 10.7 - //#define DEFAULT_Ki 0.45 - //#define DEFAULT_Kd 3 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -//#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 34 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 15 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 5 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 2 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -2 -#define Z_PROBE_OFFSET_RANGE_MAX 0 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -#define Z_HOMING_HEIGHT 5 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 210 -#define Y_MAX_POS 297 -#define Z_MAX_POS 210 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER - #define RIGHT_PROBE_BED_POSITION X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER) - #define FRONT_PROBE_BED_POSITION Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER - #define BACK_PROBE_BED_POSITION Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER) - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the bed. - #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER - #define ABL_PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER - #define ABL_PROBE_PT_2_X X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER) - #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER - #define ABL_PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2) - #define ABL_PROBE_PT_3_Y Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER) - - #endif // !AUTO_BED_LEVELING_GRID - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (150*60) -#define HOMING_FEEDRATE_Z 200 - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {160, 160, 8000, 210.02} // Steps per unit -#define DEFAULT_MAX_FEEDRATE {250, 250, 2, 200} // mm/sec -#define DEFAULT_MAX_ACCELERATION {1000, 1000, 20, 1000} // X, Y, Z, E max start speed for accelerated moves - -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 2.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 210 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 2.00 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.60 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h deleted file mode 100644 index eeb11da..0000000 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN 11 -#define EXTRUDER_1_AUTO_FAN_PIN 6 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {150, 170, 180, 190, 180} // Values 0-255 (bq ZUM Mega 3D (default): X = 150 [~1.17A]; Y = 170 [~1.33A]; Z = 180 [~1.41A]; E0 = 190 [~1.49A]) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -//#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -//#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -//#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -//#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M104 S0\nM84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - #define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - #define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - #define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos_2/README.md b/Marlin/example_configurations/Hephestos_2/README.md deleted file mode 100644 index 8fcb53c..0000000 --- a/Marlin/example_configurations/Hephestos_2/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2) -This configuration file is based on the original configuration file shipped with the heavily modified Marlin fork by BQ. The original firmware and configuration file can be found at [BQ Github repository](https://github.com/bq/Marlin). - -NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will change by using the original Marlin firmware. - -## Changelog - * 2016/03/01 - Initial release - * 2016/03/21 - Activated 4-point auto leveling by default - Updated miscellaneous z-probe values - * 2016/06/21 - Disabled hot bed related options - Activated software endstops - SD printing now disables the heater when finished - * 2016/07/13 - Update the `DEFAULT_AXIS_STEPS_PER_UNIT` for the Z axis - Increased the `DEFAULT_XYJERK` diff --git a/Marlin/example_configurations/Hephestos_2/_Bootscreen.h b/Marlin/example_configurations/Hephestos_2/_Bootscreen.h deleted file mode 100644 index 9819264..0000000 --- a/Marlin/example_configurations/Hephestos_2/_Bootscreen.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Custom Bitmap for splashscreen - * - * You may use one of the following tools to generate the C++ bitmap array from - * a black and white image: - * - * - http://www.marlinfw.org/tools/u8glib/converter.html - * - http://www.digole.com/tools/PicturetoC_Hex_converter.php - */ -#include - -#define CUSTOM_BOOTSCREEN_TIMEOUT 2500 -#define CUSTOM_BOOTSCREEN_BMPWIDTH 62 -#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64 - -const unsigned char custom_start_bmp[512] PROGMEM = { - 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x03, 0xc0, 0x0f, 0xf0, 0x07, 0x80, 0x00, - 0x00, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xc0, 0x00, - 0x00, 0x0f, 0xf0, 0x03, 0xc0, 0x1f, 0xe0, 0x00, - 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x1f, 0xe0, 0x00, - 0x00, 0x07, 0xe0, 0x00, 0x00, 0x0f, 0xc0, 0x00, - 0x00, 0x03, 0xc0, 0x00, 0x00, 0x07, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x7f, 0x80, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x00, 0xf7, 0xc0, 0x1f, 0x80, - 0xff, 0xc0, 0x00, 0x00, 0xff, 0xf0, 0x7f, 0xc0, - 0x7f, 0x80, 0x00, 0x00, 0xff, 0xf8, 0xff, 0xe0, - 0x3f, 0x00, 0x00, 0x00, 0xfc, 0xf8, 0xf0, 0xf8, - 0x1e, 0x00, 0x00, 0x00, 0xf8, 0x7d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3d, 0xe0, 0x78, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0x79, 0xf0, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0xff, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x7f, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x3f, 0xf8, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x0e, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, -}; diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h deleted file mode 100644 index dbfe6b9..0000000 --- a/Marlin/example_configurations/K8200/Configuration.h +++ /dev/null @@ -1,1344 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Sample configuration file for Vellemann K8200 - * tested on K8200 with VM8201 (Display) - * and Arduino 1.6.8 (Mac) by @CONSULitAS, 2016-02-21 - * https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2016-02-21.zip - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(K8200, @CONSULitAS)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_K8200 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "K8200" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -#define MACHINE_UUID "2b7dea3b-844e-4ab1-aa96-bb6406607d6e" // K8200 standard config with VM8201 (Display) - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 5 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - //#define DEFAULT_Kp 22.2 - //#define DEFAULT_Ki 1.08 - //#define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - - // Vellemann K8200 Extruder - calculated with PID Autotune and tested - #define DEFAULT_Kp 24.29 - #define DEFAULT_Ki 1.58 - #define DEFAULT_Kd 93.51 -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - //#define DEFAULT_bedKp 10.00 - //#define DEFAULT_bedKi .023 - //#define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. - - // Vellemann K8200 PCB heatbed with standard PCU at 60 degreesC - calculated with PID Autotune and tested - // from pidautotune - #define DEFAULT_bedKp 341.88 - #define DEFAULT_bedKi 25.32 - #define DEFAULT_bedKd 1153.89 -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - #define ENDSTOPPULLUP_XMIN - #define ENDSTOPPULLUP_YMIN - #define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false // not for K8200 -> looses Steps -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR false // was true -> why for K8200? -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true // K8200: true for geared default extruder! -#define INVERT_E1_DIR true -#define INVERT_E2_DIR true -#define INVERT_E3_DIR true - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 200 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {64.25,64.25,2560,600} // default steps per unit for K8200 -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 500} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 190 -#define PREHEAT_1_TEMP_BED 50 // K8200: set back to 70 if you have an upgraded heatbed power supply -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 60 // K8200: set back to 110 if you have an upgraded heatbed power supply -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE // K8200: for Display VM8201 - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h deleted file mode 100644 index dc26fd6..0000000 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ /dev/null @@ -1,805 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -// Sample configuration file for Vellemann K8200 -// tested on K8200 with VM8201 (Display) -// and Arduino 1.6.8 (Mac) by @CONSULitAS, 2016-02-21 -// https://github.com/CONSULitAS/Marlin-K8200/archive/K8200_stable_2016-02-21.zip - - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 60 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 8 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 30 // Seconds - #define WATCH_TEMP_INCREASE 4 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -#define FAN_KICKSTART_TIME 500 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {4, 4, 8} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - #define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - #define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - #define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 2; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 32 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8200/README.md b/Marlin/example_configurations/K8200/README.md deleted file mode 100644 index bb29f51..0000000 --- a/Marlin/example_configurations/K8200/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Example Configuration for Vellemann [K8200](http://www.k8200.eu/) -* Configuration files for **Vellemann K8200** (with [VM8201](http://www.vellemanprojects.eu/products/view/?id=416158) - LCD Option for K8200) -* K8200 is a 3Drag clone - configuration should work with 3Drag http://reprap.org/wiki/3drag, too. Please report. - -* updated manually with parameters from genuine Vellemann Firmware "firmware_k8200_marlinv2" based on the recent development branch - -* VM8201 uses "DISPLAY_CHARSET_HD44870_JAPAN" and "ULTIMAKERCONTROLLER" -* german (de) translation with umlaut is supported now - thanks to @AnHardt for the great hardware based umlaut support - -I [@CONSULitAS](https://github.com/CONSULitAS) tested the changes on my K8200 with 20x4-LCD and Arduino 1.6.1 for Windows (SD library added to IDE manually) - everything works well. - -**Source for genuine [Vellemann Firmware](http://www.k8200.eu/support/downloads/)** -* V2.1.1 (for z axis upgrade, date branched: 2013-06-05): [firmware_k8200_v2.1.1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_v2.1.1.zip) - * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_v2.1.1.zip - -* V2 (with LCD/SD-Support, date branched: 2013-06-05): [firmware_k8200_marlinv2.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv2.zip) - * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv2.zip - -* V1 (without LCD/SD-Support, date branched: 2012-10-02): [firmware_k8200_marlinv1.zip](http://www.k8200.eu/downloads/files/downloads/firmware_k8200_marlinv1.zip) - * see also https://github.com/CONSULitAS/Marlin-K8200/tree/Vellemann_firmware_k8200_marlinv1.zip diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h deleted file mode 100644 index 47ab342..0000000 --- a/Marlin/example_configurations/K8400/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(Anthony Birkett, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_K8400 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 2 // (seconds) -#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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - //#define DEFAULT_Kp 22.2 - //#define DEFAULT_Ki 1.08 - //#define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - #define DEFAULT_Kp 63.0 - #define DEFAULT_Ki 2.25 - #define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 160 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR true -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 20 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 190 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (8*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {134.74,134.74,4266.66,148.7} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {160, 160, 10, 10000} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 6000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 6000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10.0 // (mm/sec) -#define DEFAULT_ZJERK 0.5 // (mm/sec) -#define DEFAULT_EJERK 20.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 210 -#define PREHEAT_1_TEMP_BED 0 -#define PREHEAT_1_FAN_SPEED 165 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 245 -#define PREHEAT_2_TEMP_BED 0 -#define PREHEAT_2_FAN_SPEED 165 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -#define ENCODER_PULSES_PER_STEP 4 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -#define ENCODER_STEPS_PER_MENU_ITEM 1 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h deleted file mode 100644 index 64efac9..0000000 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 1000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 1 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 10 -#define Y_HOME_BUMP_MM 10 -#define Z_HOME_BUMP_MM 3 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 26 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 100 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 100 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 20 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 5 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 600 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 600 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 100 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h deleted file mode 100644 index 3ea963a..0000000 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(Anthony Birkett, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_K8400 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 2 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 5 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 2 // (seconds) -#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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - //#define DEFAULT_Kp 22.2 - //#define DEFAULT_Ki 1.08 - //#define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - #define DEFAULT_Kp 63.0 - #define DEFAULT_Ki 2.25 - #define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 160 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR true -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 20 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 190 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (8*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {134.74,134.74,4266.66,148.7} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {160, 160, 10, 10000} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 6000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 6000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10.0 // (mm/sec) -#define DEFAULT_ZJERK 0.5 // (mm/sec) -#define DEFAULT_EJERK 20.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 210 -#define PREHEAT_1_TEMP_BED 0 -#define PREHEAT_1_FAN_SPEED 165 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 245 -#define PREHEAT_2_TEMP_BED 0 -#define PREHEAT_2_FAN_SPEED 165 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -#define ENCODER_PULSES_PER_STEP 4 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -#define ENCODER_STEPS_PER_MENU_ITEM 1 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/K8400/README.md b/Marlin/example_configurations/K8400/README.md deleted file mode 100644 index c9089b5..0000000 --- a/Marlin/example_configurations/K8400/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Configuration for Velleman K8400 Vertex -http://www.k8400.eu/ - -Configuration files for the K8400, ported upstream from the official Velleman firmware. -Like it's predecessor, (K8200), the K8400 is a 3Drag clone. There are some minor differences, documented in pins_K8400.h. - -Single and dual head configurations provided. Copy the correct Configuration.h and Configuration_adv.h to the /Marlin/ directory. - -**NOTE: This configuration includes the community sourced feed rate fix. Use 100% feed rate in Repetier!** - -For implementation and updated K8400 firmware, see https://github.com/birkett/Velleman-K8400-Firmware - -### Original Sources -Credit to Velleman for the original 1.0.x based code:
-http://www.vertex3dprinter.eu/downloads/files/vertex/firmware/vertex-m1-v1.4-h2.zip diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h deleted file mode 100644 index 1c37511..0000000 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_MEGATRONICS_3 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 200 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402*2,78.7402*2,5120.00,760*1*1.5} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -#define REPRAPWORLD_KEYPAD -#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h deleted file mode 100644 index bbe545c..0000000 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -// for Rigidbot version 1 : #define MOTHERBOARD BOARD_RIGIDBOARD -// for Rigidbot Version 2 : #define MOTHERBOARD BOARD_RIGIDBOARD_V2 - -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RIGIDBOARD_V2 -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 // Single extruder. Set to 2 for dual extruders - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -#define HOTEND_OFFSET_X {0.0, 36.00} // (in mm) for each extruder, offset of the hotend on the X axis -#define HOTEND_OFFSET_Y {0.0, 0.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 // DGlass3D = 5; RigidBot = 1; 3DSv6 = 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -//#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - - // Rigidbot hotend - #define DEFAULT_Kp 16.17 - #define DEFAULT_Ki 0.85 - #define DEFAULT_Kd 76.55 - - // Base DGlass3D/E3Dv6 hotend - //#define DEFAULT_Kp 10 - //#define DEFAULT_Ki 0.85 - //#define DEFAULT_Kd 245 - - // E3D w/ rigidbot cartridge - //#define DEFAULT_Kp 16.30 - //#define DEFAULT_Ki 0.95 - //#define DEFAULT_Kd 69.69 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //RigidBot, from pid autotune - #define DEFAULT_bedKp 355 - #define DEFAULT_bedKi 66.5 - #define DEFAULT_bedKd 480 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR true -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 254 // RigidBot regular is 254mm, RigitBot Big is 406mm -#define Y_MAX_POS 248 // RigidBot regular is 248mm, RigitBot Big is 304mm -#define Z_MAX_POS 254 // RigidBot regular and Big are 254mm - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (15*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {44.3090, 22.1545, 1600, 53.5} // default steps per unit for RigidBot with standard hardware - // default steps for 16-teth polleys {100.06,50.06,1600,76}, HPX2-MAX E=504, RigidBot E=53.5, Peter Stoneham's=76 -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {800, 800, 100, 10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 600 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 8.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -// RigidBoard: To rewire this for a RigidBot see http://rigidtalk.com/wiki/index.php?title=LCD_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -#define NUM_SERVOS 0 // DGlass3D - Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h deleted file mode 100644 index 2118f83..0000000 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 4 // RigidBot: Fans/Water Pump to cool the hotend cool side. -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -//#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -//#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -//#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 1.75 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 8 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h deleted file mode 100644 index bc60b75..0000000 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ /dev/null @@ -1,1335 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//========================= SCARA Settings ================================== -//=========================================================================== -// SCARA-mode for Marlin has been developed by QHARLEY in ZA in 2012/2013. Implemented -// and slightly reworked by JCERNY in 06/2014 with the goal to bring it into Master-Branch -// QHARLEYS Autobedlevelling has not been ported, because Marlin has now Bed-levelling -// You might need Z-Min endstop on SCARA-Printer to use this feature. Actually untested! -// Uncomment to use Morgan scara mode -#define SCARA -#define SCARA_SEGMENTS_PER_SECOND 200 // If movement is choppy try lowering this value -// Length of inner support arm -#define Linkage_1 150 //mm Preprocessor cannot handle decimal point... -// Length of outer support arm Measure arm lengths precisely and enter -#define Linkage_2 150 //mm - -// SCARA tower offset (position of Tower relative to bed zero position) -// This needs to be reasonably accurate as it defines the printbed position in the SCARA space. -#define SCARA_offset_x 100 //mm -#define SCARA_offset_y -56 //mm -#define SCARA_RAD2DEG 57.2957795 // to convert RAD to degrees - -#define THETA_HOMING_OFFSET 0 //calculatated from Calibration Guide and command M360 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073 -#define PSI_HOMING_OFFSET 0 //calculatated from Calibration Guide and command M364 / M114 see picture in http://reprap.harleystudio.co.za/?page_id=1073 - -//some helper variables to make kinematics faster -#define L1_2 sq(Linkage_1) // do not change -#define L2_2 sq(Linkage_2) // do not change - -//=========================================================================== -//========================= SCARA Settings end ============================== -//=========================================================================== - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 3 // (seconds) -#define TEMP_HYSTERESIS 2 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Merlin Hotend: From Autotune - #define DEFAULT_Kp 24.5 - #define DEFAULT_Ki 1.72 - #define DEFAULT_Kd 87.73 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //12v Heatbed Mk3 12V in parallel - //from pidautotune - #define DEFAULT_bedKp 630.14 - #define DEFAULT_bedKi 121.71 - #define DEFAULT_bedKd 815.64 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -//#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 150 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -//#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - #define ENDSTOPPULLUP_ZMAX // open pin, inverted - #define ENDSTOPPULLUP_XMIN // open pin, inverted - #define ENDSTOPPULLUP_YMIN // open pin, inverted - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 -#define Y_HOME_DIR 1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS MANUAL_Z_HOME_POS -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 225 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -#define MANUAL_X_HOME_POS -22 -#define MANUAL_Y_HOME_POS -52 -#define MANUAL_Z_HOME_POS 0.1 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (40*60) -#define HOMING_FEEDRATE_Z (10*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {103.69,106.65,200/1.25,1000} // default steps per unit for SCARA -#define DEFAULT_MAX_FEEDRATE {300, 300, 30, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {300,300,20,1000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 400 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 5 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 3 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h deleted file mode 100644 index 07f1e56..0000000 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 3000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 180 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 180 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 3 -#define Y_HOME_BUMP_MM 3 -#define Z_HOME_BUMP_MM 3 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 240 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 10*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 1.75 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 35 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Swift/Configuration.h b/Marlin/example_configurations/Swift/Configuration.h deleted file mode 100644 index 88e4c17..0000000 --- a/Marlin/example_configurations/Swift/Configuration.h +++ /dev/null @@ -1,1363 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_SWIFT_10 -#endif - - -#define UARM_SWIFT - -//#define DEBUG -//#define SWIFT_TEST_MODE - -#define HW_VER "3.3" -#define SW_VER_BASE "3.1.3" - -#ifdef SWIFT_TEST_MODE -#define SW_VER SW_VER_BASE"_t" -#elif defined(DEBUG) -#define SW_VER SW_VER_BASE"_d" -#else -#define SW_VER SW_VER_BASE -#endif - -#define DEVICE_NAME "SwiftPro" - -#define SEGMENTS_PER_SECOND 160 - - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 2 // (seconds) -#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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} - -#define X_ENABLE_ON 1 -#define Y_ENABLE_ON 1 -#define Z_ENABLE_ON 1 -#define E_ENABLE_ON 0 // For all extruders - - - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. - -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -300 -#define Y_MIN_POS -300 -#define Z_MIN_POS -300 -#define X_MAX_POS 300 -#define Y_MAX_POS 300 -#define Z_MAX_POS 300 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings -#define DECELERATE_MULTIPLE (20.0f/36.0f) -#define MIROC 128 -#define GEAR_RATIO 4.5 -#define DEFAULT_AXIS_STEPS_PER_UNIT { DECELERATE_MULTIPLE*MIROC*GEAR_RATIO,\ - DECELERATE_MULTIPLE*MIROC*GEAR_RATIO,\ - DECELERATE_MULTIPLE*MIROC*GEAR_RATIO, 360/3.1415926/12*16/1.8} - - - -//#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 25 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 25 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 100 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 1.0 // (mm/sec) -#define DEFAULT_ZJERK 1.0 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -//#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/Swift/Configuration_adv.h b/Marlin/example_configurations/Swift/Configuration_adv.h deleted file mode 100644 index 2cafe11..0000000 --- a/Marlin/example_configurations/Swift/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X false -#define DISABLE_INACTIVE_Y false -#define DISABLE_INACTIVE_Z false // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E false - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -//#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h deleted file mode 100644 index c4de322..0000000 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ /dev/null @@ -1,1348 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(Aleph Objects, Inc, TAZ config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMBO -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "TAZ" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 7 -#define TEMP_SENSOR_1 7 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 7 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 250 -#define HEATER_1_MAXTEMP 250 -#define HEATER_2_MAXTEMP 250 -#define HEATER_3_MAXTEMP 250 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Buda 2.0 on 24V - #define DEFAULT_Kp 6 - #define DEFAULT_Ki .3 - #define DEFAULT_Kd 125 - - // Buda 2.0 on 12V - //#define DEFAULT_Kp 22.2 - //#define DEFAULT_Ki 1.01 - //#define DEFAULT_Kd 114 - - // Ultimaker - //#define DEFAULT_Kp 22.2 - //#define DEFAULT_Ki 1.08 - //#define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 206 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //24V 360W silicone heater from NPH on 3mm borosilicate (TAZ 2.2+) - #define DEFAULT_bedKp 20 - #define DEFAULT_bedKi 5 - #define DEFAULT_bedKd 275 - - //12v 400W silicone heater from QUDB into 3mm borosilicate (TAZ 1.0+) - //from pidautotune - //#define DEFAULT_bedKp 650 - //#define DEFAULT_bedKi 60 - //#define DEFAULT_bedKd 1800 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - //#define DEFAULT_bedKp 10.00 - //#define DEFAULT_bedKi .023 - //#define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - #define ENDSTOPPULLUP_XMAX - #define ENDSTOPPULLUP_YMAX - #define ENDSTOPPULLUP_ZMAX - #define ENDSTOPPULLUP_XMIN - #define ENDSTOPPULLUP_YMIN - #define ENDSTOPPULLUP_ZMIN - #define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR true -#define INVERT_E2_DIR true -#define INVERT_E3_DIR true - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 298 -#define Y_MAX_POS 275 -#define Z_MAX_POS 250 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (8*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {100.5,100.5,400,850} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {800, 800, 8, 50} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 8.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 10.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 230 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -#define ENCODER_PULSES_PER_STEP 2 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -#define ENCODER_STEPS_PER_MENU_ITEM 1 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h deleted file mode 100644 index d0d98fb..0000000 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ /dev/null @@ -1,807 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again - -/********************************************************** - Fan Pins - Fan_0 8 - Extruder 0 fan - Fan_1 6 - Extruder 1 fan - Fan_2 2 - Case fan -***********************************************************/ - -#define CONTROLLERFAN_PIN 2 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 130 // 255 == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 4 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,4,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {175,175,240,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h deleted file mode 100644 index f9715f2..0000000 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ /dev/null @@ -1,1319 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "WITBOX" - -// Added for BQ -#define SOURCE_CODE_URL "http://www.bq.com/gb/downloads-witbox.html" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 260 -#define HEATER_1_MAXTEMP 260 -#define HEATER_2_MAXTEMP 260 -#define HEATER_3_MAXTEMP 260 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Witbox - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z true -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR false -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 -#define Y_HOME_DIR 1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 297 -#define Y_MAX_POS 210 -#define Z_MAX_POS 200 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (120*60) -#define HOMING_FEEDRATE_Z 432 - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,600.0*8/3,102.073} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {350, 350, 7.2, 80} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {1000,1000,10,1000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 10.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 200 -#define PREHEAT_1_TEMP_BED 0 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 220 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h deleted file mode 100644 index b719e60..0000000 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {120*60, 120*60, 18*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 1.75 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 80 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - //#define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h deleted file mode 100644 index 470279e..0000000 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ /dev/null @@ -1,1327 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 -#define Z_MAX_POS 200 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker -#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 -#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h deleted file mode 100644 index 3033651..0000000 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ /dev/null @@ -1,1420 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RUMBA -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "BI V2.5" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 2 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 5 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 1 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -//=========================================================================== -//============================== Delta Settings ============================= -//=========================================================================== -// Enable DELTA kinematics and most of the default configuration for Deltas -#define DELTA - -#if ENABLED(DELTA) - - // Make delta curves from many straight lines (linear interpolation). - // This is a trade-off between visible corners (not enough segments) - // and processor overload (too many expensive sqrt calls). - #define DELTA_SEGMENTS_PER_SECOND 100 - - // NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - - // Center-to-center distance of the holes in the diagonal push rods. - #define DELTA_DIAGONAL_ROD 440.0 // mm - - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 330.0 // mm - - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 50.0 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 20.0 // mm - - // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET)) - - // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). - #define DELTA_PRINTABLE_RADIUS 160.0 - - // Delta calibration menu - // uncomment to add three points calibration menu option. - // See http://minow.blogspot.com/index.html#4918805519571907051 - // If needed, adjust the X, Y, Z calibration coordinates - // in ultralcd.cpp@lcd_delta_calibrate_menu() - //#define DELTA_CALIBRATION_MENU - -#endif - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -//#define USE_ZMIN_PLUG -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 4000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe -// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. -//#define Z_PROBE_ALLEN_KEY - -#if ENABLED(Z_PROBE_ALLEN_KEY) - // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29, - // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe. - - // Just like Kossel Pro - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X -105.00 // Move left but not quite so far that we'll bump the belt - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y 0.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X -110.00 // Move outward to position deploy pin to the left of the arm - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y -125.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X 45.00 // Move right to trigger deploy pin - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y -125.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE (XY_PROBE_SPEED)/2 - - #define Z_PROBE_ALLEN_KEY_STOW_1_X 36.00 // Line up with bed retaining clip - #define Z_PROBE_ALLEN_KEY_STOW_1_Y -122.00 - #define Z_PROBE_ALLEN_KEY_STOW_1_Z 75.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_2_X 36.00 // move down to retract probe - #define Z_PROBE_ALLEN_KEY_STOW_2_Y -122.00 - #define Z_PROBE_ALLEN_KEY_STOW_2_Z 25.0 - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/2 - - #define Z_PROBE_ALLEN_KEY_STOW_3_X 0.0 // return to 0,0,100 - #define Z_PROBE_ALLEN_KEY_STOW_3_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_Z 100.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED - -#endif // Z_PROBE_ALLEN_KEY - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 50 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false // DELTA does not invert -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 // deltas always home to max -#define Y_HOME_DIR 1 -#define Z_HOME_DIR 1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Z_MIN_POS 0 -#define X_MAX_POS DELTA_PRINTABLE_RADIUS -#define Y_MAX_POS DELTA_PRINTABLE_RADIUS -#define Z_MAX_POS MANUAL_Z_HOME_POS - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode. - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // Set the rectangle in which to probe. - #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) - #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Non-linear bed leveling will be used. - // Compensate by interpolating between the nearest four Z probe values for each point. - // Useful for deltas where the print surface may appear like a bowl or dome shape. - // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher. - #define AUTO_BED_LEVELING_GRID_POINTS 9 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 405 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - - -// Delta only homes to Z -#define HOMING_FEEDRATE_Z (200*30) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings -// delta speeds must be the same on xyz -#define DEFAULT_AXIS_STEPS_PER_UNIT {72.9, 72.9, 72.9, 291} // default steps per unit for BI v2.5 (cable drive) -#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 150} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 15.0 // (mm/sec) -#define DEFAULT_ZJERK 15.0 // (mm/sec) Must be same as XY for delta -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h deleted file mode 100644 index 9183be4..0000000 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ /dev/null @@ -1,801 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 120 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis -#define HOMING_BUMP_DIVISOR {10, 10, 10} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 0 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE_XYZ 50*60 - #define MANUAL_FEEDRATE { MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, 60 } // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 5 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 100 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 100 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h deleted file mode 100644 index 9d7a500..0000000 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ /dev/null @@ -1,1414 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Deltabot" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 -1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 0 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -//=========================================================================== -//============================== Delta Settings ============================= -//=========================================================================== -// Enable DELTA kinematics and most of the default configuration for Deltas -#define DELTA - -#if ENABLED(DELTA) - - // Make delta curves from many straight lines (linear interpolation). - // This is a trade-off between visible corners (not enough segments) - // and processor overload (too many expensive sqrt calls). - #define DELTA_SEGMENTS_PER_SECOND 200 - - // NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - - // Center-to-center distance of the holes in the diagonal push rods. - #define DELTA_DIAGONAL_ROD 250.0 // mm - - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 175.0 // mm - - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 33.0 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 18.0 // mm - - // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET)) - - // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). - #define DELTA_PRINTABLE_RADIUS 140.0 - - // Delta calibration menu - // uncomment to add three points calibration menu option. - // See http://minow.blogspot.com/index.html#4918805519571907051 - // If needed, adjust the X, Y, Z calibration coordinates - // in ultralcd.cpp@lcd_delta_calibrate_menu() - //#define DELTA_CALIBRATION_MENU - -#endif - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG // a Z probe -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 4000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe -// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. -//#define Z_PROBE_ALLEN_KEY - -#if ENABLED(Z_PROBE_ALLEN_KEY) - // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29, - // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe. - - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10 - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position - #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down - #define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0 - #define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0 - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10 - - #define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear - #define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED - -#endif // Z_PROBE_ALLEN_KEY - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false // DELTA does not invert -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 // deltas always home to max -#define Y_HOME_DIR 1 -#define Z_HOME_DIR 1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Z_MIN_POS 0 -#define X_MAX_POS DELTA_PRINTABLE_RADIUS -#define Y_MAX_POS DELTA_PRINTABLE_RADIUS -#define Z_MAX_POS MANUAL_Z_HOME_POS - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode. - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // Set the rectangle in which to probe - #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) - #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Non-linear bed leveling will be used. - // Compensate by interpolating between the nearest four Z probe values for each point. - // Useful for deltas where the print surface may appear like a bowl or dome shape. - // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher. - #define AUTO_BED_LEVELING_GRID_POINTS 9 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 250 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - - -// Delta only homes to Z -#define HOMING_FEEDRATE_Z (200*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings -// delta speeds must be the same on xyz -#define DEFAULT_AXIS_STEPS_PER_UNIT {80, 80, 80, 760*1.1} // default steps per unit for Kossel (GT2, 20 tooth) -#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) Must be same as XY for delta -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h deleted file mode 100644 index eb79a30..0000000 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ /dev/null @@ -1,801 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis -#define HOMING_BUMP_DIVISOR {10, 10, 10} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE_XYZ 50*60 - #define MANUAL_FEEDRATE { MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, 60 } // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h deleted file mode 100644 index 1091e93..0000000 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ /dev/null @@ -1,1417 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Mini Kossel" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 7 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 11 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 5 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -//=========================================================================== -//============================== Delta Settings ============================= -//=========================================================================== -// Enable DELTA kinematics and most of the default configuration for Deltas -#define DELTA - -#if ENABLED(DELTA) - - // Make delta curves from many straight lines (linear interpolation). - // This is a trade-off between visible corners (not enough segments) - // and processor overload (too many expensive sqrt calls). - #define DELTA_SEGMENTS_PER_SECOND 200 - - // NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - - // Center-to-center distance of the holes in the diagonal push rods. - #define DELTA_DIAGONAL_ROD 215.0 // mm - - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 145.0 // mm - - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 19.9 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 19.5 // mm - - // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET)) - - // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). - #define DELTA_PRINTABLE_RADIUS 90.0 - - // Delta calibration menu - // uncomment to add three points calibration menu option. - // See http://minow.blogspot.com/index.html#4918805519571907051 - // If needed, adjust the X, Y, Z calibration coordinates - // in ultralcd.cpp@lcd_delta_calibrate_menu() - //#define DELTA_CALIBRATION_MENU - -#endif - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -10 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -3.5 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 4000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe -// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. -#define Z_PROBE_ALLEN_KEY - -#if ENABLED(Z_PROBE_ALLEN_KEY) - // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29, - // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe. - - // Kossel Mini - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED/10) - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20 - // Move the probe into position - #define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED - // Move the nozzle down further to push the probe into retracted position. - #define Z_PROBE_ALLEN_KEY_STOW_2_X Z_PROBE_ALLEN_KEY_STOW_1_X - #define Z_PROBE_ALLEN_KEY_STOW_2_Y Z_PROBE_ALLEN_KEY_STOW_1_Y - #define Z_PROBE_ALLEN_KEY_STOW_2_Z (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH) - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED/10) - // Raise things back up slightly so we don't bump into anything - #define Z_PROBE_ALLEN_KEY_STOW_3_X Z_PROBE_ALLEN_KEY_STOW_2_X - #define Z_PROBE_ALLEN_KEY_STOW_3_Y Z_PROBE_ALLEN_KEY_STOW_2_Y - #define Z_PROBE_ALLEN_KEY_STOW_3_Z (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH) - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_PROBE_SPEED/2) - - #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED - -#endif // Z_PROBE_ALLEN_KEY - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 50 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false // DELTA does not invert -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 // deltas always home to max -#define Y_HOME_DIR 1 -#define Z_HOME_DIR 1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Z_MIN_POS 0 -#define X_MAX_POS DELTA_PRINTABLE_RADIUS -#define Y_MAX_POS DELTA_PRINTABLE_RADIUS -#define Z_MAX_POS MANUAL_Z_HOME_POS - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode. - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // Set the rectangle in which to probe - #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) - #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Non-linear bed leveling will be used. - // Compensate by interpolating between the nearest four Z probe values for each point. - // Useful for deltas where the print surface may appear like a bowl or dome shape. - // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher. - #define AUTO_BED_LEVELING_GRID_POINTS 9 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 250 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - - -// Delta only homes to Z -#define HOMING_FEEDRATE_Z (200*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings -// delta speeds must be the same on xyz -#define DEFAULT_AXIS_STEPS_PER_UNIT {80, 80, 80, 760*1.1} // default steps per unit for Kossel (GT2, 20 tooth) -#define DEFAULT_MAX_FEEDRATE {500, 500, 500, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) Must be same as XY for delta -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h deleted file mode 100644 index 7ec5948..0000000 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ /dev/null @@ -1,800 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis -#define HOMING_BUMP_DIVISOR {10, 10, 10} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE_XYZ 50*60 - #define MANUAL_FEEDRATE { MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, 60 } // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h deleted file mode 100644 index fde86a5..0000000 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ /dev/null @@ -1,1417 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Example configuration file for OpenBeam Kossel Pro - * tested on 2015-05-19 by @Wackerbarth - * using Arduino 1.6.5 (Mac) - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 115200 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_BRAINWAVE_PRO -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Kossel Pro" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 5 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX 125 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // Kossel Pro - #define DEFAULT_Kp 19.30 - #define DEFAULT_Ki 3.51 - #define DEFAULT_Kd 26.56 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //Kossel Pro heated bed plate with borosilicate glass - //from pidautotune (M303 E-1 S60 C8) - #define DEFAULT_bedKp 370.25 - #define DEFAULT_bedKi 62.77 - #define DEFAULT_bedKd 545.98 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -//=========================================================================== -//============================== Delta Settings ============================= -//=========================================================================== -// Enable DELTA kinematics and most of the default configuration for Deltas -#define DELTA - -#if ENABLED(DELTA) - - // Make delta curves from many straight lines (linear interpolation). - // This is a trade-off between visible corners (not enough segments) - // and processor overload (too many expensive sqrt calls). - #define DELTA_SEGMENTS_PER_SECOND 160 - - // NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - - // Center-to-center distance of the holes in the diagonal push rods. - #define DELTA_DIAGONAL_ROD 301.0 // mm - - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 212.357 // mm - - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 30.0 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 30.0 // mm - - // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET)) - - // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). - #define DELTA_PRINTABLE_RADIUS 127.0 - - // Delta calibration menu - // uncomment to add three points calibration menu option. - // See http://minow.blogspot.com/index.html#4918805519571907051 - // If needed, adjust the X, Y, Z calibration coordinates - // in ultralcd.cpp@lcd_delta_calibrate_menu() - //#define DELTA_CALIBRATION_MENU - -#endif - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG // a Z probe -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -23 // KosselPro actual: -22.919 -#define Y_PROBE_OFFSET_FROM_EXTRUDER -6 // KosselPro actual: -6.304 -// Kossel Pro note: The correct value is likely -17.45 but I'd rather err on the side of -// not giving someone a head crash. Use something like G29 Z-0.2 to adjust as needed. -#define Z_PROBE_OFFSET_FROM_EXTRUDER -17.25 // Increase this if the first layer is too thin (remember: it's a negative number so increase means closer to zero). - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe -// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. -#define Z_PROBE_ALLEN_KEY - -#if ENABLED(Z_PROBE_ALLEN_KEY) - // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29, - // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe. - - // Kossel Pro - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X -105.00 // Move left but not quite so far that we'll bump the belt - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y 0.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0 - #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_X -110.00 // Move outward to position deploy pin to the left of the arm - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y -125.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z Z_PROBE_ALLEN_KEY_DEPLOY_1_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X 45.00 // Move right to trigger deploy pin - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y -125.00 - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - #define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE (XY_PROBE_SPEED)/2 - - #define Z_PROBE_ALLEN_KEY_STOW_1_X 36.00 // Line up with bed retaining clip - #define Z_PROBE_ALLEN_KEY_STOW_1_Y -125.00 - #define Z_PROBE_ALLEN_KEY_STOW_1_Z 75.0 - #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_2_X Z_PROBE_ALLEN_KEY_STOW_1_X // move down to retract probe - #define Z_PROBE_ALLEN_KEY_STOW_2_Y Z_PROBE_ALLEN_KEY_STOW_1_Y - #define Z_PROBE_ALLEN_KEY_STOW_2_Z 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/2 - - #define Z_PROBE_ALLEN_KEY_STOW_3_X 0.0 // return to 0,0,100 - #define Z_PROBE_ALLEN_KEY_STOW_3_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_Z 100.0 - #define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED - - #define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0 - #define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z - #define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED - -#endif // Z_PROBE_ALLEN_KEY - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 100 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -15 -#define Z_PROBE_OFFSET_RANGE_MAX 5 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR true -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 // deltas always home to max -#define Y_HOME_DIR 1 -#define Z_HOME_DIR 1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Z_MIN_POS 0 -#define X_MAX_POS DELTA_PRINTABLE_RADIUS -#define Y_MAX_POS DELTA_PRINTABLE_RADIUS -#define Z_MAX_POS MANUAL_Z_HOME_POS - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode. - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // Set the rectangle in which to probe - #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS-25) - #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Non-linear bed leveling will be used. - // Compensate by interpolating between the nearest four Z probe values for each point. - // Useful for deltas where the print surface may appear like a bowl or dome shape. - // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher. - #define AUTO_BED_LEVELING_GRID_POINTS 7 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 277 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - - -// Delta only homes to Z -#define HOMING_FEEDRATE_Z (200*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -#define XYZ_FULL_STEPS_PER_ROTATION 200 -#define XYZ_MICROSTEPS 32 -#define XYZ_BELT_PITCH 2 -#define XYZ_PULLEY_TEETH 20 -#define XYZ_STEPS ((XYZ_FULL_STEPS_PER_ROTATION) * (XYZ_MICROSTEPS) / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) - -// default settings -// delta speeds must be the same on xyz -#define DEFAULT_AXIS_STEPS_PER_UNIT {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8} -#define DEFAULT_MAX_FEEDRATE {200, 200, 200, 200} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,9000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) Must be same as XY for delta -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h deleted file mode 100644 index 8114779..0000000 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ /dev/null @@ -1,805 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -// Example configuration file for OpenBeam Kossel Pro -// tested on 2015-05-19 by @Wackerbarth -// using Arduino 1.6.5 (Mac) - - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 5 // deltas need the same for all three axis -#define HOMING_BUMP_DIVISOR {10, 10, 10} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE_XYZ 50*60 - #define MANUAL_FEEDRATE { MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, 60 } // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/README.md b/Marlin/example_configurations/delta/kossel_pro/README.md deleted file mode 100644 index 37b5ccf..0000000 --- a/Marlin/example_configurations/delta/kossel_pro/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Example Configuration for OpenBeam Kossel Pro [BRAINWAVE_PRO](http://www.openbeamusa.com/3d-printers/kossel/) -* Configuration files for the **Openbeam Kossel Pro** as delivered in their KickStarter distribution - -I [@Wackerbarth](https://github.com/Wackerbarth) tested this version on my Kossel Pro and Arduino 1.6.5 for Mac. -This configuration is a transition to merge Terence Tam's configuration with up-to-date Marlin source and a current Arduino IDE diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h deleted file mode 100644 index 0cfd4e4..0000000 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ /dev/null @@ -1,1420 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(oxivanisher)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -#define CUSTOM_MACHINE_NAME "Kossel k800XL" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 2 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 5 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // oXis Kossel k800 XL - #define DEFAULT_Kp 22.04 - #define DEFAULT_Ki 1.65 - #define DEFAULT_Kd 73.67 - - // Kossel k800 XL - //#define DEFAULT_Kp 22.25 - //#define DEFAULT_Ki 1.45 - //#define DEFAULT_Kd 85.30 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 15.00 - #define DEFAULT_bedKi .04 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -//=========================================================================== -//============================== Delta Settings ============================= -//=========================================================================== -// Enable DELTA kinematics and most of the default configuration for Deltas -#define DELTA - -#if ENABLED(DELTA) - - // Make delta curves from many straight lines (linear interpolation). - // This is a trade-off between visible corners (not enough segments) - // and processor overload (too many expensive sqrt calls). - #define DELTA_SEGMENTS_PER_SECOND 160 - - // NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them - - // Center-to-center distance of the holes in the diagonal push rods. - #define DELTA_DIAGONAL_ROD 317.3 + 2.5 // mm - - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 220.1 // mm - - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 24.0 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 22.0 // mm - - // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-(DELTA_EFFECTOR_OFFSET)-(DELTA_CARRIAGE_OFFSET) + 1) - - // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). - #define DELTA_PRINTABLE_RADIUS 140.0 - - // Delta calibration menu - // uncomment to add three points calibration menu option. - // See http://minow.blogspot.com/index.html#4918805519571907051 - // If needed, adjust the X, Y, Z calibration coordinates - // in ultralcd.cpp@lcd_delta_calibrate_menu() - //#define DELTA_CALIBRATION_MENU - -#endif - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -//#define USE_XMIN_PLUG -//#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG // a Z probe -#define USE_XMAX_PLUG -#define USE_YMAX_PLUG -#define USE_ZMAX_PLUG - -// coarse Endstop Settings -//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - #define ENDSTOPPULLUP_XMAX - #define ENDSTOPPULLUP_YMAX - #define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - #define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER 0.0 // Z probe to nozzle X offset: -left +right -#define Y_PROBE_OFFSET_FROM_EXTRUDER 0.0 // Z probe to nozzle Y offset: -front +behind -#define Z_PROBE_OFFSET_FROM_EXTRUDER 0.3 // Z probe to nozzle Z offset: -below (always!) - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// Allen key retractable z-probe as seen on many Kossel delta printers - http://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe -// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. -//#define Z_PROBE_ALLEN_KEY - -#if ENABLED(Z_PROBE_ALLEN_KEY) - // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29, - // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe. - - //#define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS - //#define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_SPEED - - //#define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS - //#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10 - - //#define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 - //#define Z_PROBE_ALLEN_KEY_DEPLOY_3_Z Z_PROBE_ALLEN_KEY_DEPLOY_2_Z - //#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_SPEED - - //#define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0 // Move the probe into position - //#define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0 - //#define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0 - //#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_PROBE_SPEED - - //#define Z_PROBE_ALLEN_KEY_STOW_2_X -64.0 // Push it down - //#define Z_PROBE_ALLEN_KEY_STOW_2_Y 56.0 - //#define Z_PROBE_ALLEN_KEY_STOW_2_Z 3.0 - //#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_PROBE_SPEED)/10 - - //#define Z_PROBE_ALLEN_KEY_STOW_3_X -64.0 // Move it up to clear - //#define Z_PROBE_ALLEN_KEY_STOW_3_Y 56.0 - //#define Z_PROBE_ALLEN_KEY_STOW_3_Z 50.0 - //#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE XY_PROBE_SPEED - - //#define Z_PROBE_ALLEN_KEY_STOW_4_X 0.0 - //#define Z_PROBE_ALLEN_KEY_STOW_4_Y 0.0 - //#define Z_PROBE_ALLEN_KEY_STOW_4_Z Z_PROBE_ALLEN_KEY_STOW_3_Z - //#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE XY_PROBE_SPEED - -#endif // Z_PROBE_ALLEN_KEY - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 20 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 10 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false // DELTA does not invert -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR 1 // deltas always home to max -#define Y_HOME_DIR 1 -#define Z_HOME_DIR 1 - -#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) -#define Z_MIN_POS 0 -#define X_MAX_POS DELTA_PRINTABLE_RADIUS -#define Y_MAX_POS DELTA_PRINTABLE_RADIUS -#define Z_MAX_POS MANUAL_Z_HOME_POS - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID // Deltas only support grid mode. - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - // Set the rectangle in which to probe - #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10) - #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS) - #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - #define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20) - #define BACK_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS - 40 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Non-linear bed leveling will be used. - // Compensate by interpolating between the nearest four Z probe values for each point. - // Useful for deltas where the print surface may appear like a bowl or dome shape. - // Works best with AUTO_BED_LEVELING_GRID_POINTS 5 or higher. - #define AUTO_BED_LEVELING_GRID_POINTS 5 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -#define MANUAL_Z_HOME_POS 381.4 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Delta only homes to Z -#define HOMING_FEEDRATE_Z (60*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// variables to calculate steps -#define XYZ_FULL_STEPS_PER_ROTATION 200 -#define XYZ_MICROSTEPS 16 -#define XYZ_BELT_PITCH 2 -#define XYZ_PULLEY_TEETH 16 - -// delta speeds must be the same on xyz -#define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH)) - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158} // default steps per unit for PowerWasp -#define DEFAULT_MAX_FEEDRATE {200, 200, 200, 25} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {9000,9000,9000,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 2000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 20.0 // (mm/sec) -#define DEFAULT_EJERK 20.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h deleted file mode 100644 index 2a7399b..0000000 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ /dev/null @@ -1,801 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 2 -#define Y_HOME_BUMP_MM 2 -#define Z_HOME_BUMP_MM 2 // deltas need the same for all three axis -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 120 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE_XYZ 50*60 - #define MANUAL_FEEDRATE { MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, MANUAL_FEEDRATE_XYZ, 60 } // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -// (don't use SLOWDOWN with DELTA because DELTA generates hundreds of segments per second) -//#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_xl/README.md b/Marlin/example_configurations/delta/kossel_xl/README.md deleted file mode 100644 index 1cabcdb..0000000 --- a/Marlin/example_configurations/delta/kossel_xl/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Configuration for Kossel k800 XL -This example configuration is for a Kossel XL with a printable bed diameter of 280mm and a height of 380mm. It also has the auto bed leveling probe (with an endstop switch) and the heated bed activated. - -## Configuration -You might need (or want) to edit at least the following settings in `Configuration.h`: -* `MANUAL_Z_HOME_POS` - The available height of your printing space. Auto Bed Leveling makes it less important to have the exact value. -* `DELTA_PRINTABLE_RADIUS` - The printable radius is how far from the center the nozzle can reach. -* `DEFAULT_AXIS_STEPS_PER_UNIT` - Steps-per-millimeter for the delta steppers, and for the extruder [to optimize the amount of filament flow](http://zennmaster.com/makingstuff/reprap-101-calibrating-your-extruder-part-1-e-steps). - -### Fine tuning -* Increase `DELTA_RADIUS` if the model comes out convex (with a bulge in the middle) -* Increase `DELTA_DIAGONAL_ROD` if the model comes out larger than expected - -### [http://reprap.org/wiki/PID_Tuning](PID Tuning) -* `DEFAULT_Kp` - The proportional term -* `DEFAULT_Ki` - The integral term -* `DEFAULT_Kd` - The derivative term - -### PSU Options -* The power supply is configured to 2 (to use a relay to switch 12V on and off) -* It is configured to be off by default diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h deleted file mode 100644 index d1ef7d3..0000000 --- a/Marlin/example_configurations/makibox/Configuration.h +++ /dev/null @@ -1,1330 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_5DPRINT -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 1 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 12 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // Ultimaker - #define DEFAULT_Kp 22.2 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114 - - // MakerGear - //#define DEFAULT_Kp 7.0 - //#define DEFAULT_Ki 0.1 - //#define DEFAULT_Kd 12 - - // Mendel Parts V9 on 12V - //#define DEFAULT_Kp 63.0 - //#define DEFAULT_Ki 2.25 - //#define DEFAULT_Kd 440 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 175 // limits duty cycle to bed; 255=full current -// This limit is set to 175 by default in the Makibox configuration and it can adjusted -// to increase the heat up rate. However, if changed, user must be aware of the safety concerns -// of drawing too much current from the power supply. - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -//#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR false - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 110 -#define Y_MAX_POS 150 -#define Z_MAX_POS 86 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY 1500 -#define HOMING_FEEDRATE_Z (2*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -#define DEFAULT_AXIS_STEPS_PER_UNIT {400, 400, 400, 163} // default steps per unit for ***** MakiBox A6 ***** -#define DEFAULT_MAX_FEEDRATE {60, 60, 20, 45} // (mm/sec) -#define DEFAULT_MAX_ACCELERATION {2000,2000,30,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h deleted file mode 100644 index 22cefd5..0000000 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 2 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 4 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.7, 1.7, 1.7, 1.7} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - //#define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h deleted file mode 100644 index 7a307cc..0000000 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ /dev/null @@ -1,1321 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration.h - * - * Basic settings such as: - * - * - Type of electronics - * - Type of temperature sensor - * - Printer geometry - * - Endstop configuration - * - LCD controller - * - Extra features - * - * Advanced settings can be found in Configuration_adv.h - * - */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_H_VERSION 010100 - -//=========================================================================== -//============================= Getting Started ============================= -//=========================================================================== - -/** - * Here are some standard links for getting your machine calibrated: - * - * http://reprap.org/wiki/Calibration - * http://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * http://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * http://www.thingiverse.com/thing:298812 - */ - -//=========================================================================== -//============================= DELTA Printer =============================== -//=========================================================================== -// For a Delta printer replace the configuration files with the files in the -// example_configurations/delta directory. -// - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a Scara printer replace the configuration files with the files in the -// example_configurations/SCARA directory. -// - -// @section info - -// User-specified version info of this build to display in [Pronterface, etc] terminal window during -// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this -// build by the user have been successfully uploaded into firmware. -#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. -#define SHOW_BOOTSCREEN -#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during boot in line 1 -#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during boot in line 2 - -// -// *** VENDORS PLEASE READ ***************************************************** -// -// Marlin now allow you to have a vendor boot image to be displayed on machine -// start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your -// custom boot image and them the default Marlin boot image is shown. -// -// We suggest for you to take advantage of this new feature and keep the Marlin -// boot image unmodified. For an example have a look at the bq Hephestos 2 -// example configuration folder. -// -//#define SHOW_CUSTOM_BOOTSCREEN -// @section machine - -// SERIAL_PORT selects which serial port should be used for communication with the host. -// This allows the connection of wireless adapters (for instance) to non-default port pins. -// Serial port 0 is still used by the Arduino bootloader regardless of this setting. -// :[0,1,2,3,4,5,6,7] -#define SERIAL_PORT 0 - -// This determines the communication speed of the printer -// :[2400,9600,19200,38400,57600,115200,250000] -#define BAUDRATE 250000 - -// Enable the Bluetooth serial interface on AT90USB devices -//#define BLUETOOTH - -// The following define selects which electronics board you have. -// Please choose the name from boards.h that matches your setup -#ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_OMCA -#endif - -// Optional custom name for your RepStrap or other custom machine -// Displayed in the LCD "Ready" message -//#define CUSTOM_MACHINE_NAME "3D Printer" - -// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) -// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) -//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" - -// This defines the number of extruders -// :[1,2,3,4] -#define EXTRUDERS 1 - -// For Cyclops or any "multi-extruder" that shares a single nozzle. -//#define SINGLENOZZLE - -// A dual extruder that uses a single stepper motor -// Don't forget to set SSDE_SERVO_ANGLES and HOTEND_OFFSET_X/Y/Z -//#define SWITCHING_EXTRUDER -#if ENABLED(SWITCHING_EXTRUDER) - #define SWITCHING_EXTRUDER_SERVO_NR 0 - #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 - //#define HOTEND_OFFSET_Z {0.0, 0.0} -#endif - -/** - * "Mixing Extruder" - * - Adds a new code, M165, to set the current mix factors. - * - Extends the stepping routines to move multiple steppers in proportion to the mix. - * - Optional support for Repetier Host M163, M164, and virtual extruder. - * - This implementation supports only a single extruder. - * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation - */ -//#define MIXING_EXTRUDER -#if ENABLED(MIXING_EXTRUDER) - #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder - #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 - //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands -#endif - -// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). -// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). -// For the other hotends it is their distance from the extruder 0 hotend. -//#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis -//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis - -//// The following define selects which power supply you have. Please choose the one that matches your setup -// 1 = ATX -// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) -// :{1:'ATX',2:'X-Box 360'} -#define POWER_SUPPLY 1 - -// Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it. -//#define PS_DEFAULT_OFF - -// @section temperature - -//=========================================================================== -//============================= Thermal Settings ============================ -//=========================================================================== -// -//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table -// -//// Temperature sensor settings: -// -3 is thermocouple with MAX31855 (only for sensor 0) -// -2 is thermocouple with MAX6675 (only for sensor 0) -// -1 is thermocouple with AD595 -// 0 is not used -// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup) -// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) -// 3 is Mendel-parts thermistor (4.7k pullup) -// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! -// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup) -// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) -// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) -// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) -// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -// 10 is 100k RS thermistor 198-961 (4.7k pullup) -// 11 is 100k beta 3950 1% thermistor (4.7k pullup) -// 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -// 13 is 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" -// 20 is the PT100 circuit found in the Ultimainboard V2.x -// 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 -// 66 is 4.7M High Temperature thermistor from Dyze Design -// 70 is the 100K thermistor found in the bq Hephestos 2 -// -// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k -// (but gives greater accuracy and more stable PID) -// 51 is 100k thermistor - EPCOS (1k pullup) -// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup) -// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) -// -// 1047 is Pt1000 with 4k7 pullup -// 1010 is Pt1000 with 1k pullup (non standard) -// 147 is Pt100 with 4k7 pullup -// 110 is Pt100 with 1k pullup (non standard) -// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. -// Use it for Testing or Development purposes. NEVER for production machine. -//#define DUMMY_THERMISTOR_998_VALUE 25 -//#define DUMMY_THERMISTOR_999_VALUE 100 -// :{ '0': "Not used",'1':"100k / 4.7k - EPCOS",'2':"200k / 4.7k - ATC Semitec 204GT-2",'3':"Mendel-parts / 4.7k",'4':"10k !! do not use for a hotend. Bad resolution at high temp. !!",'5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'6':"100k / 4.7k EPCOS - Not as accurate as Table 1",'7':"100k / 4.7k Honeywell 135-104LAG-J01",'8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT",'9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1",'10':"100k / 4.7k RS 198-961",'11':"100k / 4.7k beta 3950 1%",'12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)",'13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'",'20':"PT100 (Ultimainboard V2.x)",'51':"100k / 1k - EPCOS",'52':"200k / 1k - ATC Semitec 204GT-2",'55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)",'60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950",'66':"Dyze Design 4.7M High Temperature thermistor",'70':"the 100K thermistor found in the bq Hephestos 2",'71':"100k / 4.7k Honeywell 135-104LAF-J01",'147':"Pt100 / 4.7k",'1047':"Pt1000 / 4.7k",'110':"Pt100 / 1k (non-standard)",'1010':"Pt1000 / 1k (non standard)",'-3':"Thermocouple + MAX31855 (only for sensor 0)",'-2':"Thermocouple + MAX6675 (only for sensor 0)",'-1':"Thermocouple + AD595",'998':"Dummy 1",'999':"Dummy 2" } -#define TEMP_SENSOR_0 5 -#define TEMP_SENSOR_1 0 -#define TEMP_SENSOR_2 0 -#define TEMP_SENSOR_3 0 -#define TEMP_SENSOR_BED 5 - -// This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 - -// Extruder temperature must be close to target for this long before M109 returns success -#define TEMP_RESIDENCY_TIME 10 // (seconds) -#define TEMP_HYSTERESIS 3 // (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. - -// Bed temperature must be close to target for this long before M190 returns success -#define TEMP_BED_RESIDENCY_TIME 0 // (seconds) -#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one -#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early. - -// The minimal temperature defines the temperature below which the heater will not be enabled It is used -// to check that the wiring to the thermistor is not broken. -// Otherwise this would lead to the heater being powered on all the time. -#define HEATER_0_MINTEMP 5 -#define HEATER_1_MINTEMP 5 -#define HEATER_2_MINTEMP 5 -#define HEATER_3_MINTEMP 5 -#define BED_MINTEMP 5 - -// When temperature exceeds max temp, your heater will be switched off. -// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! -// You should use MINTEMP for thermistor short/failure protection. -#define HEATER_0_MAXTEMP 275 -#define HEATER_1_MAXTEMP 275 -#define HEATER_2_MAXTEMP 275 -#define HEATER_3_MAXTEMP 275 -#define BED_MAXTEMP 150 - -//=========================================================================== -//============================= PID Settings ================================ -//=========================================================================== -// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning - -// Comment the following line to disable PID and enable bang-bang. -#define PIDTEMP -#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current -#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current -#if ENABLED(PIDTEMP) - //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result. - //#define PID_DEBUG // Sends debug data to the serial port. - //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX - //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) - // Set/get with gcode: M301 E[extruder number, 0-2] - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature - // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term - #define K1 0.95 //smoothing factor within the PID - - // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it - // J-Head Mk V-B - #define DEFAULT_Kp 25.05 - #define DEFAULT_Ki 2.30 - #define DEFAULT_Kd 68.15 - -#endif // PIDTEMP - -//=========================================================================== -//============================= PID > Bed Temperature Control =============== -//=========================================================================== -// Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis -// -// Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder. -// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz, -// which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating. -// This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. -// If your configuration is significantly different than this and you don't understand the issues involved, you probably -// shouldn't use bed PID until someone else verifies your hardware works. -// If this is enabled, find your own PID constants below. -//#define PIDTEMPBED - -//#define BED_LIMIT_SWITCHING - -// This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option. -// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) -// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did, -// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) -#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current - -#if ENABLED(PIDTEMPBED) - - //#define PID_BED_DEBUG // Sends debug data to the serial port. - - #define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER //limit for the integral term - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 - - //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) - //from pidautotune - //#define DEFAULT_bedKp 97.1 - //#define DEFAULT_bedKi 1.41 - //#define DEFAULT_bedKd 1675.16 - - // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. -#endif // PIDTEMPBED - -// @section extruder - -//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit -//can be software-disabled for whatever purposes by -#define PREVENT_DANGEROUS_EXTRUDE -//if PREVENT_DANGEROUS_EXTRUDE is on, you can still disable (uncomment) very long bits of extrusion separately. -#define PREVENT_LENGTHY_EXTRUDE - -#define EXTRUDE_MINTEMP 170 -#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. - -//=========================================================================== -//======================== Thermal Runaway Protection ======================= -//=========================================================================== - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * If you get "Thermal Runaway" or "Heating failed" errors the - * details can be tuned in Configuration_adv.h - */ - -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed - -//=========================================================================== -//============================= Mechanical Settings ========================= -//=========================================================================== - -// @section machine - -// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics -//#define COREXY -//#define COREXZ -//#define COREYZ - -// Enable this option for Toshiba steppers -#define CONFIG_STEPPERS_TOSHIBA - -//=========================================================================== -//============================== Endstop Settings =========================== -//=========================================================================== - -// @section homing - -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG - -// coarse Endstop Settings -#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors - -#if DISABLED(ENDSTOPPULLUPS) - // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX - //#define ENDSTOPPULLUP_XMIN - //#define ENDSTOPPULLUP_YMIN - //#define ENDSTOPPULLUP_ZMIN - //#define ENDSTOPPULLUP_ZMIN_PROBE -#endif - -// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. - -//=========================================================================== -//============================= Z Probe Options ============================= -//=========================================================================== - -// -// Probe Type -// Probes are sensors/switches that are activated / deactivated before/after use. -// -// Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. -// You must activate one of these to use AUTO_BED_LEVELING_FEATURE below. -// -// Use M851 to set the Z probe vertical offset from the nozzle. Store with M500. -// - -// A Fix-Mounted Probe either doesn't deploy or needs manual deployment. -// For example an inductive probe, or a setup that uses the nozzle to probe. -// An inductive probe must be deactivated to go below -// its trigger-point if hardware endstops are active. -//#define FIX_MOUNTED_PROBE - -// The BLTouch probe emulates a servo probe. -//#define BLTOUCH - -// Z Servo Probe, such as an endstop switch on a rotating arm. -//#define Z_ENDSTOP_SERVO_NR 0 -//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles - -// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. -//#define Z_PROBE_SLED -//#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. - -// Z Probe to nozzle (X,Y) offset, relative to (0, 0). -// X and Y offsets must be integers. -// -// In the following example the X and Y offsets are both positive: -// #define X_PROBE_OFFSET_FROM_EXTRUDER 10 -// #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 -// -// +-- BACK ---+ -// | | -// L | (+) P | R <-- probe (20,20) -// E | | I -// F | (-) N (+) | G <-- nozzle (10,10) -// T | | H -// | (-) | T -// | | -// O-- FRONT --+ -// (0,0) -#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // X offset: -left +right [of the nozzle] -#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Y offset: -front +behind [the nozzle] -#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // Z offset: -below +above [the nozzle] - -// X and Y axis travel speed (mm/m) between probes -#define XY_PROBE_SPEED 8000 -// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH) -#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z -// Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) -// Use double touch for probing -//#define PROBE_DOUBLE_TOUCH - -// -// Allen Key Probe is defined in the Delta example configurations. -// - -// Enable Z_MIN_PROBE_ENDSTOP to use _both_ a Z Probe and a Z-min-endstop on the same machine. -// With this option the Z_MIN_PROBE_PIN will only be used for probing, never for homing. -// -// *** PLEASE READ ALL INSTRUCTIONS BELOW FOR SAFETY! *** -// -// To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING. -// Example: To park the head outside the bed area when homing with G28. -// -// To use a separate Z probe, your board must define a Z_MIN_PROBE_PIN. -// -// For a servo-based Z probe, you must set up servo support below, including -// NUM_SERVOS, Z_ENDSTOP_SERVO_NR and Z_SERVO_ANGLES. -// -// - RAMPS 1.3/1.4 boards may be able to use the 5V, GND, and Aux4->D32 pin. -// - Use 5V for powered (usu. inductive) sensors. -// - Otherwise connect: -// - normally-closed switches to GND and D32. -// - normally-open switches to 5V and D32. -// -// Normally-closed switches are advised and are the default. -// -// The Z_MIN_PROBE_PIN sets the Arduino pin to use. (See your board's pins file.) -// Since the RAMPS Aux4->D32 pin maps directly to the Arduino D32 pin, D32 is the -// default pin for all RAMPS-based boards. Some other boards map differently. -// To set or change the pin for your board, edit the appropriate pins_XXXXX.h file. -// -// WARNING: -// Setting the wrong pin may have unexpected and potentially disastrous consequences. -// Use with caution and do your homework. -// -//#define Z_MIN_PROBE_ENDSTOP - -// Enable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use the Z_MIN_PIN for your Z_MIN_PROBE. -// The Z_MIN_PIN will then be used for both Z-homing and probing. -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - -// To use a probe you must enable one of the two options above! - -// This option disables the use of the Z_MIN_PROBE_PIN -// To enable the Z probe pin but disable its use, uncomment the line below. This only affects a -// Z probe switch if you have a separate Z min endstop also and have activated Z_MIN_PROBE_ENDSTOP above. -// If you're using the Z MIN endstop connector for your Z probe, this has no effect. -//#define DISABLE_Z_MIN_PROBE_ENDSTOP - -// Enable Z Probe Repeatability test to see how accurate your probe is -//#define Z_MIN_PROBE_REPEATABILITY_TEST - -// -// Probe Raise options provide clearance for the probe to deploy, stow, and travel. -// -#define Z_PROBE_DEPLOY_HEIGHT 15 // Raise to make room for the probe to deploy / stow -#define Z_PROBE_TRAVEL_HEIGHT 5 // Raise between probing points. - -// -// For M851 give a range for adjusting the Z probe offset -// -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 - -// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{0:'Low',1:'High'} -#define X_ENABLE_ON 1 -#define Y_ENABLE_ON 1 -#define Z_ENABLE_ON 1 -#define E_ENABLE_ON 1 // For all extruders - -// Disables axis stepper immediately when it's not being used. -// WARNING: When motors turn off there is a chance of losing position accuracy! -#define DISABLE_X false -#define DISABLE_Y false -#define DISABLE_Z false -// Warn on display about possibly reduced accuracy -//#define DISABLE_REDUCED_ACCURACY_WARNING - -// @section extruder - -#define DISABLE_E false // For all extruders -#define DISABLE_INACTIVE_EXTRUDER true //disable only inactive extruders and keep active extruder enabled - -// @section machine - -// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR false -#define INVERT_Z_DIR true - -// @section extruder - -// For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false -#define INVERT_E1_DIR false -#define INVERT_E2_DIR false -#define INVERT_E3_DIR false - -// @section homing - -//#define Z_HOMING_HEIGHT 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ... - // Be sure you have this distance over your Z_MAX_POS in case. - -// ENDSTOP SETTINGS: -// Sets direction of endstops when homing; 1=MAX, -1=MIN -// :[-1,1] -#define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 - -#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS. -#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below. - -// @section machine - -// Travel limits after homing (units are in mm) -#define X_MIN_POS 0 -#define Y_MIN_POS 0 -#define Z_MIN_POS 0 -#define X_MAX_POS 205 -#define Y_MAX_POS 205 -#define Z_MAX_POS 120 - -//=========================================================================== -//========================= Filament Runout Sensor ========================== -//=========================================================================== -//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament - // In RAMPS uses servo pin 2. Can be changed in pins file. For other boards pin definition should be made. - // It is assumed that when logic high = filament available - // when logic low = filament ran out -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - const bool FIL_RUNOUT_INVERTING = false; // set to true to invert the logic of the sensor. - #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. - #define FILAMENT_RUNOUT_SCRIPT "M600" -#endif - -//=========================================================================== -//============================ Mesh Bed Leveling ============================ -//=========================================================================== - -//#define MESH_BED_LEVELING // Enable mesh bed leveling. - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_INSET 10 // Mesh inset margin on print area - #define MESH_NUM_X_POINTS 3 // Don't use more than 7 points per axis, implementation limited. - #define MESH_NUM_Y_POINTS 3 - #define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0. - - //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0] - - //#define MANUAL_BED_LEVELING // Add display menu option for bed leveling. - - #if ENABLED(MANUAL_BED_LEVELING) - #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis. - #endif // MANUAL_BED_LEVELING - -#endif // MESH_BED_LEVELING - -//=========================================================================== -//============================ Bed Auto Leveling ============================ -//=========================================================================== - -// @section bedlevel - -//#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line) - -// Enable this feature to get detailed logging of G28, G29, M48, etc. -// Logging is off by default. Enable this logging feature with 'M111 S32'. -// NOTE: Requires a huge amount of PROGMEM. -//#define DEBUG_LEVELING_FEATURE - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - - // There are 2 different ways to specify probing locations: - // - // - "grid" mode - // Probe several points in a rectangular grid. - // You specify the rectangle and the density of sample points. - // This mode is preferred because there are more measurements. - // - // - "3-point" mode - // Probe 3 arbitrary points on the bed (that aren't collinear) - // You specify the XY coordinates of all 3 points. - - // Enable this to sample the bed in a grid (least squares solution). - // Note: this feature generates 10KB extra code size. - #define AUTO_BED_LEVELING_GRID - - #if ENABLED(AUTO_BED_LEVELING_GRID) - - #define LEFT_PROBE_BED_POSITION 15 - #define RIGHT_PROBE_BED_POSITION 170 - #define FRONT_PROBE_BED_POSITION 20 - #define BACK_PROBE_BED_POSITION 170 - - #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this. - - // Set the number of grid points per dimension. - // You probably don't need more than 3 (squared=9). - #define AUTO_BED_LEVELING_GRID_POINTS 2 - - #else // !AUTO_BED_LEVELING_GRID - - // Arbitrary points to probe. - // A simple cross-product is used to estimate the plane of the 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 - - //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine. - // Useful to retract a deployable Z probe. - - // If you've enabled AUTO_BED_LEVELING_FEATURE and are using the Z Probe for Z Homing, - // it is highly recommended you also enable Z_SAFE_HOMING below! - -#endif // AUTO_BED_LEVELING_FEATURE - - -// @section homing - -// The center of the bed is at (X=0, Y=0) -//#define BED_CENTER_AT_0_0 - -// Manually set the home position. Leave these undefined for automatic settings. -// For DELTA this is the top-center of the Cartesian print volume. -//#define MANUAL_X_HOME_POS 0 -//#define MANUAL_Y_HOME_POS 0 -//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing - -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). -// - Prevent Z homing when the Z probe is outside bed area. -//#define Z_SAFE_HOMING - -#if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). -#endif - -// Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) -#define HOMING_FEEDRATE_Z (4*60) - -// -// MOVEMENT SETTINGS -// @section motion -// - -// default settings - -//#define DEFAULT_AXIS_STEPS_PER_UNIT {79.87, 79.87, 2566, 563,78} // Al's TVRR -//#define DEFAULT_AXIS_STEPS_PER_UNIT {81.26, 80.01, 2561, 599.14} // Michel TVRR old -//#define DEFAULT_AXIS_STEPS_PER_UNIT {71.1, 71.1, 2560, 739.65} // Michel TVRR -#define DEFAULT_AXIS_STEPS_PER_UNIT {71.1, 71.1, 2560, 600} // David TVRR -#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec) David TVRR -#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot. - -/* MICHEL: This has an impact on the "ripples" in print walls */ -#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration in mm/s^2 for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts -#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - -// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously) -#define DEFAULT_XYJERK 20.0 // (mm/sec) -#define DEFAULT_ZJERK 0.4 // (mm/sec) -#define DEFAULT_EJERK 5.0 // (mm/sec) - - -//============================================================================= -//============================= Additional Features =========================== -//============================================================================= - -// @section extras - -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -//define this to enable EEPROM support -//#define EEPROM_SETTINGS - -#if ENABLED(EEPROM_SETTINGS) - // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out: - #define EEPROM_CHITCHAT // Please keep turned on if you can. -#endif - -// -// Host Keepalive -// -// When enabled Marlin will send a busy status message to the host -// every couple of seconds when it can't accept commands. -// -#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages -#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. - -// -// M100 Free Memory Watcher -// -//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose - -// -// G20/G21 Inch mode support -// -//#define INCH_MODE_SUPPORT - -// -// M149 Set temperature units support -// -//#define TEMPERATURE_UNITS_SUPPORT - -// @section temperature - -// Preheat Constants -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 - -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 100 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 - -// -// Nozzle Park -- EXPERIMENTAL -// -// When enabled allows the user to define a special XYZ position, inside the -// machine's topology, to park the nozzle when idle or when receiving the G27 -// command. -// -// The "P" paramenter controls what is the action applied to the Z axis: -// P0: (Default) If current Z-pos is lower than Z-park then the nozzle will -// be raised to reach Z-park height. -// -// P1: No matter the current Z-pos, the nozzle will be raised/lowered to -// reach Z-park height. -// -// P2: The nozzle height will be raised by Z-park amount but never going over -// the machine's limit of Z_MAX_POS. -// -//#define NOZZLE_PARK_FEATURE - -#if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } -#endif - -// -// Clean Nozzle Feature -- EXPERIMENTAL -// -// When enabled allows the user to send G12 to start the nozzle cleaning -// process, the G-Code accepts two parameters: -// "P" for pattern selection -// "S" for defining the number of strokes/repetitions -// -// Available list of patterns: -// P0: This is the default pattern, this process requires a sponge type -// material at a fixed bed location, the cleaning process is based on -// "strokes" i.e. back-and-forth movements between the starting and end -// points. -// -// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" -// defines the number of zig-zag triangles to be done. "S" defines the -// number of strokes aka one back-and-forth movement. As an example -// sending "G12 P1 S1 T3" will execute: -// -// -- -// | (X0, Y1) | /\ /\ /\ | (X1, Y1) -// | | / \ / \ / \ | -// A | | / \ / \ / \ | -// | | / \ / \ / \ | -// | (X0, Y0) | / \/ \/ \ | (X1, Y0) -// -- +--------------------------------+ -// |________|_________|_________| -// T1 T2 T3 -// -// Caveats: End point Z should use the same value as Start point Z. -// -// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments -// may change to add new functionality like different wipe patterns. -// -//#define NOZZLE_CLEAN_FEATURE - -#if ENABLED(NOZZLE_CLEAN_FEATURE) - // Number of pattern repetitions - #define NOZZLE_CLEAN_STROKES 12 - - // Specify positions as { X, Y, Z } - #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} - #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} - - // Moves the nozzle to the initial position - #define NOZZLE_CLEAN_GOBACK -#endif - -// -// Print job timer -// -// Enable this option to automatically start and stop the -// print job timer when M104/M109/M190 commands are received. -// M104 (extruder without wait) - high temp = none, low temp = stop timer -// M109 (extruder with wait) - high temp = start timer, low temp = stop timer -// M190 (bed with wait) - high temp = start timer, low temp = none -// -// In all cases the timer can be started and stopped using -// the following commands: -// -// - M75 - Start the print job timer -// - M76 - Pause the print job timer -// - M77 - Stop the print job timer -#define PRINTJOB_TIMER_AUTOSTART - -// -// Print Counter -// -// When enabled Marlin will keep track of some print statistical data such as: -// - Total print jobs -// - Total successful print jobs -// - Total failed print jobs -// - Total time printing -// -// This information can be viewed by the M78 command. -//#define PRINTCOUNTER - -//============================================================================= -//============================= LCD and SD support ============================ -//============================================================================= - -// @section lcd - -// -// LCD LANGUAGE -// -// Here you may choose the language used by Marlin on the LCD menus, the following -// list of languages are available: -// en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it, -// kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, test -// -// :{'en':'English','an':'Aragonese','bg':'Bulgarian','ca':'Catalan','cn':'Chinese','cz':'Czech','de':'German','el':'Greek','el-gr':'Greek (Greece)','es':'Spanish','eu':'Basque-Euskera','fi':'Finnish','fr':'French','gl':'Galician','hr':'Croatian','it':'Italian','kana':'Japanese','kana_utf8':'Japanese (UTF8)','nl':'Dutch','pl':'Polish','pt':'Portuguese','pt-br':'Portuguese (Brazilian)','pt-br_utf8':'Portuguese (Brazilian UTF8)','pt_utf8':'Portuguese (UTF8)','ru':'Russian','test':'TEST'} -// -//#define LCD_LANGUAGE en - -// -// LCD Character Set -// -// Note: This option is NOT applicable to Graphical Displays. -// -// All character-based LCD's provide ASCII plus one of these -// language extensions: -// -// - JAPANESE ... the most common -// - WESTERN ... with more accented characters -// - CYRILLIC ... for the Russian language -// -// To determine the language extension installed on your controller: -// -// - Compile and upload with LCD_LANGUAGE set to 'test' -// - Click the controller to view the LCD menu -// - The LCD will display Japanese, Western, or Cyrillic text -// -// See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -// :['JAPANESE','WESTERN','CYRILLIC'] -// -#define DISPLAY_CHARSET_HD44780 JAPANESE - -// -// LCD TYPE -// -// You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2, -// 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels -// (ST7565R family). (This option will be set automatically for certain displays.) -// -// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display! -// https://github.com/olikraus/U8glib_Arduino -// -//#define ULTRA_LCD // Character based -//#define DOGLCD // Full graphics display - -// -// SD CARD -// -// SD Card support is disabled by default. If your controller has an SD slot, -// you must uncomment the following option or it won't work. -// -//#define SDSUPPORT - -// -// SD CARD: SPI SPEED -// -// Uncomment ONE of the following items to use a slower SPI transfer -// speed. This is usually required if you're getting volume init errors. -// -//#define SPI_SPEED SPI_HALF_SPEED -//#define SPI_SPEED SPI_QUARTER_SPEED -//#define SPI_SPEED SPI_EIGHTH_SPEED - -// -// SD CARD: ENABLE CRC -// -// Use CRC checks and retries on the SD communication. -// -//#define SD_CHECK_AND_RETRY - -// -// ENCODER SETTINGS -// -// This option overrides the default number of encoder pulses needed to -// produce one step. Should be increased for high-resolution encoders. -// -//#define ENCODER_PULSES_PER_STEP 1 - -// -// Use this option to override the number of step signals required to -// move between next/prev menu items. -// -//#define ENCODER_STEPS_PER_MENU_ITEM 5 - -/** - * Encoder Direction Options - * - * Test your encoder's behavior first with both options disabled. - * - * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. - * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. - * Reversed Value Editing only? Enable BOTH options. - */ - -// -// This option reverses the encoder direction everywhere -// -// Set this option if CLOCKWISE causes values to DECREASE -// -//#define REVERSE_ENCODER_DIRECTION - -// -// This option reverses the encoder direction for navigating LCD menus. -// -// If CLOCKWISE normally moves DOWN this makes it go UP. -// If CLOCKWISE normally moves UP this makes it go DOWN. -// -//#define REVERSE_MENU_DIRECTION - -// -// Individual Axis Homing -// -// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. -// -//#define INDIVIDUAL_AXIS_HOMING_MENU - -// -// SPEAKER/BUZZER -// -// If you have a speaker that can produce tones, enable it here. -// By default Marlin assumes you have a buzzer with a fixed frequency. -// -//#define SPEAKER - -// -// The duration and frequency for the UI feedback sound. -// Set these to 0 to disable audio feedback in the LCD menus. -// -// Note: Test audio output with the G-Code: -// M300 S P -// -//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 -//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 - -// -// CONTROLLER TYPE: Standard -// -// Marlin supports a wide variety of controllers. -// Enable one of the following options to specify your controller. -// - -// -// ULTIMAKER Controller. -// -//#define ULTIMAKERCONTROLLER - -// -// ULTIPANEL as seen on Thingiverse. -// -//#define ULTIPANEL - -// -// Cartesio UI -// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface -// -//#define CARTESIO_UI - -// -// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) -// http://reprap.org/wiki/PanelOne -// -//#define PANEL_ONE - -// -// MaKr3d Makr-Panel with graphic controller and SD support. -// http://reprap.org/wiki/MaKr3d_MaKrPanel -// -//#define MAKRPANEL - -// -// ReprapWorld Graphical LCD -// https://reprapworld.com/?products_details&products_id/1218 -// -//#define REPRAPWORLD_GRAPHICAL_LCD - -// -// Activate one of these if you have a Panucatt Devices -// Viki 2.0 or mini Viki with Graphic LCD -// http://panucatt.com -// -//#define VIKI2 -//#define miniVIKI - -// -// Adafruit ST7565 Full Graphic Controller. -// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ -// -//#define ELB_FULL_GRAPHIC_CONTROLLER - -// -// RepRapDiscount Smart Controller. -// http://reprap.org/wiki/RepRapDiscount_Smart_Controller -// -// Note: Usually sold with a white PCB. -// -//#define REPRAP_DISCOUNT_SMART_CONTROLLER - -// -// GADGETS3D G3D LCD/SD Controller -// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel -// -// Note: Usually sold with a blue PCB. -// -//#define G3D_PANEL - -// -// RepRapDiscount FULL GRAPHIC Smart Controller -// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller -// -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER - -// -// MakerLab Mini Panel with graphic -// controller and SD support - http://reprap.org/wiki/Mini_panel -// -//#define MINIPANEL - -// -// RepRapWorld REPRAPWORLD_KEYPAD v1.1 -// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 -// -// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key -// is pressed, a value of 10.0 means 10mm per click. -// -//#define REPRAPWORLD_KEYPAD -//#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0 - -// -// RigidBot Panel V1.0 -// http://www.inventapart.com/ -// -//#define RIGIDBOT_PANEL - -// -// BQ LCD Smart Controller shipped by -// default with the BQ Hephestos 2 and Witbox 2. -// -//#define BQ_LCD_SMART_CONTROLLER - -// -// CONTROLLER TYPE: I2C -// -// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C -// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C -// - -// -// Elefu RA Board Control Panel -// http://www.elefu.com/index.php?route=product/product&product_id=53 -// -//#define RA_CONTROL_PANEL - -// -// Sainsmart YW Robot (LCM1602) LCD Display -// -//#define LCD_I2C_SAINSMART_YWROBOT - -// -// Generic LCM1602 LCD adapter -// -//#define LCM1602 - -// -// PANELOLU2 LCD with status LEDs, -// separate encoder and click inputs. -// -// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. -// For more info: https://github.com/lincomatic/LiquidTWI2 -// -// Note: The PANELOLU2 encoder click input can either be directly connected to -// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). -// -//#define LCD_I2C_PANELOLU2 - -// -// Panucatt VIKI LCD with status LEDs, -// integrated click & L/R/U/D buttons, separate encoder inputs. -// -//#define LCD_I2C_VIKI - -// -// SSD1306 OLED full graphics generic display -// -//#define U8GLIB_SSD1306 - -// -// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules -// -//#define SAV_3DGLCD -#if ENABLED(SAV_3DGLCD) - //#define U8GLIB_SSD1306 - #define U8GLIB_SH1106 -#endif - -// -// CONTROLLER TYPE: Shift register panels -// -// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH -// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD -// -//#define SAV_3DLCD - -//============================================================================= -//=============================== Extra Features ============================== -//============================================================================= - -// @section extras - -// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino -//#define FAST_PWM_FAN - -// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency -// which is not as annoying as with the hardware PWM. On the other hand, if this frequency -// is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM - -// Incrementing this by 1 will double the software PWM frequency, -// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. -// However, control resolution will be halved for each increment; -// at zero value, there are 128 effective control positions. -#define SOFT_PWM_SCALE 0 - -// Temperature status LEDs that display the hotend and bed temperature. -// If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on. -// Otherwise the RED led is on. There is 1C hysteresis. -//#define TEMP_STAT_LEDS - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -//#define PHOTOGRAPH_PIN 23 - -// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure -//#define SF_ARC_FIX - -// Support for the BariCUDA Paste Extruder. -//#define BARICUDA - -//define BlinkM/CyzRgb Support -//#define BLINKM - -/*********************************************************************\ -* R/C SERVO support -* Sponsored by TrinityLabs, Reworked by codexmas -**********************************************************************/ - -// Number of servos -// -// If you select a configuration below, this will receive a default value and does not need to be set manually -// set it manually if you have more servos than extruders and wish to manually control some -// leaving it undefined or defining as 0 will disable the servo subsystem -// If unsure, leave commented / disabled -// -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command - -// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle. -// 300ms is a good value but you can try less delay. -// If the servo can't reach the requested position, increase it. -#define SERVO_DELAY 300 - -// Servo deactivation -// -// With this option servos are powered only during movement, then turned off to prevent jitter. -//#define DEACTIVATE_SERVOS_AFTER_MOVE - -/**********************************************************************\ - * Support for a filament diameter sensor - * Also allows adjustment of diameter at print time (vs at slicing) - * Single extruder only at this point (extruder 0) - * - * Motherboards - * 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector - * 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E) - * 301 - Rambo - uses Analog input 3 - * Note may require analog pins to be defined for different motherboards - **********************************************************************/ -// Uncomment below to enable -//#define FILAMENT_WIDTH_SENSOR - -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.00 //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software. Used for sensor reading validation - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILAMENT_SENSOR_EXTRUDER_NUM 0 //The number of the extruder that has the filament sensor (0,1,2) - #define MEASUREMENT_DELAY_CM 14 //measurement delay in cm. This is the distance from filament sensor to middle of barrel - - #define MEASURED_UPPER_LIMIT 3.30 //upper limit factor used for sensor reading validation in mm - #define MEASURED_LOWER_LIMIT 1.90 //lower limit factor for sensor reading validation in mm - #define MAX_MEASUREMENT_DELAY 20 //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM and lower number saves RAM) - - #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially - - //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec. - //#define FILAMENT_LCD_DISPLAY -#endif - -#endif // CONFIGURATION_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h deleted file mode 100644 index 2ececd4..0000000 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Configuration_adv.h - * - * Advanced settings. - * Only change these if you know exactly what you're doing. - * Some of these settings can damage your printer if improperly set! - * - * Basic settings can be found in Configuration.h - * - */ -#ifndef CONFIGURATION_ADV_H -#define CONFIGURATION_ADV_H - -/** - * - * *********************************** - * ** ATTENTION TO ALL DEVELOPERS ** - * *********************************** - * - * You must increment this version number for every significant change such as, - * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option. - * - * Note: Update also Version.h ! - */ -#define CONFIGURATION_ADV_H_VERSION 010100 - -// @section temperature - -//=========================================================================== -//=============================Thermal Settings ============================ -//=========================================================================== - -#if DISABLED(PIDTEMPBED) - #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) - #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS - #endif -#endif - -/** - * Thermal Protection protects your printer from damage and fire if a - * thermistor falls out or temperature sensors fail in any way. - * - * The issue: If a thermistor falls out or a temperature sensor fails, - * Marlin can no longer sense the actual temperature. Since a disconnected - * thermistor reads as a low temperature, the firmware will keep the heater on. - * - * The solution: Once the temperature reaches the target, start observing. - * If the temperature stays too far below the target (hysteresis) for too long (period), - * the firmware will halt the machine as a safety precaution. - * - * If you get false positives for "Thermal Runaway" increase THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD - */ -#if ENABLED(THERMAL_PROTECTION_HOTENDS) - #define THERMAL_PROTECTION_PERIOD 40 // Seconds - #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius - - /** - * Whenever an M104 or M109 increases the target temperature the firmware will wait for the - * WATCH_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get false positives for "Heating failed" increase WATCH_TEMP_PERIOD and/or decrease WATCH_TEMP_INCREASE - * WATCH_TEMP_INCREASE should not be below 2. - */ - #define WATCH_TEMP_PERIOD 20 // Seconds - #define WATCH_TEMP_INCREASE 2 // Degrees Celsius -#endif - -/** - * Thermal Protection parameters for the bed are just as above for hotends. - */ -#if ENABLED(THERMAL_PROTECTION_BED) - #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds - #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius - - /** - * Whenever an M140 or M190 increases the target temperature the firmware will wait for the - * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE - * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190, - * but only if the current temperature is far enough below the target for a reliable test. - * - * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease - * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.) - */ - #define WATCH_BED_TEMP_PERIOD 60 // Seconds - #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius -#endif - -#if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. - //#define PID_EXTRUSION_SCALING - #if ENABLED(PID_EXTRUSION_SCALING) - #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) - #define LPQ_MAX_LEN 50 - #endif -#endif - -/** - * Automatic Temperature: - * The hotend target temperature is calculated by all the buffered lines of gcode. - * The maximum buffered steps/sec of the extruder motor is called "se". - * Start autotemp mode with M109 S B F - * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by - * mintemp and maxtemp. Turn this off by executing M109 without F* - * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. - * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode - */ -#define AUTOTEMP -#if ENABLED(AUTOTEMP) - #define AUTOTEMP_OLDWEIGHT 0.98 -#endif - -//Show Temperature ADC value -//The M105 command return, besides traditional information, the ADC value read from temperature sensors. -//#define SHOW_TEMP_ADC_VALUES - -/** - * High Temperature Thermistor Support - * - * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP - * will probably be caught when the heating element first turns on during the - * preheating process, which will trigger a min_temp_error as a safety measure - * and force stop everything. - * To circumvent this limitation, we allow for a preheat time (during which, - * min_temp_error won't be triggered) and add a min_temp buffer to handle - * aberrant readings. - * - * If you want to enable this feature for your hotend thermistor(s) - * uncomment and set values > 0 in the constants below - */ - -// The number of consecutive low temperature errors that can occur -// before a min_temp_error is triggered. (Shouldn't be more than 10.) -//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 - -// The number of milliseconds a hotend will preheat before starting to check -// the temperature. This value should NOT be set to the time it takes the -// hot end to reach the target temperature, but the time it takes to reach -// the minimum temperature your thermistor can read. The lower the better/safer. -// This shouldn't need to be more than 30 seconds (30000) -//#define MILLISECONDS_PREHEAT_TIME 0 - -// @section extruder - -// extruder run-out prevention. -//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded -//#define EXTRUDER_RUNOUT_PREVENT -#define EXTRUDER_RUNOUT_MINTEMP 190 -#define EXTRUDER_RUNOUT_SECONDS 30 -#define EXTRUDER_RUNOUT_ESTEPS 14 // mm filament -#define EXTRUDER_RUNOUT_SPEED 1500 // extrusion speed -#define EXTRUDER_RUNOUT_EXTRUDE 100 - -// @section temperature - -//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements. -//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET" -#define TEMP_SENSOR_AD595_OFFSET 0.0 -#define TEMP_SENSOR_AD595_GAIN 1.0 - -//This is for controlling a fan to cool down the stepper drivers -//it will turn on when any driver is enabled -//and turn off after the set amount of seconds from last driver being disabled again -#define CONTROLLERFAN_PIN 23 //Pin used for the fan to cool controller (-1 to disable) -#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run -#define CONTROLLERFAN_SPEED 255 // == full speed - -// When first starting the main fan, run it at full speed for the -// given number of milliseconds. This gets the fan spinning reliably -// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) -//#define FAN_KICKSTART_TIME 100 - -// This defines the minimal speed for the main fan, run in PWM mode -// to enable uncomment and set minimal PWM speed for reliable running (1-255) -// if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM -//#define FAN_MIN_PWM 50 - -// @section extruder - -// Extruder cooling fans -// Configure fan pin outputs to automatically turn on/off when the associated -// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE. -// Multiple extruders can be assigned to the same pin in which case -// the fan will turn on when any selected extruder is above the threshold. -#define EXTRUDER_0_AUTO_FAN_PIN -1 -#define EXTRUDER_1_AUTO_FAN_PIN -1 -#define EXTRUDER_2_AUTO_FAN_PIN -1 -#define EXTRUDER_3_AUTO_FAN_PIN -1 -#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 -#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed - -//=========================================================================== -//============================ Mechanical Settings ========================== -//=========================================================================== - -// @section homing - -// If you want endstops to stay on (by default) even when not homing -// enable this option. Override at any time with M120, M121. -//#define ENDSTOPS_ALWAYS_ON_DEFAULT - -// @section extras - -//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. - -// Dual X Steppers -// Uncomment this option to drive two X axis motors. -// The next unused E driver will be assigned to the second X stepper. -//#define X_DUAL_STEPPER_DRIVERS -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - // Set true if the two X motors need to rotate in opposite directions - #define INVERT_X2_VS_X_DIR true -#endif - - -// Dual Y Steppers -// Uncomment this option to drive two Y axis motors. -// The next unused E driver will be assigned to the second Y stepper. -//#define Y_DUAL_STEPPER_DRIVERS -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - // Set true if the two Y motors need to rotate in opposite directions - #define INVERT_Y2_VS_Y_DIR true -#endif - -// A single Z stepper driver is usually used to drive 2 stepper motors. -// Uncomment this option to use a separate stepper driver for each Z axis motor. -// The next unused E driver will be assigned to the second Z stepper. -//#define Z_DUAL_STEPPER_DRIVERS - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - - // Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers - Let's call them Z stepper and Z2 stepper. - // That way the machine is capable to align the bed during home, since both Z steppers are homed. - // There is also an implementation of M666 (software endstops adjustment) to this feature. - // After Z homing, this adjustment is applied to just one of the steppers in order to align the bed. - // One just need to home the Z axis and measure the distance difference between both Z axis and apply the math: Z adjust = Z - Z2. - // If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it is.. think about it) and the Z adjust would be positive. - // Play a little bit with small adjustments (0.5mm) and check the behaviour. - // The M119 (endstops report) will start reporting the Z2 Endstop as well. - - //#define Z_DUAL_ENDSTOPS - - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ - #endif - -#endif // Z_DUAL_STEPPER_DRIVERS - -// Enable this for dual x-carriage printers. -// A dual x-carriage design has the advantage that the inactive extruder can be parked which -// prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage -// allowing faster printing speeds. Connect your X2 stepper to the first unused E plug. -//#define DUAL_X_CARRIAGE -#if ENABLED(DUAL_X_CARRIAGE) - // Configuration for second X-carriage - // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; - // the second x-carriage always homes to the maximum endstop. - #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage - #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed - #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position - #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position - // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software - // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops - // without modifying the firmware (through the "M218 T1 X???" command). - // Remember: you should set the second extruder x-offset to 0 in your slicer. - - // There are a few selectable movement modes for dual x-carriages using M605 S - // Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results - // as long as it supports dual x-carriages. (M605 S0) - // Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so - // that additional slicer support is not required. (M605 S1) - // Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all - // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at - // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm]) - - // This is the default power-up mode which can be later using M605. - #define DEFAULT_DUAL_X_CARRIAGE_MODE 0 - - // Default settings in "Auto-park Mode" - #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder - #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder - - // Default x offset in duplication mode (typically set to half print bed width) - #define DEFAULT_DUPLICATION_X_OFFSET 100 - -#endif //DUAL_X_CARRIAGE - -// @section homing - -//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again: -#define X_HOME_BUMP_MM 5 -#define Y_HOME_BUMP_MM 5 -#define Z_HOME_BUMP_MM 1 -#define HOMING_BUMP_DIVISOR {2, 2, 4} // Re-Bump Speed Divisor (Divides the Homing Feedrate) -//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. - -// When G28 is called, this option will make Y home before X -//#define HOME_Y_BEFORE_X - -// @section machine - -#define AXIS_RELATIVE_MODES {false, false, false, false} - -// Allow duplication mode with a basic dual-nozzle extruder -//#define DUAL_NOZZLE_DUPLICATION_MODE - -// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. -#define INVERT_X_STEP_PIN false -#define INVERT_Y_STEP_PIN false -#define INVERT_Z_STEP_PIN false -#define INVERT_E_STEP_PIN false - -// Default stepper release if idle. Set to 0 to deactivate. -// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. -// Time can be set by M18 and M84. -#define DEFAULT_STEPPER_DEACTIVE_TIME 60 -#define DISABLE_INACTIVE_X true -#define DISABLE_INACTIVE_Y true -#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. -#define DISABLE_INACTIVE_E true - -#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate -#define DEFAULT_MINTRAVELFEEDRATE 0.0 - -// @section lcd - -#if ENABLED(ULTIPANEL) - #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel - #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder -#endif - -// @section extras - -// minimum time in microseconds that a movement needs to take if the buffer is emptied. -#define DEFAULT_MINSEGMENTTIME 20000 - -// If defined the movements slow down when the look ahead buffer is only half full -#define SLOWDOWN - -// Frequency limit -// See nophead's blog for more info -// Not working O -//#define XY_FREQUENCY_LIMIT 15 - -// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end -// of the buffer and all stops. This should not be much greater than zero and should only be changed -// if unwanted behavior is observed on a user's machine when running at very slow speeds. -#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec) - -// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. -#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16] - -// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards) -#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) - -// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current) -//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps - -// uncomment to enable an I2C based DIGIPOT like on the Azteeg X3 Pro -//#define DIGIPOT_I2C -// Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8 -#define DIGIPOT_I2C_NUM_CHANNELS 8 -// actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS -#define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0} - -//=========================================================================== -//=============================Additional Features=========================== -//=========================================================================== - -#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly -#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value -#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value - -//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ -#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again - -// @section lcd - -// Include a page of printer information in the LCD Main Menu -//#define LCD_INFO_MENU - -#if ENABLED(SDSUPPORT) - - // Some RAMPS and other boards don't detect when an SD card is inserted. You can work - // around this by connecting a push button or single throw switch to the pin defined - // as SD_DETECT_PIN in your board's pins definitions. - // This setting should be disabled unless you are using a push button, pulling the pin to ground. - // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). - #define SD_DETECT_INVERTED - - #define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers? - #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place. - - #define SDCARD_RATHERRECENTFIRST //reverse file order of sd card menu display. Its sorted practically after the file system block order. - // if a file is deleted, it frees a block. hence, the order is not purely chronological. To still have auto0.g accessible, there is again the option to do that. - // using: - //#define MENU_ADDAUTOSTART - - // Show a progress bar on HD44780 LCDs for SD printing - //#define LCD_PROGRESS_BAR - - #if ENABLED(LCD_PROGRESS_BAR) - // Amount of time (ms) to show the bar - #define PROGRESS_BAR_BAR_TIME 2000 - // Amount of time (ms) to show the status message - #define PROGRESS_BAR_MSG_TIME 3000 - // Amount of time (ms) to retain the status message (0=forever) - #define PROGRESS_MSG_EXPIRE 0 - // Enable this to show messages for MSG_TIME then hide them - //#define PROGRESS_MSG_ONCE - #endif - - // This allows hosts to request long names for files and folders with M33 - //#define LONG_FILENAME_HOST_SUPPORT - - // This option allows you to abort SD printing when any endstop is triggered. - // This feature must be enabled with "M540 S1" or from the LCD menu. - // To have any effect, endstops must be enabled during SD printing. - //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED - -#endif // SDSUPPORT - -// for dogm lcd displays you can choose some additional fonts: -#if ENABLED(DOGLCD) - // save 3120 bytes of PROGMEM by commenting out #define USE_BIG_EDIT_FONT - // we don't have a big font for Cyrillic, Kana - //#define USE_BIG_EDIT_FONT - - // If you have spare 2300Byte of progmem and want to use a - // smaller font on the Info-screen uncomment the next line. - //#define USE_SMALL_INFOFONT -#endif // DOGLCD - -// @section safety - -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. -#define USE_WATCHDOG - -#if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. - //#define WATCHDOG_RESET_MANUAL -#endif - -// @section lcd - -// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process -// it can e.g. be used to change z-positions in the print startup phase in real-time -// does not respect endstops! -//#define BABYSTEPPING -#if ENABLED(BABYSTEPPING) - #define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions - //not implemented for deltabots! - #define BABYSTEP_INVERT_Z false //true for inverse movements in Z - #define BABYSTEP_MULTIPLICATOR 1 //faster movements -#endif - -// @section extruder - -// extruder advance constant (s2/mm3) -// -// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2 -// -// Hooke's law says: force = k * distance -// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant -// so: v ^ 2 is proportional to number of steps we advance the extruder -//#define ADVANCE - -#if ENABLED(ADVANCE) - #define EXTRUDER_ADVANCE_K .0 - #define D_FILAMENT 2.85 -#endif - -// Implementation of a linear pressure control -// Assumption: advance = k * (delta velocity) -// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75 -//#define LIN_ADVANCE - -#if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 75 -#endif - -// @section leveling - -// Default mesh area is an area with an inset margin on the print area. -// Below are the macros that are used to define the borders for the mesh area, -// made available here for specialized needs, ie dual extruder setup. -#if ENABLED(MESH_BED_LEVELING) - #define MESH_MIN_X (X_MIN_POS + MESH_INSET) - #define MESH_MAX_X (X_MAX_POS - (MESH_INSET)) - #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET) - #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET)) -#endif - -// @section extras - -// Arc interpretation settings: -#define ARC_SUPPORT // Disabling this saves ~2738 bytes -#define MM_PER_ARC_SEGMENT 1 -#define N_ARC_CORRECTION 25 - -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT - -const unsigned int dropsegments = 5; //everything with less than this number of steps will be ignored as move and joined with the next movement - -// @section temperature - -// Control heater 0 and heater 1 in parallel. -//#define HEATERS_PARALLEL - -//=========================================================================== -//================================= Buffers ================================= -//=========================================================================== - -// @section hidden - -// The number of linear motions that can be in the plan at any give time. -// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, i.g. 8,16,32 because shifts and ors are used to do the ring-buffering. -#if ENABLED(SDSUPPORT) - #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller -#else - #define BLOCK_BUFFER_SIZE 16 // maximize block buffer -#endif - -// @section serial - -// The ASCII buffer for serial input -#define MAX_CMD_SIZE 96 -#define BUFSIZE 4 - -// Transfer Buffer Size -// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. -// To buffer a simple "ok" you need 4 bytes. -// For ADVANCED_OK (M105) you need 32 bytes. -// For debug-echo: 128 bytes for the optimal speed. -// Other output doesn't need to be that speedy. -// :[0,2,4,8,16,32,64,128,256] -#define TX_BUFFER_SIZE 0 - -// Enable an emergency-command parser to intercept certain commands as they -// enter the serial receive buffer, so they cannot be blocked. -// Currently handles M108, M112, M410 -// Does not work on boards using AT90USB (USBCON) processors! -//#define EMERGENCY_PARSER - -// Bad Serial-connections can miss a received command by sending an 'ok' -// Therefore some clients abort after 30 seconds in a timeout. -// Some other clients start sending commands while receiving a 'wait'. -// This "wait" is only sent when the buffer is empty. 1 second is a good value here. -//#define NO_TIMEOUTS 1000 // Milliseconds - -// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. -//#define ADVANCED_OK - -// @section fwretract - -// Firmware based and LCD controlled retract -// M207 and M208 can be used to define parameters for the retraction. -// The retraction can be called by the slicer using G10 and G11 -// until then, intended retractions can be detected by moves that only extrude and the direction. -// the moves are than replaced by the firmware controlled ones. - -//#define FWRETRACT //ONLY PARTIALLY TESTED -#if ENABLED(FWRETRACT) - #define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt - #define RETRACT_LENGTH 3 //default retract length (positive mm) - #define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change - #define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s) - #define RETRACT_ZLIFT 0 //default retract Z-lift - #define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering) - #define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change) - #define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s) -#endif - -// Add support for experimental filament exchange support M600; requires display -#if ENABLED(ULTIPANEL) - // #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) - #if ENABLED(FILAMENT_CHANGE_FEATURE) - #define FILAMENT_CHANGE_X_POS 3 // X position of hotend - #define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend - #define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift) - #define FILAMENT_CHANGE_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis) - #define FILAMENT_CHANGE_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers) - #define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm - // It is a short retract used immediately after print interrupt before move to filament exchange position - #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s - #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm - // Longer length for bowden printers to unload filament from whole bowden tube, - // shorter lenght for printers without bowden to unload filament from extruder only, - // 0 to disable unloading for manual unloading - #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast - #define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm - // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend, - // Short or zero length for printers without bowden where loading is not used - #define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast - #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend, - // 0 to disable for manual extrusion - // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend, - // or until outcoming filament color is not clear for filament color change - #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate - #endif -#endif - -/******************************************************************************\ - * enable this section if you have TMC26X motor drivers. - * you need to import the TMC26XStepper library into the Arduino IDE for this - ******************************************************************************/ - -// @section tmc - -//#define HAVE_TMCDRIVER -#if ENABLED(HAVE_TMCDRIVER) - - //#define X_IS_TMC - #define X_MAX_CURRENT 1000 //in mA - #define X_SENSE_RESISTOR 91 //in mOhms - #define X_MICROSTEPS 16 //number of microsteps - - //#define X2_IS_TMC - #define X2_MAX_CURRENT 1000 //in mA - #define X2_SENSE_RESISTOR 91 //in mOhms - #define X2_MICROSTEPS 16 //number of microsteps - - //#define Y_IS_TMC - #define Y_MAX_CURRENT 1000 //in mA - #define Y_SENSE_RESISTOR 91 //in mOhms - #define Y_MICROSTEPS 16 //number of microsteps - - //#define Y2_IS_TMC - #define Y2_MAX_CURRENT 1000 //in mA - #define Y2_SENSE_RESISTOR 91 //in mOhms - #define Y2_MICROSTEPS 16 //number of microsteps - - //#define Z_IS_TMC - #define Z_MAX_CURRENT 1000 //in mA - #define Z_SENSE_RESISTOR 91 //in mOhms - #define Z_MICROSTEPS 16 //number of microsteps - - //#define Z2_IS_TMC - #define Z2_MAX_CURRENT 1000 //in mA - #define Z2_SENSE_RESISTOR 91 //in mOhms - #define Z2_MICROSTEPS 16 //number of microsteps - - //#define E0_IS_TMC - #define E0_MAX_CURRENT 1000 //in mA - #define E0_SENSE_RESISTOR 91 //in mOhms - #define E0_MICROSTEPS 16 //number of microsteps - - //#define E1_IS_TMC - #define E1_MAX_CURRENT 1000 //in mA - #define E1_SENSE_RESISTOR 91 //in mOhms - #define E1_MICROSTEPS 16 //number of microsteps - - //#define E2_IS_TMC - #define E2_MAX_CURRENT 1000 //in mA - #define E2_SENSE_RESISTOR 91 //in mOhms - #define E2_MICROSTEPS 16 //number of microsteps - - //#define E3_IS_TMC - #define E3_MAX_CURRENT 1000 //in mA - #define E3_SENSE_RESISTOR 91 //in mOhms - #define E3_MICROSTEPS 16 //number of microsteps - -#endif - -/******************************************************************************\ - * enable this section if you have L6470 motor drivers. - * you need to import the L6470 library into the Arduino IDE for this - ******************************************************************************/ - -// @section l6470 - -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - #define X_MICROSTEPS 16 //number of microsteps - #define X_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define X2_IS_L6470 - #define X2_MICROSTEPS 16 //number of microsteps - #define X2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define X2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define X2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y_IS_L6470 - #define Y_MICROSTEPS 16 //number of microsteps - #define Y_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Y2_IS_L6470 - #define Y2_MICROSTEPS 16 //number of microsteps - #define Y2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Y2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Y2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z_IS_L6470 - #define Z_MICROSTEPS 16 //number of microsteps - #define Z_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define Z2_IS_L6470 - #define Z2_MICROSTEPS 16 //number of microsteps - #define Z2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define Z2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define Z2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E0_IS_L6470 - #define E0_MICROSTEPS 16 //number of microsteps - #define E0_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E0_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E0_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E1_IS_L6470 - #define E1_MICROSTEPS 16 //number of microsteps - #define E1_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E1_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E1_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E2_IS_L6470 - #define E2_MICROSTEPS 16 //number of microsteps - #define E2_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E2_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E2_STALLCURRENT 1500 //current in mA where the driver will detect a stall - - //#define E3_IS_L6470 - #define E3_MICROSTEPS 16 //number of microsteps - #define E3_K_VAL 50 // 0 - 255, Higher values, are higher power. Be careful not to go too high - #define E3_OVERCURRENT 2000 //maxc current in mA. If the current goes over this value, the driver will switch off - #define E3_STALLCURRENT 1500 //current in mA where the driver will detect a stall - -#endif - -/** - * TWI/I2C BUS - * - * This feature is an EXPERIMENTAL feature so it shall not be used on production - * machines. Enabling this will allow you to send and receive I2C data from slave - * devices on the bus. - * - * ; Example #1 - * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) - * ; It uses multiple M155 commands with one B arg - * M155 A99 ; Target slave address - * M155 B77 ; M - * M155 B97 ; a - * M155 B114 ; r - * M155 B108 ; l - * M155 B105 ; i - * M155 B110 ; n - * M155 S1 ; Send the current buffer - * - * ; Example #2 - * ; Request 6 bytes from slave device with address 0x63 (99) - * M156 A99 B5 - * - * ; Example #3 - * ; Example serial output of a M156 request - * echo:i2c-reply: from:99 bytes:5 data:hello - */ - -// @section i2cbus - -//#define EXPERIMENTAL_I2CBUS - -#endif // CONFIGURATION_ADV_H diff --git a/Marlin/fastio.h b/Marlin/fastio.h deleted file mode 100644 index 3a608e0..0000000 --- a/Marlin/fastio.h +++ /dev/null @@ -1,4051 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - This code contributed by Triffid_Hunter and modified by Kliment - why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html -*/ - -#ifndef _FASTIO_ARDUINO_H -#define _FASTIO_ARDUINO_H - -#include - -/** - utility functions -*/ - -#ifndef MASK - #define MASK(PIN) (1 << PIN) -#endif - -/** - magic I/O routines - now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0); -*/ - -/// Read a pin -#define _READ(IO) ((bool)(DIO ## IO ## _RPORT & MASK(DIO ## IO ## _PIN))) -/// write to a pin -// On some boards pins > 0x100 are used. These are not converted to atomic actions. An critical section is needed. - -#define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0) - -#define _WRITE_C(IO, v) do { if (v) { \ - CRITICAL_SECTION_START; \ - {DIO ## IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } \ - CRITICAL_SECTION_END; \ - } \ - else { \ - CRITICAL_SECTION_START; \ - {DIO ## IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); } \ - CRITICAL_SECTION_END; \ - } \ - } \ - while (0) - -#define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0) - -/// toggle a pin -#define _TOGGLE(IO) do {DIO ## IO ## _RPORT = MASK(DIO ## IO ## _PIN); } while (0) - -/// set pin as input -#define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~MASK(DIO ## IO ## _PIN); } while (0) -/// set pin as output -#define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= MASK(DIO ## IO ## _PIN); } while (0) - -/// check if pin is an input -#define _GET_INPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) == 0) -/// check if pin is an output -#define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & MASK(DIO ## IO ## _PIN)) != 0) - -/// check if pin is an timer -#define _GET_TIMER(IO) ((DIO ## IO ## _PWM) - -// why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html - -/// Read a pin wrapper -#define READ(IO) _READ(IO) -/// Write to a pin wrapper -#define WRITE(IO, v) _WRITE(IO, v) - -/// toggle a pin wrapper -#define TOGGLE(IO) _TOGGLE(IO) - -/// set pin as input wrapper -#define SET_INPUT(IO) _SET_INPUT(IO) -/// set pin as output wrapper -#define SET_OUTPUT(IO) _SET_OUTPUT(IO) - -/// check if pin is an input wrapper -#define GET_INPUT(IO) _GET_INPUT(IO) -/// check if pin is an output wrapper -#define GET_OUTPUT(IO) _GET_OUTPUT(IO) - -/// check if pin is an timer wrapper -#define GET_TIMER(IO) _GET_TIMER(IO) - -// Shorthand -#define OUT_WRITE(IO, v) { SET_OUTPUT(IO); WRITE(IO, v); } - -/** - ports and functions - - added as necessary or if I feel like it- not a comprehensive list! -*/ - -#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) - // UART - #define RXD DIO0 - #define TXD DIO1 - - // SPI - #define SCK DIO13 - #define MISO DIO12 - #define MOSI DIO11 - #define SS DIO10 - - // TWI (I2C) - #define SCL AIO5 - #define SDA AIO4 - - // timers and PWM - #define OC0A DIO6 - #define OC0B DIO5 - #define OC1A DIO9 - #define OC1B DIO10 - #define OC2A DIO11 - #define OC2B DIO3 - - #define DEBUG_LED AIO5 - - /** - pins - */ - - #define DIO0_PIN PIND0 - #define DIO0_RPORT PIND - #define DIO0_WPORT PORTD - #define DIO0_DDR DDRD - #define DIO0_PWM NULL - - #define DIO1_PIN PIND1 - #define DIO1_RPORT PIND - #define DIO1_WPORT PORTD - #define DIO1_DDR DDRD - #define DIO1_PWM NULL - - #define DIO2_PIN PIND2 - #define DIO2_RPORT PIND - #define DIO2_WPORT PORTD - #define DIO2_DDR DDRD - #define DIO2_PWM NULL - - #define DIO3_PIN PIND3 - #define DIO3_RPORT PIND - #define DIO3_WPORT PORTD - #define DIO3_DDR DDRD - #define DIO3_PWM &OCR2B - - #define DIO4_PIN PIND4 - #define DIO4_RPORT PIND - #define DIO4_WPORT PORTD - #define DIO4_DDR DDRD - #define DIO4_PWM NULL - - #define DIO5_PIN PIND5 - #define DIO5_RPORT PIND - #define DIO5_WPORT PORTD - #define DIO5_DDR DDRD - #define DIO5_PWM &OCR0B - - #define DIO6_PIN PIND6 - #define DIO6_RPORT PIND - #define DIO6_WPORT PORTD - #define DIO6_DDR DDRD - #define DIO6_PWM &OCR0A - - #define DIO7_PIN PIND7 - #define DIO7_RPORT PIND - #define DIO7_WPORT PORTD - #define DIO7_DDR DDRD - #define DIO7_PWM NULL - - #define DIO8_PIN PINB0 - #define DIO8_RPORT PINB - #define DIO8_WPORT PORTB - #define DIO8_DDR DDRB - #define DIO8_PWM NULL - - #define DIO9_PIN PINB1 - #define DIO9_RPORT PINB - #define DIO9_WPORT PORTB - #define DIO9_DDR DDRB - #define DIO9_PWM NULL - - #define DIO10_PIN PINB2 - #define DIO10_RPORT PINB - #define DIO10_WPORT PORTB - #define DIO10_DDR DDRB - #define DIO10_PWM NULL - - #define DIO11_PIN PINB3 - #define DIO11_RPORT PINB - #define DIO11_WPORT PORTB - #define DIO11_DDR DDRB - #define DIO11_PWM &OCR2A - - #define DIO12_PIN PINB4 - #define DIO12_RPORT PINB - #define DIO12_WPORT PORTB - #define DIO12_DDR DDRB - #define DIO12_PWM NULL - - #define DIO13_PIN PINB5 - #define DIO13_RPORT PINB - #define DIO13_WPORT PORTB - #define DIO13_DDR DDRB - #define DIO13_PWM NULL - - - #define DIO14_PIN PINC0 - #define DIO14_RPORT PINC - #define DIO14_WPORT PORTC - #define DIO14_DDR DDRC - #define DIO14_PWM NULL - - #define DIO15_PIN PINC1 - #define DIO15_RPORT PINC - #define DIO15_WPORT PORTC - #define DIO15_DDR DDRC - #define DIO15_PWM NULL - - #define DIO16_PIN PINC2 - #define DIO16_RPORT PINC - #define DIO16_WPORT PORTC - #define DIO16_DDR DDRC - #define DIO16_PWM NULL - - #define DIO17_PIN PINC3 - #define DIO17_RPORT PINC - #define DIO17_WPORT PORTC - #define DIO17_DDR DDRC - #define DIO17_PWM NULL - - #define DIO18_PIN PINC4 - #define DIO18_RPORT PINC - #define DIO18_WPORT PORTC - #define DIO18_DDR DDRC - #define DIO18_PWM NULL - - #define DIO19_PIN PINC5 - #define DIO19_RPORT PINC - #define DIO19_WPORT PORTC - #define DIO19_DDR DDRC - #define DIO19_PWM NULL - - #define DIO20_PIN PINC6 - #define DIO20_RPORT PINC - #define DIO20_WPORT PORTC - #define DIO20_DDR DDRC - #define DIO20_PWM NULL - - #define DIO21_PIN PINC7 - #define DIO21_RPORT PINC - #define DIO21_WPORT PORTC - #define DIO21_DDR DDRC - #define DIO21_PWM NULL - - - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_DDR DDRB - #define PB0_PWM NULL - - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_DDR DDRB - #define PB1_PWM NULL - - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_DDR DDRB - #define PB2_PWM NULL - - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_DDR DDRB - #define PB3_PWM &OCR2A - - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_DDR DDRB - #define PB4_PWM NULL - - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_DDR DDRB - #define PB5_PWM NULL - - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_DDR DDRB - #define PB6_PWM NULL - - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_DDR DDRB - #define PB7_PWM NULL - - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_DDR DDRC - #define PC0_PWM NULL - - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_DDR DDRC - #define PC1_PWM NULL - - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_DDR DDRC - #define PC2_PWM NULL - - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_DDR DDRC - #define PC3_PWM NULL - - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_DDR DDRC - #define PC4_PWM NULL - - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_DDR DDRC - #define PC5_PWM NULL - - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_DDR DDRC - #define PC6_PWM NULL - - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_DDR DDRC - #define PC7_PWM NULL - - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_DDR DDRD - #define PD0_PWM NULL - - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_DDR DDRD - #define PD1_PWM NULL - - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_DDR DDRD - #define PD2_PWM NULL - - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_DDR DDRD - #define PD3_PWM &OCR2B - - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_DDR DDRD - #define PD4_PWM NULL - - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_DDR DDRD - #define PD5_PWM &OCR0B - - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_DDR DDRD - #define PD6_PWM &OCR0A - - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_DDR DDRD - #define PD7_PWM NULL -#endif /* _AVR_ATmega{168,328,328P}__ */ - -#if defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__) - // UART - #define RXD DIO8 - #define TXD DIO9 - #define RXD0 DIO8 - #define TXD0 DIO9 - - #define RXD1 DIO10 - #define TXD1 DIO11 - - // SPI - #define SCK DIO7 - #define MISO DIO6 - #define MOSI DIO5 - #define SS DIO4 - - // TWI (I2C) - #define SCL DIO16 - #define SDA DIO17 - - // timers and PWM - #define OC0A DIO3 - #define OC0B DIO4 - #define OC1A DIO13 - #define OC1B DIO12 - #define OC2A DIO15 - #define OC2B DIO14 - - #define DEBUG_LED DIO0 - /** - pins - */ - - #define DIO0_PIN PINB0 - #define DIO0_RPORT PINB - #define DIO0_WPORT PORTB - #define DIO0_DDR DDRB - #define DIO0_PWM NULL - - #define DIO1_PIN PINB1 - #define DIO1_RPORT PINB - #define DIO1_WPORT PORTB - #define DIO1_DDR DDRB - #define DIO1_PWM NULL - - #define DIO2_PIN PINB2 - #define DIO2_RPORT PINB - #define DIO2_WPORT PORTB - #define DIO2_DDR DDRB - #define DIO2_PWM NULL - - #define DIO3_PIN PINB3 - #define DIO3_RPORT PINB - #define DIO3_WPORT PORTB - #define DIO3_DDR DDRB - #define DIO3_PWM OCR0A - - #define DIO4_PIN PINB4 - #define DIO4_RPORT PINB - #define DIO4_WPORT PORTB - #define DIO4_DDR DDRB - #define DIO4_PWM OCR0B - - #define DIO5_PIN PINB5 - #define DIO5_RPORT PINB - #define DIO5_WPORT PORTB - #define DIO5_DDR DDRB - #define DIO5_PWM NULL - - #define DIO6_PIN PINB6 - #define DIO6_RPORT PINB - #define DIO6_WPORT PORTB - #define DIO6_DDR DDRB - #define DIO6_PWM NULL - - #define DIO7_PIN PINB7 - #define DIO7_RPORT PINB - #define DIO7_WPORT PORTB - #define DIO7_DDR DDRB - #define DIO7_PWM NULL - - #define DIO8_PIN PIND0 - #define DIO8_RPORT PIND - #define DIO8_WPORT PORTD - #define DIO8_DDR DDRD - #define DIO8_PWM NULL - - #define DIO9_PIN PIND1 - #define DIO9_RPORT PIND - #define DIO9_WPORT PORTD - #define DIO9_DDR DDRD - #define DIO9_PWM NULL - - #define DIO10_PIN PIND2 - #define DIO10_RPORT PIND - #define DIO10_WPORT PORTD - #define DIO10_DDR DDRD - #define DIO10_PWM NULL - - #define DIO11_PIN PIND3 - #define DIO11_RPORT PIND - #define DIO11_WPORT PORTD - #define DIO11_DDR DDRD - #define DIO11_PWM NULL - - #define DIO12_PIN PIND4 - #define DIO12_RPORT PIND - #define DIO12_WPORT PORTD - #define DIO12_DDR DDRD - #define DIO12_PWM OCR1B - - #define DIO13_PIN PIND5 - #define DIO13_RPORT PIND - #define DIO13_WPORT PORTD - #define DIO13_DDR DDRD - #define DIO13_PWM OCR1A - - #define DIO14_PIN PIND6 - #define DIO14_RPORT PIND - #define DIO14_WPORT PORTD - #define DIO14_DDR DDRD - #define DIO14_PWM OCR2B - - #define DIO15_PIN PIND7 - #define DIO15_RPORT PIND - #define DIO15_WPORT PORTD - #define DIO15_DDR DDRD - #define DIO15_PWM OCR2A - - #define DIO16_PIN PINC0 - #define DIO16_RPORT PINC - #define DIO16_WPORT PORTC - #define DIO16_DDR DDRC - #define DIO16_PWM NULL - - #define DIO17_PIN PINC1 - #define DIO17_RPORT PINC - #define DIO17_WPORT PORTC - #define DIO17_DDR DDRC - #define DIO17_PWM NULL - - #define DIO18_PIN PINC2 - #define DIO18_RPORT PINC - #define DIO18_WPORT PORTC - #define DIO18_DDR DDRC - #define DIO18_PWM NULL - - #define DIO19_PIN PINC3 - #define DIO19_RPORT PINC - #define DIO19_WPORT PORTC - #define DIO19_DDR DDRC - #define DIO19_PWM NULL - - #define DIO20_PIN PINC4 - #define DIO20_RPORT PINC - #define DIO20_WPORT PORTC - #define DIO20_DDR DDRC - #define DIO20_PWM NULL - - #define DIO21_PIN PINC5 - #define DIO21_RPORT PINC - #define DIO21_WPORT PORTC - #define DIO21_DDR DDRC - #define DIO21_PWM NULL - - #define DIO22_PIN PINC6 - #define DIO22_RPORT PINC - #define DIO22_WPORT PORTC - #define DIO22_DDR DDRC - #define DIO22_PWM NULL - - #define DIO23_PIN PINC7 - #define DIO23_RPORT PINC - #define DIO23_WPORT PORTC - #define DIO23_DDR DDRC - #define DIO23_PWM NULL - - #define DIO24_PIN PINA7 - #define DIO24_RPORT PINA - #define DIO24_WPORT PORTA - #define DIO24_DDR DDRA - #define DIO24_PWM NULL - - #define DIO25_PIN PINA6 - #define DIO25_RPORT PINA - #define DIO25_WPORT PORTA - #define DIO25_DDR DDRA - #define DIO25_PWM NULL - - #define DIO26_PIN PINA5 - #define DIO26_RPORT PINA - #define DIO26_WPORT PORTA - #define DIO26_DDR DDRA - #define DIO26_PWM NULL - - #define DIO27_PIN PINA4 - #define DIO27_RPORT PINA - #define DIO27_WPORT PORTA - #define DIO27_DDR DDRA - #define DIO27_PWM NULL - - #define DIO28_PIN PINA3 - #define DIO28_RPORT PINA - #define DIO28_WPORT PORTA - #define DIO28_DDR DDRA - #define DIO28_PWM NULL - - #define DIO29_PIN PINA2 - #define DIO29_RPORT PINA - #define DIO29_WPORT PORTA - #define DIO29_DDR DDRA - #define DIO29_PWM NULL - - #define DIO30_PIN PINA1 - #define DIO30_RPORT PINA - #define DIO30_WPORT PORTA - #define DIO30_DDR DDRA - #define DIO30_PWM NULL - - #define DIO31_PIN PINA0 - #define DIO31_RPORT PINA - #define DIO31_WPORT PORTA - #define DIO31_DDR DDRA - #define DIO31_PWM NULL - - #define AIO0_PIN PINA0 - #define AIO0_RPORT PINA - #define AIO0_WPORT PORTA - #define AIO0_DDR DDRA - #define AIO0_PWM NULL - - #define AIO1_PIN PINA1 - #define AIO1_RPORT PINA - #define AIO1_WPORT PORTA - #define AIO1_DDR DDRA - #define AIO1_PWM NULL - - #define AIO2_PIN PINA2 - #define AIO2_RPORT PINA - #define AIO2_WPORT PORTA - #define AIO2_DDR DDRA - #define AIO2_PWM NULL - - #define AIO3_PIN PINA3 - #define AIO3_RPORT PINA - #define AIO3_WPORT PORTA - #define AIO3_DDR DDRA - #define AIO3_PWM NULL - - #define AIO4_PIN PINA4 - #define AIO4_RPORT PINA - #define AIO4_WPORT PORTA - #define AIO4_DDR DDRA - #define AIO4_PWM NULL - - #define AIO5_PIN PINA5 - #define AIO5_RPORT PINA - #define AIO5_WPORT PORTA - #define AIO5_DDR DDRA - #define AIO5_PWM NULL - - #define AIO6_PIN PINA6 - #define AIO6_RPORT PINA - #define AIO6_WPORT PORTA - #define AIO6_DDR DDRA - #define AIO6_PWM NULL - - #define AIO7_PIN PINA7 - #define AIO7_RPORT PINA - #define AIO7_WPORT PORTA - #define AIO7_DDR DDRA - #define AIO7_PWM NULL - - - - #undef PA0 - #define PA0_PIN PINA0 - #define PA0_RPORT PINA - #define PA0_WPORT PORTA - #define PA0_DDR DDRA - #define PA0_PWM NULL - - #undef PA1 - #define PA1_PIN PINA1 - #define PA1_RPORT PINA - #define PA1_WPORT PORTA - #define PA1_DDR DDRA - #define PA1_PWM NULL - - #undef PA2 - #define PA2_PIN PINA2 - #define PA2_RPORT PINA - #define PA2_WPORT PORTA - #define PA2_DDR DDRA - #define PA2_PWM NULL - - #undef PA3 - #define PA3_PIN PINA3 - #define PA3_RPORT PINA - #define PA3_WPORT PORTA - #define PA3_DDR DDRA - #define PA3_PWM NULL - - #undef PA4 - #define PA4_PIN PINA4 - #define PA4_RPORT PINA - #define PA4_WPORT PORTA - #define PA4_DDR DDRA - #define PA4_PWM NULL - - #undef PA5 - #define PA5_PIN PINA5 - #define PA5_RPORT PINA - #define PA5_WPORT PORTA - #define PA5_DDR DDRA - #define PA5_PWM NULL - - #undef PA6 - #define PA6_PIN PINA6 - #define PA6_RPORT PINA - #define PA6_WPORT PORTA - #define PA6_DDR DDRA - #define PA6_PWM NULL - - #undef PA7 - #define PA7_PIN PINA7 - #define PA7_RPORT PINA - #define PA7_WPORT PORTA - #define PA7_DDR DDRA - #define PA7_PWM NULL - - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_DDR DDRB - #define PB0_PWM NULL - - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_DDR DDRB - #define PB1_PWM NULL - - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_DDR DDRB - #define PB2_PWM NULL - - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_DDR DDRB - #define PB3_PWM OCR0A - - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_DDR DDRB - #define PB4_PWM OCR0B - - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_DDR DDRB - #define PB5_PWM NULL - - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_DDR DDRB - #define PB6_PWM NULL - - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_DDR DDRB - #define PB7_PWM NULL - - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_DDR DDRC - #define PC0_PWM NULL - - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_DDR DDRC - #define PC1_PWM NULL - - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_DDR DDRC - #define PC2_PWM NULL - - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_DDR DDRC - #define PC3_PWM NULL - - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_DDR DDRC - #define PC4_PWM NULL - - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_DDR DDRC - #define PC5_PWM NULL - - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_DDR DDRC - #define PC6_PWM NULL - - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_DDR DDRC - #define PC7_PWM NULL - - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_DDR DDRD - #define PD0_PWM NULL - - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_DDR DDRD - #define PD1_PWM NULL - - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_DDR DDRD - #define PD2_PWM NULL - - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_DDR DDRD - #define PD3_PWM NULL - - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_DDR DDRD - #define PD4_PWM NULL - - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_DDR DDRD - #define PD5_PWM NULL - - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_DDR DDRD - #define PD6_PWM OCR2B - - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_DDR DDRD - #define PD7_PWM OCR2A -#endif /* _AVR_ATmega{644,644P,644PA}__ */ - -#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) - // UART - #define RXD DIO0 - #define TXD DIO1 - - // SPI - #define SCK DIO52 - #define MISO DIO50 - #define MOSI DIO51 - #define SS DIO53 - - // TWI (I2C) - #define SCL DIO21 - #define SDA DIO20 - - // timers and PWM - #define OC0A DIO13 - #define OC0B DIO4 - #define OC1A DIO11 - #define OC1B DIO12 - #define OC2A DIO10 - #define OC2B DIO9 - #define OC3A DIO5 - #define OC3B DIO2 - #define OC3C DIO3 - #define OC4A DIO6 - #define OC4B DIO7 - #define OC4C DIO8 - #define OC5A DIO46 - #define OC5B DIO45 - #define OC5C DIO44 - - // change for your board - #define DEBUG_LED DIO21 - - /** - pins - */ - #define DIO0_PIN PINE0 - #define DIO0_RPORT PINE - #define DIO0_WPORT PORTE - #define DIO0_DDR DDRE - #define DIO0_PWM NULL - - #define DIO1_PIN PINE1 - #define DIO1_RPORT PINE - #define DIO1_WPORT PORTE - #define DIO1_DDR DDRE - #define DIO1_PWM NULL - - #define DIO2_PIN PINE4 - #define DIO2_RPORT PINE - #define DIO2_WPORT PORTE - #define DIO2_DDR DDRE - #define DIO2_PWM &OCR3BL - - #define DIO3_PIN PINE5 - #define DIO3_RPORT PINE - #define DIO3_WPORT PORTE - #define DIO3_DDR DDRE - #define DIO3_PWM &OCR3CL - - #define DIO4_PIN PING5 - #define DIO4_RPORT PING - #define DIO4_WPORT PORTG - #define DIO4_DDR DDRG - #define DIO4_PWM &OCR0B - - #define DIO5_PIN PINE3 - #define DIO5_RPORT PINE - #define DIO5_WPORT PORTE - #define DIO5_DDR DDRE - #define DIO5_PWM &OCR3AL - - #define DIO6_PIN PINH3 - #define DIO6_RPORT PINH - #define DIO6_WPORT PORTH - #define DIO6_DDR DDRH - #define DIO6_PWM &OCR4AL - - #define DIO7_PIN PINH4 - #define DIO7_RPORT PINH - #define DIO7_WPORT PORTH - #define DIO7_DDR DDRH - #define DIO7_PWM &OCR4BL - - #define DIO8_PIN PINH5 - #define DIO8_RPORT PINH - #define DIO8_WPORT PORTH - #define DIO8_DDR DDRH - #define DIO8_PWM &OCR4CL - - #define DIO9_PIN PINH6 - #define DIO9_RPORT PINH - #define DIO9_WPORT PORTH - #define DIO9_DDR DDRH - #define DIO9_PWM &OCR2B - - #define DIO10_PIN PINB4 - #define DIO10_RPORT PINB - #define DIO10_WPORT PORTB - #define DIO10_DDR DDRB - #define DIO10_PWM &OCR2A - - #define DIO11_PIN PINB5 - #define DIO11_RPORT PINB - #define DIO11_WPORT PORTB - #define DIO11_DDR DDRB - #define DIO11_PWM NULL - - #define DIO12_PIN PINB6 - #define DIO12_RPORT PINB - #define DIO12_WPORT PORTB - #define DIO12_DDR DDRB - #define DIO12_PWM NULL - - #define DIO13_PIN PINB7 - #define DIO13_RPORT PINB - #define DIO13_WPORT PORTB - #define DIO13_DDR DDRB - #define DIO13_PWM &OCR0A - - #define DIO14_PIN PINJ1 - #define DIO14_RPORT PINJ - #define DIO14_WPORT PORTJ - #define DIO14_DDR DDRJ - #define DIO14_PWM NULL - - #define DIO15_PIN PINJ0 - #define DIO15_RPORT PINJ - #define DIO15_WPORT PORTJ - #define DIO15_DDR DDRJ - #define DIO15_PWM NULL - - #define DIO16_PIN PINH1 - #define DIO16_RPORT PINH - #define DIO16_WPORT PORTH - #define DIO16_DDR DDRH - #define DIO16_PWM NULL - - #define DIO17_PIN PINH0 - #define DIO17_RPORT PINH - #define DIO17_WPORT PORTH - #define DIO17_DDR DDRH - #define DIO17_PWM NULL - - #define DIO18_PIN PIND3 - #define DIO18_RPORT PIND - #define DIO18_WPORT PORTD - #define DIO18_DDR DDRD - #define DIO18_PWM NULL - - #define DIO19_PIN PIND2 - #define DIO19_RPORT PIND - #define DIO19_WPORT PORTD - #define DIO19_DDR DDRD - #define DIO19_PWM NULL - - #define DIO20_PIN PIND1 - #define DIO20_RPORT PIND - #define DIO20_WPORT PORTD - #define DIO20_DDR DDRD - #define DIO20_PWM NULL - - #define DIO21_PIN PIND0 - #define DIO21_RPORT PIND - #define DIO21_WPORT PORTD - #define DIO21_DDR DDRD - #define DIO21_PWM NULL - - #define DIO22_PIN PINA0 - #define DIO22_RPORT PINA - #define DIO22_WPORT PORTA - #define DIO22_DDR DDRA - #define DIO22_PWM NULL - - #define DIO23_PIN PINA1 - #define DIO23_RPORT PINA - #define DIO23_WPORT PORTA - #define DIO23_DDR DDRA - #define DIO23_PWM NULL - - #define DIO24_PIN PINA2 - #define DIO24_RPORT PINA - #define DIO24_WPORT PORTA - #define DIO24_DDR DDRA - #define DIO24_PWM NULL - - #define DIO25_PIN PINA3 - #define DIO25_RPORT PINA - #define DIO25_WPORT PORTA - #define DIO25_DDR DDRA - #define DIO25_PWM NULL - - #define DIO26_PIN PINA4 - #define DIO26_RPORT PINA - #define DIO26_WPORT PORTA - #define DIO26_DDR DDRA - #define DIO26_PWM NULL - - #define DIO27_PIN PINA5 - #define DIO27_RPORT PINA - #define DIO27_WPORT PORTA - #define DIO27_DDR DDRA - #define DIO27_PWM NULL - - #define DIO28_PIN PINA6 - #define DIO28_RPORT PINA - #define DIO28_WPORT PORTA - #define DIO28_DDR DDRA - #define DIO28_PWM NULL - - #define DIO29_PIN PINA7 - #define DIO29_RPORT PINA - #define DIO29_WPORT PORTA - #define DIO29_DDR DDRA - #define DIO29_PWM NULL - - #define DIO30_PIN PINC7 - #define DIO30_RPORT PINC - #define DIO30_WPORT PORTC - #define DIO30_DDR DDRC - #define DIO30_PWM NULL - - #define DIO31_PIN PINC6 - #define DIO31_RPORT PINC - #define DIO31_WPORT PORTC - #define DIO31_DDR DDRC - #define DIO31_PWM NULL - - #define DIO32_PIN PINC5 - #define DIO32_RPORT PINC - #define DIO32_WPORT PORTC - #define DIO32_DDR DDRC - #define DIO32_PWM NULL - - #define DIO33_PIN PINC4 - #define DIO33_RPORT PINC - #define DIO33_WPORT PORTC - #define DIO33_DDR DDRC - #define DIO33_PWM NULL - - #define DIO34_PIN PINC3 - #define DIO34_RPORT PINC - #define DIO34_WPORT PORTC - #define DIO34_DDR DDRC - #define DIO34_PWM NULL - - #define DIO35_PIN PINC2 - #define DIO35_RPORT PINC - #define DIO35_WPORT PORTC - #define DIO35_DDR DDRC - #define DIO35_PWM NULL - - #define DIO36_PIN PINC1 - #define DIO36_RPORT PINC - #define DIO36_WPORT PORTC - #define DIO36_DDR DDRC - #define DIO36_PWM NULL - - #define DIO37_PIN PINC0 - #define DIO37_RPORT PINC - #define DIO37_WPORT PORTC - #define DIO37_DDR DDRC - #define DIO37_PWM NULL - - #define DIO38_PIN PIND7 - #define DIO38_RPORT PIND - #define DIO38_WPORT PORTD - #define DIO38_DDR DDRD - #define DIO38_PWM NULL - - #define DIO39_PIN PING2 - #define DIO39_RPORT PING - #define DIO39_WPORT PORTG - #define DIO39_DDR DDRG - #define DIO39_PWM NULL - - #define DIO40_PIN PING1 - #define DIO40_RPORT PING - #define DIO40_WPORT PORTG - #define DIO40_DDR DDRG - #define DIO40_PWM NULL - - #define DIO41_PIN PING0 - #define DIO41_RPORT PING - #define DIO41_WPORT PORTG - #define DIO41_DDR DDRG - #define DIO41_PWM NULL - - #define DIO42_PIN PINL7 - #define DIO42_RPORT PINL - #define DIO42_WPORT PORTL - #define DIO42_DDR DDRL - #define DIO42_PWM NULL - - #define DIO43_PIN PINL6 - #define DIO43_RPORT PINL - #define DIO43_WPORT PORTL - #define DIO43_DDR DDRL - #define DIO43_PWM NULL - - #define DIO44_PIN PINL5 - #define DIO44_RPORT PINL - #define DIO44_WPORT PORTL - #define DIO44_DDR DDRL - #define DIO44_PWM &OCR5CL - - #define DIO45_PIN PINL4 - #define DIO45_RPORT PINL - #define DIO45_WPORT PORTL - #define DIO45_DDR DDRL - #define DIO45_PWM &OCR5BL - - #define DIO46_PIN PINL3 - #define DIO46_RPORT PINL - #define DIO46_WPORT PORTL - #define DIO46_DDR DDRL - #define DIO46_PWM &OCR5AL - - #define DIO47_PIN PINL2 - #define DIO47_RPORT PINL - #define DIO47_WPORT PORTL - #define DIO47_DDR DDRL - #define DIO47_PWM NULL - - #define DIO48_PIN PINL1 - #define DIO48_RPORT PINL - #define DIO48_WPORT PORTL - #define DIO48_DDR DDRL - #define DIO48_PWM NULL - - #define DIO49_PIN PINL0 - #define DIO49_RPORT PINL - #define DIO49_WPORT PORTL - #define DIO49_DDR DDRL - #define DIO49_PWM NULL - - #define DIO50_PIN PINB3 - #define DIO50_RPORT PINB - #define DIO50_WPORT PORTB - #define DIO50_DDR DDRB - #define DIO50_PWM NULL - - #define DIO51_PIN PINB2 - #define DIO51_RPORT PINB - #define DIO51_WPORT PORTB - #define DIO51_DDR DDRB - #define DIO51_PWM NULL - - #define DIO52_PIN PINB1 - #define DIO52_RPORT PINB - #define DIO52_WPORT PORTB - #define DIO52_DDR DDRB - #define DIO52_PWM NULL - - #define DIO53_PIN PINB0 - #define DIO53_RPORT PINB - #define DIO53_WPORT PORTB - #define DIO53_DDR DDRB - #define DIO53_PWM NULL - - #define DIO54_PIN PINF0 - #define DIO54_RPORT PINF - #define DIO54_WPORT PORTF - #define DIO54_DDR DDRF - #define DIO54_PWM NULL - - #define DIO55_PIN PINF1 - #define DIO55_RPORT PINF - #define DIO55_WPORT PORTF - #define DIO55_DDR DDRF - #define DIO55_PWM NULL - - #define DIO56_PIN PINF2 - #define DIO56_RPORT PINF - #define DIO56_WPORT PORTF - #define DIO56_DDR DDRF - #define DIO56_PWM NULL - - #define DIO57_PIN PINF3 - #define DIO57_RPORT PINF - #define DIO57_WPORT PORTF - #define DIO57_DDR DDRF - #define DIO57_PWM NULL - - #define DIO58_PIN PINF4 - #define DIO58_RPORT PINF - #define DIO58_WPORT PORTF - #define DIO58_DDR DDRF - #define DIO58_PWM NULL - - #define DIO59_PIN PINF5 - #define DIO59_RPORT PINF - #define DIO59_WPORT PORTF - #define DIO59_DDR DDRF - #define DIO59_PWM NULL - - #define DIO60_PIN PINF6 - #define DIO60_RPORT PINF - #define DIO60_WPORT PORTF - #define DIO60_DDR DDRF - #define DIO60_PWM NULL - - #define DIO61_PIN PINF7 - #define DIO61_RPORT PINF - #define DIO61_WPORT PORTF - #define DIO61_DDR DDRF - #define DIO61_PWM NULL - - #define DIO62_PIN PINK0 - #define DIO62_RPORT PINK - #define DIO62_WPORT PORTK - #define DIO62_DDR DDRK - #define DIO62_PWM NULL - - #define DIO63_PIN PINK1 - #define DIO63_RPORT PINK - #define DIO63_WPORT PORTK - #define DIO63_DDR DDRK - #define DIO63_PWM NULL - - #define DIO64_PIN PINK2 - #define DIO64_RPORT PINK - #define DIO64_WPORT PORTK - #define DIO64_DDR DDRK - #define DIO64_PWM NULL - - #define DIO65_PIN PINK3 - #define DIO65_RPORT PINK - #define DIO65_WPORT PORTK - #define DIO65_DDR DDRK - #define DIO65_PWM NULL - - #define DIO66_PIN PINK4 - #define DIO66_RPORT PINK - #define DIO66_WPORT PORTK - #define DIO66_DDR DDRK - #define DIO66_PWM NULL - - #define DIO67_PIN PINK5 - #define DIO67_RPORT PINK - #define DIO67_WPORT PORTK - #define DIO67_DDR DDRK - #define DIO67_PWM NULL - - #define DIO68_PIN PINK6 - #define DIO68_RPORT PINK - #define DIO68_WPORT PORTK - #define DIO68_DDR DDRK - #define DIO68_PWM NULL - - #define DIO69_PIN PINK7 - #define DIO69_RPORT PINK - #define DIO69_WPORT PORTK - #define DIO69_DDR DDRK - #define DIO69_PWM NULL - - #define DIO70_PIN PING4 - #define DIO70_RPORT PING - #define DIO70_WPORT PORTG - #define DIO70_DDR DDRG - #define DIO70_PWM NULL - - #define DIO71_PIN PING3 - #define DIO71_RPORT PING - #define DIO71_WPORT PORTG - #define DIO71_DDR DDRG - #define DIO71_PWM NULL - - #define DIO72_PIN PINJ2 - #define DIO72_RPORT PINJ - #define DIO72_WPORT PORTJ - #define DIO72_DDR DDRJ - #define DIO72_PWM NULL - - #define DIO73_PIN PINJ3 - #define DIO73_RPORT PINJ - #define DIO73_WPORT PORTJ - #define DIO73_DDR DDRJ - #define DIO73_PWM NULL - - #define DIO74_PIN PINJ7 - #define DIO74_RPORT PINJ - #define DIO74_WPORT PORTJ - #define DIO74_DDR DDRJ - #define DIO74_PWM NULL - - #define DIO75_PIN PINJ4 - #define DIO75_RPORT PINJ - #define DIO75_WPORT PORTJ - #define DIO75_DDR DDRJ - #define DIO75_PWM NULL - - #define DIO76_PIN PINJ5 - #define DIO76_RPORT PINJ - #define DIO76_WPORT PORTJ - #define DIO76_DDR DDRJ - #define DIO76_PWM NULL - - #define DIO77_PIN PINJ6 - #define DIO77_RPORT PINJ - #define DIO77_WPORT PORTJ - #define DIO77_DDR DDRJ - #define DIO77_PWM NULL - - #define DIO78_PIN PINE2 - #define DIO78_RPORT PINE - #define DIO78_WPORT PORTE - #define DIO78_DDR DDRE - #define DIO78_PWM NULL - - #define DIO79_PIN PINE6 - #define DIO79_RPORT PINE - #define DIO79_WPORT PORTE - #define DIO79_DDR DDRE - #define DIO79_PWM NULL - - #define DIO80_PIN PINE7 - #define DIO80_RPORT PINE - #define DIO80_WPORT PORTE - #define DIO80_DDR DDRE - #define DIO80_PWM NULL - - #define DIO81_PIN PIND4 - #define DIO81_RPORT PIND - #define DIO81_WPORT PORTD - #define DIO81_DDR DDRD - #define DIO81_PWM NULL - - #define DIO82_PIN PIND5 - #define DIO82_RPORT PIND - #define DIO82_WPORT PORTD - #define DIO82_DDR DDRD - #define DIO82_PWM NULL - - #define DIO83_PIN PIND6 - #define DIO83_RPORT PIND - #define DIO83_WPORT PORTD - #define DIO83_DDR DDRD - #define DIO83_PWM NULL - - #define DIO84_PIN PINH2 - #define DIO84_RPORT PINH - #define DIO84_WPORT PORTH - #define DIO84_DDR DDRH - #define DIO84_PWM NULL - - #define DIO85_PIN PINH7 - #define DIO85_RPORT PINH - #define DIO85_WPORT PORTH - #define DIO85_DDR DDRH - #define DIO85_PWM NULL - - #undef PA0 - #define PA0_PIN PINA0 - #define PA0_RPORT PINA - #define PA0_WPORT PORTA - #define PA0_DDR DDRA - #define PA0_PWM NULL - #undef PA1 - #define PA1_PIN PINA1 - #define PA1_RPORT PINA - #define PA1_WPORT PORTA - #define PA1_DDR DDRA - #define PA1_PWM NULL - #undef PA2 - #define PA2_PIN PINA2 - #define PA2_RPORT PINA - #define PA2_WPORT PORTA - #define PA2_DDR DDRA - #define PA2_PWM NULL - #undef PA3 - #define PA3_PIN PINA3 - #define PA3_RPORT PINA - #define PA3_WPORT PORTA - #define PA3_DDR DDRA - #define PA3_PWM NULL - #undef PA4 - #define PA4_PIN PINA4 - #define PA4_RPORT PINA - #define PA4_WPORT PORTA - #define PA4_DDR DDRA - #define PA4_PWM NULL - #undef PA5 - #define PA5_PIN PINA5 - #define PA5_RPORT PINA - #define PA5_WPORT PORTA - #define PA5_DDR DDRA - #define PA5_PWM NULL - #undef PA6 - #define PA6_PIN PINA6 - #define PA6_RPORT PINA - #define PA6_WPORT PORTA - #define PA6_DDR DDRA - #define PA6_PWM NULL - #undef PA7 - #define PA7_PIN PINA7 - #define PA7_RPORT PINA - #define PA7_WPORT PORTA - #define PA7_DDR DDRA - #define PA7_PWM NULL - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_DDR DDRB - #define PB0_PWM NULL - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_DDR DDRB - #define PB1_PWM NULL - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_DDR DDRB - #define PB2_PWM NULL - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_DDR DDRB - #define PB3_PWM NULL - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_DDR DDRB - #define PB4_PWM &OCR2A - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_DDR DDRB - #define PB5_PWM NULL - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_DDR DDRB - #define PB6_PWM NULL - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_DDR DDRB - #define PB7_PWM &OCR0A - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_DDR DDRC - #define PC0_PWM NULL - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_DDR DDRC - #define PC1_PWM NULL - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_DDR DDRC - #define PC2_PWM NULL - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_DDR DDRC - #define PC3_PWM NULL - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_DDR DDRC - #define PC4_PWM NULL - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_DDR DDRC - #define PC5_PWM NULL - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_DDR DDRC - #define PC6_PWM NULL - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_DDR DDRC - #define PC7_PWM NULL - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_DDR DDRD - #define PD0_PWM NULL - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_DDR DDRD - #define PD1_PWM NULL - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_DDR DDRD - #define PD2_PWM NULL - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_DDR DDRD - #define PD3_PWM NULL - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_DDR DDRD - #define PD4_PWM NULL - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_DDR DDRD - #define PD5_PWM NULL - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_DDR DDRD - #define PD6_PWM NULL - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_DDR DDRD - #define PD7_PWM NULL - - #undef PE0 - #define PE0_PIN PINE0 - #define PE0_RPORT PINE - #define PE0_WPORT PORTE - #define PE0_DDR DDRE - #define PE0_PWM NULL - #undef PE1 - #define PE1_PIN PINE1 - #define PE1_RPORT PINE - #define PE1_WPORT PORTE - #define PE1_DDR DDRE - #define PE1_PWM NULL - #undef PE2 - #define PE2_PIN PINE2 - #define PE2_RPORT PINE - #define PE2_WPORT PORTE - #define PE2_DDR DDRE - #define PE2_PWM NULL - #undef PE3 - #define PE3_PIN PINE3 - #define PE3_RPORT PINE - #define PE3_WPORT PORTE - #define PE3_DDR DDRE - #define PE3_PWM &OCR3AL - #undef PE4 - #define PE4_PIN PINE4 - #define PE4_RPORT PINE - #define PE4_WPORT PORTE - #define PE4_DDR DDRE - #define PE4_PWM &OCR3BL - #undef PE5 - #define PE5_PIN PINE5 - #define PE5_RPORT PINE - #define PE5_WPORT PORTE - #define PE5_DDR DDRE - #define PE5_PWM &OCR3CL - #undef PE6 - #define PE6_PIN PINE6 - #define PE6_RPORT PINE - #define PE6_WPORT PORTE - #define PE6_DDR DDRE - #define PE6_PWM NULL - #undef PE7 - #define PE7_PIN PINE7 - #define PE7_RPORT PINE - #define PE7_WPORT PORTE - #define PE7_DDR DDRE - #define PE7_PWM NULL - - #undef PF0 - #define PF0_PIN PINF0 - #define PF0_RPORT PINF - #define PF0_WPORT PORTF - #define PF0_DDR DDRF - #define PF0_PWM NULL - #undef PF1 - #define PF1_PIN PINF1 - #define PF1_RPORT PINF - #define PF1_WPORT PORTF - #define PF1_DDR DDRF - #define PF1_PWM NULL - #undef PF2 - #define PF2_PIN PINF2 - #define PF2_RPORT PINF - #define PF2_WPORT PORTF - #define PF2_DDR DDRF - #define PF2_PWM NULL - #undef PF3 - #define PF3_PIN PINF3 - #define PF3_RPORT PINF - #define PF3_WPORT PORTF - #define PF3_DDR DDRF - #define PF3_PWM NULL - #undef PF4 - #define PF4_PIN PINF4 - #define PF4_RPORT PINF - #define PF4_WPORT PORTF - #define PF4_DDR DDRF - #define PF4_PWM NULL - #undef PF5 - #define PF5_PIN PINF5 - #define PF5_RPORT PINF - #define PF5_WPORT PORTF - #define PF5_DDR DDRF - #define PF5_PWM NULL - #undef PF6 - #define PF6_PIN PINF6 - #define PF6_RPORT PINF - #define PF6_WPORT PORTF - #define PF6_DDR DDRF - #define PF6_PWM NULL - #undef PF7 - #define PF7_PIN PINF7 - #define PF7_RPORT PINF - #define PF7_WPORT PORTF - #define PF7_DDR DDRF - #define PF7_PWM NULL - - #undef PG0 - #define PG0_PIN PING0 - #define PG0_RPORT PING - #define PG0_WPORT PORTG - #define PG0_DDR DDRG - #define PG0_PWM NULL - #undef PG1 - #define PG1_PIN PING1 - #define PG1_RPORT PING - #define PG1_WPORT PORTG - #define PG1_DDR DDRG - #define PG1_PWM NULL - #undef PG2 - #define PG2_PIN PING2 - #define PG2_RPORT PING - #define PG2_WPORT PORTG - #define PG2_DDR DDRG - #define PG2_PWM NULL - #undef PG3 - #define PG3_PIN PING3 - #define PG3_RPORT PING - #define PG3_WPORT PORTG - #define PG3_DDR DDRG - #define PG3_PWM NULL - #undef PG4 - #define PG4_PIN PING4 - #define PG4_RPORT PING - #define PG4_WPORT PORTG - #define PG4_DDR DDRG - #define PG4_PWM NULL - #undef PG5 - #define PG5_PIN PING5 - #define PG5_RPORT PING - #define PG5_WPORT PORTG - #define PG5_DDR DDRG - #define PG5_PWM &OCR0B - #undef PG6 - #define PG6_PIN PING6 - #define PG6_RPORT PING - #define PG6_WPORT PORTG - #define PG6_DDR DDRG - #define PG6_PWM NULL - #undef PG7 - #define PG7_PIN PING7 - #define PG7_RPORT PING - #define PG7_WPORT PORTG - #define PG7_DDR DDRG - #define PG7_PWM NULL - - #undef PH0 - #define PH0_PIN PINH0 - #define PH0_RPORT PINH - #define PH0_WPORT PORTH - #define PH0_DDR DDRH - #define PH0_PWM NULL - #undef PH1 - #define PH1_PIN PINH1 - #define PH1_RPORT PINH - #define PH1_WPORT PORTH - #define PH1_DDR DDRH - #define PH1_PWM NULL - #undef PH2 - #define PH2_PIN PINH2 - #define PH2_RPORT PINH - #define PH2_WPORT PORTH - #define PH2_DDR DDRH - #define PH2_PWM NULL - #undef PH3 - #define PH3_PIN PINH3 - #define PH3_RPORT PINH - #define PH3_WPORT PORTH - #define PH3_DDR DDRH - #define PH3_PWM &OCR4AL - #undef PH4 - #define PH4_PIN PINH4 - #define PH4_RPORT PINH - #define PH4_WPORT PORTH - #define PH4_DDR DDRH - #define PH4_PWM &OCR4BL - #undef PH5 - #define PH5_PIN PINH5 - #define PH5_RPORT PINH - #define PH5_WPORT PORTH - #define PH5_DDR DDRH - #define PH5_PWM &OCR4CL - #undef PH6 - #define PH6_PIN PINH6 - #define PH6_RPORT PINH - #define PH6_WPORT PORTH - #define PH6_DDR DDRH - #define PH6_PWM &OCR2B - #undef PH7 - #define PH7_PIN PINH7 - #define PH7_RPORT PINH - #define PH7_WPORT PORTH - #define PH7_DDR DDRH - #define PH7_PWM NULL - - #undef PJ0 - #define PJ0_PIN PINJ0 - #define PJ0_RPORT PINJ - #define PJ0_WPORT PORTJ - #define PJ0_DDR DDRJ - #define PJ0_PWM NULL - #undef PJ1 - #define PJ1_PIN PINJ1 - #define PJ1_RPORT PINJ - #define PJ1_WPORT PORTJ - #define PJ1_DDR DDRJ - #define PJ1_PWM NULL - #undef PJ2 - #define PJ2_PIN PINJ2 - #define PJ2_RPORT PINJ - #define PJ2_WPORT PORTJ - #define PJ2_DDR DDRJ - #define PJ2_PWM NULL - #undef PJ3 - #define PJ3_PIN PINJ3 - #define PJ3_RPORT PINJ - #define PJ3_WPORT PORTJ - #define PJ3_DDR DDRJ - #define PJ3_PWM NULL - #undef PJ4 - #define PJ4_PIN PINJ4 - #define PJ4_RPORT PINJ - #define PJ4_WPORT PORTJ - #define PJ4_DDR DDRJ - #define PJ4_PWM NULL - #undef PJ5 - #define PJ5_PIN PINJ5 - #define PJ5_RPORT PINJ - #define PJ5_WPORT PORTJ - #define PJ5_DDR DDRJ - #define PJ5_PWM NULL - #undef PJ6 - #define PJ6_PIN PINJ6 - #define PJ6_RPORT PINJ - #define PJ6_WPORT PORTJ - #define PJ6_DDR DDRJ - #define PJ6_PWM NULL - #undef PJ7 - #define PJ7_PIN PINJ7 - #define PJ7_RPORT PINJ - #define PJ7_WPORT PORTJ - #define PJ7_DDR DDRJ - #define PJ7_PWM NULL - - #undef PK0 - #define PK0_PIN PINK0 - #define PK0_RPORT PINK - #define PK0_WPORT PORTK - #define PK0_DDR DDRK - #define PK0_PWM NULL - #undef PK1 - #define PK1_PIN PINK1 - #define PK1_RPORT PINK - #define PK1_WPORT PORTK - #define PK1_DDR DDRK - #define PK1_PWM NULL - #undef PK2 - #define PK2_PIN PINK2 - #define PK2_RPORT PINK - #define PK2_WPORT PORTK - #define PK2_DDR DDRK - #define PK2_PWM NULL - #undef PK3 - #define PK3_PIN PINK3 - #define PK3_RPORT PINK - #define PK3_WPORT PORTK - #define PK3_DDR DDRK - #define PK3_PWM NULL - #undef PK4 - #define PK4_PIN PINK4 - #define PK4_RPORT PINK - #define PK4_WPORT PORTK - #define PK4_DDR DDRK - #define PK4_PWM NULL - #undef PK5 - #define PK5_PIN PINK5 - #define PK5_RPORT PINK - #define PK5_WPORT PORTK - #define PK5_DDR DDRK - #define PK5_PWM NULL - #undef PK6 - #define PK6_PIN PINK6 - #define PK6_RPORT PINK - #define PK6_WPORT PORTK - #define PK6_DDR DDRK - #define PK6_PWM NULL - #undef PK7 - #define PK7_PIN PINK7 - #define PK7_RPORT PINK - #define PK7_WPORT PORTK - #define PK7_DDR DDRK - #define PK7_PWM NULL - - #undef PL0 - #define PL0_PIN PINL0 - #define PL0_RPORT PINL - #define PL0_WPORT PORTL - #define PL0_DDR DDRL - #define PL0_PWM NULL - #undef PL1 - #define PL1_PIN PINL1 - #define PL1_RPORT PINL - #define PL1_WPORT PORTL - #define PL1_DDR DDRL - #define PL1_PWM NULL - #undef PL2 - #define PL2_PIN PINL2 - #define PL2_RPORT PINL - #define PL2_WPORT PORTL - #define PL2_DDR DDRL - #define PL2_PWM NULL - #undef PL3 - #define PL3_PIN PINL3 - #define PL3_RPORT PINL - #define PL3_WPORT PORTL - #define PL3_DDR DDRL - #define PL3_PWM &OCR5AL - #undef PL4 - #define PL4_PIN PINL4 - #define PL4_RPORT PINL - #define PL4_WPORT PORTL - #define PL4_DDR DDRL - #define PL4_PWM &OCR5BL - #undef PL5 - #define PL5_PIN PINL5 - #define PL5_RPORT PINL - #define PL5_WPORT PORTL - #define PL5_DDR DDRL - #define PL5_PWM &OCR5CL - #undef PL6 - #define PL6_PIN PINL6 - #define PL6_RPORT PINL - #define PL6_WPORT PORTL - #define PL6_DDR DDRL - #define PL6_PWM NULL - #undef PL7 - #define PL7_PIN PINL7 - #define PL7_RPORT PINL - #define PL7_WPORT PORTL - #define PL7_DDR DDRL - #define PL7_PWM NULL - -#endif - -#if defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) - - // change for your board - #define DEBUG_LED DIO31 /* led D5 red */ - - /** - pins - */ - - //#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments - #ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments - - // SPI - #define SCK DIO9 // 21 - #define MISO DIO11 // 23 - #define MOSI DIO10 // 22 - #define SS DIO8 // 20 - - #define DIO0_PIN PINA0 - #define DIO0_RPORT PINA - #define DIO0_WPORT PORTA - #define DIO0_PWM NULL - #define DIO0_DDR DDRA - - #define DIO1_PIN PINA1 - #define DIO1_RPORT PINA - #define DIO1_WPORT PORTA - #define DIO1_PWM NULL - #define DIO1_DDR DDRA - - #define DIO2_PIN PINA2 - #define DIO2_RPORT PINA - #define DIO2_WPORT PORTA - #define DIO2_PWM NULL - #define DIO2_DDR DDRA - - #define DIO3_PIN PINA3 - #define DIO3_RPORT PINA - #define DIO3_WPORT PORTA - #define DIO3_PWM NULL - #define DIO3_DDR DDRA - - #define DIO4_PIN PINA4 - #define DIO4_RPORT PINA - #define DIO4_WPORT PORTA - #define DIO4_PWM NULL - #define DIO4_DDR DDRA - - #define DIO5_PIN PINA5 - #define DIO5_RPORT PINA - #define DIO5_WPORT PORTA - #define DIO5_PWM NULL - #define DIO5_DDR DDRA - - #define DIO6_PIN PINA6 - #define DIO6_RPORT PINA - #define DIO6_WPORT PORTA - #define DIO6_PWM NULL - #define DIO6_DDR DDRA - - #define DIO7_PIN PINA7 - #define DIO7_RPORT PINA - #define DIO7_WPORT PORTA - #define DIO7_PWM NULL - #define DIO7_DDR DDRA - - #define DIO8_PIN PINB0 - #define DIO8_RPORT PINB - #define DIO8_WPORT PORTB - #define DIO8_PWM NULL - #define DIO8_DDR DDRB - - #define DIO9_PIN PINB1 - #define DIO9_RPORT PINB - #define DIO9_WPORT PORTB - #define DIO9_PWM NULL - #define DIO9_DDR DDRB - - #define DIO10_PIN PINB2 - #define DIO10_RPORT PINB - #define DIO10_WPORT PORTB - #define DIO10_PWM NULL - #define DIO10_DDR DDRB - - #define DIO11_PIN PINB3 - #define DIO11_RPORT PINB - #define DIO11_WPORT PORTB - #define DIO11_PWM NULL - #define DIO11_DDR DDRB - - #define DIO12_PIN PINB4 - #define DIO12_RPORT PINB - #define DIO12_WPORT PORTB - #define DIO12_PWM NULL - #define DIO12_DDR DDRB - - #define DIO13_PIN PINB5 - #define DIO13_RPORT PINB - #define DIO13_WPORT PORTB - #define DIO13_PWM NULL - #define DIO13_DDR DDRB - - #define DIO14_PIN PINB6 - #define DIO14_RPORT PINB - #define DIO14_WPORT PORTB - #define DIO14_PWM NULL - #define DIO14_DDR DDRB - - #define DIO15_PIN PINB7 - #define DIO15_RPORT PINB - #define DIO15_WPORT PORTB - #define DIO15_PWM NULL - #define DIO15_DDR DDRB - - #define DIO16_PIN PINC0 - #define DIO16_RPORT PINC - #define DIO16_WPORT PORTC - #define DIO16_PWM NULL - #define DIO16_DDR DDRC - - #define DIO17_PIN PINC1 - #define DIO17_RPORT PINC - #define DIO17_WPORT PORTC - #define DIO17_PWM NULL - #define DIO17_DDR DDRC - - #define DIO18_PIN PINC2 - #define DIO18_RPORT PINC - #define DIO18_WPORT PORTC - #define DIO18_PWM NULL - #define DIO18_DDR DDRC - - #define DIO19_PIN PINC3 - #define DIO19_RPORT PINC - #define DIO19_WPORT PORTC - #define DIO19_PWM NULL - #define DIO19_DDR DDRC - - #define DIO20_PIN PINC4 - #define DIO20_RPORT PINC - #define DIO20_WPORT PORTC - #define DIO20_PWM NULL - #define DIO20_DDR DDRC - - #define DIO21_PIN PINC5 - #define DIO21_RPORT PINC - #define DIO21_WPORT PORTC - #define DIO21_PWM NULL - #define DIO21_DDR DDRC - - #define DIO22_PIN PINC6 - #define DIO22_RPORT PINC - #define DIO22_WPORT PORTC - #define DIO22_PWM NULL - #define DIO22_DDR DDRC - - #define DIO23_PIN PINC7 - #define DIO23_RPORT PINC - #define DIO23_WPORT PORTC - #define DIO23_PWM NULL - #define DIO23_DDR DDRC - - #define DIO24_PIN PIND0 - #define DIO24_RPORT PIND - #define DIO24_WPORT PORTD - #define DIO24_PWM NULL - #define DIO24_DDR DDRD - - #define DIO25_PIN PIND1 - #define DIO25_RPORT PIND - #define DIO25_WPORT PORTD - #define DIO25_PWM NULL - #define DIO25_DDR DDRD - - #define DIO26_PIN PIND2 - #define DIO26_RPORT PIND - #define DIO26_WPORT PORTD - #define DIO26_PWM NULL - #define DIO26_DDR DDRD - - #define DIO27_PIN PIND3 - #define DIO27_RPORT PIND - #define DIO27_WPORT PORTD - #define DIO27_PWM NULL - #define DIO27_DDR DDRD - - #define DIO28_PIN PIND4 - #define DIO28_RPORT PIND - #define DIO28_WPORT PORTD - #define DIO28_PWM NULL - #define DIO28_DDR DDRD - - #define DIO29_PIN PIND5 - #define DIO29_RPORT PIND - #define DIO29_WPORT PORTD - #define DIO29_PWM NULL - #define DIO29_DDR DDRD - - #define DIO30_PIN PIND6 - #define DIO30_RPORT PIND - #define DIO30_WPORT PORTD - #define DIO30_PWM NULL - #define DIO30_DDR DDRD - - #define DIO31_PIN PIND7 - #define DIO31_RPORT PIND - #define DIO31_WPORT PORTD - #define DIO31_PWM NULL - #define DIO31_DDR DDRD - - - #define DIO32_PIN PINE0 - #define DIO32_RPORT PINE - #define DIO32_WPORT PORTE - #define DIO32_PWM NULL - #define DIO32_DDR DDRE - - #define DIO33_PIN PINE1 - #define DIO33_RPORT PINE - #define DIO33_WPORT PORTE - #define DIO33_PWM NULL - #define DIO33_DDR DDRE - - #define DIO34_PIN PINE2 - #define DIO34_RPORT PINE - #define DIO34_WPORT PORTE - #define DIO34_PWM NULL - #define DIO34_DDR DDRE - - #define DIO35_PIN PINE3 - #define DIO35_RPORT PINE - #define DIO35_WPORT PORTE - #define DIO35_PWM NULL - #define DIO35_DDR DDRE - - #define DIO36_PIN PINE4 - #define DIO36_RPORT PINE - #define DIO36_WPORT PORTE - #define DIO36_PWM NULL - #define DIO36_DDR DDRE - - #define DIO37_PIN PINE5 - #define DIO37_RPORT PINE - #define DIO37_WPORT PORTE - #define DIO37_PWM NULL - #define DIO37_DDR DDRE - - #define DIO38_PIN PINE6 - #define DIO38_RPORT PINE - #define DIO38_WPORT PORTE - #define DIO38_PWM NULL - #define DIO38_DDR DDRE - - #define DIO39_PIN PINE7 - #define DIO39_RPORT PINE - #define DIO39_WPORT PORTE - #define DIO39_PWM NULL - #define DIO39_DDR DDRE - - #define AIO0_PIN PINF0 - #define AIO0_RPORT PINF - #define AIO0_WPORT PORTF - #define AIO0_PWM NULL - #define AIO0_DDR DDRF - - #define AIO1_PIN PINF1 - #define AIO1_RPORT PINF - #define AIO1_WPORT PORTF - #define AIO1_PWM NULL - #define AIO1_DDR DDRF - - #define AIO2_PIN PINF2 - #define AIO2_RPORT PINF - #define AIO2_WPORT PORTF - #define AIO2_PWM NULL - #define AIO2_DDR DDRF - - #define AIO3_PIN PINF3 - #define AIO3_RPORT PINF - #define AIO3_WPORT PORTF - #define AIO3_PWM NULL - #define AIO3_DDR DDRF - - #define AIO4_PIN PINF4 - #define AIO4_RPORT PINF - #define AIO4_WPORT PORTF - #define AIO4_PWM NULL - #define AIO4_DDR DDRF - - #define AIO5_PIN PINF5 - #define AIO5_RPORT PINF - #define AIO5_WPORT PORTF - #define AIO5_PWM NULL - #define AIO5_DDR DDRF - - #define AIO6_PIN PINF6 - #define AIO6_RPORT PINF - #define AIO6_WPORT PORTF - #define AIO6_PWM NULL - #define AIO6_DDR DDRF - - #define AIO7_PIN PINF7 - #define AIO7_RPORT PINF - #define AIO7_WPORT PORTF - #define AIO7_PWM NULL - #define AIO7_DDR DDRF - - #define DIO40_PIN PINF0 - #define DIO40_RPORT PINF - #define DIO40_WPORT PORTF - #define DIO40_PWM NULL - #define DIO40_DDR DDRF - - #define DIO41_PIN PINF1 - #define DIO41_RPORT PINF - #define DIO41_WPORT PORTF - #define DIO41_PWM NULL - #define DIO41_DDR DDRF - - #define DIO42_PIN PINF2 - #define DIO42_RPORT PINF - #define DIO42_WPORT PORTF - #define DIO42_PWM NULL - #define DIO42_DDR DDRF - - #define DIO43_PIN PINF3 - #define DIO43_RPORT PINF - #define DIO43_WPORT PORTF - #define DIO43_PWM NULL - #define DIO43_DDR DDRF - - #define DIO44_PIN PINF4 - #define DIO44_RPORT PINF - #define DIO44_WPORT PORTF - #define DIO44_PWM NULL - #define DIO44_DDR DDRF - - #define DIO45_PIN PINF5 - #define DIO45_RPORT PINF - #define DIO45_WPORT PORTF - #define DIO45_PWM NULL - #define DIO45_DDR DDRF - - #define DIO46_PIN PINF6 - #define DIO46_RPORT PINF - #define DIO46_WPORT PORTF - #define DIO46_PWM NULL - #define DIO46_DDR DDRF - - #define DIO47_PIN PINF7 - #define DIO47_RPORT PINF - #define DIO47_WPORT PORTF - #define DIO47_PWM NULL - #define DIO47_DDR DDRF - - - - #undef PA0 - #define PA0_PIN PINA0 - #define PA0_RPORT PINA - #define PA0_WPORT PORTA - #define PA0_PWM NULL - #define PA0_DDR DDRA - #undef PA1 - #define PA1_PIN PINA1 - #define PA1_RPORT PINA - #define PA1_WPORT PORTA - #define PA1_PWM NULL - #define PA1_DDR DDRA - #undef PA2 - #define PA2_PIN PINA2 - #define PA2_RPORT PINA - #define PA2_WPORT PORTA - #define PA2_PWM NULL - #define PA2_DDR DDRA - #undef PA3 - #define PA3_PIN PINA3 - #define PA3_RPORT PINA - #define PA3_WPORT PORTA - #define PA3_PWM NULL - #define PA3_DDR DDRA - #undef PA4 - #define PA4_PIN PINA4 - #define PA4_RPORT PINA - #define PA4_WPORT PORTA - #define PA4_PWM NULL - #define PA4_DDR DDRA - #undef PA5 - #define PA5_PIN PINA5 - #define PA5_RPORT PINA - #define PA5_WPORT PORTA - #define PA5_PWM NULL - #define PA5_DDR DDRA - #undef PA6 - #define PA6_PIN PINA6 - #define PA6_RPORT PINA - #define PA6_WPORT PORTA - #define PA6_PWM NULL - #define PA6_DDR DDRA - #undef PA7 - #define PA7_PIN PINA7 - #define PA7_RPORT PINA - #define PA7_WPORT PORTA - #define PA7_PWM NULL - #define PA7_DDR DDRA - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_PWM NULL - #define PB0_DDR DDRB - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_PWM NULL - #define PB1_DDR DDRB - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_PWM NULL - #define PB2_DDR DDRB - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_PWM NULL - #define PB3_DDR DDRB - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_PWM NULL - #define PB4_DDR DDRB - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_PWM NULL - #define PB5_DDR DDRB - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_PWM NULL - #define PB6_DDR DDRB - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_PWM NULL - #define PB7_DDR DDRB - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_PWM NULL - #define PC0_DDR DDRC - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_PWM NULL - #define PC1_DDR DDRC - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_PWM NULL - #define PC2_DDR DDRC - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_PWM NULL - #define PC3_DDR DDRC - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_PWM NULL - #define PC4_DDR DDRC - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_PWM NULL - #define PC5_DDR DDRC - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_PWM NULL - #define PC6_DDR DDRC - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_PWM NULL - #define PC7_DDR DDRC - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_PWM NULL - #define PD0_DDR DDRD - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_PWM NULL - #define PD1_DDR DDRD - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_PWM NULL - #define PD2_DDR DDRD - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_PWM NULL - #define PD3_DDR DDRD - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_PWM NULL - #define PD4_DDR DDRD - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_PWM NULL - #define PD5_DDR DDRD - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_PWM NULL - #define PD6_DDR DDRD - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_PWM NULL - #define PD7_DDR DDRD - - #undef PE0 - #define PE0_PIN PINE0 - #define PE0_RPORT PINE - #define PE0_WPORT PORTE - #define PE0_PWM NULL - #define PE0_DDR DDRE - #undef PE1 - #define PE1_PIN PINE1 - #define PE1_RPORT PINE - #define PE1_WPORT PORTE - #define PE1_PWM NULL - #define PE1_DDR DDRE - #undef PE2 - #define PE2_PIN PINE2 - #define PE2_RPORT PINE - #define PE2_WPORT PORTE - #define PE2_PWM NULL - #define PE2_DDR DDRE - #undef PE3 - #define PE3_PIN PINE3 - #define PE3_RPORT PINE - #define PE3_WPORT PORTE - #define PE3_PWM NULL - #define PE3_DDR DDRE - #undef PE4 - #define PE4_PIN PINE4 - #define PE4_RPORT PINE - #define PE4_WPORT PORTE - #define PE4_PWM NULL - #define PE4_DDR DDRE - #undef PE5 - #define PE5_PIN PINE5 - #define PE5_RPORT PINE - #define PE5_WPORT PORTE - #define PE5_PWM NULL - #define PE5_DDR DDRE - #undef PE6 - #define PE6_PIN PINE6 - #define PE6_RPORT PINE - #define PE6_WPORT PORTE - #define PE6_PWM NULL - #define PE6_DDR DDRE - #undef PE7 - #define PE7_PIN PINE7 - #define PE7_RPORT PINE - #define PE7_WPORT PORTE - #define PE7_PWM NULL - #define PE7_DDR DDRE - - #undef PF0 - #define PF0_PIN PINF0 - #define PF0_RPORT PINF - #define PF0_WPORT PORTF - #define PF0_PWM NULL - #define PF0_DDR DDRF - #undef PF1 - #define PF1_PIN PINF1 - #define PF1_RPORT PINF - #define PF1_WPORT PORTF - #define PF1_PWM NULL - #define PF1_DDR DDRF - #undef PF2 - #define PF2_PIN PINF2 - #define PF2_RPORT PINF - #define PF2_WPORT PORTF - #define PF2_PWM NULL - #define PF2_DDR DDRF - #undef PF3 - #define PF3_PIN PINF3 - #define PF3_RPORT PINF - #define PF3_WPORT PORTF - #define PF3_PWM NULL - #define PF3_DDR DDRF - #undef PF4 - #define PF4_PIN PINF4 - #define PF4_RPORT PINF - #define PF4_WPORT PORTF - #define PF4_PWM NULL - #define PF4_DDR DDRF - #undef PF5 - #define PF5_PIN PINF5 - #define PF5_RPORT PINF - #define PF5_WPORT PORTF - #define PF5_PWM NULL - #define PF5_DDR DDRF - #undef PF6 - #define PF6_PIN PINF6 - #define PF6_RPORT PINF - #define PF6_WPORT PORTF - #define PF6_PWM NULL - #define PF6_DDR DDRF - #undef PF7 - #define PF7_PIN PINF7 - #define PF7_RPORT PINF - #define PF7_WPORT PORTF - #define PF7_PWM NULL - #define PF7_DDR DDRF - - #else // AT90USBxx_TEENSYPP_ASSIGNMENTS -- Use Teensyduino Teensy++2.0 assignments. - - /** - - AT90USB 51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54 - Port A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 - Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - Teensy 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45 - The pins 46 and 47 are not supported by Teensyduino, but are supported below. - */ - - // SPI - #define SCK DIO21 // 9 - #define MISO DIO23 // 11 - #define MOSI DIO22 // 10 - #define SS DIO20 // 8 - - #define DIO0_PIN PIND0 - #define DIO0_RPORT PIND - #define DIO0_WPORT PORTD - #define DIO0_PWM NULL - #define DIO0_DDR DDRD - - #define DIO1_PIN PIND1 - #define DIO1_RPORT PIND - #define DIO1_WPORT PORTD - #define DIO1_PWM NULL - #define DIO1_DDR DDRD - - #define DIO2_PIN PIND2 - #define DIO2_RPORT PIND - #define DIO2_WPORT PORTD - #define DIO2_PWM NULL - #define DIO2_DDR DDRD - - #define DIO3_PIN PIND3 - #define DIO3_RPORT PIND - #define DIO3_WPORT PORTD - #define DIO3_PWM NULL - #define DIO3_DDR DDRD - - #define DIO4_PIN PIND4 - #define DIO4_RPORT PIND - #define DIO4_WPORT PORTD - #define DIO4_PWM NULL - #define DIO4_DDR DDRD - - #define DIO5_PIN PIND5 - #define DIO5_RPORT PIND - #define DIO5_WPORT PORTD - #define DIO5_PWM NULL - #define DIO5_DDR DDRD - - #define DIO6_PIN PIND6 - #define DIO6_RPORT PIND - #define DIO6_WPORT PORTD - #define DIO6_PWM NULL - #define DIO6_DDR DDRD - - #define DIO7_PIN PIND7 - #define DIO7_RPORT PIND - #define DIO7_WPORT PORTD - #define DIO7_PWM NULL - #define DIO7_DDR DDRD - - #define DIO8_PIN PINE0 - #define DIO8_RPORT PINE - #define DIO8_WPORT PORTE - #define DIO8_PWM NULL - #define DIO8_DDR DDRE - - #define DIO9_PIN PINE1 - #define DIO9_RPORT PINE - #define DIO9_WPORT PORTE - #define DIO9_PWM NULL - #define DIO9_DDR DDRE - - #define DIO10_PIN PINC0 - #define DIO10_RPORT PINC - #define DIO10_WPORT PORTC - #define DIO10_PWM NULL - #define DIO10_DDR DDRC - - #define DIO11_PIN PINC1 - #define DIO11_RPORT PINC - #define DIO11_WPORT PORTC - #define DIO11_PWM NULL - #define DIO11_DDR DDRC - - #define DIO12_PIN PINC2 - #define DIO12_RPORT PINC - #define DIO12_WPORT PORTC - #define DIO12_PWM NULL - #define DIO12_DDR DDRC - - #define DIO13_PIN PINC3 - #define DIO13_RPORT PINC - #define DIO13_WPORT PORTC - #define DIO13_PWM NULL - #define DIO13_DDR DDRC - - #define DIO14_PIN PINC4 - #define DIO14_RPORT PINC - #define DIO14_WPORT PORTC - #define DIO14_PWM NULL - #define DIO14_DDR DDRC - - #define DIO15_PIN PINC5 - #define DIO15_RPORT PINC - #define DIO15_WPORT PORTC - #define DIO15_PWM NULL - #define DIO15_DDR DDRC - - #define DIO16_PIN PINC6 - #define DIO16_RPORT PINC - #define DIO16_WPORT PORTC - #define DIO16_PWM NULL - #define DIO16_DDR DDRC - - #define DIO17_PIN PINC7 - #define DIO17_RPORT PINC - #define DIO17_WPORT PORTC - #define DIO17_PWM NULL - #define DIO17_DDR DDRC - - #define DIO18_PIN PINE6 - #define DIO18_RPORT PINE - #define DIO18_WPORT PORTE - #define DIO18_PWM NULL - #define DIO18_DDR DDRE - - #define DIO19_PIN PINE7 - #define DIO19_RPORT PINE - #define DIO19_WPORT PORTE - #define DIO19_PWM NULL - #define DIO19_DDR DDRE - - #define DIO20_PIN PINB0 - #define DIO20_RPORT PINB - #define DIO20_WPORT PORTB - #define DIO20_PWM NULL - #define DIO20_DDR DDRB - - #define DIO21_PIN PINB1 - #define DIO21_RPORT PINB - #define DIO21_WPORT PORTB - #define DIO21_PWM NULL - #define DIO21_DDR DDRB - - #define DIO22_PIN PINB2 - #define DIO22_RPORT PINB - #define DIO22_WPORT PORTB - #define DIO22_PWM NULL - #define DIO22_DDR DDRB - - #define DIO23_PIN PINB3 - #define DIO23_RPORT PINB - #define DIO23_WPORT PORTB - #define DIO23_PWM NULL - #define DIO23_DDR DDRB - - #define DIO24_PIN PINB4 - #define DIO24_RPORT PINB - #define DIO24_WPORT PORTB - #define DIO24_PWM NULL - #define DIO24_DDR DDRB - - #define DIO25_PIN PINB5 - #define DIO25_RPORT PINB - #define DIO25_WPORT PORTB - #define DIO25_PWM NULL - #define DIO25_DDR DDRB - - #define DIO26_PIN PINB6 - #define DIO26_RPORT PINB - #define DIO26_WPORT PORTB - #define DIO26_PWM NULL - #define DIO26_DDR DDRB - - #define DIO27_PIN PINB7 - #define DIO27_RPORT PINB - #define DIO27_WPORT PORTB - #define DIO27_PWM NULL - #define DIO27_DDR DDRB - - #define DIO28_PIN PINA0 - #define DIO28_RPORT PINA - #define DIO28_WPORT PORTA - #define DIO28_PWM NULL - #define DIO28_DDR DDRA - - #define DIO29_PIN PINA1 - #define DIO29_RPORT PINA - #define DIO29_WPORT PORTA - #define DIO29_PWM NULL - #define DIO29_DDR DDRA - - #define DIO30_PIN PINA2 - #define DIO30_RPORT PINA - #define DIO30_WPORT PORTA - #define DIO30_PWM NULL - #define DIO30_DDR DDRA - - #define DIO31_PIN PINA3 - #define DIO31_RPORT PINA - #define DIO31_WPORT PORTA - #define DIO31_PWM NULL - #define DIO31_DDR DDRA - - #define DIO32_PIN PINA4 - #define DIO32_RPORT PINA - #define DIO32_WPORT PORTA - #define DIO32_PWM NULL - #define DIO32_DDR DDRA - - #define DIO33_PIN PINA5 - #define DIO33_RPORT PINA - #define DIO33_WPORT PORTA - #define DIO33_PWM NULL - #define DIO33_DDR DDRA - - #define DIO34_PIN PINA6 - #define DIO34_RPORT PINA - #define DIO34_WPORT PORTA - #define DIO34_PWM NULL - #define DIO34_DDR DDRA - - #define DIO35_PIN PINA7 - #define DIO35_RPORT PINA - #define DIO35_WPORT PORTA - #define DIO35_PWM NULL - #define DIO35_DDR DDRA - - #define DIO36_PIN PINE4 - #define DIO36_RPORT PINE - #define DIO36_WPORT PORTE - #define DIO36_PWM NULL - #define DIO36_DDR DDRE - - #define DIO37_PIN PINE5 - #define DIO37_RPORT PINE - #define DIO37_WPORT PORTE - #define DIO37_PWM NULL - #define DIO37_DDR DDRE - - #define DIO38_PIN PINF0 - #define DIO38_RPORT PINF - #define DIO38_WPORT PORTF - #define DIO38_PWM NULL - #define DIO38_DDR DDRF - - #define DIO39_PIN PINF1 - #define DIO39_RPORT PINF - #define DIO39_WPORT PORTF - #define DIO39_PWM NULL - #define DIO39_DDR DDRF - - #define DIO40_PIN PINF2 - #define DIO40_RPORT PINF - #define DIO40_WPORT PORTF - #define DIO40_PWM NULL - #define DIO40_DDR DDRF - - #define DIO41_PIN PINF3 - #define DIO41_RPORT PINF - #define DIO41_WPORT PORTF - #define DIO41_PWM NULL - #define DIO41_DDR DDRF - - #define DIO42_PIN PINF4 - #define DIO42_RPORT PINF - #define DIO42_WPORT PORTF - #define DIO42_PWM NULL - #define DIO42_DDR DDRF - - #define DIO43_PIN PINF5 - #define DIO43_RPORT PINF - #define DIO43_WPORT PORTF - #define DIO43_PWM NULL - #define DIO43_DDR DDRF - - #define DIO44_PIN PINF6 - #define DIO44_RPORT PINF - #define DIO44_WPORT PORTF - #define DIO44_PWM NULL - #define DIO44_DDR DDRF - - #define DIO45_PIN PINF7 - #define DIO45_RPORT PINF - #define DIO45_WPORT PORTF - #define DIO45_PWM NULL - #define DIO45_DDR DDRF - - #define AIO0_PIN PINF0 - #define AIO0_RPORT PINF - #define AIO0_WPORT PORTF - #define AIO0_PWM NULL - #define AIO0_DDR DDRF - - #define AIO1_PIN PINF1 - #define AIO1_RPORT PINF - #define AIO1_WPORT PORTF - #define AIO1_PWM NULL - #define AIO1_DDR DDRF - - #define AIO2_PIN PINF2 - #define AIO2_RPORT PINF - #define AIO2_WPORT PORTF - #define AIO2_PWM NULL - #define AIO2_DDR DDRF - - #define AIO3_PIN PINF3 - #define AIO3_RPORT PINF - #define AIO3_WPORT PORTF - #define AIO3_PWM NULL - #define AIO3_DDR DDRF - - #define AIO4_PIN PINF4 - #define AIO4_RPORT PINF - #define AIO4_WPORT PORTF - #define AIO4_PWM NULL - #define AIO4_DDR DDRF - - #define AIO5_PIN PINF5 - #define AIO5_RPORT PINF - #define AIO5_WPORT PORTF - #define AIO5_PWM NULL - #define AIO5_DDR DDRF - - #define AIO6_PIN PINF6 - #define AIO6_RPORT PINF - #define AIO6_WPORT PORTF - #define AIO6_PWM NULL - #define AIO6_DDR DDRF - - #define AIO7_PIN PINF7 - #define AIO7_RPORT PINF - #define AIO7_WPORT PORTF - #define AIO7_PWM NULL - #define AIO7_DDR DDRF - - //-- Begin not supported by Teensyduino - //-- don't use Arduino functions on these pins pinMode/digitalWrite/etc - #define DIO46_PIN PINE2 - #define DIO46_RPORT PINE - #define DIO46_WPORT PORTE - #define DIO46_PWM NULL - #define DIO46_DDR DDRE - - #define DIO47_PIN PINE3 - #define DIO47_RPORT PINE - #define DIO47_WPORT PORTE - #define DIO47_PWM NULL - #define DIO47_DDR DDRE - //-- end not supported by Teensyduino - - #undef PA0 - #define PA0_PIN PINA0 - #define PA0_RPORT PINA - #define PA0_WPORT PORTA - #define PA0_PWM NULL - #define PA0_DDR DDRA - #undef PA1 - #define PA1_PIN PINA1 - #define PA1_RPORT PINA - #define PA1_WPORT PORTA - #define PA1_PWM NULL - #define PA1_DDR DDRA - #undef PA2 - #define PA2_PIN PINA2 - #define PA2_RPORT PINA - #define PA2_WPORT PORTA - #define PA2_PWM NULL - #define PA2_DDR DDRA - #undef PA3 - #define PA3_PIN PINA3 - #define PA3_RPORT PINA - #define PA3_WPORT PORTA - #define PA3_PWM NULL - #define PA3_DDR DDRA - #undef PA4 - #define PA4_PIN PINA4 - #define PA4_RPORT PINA - #define PA4_WPORT PORTA - #define PA4_PWM NULL - #define PA4_DDR DDRA - #undef PA5 - #define PA5_PIN PINA5 - #define PA5_RPORT PINA - #define PA5_WPORT PORTA - #define PA5_PWM NULL - #define PA5_DDR DDRA - #undef PA6 - #define PA6_PIN PINA6 - #define PA6_RPORT PINA - #define PA6_WPORT PORTA - #define PA6_PWM NULL - #define PA6_DDR DDRA - #undef PA7 - #define PA7_PIN PINA7 - #define PA7_RPORT PINA - #define PA7_WPORT PORTA - #define PA7_PWM NULL - #define PA7_DDR DDRA - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_PWM NULL - #define PB0_DDR DDRB - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_PWM NULL - #define PB1_DDR DDRB - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_PWM NULL - #define PB2_DDR DDRB - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_PWM NULL - #define PB3_DDR DDRB - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_PWM NULL - #define PB4_DDR DDRB - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_PWM NULL - #define PB5_DDR DDRB - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_PWM NULL - #define PB6_DDR DDRB - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_PWM NULL - #define PB7_DDR DDRB - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_PWM NULL - #define PC0_DDR DDRC - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_PWM NULL - #define PC1_DDR DDRC - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_PWM NULL - #define PC2_DDR DDRC - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_PWM NULL - #define PC3_DDR DDRC - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_PWM NULL - #define PC4_DDR DDRC - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_PWM NULL - #define PC5_DDR DDRC - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_PWM NULL - #define PC6_DDR DDRC - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_PWM NULL - #define PC7_DDR DDRC - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_PWM NULL - #define PD0_DDR DDRD - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_PWM NULL - #define PD1_DDR DDRD - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_PWM NULL - #define PD2_DDR DDRD - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_PWM NULL - #define PD3_DDR DDRD - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_PWM NULL - #define PD4_DDR DDRD - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_PWM NULL - #define PD5_DDR DDRD - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_PWM NULL - #define PD6_DDR DDRD - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_PWM NULL - #define PD7_DDR DDRD - - #undef PE0 - #define PE0_PIN PINE0 - #define PE0_RPORT PINE - #define PE0_WPORT PORTE - #define PE0_PWM NULL - #define PE0_DDR DDRE - #undef PE1 - #define PE1_PIN PINE1 - #define PE1_RPORT PINE - #define PE1_WPORT PORTE - #define PE1_PWM NULL - #define PE1_DDR DDRE - #undef PE2 - #define PE2_PIN PINE2 - #define PE2_RPORT PINE - #define PE2_WPORT PORTE - #define PE2_PWM NULL - #define PE2_DDR DDRE - #undef PE3 - #define PE3_PIN PINE3 - #define PE3_RPORT PINE - #define PE3_WPORT PORTE - #define PE3_PWM NULL - #define PE3_DDR DDRE - #undef PE4 - #define PE4_PIN PINE4 - #define PE4_RPORT PINE - #define PE4_WPORT PORTE - #define PE4_PWM NULL - #define PE4_DDR DDRE - #undef PE5 - #define PE5_PIN PINE5 - #define PE5_RPORT PINE - #define PE5_WPORT PORTE - #define PE5_PWM NULL - #define PE5_DDR DDRE - #undef PE6 - #define PE6_PIN PINE6 - #define PE6_RPORT PINE - #define PE6_WPORT PORTE - #define PE6_PWM NULL - #define PE6_DDR DDRE - #undef PE7 - #define PE7_PIN PINE7 - #define PE7_RPORT PINE - #define PE7_WPORT PORTE - #define PE7_PWM NULL - #define PE7_DDR DDRE - - #undef PF0 - #define PF0_PIN PINF0 - #define PF0_RPORT PINF - #define PF0_WPORT PORTF - #define PF0_PWM NULL - #define PF0_DDR DDRF - #undef PF1 - #define PF1_PIN PINF1 - #define PF1_RPORT PINF - #define PF1_WPORT PORTF - #define PF1_PWM NULL - #define PF1_DDR DDRF - #undef PF2 - #define PF2_PIN PINF2 - #define PF2_RPORT PINF - #define PF2_WPORT PORTF - #define PF2_PWM NULL - #define PF2_DDR DDRF - #undef PF3 - #define PF3_PIN PINF3 - #define PF3_RPORT PINF - #define PF3_WPORT PORTF - #define PF3_PWM NULL - #define PF3_DDR DDRF - #undef PF4 - #define PF4_PIN PINF4 - #define PF4_RPORT PINF - #define PF4_WPORT PORTF - #define PF4_PWM NULL - #define PF4_DDR DDRF - #undef PF5 - #define PF5_PIN PINF5 - #define PF5_RPORT PINF - #define PF5_WPORT PORTF - #define PF5_PWM NULL - #define PF5_DDR DDRF - #undef PF6 - #define PF6_PIN PINF6 - #define PF6_RPORT PINF - #define PF6_WPORT PORTF - #define PF6_PWM NULL - #define PF6_DDR DDRF - #undef PF7 - #define PF7_PIN PINF7 - #define PF7_RPORT PINF - #define PF7_WPORT PORTF - #define PF7_PWM NULL - #define PF7_DDR DDRF - - #endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments -#endif // __AVR_AT90usbxxx__ - - -#if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) - // UART - #define RXD DIO0 - #define TXD DIO1 - - // SPI - #define SCK DIO10 - #define MISO DIO12 - #define MOSI DIO11 - #define SS DIO16 - - // TWI (I2C) - #define SCL DIO17 - #define SDA DIO18 - - // timers and PWM - #define OC0A DIO9 - #define OC0B DIO4 - #define OC1A DIO7 - #define OC1B DIO8 - #define OC2A DIO6 - #define OC3A DIO5 - #define OC3B DIO2 - #define OC3C DIO3 - - - // change for your board - #define DEBUG_LED DIO46 - - /** - pins - */ - #define DIO0_PIN PINE0 - #define DIO0_RPORT PINE - #define DIO0_WPORT PORTE - #define DIO0_DDR DDRE - #define DIO0_PWM NULL - - #define DIO1_PIN PINE1 - #define DIO1_RPORT PINE - #define DIO1_WPORT PORTE - #define DIO1_DDR DDRE - #define DIO1_PWM NULL - - #define DIO2_PIN PINE4 - #define DIO2_RPORT PINE - #define DIO2_WPORT PORTE - #define DIO2_DDR DDRE - #define DIO2_PWM &OCR3BL - - #define DIO3_PIN PINE5 - #define DIO3_RPORT PINE - #define DIO3_WPORT PORTE - #define DIO3_DDR DDRE - #define DIO3_PWM &OCR3CL - - #define DIO4_PIN PING5 - #define DIO4_RPORT PING - #define DIO4_WPORT PORTG - #define DIO4_DDR DDRG - #define DIO4_PWM &OCR0B - - #define DIO5_PIN PINE3 - #define DIO5_RPORT PINE - #define DIO5_WPORT PORTE - #define DIO5_DDR DDRE - #define DIO5_PWM &OCR3AL - - #define DIO6_PIN PINB4 - #define DIO6_RPORT PINB - #define DIO6_WPORT PORTB - #define DIO6_DDR DDRB - #define DIO6_PWM &OCR2AL - - #define DIO7_PIN PINB5 - #define DIO7_RPORT PINB - #define DIO7_WPORT PORTB - #define DIO7_DDR DDRB - #define DIO7_PWM &OCR1AL - - #define DIO8_PIN PINB6 - #define DIO8_RPORT PINB - #define DIO8_WPORT PORTB - #define DIO8_DDR DDRB - #define DIO8_PWM &OCR1BL - - #define DIO9_PIN PINB7 - #define DIO9_RPORT PINB - #define DIO9_WPORT PORTB - #define DIO9_DDR DDRB - #define DIO9_PWM &OCR0AL - - #define DIO10_PIN PINB1 - #define DIO10_RPORT PINB - #define DIO10_WPORT PORTB - #define DIO10_DDR DDRB - #define DIO10_PWM NULL - - #define DIO11_PIN PINB2 - #define DIO11_RPORT PINB - #define DIO11_WPORT PORTB - #define DIO11_DDR DDRB - #define DIO11_PWM NULL - - #define DIO12_PIN PINB3 - #define DIO12_RPORT PINB - #define DIO12_WPORT PORTB - #define DIO12_DDR DDRB - #define DIO12_PWM NULL - - #define DIO13_PIN PINE2 - #define DIO13_RPORT PINE - #define DIO13_WPORT PORTE - #define DIO13_DDR DDRE - #define DIO13_PWM NULL - - #define DIO14_PIN PINE6 - #define DIO14_RPORT PINE - #define DIO14_WPORT PORTE - #define DIO14_DDR DDRE - #define DIO14_PWM NULL - - #define DIO15_PIN PINE7 - #define DIO15_RPORT PINE - #define DIO15_WPORT PORTE - #define DIO15_DDR DDRE - #define DIO15_PWM NULL - - #define DIO16_PIN PINB0 - #define DIO16_RPORT PINB - #define DIO16_WPORT PORTB - #define DIO16_DDR DDRB - #define DIO16_PWM NULL - - #define DIO17_PIN PIND0 - #define DIO17_RPORT PIND - #define DIO17_WPORT PORTD - #define DIO17_DDR DDRD - #define DIO17_PWM NULL - - #define DIO18_PIN PIND1 - #define DIO18_RPORT PIND - #define DIO18_WPORT PORTD - #define DIO18_DDR DDRD - #define DIO18_PWM NULL - - #define DIO19_PIN PIND2 - #define DIO19_RPORT PIND - #define DIO19_WPORT PORTD - #define DIO19_DDR DDRD - #define DIO19_PWM NULL - - #define DIO20_PIN PIND3 - #define DIO20_RPORT PIND - #define DIO20_WPORT PORTD - #define DIO20_DDR DDRD - #define DIO20_PWM NULL - - #define DIO21_PIN PIND4 - #define DIO21_RPORT PIND - #define DIO21_WPORT PORTD - #define DIO21_DDR DDRD - #define DIO21_PWM NULL - - #define DIO22_PIN PIND5 - #define DIO22_RPORT PIND - #define DIO22_WPORT PORTD - #define DIO22_DDR DDRD - #define DIO22_PWM NULL - - #define DIO23_PIN PIND6 - #define DIO23_RPORT PIND - #define DIO23_WPORT PORTD - #define DIO23_DDR DDRD - #define DIO23_PWM NULL - - #define DIO24_PIN PIND7 - #define DIO24_RPORT PIND - #define DIO24_WPORT PORTD - #define DIO24_DDR DDRD - #define DIO24_PWM NULL - - #define DIO25_PIN PING0 - #define DIO25_RPORT PING - #define DIO25_WPORT PORTG - #define DIO25_DDR DDRG - #define DIO25_PWM NULL - - #define DIO26_PIN PING1 - #define DIO26_RPORT PING - #define DIO26_WPORT PORTG - #define DIO26_DDR DDRG - #define DIO26_PWM NULL - - #define DIO27_PIN PING2 - #define DIO27_RPORT PING - #define DIO27_WPORT PORTG - #define DIO27_DDR DDRG - #define DIO27_PWM NULL - - #define DIO28_PIN PING3 - #define DIO28_RPORT PING - #define DIO28_WPORT PORTG - #define DIO28_DDR DDRG - #define DIO28_PWM NULL - - #define DIO29_PIN PING4 - #define DIO29_RPORT PING - #define DIO29_WPORT PORTG - #define DIO29_DDR DDRG - #define DIO29_PWM NULL - - #define DIO30_PIN PINC0 - #define DIO30_RPORT PINC - #define DIO30_WPORT PORTC - #define DIO30_DDR DDRC - #define DIO30_PWM NULL - - #define DIO31_PIN PINC1 - #define DIO31_RPORT PINC - #define DIO31_WPORT PORTC - #define DIO31_DDR DDRC - #define DIO31_PWM NULL - - #define DIO32_PIN PINC2 - #define DIO32_RPORT PINC - #define DIO32_WPORT PORTC - #define DIO32_DDR DDRC - #define DIO32_PWM NULL - - #define DIO33_PIN PINC3 - #define DIO33_RPORT PINC - #define DIO33_WPORT PORTC - #define DIO33_DDR DDRC - #define DIO33_PWM NULL - - #define DIO34_PIN PINC4 - #define DIO34_RPORT PINC - #define DIO34_WPORT PORTC - #define DIO34_DDR DDRC - #define DIO34_PWM NULL - - #define DIO35_PIN PINC5 - #define DIO35_RPORT PINC - #define DIO35_WPORT PORTC - #define DIO35_DDR DDRC - #define DIO35_PWM NULL - - #define DIO36_PIN PINC6 - #define DIO36_RPORT PINC - #define DIO36_WPORT PORTC - #define DIO36_DDR DDRC - #define DIO36_PWM NULL - - #define DIO37_PIN PINC7 - #define DIO37_RPORT PINC - #define DIO37_WPORT PORTC - #define DIO37_DDR DDRC - #define DIO37_PWM NULL - - #define DIO38_PIN PINA0 - #define DIO38_RPORT PINA - #define DIO38_WPORT PORTA - #define DIO38_DDR DDRA - #define DIO38_PWM NULL - - #define DIO39_PIN PINA1 - #define DIO39_RPORT PINA - #define DIO39_WPORT PORTA - #define DIO39_DDR DDRA - #define DIO39_PWM NULL - - #define DIO40_PIN PINA2 - #define DIO40_RPORT PINA - #define DIO40_WPORT PORTA - #define DIO40_DDR DDRA - #define DIO40_PWM NULL - - #define DIO41_PIN PINA3 - #define DIO41_RPORT PINA - #define DIO41_WPORT PORTA - #define DIO41_DDR DDRA - #define DIO41_PWM NULL - - #define DIO42_PIN PINA4 - #define DIO42_RPORT PINA - #define DIO42_WPORT PORTA - #define DIO42_DDR DDRA - #define DIO42_PWM NULL - - #define DIO43_PIN PINA5 - #define DIO43_RPORT PINA - #define DIO43_WPORT PORTA - #define DIO43_DDR DDRA - #define DIO43_PWM NULL - - #define DIO44_PIN PINA6 - #define DIO44_RPORT PINA - #define DIO44_WPORT PORTA - #define DIO44_DDR DDRA - #define DIO44_PWM NULL - - #define DIO45_PIN PINA7 - #define DIO45_RPORT PINA - #define DIO45_WPORT PORTA - #define DIO45_DDR DDRA - #define DIO45_PWM NULL - - #define DIO46_PIN PINF0 - #define DIO46_RPORT PINF - #define DIO46_WPORT PORTF - #define DIO46_DDR DDRF - #define DIO46_PWM NULL - - #define DIO47_PIN PINF1 - #define DIO47_RPORT PINF - #define DIO47_WPORT PORTF - #define DIO47_DDR DDRF - #define DIO47_PWM NULL - - #define DIO48_PIN PINF2 - #define DIO48_RPORT PINF - #define DIO48_WPORT PORTF - #define DIO48_DDR DDRF - #define DIO48_PWM NULL - - #define DIO49_PIN PINF3 - #define DIO49_RPORT PINF - #define DIO49_WPORT PORTF - #define DIO49_DDR DDRF - #define DIO49_PWM NULL - - #define DIO50_PIN PINF4 - #define DIO50_RPORT PINF - #define DIO50_WPORT PORTF - #define DIO50_DDR DDRF - #define DIO50_PWM NULL - - #define DIO51_PIN PINF5 - #define DIO51_RPORT PINF - #define DIO51_WPORT PORTF - #define DIO51_DDR DDRF - #define DIO51_PWM NULL - - #define DIO52_PIN PINF6 - #define DIO52_RPORT PINF - #define DIO52_WPORT PORTF - #define DIO52_DDR DDRF - #define DIO52_PWM NULL - - #define DIO53_PIN PINF7 - #define DIO53_RPORT PINF - #define DIO53_WPORT PORTF - #define DIO53_DDR DDRF - #define DIO53_PWM NULL - - - - - #undef PA0 - #define PA0_PIN PINA0 - #define PA0_RPORT PINA - #define PA0_WPORT PORTA - #define PA0_DDR DDRA - #define PA0_PWM NULL - #undef PA1 - #define PA1_PIN PINA1 - #define PA1_RPORT PINA - #define PA1_WPORT PORTA - #define PA1_DDR DDRA - #define PA1_PWM NULL - #undef PA2 - #define PA2_PIN PINA2 - #define PA2_RPORT PINA - #define PA2_WPORT PORTA - #define PA2_DDR DDRA - #define PA2_PWM NULL - #undef PA3 - #define PA3_PIN PINA3 - #define PA3_RPORT PINA - #define PA3_WPORT PORTA - #define PA3_DDR DDRA - #define PA3_PWM NULL - #undef PA4 - #define PA4_PIN PINA4 - #define PA4_RPORT PINA - #define PA4_WPORT PORTA - #define PA4_DDR DDRA - #define PA4_PWM NULL - #undef PA5 - #define PA5_PIN PINA5 - #define PA5_RPORT PINA - #define PA5_WPORT PORTA - #define PA5_DDR DDRA - #define PA5_PWM NULL - #undef PA6 - #define PA6_PIN PINA6 - #define PA6_RPORT PINA - #define PA6_WPORT PORTA - #define PA6_DDR DDRA - #define PA6_PWM NULL - #undef PA7 - #define PA7_PIN PINA7 - #define PA7_RPORT PINA - #define PA7_WPORT PORTA - #define PA7_DDR DDRA - #define PA7_PWM NULL - - #undef PB0 - #define PB0_PIN PINB0 - #define PB0_RPORT PINB - #define PB0_WPORT PORTB - #define PB0_DDR DDRB - #define PB0_PWM NULL - #undef PB1 - #define PB1_PIN PINB1 - #define PB1_RPORT PINB - #define PB1_WPORT PORTB - #define PB1_DDR DDRB - #define PB1_PWM NULL - #undef PB2 - #define PB2_PIN PINB2 - #define PB2_RPORT PINB - #define PB2_WPORT PORTB - #define PB2_DDR DDRB - #define PB2_PWM NULL - #undef PB3 - #define PB3_PIN PINB3 - #define PB3_RPORT PINB - #define PB3_WPORT PORTB - #define PB3_DDR DDRB - #define PB3_PWM NULL - #undef PB4 - #define PB4_PIN PINB4 - #define PB4_RPORT PINB - #define PB4_WPORT PORTB - #define PB4_DDR DDRB - #define PB4_PWM &OCR2A - #undef PB5 - #define PB5_PIN PINB5 - #define PB5_RPORT PINB - #define PB5_WPORT PORTB - #define PB5_DDR DDRB - #define PB5_PWM NULL - #undef PB6 - #define PB6_PIN PINB6 - #define PB6_RPORT PINB - #define PB6_WPORT PORTB - #define PB6_DDR DDRB - #define PB6_PWM NULL - #undef PB7 - #define PB7_PIN PINB7 - #define PB7_RPORT PINB - #define PB7_WPORT PORTB - #define PB7_DDR DDRB - #define PB7_PWM &OCR0A - - #undef PC0 - #define PC0_PIN PINC0 - #define PC0_RPORT PINC - #define PC0_WPORT PORTC - #define PC0_DDR DDRC - #define PC0_PWM NULL - #undef PC1 - #define PC1_PIN PINC1 - #define PC1_RPORT PINC - #define PC1_WPORT PORTC - #define PC1_DDR DDRC - #define PC1_PWM NULL - #undef PC2 - #define PC2_PIN PINC2 - #define PC2_RPORT PINC - #define PC2_WPORT PORTC - #define PC2_DDR DDRC - #define PC2_PWM NULL - #undef PC3 - #define PC3_PIN PINC3 - #define PC3_RPORT PINC - #define PC3_WPORT PORTC - #define PC3_DDR DDRC - #define PC3_PWM NULL - #undef PC4 - #define PC4_PIN PINC4 - #define PC4_RPORT PINC - #define PC4_WPORT PORTC - #define PC4_DDR DDRC - #define PC4_PWM NULL - #undef PC5 - #define PC5_PIN PINC5 - #define PC5_RPORT PINC - #define PC5_WPORT PORTC - #define PC5_DDR DDRC - #define PC5_PWM NULL - #undef PC6 - #define PC6_PIN PINC6 - #define PC6_RPORT PINC - #define PC6_WPORT PORTC - #define PC6_DDR DDRC - #define PC6_PWM NULL - #undef PC7 - #define PC7_PIN PINC7 - #define PC7_RPORT PINC - #define PC7_WPORT PORTC - #define PC7_DDR DDRC - #define PC7_PWM NULL - - #undef PD0 - #define PD0_PIN PIND0 - #define PD0_RPORT PIND - #define PD0_WPORT PORTD - #define PD0_DDR DDRD - #define PD0_PWM NULL - #undef PD1 - #define PD1_PIN PIND1 - #define PD1_RPORT PIND - #define PD1_WPORT PORTD - #define PD1_DDR DDRD - #define PD1_PWM NULL - #undef PD2 - #define PD2_PIN PIND2 - #define PD2_RPORT PIND - #define PD2_WPORT PORTD - #define PD2_DDR DDRD - #define PD2_PWM NULL - #undef PD3 - #define PD3_PIN PIND3 - #define PD3_RPORT PIND - #define PD3_WPORT PORTD - #define PD3_DDR DDRD - #define PD3_PWM NULL - #undef PD4 - #define PD4_PIN PIND4 - #define PD4_RPORT PIND - #define PD4_WPORT PORTD - #define PD4_DDR DDRD - #define PD4_PWM NULL - #undef PD5 - #define PD5_PIN PIND5 - #define PD5_RPORT PIND - #define PD5_WPORT PORTD - #define PD5_DDR DDRD - #define PD5_PWM NULL - #undef PD6 - #define PD6_PIN PIND6 - #define PD6_RPORT PIND - #define PD6_WPORT PORTD - #define PD6_DDR DDRD - #define PD6_PWM NULL - #undef PD7 - #define PD7_PIN PIND7 - #define PD7_RPORT PIND - #define PD7_WPORT PORTD - #define PD7_DDR DDRD - #define PD7_PWM NULL - - #undef PE0 - #define PE0_PIN PINE0 - #define PE0_RPORT PINE - #define PE0_WPORT PORTE - #define PE0_DDR DDRE - #define PE0_PWM NULL - #undef PE1 - #define PE1_PIN PINE1 - #define PE1_RPORT PINE - #define PE1_WPORT PORTE - #define PE1_DDR DDRE - #define PE1_PWM NULL - #undef PE2 - #define PE2_PIN PINE2 - #define PE2_RPORT PINE - #define PE2_WPORT PORTE - #define PE2_DDR DDRE - #define PE2_PWM NULL - #undef PE3 - #define PE3_PIN PINE3 - #define PE3_RPORT PINE - #define PE3_WPORT PORTE - #define PE3_DDR DDRE - #define PE3_PWM &OCR3AL - #undef PE4 - #define PE4_PIN PINE4 - #define PE4_RPORT PINE - #define PE4_WPORT PORTE - #define PE4_DDR DDRE - #define PE4_PWM &OCR3BL - #undef PE5 - #define PE5_PIN PINE5 - #define PE5_RPORT PINE - #define PE5_WPORT PORTE - #define PE5_DDR DDRE - #define PE5_PWM &OCR3CL - #undef PE6 - #define PE6_PIN PINE6 - #define PE6_RPORT PINE - #define PE6_WPORT PORTE - #define PE6_DDR DDRE - #define PE6_PWM NULL - #undef PE7 - #define PE7_PIN PINE7 - #define PE7_RPORT PINE - #define PE7_WPORT PORTE - #define PE7_DDR DDRE - #define PE7_PWM NULL - - #undef PF0 - #define PF0_PIN PINF0 - #define PF0_RPORT PINF - #define PF0_WPORT PORTF - #define PF0_DDR DDRF - #define PF0_PWM NULL - #undef PF1 - #define PF1_PIN PINF1 - #define PF1_RPORT PINF - #define PF1_WPORT PORTF - #define PF1_DDR DDRF - #define PF1_PWM NULL - #undef PF2 - #define PF2_PIN PINF2 - #define PF2_RPORT PINF - #define PF2_WPORT PORTF - #define PF2_DDR DDRF - #define PF2_PWM NULL - #undef PF3 - #define PF3_PIN PINF3 - #define PF3_RPORT PINF - #define PF3_WPORT PORTF - #define PF3_DDR DDRF - #define PF3_PWM NULL - #undef PF4 - #define PF4_PIN PINF4 - #define PF4_RPORT PINF - #define PF4_WPORT PORTF - #define PF4_DDR DDRF - #define PF4_PWM NULL - #undef PF5 - #define PF5_PIN PINF5 - #define PF5_RPORT PINF - #define PF5_WPORT PORTF - #define PF5_DDR DDRF - #define PF5_PWM NULL - #undef PF6 - #define PF6_PIN PINF6 - #define PF6_RPORT PINF - #define PF6_WPORT PORTF - #define PF6_DDR DDRF - #define PF6_PWM NULL - #undef PF7 - #define PF7_PIN PINF7 - #define PF7_RPORT PINF - #define PF7_WPORT PORTF - #define PF7_DDR DDRF - #define PF7_PWM NULL - - #undef PG0 - #define PG0_PIN PING0 - #define PG0_RPORT PING - #define PG0_WPORT PORTG - #define PG0_DDR DDRG - #define PG0_PWM NULL - #undef PG1 - #define PG1_PIN PING1 - #define PG1_RPORT PING - #define PG1_WPORT PORTG - #define PG1_DDR DDRG - #define PG1_PWM NULL - #undef PG2 - #define PG2_PIN PING2 - #define PG2_RPORT PING - #define PG2_WPORT PORTG - #define PG2_DDR DDRG - #define PG2_PWM NULL - #undef PG3 - #define PG3_PIN PING3 - #define PG3_RPORT PING - #define PG3_WPORT PORTG - #define PG3_DDR DDRG - #define PG3_PWM NULL - #undef PG4 - #define PG4_PIN PING4 - #define PG4_RPORT PING - #define PG4_WPORT PORTG - #define PG4_DDR DDRG - #define PG4_PWM NULL - #undef PG5 - #define PG5_PIN PING5 - #define PG5_RPORT PING - #define PG5_WPORT PORTG - #define PG5_DDR DDRG - #define PG5_PWM &OCR0B - - -#endif - -#ifndef DIO0_PIN - #error "pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request" -#endif - -#endif /* _FASTIO_ARDUINO_H */ diff --git a/Marlin/language.h b/Marlin/language.h deleted file mode 100644 index 496fed5..0000000 --- a/Marlin/language.h +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef LANGUAGE_H -#define LANGUAGE_H - -#include "MarlinConfig.h" - -// Fallback if no language is set. DON'T CHANGE -#ifndef LCD_LANGUAGE - #define LCD_LANGUAGE en -#endif - -// For character-based LCD controllers (DISPLAY_CHARSET_HD44780) -#define JAPANESE 1 -#define WESTERN 2 -#define CYRILLIC 3 - -// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES -// -// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h" -// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - -// Languages -// an Aragonese -// bg Bulgarian -// ca Catalan -// cn Chinese -// cz Czech -// de German -// el Greek -// el-gr Greek (Greece) -// en English -// es Spanish -// eu Basque-Euskera -// fi Finnish -// fr French -// gl Galician -// hr Croatian -// it Italian -// kana Japanese -// kana_utf8 Japanese (UTF8) -// nl Dutch -// pl Polish -// pt Portuguese -// pt-br Portuguese (Brazilian) -// pt-br_utf8 Portuguese (Brazilian UTF8) -// pt_utf8 Portuguese (UTF8) -// ru Russian - -#ifdef DEFAULT_SOURCE_CODE_URL - #undef SOURCE_CODE_URL - #define SOURCE_CODE_URL DEFAULT_SOURCE_CODE_URL -#endif - -#ifdef CUSTOM_MACHINE_NAME - #undef MACHINE_NAME - #define MACHINE_NAME CUSTOM_MACHINE_NAME -#else - #ifdef DEFAULT_MACHINE_NAME - #undef MACHINE_NAME - #define MACHINE_NAME DEFAULT_MACHINE_NAME - #endif -#endif - -#ifndef MACHINE_UUID - #define MACHINE_UUID DEFAULT_MACHINE_UUID -#endif - -#ifdef DEFAULT_WEBSITE_URL - #undef WEBSITE_URL - #define WEBSITE_URL DEFAULT_WEBSITE_URL -#endif - -// Common LCD messages - - /* nothing here yet */ - -// Common serial messages -#define MSG_MARLIN "Marlin" - -// Serial Console Messages (do not translate those!) - -#define MSG_Enqueueing "enqueueing \"" -#define MSG_POWERUP "PowerUp" -#define MSG_EXTERNAL_RESET " External Reset" -#define MSG_BROWNOUT_RESET " Brown out Reset" -#define MSG_WATCHDOG_RESET " Watchdog Reset" -#define MSG_SOFTWARE_RESET " Software Reset" -#define MSG_AUTHOR " | Author: " -#define MSG_CONFIGURATION_VER " Last Updated: " -#define MSG_FREE_MEMORY " Free Memory: " -#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " -#define MSG_OK "ok" -#define MSG_WAIT "wait" -#define MSG_STATS "Stats: " -#define MSG_FILE_SAVED "Done saving file." -#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " -#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " -#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " -#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: " -#define MSG_FILE_PRINTED "Done printing file" -#define MSG_BEGIN_FILE_LIST "Begin file list" -#define MSG_END_FILE_LIST "End file list" -#define MSG_INVALID_EXTRUDER "Invalid extruder" -#define MSG_INVALID_SOLENOID "Invalid solenoid" -#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" -#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID EMERGENCY_PARSER_CAPABILITIES "\n" -#define MSG_COUNT_X " Count X: " -#define MSG_COUNT_A " Count A: " -#define MSG_ERR_KILLED "Printer halted. kill() called!" -#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" -#define MSG_BUSY_PROCESSING "busy: processing" -#define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user" -#define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input" -#define MSG_RESEND "Resend: " -#define MSG_UNKNOWN_COMMAND "Unknown command: \"" -#define MSG_ACTIVE_EXTRUDER "Active Extruder: " -#define MSG_X_MIN "x_min: " -#define MSG_X_MAX "x_max: " -#define MSG_Y_MIN "y_min: " -#define MSG_Y_MAX "y_max: " -#define MSG_Z_MIN "z_min: " -#define MSG_Z_MAX "z_max: " -#define MSG_Z2_MAX "z2_max: " -#define MSG_Z_PROBE "z_probe: " -#define MSG_ERR_MATERIAL_INDEX "M145 S out of range (0-1)" -#define MSG_ERR_M421_PARAMETERS "M421 requires XYZ or IJZ parameters" -#define MSG_ERR_MESH_XY "Mesh XY or IJ cannot be resolved" -#define MSG_ERR_M428_TOO_FAR "Too far from reference point" -#define MSG_ERR_M303_DISABLED "PIDTEMP disabled" -#define MSG_M119_REPORT "Reporting endstop status" -#define MSG_ENDSTOP_HIT "TRIGGERED" -#define MSG_ENDSTOP_OPEN "open" -#define MSG_HOTEND_OFFSET "Hotend offsets:" -#define MSG_DUPLICATION_MODE "Duplication mode: " - -#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir " -#define MSG_SD_INIT_FAIL "SD init fail" -#define MSG_SD_VOL_INIT_FAIL "volume.init failed" -#define MSG_SD_OPENROOT_FAIL "openRoot failed" -#define MSG_SD_CARD_OK "SD card ok" -#define MSG_SD_WORKDIR_FAIL "workDir open failed" -#define MSG_SD_OPEN_FILE_FAIL "open failed, File: " -#define MSG_SD_FILE_OPENED "File opened: " -#define MSG_SD_SIZE " Size: " -#define MSG_SD_FILE_SELECTED "File selected" -#define MSG_SD_WRITE_TO_FILE "Writing to file: " -#define MSG_SD_PRINTING_BYTE "SD printing byte " -#define MSG_SD_NOT_PRINTING "Not SD printing" -#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" -#define MSG_SD_ERR_READ "SD read error" -#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: " - -#define MSG_STEPPER_TOO_HIGH "Steprate too high: " -#define MSG_ENDSTOPS_HIT "endstops hit: " -#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented" -#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented" -#define MSG_TOO_COLD_FOR_M600 "M600 Hotend too cold to change filament" -#define MSG_BABYSTEPPING_X "Babystepping X" -#define MSG_BABYSTEPPING_Y "Babystepping Y" -#define MSG_BABYSTEPPING_Z "Babystepping Z" -#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure" - -#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!" - -// temperature.cpp strings -#define MSG_PID_AUTOTUNE "PID Autotune" -#define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE " start" -#define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE " failed!" -#define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number" -#define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high" -#define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout" -#define MSG_BIAS " bias: " -#define MSG_D " d: " -#define MSG_T_MIN " min: " -#define MSG_T_MAX " max: " -#define MSG_KU " Ku: " -#define MSG_TU " Tu: " -#define MSG_CLASSIC_PID " Classic PID " -#define MSG_KP " Kp: " -#define MSG_KI " Ki: " -#define MSG_KD " Kd: " -#define MSG_B "B:" -#define MSG_T "T:" -#define MSG_AT " @:" -#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h" -#define MSG_PID_DEBUG " PID_DEBUG " -#define MSG_PID_DEBUG_INPUT ": Input " -#define MSG_PID_DEBUG_OUTPUT " Output " -#define MSG_PID_DEBUG_PTERM " pTerm " -#define MSG_PID_DEBUG_ITERM " iTerm " -#define MSG_PID_DEBUG_DTERM " dTerm " -#define MSG_PID_DEBUG_CTERM " cTerm " -#define MSG_INVALID_EXTRUDER_NUM " - Invalid extruder number !" - -#define MSG_HEATER_BED "bed" -#define MSG_STOPPED_HEATER ", system stopped! Heater_ID: " -#define MSG_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !" -#define MSG_T_HEATING_FAILED "Heating failed" -#define MSG_T_THERMAL_RUNAWAY "Thermal Runaway" -#define MSG_T_MAXTEMP "MAXTEMP triggered" -#define MSG_T_MINTEMP "MINTEMP triggered" - -// Debug -#define MSG_DEBUG_PREFIX "DEBUG:" -#define MSG_DEBUG_OFF "off" -#define MSG_DEBUG_ECHO "ECHO" -#define MSG_DEBUG_INFO "INFO" -#define MSG_DEBUG_ERRORS "ERRORS" -#define MSG_DEBUG_DRYRUN "DRYRUN" -#define MSG_DEBUG_COMMUNICATION "COMMUNICATION" -#define MSG_DEBUG_LEVELING "LEVELING" - -// LCD Menu Messages - -#define LANGUAGE_INCL_(M) STRINGIFY_(language_##M.h) -#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M) -#define INCLUDE_LANGUAGE LANGUAGE_INCL(LCD_LANGUAGE) - -#include INCLUDE_LANGUAGE -#include "language_en.h" - -#endif //__LANGUAGE_H diff --git a/Marlin/language_an.h b/Marlin/language_an.h deleted file mode 100644 index bfabc0a..0000000 --- a/Marlin/language_an.h +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Aragonese - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_AN_H -#define LANGUAGE_AN_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " parada." -#define MSG_SD_INSERTED "Tarcheta colocada" -#define MSG_SD_REMOVED "Tarcheta retirada" -#define MSG_MAIN "Menu prencipal" -#define MSG_AUTOSTART " Autostart" -#define MSG_DISABLE_STEPPERS "Amortar motors" -#define MSG_AUTO_HOME "Levar a l'orichen" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Set home offsets" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Establir zero" -#define MSG_PREHEAT_1 "Precalentar PLA" -#define MSG_PREHEAT_1_N "Precalentar PLA " -#define MSG_PREHEAT_1_ALL "Precalentar PLA a" -#define MSG_PREHEAT_1_BEDONLY "Prec. PLA Base" -#define MSG_PREHEAT_1_SETTINGS "Achustar tem. PLA" -#define MSG_PREHEAT_2 "Precalentar ABS" -#define MSG_PREHEAT_2_N "Precalentar ABS " -#define MSG_PREHEAT_2_ALL "Precalentar ABS a" -#define MSG_PREHEAT_2_BEDONLY "Prec. ABS Base" -#define MSG_PREHEAT_2_SETTINGS "Achustar tem. ABS" -#define MSG_COOLDOWN "Enfriar" -#define MSG_SWITCH_PS_ON "Enchegar Fuent" -#define MSG_SWITCH_PS_OFF "Desenchegar Fuent" -#define MSG_EXTRUDE "Extruir" -#define MSG_RETRACT "Retraer" -#define MSG_MOVE_AXIS "Mover Eixes" -#define MSG_MOVE_X "Move X" -#define MSG_MOVE_Y "Move Y" -#define MSG_MOVE_Z "Move Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_01MM "Move 0.1mm" -#define MSG_MOVE_1MM "Move 1mm" -#define MSG_MOVE_10MM "Move 10mm" -#define MSG_SPEED "Velocidat" -#define MSG_NOZZLE "Nozzle" -#define MSG_BED "Base" -#define MSG_FAN_SPEED "Ixoriador" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Control" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On" -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ves-jerk" -#define MSG_VMAX "Vmax" -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax" -#define MSG_A_RETRACT "A-retrac." -#define MSG_XSTEPS "X trangos/mm" -#define MSG_YSTEPS "Y trangos/mm" -#define MSG_ZSTEPS "Z trangos/mm" -#define MSG_ESTEPS "E trangos/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimiento" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "Contrast" -#define MSG_STORE_EPROM "Alzar Memoria" -#define MSG_LOAD_EPROM "Cargar Memoria" -#define MSG_RESTORE_FAILSAFE "Rest. d'emerchen." -#define MSG_REFRESH "Tornar a cargar" -#define MSG_WATCH "Monitorizar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Achustar" -#define MSG_PAUSE_PRINT "Pausar impresion" -#define MSG_RESUME_PRINT "Contin. impresion" -#define MSG_STOP_PRINT "Detener Impresion" -#define MSG_CARD_MENU "Menu de SD" -#define MSG_NO_CARD "No i hai tarcheta" -#define MSG_DWELL "Reposo..." -#define MSG_USERWAIT "Asperan. ordines" -#define MSG_RESUMING "Contin. impresion" -#define MSG_PRINT_ABORTED "Print aborted" -#define MSG_NO_MOVE "Sin movimiento" -#define MSG_KILLED "ATURADA D'EMERCH." -#define MSG_STOPPED "ATURADA." -#define MSG_CONTROL_RETRACT "Retraer mm" -#define MSG_CONTROL_RETRACT_SWAP "Swap Retraer mm" -#define MSG_CONTROL_RETRACTF "Retraer F" -#define MSG_CONTROL_RETRACT_ZLIFT "Devantar mm" -#define MSG_CONTROL_RETRACT_RECOVER "DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Swap DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "DesRet F" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Cambear" -#define MSG_INIT_SDCARD "Encetan. tarcheta" -#define MSG_CNG_SDCARD "Cambiar tarcheta" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_DELTA_CALIBRATE "Delta Calibration" -#define MSG_DELTA_CALIBRATE_X "Calibrate X" -#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" - -#endif // LANGUAGE_AN_H diff --git a/Marlin/language_bg.h b/Marlin/language_bg.h deleted file mode 100644 index 5160694..0000000 --- a/Marlin/language_bg.h +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Bulgarian - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_BG_H -#define LANGUAGE_BG_H - -#define MAPPER_D0D1 // For Cyrillic -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_5 - -#define WELCOME_MSG MACHINE_NAME " Готов." -#define MSG_SD_INSERTED "Картата е поÑтавена" -#define MSG_SD_REMOVED "Картата е извадена" -#define MSG_MAIN "Меню" -#define MSG_AUTOSTART "ÐвтоÑтарт" -#define MSG_DISABLE_STEPPERS "Изкл. двигатели" -#define MSG_AUTO_HOME "Паркиране" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Задай Ðачало" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Изходна точка" -#define MSG_PREHEAT_1 "ПодгрÑване PLA" -#define MSG_PREHEAT_1_N "ПодгрÑване PLA" -#define MSG_PREHEAT_1_ALL "Подгр. PLA Ð’Ñички" -#define MSG_PREHEAT_1_BEDONLY "Подгр. PLA Легло" -#define MSG_PREHEAT_1_SETTINGS "ÐаÑтройки PLA" -#define MSG_PREHEAT_2 "ПодгрÑване ABS" -#define MSG_PREHEAT_2_N "ПодгрÑване ABS" -#define MSG_PREHEAT_2_ALL "Подгр. ABS Ð’Ñички" -#define MSG_PREHEAT_2_BEDONLY "Подгр. ABS Легло" -#define MSG_PREHEAT_2_SETTINGS "ÐаÑтройки ABS" -#define MSG_COOLDOWN "Охлаждане" -#define MSG_SWITCH_PS_ON "Вкл. захранване" -#define MSG_SWITCH_PS_OFF "Изкл. захранване" -#define MSG_EXTRUDE "ЕкÑтрузиÑ" -#define MSG_RETRACT "Откат" -#define MSG_MOVE_AXIS "Движение по оÑ" -#define MSG_LEVEL_BED "Ðивелиране" -#define MSG_MOVE_X "Движение по X" -#define MSG_MOVE_Y "Движение по Y" -#define MSG_MOVE_Z "Движение по Z" -#define MSG_MOVE_E "ЕкÑтрудер" -#define MSG_MOVE_01MM "ПремеÑти Ñ 0.1mm" -#define MSG_MOVE_1MM "ПремеÑти Ñ 1mm" -#define MSG_MOVE_10MM "ПремеÑти Ñ 10mm" -#define MSG_SPEED "СкороÑÑ‚" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Дюза" -#define MSG_BED LCD_STR_THERMOMETER " Легло" -#define MSG_FAN_SPEED "Вентилатор" -#define MSG_FLOW "Поток" -#define MSG_CONTROL "Управление" -#define MSG_MIN LCD_STR_THERMOMETER " Минимум" -#define MSG_MAX LCD_STR_THERMOMETER " МакÑимум" -#define MSG_FACTOR LCD_STR_THERMOMETER " Фактор" -#define MSG_AUTOTEMP "Ðвто-темп." -#define MSG_ON "Вкл. " -#define MSG_OFF "Изкл. " -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-откат" -#define MSG_XSTEPS "X Ñтъпки/mm" -#define MSG_YSTEPS "Y Ñтъпки/mm" -#define MSG_ZSTEPS "Z Ñтъпки/mm" -#define MSG_ESTEPS "E Ñтъпки/mm" -#define MSG_TEMPERATURE "Температура" -#define MSG_MOTION "Движение" -#define MSG_VOLUMETRIC "Ðишка" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Диам. нишка" -#define MSG_CONTRAST "LCD контраÑÑ‚" -#define MSG_STORE_EPROM "Запази в EPROM" -#define MSG_LOAD_EPROM "Зареди от EPROM" -#define MSG_RESTORE_FAILSAFE "Фабрични наÑтройки" -#define MSG_REFRESH LCD_STR_REFRESH "Обнови" -#define MSG_WATCH "Преглед" -#define MSG_PREPARE "ДейÑтвиÑ" -#define MSG_TUNE "ÐаÑтройка" -#define MSG_PAUSE_PRINT "Пауза" -#define MSG_RESUME_PRINT "Възобнови печата" -#define MSG_STOP_PRINT "Спри печата" -#define MSG_CARD_MENU "Меню карта" -#define MSG_NO_CARD "ÐÑма карта" -#define MSG_DWELL "Почивка..." -#define MSG_USERWAIT "Изчакване" -#define MSG_RESUMING "Продълж. печата" -#define MSG_PRINT_ABORTED "Печатът е прекъÑнат" -#define MSG_NO_MOVE "ÐÑма движение" -#define MSG_KILLED "УБИТО." -#define MSG_STOPPED "СПРЯÐО." -#define MSG_CONTROL_RETRACT "Откат mm" -#define MSG_CONTROL_RETRACT_SWAP "СмÑна Откат mm" -#define MSG_CONTROL_RETRACTF "Откат V" -#define MSG_CONTROL_RETRACT_ZLIFT "Скок mm" -#define MSG_CONTROL_RETRACT_RECOVER "Възврат +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "СмÑна Възврат +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Възврат V" -#define MSG_AUTORETRACT "Ðвтоoткат" -#define MSG_FILAMENTCHANGE "СмÑна нишка" -#define MSG_INIT_SDCARD "Иниц. SD-Карта" -#define MSG_CNG_SDCARD "СмÑна SD-Карта" -#define MSG_ZPROBE_OUT "Z-Ñондата е извадена" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z ОтÑтоÑние" -#define MSG_BABYSTEP_X "МиниÑтъпка X" -#define MSG_BABYSTEP_Y "МиниÑтъпка Y" -#define MSG_BABYSTEP_Z "МиниÑтъпка Z" -#define MSG_ENDSTOP_ABORT "Стоп Кр.Изключватели" -#define MSG_DELTA_CALIBRATE "Делта Калибровка" -#define MSG_DELTA_CALIBRATE_X "Калибровка X" -#define MSG_DELTA_CALIBRATE_Y "Калибровка Y" -#define MSG_DELTA_CALIBRATE_Z "Калибровка Z" -#define MSG_DELTA_CALIBRATE_CENTER "Калибровка Център" - -#endif // LANGUAGE_BG_H diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h deleted file mode 100644 index b90f1c3..0000000 --- a/Marlin/language_ca.h +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Catalan - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_CA_H -#define LANGUAGE_CA_H - -#define MAPPER_C2C3 // because of "ó" -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " preparada." -#define MSG_SD_INSERTED "SD detectada." -#define MSG_SD_REMOVED "SD expulsada." -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Inici automatic" -#define MSG_DISABLE_STEPPERS "Apagar motors" -#define MSG_AUTO_HOME "Home global" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Set home offsets" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Establir origen" -#define MSG_PREHEAT_1 "Preescalfar PLA" -#define MSG_PREHEAT_1_N "Preescalfar PLA " -#define MSG_PREHEAT_1_ALL "Preesc. tot PLA" -#define MSG_PREHEAT_1_BEDONLY "Preesc. llit PLA" -#define MSG_PREHEAT_1_SETTINGS "Configuració PLA" -#define MSG_PREHEAT_2 "Preescalfar ABS" -#define MSG_PREHEAT_2_N "Preescalfar ABS " -#define MSG_PREHEAT_2_ALL "Preesc. tot ABS" -#define MSG_PREHEAT_2_BEDONLY "Preesc. llit ABS" -#define MSG_PREHEAT_2_SETTINGS "Configuració ABS" -#define MSG_COOLDOWN "Refredar" -#define MSG_SWITCH_PS_ON "Switch power on" -#define MSG_SWITCH_PS_OFF "Switch power off" -#define MSG_EXTRUDE "Extruir" -#define MSG_RETRACT "Refredar" -#define MSG_MOVE_AXIS "Moure eixos" -#define MSG_MOVE_X "Moure X" -#define MSG_MOVE_Y "Moure Y" -#define MSG_MOVE_Z "Moure Z" -#define MSG_MOVE_E "Extrusor" -#define MSG_MOVE_01MM "Moure 0.1mm" -#define MSG_MOVE_1MM "Moure 1mm" -#define MSG_MOVE_10MM "Moure 10mm" -#define MSG_SPEED "Velocitat" -#define MSG_NOZZLE "Nozzle" -#define MSG_BED "Llit" -#define MSG_FAN_SPEED "Vel. Ventilador" -#define MSG_FLOW "Fluxe" -#define MSG_CONTROL "Control" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_XSTEPS "Xpassos/mm" -#define MSG_YSTEPS "Ypassos/mm" -#define MSG_ZSTEPS "Zpassos/mm" -#define MSG_ESTEPS "Epassos/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Moviment" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "Contrast de LCD" -#define MSG_STORE_EPROM "Desar a memoria" -#define MSG_LOAD_EPROM "Carregar de mem." -#define MSG_RESTORE_FAILSAFE "Rest. emergencia" -#define MSG_REFRESH "Refrescar" -#define MSG_WATCH "Pantalla Info." -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Calibrar" -#define MSG_PAUSE_PRINT "Pausa imp." -#define MSG_RESUME_PRINT "Reprendre imp." -#define MSG_STOP_PRINT "Parar inp." -#define MSG_CARD_MENU "Imprimir de SD" -#define MSG_NO_CARD "-Sense targeta SD" -#define MSG_DWELL "Repos..." -#define MSG_USERWAIT "Esperant usuari.." -#define MSG_RESUMING "Reprenent imp." -#define MSG_PRINT_ABORTED "Print aborted" -#define MSG_NO_MOVE "Sense moviment." -#define MSG_KILLED "PARADA DE EMERG. " -#define MSG_STOPPED "ATURAT. " -#define MSG_CONTROL_RETRACT "Retreure mm" -#define MSG_CONTROL_RETRACT_SWAP "Swap Retreure mm" -#define MSG_CONTROL_RETRACTF "Retreure F" -#define MSG_CONTROL_RETRACT_ZLIFT "Aixecar mm" -#define MSG_CONTROL_RETRACT_RECOVER "DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Swap DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "DesRet F" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Canviar filament" -#define MSG_INIT_SDCARD "Iniciant SD" -#define MSG_CNG_SDCARD "Canviar SD" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_DELTA_CALIBRATE "Delta Calibration" -#define MSG_DELTA_CALIBRATE_X "Calibrate X" -#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" - -#endif // LANGUAGE_CA_H diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h deleted file mode 100644 index 86c639d..0000000 --- a/Marlin/language_cn.h +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Chinese - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_CN_H -#define LANGUAGE_CN_H -#define DISPLAY_CHARSET_ISO10646_CN - -#define WELCOME_MSG "\xa4\xa5\xa6\xa7" -#define MSG_SD_INSERTED "\xa8\xa9\xaa\xab" -#define MSG_SD_REMOVED "\xa8\xa9\xac\xad" -#define MSG_MAIN "\xae\xaf\xb0" -#define MSG_AUTOSTART "\xb1\xb2\xb3\xb4" -#define MSG_DISABLE_STEPPERS "\xb5\xb6\xb7\xb8\xb9\xba" -#define MSG_AUTO_HOME "\xbb\xbc\xbd" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "\xbe\xbf\xbb\xbc\xbd\xc0\xc1" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "\xbe\xbf\xbc\xbd" -#define MSG_PREHEAT_1 "\xc3\xc4 PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " \xc5\xc6" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " \xc4\xc7" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " \xbe\xbf" -#define MSG_PREHEAT_2 "\xc3\xc4 ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " \xc5\xc6" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " \xbe\xc6" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " \xbe\xbf" -#define MSG_COOLDOWN "\xc8\xc9" -#define MSG_SWITCH_PS_ON "\xb9\xcb\xca\xb3" -#define MSG_SWITCH_PS_OFF "\xb9\xcb\xb5\xb6" -#define MSG_EXTRUDE "\xcc\xad" -#define MSG_RETRACT "\xbb\xcd" -#define MSG_MOVE_AXIS "\xc1\xb2\xce" -#define MSG_LEVEL_BED "\xcf\xe0\xc4\xc7" -#define MSG_MOVE_X "\xc1\xb2 X" -#define MSG_MOVE_Y "\xc1\xb2 Y" -#define MSG_MOVE_Z "\xc1\xb2 Z" -#define MSG_MOVE_E "\xcc\xad\xba" -#define MSG_MOVE_01MM "\xc1\xb2 0.1mm" -#define MSG_MOVE_1MM "\xc1\xb2 1mm" -#define MSG_MOVE_10MM "\xc1\xb2 10mm" -#define MSG_SPEED "\xd1\xd2" -#define MSG_NOZZLE "\xd3\xd4" -#define MSG_BED "\xc4\xc7" -#define MSG_FAN_SPEED "\xd5\xd6\xd1\xd2" -#define MSG_FLOW "\xcc\xad\xd1\xd2" -#define MSG_CONTROL "\xd8\xd9" -#define MSG_MIN LCD_STR_THERMOMETER " \xda\xdb" -#define MSG_MAX LCD_STR_THERMOMETER " \xda\xdc" -#define MSG_FACTOR LCD_STR_THERMOMETER " \xdd\xde" -#define MSG_AUTOTEMP "\xb1\xb2\xd8\xc9" -#define MSG_ON "\xb3 " // intentional space to shift wide symbol to the left -#define MSG_OFF "\xb5 " // intentional space to shift wide symbol to the left -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-travel" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "\xc9\xd2" -#define MSG_MOTION "\xdf\xb2" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "LCD contrast" -#define MSG_STORE_EPROM "Store memory" -#define MSG_LOAD_EPROM "Load memory" -#define MSG_RESTORE_FAILSAFE "Restore failsafe" -#define MSG_REFRESH "Refresh" -#define MSG_WATCH "\xec\xed\xee\xef" -#define MSG_PREPARE "\xa4\xa5" -#define MSG_TUNE "\xcf\xf0" -#define MSG_PAUSE_PRINT "\xf1\xf2\xca\xf3" -#define MSG_RESUME_PRINT "\xf4\xf5\xca\xf3" -#define MSG_STOP_PRINT "\xf2\xf6\xca\xf3" -#define MSG_CARD_MENU "\xaf\xb0" -#define MSG_NO_CARD "\xf9\xa8" -#define MSG_DWELL "Sleep..." -#define MSG_USERWAIT "Wait for user..." -#define MSG_RESUMING "Resuming print" -#define MSG_PRINT_ABORTED "Print aborted" -#define MSG_NO_MOVE "No move." -#define MSG_KILLED "KILLED. " -#define MSG_STOPPED "STOPPED. " -#define MSG_CONTROL_RETRACT "Retract mm" -#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" -#define MSG_CONTROL_RETRACTF "Retract V" -#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Change filament" -#define MSG_INIT_SDCARD "Init. SD card" -#define MSG_CNG_SDCARD "Change SD card" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_HEATING_FAILED_LCD "Heating failed" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: MAXTEMP" -#define MSG_ERR_MINTEMP "Err: MINTEMP" -#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" -#define MSG_DELTA_CALIBRATE "Delta Calibration" -#define MSG_DELTA_CALIBRATE_X "Calibrate X" -#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" - -#endif // LANGUAGE_CN_H diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h deleted file mode 100644 index 742cd8c..0000000 --- a/Marlin/language_cz.h +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Czech - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - * Translated by Petr Zahradnik, Computer Laboratory - * Blog and video blog Zahradnik se bavi - * http://www.zahradniksebavi.cz - * - */ -#ifndef LANGUAGE_CZ_H -#define LANGUAGE_CZ_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pripraven." -#define MSG_SD_INSERTED "Karta vlozena" -#define MSG_SD_REMOVED "Karta vyjmuta" -#define MSG_LCD_ENDSTOPS "Endstopy" // maximalne 8 znaku -#define MSG_MAIN "Hlavni nabidka" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Uvolnit motory" -#define MSG_AUTO_HOME "Domovska pozice" -#define MSG_AUTO_HOME_X "Domu osa X" -#define MSG_AUTO_HOME_Y "Domu osa Y" -#define MSG_AUTO_HOME_Z "Domu osa Z" -#define MSG_LEVEL_BED_HOMING "Mereni podlozky" -#define MSG_LEVEL_BED_WAITING "Kliknutim spustte" -#define MSG_LEVEL_BED_NEXT_POINT "Dalsi bod" -#define MSG_LEVEL_BED_DONE "Mereni hotovo!" -#define MSG_LEVEL_BED_CANCEL "Storno" -#define MSG_SET_HOME_OFFSETS "Nastavit ofsety" -#define MSG_HOME_OFFSETS_APPLIED "Ofsety nastaveny" -#define MSG_SET_ORIGIN "Nastavit pocatek" -#define MSG_PREHEAT_1 "Zahrat PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " Vse" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " Podloz" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " Nast" -#define MSG_PREHEAT_2 "Zahrat ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " Vse" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " Podloz" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " Nast" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Zchladit" -#define MSG_SWITCH_PS_ON "Zapnout napajeni" -#define MSG_SWITCH_PS_OFF "Vypnout napajeni" -#define MSG_EXTRUDE "Vytlacit (extr.)" -#define MSG_RETRACT "Zatlacit (retr.)" -#define MSG_MOVE_AXIS "Posunout osy" -#define MSG_LEVEL_BED "Vyrovnat podlozku" -#define MSG_MOVE_X "Posunout X" -#define MSG_MOVE_Y "Posunout Y" -#define MSG_MOVE_Z "Posunout Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Posunout o 0,1mm" -#define MSG_MOVE_1MM "Posunout o 1mm" -#define MSG_MOVE_10MM "Posunout o 10mm" -#define MSG_SPEED "Rychlost" -#define MSG_BED_Z "Vyska podl." -#define MSG_NOZZLE "Tryska" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Podlozka" -#define MSG_FAN_SPEED "Rychlost vent." -#define MSG_FLOW "Prutok" -#define MSG_CONTROL "Ovladani" -#define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR " " LCD_STR_THERMOMETER " Fakt" -#define MSG_AUTOTEMP "Autoteplota" -#define MSG_ON "Zap" -#define MSG_OFF "Vyp" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_SELECT "Vybrat" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Zrychl" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retrakt" -#define MSG_A_TRAVEL "A-prejezd" -#define MSG_XSTEPS "Xkroku/mm" -#define MSG_YSTEPS "Ykroku/mm" -#define MSG_ZSTEPS "Zkroku/mm" -#define MSG_ESTEPS "Ekroku/mm" -#define MSG_TEMPERATURE "Teplota" -#define MSG_MOTION "Pohyb" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E na mm3" -#define MSG_FILAMENT_DIAM "Fil. Prum." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "Kontrast LCD" -#define MSG_STORE_EPROM "Ulozit nastaveni" -#define MSG_LOAD_EPROM "Nacist nastaveni" -#define MSG_RESTORE_FAILSAFE "Obnovit vychozi" -#define MSG_REFRESH "Obnovit" -#define MSG_WATCH "Info obrazovka" -#define MSG_PREPARE "Priprava tisku" -#define MSG_TUNE "Doladeni tisku" -#define MSG_PAUSE_PRINT "Pozastavit tisk" -#define MSG_RESUME_PRINT "Obnovit tisk" -#define MSG_STOP_PRINT "Zastavit tisk" -#define MSG_CARD_MENU "Tisknout z SD" -#define MSG_NO_CARD "Zadna SD karta" -#define MSG_DWELL "Uspano..." -#define MSG_USERWAIT "Cekani na uziv..." -#define MSG_RESUMING "Obnovovani tisku" -#define MSG_PRINT_ABORTED "Tisk zrusen" -#define MSG_NO_MOVE "Zadny pohyb." -#define MSG_KILLED "PRERUSENO. " -#define MSG_STOPPED "ZASTAVENO. " -#define MSG_CONTROL_RETRACT "Retrakt mm" -#define MSG_CONTROL_RETRACT_SWAP "Vymena Re.mm" -#define MSG_CONTROL_RETRACTF "Retraktovat V" -#define MSG_CONTROL_RETRACT_ZLIFT "Zvednuti Z mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Vymenit filament" -#define MSG_INIT_SDCARD "Nacist SD kartu" -#define MSG_CNG_SDCARD "Vymenit SD kartu" -#define MSG_ZPROBE_OUT "Sonda Z mimo podl" -#define MSG_HOME "Domu" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "prvni" -#define MSG_ZPROBE_ZOFFSET "Z ofset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_HEATING_FAILED_LCD "Chyba zahrivani" -#define MSG_ERR_REDUNDANT_TEMP "REDUND. TEPLOTA" -#define MSG_THERMAL_RUNAWAY "TEPLOTNI SKOK" -#define MSG_ERR_MAXTEMP "VYSOKA TEPLOTA" -#define MSG_ERR_MINTEMP "NIZKA TEPLOTA" -#define MSG_ERR_MAXTEMP_BED "VYS. TEPL. PODL." -#define MSG_ERR_MINTEMP_BED "NIZ. TEPL. PODL." -#define MSG_HALTED "TISK. ZASTAVENA" -#define MSG_PLEASE_RESET "Provedte reset" -#define MSG_SHORT_DAY "d" -#define MSG_SHORT_HOUR "h" -#define MSG_SHORT_MINUTE "m" -#define MSG_HEATING "Zahrivani..." -#define MSG_HEATING_COMPLETE "Zahrati hotovo." -#define MSG_BED_HEATING "Zahrivani podl." -#define MSG_BED_DONE "Podlozka hotova." -#define MSG_DELTA_CALIBRATE "Delta Kalibrace" -#define MSG_DELTA_CALIBRATE_X "Kalibrovat X" -#define MSG_DELTA_CALIBRATE_Y "Kalibrovat Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibrovat Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibrovat Stred" -#define MSG_INFO_MENU "O tiskarne" -#define MSG_INFO_PRINTER_MENU "Info o tiskarne" -#define MSG_INFO_STATS_MENU "Statistika" -#define MSG_INFO_BOARD_MENU "Info o desce" -#define MSG_INFO_THERMISTOR_MENU "Termistory" -#define MSG_INFO_EXTRUDERS "Extrudery" -#define MSG_INFO_BAUDRATE "Rychlost" -#define MSG_INFO_PROTOCOL "Protokol" -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Pocet tisku" - #define MSG_INFO_COMPLETED_PRINTS "Dokonceno" - #define MSG_INFO_PRINT_TIME "Celkovy cas" - #define MSG_INFO_PRINT_LONGEST "Nejdelsi tisk" - #define MSG_INFO_PRINT_FILAMENT "Celkem vytlaceno" -#else - #define MSG_INFO_PRINT_COUNT "Tisky" - #define MSG_INFO_COMPLETED_PRINTS "Hotovo" - #define MSG_INFO_PRINT_TIME "Cas" - #define MSG_INFO_PRINT_LONGEST "Nejdelsi" - #define MSG_INFO_PRINT_FILAMENT "Vytlaceno" -#endif -#define MSG_INFO_MIN_TEMP "Teplota min" -#define MSG_INFO_MAX_TEMP "Teplota max" -#define MSG_INFO_PSU "Nap. zdroj" - -#define MSG_FILAMENT_CHANGE_HEADER "VYMENA FILAMENTU" -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "CO DAL?" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Jeste vytlacit" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Obnovit tisk" -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Cekejte prosim" - #define MSG_FILAMENT_CHANGE_INIT_2 "na zahajeni" - #define MSG_FILAMENT_CHANGE_INIT_3 "vymeny filamentu" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Cekejte prosim" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "na vysunuti" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "filamentu" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Vlozte filament" - #define MSG_FILAMENT_CHANGE_INSERT_2 "a stisknete" - #define MSG_FILAMENT_CHANGE_INSERT_3 "tlacitko..." - #define MSG_FILAMENT_CHANGE_LOAD_1 "Cekejte prosim" - #define MSG_FILAMENT_CHANGE_LOAD_2 "na zavedeni" - #define MSG_FILAMENT_CHANGE_LOAD_3 "filamentu" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Cekejte prosim" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "na vytlaceni" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "filamentu" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Cekejte prosim" - #define MSG_FILAMENT_CHANGE_RESUME_2 "na pokracovani" - #define MSG_FILAMENT_CHANGE_RESUME_3 "tisku" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Cekejte..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Vysouvani..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Vlozte, kliknete" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Zavadeni..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Vytlacovani..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Pokracovani..." -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_CZ_H diff --git a/Marlin/language_da.h b/Marlin/language_da.h deleted file mode 100644 index b107ca0..0000000 --- a/Marlin/language_da.h +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Danish - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_DA_H -#define LANGUAGE_DA_H - -#define MAPPER_C2C3 -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " er klar" -#define MSG_SD_INSERTED "Kort isat" -#define MSG_SD_REMOVED "Kort fjernet" -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "Menu" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "SlÃ¥ alle steppere fra" -#define MSG_AUTO_HOME "Auto Home" // G28 -#define MSG_AUTO_HOME_X "Home X" -#define MSG_AUTO_HOME_Y "Home Y" -#define MSG_AUTO_HOME_Z "Home Z" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Tryk for at starte bed level" -#define MSG_LEVEL_BED_NEXT_POINT "Næste punkt" -#define MSG_LEVEL_BED_DONE "Bed level er færdig!" -#define MSG_LEVEL_BED_CANCEL "Annuller bed level" -#define MSG_SET_HOME_OFFSETS "Sæt forskyding af home" -#define MSG_HOME_OFFSETS_APPLIED "Forskydninger af home pos. er tilføjet" -#define MSG_SET_ORIGIN "Sæt origin" -#define MSG_PREHEAT_1 "Forvarm PLA" -#define MSG_PREHEAT_1_N "Forvarm PLA " -#define MSG_PREHEAT_1_ALL "Forvarm PLA Alle" -#define MSG_PREHEAT_1_BEDONLY "Forvarm PLA Bed" -#define MSG_PREHEAT_1_SETTINGS "Forvarm PLA conf" -#define MSG_PREHEAT_2 "Forvarm ABS" -#define MSG_PREHEAT_2_N "Forvarm ABS " -#define MSG_PREHEAT_2_ALL "Forvarm ABS Alle" -#define MSG_PREHEAT_2_BEDONLY "Forvarm ABS Bed" -#define MSG_PREHEAT_2_SETTINGS "Forvarm ABS conf" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Afkøl" -#define MSG_SWITCH_PS_ON "SlÃ¥ strøm til" -#define MSG_SWITCH_PS_OFF "SlÃ¥ strøm fra" -#define MSG_EXTRUDE "Extruder" -#define MSG_RETRACT "Retract" -#define MSG_MOVE_AXIS "Flyt akser" -#define MSG_LEVEL_BED "Juster bed" -#define MSG_MOVE_X "Flyt X" -#define MSG_MOVE_Y "Flyt Y" -#define MSG_MOVE_Z "Flyt Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Flyt 0.1mm" -#define MSG_MOVE_1MM "Flyt 1mm" -#define MSG_MOVE_10MM "Flyt 10mm" -#define MSG_SPEED "Hastighed" -#define MSG_BED_Z "Plade Z" -#define MSG_NOZZLE "Dyse" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Plade" -#define MSG_FAN_SPEED "Blæser hastighed" -#define MSG_FLOW "Flow" -#define MSG_CONTROL "Kontrol" -#define MSG_MIN " \002 Min" -#define MSG_MAX " \002 Max" -#define MSG_FACTOR " \002 Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "Til " -#define MSG_OFF "Fra" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-rejse" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "Temperatur" -#define MSG_MOTION "Bevægelse" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "LCD kontrast" -#define MSG_STORE_EPROM "Gem i EEPROM" -#define MSG_LOAD_EPROM "Hent fra EEPROM" -#define MSG_RESTORE_FAILSAFE "Gendan failsafe" -#define MSG_REFRESH "Genopfrisk" -#define MSG_WATCH "Info skærm" -#define MSG_PREPARE "Forbered" -#define MSG_TUNE "Tune" -#define MSG_PAUSE_PRINT "Pause printet" -#define MSG_RESUME_PRINT "Forsæt printet" -#define MSG_STOP_PRINT "Stop printet" -#define MSG_CARD_MENU "Print fra SD" -#define MSG_NO_CARD "Intet SD kort" -#define MSG_DWELL "Dvale..." -#define MSG_USERWAIT "Venter pÃ¥ bruger..." -#define MSG_RESUMING "Forsætter printet" -#define MSG_PRINT_ABORTED "Print annulleret" -#define MSG_NO_MOVE "Ingen bevægelse." -#define MSG_KILLED "DRÆBT. " -#define MSG_STOPPED "STOPPET. " -#define MSG_CONTROL_RETRACT "Tilbagetræk mm" -#define MSG_CONTROL_RETRACT_SWAP "Skift Re.mm" -#define MSG_CONTROL_RETRACTF "Tilbagetræk V" -#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Skift filament" -#define MSG_INIT_SDCARD "Init. SD card" -#define MSG_CNG_SDCARD "Skift SD kort" -#define MSG_ZPROBE_OUT "Probe udenfor plade" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_HEATING_FAILED_LCD "Opvarmning mislykkedes" -#define MSG_ERR_REDUNDANT_TEMP "Fejl: reserve temp" -#define MSG_THERMAL_RUNAWAY "Temp løber løbsk" -#define MSG_ERR_MAXTEMP "Fejl: Maks temp" -#define MSG_ERR_MINTEMP "Fejl: Min temp" -#define MSG_ERR_MAXTEMP_BED "Fejl: Maks Plsde temp" -#define MSG_ERR_MINTEMP_BED "Fejl: Min Plade temp" -#define MSG_HEATING "Opvarmer..." -#define MSG_HEATING_COMPLETE "Opvarmet" -#define MSG_BED_HEATING "Opvarmer plade" -#define MSG_BED_DONE "Plade opvarmet" -#define MSG_DELTA_CALIBRATE "Delta Kalibrering" -#define MSG_DELTA_CALIBRATE_X "Kalibrer X" -#define MSG_DELTA_CALIBRATE_Y "Kalibrer Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibrer Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibrerings Center" - -#endif // LANGUAGE_DA_H diff --git a/Marlin/language_de.h b/Marlin/language_de.h deleted file mode 100644 index 9744378..0000000 --- a/Marlin/language_de.h +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * German - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_DE_H -#define LANGUAGE_DE_H - -#define MAPPER_C2C3 -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " bereit" -#define MSG_SD_INSERTED "SD-Karte erkannt" -#define MSG_SD_REMOVED "SD-Karte entfernt" -#define MSG_MAIN "Hauptmenü" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Motoren aus" // M84 -#define MSG_AUTO_HOME "Home" // G28 -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Klick für Start" -#define MSG_LEVEL_BED_DONE "Fertig" -#define MSG_LEVEL_BED_CANCEL "Abbruch" -#define MSG_SET_HOME_OFFSETS "Setze Homeoffsets" -#define MSG_HOME_OFFSETS_APPLIED "Offsets aktiv" -#define MSG_SET_ORIGIN "Setze Nullpunkt" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp -#define MSG_PREHEAT_1 "Vorwärmen PLA" -#define MSG_PREHEAT_1_N "Vorwärmen PLA " -#define MSG_PREHEAT_1_ALL "Vorw. PLA Alle" -#define MSG_PREHEAT_1_BEDONLY "Vorw. PLA Bett" -#define MSG_PREHEAT_1_SETTINGS "Vorw. PLA Einst." -#define MSG_PREHEAT_2 "Vorwärmen ABS" -#define MSG_PREHEAT_2_N "Vorwärmen ABS " -#define MSG_PREHEAT_2_ALL "Vorw. ABS Alle" -#define MSG_PREHEAT_2_BEDONLY "Vorw. ABS Bett" -#define MSG_PREHEAT_2_SETTINGS "Vorw. ABS Einst." -#define MSG_COOLDOWN "Abkühlen" -#define MSG_SWITCH_PS_ON "Netzteil ein" -#define MSG_SWITCH_PS_OFF "Netzteil aus" -#define MSG_EXTRUDE "Extrudieren" -#define MSG_RETRACT "Retract" -#define MSG_MOVE_AXIS "Bewegen" -#define MSG_LEVEL_BED "Bett nivellieren" -#define MSG_MOVE_X "X" -#define MSG_MOVE_Y "Y" -#define MSG_MOVE_Z "Z" -#define MSG_MOVE_E "E" -#define MSG_MOVE_01MM " 0.1 mm" -#define MSG_MOVE_1MM " 1.0 mm" -#define MSG_MOVE_10MM "10.0 mm" -#define MSG_SPEED "Geschw." -#define MSG_BED_Z "Bett Z" -#define MSG_NOZZLE "Düse" -#define MSG_BED "Bett" -#define MSG_FAN_SPEED "Lüfter" -#define MSG_FLOW "Durchfluss" -#define MSG_CONTROL "Einstellungen" -#define MSG_MIN LCD_STR_THERMOMETER " min" -#define MSG_MAX LCD_STR_THERMOMETER " max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Faktor" -#define MSG_AUTOTEMP "AutoTemp" -#define MSG_ON "Ein" -#define MSG_OFF "Aus" -#define MSG_PID_P "PID P" -#define MSG_PID_I "PID I" -#define MSG_PID_D "PID D" -#define MSG_PID_C "PID C" -#define MSG_ACC "A" -#define MSG_VXY_JERK "V XY Jerk" -#define MSG_VZ_JERK "V Z Jerk" -#define MSG_VE_JERK "V E Jerk" -#define MSG_VMAX "V max " // space by purpose -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "V min" -#define MSG_VTRAV_MIN "V min Leerfahrt" -#define MSG_AMAX "A max " // space by purpose -#define MSG_A_RETRACT "A Retract" -#define MSG_A_TRAVEL "A Leerfahrt" -#define MSG_XSTEPS "X Steps/mm" -#define MSG_YSTEPS "Y Steps/mm" -#define MSG_ZSTEPS "Z Steps/mm" -#define MSG_ESTEPS "E Steps/mm" -#define MSG_TEMPERATURE "Temperatur" -#define MSG_MOTION "Bewegung" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm³" -#define MSG_FILAMENT_DIAM "D Fil." -#define MSG_CONTRAST "LCD Kontrast" -#define MSG_STORE_EPROM "EPROM speichern" -#define MSG_LOAD_EPROM "EPROM laden" -#define MSG_RESTORE_FAILSAFE "Standardkonfiguration" -#define MSG_REFRESH "Aktualisieren" -#define MSG_WATCH "Info" -#define MSG_PREPARE "Vorbereitung" -#define MSG_TUNE "Justierung" -#define MSG_PAUSE_PRINT "SD-Druck Pause" -#define MSG_RESUME_PRINT "SD-Druck Fortsetzung" -#define MSG_STOP_PRINT "SD-Druck Abbruch" -#define MSG_CARD_MENU "SD-Karte" -#define MSG_NO_CARD "Keine SD-Karte" -#define MSG_DWELL "Warten..." -#define MSG_USERWAIT "Warte auf Nutzer" -#define MSG_RESUMING "Druckfortsetzung" -#define MSG_PRINT_ABORTED "Druck abgebrochen" -#define MSG_NO_MOVE "Motoren eingeschaltet" -#define MSG_KILLED "KILLED" -#define MSG_STOPPED "ANGEHALTEN" -#define MSG_CONTROL_RETRACT "Retract mm" -#define MSG_CONTROL_RETRACT_SWAP "Wechs. Retract mm" -#define MSG_CONTROL_RETRACTF "Retract V" -#define MSG_CONTROL_RETRACT_ZLIFT "Z-Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Wechs. UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRetract" -#define MSG_FILAMENTCHANGE "Filament wechseln" -#define MSG_INIT_SDCARD "SD-Karte erkennen" // Manually initialize the SD-card via user interface -#define MSG_CNG_SDCARD "SD-Karte getauscht" // SD-card changed by user. For machines with no autocarddetect. Both send "M21" -#define MSG_ZPROBE_OUT "Sensor ausserhalb" -#define MSG_HOME "Vorher" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "homen" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop-Abbr. ein" -#define MSG_HEATING_FAILED_LCD "HEIZEN FEHLGESCHLAGEN" -#define MSG_ERR_REDUNDANT_TEMP "REDUND. TEMPERATURABWEICHUNG" -#define MSG_THERMAL_RUNAWAY LCD_STR_THERMOMETER " NICHT ERREICHT" -#define MSG_ERR_MAXTEMP LCD_STR_THERMOMETER " ÜBERSCHRITTEN" -#define MSG_ERR_MINTEMP LCD_STR_THERMOMETER " UNTERSCHRITTEN" -#define MSG_ERR_MAXTEMP_BED "BETT " LCD_STR_THERMOMETER " ÜBERSCHRITTEN" -#define MSG_ERR_MINTEMP_BED "BETT " LCD_STR_THERMOMETER " UNTERSCHRITTEN" -#define MSG_HEATING "Aufheizen..." -#define MSG_HEATING_COMPLETE "Aufgeheizt" -#define MSG_BED_HEATING "Bett aufheizen" -#define MSG_BED_DONE "Bett aufgeheizt" -#define MSG_DELTA_CALIBRATE "Delta kalibrieren" -#define MSG_DELTA_CALIBRATE_X "Kalibriere X" -#define MSG_DELTA_CALIBRATE_Y "Kalibriere Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibriere Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibriere Mitte" - -#define MSG_INFO_MENU "Über den Drucker" -#define MSG_INFO_PRINTER_MENU "Drucker Info" -#define MSG_INFO_STATS_MENU "Drucker Stats" -#define MSG_INFO_BOARD_MENU "Board Info" -#define MSG_INFO_THERMISTOR_MENU "Thermistors" -#define MSG_INFO_EXTRUDERS "Extruders" -#define MSG_INFO_BAUDRATE "Baud" -#define MSG_INFO_PROTOCOL "Protokol" - -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Gesamte Drucke " - #define MSG_INFO_COMPLETED_PRINTS "Beendete Drucke " - #define MSG_INFO_PRINT_TIME "Gesamte Druckzeit" -#else - #define MSG_INFO_PRINT_COUNT "Prints " - #define MSG_INFO_COMPLETED_PRINTS "Completed" - #define MSG_INFO_PRINT_TIME "Duration " -#endif -#define MSG_INFO_MIN_TEMP "Min Temp" -#define MSG_INFO_MAX_TEMP "Max Temp" -#define MSG_INFO_PSU "Stromversorgung" - -#define MSG_FILAMENT_CHANGE_HEADER "ÄNDERE FILAMENT" -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "ÄNDERE OPTIONEN:" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrude mehr" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Drucke weiter" - -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Warte auf den" - #define MSG_FILAMENT_CHANGE_INIT_2 "Start zum " - #define MSG_FILAMENT_CHANGE_INIT_3 "Filament wechsel" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Warte auf das" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "herrausnehmen" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "des Filaments" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Fädel Filament" - #define MSG_FILAMENT_CHANGE_INSERT_2 "ein und drücke" - #define MSG_FILAMENT_CHANGE_INSERT_3 "den Knopf..." - #define MSG_FILAMENT_CHANGE_LOAD_1 "Warte auf das" - #define MSG_FILAMENT_CHANGE_LOAD_2 "laden des" - #define MSG_FILAMENT_CHANGE_LOAD_3 "Filaments" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Warte auf das" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "Extruden des" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "Filaments" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Warte auf das" - #define MSG_FILAMENT_CHANGE_RESUME_2 "fortfahren des" - #define MSG_FILAMENT_CHANGE_RESUME_3 "Druckes" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Bitte warten..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Auswerfen..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Laden und Klick" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Laden..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruden..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Weitermachen..." -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_DE_H diff --git a/Marlin/language_el-gr.h b/Marlin/language_el-gr.h deleted file mode 100644 index 510e8aa..0000000 --- a/Marlin/language_el-gr.h +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Greek (Greece) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_EL_GR_H -#define LANGUAGE_EL_GR_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT - -//#define MAPPER_CECF -//#define DISPLAY_CHARSET_ISO10646_GREEK - -#define WELCOME_MSG MACHINE_NAME " έτοιμο." -#define MSG_SD_INSERTED "Εισαγωγή κάÏτας" -#define MSG_SD_REMOVED "ΑφαίÏεση κάÏτας" -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "Βασική Οθόνη" -#define MSG_AUTOSTART "Αυτόματη εκκίνηση" -#define MSG_DISABLE_STEPPERS "ΑπενεÏγοποίηση βηματιστή" -#define MSG_AUTO_HOME "Αυτομ. επαναφοÏά στο αÏχικό σημείο" -#define MSG_AUTO_HOME_X "ΑÏχικό σημείο X" -#define MSG_AUTO_HOME_Y "ΑÏχικό σημείο Y" -#define MSG_AUTO_HOME_Z "ΑÏχικό σημείο Z" -#define MSG_LEVEL_BED_HOMING "ΕπαναφοÏά στο αÏχικό σημείο ΧΥΖ" -#define MSG_LEVEL_BED_WAITING "Κάντε κλικ για να ξεκινήσετε" -#define MSG_LEVEL_BED_NEXT_POINT "Επόμενο σημείο" -#define MSG_LEVEL_BED_DONE "ΟλοκλήÏωση επιπεδοποίησης!" -#define MSG_LEVEL_BED_CANCEL "ΑκÏÏωση" -#define MSG_SET_HOME_OFFSETS "ΟÏισμός βασικών μετατοπίσεων" -#define MSG_HOME_OFFSETS_APPLIED "ΕφαÏμόστηκαν οι μετατοπίσεις" -#define MSG_SET_ORIGIN "ΟÏισμός Ï€Ïοέλευσης" -#define MSG_PREHEAT_1 "ΠÏοθέÏμανση PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " όλα" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " κλίνη" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " επιβεβαίωση" -#define MSG_PREHEAT_2 "ΠÏοθέÏμανση ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " όλα" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " Bed" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " επιβεβαίωση" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Μειωση θεÏμοκÏασιας" -#define MSG_SWITCH_PS_ON "ΕνεÏγοποίηση" -#define MSG_SWITCH_PS_OFF "ΑπενεÏγοποίηση" -#define MSG_EXTRUDE "Εξώθηση" -#define MSG_RETRACT "ΑνάσυÏση" -#define MSG_MOVE_AXIS "Μετακίνηση άξονα" -#define MSG_LEVEL_BED "Επιπεδοποίηση κλίνης" -#define MSG_MOVE_X "Μετακίνηση X" -#define MSG_MOVE_Y "Μετακίνηση Y" -#define MSG_MOVE_Z "Μετακίνηση Z" -#define MSG_MOVE_E "ΕξωθητήÏας" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Μετακίνηση 0,1 μμ" -#define MSG_MOVE_1MM "Μετακίνηση 1 μμ" -#define MSG_MOVE_10MM "Μετακίνηση 10 μμ" -#define MSG_SPEED "ΤαχÏτητα" -#define MSG_BED_Z "Κλίνη Z" -#define MSG_NOZZLE "ΑκÏοφÏσιο" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Κλίνη" -#define MSG_FAN_SPEED "ΤαχÏτητα ανεμιστήÏα" -#define MSG_FLOW "Ροή" -#define MSG_CONTROL "Έλεγχος" -#define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR " " LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Αυτομ. ÏÏθμιση θεÏμοκÏασίας" -#define MSG_ON "ΕνεÏγοποιημένο" -#define MSG_OFF "ΑπενεÏγοποιημένο" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Επιτάχυνση" -#define MSG_VXY_JERK "VαντίδÏαση xy" -#define MSG_VZ_JERK "VαντίδÏαση z" -#define MSG_VE_JERK "VαντίδÏαση e" -#define MSG_VMAX "Vμεγ " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vελαχ" -#define MSG_VTRAV_MIN "Vελάχ. μετατόπιση" -#define MSG_AMAX "Aμεγ " -#define MSG_A_RETRACT "Α-ανάσυÏση" -#define MSG_A_TRAVEL "Α-μετατόπιση" -#define MSG_XSTEPS "Bήματα X ανά μμ" -#define MSG_YSTEPS "Bήματα Î¥ ανά μμ" -#define MSG_ZSTEPS "Bήματα Ζ ανά μμ" -#define MSG_ESTEPS "Bήματα Ε ανά μμ" -#define MSG_TEMPERATURE "ΘεÏμοκÏασία" -#define MSG_MOTION "Κίνηση" -#define MSG_VOLUMETRIC "Îήμα" -#define MSG_VOLUMETRIC_ENABLED "Ε σε μμ3" -#define MSG_FILAMENT_DIAM "ΔιάμετÏος νήματος" -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "ΚοντÏάστ LCD" -#define MSG_STORE_EPROM "Αποθήκευση" -#define MSG_LOAD_EPROM "ΦόÏτωση" -#define MSG_RESTORE_FAILSAFE "ΕπαναφοÏά ασφαλοÏÏ‚ αντιγÏάφου" -#define MSG_REFRESH "Ανανέωση" -#define MSG_WATCH "Οθόνη πληÏοφόÏησης" -#define MSG_PREPARE "ΠÏοετοιμασία" -#define MSG_TUNE "Συντονισμός" -#define MSG_PAUSE_PRINT "ΠαÏση εκτÏπωσης" -#define MSG_RESUME_PRINT "Συνέχιση εκτÏπωσης" -#define MSG_STOP_PRINT "Διακοπή εκτÏπωσης" -#define MSG_CARD_MENU "ΕκτÏπωση από SD" -#define MSG_NO_CARD "Δεν βÏέθηκε SD" -#define MSG_DWELL "Αναστολή λειτουÏγίας..." -#define MSG_USERWAIT "Αναμονή για χÏήστη…" -#define MSG_RESUMING "Συνεχίζεται η εκτÏπωση" -#define MSG_PRINT_ABORTED "Διακόπτεται η εκτÏπωση" -#define MSG_NO_MOVE "Καμία κίνηση." -#define MSG_KILLED "ΤΕΡΜΑΤΙΣΜΟΣ. " -#define MSG_STOPPED "ΔΙΑΚΟΠΗ. " -#define MSG_CONTROL_RETRACT "ΑνάσυÏση μμ" -#define MSG_CONTROL_RETRACT_SWAP "Εναλλαγή ανάσυÏσης μμ" -#define MSG_CONTROL_RETRACTF "ΑνάσυÏση V" -#define MSG_CONTROL_RETRACT_ZLIFT "Μεταπήδηση μμ" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "Αυτόματη ανάσυÏση" -#define MSG_FILAMENTCHANGE "Αλλαγή νήματος" -#define MSG_INIT_SDCARD "ΠÏοετοιμασία κάÏτας SD" -#define MSG_CNG_SDCARD "Αλλαγή κάÏτας SD" -#define MSG_ZPROBE_OUT "ΔιεÏεÏνηση Z εκτός κλίνης" -#define MSG_YX_UNHOMED "ΕπαναφοÏά Χ/Î¥ Ï€Ïιν από Ζ" -#define MSG_XYZ_UNHOMED "ΕπαναφοÏά ΧΥΖ Ï€Ïώτα" -#define MSG_ZPROBE_ZOFFSET "Μετατόπιση Ζ" -#define MSG_BABYSTEP_X "ΜικÏÏŒ βήμα Χ" -#define MSG_BABYSTEP_Y "ΜικÏÏŒ βήμα Î¥" -#define MSG_BABYSTEP_Z "ΜικÏÏŒ βήμα Ζ" -#define MSG_ENDSTOP_ABORT "Ματαίωση endstop " -#define MSG_HEATING_FAILED_LCD "Ανεπιτυχής θέÏμανση" -#define MSG_ERR_REDUNDANT_TEMP "Λάθος: ΠΛΕΟÎΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ" -#define MSG_THERMAL_RUNAWAY "ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ" -#define MSG_ERR_MAXTEMP "Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ" -#define MSG_ERR_MINTEMP "Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ" -#define MSG_ERR_MAXTEMP_BED "Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙÎΗΣ" -#define MSG_ERR_MINTEMP_BED "Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ ΚΛΙÎΗΣ" -#define MSG_HEATING "ΘεÏμαίνεται…" -#define MSG_HEATING_COMPLETE "Η θέÏμανση ολοκληÏώθηκε." -#define MSG_BED_HEATING "ΘέÏμανση κλίνης." -#define MSG_BED_DONE "Η κλίνη ολοκληÏώθηκε." -#define MSG_DELTA_CALIBRATE "Βαθμονόμηση Delta" -#define MSG_DELTA_CALIBRATE_X "Βαθμονόμηση X" -#define MSG_DELTA_CALIBRATE_Y "Βαθμονόμηση Y" -#define MSG_DELTA_CALIBRATE_Z "Βαθμονόμηση Z" -#define MSG_DELTA_CALIBRATE_CENTER "Βαθμονόμηση κέντÏου" - -#endif // LANGUAGE_EL_GR_H diff --git a/Marlin/language_el.h b/Marlin/language_el.h deleted file mode 100644 index 9d1c855..0000000 --- a/Marlin/language_el.h +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Greek - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_EL_H -#define LANGUAGE_EL_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT - -#define MAPPER_CECF -#define DISPLAY_CHARSET_ISO10646_GREEK - -#define WELCOME_MSG MACHINE_NAME " έτοιμο." -#define MSG_SD_INSERTED "Εισαγωγή κάÏτας" -#define MSG_SD_REMOVED "ΑφαίÏεση κάÏτας" -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "Βασική Οθόνη" -#define MSG_AUTOSTART "Αυτόματη εκκίνηση" -#define MSG_DISABLE_STEPPERS "ΑπενεÏγοποίηση ΜοτέÏ" -#define MSG_AUTO_HOME "Αυτομ. επαναφοÏά στο αÏχικό σημείο" //SHORTEN -#define MSG_AUTO_HOME_X "ΑÏχικό σημείο X" -#define MSG_AUTO_HOME_Y "ΑÏχικό σημείο Y" -#define MSG_AUTO_HOME_Z "ΑÏχικό σημείο Z" -#define MSG_LEVEL_BED_HOMING "ΕπαναφοÏά Επ. ΕκτÏπωσης" //SHORTEN -#define MSG_LEVEL_BED_WAITING "Επιπεδοποίηση επ. ΕκτÏπωσης πεÏιμενει" //SHORTEN -#define MSG_LEVEL_BED_NEXT_POINT "Επόμενο σημείο" -#define MSG_LEVEL_BED_DONE "ΟλοκλήÏωση επιπεδοποίησης!" //SHORTEN -#define MSG_LEVEL_BED_CANCEL "ΑκÏÏωση" -#define MSG_SET_HOME_OFFSETS "ΟÏισμός βασικών μετατοπίσεων" //SHORTEN -#define MSG_HOME_OFFSETS_APPLIED "ΕφαÏμόστηκαν οι μετατοπίσεις" //SHORTEN -#define MSG_SET_ORIGIN "ΟÏισμός Ï€Ïοέλευσης" -#define MSG_PREHEAT_1 "ΠÏοθέÏμανση PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " όλα" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " bed" //SHORTEN -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " επιβεβαίωση" //SHORTEN -#define MSG_PREHEAT_2 "ΠÏοθέÏμανση ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " όλα" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " bed" //SHORTEN -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " επιβεβαίωση" //SHORTEN -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Μειωση θεÏμοκÏασιας" -#define MSG_SWITCH_PS_ON "ΕνεÏγοποίηση" -#define MSG_SWITCH_PS_OFF "ΑπενεÏγοποίηση" -#define MSG_EXTRUDE "Εξώθηση" -#define MSG_RETRACT "ΑνάσυÏση" -#define MSG_MOVE_AXIS "Μετακίνηση άξονα" -#define MSG_LEVEL_BED "Επιπεδοποίηση Επ. ΕκτÏπωσης" //SHORTEN -#define MSG_MOVE_X "Μετακίνηση X" -#define MSG_MOVE_Y "Μετακίνηση Y" -#define MSG_MOVE_Z "Μετακίνηση Z" -#define MSG_MOVE_E "ΕξωθητήÏας" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Μετακίνηση 0,1μμ" -#define MSG_MOVE_1MM "Μετακίνηση 1μμ" -#define MSG_MOVE_10MM "Μετακίνηση 10μμ" -#define MSG_SPEED "ΤαχÏτητα" -#define MSG_BED_Z "Επ. ΕκτÏπωσης Z" -#define MSG_NOZZLE "ΑκÏοφÏσιο" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Κλίνη" -#define MSG_FAN_SPEED "ΤαχÏτητα ανεμιστήÏα" -#define MSG_FLOW "Ροή" -#define MSG_CONTROL "Έλεγχος" -#define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR " " LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Αυτομ ÏÏθμιση θεÏ/σίας" //SHORTEN -#define MSG_ON "ΕνεÏγοποιημένο" -#define MSG_OFF "ΑπενεÏγοποιημένο" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Επιτάχυνση" -#define MSG_VXY_JERK "VαντίδÏαση xy" -#define MSG_VZ_JERK "VαντίδÏαση z" -#define MSG_VE_JERK "VαντίδÏαση e" -#define MSG_VMAX "V Μέγιστο" -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "V Ελάχιστο" -#define MSG_VTRAV_MIN "Vελάχ. μετατόπιση" -#define MSG_AMAX "Aμεγ " -#define MSG_A_RETRACT "Α-ανάσυÏση" -#define MSG_A_TRAVEL "Α-μετατόπιση" -#define MSG_XSTEPS "Bήματα X ανά μμ" -#define MSG_YSTEPS "Bήματα Î¥ ανά μμ" -#define MSG_ZSTEPS "Bήματα Ζ ανά μμ" -#define MSG_ESTEPS "Bήματα Ε ανά μμ" -#define MSG_TEMPERATURE "ΘεÏμοκÏασία" -#define MSG_MOTION "Κίνηση" -#define MSG_VOLUMETRIC "Îήμα" -#define MSG_VOLUMETRIC_ENABLED "Ε σε μμ3" -#define MSG_FILAMENT_DIAM "ΔιάμετÏος νήματος" -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "ΚοντÏάστ LCD" -#define MSG_STORE_EPROM "Αποθήκευση" -#define MSG_LOAD_EPROM "ΦόÏτωση" -#define MSG_RESTORE_FAILSAFE "ΕπαναφοÏά ασφαλοÏÏ‚ αντιγÏάφου" //SHORTEN -#define MSG_REFRESH "Ανανέωση" -#define MSG_WATCH "Οθόνη πληÏοφόÏησης" -#define MSG_PREPARE "ΠÏοετοιμασία" -#define MSG_TUNE "Συντονισμός" -#define MSG_PAUSE_PRINT "ΠαÏση εκτÏπωσης" -#define MSG_RESUME_PRINT "Συνέχιση εκτÏπωσης" -#define MSG_STOP_PRINT "Διακοπή εκτÏπωσης" -#define MSG_CARD_MENU "ΕκτÏπωση από SD" -#define MSG_NO_CARD "Δεν βÏέθηκε SD" -#define MSG_DWELL "Αναστολή λειτουÏγίας" -#define MSG_USERWAIT "Αναμονή για χÏήστη" -#define MSG_RESUMING "Συνεχίζεται η εκτÏπωση" //SHORTEN -#define MSG_PRINT_ABORTED "Διακόπτεται η εκτÏπωση" //SHORTEN -#define MSG_NO_MOVE "Καμία κίνηση." -#define MSG_KILLED "ΤΕΡΜΑΤΙΣΜΟΣ. " -#define MSG_STOPPED "ΔΙΑΚΟΠΗ. " -#define MSG_CONTROL_RETRACT "ΑνάσυÏση μμ" -#define MSG_CONTROL_RETRACT_SWAP "Εναλλαγή ανάσυÏσης μμ" //SHORTEN -#define MSG_CONTROL_RETRACTF "ΑνάσυÏση V" -#define MSG_CONTROL_RETRACT_ZLIFT "Μεταπήδηση μμ" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "Αυτόματη ανάσυÏση" -#define MSG_FILAMENTCHANGE "Αλλαγή νήματος" -#define MSG_INIT_SDCARD "ΠÏοετοιμασία κάÏτας SD" //SHORTEN -#define MSG_CNG_SDCARD "Αλλαγή κάÏτας SD" -#define MSG_ZPROBE_OUT "ΔιεÏεÏνηση Z εκτός Επ.ΕκτÏπωσης" //SHORTEN -#define MSG_YX_UNHOMED "ΕπαναφοÏά Χ/Î¥ Ï€Ïιν από Ζ" //SHORTEN -#define MSG_XYZ_UNHOMED "ΕπαναφοÏά ΧΥΖ Ï€Ïώτα" -#define MSG_ZPROBE_ZOFFSET "Μετατόπιση Ζ" -#define MSG_BABYSTEP_X "ΜικÏÏŒ βήμα Χ" -#define MSG_BABYSTEP_Y "ΜικÏÏŒ βήμα Î¥" -#define MSG_BABYSTEP_Z "ΜικÏÏŒ βήμα Ζ" -#define MSG_ENDSTOP_ABORT "ΑκÏÏωση endstop " -#define MSG_HEATING_FAILED_LCD "Ανεπιτυχής θέÏμανση" -#define MSG_ERR_REDUNDANT_TEMP "ΠΛΕΟÎΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ" -#define MSG_THERMAL_RUNAWAY "ΔΙΑΦΥΓΗ ΘΕΡΜΟΚΡΑΣΙΑΣ" -#define MSG_ERR_MAXTEMP "ΠΕΡΙΤΗ ΘΕΡΜΟΚΡΑΣΙΑ" -#define MSG_ERR_MINTEMP "ΜΗ ΕΠΑΡΚΗΣ ΘΕΡΜΟΚΡΑΣΙΑΣ" //SHORTEN -#define MSG_ERR_MAXTEMP_BED "ΜΕΓΙΣΤΗ ΘΕΡΜΟΚΡΑΣΙΑΣ ΕΠ. ΕΚΤΥΠΩΣΗΣ" //SHORTEN -#define MSG_ERR_MINTEMP_BED "ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΚΡΑΣΙΑΣ ΕΠ. ΕΚΤΥΠΩΣΗΣ" //SHORTEN -#define MSG_HALTED "H εκτÏπωση διακόπηκε" -#define MSG_PLEASE_RESET "PLEASE RESET" //TRANSLATE -#define MSG_HEATING "ΘεÏμαίνεται…" -#define MSG_HEATING_COMPLETE "Η θέÏμανση ολοκληÏώθηκε." //SHORTEN -#define MSG_BED_HEATING "ΘέÏμανση ΕΠ. ΕκτÏπωσης" //SHORTEN -#define MSG_BED_DONE "Η Επ. ΕκτÏπωσης ολοκληÏώθηκε" //SHORTEN -#define MSG_DELTA_CALIBRATE "Βαθμονόμηση Delta" -#define MSG_DELTA_CALIBRATE_X "Βαθμονόμηση X" -#define MSG_DELTA_CALIBRATE_Y "Βαθμονόμηση Y" -#define MSG_DELTA_CALIBRATE_Z "Βαθμονόμηση Z" -#define MSG_DELTA_CALIBRATE_CENTER "Βαθμονόμηση κέντÏου" - -#define MSG_INFO_MENU "About Printer" -#define MSG_INFO_PRINTER_MENU "Printer Info" -#define MSG_INFO_STATS_MENU "Printer Stats" -#define MSG_INFO_BOARD_MENU "Board Info" -#define MSG_INFO_THERMISTOR_MENU "Thermistors" -#define MSG_INFO_EXTRUDERS "Extruders" -#define MSG_INFO_BAUDRATE "Baud" -#define MSG_INFO_PROTOCOL "Protocol" - -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Print Count" - #define MSG_INFO_COMPLETED_PRINTS "Completed " - #define MSG_INFO_PRINT_TIME "Total Time " -#else - #define MSG_INFO_PRINT_COUNT "Prints " - #define MSG_INFO_COMPLETED_PRINTS "Completed" - #define MSG_INFO_PRINT_TIME "Duration " -#endif -#define MSG_INFO_MIN_TEMP "Min Temp" -#define MSG_INFO_MAX_TEMP "Max Temp" -#define MSG_INFO_PSU "Power Supply" - -#define MSG_FILAMENT_CHANGE_HEADER "CHANGE FILAMENT" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrude more" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Resume print" - -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Wait for start" - #define MSG_FILAMENT_CHANGE_INIT_2 "of the filament" - #define MSG_FILAMENT_CHANGE_INIT_3 "change" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Wait for" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert filament" - #define MSG_FILAMENT_CHANGE_INSERT_2 "and press button" - #define MSG_FILAMENT_CHANGE_INSERT_3 "to continue..." - #define MSG_FILAMENT_CHANGE_LOAD_1 "Wait for" - #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" - #define MSG_FILAMENT_CHANGE_LOAD_3 "" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Wait for" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" - #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" - #define MSG_FILAMENT_CHANGE_RESUME_3 "" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Please wait..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruding..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Resuming..." -#endif - -#endif // LANGUAGE_EL_H diff --git a/Marlin/language_en.h b/Marlin/language_en.h deleted file mode 100644 index 6cf7d52..0000000 --- a/Marlin/language_en.h +++ /dev/null @@ -1,688 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * English - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_EN_H -#define LANGUAGE_EN_H - -//#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays -#if DISABLED(SIMULATE_ROMFONT) && DISABLED(DISPLAY_CHARSET_ISO10646_1) && DISABLED(DISPLAY_CHARSET_ISO10646_5) && DISABLED(DISPLAY_CHARSET_ISO10646_KANA) && DISABLED(DISPLAY_CHARSET_ISO10646_GREEK) && DISABLED(DISPLAY_CHARSET_ISO10646_CN) - #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. -#endif - -#ifndef WELCOME_MSG - #define WELCOME_MSG MACHINE_NAME " ready." -#endif -#ifndef MSG_SD_INSERTED - #define MSG_SD_INSERTED "Card inserted" -#endif -#ifndef MSG_SD_REMOVED - #define MSG_SD_REMOVED "Card removed" -#endif -#ifndef MSG_LCD_ENDSTOPS - #define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#endif -#ifndef MSG_MAIN - #define MSG_MAIN "Main" -#endif -#ifndef MSG_AUTOSTART - #define MSG_AUTOSTART "Autostart" -#endif -#ifndef MSG_DISABLE_STEPPERS - #define MSG_DISABLE_STEPPERS "Disable steppers" -#endif -#ifndef MSG_AUTO_HOME - #define MSG_AUTO_HOME "Auto home" -#endif -#ifndef MSG_AUTO_HOME_X - #define MSG_AUTO_HOME_X "Home X" -#endif -#ifndef MSG_AUTO_HOME_Y - #define MSG_AUTO_HOME_Y "Home Y" -#endif -#ifndef MSG_AUTO_HOME_Z - #define MSG_AUTO_HOME_Z "Home Z" -#endif -#ifndef MSG_LEVEL_BED_HOMING - #define MSG_LEVEL_BED_HOMING "Homing XYZ" -#endif -#ifndef MSG_LEVEL_BED_WAITING - #define MSG_LEVEL_BED_WAITING "Click to Begin" -#endif -#ifndef MSG_LEVEL_BED_NEXT_POINT - #define MSG_LEVEL_BED_NEXT_POINT "Next Point" -#endif -#ifndef MSG_LEVEL_BED_DONE - #define MSG_LEVEL_BED_DONE "Leveling Done!" -#endif -#ifndef MSG_LEVEL_BED_CANCEL - #define MSG_LEVEL_BED_CANCEL "Cancel" -#endif -#ifndef MSG_SET_HOME_OFFSETS - #define MSG_SET_HOME_OFFSETS "Set home offsets" -#endif -#ifndef MSG_HOME_OFFSETS_APPLIED - #define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#endif -#ifndef MSG_SET_ORIGIN - #define MSG_SET_ORIGIN "Set origin" -#endif -#ifndef MSG_PREHEAT_1 - #define MSG_PREHEAT_1 "Preheat PLA" -#endif -#ifndef MSG_PREHEAT_1_N - #define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#endif -#ifndef MSG_PREHEAT_1_ALL - #define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " All" -#endif -#ifndef MSG_PREHEAT_1_BEDONLY - #define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " Bed" -#endif -#ifndef MSG_PREHEAT_1_SETTINGS - #define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " conf" -#endif -#ifndef MSG_PREHEAT_2 - #define MSG_PREHEAT_2 "Preheat ABS" -#endif -#ifndef MSG_PREHEAT_2_N - #define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#endif -#ifndef MSG_PREHEAT_2_ALL - #define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " All" -#endif -#ifndef MSG_PREHEAT_2_BEDONLY - #define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " Bed" -#endif -#ifndef MSG_PREHEAT_2_SETTINGS - #define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " conf" -#endif -#ifndef MSG_H1 - #define MSG_H1 "1" -#endif -#ifndef MSG_H2 - #define MSG_H2 "2" -#endif -#ifndef MSG_H3 - #define MSG_H3 "3" -#endif -#ifndef MSG_H4 - #define MSG_H4 "4" -#endif -#ifndef MSG_COOLDOWN - #define MSG_COOLDOWN "Cooldown" -#endif -#ifndef MSG_SWITCH_PS_ON - #define MSG_SWITCH_PS_ON "Switch power on" -#endif -#ifndef MSG_SWITCH_PS_OFF - #define MSG_SWITCH_PS_OFF "Switch power off" -#endif -#ifndef MSG_EXTRUDE - #define MSG_EXTRUDE "Extrude" -#endif -#ifndef MSG_RETRACT - #define MSG_RETRACT "Retract" -#endif -#ifndef MSG_MOVE_AXIS - #define MSG_MOVE_AXIS "Move axis" -#endif -#ifndef MSG_LEVEL_BED - #define MSG_LEVEL_BED "Level bed" -#endif -#ifndef MSG_MOVE_X - #define MSG_MOVE_X "Move X" -#endif -#ifndef MSG_MOVE_Y - #define MSG_MOVE_Y "Move Y" -#endif -#ifndef MSG_MOVE_Z - #define MSG_MOVE_Z "Move Z" -#endif -#ifndef MSG_MOVE_E - #define MSG_MOVE_E "Extruder" -#endif -#ifndef MSG_MOVE_E1 - #define MSG_MOVE_E1 "1" -#endif -#ifndef MSG_MOVE_E2 - #define MSG_MOVE_E2 "2" -#endif -#ifndef MSG_MOVE_E3 - #define MSG_MOVE_E3 "3" -#endif -#ifndef MSG_MOVE_E4 - #define MSG_MOVE_E4 "4" -#endif -#ifndef MSG_MOVE_01MM - #define MSG_MOVE_01MM "Move 0.1mm" -#endif -#ifndef MSG_MOVE_1MM - #define MSG_MOVE_1MM "Move 1mm" -#endif -#ifndef MSG_MOVE_10MM - #define MSG_MOVE_10MM "Move 10mm" -#endif -#ifndef MSG_SPEED - #define MSG_SPEED "Speed" -#endif -#ifndef MSG_BED_Z - #define MSG_BED_Z "Bed Z" -#endif -#ifndef MSG_NOZZLE - #define MSG_NOZZLE "Nozzle" -#endif -#ifndef MSG_N1 - #define MSG_N1 " 1" -#endif -#ifndef MSG_N2 - #define MSG_N2 " 2" -#endif -#ifndef MSG_N3 - #define MSG_N3 " 3" -#endif -#ifndef MSG_N4 - #define MSG_N4 " 4" -#endif -#ifndef MSG_BED - #define MSG_BED "Bed" -#endif -#ifndef MSG_FAN_SPEED - #define MSG_FAN_SPEED "Fan speed" -#endif -#ifndef MSG_FLOW - #define MSG_FLOW "Flow" -#endif -#ifndef MSG_CONTROL - #define MSG_CONTROL "Control" -#endif -#ifndef MSG_MIN - #define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#endif -#ifndef MSG_MAX - #define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#endif -#ifndef MSG_FACTOR - #define MSG_FACTOR " " LCD_STR_THERMOMETER " Fact" -#endif -#ifndef MSG_AUTOTEMP - #define MSG_AUTOTEMP "Autotemp" -#endif -#ifndef MSG_ON - #define MSG_ON "On " -#endif -#ifndef MSG_OFF - #define MSG_OFF "Off" -#endif -#ifndef MSG_PID_P - #define MSG_PID_P "PID-P" -#endif -#ifndef MSG_PID_I - #define MSG_PID_I "PID-I" -#endif -#ifndef MSG_PID_D - #define MSG_PID_D "PID-D" -#endif -#ifndef MSG_PID_C - #define MSG_PID_C "PID-C" -#endif -#ifndef MSG_SELECT - #define MSG_SELECT "Select" -#endif -#ifndef MSG_E1 - #define MSG_E1 " E1" -#endif -#ifndef MSG_E2 - #define MSG_E2 " E2" -#endif -#ifndef MSG_E3 - #define MSG_E3 " E3" -#endif -#ifndef MSG_E4 - #define MSG_E4 " E4" -#endif -#ifndef MSG_ACC - #define MSG_ACC "Accel" -#endif -#ifndef MSG_VXY_JERK - #define MSG_VXY_JERK "Vxy-jerk" -#endif -#ifndef MSG_VZ_JERK - #define MSG_VZ_JERK "Vz-jerk" -#endif -#ifndef MSG_VE_JERK - #define MSG_VE_JERK "Ve-jerk" -#endif -#ifndef MSG_VMAX - #define MSG_VMAX "Vmax " -#endif -#ifndef MSG_X - #define MSG_X "X" -#endif -#ifndef MSG_Y - #define MSG_Y "Y" -#endif -#ifndef MSG_Z - #define MSG_Z "Z" -#endif -#ifndef MSG_E - #define MSG_E "E" -#endif -#ifndef MSG_VMIN - #define MSG_VMIN "Vmin" -#endif -#ifndef MSG_VTRAV_MIN - #define MSG_VTRAV_MIN "VTrav min" -#endif -#ifndef MSG_AMAX - #define MSG_AMAX "Amax " -#endif -#ifndef MSG_A_RETRACT - #define MSG_A_RETRACT "A-retract" -#endif -#ifndef MSG_A_TRAVEL - #define MSG_A_TRAVEL "A-travel" -#endif -#ifndef MSG_XSTEPS - #define MSG_XSTEPS "Xsteps/mm" -#endif -#ifndef MSG_YSTEPS - #define MSG_YSTEPS "Ysteps/mm" -#endif -#ifndef MSG_ZSTEPS - #define MSG_ZSTEPS "Zsteps/mm" -#endif -#ifndef MSG_ESTEPS - #define MSG_ESTEPS "Esteps/mm" -#endif -#ifndef MSG_TEMPERATURE - #define MSG_TEMPERATURE "Temperature" -#endif -#ifndef MSG_MOTION - #define MSG_MOTION "Motion" -#endif -#ifndef MSG_VOLUMETRIC - #define MSG_VOLUMETRIC "Filament" -#endif -#ifndef MSG_VOLUMETRIC_ENABLED - #define MSG_VOLUMETRIC_ENABLED "E in mm3" -#endif -#ifndef MSG_FILAMENT_DIAM - #define MSG_FILAMENT_DIAM "Fil. Dia." -#endif -#ifndef MSG_DIAM_E1 - #define MSG_DIAM_E1 " 1" -#endif -#ifndef MSG_DIAM_E2 - #define MSG_DIAM_E2 " 2" -#endif -#ifndef MSG_DIAM_E3 - #define MSG_DIAM_E3 " 3" -#endif -#ifndef MSG_DIAM_E4 - #define MSG_DIAM_E4 " 4" -#endif -#ifndef MSG_CONTRAST - #define MSG_CONTRAST "LCD contrast" -#endif -#ifndef MSG_STORE_EPROM - #define MSG_STORE_EPROM "Store memory" -#endif -#ifndef MSG_LOAD_EPROM - #define MSG_LOAD_EPROM "Load memory" -#endif -#ifndef MSG_RESTORE_FAILSAFE - #define MSG_RESTORE_FAILSAFE "Restore failsafe" -#endif -#ifndef MSG_REFRESH - #define MSG_REFRESH "Refresh" -#endif -#ifndef MSG_WATCH - #define MSG_WATCH "Info screen" -#endif -#ifndef MSG_PREPARE - #define MSG_PREPARE "Prepare" -#endif -#ifndef MSG_TUNE - #define MSG_TUNE "Tune" -#endif -#ifndef MSG_PAUSE_PRINT - #define MSG_PAUSE_PRINT "Pause print" -#endif -#ifndef MSG_RESUME_PRINT - #define MSG_RESUME_PRINT "Resume print" -#endif -#ifndef MSG_STOP_PRINT - #define MSG_STOP_PRINT "Stop print" -#endif -#ifndef MSG_CARD_MENU - #define MSG_CARD_MENU "Print from SD" -#endif -#ifndef MSG_NO_CARD - #define MSG_NO_CARD "No SD card" -#endif -#ifndef MSG_DWELL - #define MSG_DWELL "Sleep..." -#endif -#ifndef MSG_USERWAIT - #define MSG_USERWAIT "Wait for user..." -#endif -#ifndef MSG_RESUMING - #define MSG_RESUMING "Resuming print" -#endif -#ifndef MSG_PRINT_ABORTED - #define MSG_PRINT_ABORTED "Print aborted" -#endif -#ifndef MSG_NO_MOVE - #define MSG_NO_MOVE "No move." -#endif -#ifndef MSG_KILLED - #define MSG_KILLED "KILLED. " -#endif -#ifndef MSG_STOPPED - #define MSG_STOPPED "STOPPED. " -#endif -#ifndef MSG_CONTROL_RETRACT - #define MSG_CONTROL_RETRACT "Retract mm" -#endif -#ifndef MSG_CONTROL_RETRACT_SWAP - #define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" -#endif -#ifndef MSG_CONTROL_RETRACTF - #define MSG_CONTROL_RETRACTF "Retract V" -#endif -#ifndef MSG_CONTROL_RETRACT_ZLIFT - #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#endif -#ifndef MSG_CONTROL_RETRACT_RECOVER - #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#endif -#ifndef MSG_CONTROL_RETRACT_RECOVER_SWAP - #define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#endif -#ifndef MSG_CONTROL_RETRACT_RECOVERF - #define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#endif -#ifndef MSG_AUTORETRACT - #define MSG_AUTORETRACT "AutoRetr." -#endif -#ifndef MSG_FILAMENTCHANGE - #define MSG_FILAMENTCHANGE "Change filament" -#endif -#ifndef MSG_INIT_SDCARD - #define MSG_INIT_SDCARD "Init. SD card" -#endif -#ifndef MSG_CNG_SDCARD - #define MSG_CNG_SDCARD "Change SD card" -#endif -#ifndef MSG_ZPROBE_OUT - #define MSG_ZPROBE_OUT "Z probe out. bed" -#endif -#ifndef MSG_HOME - #define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#endif -#ifndef MSG_FIRST - #define MSG_FIRST "first" -#endif -#ifndef MSG_ZPROBE_ZOFFSET - #define MSG_ZPROBE_ZOFFSET "Z Offset" -#endif -#ifndef MSG_BABYSTEP_X - #define MSG_BABYSTEP_X "Babystep X" -#endif -#ifndef MSG_BABYSTEP_Y - #define MSG_BABYSTEP_Y "Babystep Y" -#endif -#ifndef MSG_BABYSTEP_Z - #define MSG_BABYSTEP_Z "Babystep Z" -#endif -#ifndef MSG_ENDSTOP_ABORT - #define MSG_ENDSTOP_ABORT "Endstop abort" -#endif -#ifndef MSG_HEATING_FAILED_LCD - #define MSG_HEATING_FAILED_LCD "Heating failed" -#endif -#ifndef MSG_ERR_REDUNDANT_TEMP - #define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#endif -#ifndef MSG_THERMAL_RUNAWAY - #define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#endif -#ifndef MSG_ERR_MAXTEMP - #define MSG_ERR_MAXTEMP "Err: MAXTEMP" -#endif -#ifndef MSG_ERR_MINTEMP - #define MSG_ERR_MINTEMP "Err: MINTEMP" -#endif -#ifndef MSG_ERR_MAXTEMP_BED - #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" -#endif -#ifndef MSG_ERR_MINTEMP_BED - #define MSG_ERR_MINTEMP_BED "Err: MINTEMP BED" -#endif -#ifndef MSG_HALTED - #define MSG_HALTED "PRINTER HALTED" -#endif -#ifndef MSG_PLEASE_RESET - #define MSG_PLEASE_RESET "Please reset" -#endif -#ifndef MSG_SHORT_DAY - #define MSG_SHORT_DAY "d" // One character only -#endif -#ifndef MSG_SHORT_HOUR - #define MSG_SHORT_HOUR "h" // One character only -#endif -#ifndef MSG_SHORT_MINUTE - #define MSG_SHORT_MINUTE "m" // One character only -#endif -#ifndef MSG_HEATING - #define MSG_HEATING "Heating..." -#endif -#ifndef MSG_HEATING_COMPLETE - #define MSG_HEATING_COMPLETE "Heating done." -#endif -#ifndef MSG_BED_HEATING - #define MSG_BED_HEATING "Bed Heating." -#endif -#ifndef MSG_BED_DONE - #define MSG_BED_DONE "Bed done." -#endif -#ifndef MSG_DELTA_CALIBRATE - #define MSG_DELTA_CALIBRATE "Delta Calibration" -#endif -#ifndef MSG_DELTA_CALIBRATE_X - #define MSG_DELTA_CALIBRATE_X "Calibrate X" -#endif -#ifndef MSG_DELTA_CALIBRATE_Y - #define MSG_DELTA_CALIBRATE_Y "Calibrate Y" -#endif -#ifndef MSG_DELTA_CALIBRATE_Z - #define MSG_DELTA_CALIBRATE_Z "Calibrate Z" -#endif -#ifndef MSG_DELTA_CALIBRATE_CENTER - #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" -#endif - -#ifndef MSG_INFO_MENU - #define MSG_INFO_MENU "About Printer" -#endif -#ifndef MSG_INFO_PRINTER_MENU - #define MSG_INFO_PRINTER_MENU "Printer Info" -#endif -#ifndef MSG_INFO_STATS_MENU - #define MSG_INFO_STATS_MENU "Printer Stats" -#endif -#ifndef MSG_INFO_BOARD_MENU - #define MSG_INFO_BOARD_MENU "Board Info" -#endif -#ifndef MSG_INFO_THERMISTOR_MENU - #define MSG_INFO_THERMISTOR_MENU "Thermistors" -#endif -#ifndef MSG_INFO_EXTRUDERS - #define MSG_INFO_EXTRUDERS "Extruders" -#endif -#ifndef MSG_INFO_BAUDRATE - #define MSG_INFO_BAUDRATE "Baud" -#endif -#ifndef MSG_INFO_PROTOCOL - #define MSG_INFO_PROTOCOL "Protocol" -#endif - -#if LCD_WIDTH > 19 - #ifndef MSG_INFO_PRINT_COUNT - #define MSG_INFO_PRINT_COUNT "Print Count" - #endif - #ifndef MSG_INFO_COMPLETED_PRINTS - #define MSG_INFO_COMPLETED_PRINTS "Completed" - #endif - #ifndef MSG_INFO_PRINT_TIME - #define MSG_INFO_PRINT_TIME "Total print time" - #endif - #ifndef MSG_INFO_PRINT_LONGEST - #define MSG_INFO_PRINT_LONGEST "Longest job time" - #endif - #ifndef MSG_INFO_PRINT_FILAMENT - #define MSG_INFO_PRINT_FILAMENT "Extruded total" - #endif -#else - #ifndef MSG_INFO_PRINT_COUNT - #define MSG_INFO_PRINT_COUNT "Prints" - #endif - #ifndef MSG_INFO_COMPLETED_PRINTS - #define MSG_INFO_COMPLETED_PRINTS "Completed" - #endif - #ifndef MSG_INFO_PRINT_TIME - #define MSG_INFO_PRINT_TIME "Total" - #endif - #ifndef MSG_INFO_PRINT_LONGEST - #define MSG_INFO_PRINT_LONGEST "Longest" - #endif - #ifndef MSG_INFO_PRINT_FILAMENT - #define MSG_INFO_PRINT_FILAMENT "Extruded" - #endif -#endif - -#ifndef MSG_INFO_MIN_TEMP - #define MSG_INFO_MIN_TEMP "Min Temp" -#endif -#ifndef MSG_INFO_MAX_TEMP - #define MSG_INFO_MAX_TEMP "Max Temp" -#endif -#ifndef MSG_INFO_PSU - #define MSG_INFO_PSU "Power Supply" -#endif - -#ifndef MSG_FILAMENT_CHANGE_HEADER - #define MSG_FILAMENT_CHANGE_HEADER "CHANGE FILAMENT" -#endif -#ifndef MSG_FILAMENT_CHANGE_OPTION_HEADER - #define MSG_FILAMENT_CHANGE_OPTION_HEADER "CHANGE OPTIONS:" -#endif -#ifndef MSG_FILAMENT_CHANGE_OPTION_EXTRUDE - #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extrude more" -#endif -#ifndef MSG_FILAMENT_CHANGE_OPTION_RESUME - #define MSG_FILAMENT_CHANGE_OPTION_RESUME "Resume print" -#endif -#if LCD_HEIGHT >= 4 - #ifndef MSG_FILAMENT_CHANGE_INIT_1 - #define MSG_FILAMENT_CHANGE_INIT_1 "Wait for start" - #endif - #ifndef MSG_FILAMENT_CHANGE_INIT_2 - #define MSG_FILAMENT_CHANGE_INIT_2 "of the filament" - #endif - #ifndef MSG_FILAMENT_CHANGE_INIT_3 - #define MSG_FILAMENT_CHANGE_INIT_3 "change" - #endif - #ifndef MSG_FILAMENT_CHANGE_UNLOAD_1 - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Wait for" - #endif - #ifndef MSG_FILAMENT_CHANGE_UNLOAD_2 - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "filament unload" - #endif - #ifndef MSG_FILAMENT_CHANGE_UNLOAD_3 - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "" - #endif - #ifndef MSG_FILAMENT_CHANGE_INSERT_1 - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert filament" - #endif - #ifndef MSG_FILAMENT_CHANGE_INSERT_2 - #define MSG_FILAMENT_CHANGE_INSERT_2 "and press button" - #endif - #ifndef MSG_FILAMENT_CHANGE_INSERT_3 - #define MSG_FILAMENT_CHANGE_INSERT_3 "to continue..." - #endif - #ifndef MSG_FILAMENT_CHANGE_LOAD_1 - #define MSG_FILAMENT_CHANGE_LOAD_1 "Wait for" - #endif - #ifndef MSG_FILAMENT_CHANGE_LOAD_2 - #define MSG_FILAMENT_CHANGE_LOAD_2 "filament load" - #endif - #ifndef MSG_FILAMENT_CHANGE_LOAD_3 - #define MSG_FILAMENT_CHANGE_LOAD_3 "" - #endif - #ifndef MSG_FILAMENT_CHANGE_EXTRUDE_1 - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Wait for" - #endif - #ifndef MSG_FILAMENT_CHANGE_EXTRUDE_2 - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "filament extrude" - #endif - #ifndef MSG_FILAMENT_CHANGE_EXTRUDE_3 - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" - #endif - #ifndef MSG_FILAMENT_CHANGE_RESUME_1 - #define MSG_FILAMENT_CHANGE_RESUME_1 "Wait for print" - #endif - #ifndef MSG_FILAMENT_CHANGE_RESUME_2 - #define MSG_FILAMENT_CHANGE_RESUME_2 "to resume" - #endif - #ifndef MSG_FILAMENT_CHANGE_RESUME_3 - #define MSG_FILAMENT_CHANGE_RESUME_3 "" - #endif -#else // LCD_HEIGHT < 4 - #ifndef MSG_FILAMENT_CHANGE_INIT_1 - #define MSG_FILAMENT_CHANGE_INIT_1 "Please wait..." - #endif - #ifndef MSG_FILAMENT_CHANGE_UNLOAD_1 - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Ejecting..." - #endif - #ifndef MSG_FILAMENT_CHANGE_INSERT_1 - #define MSG_FILAMENT_CHANGE_INSERT_1 "Insert and Click" - #endif - #ifndef MSG_FILAMENT_CHANGE_LOAD_1 - #define MSG_FILAMENT_CHANGE_LOAD_1 "Loading..." - #endif - #ifndef MSG_FILAMENT_CHANGE_EXTRUDE_1 - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruding..." - #endif - #ifndef MSG_FILAMENT_CHANGE_RESUME_1 - #define MSG_FILAMENT_CHANGE_RESUME_1 "Resuming..." - #endif -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_EN_H diff --git a/Marlin/language_es.h b/Marlin/language_es.h deleted file mode 100644 index 2943fcf..0000000 --- a/Marlin/language_es.h +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Spanish - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_ES_H -#define LANGUAGE_ES_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " lista." -#define MSG_SD_INSERTED "Tarjeta colocada" -#define MSG_SD_REMOVED "Tarjeta retirada" -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Inicio automatico" -#define MSG_DISABLE_STEPPERS "Apagar motores" -#define MSG_AUTO_HOME "Llevar al origen" -#define MSG_AUTO_HOME_X "Origen X" -#define MSG_AUTO_HOME_Y "Origen Y" -#define MSG_AUTO_HOME_Z "Origen Z" -#define MSG_LEVEL_BED_HOMING "Origen XYZ" -#define MSG_LEVEL_BED_WAITING "Presione para iniciar" -#define MSG_LEVEL_BED_DONE "Nivelacion lista!" -#define MSG_LEVEL_BED_CANCEL "Cancelar" -#define MSG_SET_HOME_OFFSETS "Ajustar desfases" -#define MSG_HOME_OFFSETS_APPLIED "Desfase aplicado" -#define MSG_SET_ORIGIN "Establecer origen" -#define MSG_PREHEAT_1 "Precalentar PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 "Todo" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1"Plataforma" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 "Config" -#define MSG_PREHEAT_2 "Precalentar ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 "Todo" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 "Plataforma" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 "Config" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Enfriar" -#define MSG_SWITCH_PS_ON "Encender" -#define MSG_SWITCH_PS_OFF "Apagar" -#define MSG_EXTRUDE "Extruir" -#define MSG_RETRACT "Retraer" -#define MSG_MOVE_AXIS "Mover ejes" -#define MSG_LEVEL_BED "Nivelar plataforma" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Extrusor" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidad" -#define MSG_BED_Z "Plataforma Z" -#define MSG_NOZZLE "Boquilla" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Plataforma" -#define MSG_FAN_SPEED "Ventilador" -#define MSG_FLOW "Flujo" -#define MSG_CONTROL "Control" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temperatura Automatica" -#define MSG_ON "Encender" -#define MSG_OFF "Apagar" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Aceleracion" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax" -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "Vel. viaje min" -#define MSG_AMAX "Acel. max" -#define MSG_A_RETRACT "Acel. retrac." -#define MSG_A_TRAVEL "Acel. Viaje" -#define MSG_XSTEPS "X pasos/mm" -#define MSG_YSTEPS "Y pasos/mm" -#define MSG_ZSTEPS "Z pasos/mm" -#define MSG_ESTEPS "E pasos/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimiento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EPROM "Guardar memoria" -#define MSG_LOAD_EPROM "Cargar memoria" -#define MSG_RESTORE_FAILSAFE "Restaurar memoria." -#define MSG_REFRESH "Volver a cargar" -#define MSG_WATCH "Informacion" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Ajustar" -#define MSG_PAUSE_PRINT "Pausar impresion" -#define MSG_RESUME_PRINT "Reanudar impresion" -#define MSG_STOP_PRINT "Detener impresion" -#define MSG_CARD_MENU "Menu de SD" -#define MSG_NO_CARD "No hay tarjeta SD" -#define MSG_DWELL "Reposo..." -#define MSG_USERWAIT "Esperando ordenes" -#define MSG_RESUMING "Resumiendo impre." -#define MSG_PRINT_ABORTED "Impresion cancelada" -#define MSG_NO_MOVE "Sin movimiento" -#define MSG_KILLED "Parada de emergencia." -#define MSG_STOPPED "Detenida" -#define MSG_CONTROL_RETRACT "Retraer mm" -#define MSG_CONTROL_RETRACT_SWAP "Interc. Retraer mm" -#define MSG_CONTROL_RETRACTF "Retraer V" -#define MSG_CONTROL_RETRACT_ZLIFT "Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER "DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Interc. DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "DesRet V" -#define MSG_AUTORETRACT "Retraccion Auto." -#define MSG_FILAMENTCHANGE "Cambiar filamento" -#define MSG_INIT_SDCARD "Iniciando tarjeta" -#define MSG_CNG_SDCARD "Cambiar tarjeta" -#define MSG_ZPROBE_OUT "Sonda Z fuera" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Desfase Z" -#define MSG_BABYSTEP_X "Micropaso X" -#define MSG_BABYSTEP_Y "Micropaso Y" -#define MSG_BABYSTEP_Z "Micropaso Z" -#define MSG_ENDSTOP_ABORT "Cancelado - Endstop" -#define MSG_HEATING_FAILED_LCD "Error: al calentar" -#define MSG_ERR_REDUNDANT_TEMP "Error: temperatura redundante" -#define MSG_THERMAL_RUNAWAY "Error de temperatura" -#define MSG_ERR_MAXTEMP "Error: Temp Maxima" -#define MSG_ERR_MINTEMP "Error: Temp Minima" -#define MSG_ERR_MAXTEMP_BED "Error: Temp Max Plataforma" -#define MSG_ERR_MINTEMP_BED "Error: Temp Min Plataforma" -#define MSG_HEATING "Calentando..." -#define MSG_HEATING_COMPLETE "Calentamiento Completo" -#define MSG_BED_HEATING "Calentando plataforma ..." -#define MSG_BED_DONE "Plataforma Caliente" -#define MSG_DELTA_CALIBRATE "Calibracion Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" - -#endif // LANGUAGE_ES_H diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h deleted file mode 100644 index 909d6c8..0000000 --- a/Marlin/language_eu.h +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Basque-Euskera - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_EU_H -#define LANGUAGE_EU_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " prest." -#define MSG_SD_INSERTED "Txartela sartuta" -#define MSG_SD_REMOVED "Txartela kenduta" -#define MSG_MAIN "Menu nagusia" -#define MSG_AUTOSTART "Auto hasiera" -#define MSG_DISABLE_STEPPERS "Itzali motoreak" -#define MSG_AUTO_HOME "Hasierara joan" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Set home offsets" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Hasiera ipini" -#define MSG_PREHEAT_1 "Aurreberotu PLA" -#define MSG_PREHEAT_1_N "Aurreberotu PLA " -#define MSG_PREHEAT_1_ALL "Berotu PLA Guztia" -#define MSG_PREHEAT_1_BEDONLY "Berotu PLA Ohea" -#define MSG_PREHEAT_1_SETTINGS "Berotu PLA Konfig" -#define MSG_PREHEAT_2 "Aurreberotu ABS" -#define MSG_PREHEAT_2_N "Aurreberotu ABS " -#define MSG_PREHEAT_2_ALL "Berotu ABS Guztia" -#define MSG_PREHEAT_2_BEDONLY "Berotu ABS Ohea" -#define MSG_PREHEAT_2_SETTINGS "Berotu ABS Konfig" -#define MSG_COOLDOWN "Hoztu" -#define MSG_SWITCH_PS_ON "Energia piztu" -#define MSG_SWITCH_PS_OFF "Energia itzali" -#define MSG_EXTRUDE "Estruitu" -#define MSG_RETRACT "Atzera eragin" -#define MSG_MOVE_AXIS "Ardatzak mugitu" -#define MSG_MOVE_X "Mugitu X" -#define MSG_MOVE_Y "Mugitu Y" -#define MSG_MOVE_Z "Mugitu Z" -#define MSG_MOVE_E "Estrusorea" -#define MSG_MOVE_01MM "Mugitu 0.1mm" -#define MSG_MOVE_1MM "Mugitu 1mm" -#define MSG_MOVE_10MM "Mugitu 10mm" -#define MSG_SPEED "Abiadura" -#define MSG_NOZZLE "Pita" -#define MSG_BED "Ohea" -#define MSG_FAN_SPEED "Haizagailua" -#define MSG_FLOW "Fluxua" -#define MSG_CONTROL "Kontrola" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Faktorea" -#define MSG_AUTOTEMP "Auto tenperatura" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Azelerazioa" -#define MSG_VXY_JERK "Vxy-astindua" -#define MSG_VZ_JERK "Vz-astindua" -#define MSG_VE_JERK "Ve-astindua" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retrakt" -#define MSG_XSTEPS "X pausoak/mm" -#define MSG_YSTEPS "Y pausoak/mm" -#define MSG_ZSTEPS "Z pausoak/mm" -#define MSG_ESTEPS "E pausoak/mm" -#define MSG_TEMPERATURE "Tenperatura" -#define MSG_MOTION "Mugimendua" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "LCD kontrastea" -#define MSG_STORE_EPROM "Gorde memoria" -#define MSG_LOAD_EPROM "Kargatu memoria" -#define MSG_RESTORE_FAILSAFE "Larri. berriz." -#define MSG_REFRESH "Berriz kargatu" -#define MSG_WATCH "Pantaila info" -#define MSG_PREPARE "Prestatu" -#define MSG_TUNE "Doitu" -#define MSG_PAUSE_PRINT "Pausatu inprimak." -#define MSG_RESUME_PRINT "Jarraitu inprima." -#define MSG_STOP_PRINT "Gelditu inprima." -#define MSG_CARD_MENU "SD-tik inprimatu" -#define MSG_NO_CARD "Ez dago txartelik" -#define MSG_DWELL "Lo egin..." -#define MSG_USERWAIT "Aginduak zain..." -#define MSG_RESUMING "Jarraitzen inpri." -#define MSG_PRINT_ABORTED "Print aborted" -#define MSG_NO_MOVE "Mugimendu gabe" -#define MSG_KILLED "LARRIALDI GELDIA" -#define MSG_STOPPED "GELDITUTA. " -#define MSG_CONTROL_RETRACT "Atzera egin mm" -#define MSG_CONTROL_RETRACT_SWAP "Swap Atzera egin mm" -#define MSG_CONTROL_RETRACTF "Atzera egin V" -#define MSG_CONTROL_RETRACT_ZLIFT "Igo mm" -#define MSG_CONTROL_RETRACT_RECOVER "Atzera egin +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Swap Atzera egin +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Atzera egin V" -#define MSG_AUTORETRACT "Atzera egin" -#define MSG_FILAMENTCHANGE "Aldatu filament." -#define MSG_INIT_SDCARD "Hasieratu txartela" -#define MSG_CNG_SDCARD "Aldatu txartela" -#define MSG_ZPROBE_OUT "Z ohe hasiera" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z konpentsatu" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop deuseztat" -#define MSG_DELTA_CALIBRATE "Delta Calibration" -#define MSG_DELTA_CALIBRATE_X "Calibrate X" -#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" - -#endif // LANGUAGE_EU_H diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h deleted file mode 100644 index b73a207..0000000 --- a/Marlin/language_fi.h +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Finnish - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_FI_H -#define LANGUAGE_FI_H - -#define MAPPER_C2C3 -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " valmis." -#define MSG_SD_INSERTED "Kortti asetettu" -#define MSG_SD_REMOVED "Kortti poistettu" -#define MSG_MAIN "Palaa" -#define MSG_AUTOSTART "Automaatti" -#define MSG_DISABLE_STEPPERS "Vapauta moottorit" -#define MSG_AUTO_HOME "Aja referenssiin" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Set home offsets" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Aseta origo" -#define MSG_PREHEAT_1 "Esilämmitä PLA" -#define MSG_PREHEAT_1_N "Esilämmitä PLA " -#define MSG_PREHEAT_1_ALL "Esilä. PLA Kaikki" -#define MSG_PREHEAT_1_BEDONLY "Esilä. PLA Alusta" -#define MSG_PREHEAT_1_SETTINGS "Esilämm. PLA konf" -#define MSG_PREHEAT_2 "Esilämmitä ABS" -#define MSG_PREHEAT_2_N "Esilämmitä ABS " -#define MSG_PREHEAT_2_ALL "Esilä. ABS Kaikki" -#define MSG_PREHEAT_2_BEDONLY "Esilä. ABS Alusta" -#define MSG_PREHEAT_2_SETTINGS "Esilämm. ABS konf" -#define MSG_COOLDOWN "Jäähdytä" -#define MSG_SWITCH_PS_ON "Virta päälle" -#define MSG_SWITCH_PS_OFF "Virta pois" -#define MSG_EXTRUDE "Pursota" -#define MSG_RETRACT "Vedä takaisin" -#define MSG_MOVE_AXIS "Liikuta akseleita" -#define MSG_MOVE_X "Liikuta X" -#define MSG_MOVE_Y "Liikuta Y" -#define MSG_MOVE_Z "Liikuta Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_01MM "Liikuta 0.1mm" -#define MSG_MOVE_1MM "Liikuta 1mm" -#define MSG_MOVE_10MM "Liikuta 10mm" -#define MSG_SPEED "Nopeus" -#define MSG_NOZZLE "Suutin" -#define MSG_BED "Alusta" -#define MSG_FAN_SPEED "Tuul. nopeus" -#define MSG_FLOW "Virtaus" -#define MSG_CONTROL "Kontrolli" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Kerr" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Kiihtyv" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VLiike min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-peruuta" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "Lämpötila" -#define MSG_MOTION "Liike" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm³" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "LCD kontrasti" -#define MSG_STORE_EPROM "Tallenna muistiin" -#define MSG_LOAD_EPROM "Lataa muistista" -#define MSG_RESTORE_FAILSAFE "Palauta oletus" -#define MSG_REFRESH "Päivitä" -#define MSG_WATCH "Seuraa" -#define MSG_PREPARE "Valmistele" -#define MSG_TUNE "Säädä" -#define MSG_PAUSE_PRINT "Keskeytä tulostus" -#define MSG_RESUME_PRINT "Jatka tulostusta" -#define MSG_STOP_PRINT "Pysäytä tulostus" -#define MSG_CARD_MENU "Korttivalikko" -#define MSG_NO_CARD "Ei korttia" -#define MSG_DWELL "Nukkumassa..." -#define MSG_USERWAIT "Odotet. valintaa" -#define MSG_RESUMING "Jatke. tulostusta" -#define MSG_PRINT_ABORTED "Print aborted" -#define MSG_NO_MOVE "Ei liiketta." -#define MSG_KILLED "KILLED. " -#define MSG_STOPPED "STOPPED. " -#define MSG_CONTROL_RETRACT "Vedä mm" -#define MSG_CONTROL_RETRACT_SWAP "Va. Vedä mm" -#define MSG_CONTROL_RETRACTF "Vedä V" -#define MSG_CONTROL_RETRACT_ZLIFT "Z mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Va. UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoVeto." -#define MSG_FILAMENTCHANGE "Change filament" -#define MSG_INIT_SDCARD "Init. SD-Card" -#define MSG_CNG_SDCARD "Change SD-Card" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_DELTA_CALIBRATE "Delta Kalibrointi" -#define MSG_DELTA_CALIBRATE_X "Kalibroi X" -#define MSG_DELTA_CALIBRATE_Y "Kalibroi Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibroi Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibroi Center" - -#endif // LANGUAGE_FI_H diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h deleted file mode 100644 index 52adbcb..0000000 --- a/Marlin/language_fr.h +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * French - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_FR_H -#define LANGUAGE_FR_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " prete." -#define MSG_SD_INSERTED "Carte inseree" -#define MSG_SD_REMOVED "Carte retiree" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Demarrage auto" -#define MSG_DISABLE_STEPPERS "Arreter moteurs" -#define MSG_AUTO_HOME "Origine auto." -#define MSG_LEVEL_BED_HOMING "Origine XYZ" -#define MSG_LEVEL_BED_WAITING "Cliquer pour commencer" -#define MSG_LEVEL_BED_DONE "Mise a niveau OK!" -#define MSG_LEVEL_BED_CANCEL "Annuler" -#define MSG_SET_HOME_OFFSETS "Regler decal. origine" -#define MSG_HOME_OFFSETS_APPLIED "Decalages appliques" -#define MSG_SET_ORIGIN "Regler origine" -#define MSG_PREHEAT_1 "Prechauffage PLA" -#define MSG_PREHEAT_1_N "Prechauff. PLA " -#define MSG_PREHEAT_1_ALL "Prech. PLA Tout" -#define MSG_PREHEAT_1_BEDONLY "Prech. PLA Plateau" -#define MSG_PREHEAT_1_SETTINGS "Regl. prech. PLA" -#define MSG_PREHEAT_2 "Prechauffage ABS" -#define MSG_PREHEAT_2_N "Prechauff. ABS " -#define MSG_PREHEAT_2_ALL "Prech. ABS Tout" -#define MSG_PREHEAT_2_BEDONLY "Prech. ABS Plateau" -#define MSG_PREHEAT_2_SETTINGS "Regl. prech. ABS" -#define MSG_COOLDOWN "Refroidir" -#define MSG_SWITCH_PS_ON "Allumer alim." -#define MSG_SWITCH_PS_OFF "Eteindre alim." -#define MSG_EXTRUDE "Extrusion" -#define MSG_RETRACT "Retraction" -#define MSG_MOVE_AXIS "Deplacer un axe" -#define MSG_LEVEL_BED "Regl. Niv. Plateau" -#define MSG_MOVE_X "Depl. X" -#define MSG_MOVE_Y "Depl. Y" -#define MSG_MOVE_Z "Depl. Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_01MM "Depl. 0.1mm" -#define MSG_MOVE_1MM "Depl. 1mm" -#define MSG_MOVE_10MM "Depl. 10mm" -#define MSG_SPEED " Vitesse" -#define MSG_BED_Z "Plateau Z" -#define MSG_NOZZLE "Buse" -#define MSG_BED "Plateau" -#define MSG_FAN_SPEED "Vite. ventilateur" -#define MSG_FLOW "Flux" -#define MSG_CONTROL "Controler" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Facteur" -#define MSG_AUTOTEMP "Temp. Auto." -#define MSG_ON "Marche " -#define MSG_OFF "Arret" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax" -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "Vdepl min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-Depl." -#define MSG_XSTEPS "Xpas/mm" -#define MSG_YSTEPS "Ypas/mm" -#define MSG_ZSTEPS "Zpas/mm" -#define MSG_ESTEPS "Epas/mm" -#define MSG_TEMPERATURE "Temperature" -#define MSG_MOTION "Mouvement" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E en mm3" -#define MSG_FILAMENT_DIAM "Diam. Fil." -#define MSG_CONTRAST "Contraste LCD" -#define MSG_STORE_EPROM "Sauver config" -#define MSG_LOAD_EPROM "Lire config" -#define MSG_RESTORE_FAILSAFE "Restaurer defauts" -#define MSG_REFRESH "Actualiser" -#define MSG_WATCH "Surveiller" -#define MSG_PREPARE "Preparer" -#define MSG_TUNE "Regler" -#define MSG_PAUSE_PRINT "Interrompre impr." -#define MSG_RESUME_PRINT "Reprendre impr." -#define MSG_STOP_PRINT "Arreter impr." -#define MSG_CARD_MENU "Impr. depuis SD" -#define MSG_NO_CARD "Pas de carte" -#define MSG_DWELL "Repos..." -#define MSG_USERWAIT "Atten. de l'util." -#define MSG_RESUMING "Repri. de l'impr." -#define MSG_PRINT_ABORTED "Impr. Annulee" -#define MSG_NO_MOVE "Aucun mouvement." -#define MSG_KILLED "MORT." -#define MSG_STOPPED "STOPPE." -#define MSG_CONTROL_RETRACT "Retraction mm" -#define MSG_CONTROL_RETRACT_SWAP "Ech. Retr. mm" -#define MSG_CONTROL_RETRACTF "Retraction V" -#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Ech. UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "Retract. Auto." -#define MSG_FILAMENTCHANGE "Changer filament" -#define MSG_INIT_SDCARD "Init. la carte SD" -#define MSG_CNG_SDCARD "Changer de carte" -#define MSG_ZPROBE_OUT "Z sonde exte. lit" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Decalage Z" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Butee abandon" -#define MSG_HEATING_FAILED_LCD "Erreur de chauffe" -#define MSG_ERR_REDUNDANT_TEMP "Err: ERREUR TEMP. REDONDANTE" -#define MSG_THERMAL_RUNAWAY "EMBALLEMENT THERMIQUE" -#define MSG_ERR_MAXTEMP "Err: TEMP. MAX" -#define MSG_ERR_MINTEMP "Err: TEMP. MIN" -#define MSG_ERR_MAXTEMP_BED "Err: TEMP. MAX PLATEAU" -#define MSG_ERR_MINTEMP_BED "Err: TEMP. MIN PLATEAU" -#define MSG_HEATING "En chauffe..." -#define MSG_HEATING_COMPLETE "Chauffe terminee" -#define MSG_BED_HEATING "Plateau en chauffe..." -#define MSG_BED_DONE "Chauffe plateau terminee" -#define MSG_DELTA_CALIBRATE "Calibration Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrer X" -#define MSG_DELTA_CALIBRATE_Y "Calibrer Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrer Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrer centre" - -#endif // LANGUAGE_FR_H diff --git a/Marlin/language_gl.h b/Marlin/language_gl.h deleted file mode 100644 index c5fbbc9..0000000 --- a/Marlin/language_gl.h +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Galician language (ISO "gl") - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_GL_H -#define LANGUAGE_GL_H - -#define MAPPER_C2C3 -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " lista." -#define MSG_SD_INSERTED "Tarxeta inserida" -#define MSG_SD_REMOVED "Tarxeta retirada" -#define MSG_LCD_ENDSTOPS "FinCarro" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autoarranque" -#define MSG_DISABLE_STEPPERS "Apagar motores" -#define MSG_AUTO_HOME "Ir a orixe" -#define MSG_AUTO_HOME_X "Ir orixe X" -#define MSG_AUTO_HOME_Y "Ir orixe Y" -#define MSG_AUTO_HOME_Z "Ir orixe Z" -#define MSG_LEVEL_BED_HOMING "Ir orixes XYZ" -#define MSG_LEVEL_BED_WAITING "Prema pulsador" -#define MSG_LEVEL_BED_NEXT_POINT "Seguinte punto" -#define MSG_LEVEL_BED_DONE "Nivelado feito" -#define MSG_LEVEL_BED_CANCEL "Cancelar" -#define MSG_SET_HOME_OFFSETS "Offsets na orixe" -#define MSG_HOME_OFFSETS_APPLIED "Offsets fixados" -#define MSG_SET_ORIGIN "Fixar orixe" -#define MSG_PREHEAT_1 "Prequentar PLA" -#define MSG_PREHEAT_1_N "Prequentar PLA " -#define MSG_PREHEAT_1_ALL "Preque. PLA Todo" -#define MSG_PREHEAT_1_BEDONLY "Preque. PLA Cama" -#define MSG_PREHEAT_1_SETTINGS "Preque. PLA conf" -#define MSG_PREHEAT_2 "Prequentar ABS" -#define MSG_PREHEAT_2_N "Prequentar ABS " -#define MSG_PREHEAT_2_ALL "Preque. ABS Todo" -#define MSG_PREHEAT_2_BEDONLY "Preque. ABS Cama" -#define MSG_PREHEAT_2_SETTINGS "Preque. ABS conf" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Arrefriar" -#define MSG_SWITCH_PS_ON "Acender" -#define MSG_SWITCH_PS_OFF "Apagar" -#define MSG_EXTRUDE "Extrudir" -#define MSG_RETRACT "Retraer" -#define MSG_MOVE_AXIS "Mover eixe" -#define MSG_LEVEL_BED "Nivelar cama" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Extrusor" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Cama Z" -#define MSG_NOZZLE "Bico" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Cama" -#define MSG_FAN_SPEED "Velocidade vent." -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Control" -#define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR " " LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_SELECT "Escolla" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Acel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-travel" -#define MSG_XSTEPS "Xpasos/mm" -#define MSG_YSTEPS "Ypasos/mm" -#define MSG_ZSTEPS "Zpasos/mm" -#define MSG_ESTEPS "Epasos/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movemento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "E en mm3" -#define MSG_FILAMENT_DIAM "Diam. fil." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "Constraste LCD" -#define MSG_STORE_EPROM "Gardar en memo." -#define MSG_LOAD_EPROM "Cargar de memo." -#define MSG_RESTORE_FAILSAFE "Cargar de firm." -#define MSG_REFRESH "Volver a cargar" -#define MSG_WATCH "Monitorizacion" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Axustar" -#define MSG_PAUSE_PRINT "Pausar impres." -#define MSG_RESUME_PRINT "Seguir impres." -#define MSG_STOP_PRINT "Deter impres." -#define MSG_CARD_MENU "Tarxeta SD" -#define MSG_NO_CARD "Sen tarxeta SD" -#define MSG_DWELL "En repouso..." -#define MSG_USERWAIT "A espera..." -#define MSG_RESUMING "Imprimindo..." -#define MSG_PRINT_ABORTED "Impre. cancelada" -#define MSG_NO_MOVE "Sen movemento." -#define MSG_KILLED "PROGRAMA MORTO" -#define MSG_STOPPED "PROGRAMA PARADO" -#define MSG_CONTROL_RETRACT "Retraccion mm" -#define MSG_CONTROL_RETRACT_SWAP "Cambio retra. mm" -#define MSG_CONTROL_RETRACTF "Retraccion V" -#define MSG_CONTROL_RETRACT_ZLIFT "Alzar Z mm" -#define MSG_CONTROL_RETRACT_RECOVER "Recup. retra. mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Cambio recup. mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Recuperacion V" -#define MSG_AUTORETRACT "Retraccion auto." -#define MSG_FILAMENTCHANGE "Cambiar filamen." -#define MSG_INIT_SDCARD "Iniciando SD" -#define MSG_CNG_SDCARD "Cambiar SD" -#define MSG_ZPROBE_OUT "Sonda-Z sen cama" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Offset Z" -#define MSG_BABYSTEP_X "Micropaso X" -#define MSG_BABYSTEP_Y "Micropaso Y" -#define MSG_BABYSTEP_Z "Micropaso Z" -#define MSG_ENDSTOP_ABORT "Erro fin carro" -#define MSG_HEATING_FAILED_LCD "Fallo quentando" -#define MSG_ERR_REDUNDANT_TEMP "Erro temperatura" -#define MSG_THERMAL_RUNAWAY "Temp. excesiva" -#define MSG_ERR_MAXTEMP "Err: temp. max." -#define MSG_ERR_MINTEMP "Err: temp. min." -#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" -#define MSG_ERR_MINTEMP_BED "Err: MINTEMP BED" -#define MSG_HALTED "SISTEMA MORTO" -#define MSG_PLEASE_RESET "Debe reiniciar!" -#define MSG_SHORT_DAY "d" // One character only -#define MSG_SHORT_HOUR "h" // One character only -#define MSG_SHORT_MINUTE "m" // One character only -#define MSG_HEATING "Quentando..." -#define MSG_HEATING_COMPLETE "Xa esta quente" -#define MSG_BED_HEATING "Quentando cama" -#define MSG_BED_DONE "Cama esta quente" -#define MSG_DELTA_CALIBRATE "Calibracion Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" -#define MSG_INFO_MENU "Acerca de..." -#define MSG_INFO_PRINTER_MENU "Informacion" -#define MSG_INFO_STATS_MENU "Estadisticas" -#define MSG_INFO_BOARD_MENU "Placa nai" -#define MSG_INFO_THERMISTOR_MENU "Termistores" -#define MSG_INFO_EXTRUDERS "Extrusores" -#define MSG_INFO_BAUDRATE "Baudios" -#define MSG_INFO_PROTOCOL "Protocolo" -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Total traballos" - #define MSG_INFO_COMPLETED_PRINTS "Total completos" - #define MSG_INFO_PRINT_TIME "Tempo impresion" - #define MSG_INFO_PRINT_LONGEST "Traballo +longo" - #define MSG_INFO_PRINT_FILAMENT "Total extruido" -#else - #define MSG_INFO_PRINT_COUNT "Traballos" - #define MSG_INFO_COMPLETED_PRINTS "Completos" - #define MSG_INFO_PRINT_TIME "Tempo" - #define MSG_INFO_PRINT_LONGEST "O +longo" - #define MSG_INFO_PRINT_FILAMENT "Extruido" -#endif -#define MSG_INFO_MIN_TEMP "Min Temp" -#define MSG_INFO_MAX_TEMP "Max Temp" -#define MSG_INFO_PSU "Fonte alime." -#define MSG_FILAMENT_CHANGE_HEADER "TROCO FILAMENTO" -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "OPCIONS TROCO:" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Extruir mais" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Segue traballo" -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Agarde para" - #define MSG_FILAMENT_CHANGE_INIT_2 "iniciar troco" - #define MSG_FILAMENT_CHANGE_INIT_3 "de filamento" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Agarde pola" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "descarga do" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "filamento" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Introduza o" - #define MSG_FILAMENT_CHANGE_INSERT_2 "filamento e" - #define MSG_FILAMENT_CHANGE_INSERT_3 "faga click" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Agarde pola" - #define MSG_FILAMENT_CHANGE_LOAD_2 "carga do" - #define MSG_FILAMENT_CHANGE_LOAD_3 "filamento" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Agarde pola" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "extrusion do" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "filamento" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Agarde para" - #define MSG_FILAMENT_CHANGE_RESUME_2 "seguir co" - #define MSG_FILAMENT_CHANGE_RESUME_3 "traballo" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Agarde..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Descargando..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Introduza e click" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Cargando..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Extruindo..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Seguindo..." -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_GL_H - diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h deleted file mode 100644 index 6035215..0000000 --- a/Marlin/language_hr.h +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Croatian (Hrvatski) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_HR_H -#define LANGUAGE_HR_H - - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. - -#define WELCOME_MSG MACHINE_NAME " spreman." -#define MSG_SD_INSERTED "SD kartica umetnuta" -#define MSG_SD_REMOVED "SD kartica uklonjena" -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "Main" -#define MSG_AUTOSTART "Automatsko pokretanje" -#define MSG_DISABLE_STEPPERS "Ugasi steppere" -#define MSG_AUTO_HOME "Automatski homing" -#define MSG_AUTO_HOME_X "Home-aj X" -#define MSG_AUTO_HOME_Y "Home-aj Y" -#define MSG_AUTO_HOME_Z "Home-aj Z" -#define MSG_LEVEL_BED_HOMING "Home-aj XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_NEXT_POINT "Sljedeća toÄka" -#define MSG_LEVEL_BED_DONE "Niveliranje gotovo!" -#define MSG_LEVEL_BED_CANCEL "Otkaži" -#define MSG_SET_HOME_OFFSETS "Postavi home offsete" -#define MSG_HOME_OFFSETS_APPLIED "Offsets postavljeni" -#define MSG_SET_ORIGIN "Postavi ishodiÅ¡te" -#define MSG_PREHEAT_1 "Predgrij PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " Sve" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " Bed" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " conf" -#define MSG_PREHEAT_2 "Predgrij ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " Sve" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " Bed" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " conf" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "HlaÄ‘enje" -#define MSG_SWITCH_PS_ON "UkljuÄi napajanje" -#define MSG_SWITCH_PS_OFF "IskljuÄi napajanje" -#define MSG_EXTRUDE "Extrude" -#define MSG_RETRACT "Retract" -#define MSG_MOVE_AXIS "MiÄi os" -#define MSG_LEVEL_BED "Niveliraj bed" -#define MSG_MOVE_X "MiÄi X" -#define MSG_MOVE_Y "MiÄi Y" -#define MSG_MOVE_Z "MiÄi Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "MiÄi 0.1mm" -#define MSG_MOVE_1MM "MiÄi 1mm" -#define MSG_MOVE_10MM "MiÄi 10mm" -#define MSG_SPEED "Brzina" -#define MSG_BED_Z "Bed Z" -#define MSG_NOZZLE "Nozzle" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Bed" -#define MSG_FAN_SPEED "Brzina ventilatora" -#define MSG_FLOW "Flow" -#define MSG_CONTROL "Control" -#define MSG_MIN " " LCD_STR_THERMOMETER " Min" -#define MSG_MAX " " LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR " " LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-travel" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "Temperature" -#define MSG_MOTION "Motion" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "Kontrast LCD-a" -#define MSG_STORE_EPROM "Pohrani u memoriju" -#define MSG_LOAD_EPROM "UÄitaj memoriju" -#define MSG_RESTORE_FAILSAFE "UÄitaj failsafe" -#define MSG_REFRESH "Osvježi" -#define MSG_WATCH "Info screen" -#define MSG_PREPARE "Pripremi" -#define MSG_TUNE "Tune" -#define MSG_PAUSE_PRINT "Pauziraj print" -#define MSG_RESUME_PRINT "Nastavi print" -#define MSG_STOP_PRINT "Zaustavi print" -#define MSG_CARD_MENU "Printaj s SD kartice" -#define MSG_NO_CARD "Nema SD kartice" -#define MSG_DWELL "Sleep..." -#define MSG_USERWAIT "ÄŒekaj korisnika..." -#define MSG_RESUMING "Nastavljam print" -#define MSG_PRINT_ABORTED "Print otkazan" -#define MSG_NO_MOVE "No move." -#define MSG_KILLED "KILLED. " -#define MSG_STOPPED "ZAUSTAVLJEN. " -#define MSG_CONTROL_RETRACT "Retract mm" -#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" -#define MSG_CONTROL_RETRACTF "Retract V" -#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Promijeni filament" -#define MSG_INIT_SDCARD "Init. SD karticu" -#define MSG_CNG_SDCARD "Promijeni SD karticu" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Endstop abort" -#define MSG_HEATING_FAILED_LCD "Heating failed" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: MAXTEMP" -#define MSG_ERR_MINTEMP "Err: MINTEMP" -#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" -#define MSG_ERR_MINTEMP_BED "Err: MINTEMP BED" -#define MSG_HEATING "Grijanje..." -#define MSG_HEATING_COMPLETE "Grijanje gotovo." -#define MSG_BED_HEATING "Grijanje Bed-a." -#define MSG_BED_DONE "Bed gotov." -#define MSG_DELTA_CALIBRATE "Delta Kalibracija" -#define MSG_DELTA_CALIBRATE_X "Kalibriraj X" -#define MSG_DELTA_CALIBRATE_Y "Kalibriraj Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibriraj Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibriraj SrediÅ¡te" - -#endif // LANGUAGE_HR_H diff --git a/Marlin/language_it.h b/Marlin/language_it.h deleted file mode 100644 index 047272b..0000000 --- a/Marlin/language_it.h +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Italian - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_IT_H -#define LANGUAGE_IT_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "SD Card inserita" -#define MSG_SD_REMOVED "SD Card rimossa" -#define MSG_LCD_ENDSTOPS "Endstop" -#define MSG_MAIN "Menu principale" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Disabilita Motori" -#define MSG_AUTO_HOME "Auto Home" -#define MSG_AUTO_HOME_X "Home asse X" -#define MSG_AUTO_HOME_Y "Home asse Y" -#define MSG_AUTO_HOME_Z "Home asse Z" -#define MSG_LEVEL_BED_HOMING "Home assi XYZ" -#define MSG_LEVEL_BED_WAITING "Premi per Iniziare" -#define MSG_LEVEL_BED_NEXT_POINT "Punto successivo" -#define MSG_LEVEL_BED_DONE "Livel. terminato!" -#define MSG_LEVEL_BED_CANCEL "Annulla" -#define MSG_SET_HOME_OFFSETS "Imp. offset home" -#define MSG_HOME_OFFSETS_APPLIED "Offset applicato" -#define MSG_SET_ORIGIN "Imposta Origine" -#define MSG_PREHEAT_1 "Preriscalda PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " Tutto" -#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " Piatto" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " conf" -#define MSG_PREHEAT_2 "Preriscalda ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " Tutto" -#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " Piatto" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " conf" -#define MSG_COOLDOWN "Raffredda" -#define MSG_SWITCH_PS_ON "Accendi aliment." -#define MSG_SWITCH_PS_OFF "Spegni aliment." -#define MSG_EXTRUDE "Estrudi" -#define MSG_RETRACT "Ritrai" -#define MSG_MOVE_AXIS "Muovi Asse" -#define MSG_LEVEL_BED "Livella piano" -#define MSG_MOVE_X "Muovi X" -#define MSG_MOVE_Y "Muovi Y" -#define MSG_MOVE_Z "Muovi Z" -#define MSG_MOVE_E "Estrusore" -#define MSG_MOVE_01MM "Muovi di 0.1mm" -#define MSG_MOVE_1MM "Muovi di 1mm" -#define MSG_MOVE_10MM "Muovi di 10mm" -#define MSG_SPEED "Velocità" -#define MSG_BED_Z "piatto Z" -#define MSG_NOZZLE "Ugello" -#define MSG_BED "Piatto" -#define MSG_FAN_SPEED "Velocità ventola" -#define MSG_FLOW "Flusso" -#define MSG_CONTROL "Controllo" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_SELECT "Seleziona" -#define MSG_ACC "Accel" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-Spostamento" -#define MSG_XSTEPS "Xpassi/mm" -#define MSG_YSTEPS "Ypassi/mm" -#define MSG_ZSTEPS "Zpassi/mm" -#define MSG_ESTEPS "Epassi/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Diam. filo" -#define MSG_CONTRAST "Contrasto LCD" -#define MSG_STORE_EPROM "Salva in memoria" -#define MSG_LOAD_EPROM "Carica da memoria" -#define MSG_RESTORE_FAILSAFE "Ripristina imp." -#define MSG_REFRESH "Aggiorna" -#define MSG_WATCH "Guarda" -#define MSG_PREPARE "Prepara" -#define MSG_TUNE "Regola" -#define MSG_PAUSE_PRINT "Pausa" -#define MSG_RESUME_PRINT "Riprendi stampa" -#define MSG_STOP_PRINT "Arresta stampa" -#define MSG_CARD_MENU "Stampa da SD" -#define MSG_NO_CARD "SD non presente" -#define MSG_DWELL "Sospensione..." -#define MSG_USERWAIT "Attendi Utente.." -#define MSG_RESUMING "Riprendi Stampa" -#define MSG_PRINT_ABORTED "Stampa annullata" -#define MSG_NO_MOVE "Nessun Movimento" -#define MSG_KILLED "UCCISO. " -#define MSG_STOPPED "ARRESTATO. " -#define MSG_CONTROL_RETRACT "Ritrai mm" -#define MSG_CONTROL_RETRACT_SWAP "Scamb. Ritrai mm" -#define MSG_CONTROL_RETRACTF "Ritrai V" -#define MSG_CONTROL_RETRACT_ZLIFT "Salta mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Scamb. UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" -#define MSG_AUTORETRACT "AutoRitrai" -#define MSG_FILAMENTCHANGE "Cambia filamento" -#define MSG_INIT_SDCARD "Iniz. SD-Card" -#define MSG_CNG_SDCARD "Cambia SD-Card" -#define MSG_ZPROBE_OUT "Z probe out. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Finecorsa abort" -#define MSG_HEATING_FAILED_LCD "Riscald. Fallito" -#define MSG_ERR_REDUNDANT_TEMP "Err: TEMP RIDONDANTI" -#define MSG_THERMAL_RUNAWAY "TEMP FUORI CONTROLLO" -#define MSG_ERR_MAXTEMP "Err: TEMP MASSIMA" -#define MSG_ERR_MINTEMP "Err: TEMP MINIMA" -#define MSG_ERR_MAXTEMP_BED "Err: TEMP MASSIMA PIATTO" -#define MSG_ERR_MINTEMP_BED "Err: TEMP MINIMA PIATTO" -#define MSG_HALTED "STAMPANTE FERMATA" -#define MSG_PLEASE_RESET "Riavviare prego" -#define MSG_SHORT_DAY "g" // One character only -#define MSG_SHORT_HOUR "h" // One character only -#define MSG_SHORT_MINUTE "m" // One character only -#define MSG_HEATING "Riscaldamento.." -#define MSG_HEATING_COMPLETE "Risc. completato" -#define MSG_BED_HEATING "Risc. Piatto.." -#define MSG_BED_DONE "Piatto Pronto" -#define MSG_DELTA_CALIBRATE "Calibraz. Delta" -#define MSG_DELTA_CALIBRATE_X "Calibra X" -#define MSG_DELTA_CALIBRATE_Y "Calibra Y" -#define MSG_DELTA_CALIBRATE_Z "Calibra Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibra Center" -#define MSG_INFO_MENU "Riguardo stampante" -#define MSG_INFO_PRINTER_MENU "Info. stampante" -#define MSG_INFO_STATS_MENU "Statistiche" -#define MSG_INFO_BOARD_MENU "Info. scheda" -#define MSG_INFO_THERMISTOR_MENU "Termistori" -#define MSG_INFO_EXTRUDERS "Estrusori" -#define MSG_INFO_BAUDRATE "Baud" -#define MSG_INFO_PROTOCOL "Protocollo" -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_COUNT "Contat. stampa" - #define MSG_INFO_COMPLETED_PRINTS "Completati" - #define MSG_INFO_PRINT_TIME "Tempo totale" - #define MSG_INFO_PRINT_LONGEST "Lavoro piu lungo" - #define MSG_INFO_PRINT_FILAMENT "Totale estruso" -#else - #define MSG_INFO_PRINT_COUNT "Stampe" - #define MSG_INFO_COMPLETED_PRINTS "Completati" - #define MSG_INFO_PRINT_TIME "Durata" - #define MSG_INFO_PRINT_LONGEST "Piu lungo" - #define MSG_INFO_PRINT_FILAMENT "Estruso" -#endif -#define MSG_INFO_MIN_TEMP "Temp min" -#define MSG_INFO_MAX_TEMP "Temp max" -#define MSG_INFO_PSU "Alimentatore" - -#define MSG_FILAMENT_CHANGE_HEADER "CAMBIA FILAMENTO" -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "CAMBIA OPZIONI:" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "Estrusione" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "Riprendi stampa" -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Attendere avvio" - #define MSG_FILAMENT_CHANGE_INIT_2 "del cambio" - #define MSG_FILAMENT_CHANGE_INIT_3 "di filamento" - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Attendere" - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "l'espulsione" - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "del filamento" - #define MSG_FILAMENT_CHANGE_INSERT_1 "Inserisci il" - #define MSG_FILAMENT_CHANGE_INSERT_2 "filamento e" - #define MSG_FILAMENT_CHANGE_INSERT_3 "premi per cont" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Attendere" - #define MSG_FILAMENT_CHANGE_LOAD_2 "il caricamento" - #define MSG_FILAMENT_CHANGE_LOAD_3 "del filamento" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Attendere" - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "l'estrusione" - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "del filamento" - #define MSG_FILAMENT_CHANGE_RESUME_1 "Attendere" - #define MSG_FILAMENT_CHANGE_RESUME_2 "la ripresa" - #define MSG_FILAMENT_CHANGE_RESUME_3 "della stampa" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "Attendere..." - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "Espulsione..." - #define MSG_FILAMENT_CHANGE_INSERT_1 "Inserisci e premi" - #define MSG_FILAMENT_CHANGE_LOAD_1 "Caricamento..." - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "Estrusione..." - #define MSG_FILAMENT_CHANGE_RESUME_1 "Ripresa..." -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_IT_H diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h deleted file mode 100644 index 67136e2..0000000 --- a/Marlin/language_kana.h +++ /dev/null @@ -1,292 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Japanese (Kana) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ - -#ifndef LANGUAGE_KANA_H -#define LANGUAGE_KANA_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_KANA - -// 片仮å表示定義 -#define WELCOME_MSG MACHINE_NAME " ready." -#define MSG_SD_INSERTED "\xb6\xb0\xc4\xde\xb6\xde\xbf\xb3\xc6\xad\xb3\xbb\xda\xcf\xbc\xc0" // "カードガソウニュウサレï¾ï½¼ï¾€" ("Card inserted") -#define MSG_SD_REMOVED "\xb6\xb0\xc4\xde\xb6\xde\xb1\xd8\xcf\xbe\xdd" // "カードガアリï¾ï½¾ï¾" ("Card removed") -#define MSG_LCD_ENDSTOPS "Endstops" // Max length 8 characters -#define MSG_MAIN "\xd2\xb2\xdd" // "ï¾’ï½²ï¾" ("Main") -#define MSG_AUTOSTART "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc" // "ジドウカイシ" ("Autostart") -#define MSG_DISABLE_STEPPERS "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "モーターデï¾ï½¹ï¾žï¾ オフ" ("Disable steppers") -#define MSG_AUTO_HOME "\xb9\xde\xdd\xc3\xdd\xcc\xaf\xb7" // "ゲï¾ï¾ƒï¾ï¾Œï½¯ï½·" ("Auto home") -#define MSG_AUTO_HOME_X "X\xbc\xde\xb8\x20\xb9\xde\xdd\xc3\xdd\xcc\xaf\xb7" // "Xジク ゲï¾ï¾ƒï¾ï¾Œï½¯ï½·" ("Home X") -#define MSG_AUTO_HOME_Y "Y\xbc\xde\xb8\x20\xb9\xde\xdd\xc3\xdd\xcc\xaf\xb7" // "Yジク ゲï¾ï¾ƒï¾ï¾Œï½¯ï½·" ("Home Y") -#define MSG_AUTO_HOME_Z "Z\xbc\xde\xb8\x20\xb9\xde\xdd\xc3\xdd\xcc\xaf\xb7" // "Zジク ゲï¾ï¾ƒï¾ï¾Œï½¯ï½·" ("Home Z") -#define MSG_LEVEL_BED_HOMING "\xb9\xde\xdd\xc3\xdd\xcc\xaf\xb7\xc1\xad\xb3" // "ゲï¾ï¾ƒï¾ï¾Œï½¯ï½·ï¾ï½­ï½³" ("Homing XYZ") -#define MSG_LEVEL_BED_WAITING "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xb2\xbc" // "レï¾ï¾žï¾˜ï¾ï½¸ï¾žï½¶ï½²ï½¼" ("Click to Begin") -#define MSG_LEVEL_BED_NEXT_POINT "\xc2\xb7\xde\xc9\xbf\xb8\xc3\xb2\xc3\xdd\xcd" // "ツギノソクテイテï¾ï¾" ("Next Point") -#define MSG_LEVEL_BED_DONE "\xda\xcd\xde\xd8\xdd\xb8\xde\xb6\xdd\xd8\xae\xb3" // "レï¾ï¾žï¾˜ï¾ï½¸ï¾žï½¶ï¾ï¾˜ï½®ï½³" ("Leveling Done!") -#define MSG_LEVEL_BED_CANCEL "\xc4\xd8\xd4\xd2" // "トリヤメ" ("Cancel") -#define MSG_SET_HOME_OFFSETS "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2" // "キジュï¾ï½µï¾Œï½¾ï½¯ï¾„セッテイ" ("Set home offsets") -#define MSG_HOME_OFFSETS_APPLIED "\xb5\xcc\xbe\xaf\xc4\xb6\xde\xc3\xb7\xd6\xb3\xbb\xda\xcf\xbc\xc0" // "オフセットガテキヨウサレï¾ï½¼ï¾€" ("Offsets applied") -#define MSG_SET_ORIGIN "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4" // "キジュï¾ï½¾ï½¯ï¾„" ("Set origin") -#define MSG_PREHEAT_1 "PLA \xd6\xc8\xc2" // "PLA ヨネツ" ("Preheat PLA") -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL "PLA \xbd\xcd\xde\xc3\xd6\xc8\xc2" // "PLA ï½½ï¾ï¾žï¾ƒï¾–ネツ" (" All") -#define MSG_PREHEAT_1_BEDONLY "PLA \xcd\xde\xaf\xc4\xde\xd6\xc8\xc2" // "PLA ï¾ï¾žï½¯ï¾„゙ヨネツ" (" Bed") -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 "\xbe\xaf\xc3\xb2" // "セッテイ" (" conf") -#define MSG_PREHEAT_2 "ABS \xd6\xc8\xc2" // "ABS ヨネツ" ("Preheat ABS") -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL "ABS \xbd\xcd\xde\xc3\xd6\xc8\xc2" // "ABS ï½½ï¾ï¾žï¾ƒï¾–ネツ" (" All") -#define MSG_PREHEAT_2_BEDONLY "ABS \xcd\xde\xaf\xc4\xde\xd6\xc8\xc2" // "ABS ï¾ï¾žï½¯ï¾„゙ヨネツ" (" Bed") -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 "\xbe\xaf\xc3\xb2" // "セッテイ" (" conf") -#define MSG_COOLDOWN "\xb6\xc8\xc2\xc3\xb2\xbc" // "カネツテイシ" ("Cooldown") -#define MSG_SWITCH_PS_ON "\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xdd" // "デï¾ï½¹ï¾žï¾ ï½µï¾" ("Switch power on") -#define MSG_SWITCH_PS_OFF "\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "デï¾ï½¹ï¾žï¾ オフ" ("Switch power off") -#define MSG_EXTRUDE "\xb5\xbc\xc0\xde\xbc" // "オシダシ" ("Extrude") -#define MSG_RETRACT "\xcb\xb7\xba\xd0\xbe\xaf\xc3\xb2" // "ヒキコï¾ï½¾ï½¯ï¾ƒï½²" ("Retract") -#define MSG_MOVE_AXIS "\xbc\xde\xb8\xb2\xc4\xde\xb3" // "ジクイドウ" ("Move axis") -#define MSG_LEVEL_BED "\xcd\xde\xaf\xc4\xde\xda\xcd\xde\xd8\xdd\xb8\xde" // "ï¾ï¾žï½¯ï¾„゙レï¾ï¾žï¾˜ï¾ï½¸ï¾ž" ("Level bed") -#define MSG_MOVE_X "X\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Xジク イドウ" ("Move X") -#define MSG_MOVE_Y "Y\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Yジク イドウ" ("Move Y") -#define MSG_MOVE_Z "Z\xbc\xde\xb8\x20\xb2\xc4\xde\xb3" // "Zジク イドウ" ("Move Z") -#define MSG_MOVE_E "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0" // "エクストルーダー" ("Extruder") -#define MSG_MOVE_01MM "0.1mm \xb2\xc4\xde\xb3" // "0.1mm イドウ" ("Move 0.1mm") -#define MSG_MOVE_1MM " 1mm \xb2\xc4\xde\xb3" // " 1mm イドウ" ("Move 1mm") -#define MSG_MOVE_10MM " 10mm \xb2\xc4\xde\xb3" // " 10mm イドウ" ("Move 10mm") -#define MSG_SPEED "\xbf\xb8\xc4\xde" // "ソクド" ("Speed") -#define MSG_BED_Z "Z\xb5\xcc\xbe\xaf\xc4" // "Zオフセット" ("Bed Z") -#define MSG_NOZZLE "\xc9\xbd\xde\xd9" // "ノズル" ("Nozzle") -#define MSG_BED "\xcd\xde\xaf\xc4\xde" // "ï¾ï¾žï½¯ï¾„゙" ("Bed") -#define MSG_FAN_SPEED "\xcc\xa7\xdd\xbf\xb8\xc4\xde" // "ファï¾ï½¿ï½¸ï¾„゙" ("Fan speed") -#define MSG_FLOW "\xc4\xbc\xad\xc2\xd8\xae\xb3" // "トシュツリョウ" ("Flow") -#define MSG_CONTROL "\xbe\xb2\xb7\xde\xae" // "セイギョ" ("Control") -#define MSG_MIN LCD_STR_THERMOMETER " \xbb\xb2\xc3\xb2" // " サイテイ" (" Min") -#define MSG_MAX LCD_STR_THERMOMETER " \xbb\xb2\xba\xb3" // " サイコウ" (" Max") -#define MSG_FACTOR LCD_STR_THERMOMETER " \xcc\xa7\xb8\xc0\xb0" // " ファクター" (" Fact") -#if LCD_WIDTH > 19 - #define MSG_AUTOTEMP "\xbc\xde\xc4\xde\xb3\xb5\xdd\xc4\xde\xbe\xb2\xb7\xde\xae" // "ジドウオï¾ï¾„゙セイギョ" ("Autotemp") -#else - #define MSG_AUTOTEMP "\xbc\xde\xc4\xde\xb3\xb5\xdd\xc4\xde" // "ジドウオï¾ï¾„゙" ("Autotemp") -#endif -#define MSG_ON "\xb5\xdd " // "ï½µï¾ " ("On ") -#define MSG_OFF "\xb5\xcc " // "オフ " ("Off") -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_SELECT "\xbe\xdd\xc0\xb8" // "ï½¾ï¾ï¾€ï½¸" ("Select") -#if LCD_WIDTH > 19 - #define MSG_ACC "\xb6\xbf\xb8\xc4\xde mm/s2" // "カソクド mm/s2" ("Accel") - #define MSG_VXY_JERK "XY\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "XYジク ヤクド mm/s" ("Vxy-jerk") - #define MSG_VZ_JERK "Z\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "Zジク ヤクド mm/s" ("Vz-jerk") - #define MSG_VE_JERK "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0\x20\xd4\xb8\xc4\xde" // "エクストルーダー ヤクド" ("Ve-jerk") - #define MSG_VMAX "\xbb\xb2\xc0\xde\xb2\xb5\xb8\xd8\xbf\xb8\xc4\xde " // "サイダイオクリソクド " ("Vmax ") -#else - #define MSG_ACC "\xb6\xbf\xb8\xc4\xde" // "カソクド" ("Accel") - #define MSG_VXY_JERK "XY\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "XYジク ヤクド" ("Vxy-jerk") - #define MSG_VZ_JERK "Z\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "Zジク ヤクド" ("Vz-jerk") - #define MSG_VE_JERK "E\x20\xd4\xb8\xc4\xde" // "E ヤクド" ("Ve-jerk") - #define MSG_VMAX "max\xb5\xb8\xd8\xbf\xb8\xc4\xde " // "maxオクリソクド" ("Vmax ") -#endif -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#if LCD_WIDTH > 19 - #define MSG_VMIN "\xbb\xb2\xbc\xae\xb3\xb5\xb8\xd8\xbf\xb8\xc4\xde" // "サイショウオクリソクド" ("Vmin") - #define MSG_VTRAV_MIN "\xbb\xb2\xbc\xae\xb3\xb2\xc4\xde\xb3\xbf\xb8\xc4\xde" // "サイショウイドウソクド" ("VTrav min") - #define MSG_AMAX "\xbb\xb2\xc0\xde\xb2\xb6\xbf\xb8\xc4\xde " // "サイダイカソクド " ("Amax ") -#else - #define MSG_VMIN "min\xb5\xb8\xd8\xbf\xb8\xc4\xde" // "minオクリソクド" ("Vmin") - #define MSG_VTRAV_MIN "min\xb2\xc4\xde\xb3\xbf\xb8\xc4\xde" // "minイドウソクド" ("VTrav min") - #define MSG_AMAX "max\xb6\xbf\xb8 " // "maxカソク " ("Amax ") -#endif -#define MSG_A_RETRACT "\xcb\xb7\xba\xd0\xb6\xbf\xb8\xc4\xde" // "ヒキコï¾ï½¶ï½¿ï½¸ï¾„゙" ("A-retract") -#define MSG_A_TRAVEL "\xb2\xc4\xde\xb3\xb6\xbf\xb8\xc4\xde" // "イドウカソクド" ("A-travel") -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "\xb5\xdd\xc4\xde" // "ï½µï¾ï¾„゙" ("Temperature") -#define MSG_MOTION "\xb3\xba\xde\xb7\xbe\xaf\xc3\xb2" // "ウゴキセッテイ" ("Motion") -#define MSG_VOLUMETRIC "\xcc\xa8\xd7\xd2\xdd\xc4" // "フィラメï¾ï¾„" ("Filament") -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#if LCD_WIDTH > 19 - #define MSG_FILAMENT_DIAM "\xcc\xa8\xd7\xd2\xdd\xc4\xc1\xae\xaf\xb9\xb2" // "フィラメï¾ï¾„ï¾ï½®ï½¯ï½¹ï½²" ("Fil. Dia.") -#else - #define MSG_FILAMENT_DIAM "\xcc\xa8\xd7\xd2\xdd\xc4\xb9\xb2" // "フィラメï¾ï¾„ケイ" ("Fil. Dia.") -#endif -#define MSG_CONTRAST "LCD\xba\xdd\xc4\xd7\xbd\xc4" // "LCDコï¾ï¾„ラスト" ("LCD contrast") -#define MSG_STORE_EPROM "\xd2\xd3\xd8\xcd\xb6\xb8\xc9\xb3" // "メモリï¾ï½¶ï½¸ï¾‰ï½³" ("Store memory") -#define MSG_LOAD_EPROM "\xd2\xd3\xd8\xb6\xd7\xd6\xd0\xba\xd0" // "メモリカラヨï¾ï½ºï¾" ("Load memory") -#define MSG_RESTORE_FAILSAFE "\xbe\xaf\xc3\xb2\xd8\xbe\xaf\xc4" // "セッテイリセット" ("Restore failsafe") -#define MSG_REFRESH "\xd8\xcc\xda\xaf\xbc\xad" // "リフレッシュ" ("Refresh") -#define MSG_WATCH "\xbc\xde\xae\xb3\xce\xb3\xb6\xde\xd2\xdd" // "ジョウホウガメï¾" ("Info screen") -#define MSG_PREPARE "\xbc\xde\xad\xdd\xcb\xde\xbe\xaf\xc3\xb2" // "ジュï¾ï¾‹ï¾žï½¾ï½¯ï¾ƒï½²" ("Prepare") -#define MSG_TUNE "\xc1\xae\xb3\xbe\xb2" // "ï¾ï½®ï½³ï½¾ï½²" ("Tune") -#define MSG_PAUSE_PRINT "\xb2\xc1\xbc\xde\xc3\xb2\xbc" // "ï½²ï¾ï½¼ï¾žï¾ƒï½²ï½¼" ("Pause print") -#define MSG_RESUME_PRINT "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリï¾ï¾„サイカイ" ("Resume print") -#define MSG_STOP_PRINT "\xcc\xdf\xd8\xdd\xc4\xc3\xb2\xbc" // "プリï¾ï¾„テイシ" ("Stop print") -#define MSG_CARD_MENU "SD\xb6\xb0\xc4\xde\xb6\xd7\xcc\xdf\xd8\xdd\xc4" // "SDカードカラプリï¾ï¾„" ("Print from SD") -#define MSG_NO_CARD "SD\xb6\xb0\xc4\xde\xb6\xde\xb1\xd8\xcf\xbe\xdd" // "SDカードガアリï¾ï½¾ï¾" ("No SD card") -#define MSG_DWELL "\xb7\xad\xb3\xbc" // "キュウシ" ("Sleep...") -#define MSG_USERWAIT "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("Wait for user...") -#define MSG_RESUMING "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリï¾ï¾„サイカイ" ("Resuming print") -#define MSG_PRINT_ABORTED "\xcc\xdf\xd8\xdd\xc4\xb6\xde\xc1\xad\xb3\xbc\xbb\xda\xcf\xbc\xc0" // "プリï¾ï¾„ガï¾ï½­ï½³ï½¼ï½»ï¾šï¾ï½¼ï¾€" ("Print aborted") -#define MSG_NO_MOVE "\xb3\xba\xde\xb7\xcf\xbe\xdd" // "ウゴキï¾ï½¾ï¾" ("No move.") -#define MSG_KILLED "\xcb\xbc\xde\xae\xb3\xc3\xb2\xbc" // "ヒジョウテイシ" ("KILLED. ") -#define MSG_STOPPED "\xc3\xb2\xbc\xbc\xcf\xbc\xc0" // "テイシシï¾ï½¼ï¾€" ("STOPPED. ") -#if LCD_WIDTH > 19 - #define MSG_CONTROL_RETRACT "\xcb\xb7\xba\xd0\xd8\xae\xb3 mm" // "ヒキコï¾ï¾˜ï½®ï½³ mm" ("Retract mm") - #define MSG_CONTROL_RETRACT_SWAP "\xcb\xb7\xba\xd0\xd8\xae\xb3S mm" // "ヒキコï¾ï¾˜ï½®ï½³S mm" ("Swap Re.mm") - #define MSG_CONTROL_RETRACTF "\xcb\xb7\xba\xd0\xbf\xb8\xc4\xde mm/s" // "ヒキコï¾ï½¿ï½¸ï¾„゙ mm/s" ("Retract V") - #define MSG_CONTROL_RETRACT_ZLIFT "\xc9\xbd\xde\xd9\xc0\xb2\xcb mm" // "ノズルタイヒ mm" ("Hop mm") - #define MSG_CONTROL_RETRACT_RECOVER "\xce\xbc\xae\xb3\xd8\xae\xb3 mm" // "ホショウリョウ mm" ("UnRet +mm") - #define MSG_CONTROL_RETRACT_RECOVER_SWAP "\xce\xbc\xae\xb3\xd8\xae\xb3S mm" // "ホショウリョウS mm" ("S UnRet+mm") - #define MSG_CONTROL_RETRACT_RECOVERF "\xce\xbc\xae\xb3\xbf\xb8\xc4\xde mm/s" // "ホショウソクド mm/s" ("UnRet V") -#else - #define MSG_CONTROL_RETRACT "\xcb\xb7\xba\xd0\xd8\xae\xb3" // "ヒキコï¾ï¾˜ï½®ï½³" ("Retract mm") - #define MSG_CONTROL_RETRACT_SWAP "\xcb\xb7\xba\xd0\xd8\xae\xb3S" // "ヒキコï¾ï¾˜ï½®ï½³S" ("Swap Re.mm") - #define MSG_CONTROL_RETRACTF "\xcb\xb7\xba\xd0\xbf\xb8\xc4\xde" // "ヒキコï¾ï½¿ï½¸ï¾„゙" ("Retract V") - #define MSG_CONTROL_RETRACT_ZLIFT "\xc9\xbd\xde\xd9\xc0\xb2\xcb" // "ノズルタイヒ" ("Hop mm") - #define MSG_CONTROL_RETRACT_RECOVER "\xce\xbc\xae\xb3\xd8\xae\xb3" // "ホショウリョウ" ("UnRet +mm") - #define MSG_CONTROL_RETRACT_RECOVER_SWAP "\xce\xbc\xae\xb3\xd8\xae\xb3S" // "ホショウリョウS" ("S UnRet+mm") - #define MSG_CONTROL_RETRACT_RECOVERF "\xce\xbc\xae\xb3\xbf\xb8\xc4\xde" // "ホショウソクド" ("UnRet V") -#endif -#define MSG_AUTORETRACT "\xbc\xde\xc4\xde\xb3\xcb\xb7\xba\xd0" // "ジドウヒキコï¾" ("AutoRetr.") -#define MSG_FILAMENTCHANGE "\xcc\xa8\xd7\xd2\xdd\xc4\xba\xb3\xb6\xdd" // "フィラメï¾ï¾„コウカï¾" ("Change filament") -#define MSG_INIT_SDCARD "SD\xb6\xb0\xc4\xde\xbb\xb2\xd6\xd0\xba\xd0" // "SDカードサイヨï¾ï½ºï¾" ("Init. SD card") -#define MSG_CNG_SDCARD "SD\xb6\xb0\xc4\xde\xba\xb3\xb6\xdd" // "SDカードコウカï¾" ("Change SD card") -#define MSG_ZPROBE_OUT "Z\xcc\xdf\xdb\xb0\xcc\xde\x20\xcd\xde\xaf\xc4\xde\xb6\xde\xb2" // "Zプローブ ï¾ï¾žï½¯ï¾„゙ガイ" ("Z probe out. bed") -#define MSG_HOME "\xbb\xb7\xc6" // "サキニ" ("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#if LCD_WIDTH > 19 - #define MSG_FIRST "\xa6\xcc\xaf\xb7\xbb\xbe\xc3\xb8\xc0\xde\xbb\xb2" // "ヲフッキサセテクダサイ" ("first") -#else - #define MSG_FIRST "\xa6\xcc\xaf\xb7\xbb\xbe\xd6" // "ヲフッキサセヨ" ("first") -#endif -#define MSG_ZPROBE_ZOFFSET "Z\xb5\xcc\xbe\xaf\xc4" // "Zオフセット" ("Z Offset") -#define MSG_BABYSTEP_X "X\xbc\xde\xb8\x20\xcb\xde\xc4\xde\xb3" // "Xジク ビドウ" ("Babystep X") -#define MSG_BABYSTEP_Y "Y\xbc\xde\xb8\x20\xcb\xde\xc4\xde\xb3" // "Yジク ビドウ" ("Babystep Y") -#define MSG_BABYSTEP_Z "Z\xbc\xde\xb8\x20\xcb\xde\xc4\xde\xb3" // "Zジク ビドウ" ("Babystep Z") -#if LCD_WIDTH > 19 - #define MSG_ENDSTOP_ABORT "\xb2\xc4\xde\xb3\xb9\xde\xdd\xb6\xb2\xb9\xdd\xc1\xb7\xc9\xb3" // "イドウゲï¾ï½¶ï½²ï½¹ï¾ï¾ï½·ï¾‰ï½³" ("Endstop abort") -#else - #define MSG_ENDSTOP_ABORT "\xb2\xc4\xde\xb3\xb9\xde\xdd\xb6\xb2\xb9\xdd\xc1" // "イドウゲï¾ï½¶ï½²ï½¹ï¾ï¾" ("Endstop abort") -#endif -#define MSG_HEATING_FAILED_LCD "\xb6\xc8\xc2\xbc\xaf\xca\xdf\xb2" // "カネツシッパイ" ("Heating failed") -#if LCD_WIDTH > 19 - #define MSG_ERR_REDUNDANT_TEMP "\xb4\xd7\xb0:\xbc\xde\xae\xb3\xc1\xae\xb3\xbb\xb0\xd0\xbd\xc0\xb0\xb7\xc9\xb3" // "ï½´ï¾—ï½°:ジョウï¾ï½®ï½³ï½»ï½°ï¾ï½½ï¾€ï½°ï½·ï¾‰ï½³" ("Err: REDUNDANT TEMP") -#else - #define MSG_ERR_REDUNDANT_TEMP "\xb4\xd7\xb0:\xbc\xde\xae\xb3\xc1\xae\xb3\xbb\xb0\xd0\xbd\xc0" // "ï½´ï¾—ï½°:ジョウï¾ï½®ï½³ï½»ï½°ï¾ï½½ï¾€" ("Err: REDUNDANT TEMP") -#endif -#define MSG_THERMAL_RUNAWAY "\xc8\xc2\xce\xde\xb3\xbf\xb3" // "ネツボウソウ" ("THERMAL RUNAWAY") -#define MSG_ERR_MAXTEMP "\xb4\xd7\xb0:\xbb\xb2\xba\xb3\xb5\xdd\xc1\xae\xb3\xb6" // "ï½´ï¾—ï½°:サイコウオï¾ï¾ï½®ï½³ï½¶" ("Err: MAXTEMP") -#define MSG_ERR_MINTEMP "\xb4\xd7\xb0:\xbb\xb2\xc3\xb2\xb5\xdd\xd0\xcf\xdd" // "ï½´ï¾—ï½°:サイテイオï¾ï¾ï¾ï¾" ("Err: MINTEMP") -#if LCD_WIDTH > 19 - #define MSG_ERR_MAXTEMP_BED "\xb4\xd7\xb0:\xcd\xde\xaf\xc4\xde\x20\xbb\xb2\xba\xb3\xb5\xdd\xc1\xae\xb3\xb6" // "ï½´ï¾—ï½°:ï¾ï¾žï½¯ï¾„゙ サイコウオï¾ï¾ï½®ï½³ï½¶" ("Err: MAXTEMP BED") - #define MSG_ERR_MINTEMP_BED "\xb4\xd7\xb0:\xcd\xde\xaf\xc4\xde\x20\xbb\xb2\xc3\xb2\xb5\xdd\xd0\xcf\xdd" // "ï½´ï¾—ï½°:ï¾ï¾žï½¯ï¾„゙ サイテイオï¾ï¾ï¾ï¾" ("Err: MINTEMP BED") -#else - #define MSG_ERR_MAXTEMP_BED "\xb4\xd7\xb0:\xcd\xde\xaf\xc4\xde\x20\xbb\xb2\xba\xb3\xb5\xdd" // "ï½´ï¾—ï½°:ï¾ï¾žï½¯ï¾„゙ サイコウオï¾" ("Err: MAXTEMP BED") - #define MSG_ERR_MINTEMP_BED "\xb4\xd7\xb0:\xcd\xde\xaf\xc4\xde\x20\xbb\xb2\xc3\xb2\xb5\xdd" // "ï½´ï¾—ï½°:ï¾ï¾žï½¯ï¾„゙ サイテイオï¾" ("Err: MINTEMP BED") -#endif -#define MSG_HALTED "\xcc\xdf\xd8\xdd\xc0\xb0\xca\xc3\xb2\xbc\xbc\xcf\xbc\xc0" // "プリï¾ï¾€ï½°ï¾Šï¾ƒï½²ï½¼ï½¼ï¾ï½¼ï¾€" ("PRINTER HALTED") -#define MSG_PLEASE_RESET "\xd8\xbe\xaf\xc4\xbc\xc3\xb8\xc0\xde\xbb\xb2" // "リセットシテクダサイ" ("Please reset") -#define MSG_SHORT_DAY "d" // One character only -#define MSG_SHORT_HOUR "h" // One character only -#define MSG_SHORT_MINUTE "m" // One character only -#define MSG_HEATING "\xb6\xc8\xc2\xc1\xad\xb3" // "カネツï¾ï½­ï½³" ("Heating...") -#define MSG_HEATING_COMPLETE "\xb6\xc8\xc2\xb6\xdd\xd8\xae\xb3" // "カネツカï¾ï¾˜ï½®ï½³" ("Heating done.") -#define MSG_BED_HEATING "\xcd\xde\xaf\xc4\xde\x20\xb6\xc8\xc2\xc1\xad\xb3" // "ï¾ï¾žï½¯ï¾„゙ カネツï¾ï½­ï½³" ("Bed Heating.") -#define MSG_BED_DONE "\xcd\xde\xaf\xc4\xde\x20\xb6\xc8\xc2\xb6\xdd\xd8\xae\xb3" // "ï¾ï¾žï½¯ï¾„゙ カネツカï¾ï¾˜ï½®ï½³" ("Bed done.") -#define MSG_DELTA_CALIBRATE "\xc3\xde\xd9\xc0\x20\xba\xb3\xbe\xb2" // "デルタ コウセイ" ("Delta Calibration") -#define MSG_DELTA_CALIBRATE_X "X\xbc\xde\xb8\x20\xba\xb3\xbe\xb2" // "Xジク コウセイ" ("Calibrate X") -#define MSG_DELTA_CALIBRATE_Y "Y\xbc\xde\xb8\x20\xba\xb3\xbe\xb2" // "Yジク コウセイ" ("Calibrate Y") -#define MSG_DELTA_CALIBRATE_Z "Z\xbc\xde\xb8\x20\xba\xb3\xbe\xb2" // "Zジク コウセイ" ("Calibrate Z") -#define MSG_DELTA_CALIBRATE_CENTER "\xc1\xad\xb3\xbc\xdd\x20\xba\xb3\xbe\xb2" // "ï¾ï½­ï½³ï½¼ï¾ コウセイ" ("Calibrate Center") -#define MSG_INFO_MENU "\xba\xc9\xcc\xdf\xd8\xdd\xc0\xb0\xc6\xc2\xb2\xc3" // "コノプリï¾ï¾€ï½°ï¾†ï¾‚イテ" ("About Printer") -#define MSG_INFO_PRINTER_MENU "\xcc\xdf\xd8\xdd\xc0\xb0\xbc\xde\xae\xb3\xce\xb3" // "プリï¾ï¾€ï½°ï½¼ï¾žï½®ï½³ï¾Žï½³" ("Printer Info") -#define MSG_INFO_STATS_MENU "\xcc\xdf\xd8\xdd\xc4\xbc\xde\xae\xb3\xb7\xae\xb3" // "プリï¾ï¾„ジョウキョウ" ("Printer Stats") -#define MSG_INFO_BOARD_MENU "\xbe\xb2\xb7\xde\xae\xb9\xb2\xbc\xde\xae\xb3\xce\xb3" // "セイギョケイジョウホウ" ("Board Info") -#define MSG_INFO_THERMISTOR_MENU "\xbb\xb0\xd0\xbd\xc0\xb0" // "サーï¾ï½½ï¾€ï½°" ("Thermistors") -#define MSG_INFO_EXTRUDERS "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0\xbd\xb3" // "エクストルーダースウ" ("Extruders") -#define MSG_INFO_BAUDRATE "\xce\xde\xb0\xda\xb0\xc4" // "ボーレート" ("Baud") -#define MSG_INFO_PROTOCOL "\xcc\xdf\xdb\xc4\xba\xd9" // "プロトコル" ("Protocol") -#define MSG_INFO_PRINT_COUNT "\xcc\xdf\xd8\xdd\xc4\xbd\xb3 " // "プリï¾ï¾„スウ " ("Print Count") -#define MSG_INFO_COMPLETED_PRINTS "\xb6\xdd\xd8\xae\xb3\xbd\xb3" // "ï½¶ï¾ï¾˜ï½®ï½³ï½½ï½³" ("Completed") -#define MSG_INFO_PRINT_TIME "\xcc\xdf\xd8\xdd\xc4\xbc\xde\xb6\xdd\xd9\xb2\xb9\xb2" // "プリï¾ï¾„ジカï¾ï¾™ï½²ï½¹ï½²" ("Total print time") -#define MSG_INFO_PRINT_LONGEST "\xbb\xb2\xc1\xae\xb3\xcc\xdf\xd8\xdd\xc4\xbc\xde\xb6\xdd" // "サイï¾ï½®ï½³ï¾Œï¾Ÿï¾˜ï¾ï¾„ジカï¾" ("Longest job time") -#if LCD_WIDTH > 19 - #define MSG_INFO_PRINT_FILAMENT "\xcc\xa8\xd7\xd2\xdd\xc4\xbc\xd6\xb3\xd8\xae\xb3\xd9\xb2\xb9\xb2" // "フィラメï¾ï¾„シヨウリョウルイケイ" ("Extruded total") -#else - #define MSG_INFO_PRINT_FILAMENT "\xcc\xa8\xd7\xd2\xdd\xc4\xbf\xb3\xbc\xd6\xb3\xd8\xae\xb3" // "フィラメï¾ï¾„ソウシヨウリョウ" ("Extruded") -#endif -#define MSG_INFO_MIN_TEMP "\xbe\xaf\xc3\xb2\xbb\xb2\xc3\xb2\xb5\xdd" // "セッテイサイテイオï¾" ("Min Temp") -#define MSG_INFO_MAX_TEMP "\xbe\xaf\xc3\xb2\xbb\xb2\xba\xb3\xb5\xdd" // "セッテイサイコウオï¾" ("Max Temp") -#if LCD_WIDTH > 19 - #define MSG_INFO_PSU "\xc3\xde\xdd\xb9\xde\xdd\xbc\xad\xcd\xde\xc2" // "デï¾ï½¹ï¾žï¾ï½¼ï½­ï¾ï¾žï¾‚" ("Power Supply") -#else - #define MSG_INFO_PSU "\xc3\xde\xdd\xb9\xde\xdd" // "デï¾ï½¹ï¾žï¾" ("Power Supply") -#endif -#define MSG_FILAMENT_CHANGE_HEADER "\xcc\xa8\xd7\xd2\xdd\xc4\xba\xb3\xb6\xdd" // "フィラメï¾ï¾„コウカï¾" ("CHANGE FILAMENT") -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "\xc4\xde\xb3\xbb\xa6\xbe\xdd\xc0\xb8\xbc\xc3\xb8\xc0\xde\xbb\xb2" // "ドウサヲセï¾ï¾€ï½¸ï½¼ï¾ƒï½¸ï¾€ï¾žï½»ï½²" ("CHANGE OPTIONS:") -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "\xbb\xd7\xc6\xb5\xbc\xc0\xde\xbd" // "サラニオシダス" ("Extrude more") -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "\xcc\xdf\xd8\xdd\xc4\xbb\xb2\xb6\xb2" // "プリï¾ï¾„サイカイ" ("Resume print") -#if LCD_HEIGHT >= 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "\xba\xb3\xb6\xdd\xa6\xb6\xb2\xbc\xbc\xcf\xbd" // "コウカï¾ï½¦ï½¶ï½²ï½¼ï½¼ï¾ï½½" ("Wait for start") - #define MSG_FILAMENT_CHANGE_INIT_2 "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("of the filament") - #define MSG_FILAMENT_CHANGE_INIT_3 "" // "" ("change") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xc7\xb7\xc0\xde\xbc\xc1\xad\xb3" // "フィラメï¾ï¾„ヌキダシï¾ï½­ï½³" ("Wait for") - #define MSG_FILAMENT_CHANGE_UNLOAD_2 "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("filament unload") - #define MSG_FILAMENT_CHANGE_UNLOAD_3 "" - #define MSG_FILAMENT_CHANGE_INSERT_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xa6\xbf\xb3\xc6\xad\xb3\xbc," // "フィラメï¾ï¾„ヲソウニュウシ," ("Insert filament") - #define MSG_FILAMENT_CHANGE_INSERT_2 "\xb8\xd8\xaf\xb8\xbd\xd9\xc4\xbf\xde\xaf\xba\xb3\xbc\xcf\xbd" // "クリックスルトゾッコウシï¾ï½½" ("and press button") - #define MSG_FILAMENT_CHANGE_INSERT_3 "" // "" ("to continue...") - #define MSG_FILAMENT_CHANGE_LOAD_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xbf\xb3\xc3\xdd\xc1\xad\xb3" // "フィラメï¾ï¾„ソウテï¾ï¾ï½­ï½³" ("Wait for") - #define MSG_FILAMENT_CHANGE_LOAD_2 "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("filament load") - #define MSG_FILAMENT_CHANGE_LOAD_3 "" - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xb5\xbc\xc0\xde\xbc\xc1\xad\xb3" // "フィラメï¾ï¾„オシダシï¾ï½­ï½³" ("Wait for") - #define MSG_FILAMENT_CHANGE_EXTRUDE_2 "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("filament extrude") - #define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" - #define MSG_FILAMENT_CHANGE_RESUME_1 "\xcc\xdf\xd8\xdd\xc4\xa6\xbb\xb2\xb6\xb2\xbc\xcf\xbd" // "プリï¾ï¾„ヲサイカイシï¾ï½½" ("Wait for print") - #define MSG_FILAMENT_CHANGE_RESUME_2 "\xbc\xca\xde\xd7\xb8\xb5\xcf\xc1\xb8\xc0\xde\xbb\xb2" // "シバラクオï¾ï¾ï½¸ï¾€ï¾žï½»ï½²" ("to resume") - #define MSG_FILAMENT_CHANGE_RESUME_3 "" -#else // LCD_HEIGHT < 4 - #define MSG_FILAMENT_CHANGE_INIT_1 "\xba\xb3\xb6\xdd\xa6\xb6\xb2\xbc\xbc\xcf\xbd" // "コウカï¾ï½¦ï½¶ï½²ï½¼ï½¼ï¾ï½½" ("Please wait...") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xc7\xb7\xc0\xde\xbc\xc1\xad\xb3" // "フィラメï¾ï¾„ヌキダシï¾ï½­ï½³" ("Ejecting...") - #if LCD_WIDTH > 19 - #define MSG_FILAMENT_CHANGE_INSERT_1 "\xbf\xb3\xc6\xad\xb3\xbc\x2c\xb8\xd8\xaf\xb8\xbc\xc3\xb8\xc0\xde\xbb\xb2" // "ソウニュウシ,クリックシテクダサイ" ("Insert and Click") - #else - #define MSG_FILAMENT_CHANGE_INSERT_1 "\xbf\xb3\xc6\xad\xb3\xbc\x2c\xb8\xd8\xaf\xb8\xbe\xd6" // "ソウニュウシ,クリックセヨ" ("Insert and Click") - #endif - #define MSG_FILAMENT_CHANGE_LOAD_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xbf\xb3\xc3\xdd\xc1\xad\xb3" // "フィラメï¾ï¾„ソウテï¾ï¾ï½­ï½³" ("Loading...") - #define MSG_FILAMENT_CHANGE_EXTRUDE_1 "\xcc\xa8\xd7\xd2\xdd\xc4\xb5\xbc\xc0\xde\xbc\xc1\xad\xb3" // "フィラメï¾ï¾„オシダシï¾ï½­ï½³" ("Extruding...") - #define MSG_FILAMENT_CHANGE_RESUME_1 "\xcc\xdf\xd8\xdd\xc4\xa6\xbb\xb2\xb6\xb2\xbc\xcf\xbd" // "プリï¾ï¾„ヲサイカイシï¾ï½½" ("Resuming...") -#endif // LCD_HEIGHT < 4 - -#endif // LANGUAGE_KANA_H diff --git a/Marlin/language_kana_utf8.h b/Marlin/language_kana_utf8.h deleted file mode 100644 index 3e46f57..0000000 --- a/Marlin/language_kana_utf8.h +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Japanese (Kana UTF8 version) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ - -#ifndef LANGUAGE_KANA_UTF_H -#define LANGUAGE_KANA_UTF_H - -#define MAPPER_E382E383 -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_KANA - -// This just to show the potential benefit of unicode. -// This translation can be improved by using the full charset of unicode codeblock U+30A0 to U+30FF. - -// 片仮å表示定義 -#define WELCOME_MSG MACHINE_NAME " ready." -#define MSG_SD_INSERTED "カードガソウニュウサレマシタ" // "Card inserted" -#define MSG_SD_REMOVED "カードガアリマセン" // "Card removed" -#define MSG_LCD_ENDSTOPS "エンドストップ" // "Endstops" // Max length 8 characters -#define MSG_MAIN "メイン" // "Main" -#define MSG_AUTOSTART "ジドウカイシ" // "Autostart" -#define MSG_DISABLE_STEPPERS "モーターデンゲン オフ" // "Disable steppers" -#define MSG_AUTO_HOME "ゲンテンフッキ" // "Auto home" -#define MSG_AUTO_HOME_X "Xジク ゲンテンフッキ" // "Home X" -#define MSG_AUTO_HOME_Y "Yジク ゲンテンフッキ" // "Home Y" -#define MSG_AUTO_HOME_Z "Zジク ゲンテンフッキ" // "Home Z" -#define MSG_LEVEL_BED_HOMING "ゲンテンフッキãƒãƒ¥ã‚¦" // "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "レベリングカイシ" // "Click to Begin" -#define MSG_LEVEL_BED_NEXT_POINT "ツギノソクテイテンヘ" // "Next Point" -#define MSG_LEVEL_BED_DONE "レベリングカンリョウ" // "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "トリヤメ" // "Cancel" -#define MSG_SET_HOME_OFFSETS "キジュンオフセットセッテイ" // "Set home offsets" -#define MSG_HOME_OFFSETS_APPLIED "オフセットガテキヨウサレマシタ" // "Offsets applied" -#define MSG_SET_ORIGIN "キジュンセット" // "Set origin" -#define MSG_PREHEAT_1 "PLA ヨãƒãƒ„" // "Preheat PLA" -#define MSG_PREHEAT_1_N MSG_PREHEAT_1 " " -#define MSG_PREHEAT_1_ALL "PLA スベテヨãƒãƒ„" // " All" -#define MSG_PREHEAT_1_BEDONLY "PLA ベッドヨãƒãƒ„" // " Bed" -#define MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 "セッテイ" // " conf" -#define MSG_PREHEAT_2 "ABS ヨãƒãƒ„" // "Preheat ABS" -#define MSG_PREHEAT_2_N MSG_PREHEAT_2 " " -#define MSG_PREHEAT_2_ALL "ABS スベテヨãƒãƒ„" // " All" -#define MSG_PREHEAT_2_BEDONLY "ABS ベッドヨãƒãƒ„" // " Bed" -#define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 "セッテイ" // " conf" -#define MSG_COOLDOWN "ã‚«ãƒãƒ„テイシ" // "Cooldown" -#define MSG_SWITCH_PS_ON "デンゲン オン" // "Switch power on" -#define MSG_SWITCH_PS_OFF "デンゲン オフ" // "Switch power off" -#define MSG_EXTRUDE "オシダシ" // "Extrude" -#define MSG_RETRACT "ヒキコミセッテイ" // "Retract" -#define MSG_MOVE_AXIS "ジクイドウ" // "Move axis" -#define MSG_LEVEL_BED "ベッドレベリング" // "Level bed" -#define MSG_MOVE_X "Xジク イドウ" // "Move X" -#define MSG_MOVE_Y "Yジク イドウ" // "Move Y" -#define MSG_MOVE_Z "Zジク イドウ" // "Move Z" -#define MSG_MOVE_E "エクストルーダー" // "Extruder" -#define MSG_MOVE_01MM "0.1mm イドウ" // "Move 0.1mm" -#define MSG_MOVE_1MM " 1mm イドウ" // "Move 1mm" -#define MSG_MOVE_10MM " 10mm イドウ" // "Move 10mm" -#define MSG_SPEED "ソクド" // "Speed" -#define MSG_BED_Z "Zオフセット" // "Bed Z" -#define MSG_NOZZLE "ノズル" // "Nozzle" -#define MSG_BED "ベッド" // "Bed" -#define MSG_FAN_SPEED "ファンソクド" // "Fan speed" -#define MSG_FLOW "トシュツリョウ" // "Flow" -#define MSG_CONTROL "セイギョ" // "Control" -#define MSG_MIN LCD_STR_THERMOMETER " サイテイ" // " Min" -#define MSG_MAX LCD_STR_THERMOMETER " サイコウ" // " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " ファクター" // " Fact" -#define MSG_AUTOTEMP "ジドウオンドセイギョ" // "Autotemp" -#define MSG_ON "オン " // "On " -#define MSG_OFF "オフ " // "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_SELECT "センタク" // "Select" -#define MSG_ACC "カソクド mm/s2" // "Accel" -#define MSG_VXY_JERK "XYジク ヤクド mm/s" // "Vxy-jerk" -#define MSG_VZ_JERK "Zジク ヤクド mm/s" // "Vz-jerk" -#define MSG_VE_JERK "エクストルーダー ヤクド" // "Ve-jerk" -#define MSG_VMAX "サイダイオクリソクド " // "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "サイショウオクリソクド" // "Vmin" -#define MSG_VTRAV_MIN "サイショウイドウソクド" // "VTrav min" -#define MSG_AMAX "サイダイカソクド " // "Amax " -#define MSG_A_RETRACT "ヒキコミカソクド" // "A-retract" -#define MSG_A_TRAVEL "イドウカソクド" // "A-travel" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "オンド" // "Temperature" -#define MSG_MOTION "ウゴキセッテイ" // "Motion" -#define MSG_VOLUMETRIC "フィラメント" // "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "フィラメントãƒãƒ§ãƒƒã‚±ã‚¤" // "Fil. Dia." -#define MSG_CONTRAST "LCDコントラスト" // "LCD contrast" -#define MSG_STORE_EPROM "メモリヘカクノウ" // "Store memory" -#define MSG_LOAD_EPROM "メモリカラヨミコミ" // "Load memory" -#define MSG_RESTORE_FAILSAFE "セッテイリセット" // "Restore failsafe" -#define MSG_REFRESH "リフレッシュ" // "Refresh" -#define MSG_WATCH "ジョウホウガメン" // "Info screen" -#define MSG_PREPARE "ジュンビセッテイ" // "Prepare" -#define MSG_TUNE "ãƒãƒ§ã‚¦ã‚»ã‚¤" // "Tune" -#define MSG_PAUSE_PRINT "イãƒã‚¸ãƒ†ã‚¤ã‚·" // "Pause print" -#define MSG_RESUME_PRINT "プリントサイカイ" // "Resume print" -#define MSG_STOP_PRINT "プリントテイシ" // "Stop print" -#define MSG_CARD_MENU "SDカードカラプリント" // "Print from SD" -#define MSG_NO_CARD "SDカードガアリマセン" // "No SD card" -#define MSG_DWELL "キュウシ" // "Sleep..." -#define MSG_USERWAIT "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "Wait for user..." -#define MSG_RESUMING "プリントサイカイ" // "Resuming print" -#define MSG_PRINT_ABORTED "プリントガãƒãƒ¥ã‚¦ã‚·ã‚µãƒ¬ãƒžã‚·ã‚¿" // "Print aborted" -#define MSG_NO_MOVE "ウゴキマセン" // "No move." -#define MSG_KILLED "ヒジョウテイシ" // "KILLED. " -#define MSG_STOPPED "テイシシマシタ" // "STOPPED. " -#define MSG_CONTROL_RETRACT "ヒキコミリョウ mm" // "Retract mm" -#define MSG_CONTROL_RETRACT_SWAP "ヒキコミリョウS mm" // "Swap Re.mm" -#define MSG_CONTROL_RETRACTF "ヒキコミソクド mm/s" // "Retract V" -#define MSG_CONTROL_RETRACT_ZLIFT "ノズルタイヒ mm" // "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "ホショウリョウ mm" // "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "ホショウリョウS mm" // "S UnRet+mm" -#define MSG_CONTROL_RETRACT_RECOVERF "ホショウソクド mm/s" // "UnRet V" -#define MSG_AUTORETRACT "ジドウヒキコミ" // "AutoRetr." -#define MSG_FILAMENTCHANGE "フィラメントコウカン" // "Change filament" -#define MSG_INIT_SDCARD "SDカードサイヨミコミ" // "Init. SD card" -#define MSG_CNG_SDCARD "SDカードコウカン" // "Change SD card" -#define MSG_ZPROBE_OUT "Zプローブ ベッドガイ" // "Z probe out. bed" -#define MSG_HOME "サキニ" // "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "ヲフッキサセテクダサイ" // "first" -#define MSG_ZPROBE_ZOFFSET "Zオフセット" // "Z Offset" -#define MSG_BABYSTEP_X "Xジク ビドウ" // "Babystep X" -#define MSG_BABYSTEP_Y "Yジク ビドウ" // "Babystep Y" -#define MSG_BABYSTEP_Z "Zジク ビドウ" // "Babystep Z" -#define MSG_ENDSTOP_ABORT "イドウゲンカイケンãƒã‚­ãƒŽã‚¦" // "Endstop abort" -#define MSG_HEATING_FAILED_LCD "ã‚«ãƒãƒ„シッパイ" // "Heating failed" -#define MSG_ERR_REDUNDANT_TEMP "エラー:ジョウãƒãƒ§ã‚¦ã‚µãƒ¼ãƒŸã‚¹ã‚¿ãƒ¼ã‚­ãƒŽã‚¦" // "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "ãƒãƒ„ボウソウ" // "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "エラー:サイコウオンãƒãƒ§ã‚¦ã‚«" // "Err: MAXTEMP" -#define MSG_ERR_MINTEMP "エラー:サイテイオンミマン" // "Err: MINTEMP" -#define MSG_ERR_MAXTEMP_BED "エラー:ベッド サイコウオンãƒãƒ§ã‚¦ã‚«" // "Err: MAXTEMP BED" -#define MSG_ERR_MINTEMP_BED "エラー:ベッド サイテイオンミマン" // "Err: MINTEMP BED" -#define MSG_HALTED "プリンターãƒãƒ†ã‚¤ã‚·ã‚·ãƒžã‚·ã‚¿" // "PRINTER HALTED" -#define MSG_PLEASE_RESET "リセットシテクダサイ" // "Please reset" -#define MSG_SHORT_DAY "d" // One character only -#define MSG_SHORT_HOUR "h" // One character only -#define MSG_SHORT_MINUTE "m" // One character only -#define MSG_HEATING "ã‚«ãƒãƒ„ãƒãƒ¥ã‚¦" // "Heating..." -#define MSG_HEATING_COMPLETE "ã‚«ãƒãƒ„カンリョウ" // "Heating done." -#define MSG_BED_HEATING "ベッド ã‚«ãƒãƒ„ãƒãƒ¥ã‚¦" // "Bed Heating." -#define MSG_BED_DONE "ベッド ã‚«ãƒãƒ„カンリョウ" // "Bed done." -#define MSG_DELTA_CALIBRATE "デルタ コウセイ" // "Delta Calibration" -#define MSG_DELTA_CALIBRATE_X "Xジク コウセイ" // "Calibrate X" -#define MSG_DELTA_CALIBRATE_Y "Yジク コウセイ" // "Calibrate Y" -#define MSG_DELTA_CALIBRATE_Z "Zジク コウセイ" // "Calibrate Z" -#define MSG_DELTA_CALIBRATE_CENTER "ãƒãƒ¥ã‚¦ã‚·ãƒ³ コウセイ" // "Calibrate Center" -#define MSG_INFO_MENU "コノプリンターニツイテ" // "About Printer" -#define MSG_INFO_PRINTER_MENU "プリンタージョウホウ" // "Printer Info" -#define MSG_INFO_STATS_MENU "プリントジョウキョウ" // "Printer Stats" -#define MSG_INFO_BOARD_MENU "セイギョケイジョウホウ" // "Board Info" -#define MSG_INFO_THERMISTOR_MENU "サーミスター" // "Thermistors" -#define MSG_INFO_EXTRUDERS "エクストルーダースウ" // "Extruders" -#define MSG_INFO_BAUDRATE "ボーレート" // "Baud" -#define MSG_INFO_PROTOCOL "プロトコル" // "Protocol" -#define MSG_INFO_PRINT_COUNT "プリントスウ " // "Print Count" -#define MSG_INFO_COMPLETED_PRINTS "カンリョウスウ" // "Completed" -#define MSG_INFO_PRINT_TIME "プリントジカンルイケイ" // "Total print time" -#define MSG_INFO_PRINT_LONGEST "サイãƒãƒ§ã‚¦ãƒ—リントジカン" // "Longest job time" -#define MSG_INFO_PRINT_FILAMENT "フィラメントシヨウリョウルイケイ" // "Extruded total" -#define MSG_INFO_MIN_TEMP "セッテイサイテイオン" // "Min Temp" -#define MSG_INFO_MAX_TEMP "セッテイサイコウオン" // "Max Temp" -#define MSG_INFO_PSU "デンゲンシュベツ" // "Power Supply" -#define MSG_FILAMENT_CHANGE_HEADER "フィラメントコウカン" // "CHANGE FILAMENT" -#define MSG_FILAMENT_CHANGE_OPTION_HEADER "ドウサヲセンタクシテクダサイ" // "CHANGE OPTIONS:" -#define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE "サラニオシダス" // "Extrude more" -#define MSG_FILAMENT_CHANGE_OPTION_RESUME "プリントサイカイ" // "Resume print" -#define MSG_FILAMENT_CHANGE_INIT_1 "コウカンヲカイシシマス" // "Wait for start" -#define MSG_FILAMENT_CHANGE_INIT_2 "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "of the filament" -#define MSG_FILAMENT_CHANGE_INIT_3 "" // "change" -#define MSG_FILAMENT_CHANGE_UNLOAD_1 "フィラメントヌキダシãƒãƒ¥ã‚¦" // "Wait for" -#define MSG_FILAMENT_CHANGE_UNLOAD_2 "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "filament unload" -#define MSG_FILAMENT_CHANGE_UNLOAD_3 "" -#define MSG_FILAMENT_CHANGE_INSERT_1 "フィラメントヲソウニュウシ," // "Insert filament" -#define MSG_FILAMENT_CHANGE_INSERT_2 "クリックスルトゾッコウシマス" // "and press button" -#define MSG_FILAMENT_CHANGE_INSERT_3 "" // "to continue..." -#define MSG_FILAMENT_CHANGE_LOAD_1 "フィラメントソウテンãƒãƒ¥ã‚¦" // "Wait for" -#define MSG_FILAMENT_CHANGE_LOAD_2 "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "filament load" -#define MSG_FILAMENT_CHANGE_LOAD_3 "" -#define MSG_FILAMENT_CHANGE_EXTRUDE_1 "フィラメントオシダシãƒãƒ¥ã‚¦" // "Wait for" -#define MSG_FILAMENT_CHANGE_EXTRUDE_2 "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "filament extrude" -#define MSG_FILAMENT_CHANGE_EXTRUDE_3 "" -#define MSG_FILAMENT_CHANGE_RESUME_1 "プリントヲサイカイシマス" // "Wait for print" -#define MSG_FILAMENT_CHANGE_RESUME_2 "ã‚·ãƒãƒ©ã‚¯ã‚ªãƒžãƒã‚¯ãƒ€ã‚µã‚¤" // "to resume" -#define MSG_FILAMENT_CHANGE_RESUME_3 "" - -#endif // LANGUAGE_KANA_UTF_H diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h deleted file mode 100644 index 5f682bd..0000000 --- a/Marlin/language_nl.h +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Dutch - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_NL_H -#define LANGUAGE_NL_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " gereed." -#define MSG_SD_INSERTED "Kaart ingestoken" -#define MSG_SD_REMOVED "Kaart verwijderd" -#define MSG_MAIN "Hoofdmenu" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Motoren uit" -#define MSG_AUTO_HOME "Auto home" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Klik voor begin" -#define MSG_LEVEL_BED_DONE "Bed level kompl." -#define MSG_LEVEL_BED_CANCEL "Bed level afbr." -#define MSG_SET_HOME_OFFSETS "Zet home offsets" -#define MSG_HOME_OFFSETS_APPLIED "H offset toegep." -#define MSG_SET_ORIGIN "Nulpunt instellen" -#define MSG_PREHEAT_1 "PLA voorverwarmen" -#define MSG_PREHEAT_1_N "PLA voorverw. " -#define MSG_PREHEAT_1_ALL "PLA voorverw. aan" -#define MSG_PREHEAT_1_BEDONLY "PLA voorverw. Bed" -#define MSG_PREHEAT_1_SETTINGS "PLA verw. conf" -#define MSG_PREHEAT_2 "ABS voorverwarmen" -#define MSG_PREHEAT_2_N "ABS voorverw. " -#define MSG_PREHEAT_2_ALL "ABS voorverw. aan" -#define MSG_PREHEAT_2_BEDONLY "ABS voorverw. Bed" -#define MSG_PREHEAT_2_SETTINGS "ABS verw. conf" -#define MSG_COOLDOWN "Afkoelen" -#define MSG_SWITCH_PS_ON "Stroom aan" -#define MSG_SWITCH_PS_OFF "Stroom uit" -#define MSG_EXTRUDE "Extrude" -#define MSG_RETRACT "Retract" -#define MSG_MOVE_AXIS "As verplaatsen" -#define MSG_MOVE_X "Verplaats X" -#define MSG_MOVE_Y "Verplaats Y" -#define MSG_MOVE_Z "Verplaats Z" -#define MSG_MOVE_E "Extruder" -#define MSG_MOVE_01MM "Verplaats 0.1mm" -#define MSG_MOVE_1MM "Verplaats 1mm" -#define MSG_MOVE_10MM "Verplaats 10mm" -#define MSG_SPEED "Snelheid" -#define MSG_BED_Z "Bed Z" -#define MSG_NOZZLE "Nozzle" -#define MSG_BED "Bed" -#define MSG_FAN_SPEED "Fan snelheid" -#define MSG_FLOW "Flow" -#define MSG_CONTROL "Control" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Autotemp" -#define MSG_ON "Aan " -#define MSG_OFF "Uit" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Versn" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retract" -#define MSG_A_TRAVEL "A-travel" -#define MSG_XSTEPS "Xsteps/mm" -#define MSG_YSTEPS "Ysteps/mm" -#define MSG_ZSTEPS "Zsteps/mm" -#define MSG_ESTEPS "Esteps/mm" -#define MSG_TEMPERATURE "Temperatuur" -#define MSG_MOTION "Beweging" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" -#define MSG_FILAMENT_DIAM "Fil. Dia." -#define MSG_CONTRAST "LCD contrast" -#define MSG_STORE_EPROM "Geheugen opslaan" -#define MSG_LOAD_EPROM "Geheugen laden" -#define MSG_RESTORE_FAILSAFE "Noodstop reset" -#define MSG_REFRESH "Ververs" -#define MSG_WATCH "Info scherm" -#define MSG_PREPARE "Voorbereiden" -#define MSG_TUNE "Afstellen" -#define MSG_PAUSE_PRINT "Print pauzeren" -#define MSG_RESUME_PRINT "Print hervatten" -#define MSG_STOP_PRINT "Print stoppen" -#define MSG_CARD_MENU "Print van SD" -#define MSG_NO_CARD "Geen SD kaart" -#define MSG_DWELL "Slapen..." -#define MSG_USERWAIT "Wachten..." -#define MSG_RESUMING "Print hervatten" -#define MSG_PRINT_ABORTED "Print afgebroken" -#define MSG_NO_MOVE "Geen beweging." -#define MSG_KILLED "Afgebroken. " -#define MSG_STOPPED "Gestopt. " -#define MSG_CONTROL_RETRACT "Retract mm" -#define MSG_CONTROL_RETRACT_SWAP "Ruil Retract mm" -#define MSG_CONTROL_RETRACTF "Retract F" -#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" -#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Ruil UnRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" -#define MSG_AUTORETRACT "AutoRetr." -#define MSG_FILAMENTCHANGE "Verv. Filament" -#define MSG_INIT_SDCARD "Init. SD kaart" -#define MSG_CNG_SDCARD "Verv. SD Kaart" -#define MSG_ZPROBE_OUT "Z probe uit. bed" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Z Offset" -#define MSG_BABYSTEP_X "Babystap X" -#define MSG_BABYSTEP_Y "Babystap Y" -#define MSG_BABYSTEP_Z "Babystap Z" -#define MSG_ENDSTOP_ABORT "Endstop afbr." -#define MSG_HEATING_FAILED_LCD "voorverw. fout" -#define MSG_ERR_REDUNDANT_TEMP "Redun. temp fout" -#define MSG_THERMAL_RUNAWAY "Therm. wegloop" -#define MSG_ERR_MAXTEMP "Err: Max. temp" -#define MSG_ERR_MINTEMP "Err: Min. temp" -#define MSG_ERR_MAXTEMP_BED "Err: Max.tmp bed" -#define MSG_ERR_MINTEMP_BED "Err: Min.tmp bed" -#define MSG_HEATING "Voorwarmen..." -#define MSG_HEATING_COMPLETE "Voorverw. kompl." -#define MSG_BED_HEATING "Bed voorverw." -#define MSG_BED_DONE "Bed is voorverw." -#define MSG_DELTA_CALIBRATE "Delta Calibratie" -#define MSG_DELTA_CALIBRATE_X "Kalibreer X" -#define MSG_DELTA_CALIBRATE_Y "Kalibreer Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibreer Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibreer Midden" - -#endif // LANGUAGE_NL_H diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h deleted file mode 100644 index b1559c4..0000000 --- a/Marlin/language_pl.h +++ /dev/null @@ -1,193 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Polish - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_PL_H -#define LANGUAGE_PL_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " gotowy." -#define MSG_SD_INSERTED "Karta wlozona" -#define MSG_SD_REMOVED "Karta usunieta" -#define MSG_LCD_ENDSTOPS "Krancow." // Max length 8 characters -#define MSG_MAIN "Menu glowne" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Wylacz silniki" -#define MSG_AUTO_HOME "Auto. poz. zerowa" -#define MSG_LEVEL_BED_HOMING "Pozycja zerowa" -#define MSG_LEVEL_BED_WAITING "Kliknij by rozp." -#define MSG_LEVEL_BED_NEXT_POINT "Nastepny punkt" -#define MSG_LEVEL_BED_DONE "Wypoziomowano!" -#define MSG_LEVEL_BED_CANCEL "Anuluj" -#define MSG_SET_HOME_OFFSETS "Ust. poz. zer." -#define MSG_HOME_OFFSETS_APPLIED "Poz. zerowa ust." -#define MSG_SET_ORIGIN "Ustaw punkt zero" -#define MSG_PREHEAT_1 "Rozgrzej PLA" -#define MSG_PREHEAT_1_N "Rozgrzej PLA " -#define MSG_PREHEAT_1_ALL "Roz. PLA Wszystko" -#define MSG_PREHEAT_1_BEDONLY "Rozgrzej PLA Loze" -#define MSG_PREHEAT_1_SETTINGS "Ustaw. rozg. PLA" -#define MSG_PREHEAT_2 "Rozgrzej ABS" -#define MSG_PREHEAT_2_N "Rozgrzej ABS " -#define MSG_PREHEAT_2_ALL "Roz. ABS Wszystko" -#define MSG_PREHEAT_2_BEDONLY "Rozgrzej ABS Loze" -#define MSG_PREHEAT_2_SETTINGS "Ustaw. rozg. ABS" -#define MSG_H1 "1" -#define MSG_H2 "2" -#define MSG_H3 "3" -#define MSG_H4 "4" -#define MSG_COOLDOWN "Chlodzenie" -#define MSG_SWITCH_PS_ON "Wlacz zasilacz" -#define MSG_SWITCH_PS_OFF "Wylacz zasilacz" -#define MSG_EXTRUDE "Ekstruzja" -#define MSG_RETRACT "Wycofanie" -#define MSG_MOVE_AXIS "Ruch osi" -#define MSG_LEVEL_BED "Poziom. loza" -#define MSG_MOVE_X "Przesun w X" -#define MSG_MOVE_Y "Przesun w Y" -#define MSG_MOVE_Z "Przesun w Z" -#define MSG_MOVE_E "Ekstruzja (os E)" -#define MSG_MOVE_E1 "1" -#define MSG_MOVE_E2 "2" -#define MSG_MOVE_E3 "3" -#define MSG_MOVE_E4 "4" -#define MSG_MOVE_01MM "Przesuwaj co .1mm" -#define MSG_MOVE_1MM "Przesuwaj co 1mm" -#define MSG_MOVE_10MM "Przesuwaj co 10mm" -#define MSG_SPEED "Predkosc" -#define MSG_BED_Z "Loze Z" -#define MSG_NOZZLE "Dysza" -#define MSG_N1 " 1" -#define MSG_N2 " 2" -#define MSG_N3 " 3" -#define MSG_N4 " 4" -#define MSG_BED "Loze" -#define MSG_FAN_SPEED "Obroty wiatraka" -#define MSG_FLOW "Przeplyw" -#define MSG_CONTROL "Ustawienia" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Mnoznik" -#define MSG_AUTOTEMP "Auto. temperatura" -#define MSG_ON "Wl. " -#define MSG_OFF "Wyl." -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 " E1" -#define MSG_E2 " E2" -#define MSG_E3 " E3" -#define MSG_E4 " E4" -#define MSG_ACC "Przyspieszenie" -#define MSG_VXY_JERK "Zryw Vxy" -#define MSG_VZ_JERK "Zryw Vz" -#define MSG_VE_JERK "Zryw Ve" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "Vskok min" -#define MSG_AMAX "Amax" -#define MSG_A_RETRACT "A-wycofanie" -#define MSG_A_TRAVEL "A-przesun." -#define MSG_XSTEPS "krokiX/mm" -#define MSG_YSTEPS "krokiY/mm" -#define MSG_ZSTEPS "krokiZ/mm" -#define MSG_ESTEPS "krokiE/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Ruch" -#define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E w mm3" -#define MSG_FILAMENT_DIAM "Åšr. fil." -#define MSG_DIAM_E1 " 1" -#define MSG_DIAM_E2 " 2" -#define MSG_DIAM_E3 " 3" -#define MSG_DIAM_E4 " 4" -#define MSG_CONTRAST "Kontrast LCD" -#define MSG_STORE_EPROM "Zapisz w pamieci" -#define MSG_LOAD_EPROM "Wczytaj z pamieci" -#define MSG_RESTORE_FAILSAFE "Ustaw. fabryczne" -#define MSG_REFRESH "Odswiez" -#define MSG_WATCH "Ekran glowny" -#define MSG_PREPARE "Przygotuj" -#define MSG_TUNE "Strojenie" -#define MSG_PAUSE_PRINT "Pauza" -#define MSG_RESUME_PRINT "Wznowienie" -#define MSG_STOP_PRINT "Stop" -#define MSG_CARD_MENU "Menu karty SD" -#define MSG_NO_CARD "Brak karty" -#define MSG_DWELL "Uspij..." -#define MSG_USERWAIT "Oczekiwanie..." -#define MSG_RESUMING "Wznawianie druku" -#define MSG_PRINT_ABORTED "Druk przerwany" -#define MSG_NO_MOVE "Brak ruchu" -#define MSG_KILLED "Ubity. " -#define MSG_STOPPED "Zatrzymany. " -#define MSG_CONTROL_RETRACT "Wycofaj mm" -#define MSG_CONTROL_RETRACT_SWAP "Z Wycof. mm" -#define MSG_CONTROL_RETRACTF "Wycofaj V" -#define MSG_CONTROL_RETRACT_ZLIFT "Skok Z mm" -#define MSG_CONTROL_RETRACT_RECOVER "Cof. wycof. +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Z Cof. wyc. +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Cof. wycof. V" -#define MSG_AUTORETRACT "Auto. wycofanie" -#define MSG_FILAMENTCHANGE "Zmien filament" -#define MSG_INIT_SDCARD "Inicjal. karty SD" -#define MSG_CNG_SDCARD "Zmiana karty SD" -#define MSG_ZPROBE_OUT "Sonda Z za lozem" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Offset Z" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Blad krancowki" -#define MSG_HEATING_FAILED_LCD "Rozgrz. nieudane" -#define MSG_ERR_REDUNDANT_TEMP "Błąd temperatury" -#define MSG_THERMAL_RUNAWAY "Zanik temp." -#define MSG_ERR_MAXTEMP "Err: max. temp." -#define MSG_ERR_MINTEMP "Err: min. temp." -#define MSG_ERR_MAXTEMP_BED "Err: max. temp. loza" -#define MSG_ERR_MINTEMP_BED "Err: min. temp. loza" -#define MSG_HEATING "Rozgrzewanie..." -#define MSG_HEATING_COMPLETE "Rozgrzano" -#define MSG_BED_HEATING "Rozgrzewanie loza..." -#define MSG_BED_DONE "Rozgrzano loze" -#define MSG_DELTA_CALIBRATE "Kalibrowanie Delty" -#define MSG_DELTA_CALIBRATE_X "Kalibruj X" -#define MSG_DELTA_CALIBRATE_Y "Kalibruj Y" -#define MSG_DELTA_CALIBRATE_Z "Kalibruj Z" -#define MSG_DELTA_CALIBRATE_CENTER "Kalibruj Å›rodek" - -#endif // LANGUAGE_PL_H diff --git a/Marlin/language_pt-br.h b/Marlin/language_pt-br.h deleted file mode 100644 index 3db6e15..0000000 --- a/Marlin/language_pt-br.h +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Portuguese (Brazil) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_PT_BR_H -#define LANGUAGE_PT_BR_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "Cartao inserido" -#define MSG_SD_REMOVED "Cartao removido" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Desabi. motores" -#define MSG_AUTO_HOME "Ir para origen" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Ajustar Jogo" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Ajustar orig." -#define MSG_PREHEAT_1 "Pre-aquecer PLA" -#define MSG_PREHEAT_1_N "Pre-aquecer PLA" -#define MSG_PREHEAT_1_ALL "Pre-aq.Todo PLA" -#define MSG_PREHEAT_1_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_1_SETTINGS "Ajustar PLA" -#define MSG_PREHEAT_2 "Pre-aquecer ABS" -#define MSG_PREHEAT_2_N "Pre-aquecer ABS" -#define MSG_PREHEAT_2_ALL "Pre-aq.Todo ABS" -#define MSG_PREHEAT_2_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_2_SETTINGS "Ajustar ABS" -#define MSG_COOLDOWN "Esfriar" -#define MSG_SWITCH_PS_ON "Ligar" -#define MSG_SWITCH_PS_OFF "Desligar" -#define MSG_EXTRUDE "Extrudar" -#define MSG_RETRACT "Retrair" -#define MSG_MOVE_AXIS "Mover eixo" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Mover Extrusor" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Base Z" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Bocal" -#define MSG_BED LCD_STR_THERMOMETER " Base" -#define MSG_FAN_SPEED "Vel. Ventoinha" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Controle" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temp. Automatica" -#define MSG_ON "Ligado " -#define MSG_OFF "Desligado" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "jogo VXY" -#define MSG_VZ_JERK "jogo VZ" -#define MSG_VE_JERK "jogo VE" -#define MSG_VMAX " Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "Retrair A" -#define MSG_A_TRAVEL "A-movimento" -#define MSG_XSTEPS "Passo X/mm" -#define MSG_YSTEPS "Passo Y/mm" -#define MSG_ZSTEPS "Passo Z/mm" -#define MSG_ESTEPS "E/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "Extr. em mm3" -#define MSG_FILAMENT_DIAM "Diametro Fil." -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EPROM "Salvar" -#define MSG_LOAD_EPROM "Ler" -#define MSG_RESTORE_FAILSAFE "Rest. de emerg." -#define MSG_REFRESH LCD_STR_REFRESH " Restaurar" -#define MSG_WATCH "Monitorar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Afinar" -#define MSG_PAUSE_PRINT "Pausar impressao" -#define MSG_RESUME_PRINT "Resumir impressao" -#define MSG_STOP_PRINT "Parar impressao" -#define MSG_CARD_MENU "Imprimir do SD" -#define MSG_NO_CARD "Sem cartao SD" -#define MSG_DWELL "Repouso..." -#define MSG_USERWAIT "Esperando ordem" -#define MSG_RESUMING "Resumindo Impres." -#define MSG_PRINT_ABORTED "Impres. Abortada." -#define MSG_NO_MOVE "Sem movimento" -#define MSG_KILLED "PARADA DE EMERG." -#define MSG_STOPPED "PARADA. " -#define MSG_CONTROL_RETRACT "Retrair mm" -#define MSG_CONTROL_RETRACT_SWAP "Retrair Troca mm" -#define MSG_CONTROL_RETRACTF "Retrair V" -#define MSG_CONTROL_RETRACT_ZLIFT "Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER "Des Retrair +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Des RetTroca +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Des Retrair V" -#define MSG_AUTORETRACT "Retracao Autom." -#define MSG_FILAMENTCHANGE "Trocar Filamento" -#define MSG_INIT_SDCARD "Iniciar SD" -#define MSG_CNG_SDCARD "Trocar SD" -#define MSG_ZPROBE_OUT "Son. fora da mesa" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Deslocamento no Z" -#define MSG_BABYSTEP_X "Passinho X" -#define MSG_BABYSTEP_Y "Passinho Y" -#define MSG_BABYSTEP_Z "Passinho Z" -#define MSG_ENDSTOP_ABORT "Fim de Curso" -#define MSG_HEATING_FAILED_LCD "Aquecimento falhou" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: T Maxima" -#define MSG_ERR_MINTEMP "Err: T Minima" -#define MSG_ERR_MAXTEMP_BED "Err: T Base Maxima" -#define MSG_ERR_MINTEMP_BED "Err: T Base Minima" -#define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." -#define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." -#define MSG_DELTA_CALIBRATE "Calibrar Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" - -#endif // LANGUAGE_PT_BR_H diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h deleted file mode 100644 index a556c24..0000000 --- a/Marlin/language_pt-br_utf8.h +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Portuguese (Brazil) - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_PT_BR_UTF_H -#define LANGUAGE_PT_BR_UTF_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "Cartão inserido" -#define MSG_SD_REMOVED "Cartão removido" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Desabi. motores" -#define MSG_AUTO_HOME "Ir para origen" -#define MSG_LEVEL_BED_HOMING "Indo para origem" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Ajustar Jogo" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Ajustar orig." -#define MSG_PREHEAT_1 "Pre-aquecer PLA" -#define MSG_PREHEAT_1_N "Pre-aquecer PLA" -#define MSG_PREHEAT_1_ALL "Pre-aq.Todo PLA" -#define MSG_PREHEAT_1_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_1_SETTINGS "Ajustar PLA" -#define MSG_PREHEAT_2 "Pre-aquecer ABS" -#define MSG_PREHEAT_2_N "Pre-aquecer ABS" -#define MSG_PREHEAT_2_ALL "Pre-aq.Todo ABS" -#define MSG_PREHEAT_2_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_2_SETTINGS "Ajustar ABS" -#define MSG_COOLDOWN "Esfriar" -#define MSG_SWITCH_PS_ON "Ligar" -#define MSG_SWITCH_PS_OFF "Desligar" -#define MSG_EXTRUDE "Extrudar" -#define MSG_RETRACT "Retrair" -#define MSG_MOVE_AXIS "Mover eixo" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Mover Extrusor" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Base Z" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Bocal" -#define MSG_BED LCD_STR_THERMOMETER " Base" -#define MSG_FAN_SPEED "Vel. Ventoinha" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Controle" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temp. Automática" -#define MSG_ON "Ligado " -#define MSG_OFF "Desligado" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "jogo VXY" -#define MSG_VZ_JERK "jogo VZ" -#define MSG_VE_JERK "jogo VE" -#define MSG_VMAX " Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "Retrair A" -#define MSG_A_TRAVEL "A-movimento" -#define MSG_XSTEPS "Passo X/mm" -#define MSG_YSTEPS "Passo Y/mm" -#define MSG_ZSTEPS "Passo Z/mm" -#define MSG_ESTEPS "E/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "Extr. em mm3" -#define MSG_FILAMENT_DIAM "Diametro Fil." -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EPROM "Salvar" -#define MSG_LOAD_EPROM "Ler" -#define MSG_RESTORE_FAILSAFE "Rest. de emerg." -#define MSG_REFRESH LCD_STR_REFRESH " Restaurar" -#define MSG_WATCH "Monitorar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Afinar" -#define MSG_PAUSE_PRINT "Pausar impressão" -#define MSG_RESUME_PRINT "Resumir impressão" -#define MSG_STOP_PRINT "Parar impressão" -#define MSG_CARD_MENU "Imprimir do SD" -#define MSG_NO_CARD "Sem cartão SD" -#define MSG_DWELL "Repouso..." -#define MSG_USERWAIT "Esperando ordem" -#define MSG_RESUMING "Resumindo Impres." -#define MSG_PRINT_ABORTED "Impres. Abortada." -#define MSG_NO_MOVE "Sem movimento" -#define MSG_KILLED "PARADA DE EMERG." -#define MSG_STOPPED "PARADA. " -#define MSG_CONTROL_RETRACT "Retrair mm" -#define MSG_CONTROL_RETRACT_SWAP "Retrair Troca mm" -#define MSG_CONTROL_RETRACTF "Retrair V" -#define MSG_CONTROL_RETRACT_ZLIFT "Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER "Des Retrair +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Des RetTroca +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Des Retrair V" -#define MSG_AUTORETRACT "Retração Autom." -#define MSG_FILAMENTCHANGE "Trocar Filamento" -#define MSG_INIT_SDCARD "Iniciar SD" -#define MSG_CNG_SDCARD "Trocar SD" -#define MSG_ZPROBE_OUT "Son. fora da mesa" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Deslocamento no Z" -#define MSG_BABYSTEP_X "Passinho X" -#define MSG_BABYSTEP_Y "Passinho Y" -#define MSG_BABYSTEP_Z "Passinho Z" -#define MSG_ENDSTOP_ABORT "Fim de Curso" -#define MSG_HEATING_FAILED_LCD "Aquecimento falhou" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: T Máxima" -#define MSG_ERR_MINTEMP "Err: T Mínima" -#define MSG_ERR_MAXTEMP_BED "Err: T Base Máxima" -#define MSG_ERR_MINTEMP_BED "Err: T Base Mínima" -#define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." -#define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." -#define MSG_DELTA_CALIBRATE "Calibrar Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" - -#endif // LANGUAGE_PT_BR_UTF_H diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h deleted file mode 100644 index a0df879..0000000 --- a/Marlin/language_pt.h +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Portuguese - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_PT_H -#define LANGUAGE_PT_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "Cartao inserido" -#define MSG_SD_REMOVED "Cartao removido" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Desactivar motores" -#define MSG_AUTO_HOME "Ir para origem" -#define MSG_AUTO_HOME_X "Ir para origem X" -#define MSG_AUTO_HOME_Y "Ir para origem Y" -#define MSG_AUTO_HOME_Z "Ir para origem Z" -#define MSG_LEVEL_BED_HOMING "Indo para origem" -#define MSG_LEVEL_BED_WAITING "Click para iniciar" -#define MSG_LEVEL_BED_NEXT_POINT "Proximo ponto" -#define MSG_LEVEL_BED_DONE "Pronto !" -#define MSG_LEVEL_BED_CANCEL "Cancelar" -#define MSG_SET_HOME_OFFSETS "Definir desvio" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Definir origem" -#define MSG_PREHEAT_1 "Pre-aquecer PLA" -#define MSG_PREHEAT_1_N "Pre-aquecer PLA" -#define MSG_PREHEAT_1_ALL "Pre-aq. PLA Tudo" -#define MSG_PREHEAT_1_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_1_SETTINGS "Definicoes PLA" -#define MSG_PREHEAT_2 "Pre-aquecer ABS" -#define MSG_PREHEAT_2_N "Pre-aquecer ABS " -#define MSG_PREHEAT_2_ALL "Pre-aq. ABS Tudo" -#define MSG_PREHEAT_2_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_2_SETTINGS "Definicoes ABS" -#define MSG_COOLDOWN "Arrefecer" -#define MSG_SWITCH_PS_ON "Ligar" -#define MSG_SWITCH_PS_OFF "Desligar" -#define MSG_EXTRUDE "Extrudir" -#define MSG_RETRACT "Retrair" -#define MSG_MOVE_AXIS "Mover eixo" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Mover Extrusor" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Base Z" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Bico" -#define MSG_BED LCD_STR_THERMOMETER " Base" -#define MSG_FAN_SPEED "Vel. ventoinha" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Controlo" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temp. Automatica" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 "E1" -#define MSG_E2 "E2" -#define MSG_E3 "E3" -#define MSG_E4 "E4" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX " Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retraccao" -#define MSG_A_TRAVEL "A-movimento" -#define MSG_XSTEPS "X passo/mm" -#define MSG_YSTEPS "Y passo/mm" -#define MSG_ZSTEPS "Z passo/mm" -#define MSG_ESTEPS "E passo/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "E em mm3" -#define MSG_FILAMENT_DIAM "Fil. Diam." -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EPROM "Guardar na memoria" -#define MSG_LOAD_EPROM "Carregar da memoria" -#define MSG_RESTORE_FAILSAFE "Rest. de emergen." -#define MSG_REFRESH LCD_STR_REFRESH " Recarregar" -#define MSG_WATCH "Monitorizar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Afinar" -#define MSG_PAUSE_PRINT "Pausar impressao" -#define MSG_RESUME_PRINT "Retomar impressao" -#define MSG_STOP_PRINT "Parar impressao" -#define MSG_CARD_MENU "Imprimir do SD" -#define MSG_NO_CARD "Sem cartao SD" -#define MSG_DWELL "Em espera..." -#define MSG_USERWAIT "A espera de ordem" -#define MSG_RESUMING "Retomando impressao" -#define MSG_PRINT_ABORTED "Impressao cancelada" -#define MSG_NO_MOVE "Sem movimento" -#define MSG_KILLED "EMERGENCIA. " -#define MSG_STOPPED "PARADO. " -#define MSG_CONTROL_RETRACT " Retrair mm" -#define MSG_CONTROL_RETRACT_SWAP "Troca Retrair mm" -#define MSG_CONTROL_RETRACTF " Retrair V" -#define MSG_CONTROL_RETRACT_ZLIFT " Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Troca DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF " DesRet V" -#define MSG_AUTORETRACT " AutoRetr." -#define MSG_FILAMENTCHANGE "Trocar filamento" -#define MSG_INIT_SDCARD "Inici. cartao SD" -#define MSG_CNG_SDCARD "Trocar cartao SD" -#define MSG_ZPROBE_OUT "Sensor fora/base" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Desvio Z" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Fim de curso" -#define MSG_HEATING_FAILED_LCD "Aquecimento falhou" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: T Maxima" -#define MSG_ERR_MINTEMP "Err: T Minima" -#define MSG_ERR_MAXTEMP_BED "Err: T Base Maxima" -#define MSG_ERR_MINTEMP_BED "Err: T Base Minima" -#define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." -#define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." -#define MSG_DELTA_CALIBRATE "Calibracao Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" - -#define MSG_LCD_ENDSTOPS "Fim de curso" - -#endif // LANGUAGE_PT_H diff --git a/Marlin/language_pt_utf8.h b/Marlin/language_pt_utf8.h deleted file mode 100644 index 24ce828..0000000 --- a/Marlin/language_pt_utf8.h +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Portuguese - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_PT_UTF_H -#define LANGUAGE_PT_UTF_H - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_1 - -#define WELCOME_MSG MACHINE_NAME " pronto." -#define MSG_SD_INSERTED "Cartão inserido" -#define MSG_SD_REMOVED "Cartão removido" -#define MSG_MAIN "Menu principal" -#define MSG_AUTOSTART "Autostart" -#define MSG_DISABLE_STEPPERS "Desactivar motores" -#define MSG_AUTO_HOME "Ir para origem" -#define MSG_AUTO_HOME_X "Ir para origem X" -#define MSG_AUTO_HOME_Y "Ir para origem Y" -#define MSG_AUTO_HOME_Z "Ir para origem Z" -#define MSG_LEVEL_BED_HOMING "Indo para origem" -#define MSG_LEVEL_BED_WAITING "Click para iniciar" -#define MSG_LEVEL_BED_NEXT_POINT "Próximo ponto" -#define MSG_LEVEL_BED_DONE "Pronto !" -#define MSG_LEVEL_BED_CANCEL "Cancelar" -#define MSG_SET_HOME_OFFSETS "Definir desvio" -#define MSG_HOME_OFFSETS_APPLIED "Offsets aplicados" -#define MSG_SET_ORIGIN "Definir origem" -#define MSG_PREHEAT_1 "Pre-aquecer PLA" -#define MSG_PREHEAT_1_N "Pre-aquecer PLA" -#define MSG_PREHEAT_1_ALL "Pre-aq. PLA Tudo" -#define MSG_PREHEAT_1_BEDONLY "Pre-aq. PLA " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_1_SETTINGS "Definições PLA" -#define MSG_PREHEAT_2 "Pre-aquecer ABS" -#define MSG_PREHEAT_2_N "Pre-aquecer ABS " -#define MSG_PREHEAT_2_ALL "Pre-aq. ABS Tudo" -#define MSG_PREHEAT_2_BEDONLY "Pre-aq. ABS " LCD_STR_THERMOMETER "Base" -#define MSG_PREHEAT_2_SETTINGS "Definições ABS" -#define MSG_COOLDOWN "Arrefecer" -#define MSG_SWITCH_PS_ON "Ligar" -#define MSG_SWITCH_PS_OFF "Desligar" -#define MSG_EXTRUDE "Extrudir" -#define MSG_RETRACT "Retrair" -#define MSG_MOVE_AXIS "Mover eixo" -#define MSG_MOVE_X "Mover X" -#define MSG_MOVE_Y "Mover Y" -#define MSG_MOVE_Z "Mover Z" -#define MSG_MOVE_E "Mover Extrusor" -#define MSG_MOVE_01MM "Mover 0.1mm" -#define MSG_MOVE_1MM "Mover 1mm" -#define MSG_MOVE_10MM "Mover 10mm" -#define MSG_SPEED "Velocidade" -#define MSG_BED_Z "Base Z" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Bico" -#define MSG_BED LCD_STR_THERMOMETER " Base" -#define MSG_FAN_SPEED "Vel. ventoinha" -#define MSG_FLOW "Fluxo" -#define MSG_CONTROL "Controlo" -#define MSG_MIN LCD_STR_THERMOMETER " Min" -#define MSG_MAX LCD_STR_THERMOMETER " Max" -#define MSG_FACTOR LCD_STR_THERMOMETER " Fact" -#define MSG_AUTOTEMP "Temp. Automática" -#define MSG_ON "On " -#define MSG_OFF "Off" -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_E1 "E1" -#define MSG_E2 "E2" -#define MSG_E3 "E3" -#define MSG_E4 "E4" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX " Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax " -#define MSG_A_RETRACT "A-retracção" -#define MSG_A_TRAVEL "A-movimento" -#define MSG_XSTEPS "X passo/mm" -#define MSG_YSTEPS "Y passo/mm" -#define MSG_ZSTEPS "Z passo/mm" -#define MSG_ESTEPS "E passo/mm" -#define MSG_TEMPERATURE "Temperatura" -#define MSG_MOTION "Movimento" -#define MSG_VOLUMETRIC "Filamento" -#define MSG_VOLUMETRIC_ENABLED "E em mm3" -#define MSG_FILAMENT_DIAM "Fil. Diam." -#define MSG_CONTRAST "Contraste" -#define MSG_STORE_EPROM "Guardar na memoria" -#define MSG_LOAD_EPROM "Carregar da memoria" -#define MSG_RESTORE_FAILSAFE "Rest. de emergen." -#define MSG_REFRESH LCD_STR_REFRESH " Recarregar" -#define MSG_WATCH "Monitorizar" -#define MSG_PREPARE "Preparar" -#define MSG_TUNE "Afinar" -#define MSG_PAUSE_PRINT "Pausar impressão" -#define MSG_RESUME_PRINT "Retomar impressão" -#define MSG_STOP_PRINT "Parar impressão" -#define MSG_CARD_MENU "Imprimir do SD" -#define MSG_NO_CARD "Sem cartão SD" -#define MSG_DWELL "Em espera..." -#define MSG_USERWAIT "à espera de ordem" -#define MSG_RESUMING "Retomando impressão" -#define MSG_PRINT_ABORTED "Impressão cancelada" -#define MSG_NO_MOVE "Sem movimento" -#define MSG_KILLED "EMERGÊNCIA. " -#define MSG_STOPPED "PARADO. " -#define MSG_CONTROL_RETRACT " Retrair mm" -#define MSG_CONTROL_RETRACT_SWAP "Troca Retrair mm" -#define MSG_CONTROL_RETRACTF " Retrair V" -#define MSG_CONTROL_RETRACT_ZLIFT " Levantar mm" -#define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Troca DesRet +mm" -#define MSG_CONTROL_RETRACT_RECOVERF " DesRet V" -#define MSG_AUTORETRACT " AutoRetr." -#define MSG_FILAMENTCHANGE "Trocar filamento" -#define MSG_INIT_SDCARD "Inici. cartão SD" -#define MSG_CNG_SDCARD "Trocar cartão SD" -#define MSG_ZPROBE_OUT "Sensor fora/base" -#define MSG_HOME "Home" // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST -#define MSG_FIRST "first" -#define MSG_ZPROBE_ZOFFSET "Desvio Z" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Fim de curso" -#define MSG_HEATING_FAILED_LCD "Aquecimento falhou" -#define MSG_ERR_REDUNDANT_TEMP "Err: REDUNDANT TEMP" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Err: T Máxima" -#define MSG_ERR_MINTEMP "Err: T Mínima" -#define MSG_ERR_MAXTEMP_BED "Err: T Base Máxima" -#define MSG_ERR_MINTEMP_BED "Err: T Base Mínima" -#define MSG_HEATING "Aquecendo..." -#define MSG_HEATING_COMPLETE "Aquecida." -#define MSG_BED_HEATING "Aquecendo base.." -#define MSG_BED_DONE "Base aquecida." -#define MSG_DELTA_CALIBRATE "Calibração Delta" -#define MSG_DELTA_CALIBRATE_X "Calibrar X" -#define MSG_DELTA_CALIBRATE_Y "Calibrar Y" -#define MSG_DELTA_CALIBRATE_Z "Calibrar Z" -#define MSG_DELTA_CALIBRATE_CENTER "Calibrar Centro" - -#define MSG_LCD_ENDSTOPS "Fim de curso" - -#endif // LANGUAGE_PT_UTF_H diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h deleted file mode 100644 index aa381c8..0000000 --- a/Marlin/language_ru.h +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Russian - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_RU_H -#define LANGUAGE_RU_H - -#define MAPPER_D0D1 // For Cyrillic -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT -#define DISPLAY_CHARSET_ISO10646_5 - -#define WELCOME_MSG MACHINE_NAME " Готов." -#define MSG_SD_INSERTED "Карта вÑтавлена" -#define MSG_SD_REMOVED "Карта извлечена" -#define MSG_MAIN "Меню" -#define MSG_AUTOSTART "ÐвтоÑтарт" -#define MSG_DISABLE_STEPPERS "Выкл. двигатели" -#define MSG_AUTO_HOME "Парковка" -#define MSG_LEVEL_BED_HOMING "Homing XYZ" -#define MSG_LEVEL_BED_WAITING "Click to Begin" -#define MSG_LEVEL_BED_DONE "Leveling Done!" -#define MSG_LEVEL_BED_CANCEL "Cancel" -#define MSG_SET_HOME_OFFSETS "Запомнить парковку" -#define MSG_HOME_OFFSETS_APPLIED "Offsets applied" -#define MSG_SET_ORIGIN "Запомнить ноль" -#define MSG_PREHEAT_1 "Преднагрев PLA" -#define MSG_PREHEAT_1_N "Греть PLA Сопло " -#define MSG_PREHEAT_1_ALL "Греть PLA Ð’Ñе" -#define MSG_PREHEAT_1_BEDONLY "Греть PLA Стол" -#define MSG_PREHEAT_1_SETTINGS "ÐаÑтройки PLA" -#define MSG_PREHEAT_2 "Преднагрев ABS" -#define MSG_PREHEAT_2_N "Греть ABS Сопло " -#define MSG_PREHEAT_2_ALL "Греть ABS Ð’Ñе" -#define MSG_PREHEAT_2_BEDONLY "Греть ABS Стол" -#define MSG_PREHEAT_2_SETTINGS "ÐаÑтройки ABS" -#define MSG_COOLDOWN "Охлаждение" -#define MSG_SWITCH_PS_ON "Включить Питание" -#define MSG_SWITCH_PS_OFF "Отключить Питание" -#define MSG_EXTRUDE "ЭкÑтрузиÑ" -#define MSG_RETRACT "Ð’Ñ‚Ñгивание" -#define MSG_MOVE_AXIS "Движение по оÑÑм" -#define MSG_MOVE_X "Движение по X" -#define MSG_MOVE_Y "Движение по Y" -#define MSG_MOVE_Z "Движение по Z" -#define MSG_MOVE_E "ЭкÑтрудер" -#define MSG_MOVE_01MM "Движение XYZ 0.1mm" -#define MSG_MOVE_1MM "Движение XYZ 1mm" -#define MSG_MOVE_10MM "Движение XY 10mm" -#define MSG_LEVEL_BED "Калибровать Ñтол" -#define MSG_SPEED "СкороÑть" -#define MSG_NOZZLE LCD_STR_THERMOMETER " Сопло" -#define MSG_BED LCD_STR_THERMOMETER " Стол" -#define MSG_FAN_SPEED "Кулер" -#define MSG_FLOW "Поток" -#define MSG_CONTROL "ÐаÑтройки" -#define MSG_MIN LCD_STR_THERMOMETER " Минимум" -#define MSG_MAX LCD_STR_THERMOMETER " МакÑимум" -#define MSG_FACTOR LCD_STR_THERMOMETER " Фактор" -#define MSG_AUTOTEMP "Ðвтотемпература" -#define MSG_ON "Вкл. " -#define MSG_OFF "Откл. " -#define MSG_PID_P "PID-P" -#define MSG_PID_I "PID-I" -#define MSG_PID_D "PID-D" -#define MSG_PID_C "PID-C" -#define MSG_ACC "Acc" -#define MSG_VXY_JERK "Vxy-jerk" -#define MSG_VZ_JERK "Vz-jerk" -#define MSG_VE_JERK "Ve-jerk" -#define MSG_VMAX "Vmax " -#define MSG_X "X" -#define MSG_Y "Y" -#define MSG_Z "Z" -#define MSG_E "E" -#define MSG_VMIN "Vmin" -#define MSG_VTRAV_MIN "VTrav min" -#define MSG_AMAX "Amax" -#define MSG_A_RETRACT "A-втÑгивание" -#define MSG_XSTEPS "X шаг/мм" -#define MSG_YSTEPS "Y шаг/мм" -#define MSG_ZSTEPS "Z шаг/мм" -#define MSG_ESTEPS "E шаг/мм" -#define MSG_TEMPERATURE "Температура" -#define MSG_MOTION "Механика" -#define MSG_VOLUMETRIC "Пруток" -#define MSG_VOLUMETRIC_ENABLED "E в mm3" -#define MSG_FILAMENT_DIAM "Диаметр прутка" -#define MSG_CONTRAST "КонтраÑÑ‚ LCD" -#define MSG_STORE_EPROM "Сохранить в EEPROM" -#define MSG_LOAD_EPROM "Считать из EEPROM" -#define MSG_RESTORE_FAILSAFE "Ð¡Ð±Ñ€Ð¾Ñ EEPROM" -#define MSG_REFRESH "Обновить" -#define MSG_WATCH "Обзор" -#define MSG_PREPARE "ДейÑтвиÑ" -#define MSG_TUNE "ÐаÑтройки" -#define MSG_PAUSE_PRINT "Пауза печати" -#define MSG_RESUME_PRINT "Продолжить печать" -#define MSG_STOP_PRINT "ОÑтановить печать" -#define MSG_CARD_MENU "Обзор карты" -#define MSG_NO_CARD "Ðет карты" -#define MSG_DWELL "Сон..." -#define MSG_USERWAIT "Ожиданиие" -#define MSG_RESUMING "Возобновление..." -#define MSG_PRINT_ABORTED "Отмена печати" -#define MSG_NO_MOVE "Ðет движениÑ." -#define MSG_KILLED "УБИТО." -#define MSG_STOPPED "ОСТÐÐОВЛЕÐО." -#define MSG_CONTROL_RETRACT "Ð’Ñ‚Ñгивание mm" -#define MSG_CONTROL_RETRACT_SWAP "Ð’Ñ‚Ñг. Ñмены mm" -#define MSG_CONTROL_RETRACTF "Ð’Ñ‚Ñгивание V" -#define MSG_CONTROL_RETRACT_ZLIFT "Ð’Ñ‚Ñг. прыжка mm" -#define MSG_CONTROL_RETRACT_RECOVER "Возврат +mm" -#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Возврат Ñмены +mm" -#define MSG_CONTROL_RETRACT_RECOVERF "Возврат V" -#define MSG_AUTORETRACT "Ðвто Ð’Ñ‚Ñгивание" -#define MSG_FILAMENTCHANGE "Смена прутка" -#define MSG_INIT_SDCARD "Иниц. карту" -#define MSG_CNG_SDCARD "Сменить карту" -#define MSG_ZPROBE_OUT "Z датчик вне Ñтола" -#define MSG_YX_UNHOMED "Паркуй X/Y перед Z" -#define MSG_ZPROBE_ZOFFSET "Смещение Z" -#define MSG_BABYSTEP_X "Babystep X" -#define MSG_BABYSTEP_Y "Babystep Y" -#define MSG_BABYSTEP_Z "Babystep Z" -#define MSG_ENDSTOP_ABORT "Сработал концевик" -#define MSG_HEATING_FAILED_LCD "Разогрев не удалÑÑ" -#define MSG_ERR_REDUNDANT_TEMP "Ошибка:Слишком горÑчо" -#define MSG_THERMAL_RUNAWAY "THERMAL RUNAWAY" -#define MSG_ERR_MAXTEMP "Ошибка: Т макÑ." -#define MSG_ERR_MINTEMP "Ошибка: Т мин." -#define MSG_ERR_MAXTEMP_BED "Ошибка:Т макÑ.Ñтол" -#define MSG_ERR_MINTEMP_BED "Ошибка:Т мин.Ñтол" -#define MSG_HEATING "Ðагреваю Ñопло..." -#define MSG_HEATING_COMPLETE "Ðагрев выполнен" -#define MSG_BED_HEATING "Ðагреваю Ñтол" -#define MSG_BED_DONE "Стол разогрет" -#define MSG_DELTA_CALIBRATE "Калибровка Delta" -#define MSG_DELTA_CALIBRATE_X "Калибровать X" -#define MSG_DELTA_CALIBRATE_Y "Калибровать Y" -#define MSG_DELTA_CALIBRATE_Z "Калибровать Z" -#define MSG_DELTA_CALIBRATE_CENTER "Калибровать Center" - -#endif // LANGUAGE_RU_H diff --git a/Marlin/language_test.h b/Marlin/language_test.h deleted file mode 100644 index 99fa712..0000000 --- a/Marlin/language_test.h +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * TEST - * - * LCD Menu Messages - * See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language - * - */ -#ifndef LANGUAGE_TEST_H -#define LANGUAGE_TEST_H - -// Select ONE of the following Mappers. -// They decide what to do with a symbol in the area of [0x80:0xFF]. They take a symbol of this language file and make them point -// into an array with 128 cells, where they'll find the place of the symbol of the font in use. -// -// a.)For ASCII coded Language_xx.h files like (en) there are no occurrences of symbols above 0x7F so no mapper is needed. -// If such a symbol appears it is mapped directly into the font. This is the case for the language files we used until now, with all the STR_XX or -// "\xxx" symbols. All Symbols are only one byte long. -// b.) For Unicoded Language_xx.h files (currently ru, de and kana_utf8 ) the non ASCII [0x00-0x7F] symbols are represented by more than one byte. -// In the case of two bytes the first is pointing to a 'codepage' and the second to a place in the codepage. These codepages contain 64 symbols. -// So two of them can be mapped. For most of the European languages the necessary symbols are contained in the pages C2 and C3. Cyrillic uses D0 -// and D1. -// c.) For katakana (one of the Japanese symbol sets) Unicode uses 3 bytes. Here the second byte also points to a codepage and byte 3 to the symbol. -// I hope the pages E282 and E283 are sufficient to write katakana. -// Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not -// impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system). - -//#define MAPPER_C2C3 // For most European languages when language file is in utf8 -//#define MAPPER_D0D1 // For Cyrillic -//#define MAPPER_E382E383 // For Katakana -//#define MAPPER_NON // For direct ascii codes. Fall back mapper - if no other is defined. - -// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h -//#define SIMULATE_ROMFONT - -// Select the better font for full graphic displays. -//#define DISPLAY_CHARSET_ISO10646_1 -//#define DISPLAY_CHARSET_ISO10646_5 -//#define DISPLAY_CHARSET_ISO10646_GREEK -//#define DISPLAY_CHARSET_ISO10646_KANA - - - -// next 5 lines select variants in this file only -#define DISPLAYTEST -//#define WEST -//#define CYRIL -//#define KANA - - -// TESTSTRINGS - -#define STRG_ASCII_2 " !\"#$%&'()*+,-./" -#define STRG_ASCII_3 "0123456789:;<=>?" -#define STRG_ASCII_4 "@ABCDEFGHIJKLMNO" -#define STRG_ASCII_5 "PQRSTUVWXYZ[\]^_" -#define STRG_ASCII_6 "`abcdefghijklmno" -#define STRG_ASCII_7 "pqrstuvwxyz{|}~" - -#define STRG_C2_8 "" -#define STRG_C2_9 "" -#define STRG_C2_a " ¡¢£¤¥¦§¨©ª«¬­®¯" -#define STRG_C2_b "°±²³´µ¶·¸¹º»¼½¾¿" -#define STRG_C3_8 "ÈÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃ" -#define STRG_C3_9 "ÃÑÒÓÔÕÖרÙÚÛÜÃÞß" -#define STRG_C3_a "àáâãäåæçèéêëìíîï" -#define STRG_C3_b "ðñòóôõö÷øùúûüýþÿ" - -#define STRG_D0_8 "ЀÐЂЃЄЅІЇЈЉЊЋЌÐÐŽÐ" -#define STRG_D0_9 "ÐБВГДЕЖЗИЙКЛМÐОП" -#define STRG_D0_a "РСТУФХЦЧШЩЪЫЬЭЮЯ" -#define STRG_D0_b "абвгдежзийклмноп" -#define STRG_D1_8 "Ñ€ÑтуфхцчшщъыьÑÑŽÑ" -#define STRG_D1_9 "ÑёђѓєѕіїјљњћќÑўџ" -#define STRG_D1_a "ѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯ" -#define STRG_D1_b "ѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿ" - -#define STRG_E382_8 "よã‚もゃやゅゆょよらりるれã‚ゎã‚" -#define STRG_E382_9 "ã‚ゑをんゔゕゖ゗゘゙゚゛ ゜ã‚ゞゟ" -#define STRG_E382_a "゠ァアィイゥウェエォオカガキギク" -#define STRG_E382_b "グケゲコゴサザシジスズセゼソゾタ" -#define STRG_E383_8 "トãƒãƒ‚ッツヅテデトドナニヌãƒãƒŽãƒ" -#define STRG_E383_9 "ãƒãƒ‘ヒビピフブプヘベペホボãƒãƒžãƒŸ" -#define STRG_E383_a "ムメモャヤュユョヨラリルレロヮワ" -#define STRG_E383_b "ヰヱヲンヴヵヶヷヸヹヺ・ーヽヾヿ" - -#define STRG_OKTAL_0 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" -#define STRG_OKTAL_1 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define STRG_OKTAL_2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057" -#define STRG_OKTAL_3 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077" -#define STRG_OKTAL_4 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117" -#define STRG_OKTAL_5 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137" -#define STRG_OKTAL_6 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157" -#define STRG_OKTAL_7 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177" -#define STRG_OKTAL_8 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217" -#define STRG_OKTAL_9 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237" -#define STRG_OKTAL_a "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" -#define STRG_OKTAL_b "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" -#define STRG_OKTAL_c "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" -#define STRG_OKTAL_d "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" -#define STRG_OKTAL_e "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" -#define STRG_OKTAL_f "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" - -#if ENABLED(DISPLAYTEST) - #define WELCOME_MSG "Language TEST" - - #define MSG_WATCH "Display test" - #define MSG_PREPARE STRG_OKTAL_b - #define MSG_CONTROL STRG_OKTAL_c -#endif - -#if ENABLED(WEST) - #define WELCOME_MSG "Language TEST" - - #define MSG_WATCH "\001\002\003\004\005\006\007\010\011" - #define MSG_PREPARE "UTF8" - #define MSG_CONTROL "ASCII" - - //#define MSG_MAIN ".." - #define MSG_DISABLE_STEPPERS STRG_C2_8 - #define MSG_AUTO_HOME STRG_C2_9 - #define MSG_SET_HOME_OFFSETS STRG_C2_a - #define MSG_PREHEAT_1 STRG_C2_b - #define MSG_PREHEAT_2 STRG_C3_8 - #define MSG_COOLDOWN STRG_C3_9 - #define MSG_SWITCH_PS_OFF STRG_C3_a - #define MSG_MOVE_AXIS STRG_C3_b - - #define MSG_MAIN STRG_OKTAL_2 - #define MSG_TEMPERATURE STRG_OKTAL_3 - #define MSG_MOTION STRG_OKTAL_4 - #define MSG_VOLUMETRIC STRG_OKTAL_5 - #define MSG_CONTRAST STRG_OKTAL_6 - #define MSG_RESTORE_FAILSAFE STRG_OKTAL_7 - - #define MSG_NOZZLE STRG_OKTAL_8 - #define MSG_FAN_SPEED STRG_OKTAL_9 - #define MSG_AUTOTEMP STRG_OKTAL_a - #define MSG_MIN STRG_OKTAL_b - #define MSG_MAX STRG_OKTAL_c - #define MSG_FACTOR STRG_OKTAL_d - #define MSG_PID_P STRG_OKTAL_e - #define MSG_PID_I STRG_OKTAL_f - -#endif - -#if ENABLED(CYRIL) - #define WELCOME_MSG "Language TEST" - - #define MSG_WATCH "\001\002\003\004\005\006\007\010\011" - #define MSG_PREPARE "UTF8" - #define MSG_CONTROL "ASCII" - - //#define MSG_MAIN ".." - #define MSG_DISABLE_STEPPERS STRG_D0_8 - #define MSG_AUTO_HOME STRG_D0_9 - #define MSG_SET_HOME_OFFSETS STRG_D0_a - #define MSG_PREHEAT_1 STRG_D0_b - #define MSG_PREHEAT_2 STRG_D1_8 - #define MSG_COOLDOWN STRG_D1_9 - #define MSG_SWITCH_PS_OFF STRG_D1_a - #define MSG_MOVE_AXIS STRG_D1_b - - #define MSG_MAIN STRG_OKTAL_2 - #define MSG_TEMPERATURE STRG_OKTAL_3 - #define MSG_MOTION STRG_OKTAL_4 - #define MSG_VOLUMETRIC STRG_OKTAL_5 - #define MSG_CONTRAST STRG_OKTAL_6 - #define MSG_RESTORE_FAILSAFE STRG_OKTAL_7 - - #define MSG_NOZZLE STRG_OKTAL_8 - #define MSG_FAN_SPEED STRG_OKTAL_9 - #define MSG_AUTOTEMP STRG_OKTAL_a - #define MSG_MIN STRG_OKTAL_b - #define MSG_MAX STRG_OKTAL_c - #define MSG_FACTOR STRG_OKTAL_d - #define MSG_PID_P STRG_OKTAL_e - #define MSG_PID_I STRG_OKTAL_f - -#endif - -#if ENABLED(KANA) - #define WELCOME_MSG "Language TEST" - - #define MSG_WATCH "\001\002\003\004\005\006\007\010\011" - #define MSG_PREPARE "UTF8" - #define MSG_CONTROL "ASCII" - - //#define MSG_MAIN ".." - #define MSG_DISABLE_STEPPERS STRG_E382_8 - #define MSG_AUTO_HOME STRG_E382_9 - #define MSG_SET_HOME_OFFSETS STRG_E382_a - #define MSG_PREHEAT_1 STRG_E382_b - #define MSG_PREHEAT_2 STRG_E383_8 - #define MSG_COOLDOWN STRG_E383_9 - #define MSG_SWITCH_PS_OFF STRG_E383_a - #define MSG_MOVE_AXIS STRG_E383_b - - #define MSG_MAIN STRG_OKTAL_2 - #define MSG_TEMPERATURE STRG_OKTAL_3 - #define MSG_MOTION STRG_OKTAL_4 - #define MSG_VOLUMETRIC STRG_OKTAL_5 - #define MSG_CONTRAST STRG_OKTAL_6 - #define MSG_RESTORE_FAILSAFE STRG_OKTAL_7 - - #define MSG_NOZZLE STRG_OKTAL_8 - #define MSG_FAN_SPEED STRG_OKTAL_9 - #define MSG_AUTOTEMP STRG_OKTAL_a - #define MSG_MIN STRG_OKTAL_b - #define MSG_MAX STRG_OKTAL_c - #define MSG_FACTOR STRG_OKTAL_d - #define MSG_PID_P STRG_OKTAL_e - #define MSG_PID_I STRG_OKTAL_f -#endif - -#endif // LANGUAGE_TEST_H diff --git a/Marlin/macros.h b/Marlin/macros.h deleted file mode 100644 index 5eec73e..0000000 --- a/Marlin/macros.h +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef MACROS_H -#define MACROS_H - -#define NUM_AXIS 4 - -#define FORCE_INLINE __attribute__((always_inline)) inline - -// Bracket code that shouldn't be interrupted -#ifndef CRITICAL_SECTION_START - #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli(); - #define CRITICAL_SECTION_END SREG = _sreg; -#endif - -// Remove compiler warning on an unused variable -#define UNUSED(x) (void) (x) - -// Macros to make a string from a macro -#define STRINGIFY_(M) #M -#define STRINGIFY(M) STRINGIFY_(M) - -// Macros for bit masks -#define TEST(n,b) (((n)&_BV(b))!=0) -#define SBI(n,b) (n |= _BV(b)) -#define CBI(n,b) (n &= ~_BV(b)) -#define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (_BV(b)) - -// Macros for maths shortcuts -#ifndef M_PI - #define M_PI 3.14159265358979323846 -#endif -#define RADIANS(d) ((d)*M_PI/180.0) -#define DEGREES(r) ((r)*180.0/M_PI) -#define HYPOT(x,y) sqrt(sq(x)+sq(y)) - -// Macros to contrain values -#define NOLESS(v,n) do{ if (v < n) v = n; }while(0) -#define NOMORE(v,n) do{ if (v > n) v = n; }while(0) - -// Macros to support option testing -#define _CAT(a, ...) a ## __VA_ARGS__ -#define SWITCH_ENABLED_false 0 -#define SWITCH_ENABLED_true 1 -#define SWITCH_ENABLED_0 0 -#define SWITCH_ENABLED_1 1 -#define SWITCH_ENABLED_ 1 -#define ENABLED(b) _CAT(SWITCH_ENABLED_, b) -#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b)) - -#define NUMERIC(a) ((a) >= '0' && '9' >= (a)) -#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-') -#define COUNT(a) (sizeof(a)/sizeof(*a)) - -// Macros for initializing arrays -#define ARRAY_6(v1, v2, v3, v4, v5, v6, args...) { v1, v2, v3, v4, v5, v6 } -#define ARRAY_5(v1, v2, v3, v4, v5, args...) { v1, v2, v3, v4, v5 } -#define ARRAY_4(v1, v2, v3, v4, args...) { v1, v2, v3, v4 } -#define ARRAY_3(v1, v2, v3, args...) { v1, v2, v3 } -#define ARRAY_2(v1, v2, args...) { v1, v2 } -#define ARRAY_1(v1, args...) { v1 } - -#define _ARRAY_N(N, args...) ARRAY_ ##N(args) -#define ARRAY_N(N, args...) _ARRAY_N(N, args) - -// Macros for adding -#define INC_0 1 -#define INC_1 2 -#define INC_2 3 -#define INC_3 4 -#define INC_4 5 -#define INC_5 6 -#define INC_6 7 -#define INC_7 8 -#define INC_8 9 -#define INCREMENT_(n) INC_ ##n -#define INCREMENT(n) INCREMENT_(n) - -// Macros for subtracting -#define DEC_1 0 -#define DEC_2 1 -#define DEC_3 2 -#define DEC_4 3 -#define DEC_5 4 -#define DEC_6 5 -#define DEC_7 6 -#define DEC_8 7 -#define DEC_9 8 -#define DECREMENT_(n) DEC_ ##n -#define DECREMENT(n) DECREMENT_(n) - -#define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0) - -#define PENDING(NOW,SOON) ((long)(NOW-(SOON))<0) -#define ELAPSED(NOW,SOON) (!PENDING(NOW,SOON)) - -#define NOOP do{} while(0) - -#define CEILING(x,y) (((x) + (y) - 1) / (y)) - -#endif //__MACROS_H diff --git a/Marlin/mesh_bed_leveling.cpp b/Marlin/mesh_bed_leveling.cpp deleted file mode 100644 index babad8a..0000000 --- a/Marlin/mesh_bed_leveling.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "mesh_bed_leveling.h" - -#if ENABLED(MESH_BED_LEVELING) - - mesh_bed_leveling mbl; - - mesh_bed_leveling::mesh_bed_leveling() { reset(); } - - void mesh_bed_leveling::reset() { - status = MBL_STATUS_NONE; - z_offset = 0; - memset(z_values, 0, sizeof(z_values)); - } - -#endif // MESH_BED_LEVELING diff --git a/Marlin/mesh_bed_leveling.h b/Marlin/mesh_bed_leveling.h deleted file mode 100644 index eb668e1..0000000 --- a/Marlin/mesh_bed_leveling.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" - -#if ENABLED(MESH_BED_LEVELING) - #define MESH_X_DIST ((MESH_MAX_X - (MESH_MIN_X))/(MESH_NUM_X_POINTS - 1)) - #define MESH_Y_DIST ((MESH_MAX_Y - (MESH_MIN_Y))/(MESH_NUM_Y_POINTS - 1)) - - class mesh_bed_leveling { - public: - uint8_t status; // Has Mesh and Is Active bits - float z_offset; - float z_values[MESH_NUM_Y_POINTS][MESH_NUM_X_POINTS]; - - mesh_bed_leveling(); - - void reset(); - - static FORCE_INLINE float get_probe_x(int8_t i) { return MESH_MIN_X + (MESH_X_DIST) * i; } - static FORCE_INLINE float get_probe_y(int8_t i) { return MESH_MIN_Y + (MESH_Y_DIST) * i; } - void set_z(const int8_t px, const int8_t py, const float z) { z_values[py][px] = z; } - - bool active() { return TEST(status, MBL_STATUS_ACTIVE_BIT); } - void set_active(bool onOff) { if (onOff) SBI(status, MBL_STATUS_ACTIVE_BIT); else CBI(status, MBL_STATUS_ACTIVE_BIT); } - bool has_mesh() { return TEST(status, MBL_STATUS_HAS_MESH_BIT); } - void set_has_mesh(bool onOff) { if (onOff) SBI(status, MBL_STATUS_HAS_MESH_BIT); else CBI(status, MBL_STATUS_HAS_MESH_BIT); } - - inline void zigzag(int8_t index, int8_t &px, int8_t &py) { - px = index % (MESH_NUM_X_POINTS); - py = index / (MESH_NUM_X_POINTS); - if (py & 1) px = (MESH_NUM_X_POINTS - 1) - px; // Zig zag - } - - void set_zigzag_z(int8_t index, float z) { - int8_t px, py; - zigzag(index, px, py); - set_z(px, py, z); - } - - int8_t cell_index_x(float x) { - int8_t cx = int(x - (MESH_MIN_X)) / (MESH_X_DIST); - return constrain(cx, 0, (MESH_NUM_X_POINTS) - 2); - } - - int8_t cell_index_y(float y) { - int8_t cy = int(y - (MESH_MIN_Y)) / (MESH_Y_DIST); - return constrain(cy, 0, (MESH_NUM_Y_POINTS) - 2); - } - - int8_t probe_index_x(float x) { - int8_t px = int(x - (MESH_MIN_X) + (MESH_X_DIST) / 2) / (MESH_X_DIST); - return (px >= 0 && px < (MESH_NUM_X_POINTS)) ? px : -1; - } - - int8_t probe_index_y(float y) { - int8_t py = int(y - (MESH_MIN_Y) + (MESH_Y_DIST) / 2) / (MESH_Y_DIST); - return (py >= 0 && py < (MESH_NUM_Y_POINTS)) ? py : -1; - } - - float calc_z0(float a0, float a1, float z1, float a2, float z2) { - float delta_z = (z2 - z1) / (a2 - a1); - float delta_a = a0 - a1; - return z1 + delta_a * delta_z; - } - - float get_z(float x0, float y0) { - int8_t cx = cell_index_x(x0), - cy = cell_index_y(y0); - if (cx < 0 || cy < 0) return z_offset; - float z1 = calc_z0(x0, - get_probe_x(cx), z_values[cy][cx], - get_probe_x(cx + 1), z_values[cy][cx + 1]); - float z2 = calc_z0(x0, - get_probe_x(cx), z_values[cy + 1][cx], - get_probe_x(cx + 1), z_values[cy + 1][cx + 1]); - float z0 = calc_z0(y0, - get_probe_y(cy), z1, - get_probe_y(cy + 1), z2); - return z0 + z_offset; - } - }; - - extern mesh_bed_leveling mbl; - -#endif // MESH_BED_LEVELING diff --git a/Marlin/nozzle.h b/Marlin/nozzle.h deleted file mode 100644 index cce22db..0000000 --- a/Marlin/nozzle.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __NOZZLE_H__ -#define __NOZZLE_H__ - -#include "Marlin.h" -#include "point_t.h" - -/** - * @brief Nozzle class - * - * @todo: Do not ignore the end.z value and allow XYZ movements - */ -class Nozzle { - private: - /** - * @brief Stroke clean pattern - * @details Wipes the nozzle back and forth in a linear movement - * - * @param start point_t defining the starting point - * @param end point_t defining the ending point - * @param strokes number of strokes to execute - */ - static void stroke( - __attribute__((unused)) point_t const &start, - __attribute__((unused)) point_t const &end, - __attribute__((unused)) uint8_t const &strokes - ) __attribute__((optimize ("Os"))) { - #if ENABLED(NOZZLE_CLEAN_FEATURE) - - #if ENABLED(NOZZLE_CLEAN_GOBACK) - // Store the current coords - point_t const initial = { - current_position[X_AXIS], - current_position[Y_AXIS], - current_position[Z_AXIS], - current_position[E_AXIS] - }; - #endif // NOZZLE_CLEAN_GOBACK - - // Move to the starting point - do_blocking_move_to_xy(start.x, start.y); - do_blocking_move_to_z(start.z); - - // Start the stroke pattern - for (uint8_t i = 0; i < (strokes >>1); i++) { - do_blocking_move_to_xy(end.x, end.y); - do_blocking_move_to_xy(start.x, start.y); - } - - #if ENABLED(NOZZLE_CLEAN_GOBACK) - // Move the nozzle to the initial point - do_blocking_move_to_z(initial.z); - do_blocking_move_to_xy(initial.x, initial.y); - #endif // NOZZLE_CLEAN_GOBACK - - #endif // NOZZLE_CLEAN_FEATURE - } - - /** - * @brief Zig-zag clean pattern - * @details Apply a zig-zag cleanning pattern - * - * @param start point_t defining the starting point - * @param end point_t defining the ending point - * @param strokes number of strokes to execute - * @param objects number of objects to create - */ - static void zigzag( - __attribute__((unused)) point_t const &start, - __attribute__((unused)) point_t const &end, - __attribute__((unused)) uint8_t const &strokes, - __attribute__((unused)) uint8_t const &objects - ) __attribute__((optimize ("Os"))) { - #if ENABLED(NOZZLE_CLEAN_FEATURE) - float A = fabs(end.y - start.y); // [twice the] Amplitude - float P = fabs(end.x - start.x) / (objects << 1); // Period - - // Don't allow impossible triangles - if (A <= 0.0f || P <= 0.0f ) return; - - #if ENABLED(NOZZLE_CLEAN_GOBACK) - // Store the current coords - point_t const initial = { - current_position[X_AXIS], - current_position[Y_AXIS], - current_position[Z_AXIS], - current_position[E_AXIS] - }; - #endif // NOZZLE_CLEAN_GOBACK - - for (uint8_t j = 0; j < strokes; j++) { - for (uint8_t i = 0; i < (objects << 1); i++) { - float const x = start.x + i * P; - float const y = start.y + (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)); - - do_blocking_move_to_xy(x, y); - if (i == 0) do_blocking_move_to_z(start.z); - } - - for (int i = (objects << 1); i > -1; i--) { - float const x = start.x + i * P; - float const y = start.y + (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)); - - do_blocking_move_to_xy(x, y); - } - } - - #if ENABLED(NOZZLE_CLEAN_GOBACK) - // Move the nozzle to the initial point - do_blocking_move_to_z(initial.z); - do_blocking_move_to_xy(initial.x, initial.y); - #endif // NOZZLE_CLEAN_GOBACK - - #endif // NOZZLE_CLEAN_FEATURE - } - - public: - /** - * @brief Clean the nozzle - * @details Starts the selected clean procedure pattern - * - * @param pattern one of the available patterns - * @param argument depends on the cleaning pattern - */ - static void clean( - __attribute__((unused)) uint8_t const &pattern, - __attribute__((unused)) uint8_t const &strokes, - __attribute__((unused)) uint8_t const &objects = 0 - ) __attribute__((optimize ("Os"))) { - #if ENABLED(NOZZLE_CLEAN_FEATURE) - switch (pattern) { - case 1: - Nozzle::zigzag( - NOZZLE_CLEAN_START_POINT, - NOZZLE_CLEAN_END_POINT, strokes, objects); - break; - - default: - Nozzle::stroke( - NOZZLE_CLEAN_START_POINT, - NOZZLE_CLEAN_END_POINT, strokes); - } - #endif // NOZZLE_CLEAN_FEATURE - } - - static void park( - __attribute__((unused)) uint8_t const &z_action - ) __attribute__((optimize ("Os"))) { - #if ENABLED(NOZZLE_PARK_FEATURE) - float const z = current_position[Z_AXIS]; - point_t const park = NOZZLE_PARK_POINT; - - switch(z_action) { - case 1: // force Z-park height - do_blocking_move_to_z(park.z); - break; - - case 2: // Raise by Z-park height - do_blocking_move_to_z( - (z + park.z > Z_MAX_POS) ? Z_MAX_POS : z + park.z); - break; - - default: // Raise to Z-park height if lower - if (current_position[Z_AXIS] < park.z) - do_blocking_move_to_z(park.z); - } - - do_blocking_move_to_xy(park.x, park.y); - - #endif // NOZZLE_PARK_FEATURE - } -}; - -#endif diff --git a/Marlin/paj7620.cpp b/Marlin/paj7620.cpp deleted file mode 100644 index f859d42..0000000 --- a/Marlin/paj7620.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - * paj7620.cpp - * A library for Grove-Guesture 1.0 - * - * Copyright (c) 2015 seeed technology inc. - * Website : www.seeed.cc - * Author : Wuruibin & Xiangnan - * Modified Time: June 2015 - * - * The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include -#include "paj7620.h" -#include - -// PAJ7620U2_20140305.asc -/* Registers' initialization data */ -unsigned char initRegisterArray[][2] = { // Initial Gesture - {0xEF,0x00}, - {0x32,0x29}, - {0x33,0x01}, - {0x34,0x00}, - {0x35,0x01}, - {0x36,0x00}, - {0x37,0x07}, - {0x38,0x17}, - {0x39,0x06}, - {0x3A,0x12}, - {0x3F,0x00}, - {0x40,0x02}, - {0x41,0xFF}, - {0x42,0x01}, - {0x46,0x2D}, - {0x47,0x0F}, - {0x48,0x3C}, - {0x49,0x00}, - {0x4A,0x1E}, - {0x4B,0x00}, - {0x4C,0x20}, - {0x4D,0x00}, - {0x4E,0x1A}, - {0x4F,0x14}, - {0x50,0x00}, - {0x51,0x10}, - {0x52,0x00}, - {0x5C,0x02}, - {0x5D,0x00}, - {0x5E,0x10}, - {0x5F,0x3F}, - {0x60,0x27}, - {0x61,0x28}, - {0x62,0x00}, - {0x63,0x03}, - {0x64,0xF7}, - {0x65,0x03}, - {0x66,0xD9}, - {0x67,0x03}, - {0x68,0x01}, - {0x69,0xC8}, - {0x6A,0x40}, - {0x6D,0x04}, - {0x6E,0x00}, - {0x6F,0x00}, - {0x70,0x80}, - {0x71,0x00}, - {0x72,0x00}, - {0x73,0x00}, - {0x74,0xF0}, - {0x75,0x00}, - {0x80,0x42}, - {0x81,0x44}, - {0x82,0x04}, - {0x83,0x20}, - {0x84,0x20}, - {0x85,0x00}, - {0x86,0x10}, - {0x87,0x00}, - {0x88,0x05}, - {0x89,0x18}, - {0x8A,0x10}, - {0x8B,0x01}, - {0x8C,0x37}, - {0x8D,0x00}, - {0x8E,0xF0}, - {0x8F,0x81}, - {0x90,0x06}, - {0x91,0x06}, - {0x92,0x1E}, - {0x93,0x0D}, - {0x94,0x0A}, - {0x95,0x0A}, - {0x96,0x0C}, - {0x97,0x05}, - {0x98,0x0A}, - {0x99,0x41}, - {0x9A,0x14}, - {0x9B,0x0A}, - {0x9C,0x3F}, - {0x9D,0x33}, - {0x9E,0xAE}, - {0x9F,0xF9}, - {0xA0,0x48}, - {0xA1,0x13}, - {0xA2,0x10}, - {0xA3,0x08}, - {0xA4,0x30}, - {0xA5,0x19}, - {0xA6,0x10}, - {0xA7,0x08}, - {0xA8,0x24}, - {0xA9,0x04}, - {0xAA,0x1E}, - {0xAB,0x1E}, - {0xCC,0x19}, - {0xCD,0x0B}, - {0xCE,0x13}, - {0xCF,0x64}, - {0xD0,0x21}, - {0xD1,0x0F}, - {0xD2,0x88}, - {0xE0,0x01}, - {0xE1,0x04}, - {0xE2,0x41}, - {0xE3,0xD6}, - {0xE4,0x00}, - {0xE5,0x0C}, - {0xE6,0x0A}, - {0xE7,0x00}, - {0xE8,0x00}, - {0xE9,0x00}, - {0xEE,0x07}, - {0xEF,0x01}, - {0x00,0x1E}, - {0x01,0x1E}, - {0x02,0x0F}, - {0x03,0x10}, - {0x04,0x02}, - {0x05,0x00}, - {0x06,0xB0}, - {0x07,0x04}, - {0x08,0x0D}, - {0x09,0x0E}, - {0x0A,0x9C}, - {0x0B,0x04}, - {0x0C,0x05}, - {0x0D,0x0F}, - {0x0E,0x02}, - {0x0F,0x12}, - {0x10,0x02}, - {0x11,0x02}, - {0x12,0x00}, - {0x13,0x01}, - {0x14,0x05}, - {0x15,0x07}, - {0x16,0x05}, - {0x17,0x07}, - {0x18,0x01}, - {0x19,0x04}, - {0x1A,0x05}, - {0x1B,0x0C}, - {0x1C,0x2A}, - {0x1D,0x01}, - {0x1E,0x00}, - {0x21,0x00}, - {0x22,0x00}, - {0x23,0x00}, - {0x25,0x01}, - {0x26,0x00}, - {0x27,0x39}, - {0x28,0x7F}, - {0x29,0x08}, - {0x30,0x03}, - {0x31,0x00}, - {0x32,0x1A}, - {0x33,0x1A}, - {0x34,0x07}, - {0x35,0x07}, - {0x36,0x01}, - {0x37,0xFF}, - {0x38,0x36}, - {0x39,0x07}, - {0x3A,0x00}, - {0x3E,0xFF}, - {0x3F,0x00}, - {0x40,0x77}, - {0x41,0x40}, - {0x42,0x00}, - {0x43,0x30}, - {0x44,0xA0}, - {0x45,0x5C}, - {0x46,0x00}, - {0x47,0x00}, - {0x48,0x58}, - {0x4A,0x1E}, - {0x4B,0x1E}, - {0x4C,0x00}, - {0x4D,0x00}, - {0x4E,0xA0}, - {0x4F,0x80}, - {0x50,0x00}, - {0x51,0x00}, - {0x52,0x00}, - {0x53,0x00}, - {0x54,0x00}, - {0x57,0x80}, - {0x59,0x10}, - {0x5A,0x08}, - {0x5B,0x94}, - {0x5C,0xE8}, - {0x5D,0x08}, - {0x5E,0x3D}, - {0x5F,0x99}, - {0x60,0x45}, - {0x61,0x40}, - {0x63,0x2D}, - {0x64,0x02}, - {0x65,0x96}, - {0x66,0x00}, - {0x67,0x97}, - {0x68,0x01}, - {0x69,0xCD}, - {0x6A,0x01}, - {0x6B,0xB0}, - {0x6C,0x04}, - {0x6D,0x2C}, - {0x6E,0x01}, - {0x6F,0x32}, - {0x71,0x00}, - {0x72,0x01}, - {0x73,0x35}, - {0x74,0x00}, - {0x75,0x33}, - {0x76,0x31}, - {0x77,0x01}, - {0x7C,0x84}, - {0x7D,0x03}, - {0x7E,0x01}, -}; - - -/**************************************************************** - * Function Name: paj7620WriteReg - * Description: PAJ7620 Write reg cmd - * Parameters: addr:reg address; cmd:function data - * Return: error code; success: return 0 -****************************************************************/ -uint8_t paj7620WriteReg(uint8_t addr, uint8_t cmd) -{ - char i = 1; - Wire.beginTransmission(PAJ7620_ID); // start transmission to device - //write cmd - Wire.write(addr); // send register address - Wire.write(cmd); // send value to write - i = Wire.endTransmission(); // end transmission - if(0 != i) - { - Serial.print("Transmission error!!!\n"); - } - return i; -} - -/**************************************************************** - * Function Name: paj7620ReadReg - * Description: PAJ7620 read reg data - * Parameters: addr:reg address; - * qty:number of data to read, addr continuously increase; - * data[]:storage memory start address - * Return: error code; success: return 0 -****************************************************************/ -uint8_t paj7620ReadReg(uint8_t addr, uint8_t qty, uint8_t data[]) -{ - uint8_t error; - Wire.beginTransmission(PAJ7620_ID); - Wire.write(addr); - error = Wire.endTransmission(); - - if(0 != error) - { - Serial.print("Transmission error!!!\n"); - return error; //return error code - } - - Wire.requestFrom((int)PAJ7620_ID, (int)qty); - - while (Wire.available()) - { - *data = Wire.read(); - -#ifdef debug //debug - Serial.print("addr:"); - Serial.print(addr++, HEX); - Serial.print(" data:"); - Serial.println(*data, HEX); -#endif - - data++; - } - return 0; -} - -/**************************************************************** - * Function Name: paj7620SelectBank - * Description: PAJ7620 select register bank - * Parameters: BANK0, BANK1 - * Return: none -****************************************************************/ -void paj7620SelectBank(bank_e bank) -{ - switch(bank){ - case BANK0: - paj7620WriteReg(PAJ7620_REGITER_BANK_SEL, PAJ7620_BANK0); - break; - case BANK1: - paj7620WriteReg(PAJ7620_REGITER_BANK_SEL, PAJ7620_BANK1); - break; - default: - break; - } -} - -/**************************************************************** - * Function Name: paj7620Init - * Description: PAJ7620 REG INIT - * Parameters: none - * Return: error code; success: return 0 -****************************************************************/ -uint8_t paj7620Init(void) -{ - //Near_normal_mode_V5_6.15mm_121017 for 940nm - int i = 0; - uint8_t error; - uint8_t data0 = 0, data1 = 0; - //wakeup the sensor - delayMicroseconds(700); //Wait 700us for PAJ7620U2 to stabilize - - Wire.begin(); - - Serial.println("INIT SENSOR..."); - - paj7620SelectBank(BANK0); - paj7620SelectBank(BANK0); - - error = paj7620ReadReg(0, 1, &data0); - if (error) - { - return error; - } - error = paj7620ReadReg(1, 1, &data1); - if (error) - { - return error; - } - Serial.print("Addr0 ="); - Serial.print(data0 , HEX); - Serial.print(", Addr1 ="); - Serial.println(data1 , HEX); - - if ( (data0 != 0x20 ) || (data1 != 0x76) ) - { - return 0xff; - } - if ( data0 == 0x20 ) - { - Serial.println("wake-up finish."); - } - - for (i = 0; i < INIT_REG_ARRAY_SIZE; i++) - { - paj7620WriteReg(initRegisterArray[i][0], initRegisterArray[i][1]); - } - - paj7620SelectBank(BANK0); //gesture flage reg in Bank0 - - Serial.println("Paj7620 initialize register finished."); - return 0; -} - diff --git a/Marlin/paj7620.h b/Marlin/paj7620.h deleted file mode 100644 index dc4d1f2..0000000 --- a/Marlin/paj7620.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * paj7620.h - * A library for Grove-Guesture 1.0 - * - * Copyright (c) 2015 seeed technology inc. - * Website : www.seeed.cc - * Author : Wuruibin & Xiangnan - * Modified Time: June 2015 - * - * The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - - -#ifndef __PAJ7620_H__ -#define __PAJ7620_H__ - -#define BIT(x) 1 << x - -// REGISTER DESCRIPTION -#define PAJ7620_VAL(val, maskbit) ( val << maskbit ) -#define PAJ7620_ADDR_BASE 0x00 - -// REGISTER BANK SELECT -#define PAJ7620_REGITER_BANK_SEL (PAJ7620_ADDR_BASE + 0xEF) //W - -// DEVICE ID -#define PAJ7620_ID 0x73 - -// REGISTER BANK 0 -#define PAJ7620_ADDR_SUSPEND_CMD (PAJ7620_ADDR_BASE + 0x3) //W -#define PAJ7620_ADDR_GES_PS_DET_MASK_0 (PAJ7620_ADDR_BASE + 0x41) //RW -#define PAJ7620_ADDR_GES_PS_DET_MASK_1 (PAJ7620_ADDR_BASE + 0x42) //RW -#define PAJ7620_ADDR_GES_PS_DET_FLAG_0 (PAJ7620_ADDR_BASE + 0x43) //R -#define PAJ7620_ADDR_GES_PS_DET_FLAG_1 (PAJ7620_ADDR_BASE + 0x44) //R -#define PAJ7620_ADDR_STATE_INDICATOR (PAJ7620_ADDR_BASE + 0x45) //R -#define PAJ7620_ADDR_PS_HIGH_THRESHOLD (PAJ7620_ADDR_BASE + 0x69) //RW -#define PAJ7620_ADDR_PS_LOW_THRESHOLD (PAJ7620_ADDR_BASE + 0x6A) //RW -#define PAJ7620_ADDR_PS_APPROACH_STATE (PAJ7620_ADDR_BASE + 0x6B) //R -#define PAJ7620_ADDR_PS_RAW_DATA (PAJ7620_ADDR_BASE + 0x6C) //R - -// REGISTER BANK 1 -#define PAJ7620_ADDR_PS_GAIN (PAJ7620_ADDR_BASE + 0x44) //RW -#define PAJ7620_ADDR_IDLE_S1_STEP_0 (PAJ7620_ADDR_BASE + 0x67) //RW -#define PAJ7620_ADDR_IDLE_S1_STEP_1 (PAJ7620_ADDR_BASE + 0x68) //RW -#define PAJ7620_ADDR_IDLE_S2_STEP_0 (PAJ7620_ADDR_BASE + 0x69) //RW -#define PAJ7620_ADDR_IDLE_S2_STEP_1 (PAJ7620_ADDR_BASE + 0x6A) //RW -#define PAJ7620_ADDR_OP_TO_S1_STEP_0 (PAJ7620_ADDR_BASE + 0x6B) //RW -#define PAJ7620_ADDR_OP_TO_S1_STEP_1 (PAJ7620_ADDR_BASE + 0x6C) //RW -#define PAJ7620_ADDR_OP_TO_S2_STEP_0 (PAJ7620_ADDR_BASE + 0x6D) //RW -#define PAJ7620_ADDR_OP_TO_S2_STEP_1 (PAJ7620_ADDR_BASE + 0x6E) //RW -#define PAJ7620_ADDR_OPERATION_ENABLE (PAJ7620_ADDR_BASE + 0x72) //RW - -// PAJ7620_REGITER_BANK_SEL -#define PAJ7620_BANK0 PAJ7620_VAL(0,0) -#define PAJ7620_BANK1 PAJ7620_VAL(1,0) - -// PAJ7620_ADDR_SUSPEND_CMD -#define PAJ7620_I2C_WAKEUP PAJ7620_VAL(1,0) -#define PAJ7620_I2C_SUSPEND PAJ7620_VAL(0,0) - -// PAJ7620_ADDR_OPERATION_ENABLE -#define PAJ7620_ENABLE PAJ7620_VAL(1,0) -#define PAJ7620_DISABLE PAJ7620_VAL(0,0) - -typedef enum { - BANK0 = 0, - BANK1, -} bank_e; - -#define GES_RIGHT_FLAG PAJ7620_VAL(1,0) -#define GES_LEFT_FLAG PAJ7620_VAL(1,1) -#define GES_UP_FLAG PAJ7620_VAL(1,2) -#define GES_DOWN_FLAG PAJ7620_VAL(1,3) -#define GES_FORWARD_FLAG PAJ7620_VAL(1,4) -#define GES_BACKWARD_FLAG PAJ7620_VAL(1,5) -#define GES_CLOCKWISE_FLAG PAJ7620_VAL(1,6) -#define GES_COUNT_CLOCKWISE_FLAG PAJ7620_VAL(1,7) -#define GES_WAVE_FLAG PAJ7620_VAL(1,0) - -/* -enum { - // REGISTER 0 - GES_RIGHT_FLAG = BIT(0), - GES_LEFT_FLAG = BIT(1), - GES_UP_FLAG = BIT(2), - GES_DOWN_FLAG = BIT(3), - GES_FORWARD_FLAG = BIT(4), - GES_BACKWARD_FLAG = BIT(5), - GES_CLOCKWISE_FLAG = BIT(6), - GES_COUNT_CLOCKWISE_FLAG = BIT(7), - //REGISTER 1 - GES_WAVE_FLAG = BIT(0), -}; -*/ -#define GES_REACTION_TIME 500 // You can adjust the reaction time according to the actual circumstance. -#define GES_ENTRY_TIME 800 // When you want to recognize the Forward/Backward gestures, your gestures' reaction time must less than GES_ENTRY_TIME(0.8s). -#define GES_QUIT_TIME 1000 - -#define INIT_REG_ARRAY_SIZE (sizeof(initRegisterArray)/sizeof(initRegisterArray[0])) - - -uint8_t paj7620Init(void); -uint8_t paj7620WriteReg(uint8_t addr, uint8_t cmd); -uint8_t paj7620ReadReg(uint8_t addr, uint8_t qty, uint8_t data[]); -void paj7620SelectBank(bank_e bank); - - -#endif diff --git a/Marlin/pins.h b/Marlin/pins.h deleted file mode 100644 index 36821db..0000000 --- a/Marlin/pins.h +++ /dev/null @@ -1,474 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef PINS_H -#define PINS_H - -#if MB(GEN7_CUSTOM) - #include "pins_GEN7_CUSTOM.h" -#elif MB(GEN7_12) - #include "pins_GEN7_12.h" -#elif MB(GEN7_13) - #include "pins_GEN7_13.h" -#elif MB(GEN7_14) - #include "pins_GEN7_14.h" -#elif MB(CNCONTROLS_11) - #include "pins_CNCONTROLS_11.h" -#elif MB(CNCONTROLS_12) - #include "pins_CNCONTROLS_12.h" -#elif MB(CHEAPTRONIC) - #include "pins_CHEAPTRONIC.h" -#elif MB(SETHI) - #include "pins_SETHI.h" -#elif MB(RAMPS_OLD) - #include "pins_RAMPS_OLD.h" -#elif MB(RAMPS_13_EFB) - #define IS_RAMPS_EFB - #include "pins_RAMPS_13.h" -#elif MB(RAMPS_13_EEB) - #define IS_RAMPS_EEB - #include "pins_RAMPS_13.h" -#elif MB(RAMPS_13_EFF) - #define IS_RAMPS_EFF - #include "pins_RAMPS_13.h" -#elif MB(RAMPS_13_EEF) - #define IS_RAMPS_EEF - #include "pins_RAMPS_13.h" -#elif MB(RAMPS_13_SF) - #define IS_RAMPS_SF - #include "pins_RAMPS_13.h" -#elif MB(RAMPS_14_EFB) - #define IS_RAMPS_EFB - #include "pins_RAMPS.h" -#elif MB(RAMPS_14_EEB) - #define IS_RAMPS_EEB - #include "pins_RAMPS.h" -#elif MB(RAMPS_14_EFF) - #define IS_RAMPS_EFF - #include "pins_RAMPS.h" -#elif MB(RAMPS_14_EEF) - #define IS_RAMPS_EEF - #include "pins_RAMPS.h" -#elif MB(RAMPS_14_SF) - #define IS_RAMPS_SF - #include "pins_RAMPS.h" -#elif MB(GEN6) - #include "pins_GEN6.h" -#elif MB(GEN6_DELUXE) - #include "pins_GEN6_DELUXE.h" -#elif MB(SANGUINOLOLU_11) - #include "pins_SANGUINOLOLU_11.h" -#elif MB(SANGUINOLOLU_12) - #include "pins_SANGUINOLOLU_12.h" -#elif MB(MELZI) - #include "pins_MELZI.h" -#elif MB(STB_11) - #include "pins_STB_11.h" -#elif MB(AZTEEG_X1) - #include "pins_AZTEEG_X1.h" -#elif MB(MELZI_MAKR3D) - #include "pins_MELZI_MAKR3D.h" -#elif MB(AZTEEG_X3) - #include "pins_AZTEEG_X3.h" -#elif MB(AZTEEG_X3_PRO) - #include "pins_AZTEEG_X3_PRO.h" -#elif MB(ULTIMAKER) - #include "pins_ULTIMAKER.h" -#elif MB(ULTIMAKER_OLD) - #include "pins_ULTIMAKER_OLD.h" -#elif MB(ULTIMAIN_2) - #include "pins_ULTIMAIN_2.h" -#elif MB(3DRAG) - #include "pins_3DRAG.h" -#elif MB(K8200) - #include "pins_K8200.h" -#elif MB(K8400) - #include "pins_K8400.h" -#elif MB(TEENSYLU) - #include "pins_TEENSYLU.h" -#elif MB(RUMBA) - #include "pins_RUMBA.h" -#elif MB(PRINTRBOARD) - #include "pins_PRINTRBOARD.h" -#elif MB(PRINTRBOARD_REVF) - #include "pins_PRINTRBOARD_REVF.h" -#elif MB(BRAINWAVE) - #include "pins_BRAINWAVE.h" -#elif MB(BRAINWAVE_PRO) - #include "pins_BRAINWAVE_PRO.h" -#elif MB(SAV_MKI) - #include "pins_SAV_MKI.h" -#elif MB(TEENSY2) - #include "pins_TEENSY2.h" -#elif MB(GEN3_PLUS) - #include "pins_GEN3_PLUS.h" -#elif MB(GEN3_MONOLITHIC) - #include "pins_GEN3_MONOLITHIC.h" -#elif MB(MEGATRONICS) - #include "pins_MEGATRONICS.h" -#elif MB(MINITRONICS) - #include "pins_MINITRONICS.h" -#elif MB(MEGATRONICS_2) - #include "pins_MEGATRONICS_2.h" -#elif MB(MEGATRONICS_3) - #include "pins_MEGATRONICS_3.h" -#elif MB(OMCA_A) - #include "pins_OMCA_A.h" -#elif MB(OMCA) - #include "pins_OMCA.h" -#elif MB(RAMBO) - #include "pins_RAMBO.h" -#elif MB(MINIRAMBO) - #include "pins_MINIRAMBO.h" -#elif MB(ELEFU_3) - #include "pins_ELEFU_3.h" -#elif MB(5DPRINT) - #include "pins_5DPRINT.h" -#elif MB(LEAPFROG) - #include "pins_LEAPFROG.h" -#elif MB(BAM_DICE) - #include "pins_RAMPS.h" -#elif MB(BAM_DICE_DUE) - #include "pins_BAM_DICE_DUE.h" -#elif MB(FELIX2) - #include "pins_FELIX2.h" -#elif MB(MKS_BASE) - #include "pins_MKS_BASE.h" -#elif MB(RIGIDBOARD) - #include "pins_RIGIDBOARD.h" -#elif MB(RIGIDBOARD_V2) - #include "pins_RIGIDBOARD_V2.h" -#elif MB(MEGACONTROLLER) - #include "pins_MEGACONTROLLER.h" -#elif MB(BQ_ZUM_MEGA_3D) - #include "pins_BQ_ZUM_MEGA_3D.h" -#elif MB(99) - #include "pins_99.h" -#elif MB(AJ4P) - #include "pins_AJ4P.h" -#elif MB(MKS_13) - #include "pins_MKS_13.h" -#elif MB(SAINSMART_2IN1) - #include "pins_SAINSMART_2IN1.h" -#elif MB(SWIFT_10) - #include "pins_Swift.h" -#else - #error "Unknown MOTHERBOARD value set in Configuration.h" -#endif - -// Define certain undefined pins -#ifndef X_MS1_PIN - #define X_MS1_PIN -1 -#endif -#ifndef X_MS2_PIN - #define X_MS2_PIN -1 -#endif -#ifndef Y_MS1_PIN - #define Y_MS1_PIN -1 -#endif -#ifndef Y_MS2_PIN - #define Y_MS2_PIN -1 -#endif -#ifndef Z_MS1_PIN - #define Z_MS1_PIN -1 -#endif -#ifndef Z_MS2_PIN - #define Z_MS2_PIN -1 -#endif -#ifndef E0_MS1_PIN - #define E0_MS1_PIN -1 -#endif -#ifndef E0_MS2_PIN - #define E0_MS2_PIN -1 -#endif -#ifndef E1_MS1_PIN - #define E1_MS1_PIN -1 -#endif -#ifndef E1_MS2_PIN - #define E1_MS2_PIN -1 -#endif - -#ifndef FAN_PIN - #define FAN_PIN -1 -#endif -#ifndef FAN1_PIN - #define FAN1_PIN -1 -#endif -#ifndef FAN2_PIN - #define FAN2_PIN -1 -#endif - -#ifndef HEATER_0_PIN - #define HEATER_0_PIN -1 -#endif -#ifndef HEATER_1_PIN - #define HEATER_1_PIN -1 -#endif -#ifndef HEATER_2_PIN - #define HEATER_2_PIN -1 -#endif -#ifndef HEATER_3_PIN - #define HEATER_3_PIN -1 -#endif -#ifndef HEATER_BED_PIN - #define HEATER_BED_PIN -1 -#endif - -#ifndef TEMP_0_PIN - #define TEMP_0_PIN -1 -#endif -#ifndef TEMP_1_PIN - #define TEMP_1_PIN -1 -#endif -#ifndef TEMP_2_PIN - #define TEMP_2_PIN -1 -#endif -#ifndef TEMP_3_PIN - #define TEMP_3_PIN -1 -#endif -#ifndef TEMP_BED_PIN - #define TEMP_BED_PIN -1 -#endif - -#ifndef SD_DETECT_PIN - #define SD_DETECT_PIN -1 -#endif -#ifndef SDPOWER - #define SDPOWER -1 -#endif -#ifndef SDSS - #define SDSS -1 -#endif -#ifndef LED_PIN - #define LED_PIN -1 -#endif -#ifndef PS_ON_PIN - #define PS_ON_PIN -1 -#endif -#ifndef KILL_PIN - #define KILL_PIN -1 -#endif -#ifndef SUICIDE_PIN - #define SUICIDE_PIN -1 -#endif - -// Marlin needs to account for pins that equal -1 -#define marlinAnalogInputToDigitalPin(p) ((p) == -1 ? -1 : (p) + 0xA0) - -// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! -#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, -#define _E1_PINS -#define _E2_PINS -#define _E3_PINS - -#if EXTRUDERS > 1 - #undef _E1_PINS - #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, - #if EXTRUDERS > 2 - #undef _E2_PINS - #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, - #if EXTRUDERS > 3 - #undef _E3_PINS - #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, - #endif - #endif -#endif - -#define _H0_PINS HEATER_0_PIN, EXTRUDER_0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN), -#define _H1_PINS -#define _H2_PINS -#define _H3_PINS - -#if HOTENDS > 1 - #undef _H1_PINS - #define _H1_PINS HEATER_1_PIN, EXTRUDER_1_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_1_PIN), - #if HOTENDS > 2 - #undef _H2_PINS - #define _H2_PINS HEATER_2_PIN, EXTRUDER_2_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_2_PIN), - #if HOTENDS > 3 - #undef _H3_PINS - #define _H3_PINS HEATER_3_PIN, EXTRUDER_3_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_3_PIN), - #endif - #endif -#elif ENABLED(MIXING_EXTRUDER) - #undef _E1_PINS - #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, - #if MIXING_STEPPERS > 2 - #undef _E2_PINS - #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, - #if MIXING_STEPPERS > 3 - #undef _E3_PINS - #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, - #endif - #endif -#endif - -#define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN), - -// -// Assign endstop pins for boards with only 3 connectors -// -#ifdef X_STOP_PIN - #if X_HOME_DIR < 0 - #define X_MIN_PIN X_STOP_PIN - #define X_MAX_PIN -1 - #else - #define X_MIN_PIN -1 - #define X_MAX_PIN X_STOP_PIN - #endif -#endif - -#ifdef Y_STOP_PIN - #if Y_HOME_DIR < 0 - #define Y_MIN_PIN Y_STOP_PIN - #define Y_MAX_PIN -1 - #else - #define Y_MIN_PIN -1 - #define Y_MAX_PIN Y_STOP_PIN - #endif -#endif - -#ifdef Z_STOP_PIN - #if Z_HOME_DIR < 0 - #define Z_MIN_PIN Z_STOP_PIN - #define Z_MAX_PIN -1 - #else - #define Z_MIN_PIN -1 - #define Z_MAX_PIN Z_STOP_PIN - #endif -#endif - -// -// Disable unused endstop / probe pins -// -#if ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP) || DISABLED(Z_MIN_PROBE_ENDSTOP) // Allow code to compile regardless of Z_MIN_PROBE_ENDSTOP setting. - #undef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN -1 -#endif - -#if DISABLED(USE_XMAX_PLUG) - #undef X_MAX_PIN - #define X_MAX_PIN -1 -#endif - -#if DISABLED(USE_YMAX_PLUG) - #undef Y_MAX_PIN - #define Y_MAX_PIN -1 -#endif - -#if DISABLED(USE_ZMAX_PLUG) - #undef Z_MAX_PIN - #define Z_MAX_PIN -1 -#endif - -#if DISABLED(USE_XMIN_PLUG) - #undef X_MIN_PIN - #define X_MIN_PIN -1 -#endif - -#if DISABLED(USE_YMIN_PLUG) - #undef Y_MIN_PIN - #define Y_MIN_PIN -1 -#endif - -#if DISABLED(USE_ZMIN_PLUG) - #undef Z_MIN_PIN - #define Z_MIN_PIN -1 -#endif - -// -// Dual X-carriage, Dual Y, Dual Z support -// - -#define _X2_PINS -#define _Y2_PINS -#define _Z2_PINS - -#define __EPIN(p,q) E##p##_##q##_PIN -#define _EPIN(p,q) __EPIN(p,q) - -// The X2 axis, if any, should be the next open extruder port -#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS) - #ifndef X2_STEP_PIN - #define X2_STEP_PIN _EPIN(E_STEPPERS, STEP) - #define X2_DIR_PIN _EPIN(E_STEPPERS, DIR) - #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE) - #endif - #undef _X2_PINS - #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN, - #define Y2_E_INDEX INCREMENT(E_STEPPERS) -#else - #define Y2_E_INDEX E_STEPPERS -#endif - -// The Y2 axis, if any, should be the next open extruder port -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - #ifndef Y2_STEP_PIN - #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP) - #define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR) - #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE) - #endif - #undef _Y2_PINS - #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN, - #define Z2_E_INDEX INCREMENT(Y2_E_INDEX) -#else - #define Z2_E_INDEX Y2_E_INDEX -#endif - -// The Z2 axis, if any, should be the next open extruder port -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - #ifndef Z2_STEP_PIN - #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP) - #define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR) - #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE) - #endif - #undef _Z2_PINS - #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN, -#endif - -#define SENSITIVE_PINS { 0, 1, \ - X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \ - Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \ - Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \ - PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLERFAN_PIN, \ - _E0_PINS _E1_PINS _E2_PINS _E3_PINS BED_PINS \ - _H0_PINS _H1_PINS _H2_PINS _H3_PINS \ - _X2_PINS _Y2_PINS _Z2_PINS \ - X_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \ - } - -#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) - -#ifndef SCK_PIN - #define SCK_PIN SCK -#endif -#ifndef MISO_PIN - #define MISO_PIN MISO -#endif -#ifndef MOSI_PIN - #define MOSI_PIN MOSI -#endif -#ifndef SS_PIN - #define SS_PIN SS -#endif - -#endif //__PINS_H diff --git a/Marlin/pins_3DRAG.h b/Marlin/pins_3DRAG.h deleted file mode 100644 index a3a6169..0000000 --- a/Marlin/pins_3DRAG.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments - */ - -#ifndef BOARD_NAME - #define BOARD_NAME "3Drag" -#endif - -#ifndef DEFAULT_MACHINE_NAME - #define DEFAULT_MACHINE_NAME "3Drag" -#endif - -#ifndef DEFAULT_SOURCE_CODE_URL - #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/" -#endif - -#include "pins_RAMPS.h" - -#undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 63 - -#undef X_MAX_PIN -#undef Y_MAX_PIN -#undef Z_MAX_PIN -#define X_MAX_PIN 2 -#define Y_MAX_PIN 15 -#define Z_MAX_PIN -1 - -#undef SDSS -#define SDSS 25//53 - -#undef FAN_PIN -#define FAN_PIN 8 - -#undef HEATER_1_PIN -#undef HEATER_2_PIN -#undef HEATER_BED_PIN -#define HEATER_0_PIN 10 -#define HEATER_1_PIN 12 -#define HEATER_2_PIN 6 - -#define HEATER_BED_PIN 9 // BED - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - #undef BEEPER_PIN - #define BEEPER_PIN -1 - - #undef LCD_PINS_RS - #undef LCD_PINS_ENABLE - #undef LCD_PINS_D4 - #undef LCD_PINS_D5 - #undef LCD_PINS_D6 - #undef LCD_PINS_D7 - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 - #define LCD_PINS_D4 37 - #define LCD_PINS_D5 35 - #define LCD_PINS_D6 33 - #define LCD_PINS_D7 31 - - // Buttons - #undef BTN_EN1 - #undef BTN_EN2 - #undef BTN_ENC - #define BTN_EN1 16 - #define BTN_EN2 17 - #define BTN_ENC 23 - -#else - - #define BEEPER_PIN 33 - -#endif // ULTRA_LCD && NEWPANEL diff --git a/Marlin/pins_5DPRINT.h b/Marlin/pins_5DPRINT.h deleted file mode 100644 index dae7e20..0000000 --- a/Marlin/pins_5DPRINT.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * 5DPrint D8 Driver board pin assignments - * - * https://bitbucket.org/makible/5dprint-d8-controller-board - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#define DEFAULT_MACHINE_NAME "Makibox" -#define BOARD_NAME "5DPrint D8" - -#define LARGE_FLASH true - -#define X_STEP_PIN 0 -#define X_DIR_PIN 1 -#define X_ENABLE_PIN 23 -#define X_STOP_PIN 37 - -#define Y_STEP_PIN 2 -#define Y_DIR_PIN 3 -#define Y_ENABLE_PIN 19 -#define Y_STOP_PIN 36 - -#define Z_STEP_PIN 4 -#define Z_DIR_PIN 5 -#define Z_ENABLE_PIN 18 -#define Z_STOP_PIN 39 - -#define E0_STEP_PIN 6 -#define E0_DIR_PIN 7 -#define E0_ENABLE_PIN 17 - -#define HEATER_0_PIN 21 // Extruder -#define HEATER_BED_PIN 20 // Bed -// You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h -// for the fan and Teensyduino uses a different pin mapping. -#define FAN_PIN 16 // Fan - -#define TEMP_0_PIN 1 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 0 // Bed / Analog pin numbering - -// The SDSS pin uses a different pin mapping from file fastio.h -#define SDSS 20 - -// Microstepping pins -// Note that the pin mapping is not from fastio.h -// See Sd2PinMap.h for the pin configurations ??? -#define X_MS1_PIN 25 -#define X_MS2_PIN 26 -#define Y_MS1_PIN 9 -#define Y_MS2_PIN 8 -#define Z_MS1_PIN 7 -#define Z_MS2_PIN 6 -#define E0_MS1_PIN 5 -#define E0_MS2_PIN 4 diff --git a/Marlin/pins_99.h b/Marlin/pins_99.h deleted file mode 100644 index 6b7d1e8..0000000 --- a/Marlin/pins_99.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Board 99 pin assignments - */ -#define BOARD_NAME "99 Unknown" - -#define X_STEP_PIN 2 -#define X_DIR_PIN 3 -#define X_ENABLE_PIN -1 -#define X_STOP_PIN 16 - -#define Y_STEP_PIN 5 -#define Y_DIR_PIN 6 -#define Y_ENABLE_PIN -1 -#define Y_STOP_PIN 67 - -#define Z_STEP_PIN 62 -#define Z_DIR_PIN 63 -#define Z_ENABLE_PIN -1 -#define Z_STOP_PIN 59 - -#define E0_STEP_PIN 65 -#define E0_DIR_PIN 66 -#define E0_ENABLE_PIN -1 - -#define SDSS 53 -#define PS_ON_PIN 9 - -#define HEATER_0_PIN 13 -#define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! -#define HEATER_BED_PIN 4 -#define TEMP_BED_PIN 10 diff --git a/Marlin/pins_A4JP.h b/Marlin/pins_A4JP.h deleted file mode 100644 index 990abc3..0000000 --- a/Marlin/pins_A4JP.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/************************************************ - * Rambo pin assignments MODIFIED FOR A4JP - ************************************************/ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "AJ4P" - -// Servo support -#define SERVO0_PIN 22 // Motor header MX1 -#define SERVO1_PIN 23 // Motor header MX2 -#define SERVO2_PIN 24 // Motor header MX3 -#define SERVO3_PIN 5 // PWM header pin 5 - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - -//Fan_2 2 - -/***************** -#if ENABLED(ULTRA_LCD) - - #define KILL_PIN -1 //was 80 Glen maybe a mistake - -#endif // ULTRA_LCD */ - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - #define BEEPER_PIN 44 - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 70 - #define DOGLCD_CS 71 - #define LCD_SCREEN_ROT_180 - - #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board - - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 22 - #define STAT_LED_BLUE 32 - #endif -#endif // VIKI2/miniVIKI - -#define FILWIDTH_PIN 3 // ANALOG NUMBERING - -/************************************************ - * Rambo pin assignments old - ************************************************/ - -#define LARGE_FLASH true -#define X_STEP_PIN 37 -#define X_DIR_PIN 48 -#define X_MIN_PIN 12 -#define X_MAX_PIN 24 -#define X_ENABLE_PIN 29 -#define X_MS1_PIN 40 -#define X_MS2_PIN 41 -#define Y_STEP_PIN 36 -#define Y_DIR_PIN 49 -#define Y_MIN_PIN 11 -#define Y_MAX_PIN 23 -#define Y_ENABLE_PIN 28 -#define Y_MS1_PIN 69 -#define Y_MS2_PIN 39 -#define Z_STEP_PIN 35 -#define Z_DIR_PIN 47 -#define Z_MIN_PIN 10 -#define Z_MAX_PIN 30 -#define Z_ENABLE_PIN 27 -#define Z_MS1_PIN 68 -#define Z_MS2_PIN 67 - -#define HEATER_BED_PIN 3 -#define TEMP_BED_PIN 7 //2014/02/04 0:T0 / 1:T1 / 2:T2 / 7:T3 -#define HEATER_0_PIN 9 -#define TEMP_0_PIN 0 -#define HEATER_1_PIN 7 - -#define E0_STEP_PIN 34 -#define E0_DIR_PIN 43 -#define E0_ENABLE_PIN 26 -#define E0_MS1_PIN 65 -#define E0_MS2_PIN 66 -#define E1_STEP_PIN 33 -#define E1_DIR_PIN 42 -#define E1_ENABLE_PIN 25 -#define E1_MS1_PIN 63 -#define E1_MS2_PIN 64 - -#define DIGIPOTSS_PIN 38 -#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping - -#define SDSS 53 -#define LED_PIN 13 -#define FAN_PIN 8 -#define PS_ON_PIN 4 -#define FAN_0_PIN 6 //Glen -#define FAN_1_PIN 2 //Glen - -// 2015/12/23 - -#define LCD_PINS_RS 70 //ext2_5 -#define LCD_PINS_ENABLE 71 //ext2_7 -#define LCD_PINS_D4 72 ///////Ext2 9 ? -#define LCD_PINS_D5 73 ///////Ext2 11 ? -#define LCD_PINS_D6 74 //ext2_13 -#define LCD_PINS_D7 75 ///////Ext2 15 ? -#define BEEPER_PIN -1 - -#define BTN_HOME 80 //ext_16 -#define BTN_CENTER 81 //ext_14 -#define BTN_ENC BTN_CENTER -#define BTN_RIGHT 82 //ext_12 -#define BTN_LEFT 83 //ext_10 -#define BTN_UP 84 //ext2_8 -#define BTN_DOWN 85 //ext2_6 - -#define HOME_PIN BTN_HOME diff --git a/Marlin/pins_AZTEEG_X1.h b/Marlin/pins_AZTEEG_X1.h deleted file mode 100644 index 8f87a7e..0000000 --- a/Marlin/pins_AZTEEG_X1.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Azteeg X1 pin assignments - */ - -#define BOARD_NAME "Azteeg X1" - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h deleted file mode 100644 index b33818e..0000000 --- a/Marlin/pins_AZTEEG_X3.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments - */ - -#if HOTENDS > 2 - #error "Azteeg X3 supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "Azteeg X3" - -#include "pins_RAMPS_13.h" - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - - #undef DOGLCD_A0 - #undef DOGLCD_CS - #undef BTN_ENC - #define DOGLCD_A0 31 - #define DOGLCD_CS 32 - #define BTN_ENC 12 - - #if ENABLED(TEMP_STAT_LEDS) - #undef STAT_LED_RED - #undef STAT_LED_BLUE - #define STAT_LED_RED 64 - #define STAT_LED_BLUE 63 - #endif - -#elif ENABLED(TEMP_STAT_LEDS) - - #define STAT_LED_RED 6 - #define STAT_LED_BLUE 11 - -#endif diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h deleted file mode 100644 index f4114c5..0000000 --- a/Marlin/pins_AZTEEG_X3_PRO.h +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * AZTEEG_X3_PRO (Arduino Mega) pin assignments - */ - -#define BOARD_NAME "Azteeg X3 Pro" - -#include "pins_RAMPS.h" - -#undef FAN_PIN -#define FAN_PIN 6 //Part Cooling System - -#undef BEEPER_PIN -#define BEEPER_PIN 33 -#define CONTROLLERFAN_PIN 4 //Pin used for the fan to cool motherboard (-1 to disable) -//Fans/Water Pump to cool the hotend cool side. -#define EXTRUDER_0_AUTO_FAN_PIN 5 -#define EXTRUDER_1_AUTO_FAN_PIN 5 -#define EXTRUDER_2_AUTO_FAN_PIN 5 -#define EXTRUDER_3_AUTO_FAN_PIN 5 -// -//This section is to swap the MIN and MAX pins because the X3 Pro comes with only -//MIN endstops soldered onto the board. Delta code wants the homing endstops to be -//the MAX so I swapped them here. -// -#if ENABLED(DELTA) - #undef X_MIN_PIN - #undef X_MAX_PIN - #undef Y_MIN_PIN - #undef Y_MAX_PIN - #undef Z_MIN_PIN - #undef Z_MAX_PIN - - #define X_MIN_PIN 2 - #define X_MAX_PIN 3 - #define Y_MIN_PIN 15 - #define Y_MAX_PIN 14 - #define Z_MIN_PIN 19 - #define Z_MAX_PIN 18 -#endif - -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 19 -#endif - -#define E2_STEP_PIN 23 -#define E2_DIR_PIN 25 -#define E2_ENABLE_PIN 40 - -#define E3_STEP_PIN 27 -#define E3_DIR_PIN 29 -#define E3_ENABLE_PIN 41 - -#define E4_STEP_PIN 43 -#define E4_DIR_PIN 37 -#define E4_ENABLE_PIN 42 - -#undef HEATER_1_PIN -#undef HEATER_2_PIN -#undef HEATER_3_PIN -#define HEATER_1_PIN 9 -#define HEATER_2_PIN 16 -#define HEATER_3_PIN 17 -#define HEATER_4_PIN 4 -#define HEATER_5_PIN 5 -#define HEATER_6_PIN 6 -#define HEATER_7_PIN 11 - -#undef TEMP_2_PIN -#undef TEMP_3_PIN -#define TEMP_2_PIN 12 // ANALOG NUMBERING -#define TEMP_3_PIN 11 // ANALOG NUMBERING -#define TEMP_4_PIN 10 // ANALOG NUMBERING -#define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro -#define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro - -// -// These Servo pins are for when they are defined. Tested for usage with bed leveling -// on a Delta with 1 servo. Running through the Z servo endstop in code. -// Physical wire attachment was done on EXT1 on the GND, 5V, and D47 pins. -// -#undef SERVO0_PIN -#define SERVO0_PIN 47 - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - #undef SD_DETECT_PIN - #define SD_DETECT_PIN 49 // For easy adapter board -#elif ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 32 - #define STAT_LED_BLUE 35 -#endif diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h deleted file mode 100644 index 0c5914f..0000000 --- a/Marlin/pins_BAM_DICE_DUE.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * BAM&DICE Due (Arduino Mega) pin assignments - */ - -#if HOTENDS > 2 - #error "2PrintBeta Due supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "2PrintBeta Due" - -#include "pins_RAMPS.h" - -#undef TEMP_0_PIN -#undef TEMP_1_PIN -#define TEMP_0_PIN 9 // ANALOG NUMBERING -#define TEMP_1_PIN 11 // ANALOG NUMBERING diff --git a/Marlin/pins_BQ_ZUM_MEGA_3D.h b/Marlin/pins_BQ_ZUM_MEGA_3D.h deleted file mode 100644 index c5509d4..0000000 --- a/Marlin/pins_BQ_ZUM_MEGA_3D.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * bq ZUM Mega 3D board definition - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "ZUM Mega 3D" - -#include "pins_RAMPS_13.h" - -#undef X_MAX_PIN -#define X_MAX_PIN 79 // 2 - -#undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 77 // 62 - -#undef FAN_PIN -#define FAN_PIN 12 // 4 - -#undef HEATER_0_PIN -#define HEATER_0_PIN 9 // 10 - -#undef HEATER_1_PIN -#define HEATER_1_PIN 10 // 9 - -#undef TEMP_1_PIN -#define TEMP_1_PIN 14 // 15 - -#undef TEMP_BED_PIN -#define TEMP_BED_PIN 15 // 14 - -#define DIGIPOTSS_PIN 22 -#define DIGIPOT_CHANNELS { 4, 5, 3, 0, 1 } - -#define FAN1_PIN 7 - -#undef PS_ON_PIN // 12 -#define PS_ON_PIN 81 // External Power Supply - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - #undef Z_MIN_PIN - #undef Z_MAX_PIN - #define Z_MIN_PIN 19 // IND_S_5V - #define Z_MAX_PIN 18 // Z-MIN Label -#endif diff --git a/Marlin/pins_BRAINWAVE.h b/Marlin/pins_BRAINWAVE.h deleted file mode 100644 index 9dfeb3a..0000000 --- a/Marlin/pins_BRAINWAVE.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Brainwave 1.0 pin assignments (AT90USB646) - * - * Requires hardware bundle for Arduino: - * https://github.com/unrepentantgeek/brainwave-arduino - */ - -#ifndef __AVR_AT90USB646__ - #error "Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Brainwave" - -#define X_STEP_PIN 27 -#define X_DIR_PIN 29 -#define X_ENABLE_PIN 28 -#define X_STOP_PIN 7 -#define X_ATT_PIN 26 - -#define Y_STEP_PIN 31 -#define Y_DIR_PIN 33 -#define Y_ENABLE_PIN 32 -#define Y_STOP_PIN 6 -#define Y_ATT_PIN 30 - -#define Z_STEP_PIN 17 -#define Z_DIR_PIN 19 -#define Z_ENABLE_PIN 18 -#define Z_STOP_PIN 5 -#define Z_ATT_PIN 16 - -#define E0_STEP_PIN 21 -#define E0_DIR_PIN 23 -#define E0_ENABLE_PIN 22 -#define E0_ATT_PIN 20 - -#define HEATER_0_PIN 4 // Extruder -#define HEATER_BED_PIN 38 // Bed -#define FAN_PIN 3 // Fan - -#define TEMP_0_PIN 7 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 6 // Bed / Analog pin numbering - -#define LED_PIN 39 diff --git a/Marlin/pins_BRAINWAVE_PRO.h b/Marlin/pins_BRAINWAVE_PRO.h deleted file mode 100644 index cba0d46..0000000 --- a/Marlin/pins_BRAINWAVE_PRO.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Brainwave Pro pin assignments (AT90USB1286) - * - * Requires hardware bundle for Arduino: - * https://github.com/unrepentantgeek/brainwave-arduino - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Brainwave Pro' selected from the 'Tools -> Boards' menu." -#endif - -#include "fastio.h" - -#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical. - #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config" -#endif - -#define BOARD_NAME "Brainwave Pro" - -#define LARGE_FLASH true - -#define X_STOP_PIN 47 -#define Y_STOP_PIN 18 -#define Z_MAX_PIN 36 -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 17 -#endif - -#define X_STEP_PIN 33 -#define X_DIR_PIN 32 -#define X_ENABLE_PIN 11 - -#define Y_STEP_PIN 31 -#define Y_DIR_PIN 30 -#define Y_ENABLE_PIN 8 - -#define Z_STEP_PIN 29 -#define Z_DIR_PIN 28 -#define Z_ENABLE_PIN 37 - -#define E0_STEP_PIN 35 -#define E0_DIR_PIN 34 -#define E0_ENABLE_PIN 13 - -#define HEATER_0_PIN 15 -#define HEATER_BED_PIN 14 // Bed -#define FAN_PIN 16 // Fan, PWM - -#define TEMP_0_PIN 2 // Extruder / Analog pin numbering -#define TEMP_1_PIN 1 // Spare / Analog pin numbering -#define TEMP_BED_PIN 0 // Bed / Analog pin numbering - -#define SDSS 20 -#define LED_PIN 19 -#define SD_DETECT_PIN 12 diff --git a/Marlin/pins_CHEAPTRONIC.h b/Marlin/pins_CHEAPTRONIC.h deleted file mode 100644 index 2fbb4e8..0000000 --- a/Marlin/pins_CHEAPTRONIC.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Cheaptronic v1.0 pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Cheaptronic v1.0" -#define LARGE_FLASH true - -// X motor stepper -#define X_STEP_PIN 14 -#define X_DIR_PIN 15 -#define X_ENABLE_PIN 24 - -// Y motor stepper -#define Y_STEP_PIN 35 -#define Y_DIR_PIN 36 -#define Y_ENABLE_PIN 31 - -// Z motor stepper -#define Z_STEP_PIN 40 -#define Z_DIR_PIN 41 -#define Z_ENABLE_PIN 37 - -// XYZ endstops -#define X_STOP_PIN 3 -#define Y_STOP_PIN 2 -#define Z_STOP_PIN 5 - -// Extruder 0 stepper -#define E0_STEP_PIN 26 -#define E0_DIR_PIN 28 -#define E0_ENABLE_PIN 25 - -// Extruder 1 stepper -#define E1_STEP_PIN 33 -#define E1_DIR_PIN 34 -#define E1_ENABLE_PIN 30 - - -#define HEATER_0_PIN 19 // EXTRUDER 1 -#define HEATER_1_PIN 23 // EXTRUDER 2 -#define HEATER_BED_PIN 22 - -// Temperature sensors -#define TEMP_0_PIN 15 -#define TEMP_1_PIN 14 -#define TEMP_BED_PIN 13 - -// Cheaptronic v1.0 doesn't support LCD -#define LCD_PINS_RS -1 -#define LCD_PINS_ENABLE -1 -#define LCD_PINS_D4 -1 -#define LCD_PINS_D5 -1 -#define LCD_PINS_D6 -1 -#define LCD_PINS_D7 -1 - -// Cheaptronic v1.0 doesn't support keypad -#define BTN_EN1 -1 -#define BTN_EN2 -1 -#define BTN_ENC -1 - -// Cheaptronic v1.0 doesn't use this diff --git a/Marlin/pins_CNCONTROLS_11.h b/Marlin/pins_CNCONTROLS_11.h deleted file mode 100644 index 1de35a2..0000000 --- a/Marlin/pins_CNCONTROLS_11.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * CartesioV11 pin assignments - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. -#endif - -#define BOARD_NAME "CN Controls V11" - -//#define LARGE_FLASH true - -#define X_ENABLE_PIN 35 -#define X_STEP_PIN 34 -#define X_DIR_PIN 36 -#define X_MIN_PIN 43 -#define X_MAX_PIN -1 - -#define Y_ENABLE_PIN 38 -#define Y_STEP_PIN 37 -#define Y_DIR_PIN 39 -#define Y_MIN_PIN 45 -#define Y_MAX_PIN -1 - -#define Z_ENABLE_PIN 41 -#define Z_STEP_PIN 40 -#define Z_DIR_PIN 48 -#define Z_MIN_PIN 42 -#define Z_MAX_PIN -1 - -#define E0_ENABLE_PIN 3 -#define E0_STEP_PIN 29 -#define E0_DIR_PIN 28 -#define HEATER_0_PIN 5 -#define TEMP_0_PIN 0 // ANALOG INPUT !! - -#define E1_ENABLE_PIN 60 -#define E1_STEP_PIN 61 -#define E1_DIR_PIN 62 -#define HEATER_1_PIN 58 -#define TEMP_1_PIN 3 // 3 for tool2 -> 2 for chambertemp - -#define E2_ENABLE_PIN 16 -#define E2_STEP_PIN 15 -#define E2_DIR_PIN 14 -#define HEATER_2_PIN 64 -#define TEMP_2_PIN 2 // 9 for tool3 -> 2 for chambertemp - -#define E3_ENABLE_PIN 47 -#define E3_STEP_PIN 44 -#define E3_DIR_PIN 49 -#define HEATER_3_PIN 46 -#define TEMP_3_PIN 11 // 11 for tool4 -> 2 for chambertemp - -#define HEATER_BED_PIN 2 -#define TEMP_BED_PIN 1 // ANALOG INPUT !! - -// Tools - -//#define TOOL_0_PIN 4 -//#define TOOL_1_PIN 59 -//#define TOOL_2_PIN 8 -//#define TOOL_3_PIN 30 -//#define TOOL_PWM_PIN 7 // common PWM pin for all tools - -// Common I/O - -//#define TEMP_CHAMBER_PIN 2 // ANALOG INPUT !! -//#define FIL_RUNOUT_PIN -1 -//#define PWM_1_PIN 11 -//#define PWM_2_PIN 10 -//#define SPARE_IO 12 -//#define FAN_PIN 7 // common PWM pin for all tools - -// User interface -#define BEEPER_PIN 6 - -// Pins for DOGM SPI LCD Support -#define DOGLCD_A0 26 -#define DOGLCD_CS 24 -#define DOGLCD_MOSI -1 -#define DOGLCD_SCK -1 - -// The encoder and click button -#define BTN_EN1 23 -#define BTN_EN2 25 -#define BTN_ENC 27 - -// Hardware buttons for manual movement of XYZ -#define SHIFT_OUT 19 -#define SHIFT_LD 18 -#define SHIFT_CLK 17 - -//#define UI1 31 -//#define UI2 22 - -// Other -#define SDSS 53 -#define SD_DETECT_PIN 13 -#define STAT_LED_BLUE -1 -#define STAT_LED_RED 31 diff --git a/Marlin/pins_CNCONTROLS_12.h b/Marlin/pins_CNCONTROLS_12.h deleted file mode 100644 index cb33834..0000000 --- a/Marlin/pins_CNCONTROLS_12.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * CartesioV12 pin assignments - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. -#endif - -#define BOARD_NAME "CN Controls V12" - -//#define LARGE_FLASH true - -#define X_ENABLE_PIN 26 -#define X_STEP_PIN 25 -#define X_DIR_PIN 27 -#define X_MIN_PIN 19 -#define X_MAX_PIN -1 - -#define Y_ENABLE_PIN 29 -#define Y_STEP_PIN 28 -#define Y_DIR_PIN 30 -#define Y_MIN_PIN 22 -#define Y_MAX_PIN -1 - -#define Z_ENABLE_PIN 32 -#define Z_STEP_PIN 31 -#define Z_DIR_PIN 33 -#define Z_MIN_PIN 23 -#define Z_MAX_PIN -1 - -#define E0_ENABLE_PIN 58 -#define E0_STEP_PIN 57 -#define E0_DIR_PIN 55 -#define HEATER_0_PIN 11 -#define TEMP_0_PIN 0 // ANALOG INPUT !! - -#define E1_ENABLE_PIN 60 -#define E1_STEP_PIN 61 -#define E1_DIR_PIN 62 -#define HEATER_1_PIN 9 -#define TEMP_1_PIN 9 // 9 for tool2 -> 13 for chambertemp - -#define E2_ENABLE_PIN 44 -#define E2_STEP_PIN 46 -#define E2_DIR_PIN 66 -#define HEATER_2_PIN 6 -#define TEMP_2_PIN 13 // 10 for tool3 -> 13 for chambertemp - -#define E3_ENABLE_PIN 47 -#define E3_STEP_PIN 45 -#define E3_DIR_PIN 69 -#define HEATER_3_PIN 3 -#define TEMP_3_PIN 11 // 11 for tool4 -> 13 for chambertemp - -#define HEATER_BED_PIN 24 -#define TEMP_BED_PIN 14 // ANALOG INPUT !! - -// Tools - -//#define TOOL_0_PIN 56 -//#define TOOL_0_PWM_PIN 10 // red warning led at dual extruder -//#define TOOL_1_PIN 59 -//#define TOOL_1_PWM_PIN 8 // lights at dual extruder -//#define TOOL_2_PIN 4 -//#define TOOL_2_PWM_PIN 5 -//#define TOOL_3_PIN 14 -//#define TOOL_3_PWM_PIN 2 - -// Common I/O - -//#define TEMP_CHAMBER_PIN 13 // ANALOG INPUT !! -#define FIL_RUNOUT_PIN 18 -//#define PWM_1_PIN 12 -//#define PWM_2_PIN 13 -//#define SPARE_IO 17 -#define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools - -// User interface -#define BEEPER_PIN 16 - -// Pins for DOGM SPI LCD Support -#define DOGLCD_A0 39 -#define DOGLCD_CS 35 -#define DOGLCD_MOSI 48 -#define DOGLCD_SCK 49 -#define LCD_SCREEN_ROT_180 - -// The encoder and click button -#define BTN_EN1 36 -#define BTN_EN2 34 -#define BTN_ENC 38 - -// Hardware buttons for manual movement of XYZ -#define SHIFT_OUT 42 -#define SHIFT_LD 41 -#define SHIFT_CLK 40 - -//#define UI1 43 -//#define UI2 37 - -// Other -#define SDSS 53 -#define SD_DETECT_PIN 15 -#define STAT_LED_BLUE -1 -#define STAT_LED_RED 10 // TOOL_0_PWM_PIN diff --git a/Marlin/pins_ELEFU_3.h b/Marlin/pins_ELEFU_3.h deleted file mode 100644 index 2b8e64d..0000000 --- a/Marlin/pins_ELEFU_3.h +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Elefu RA Board Pin Assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Elefu Ra v3" - -#define X_STEP_PIN 49 -#define X_DIR_PIN 13 -#define X_ENABLE_PIN 48 -#define X_MIN_PIN 35 -#define X_MAX_PIN 34 - -#define Y_STEP_PIN 11 -#define Y_DIR_PIN 9 -#define Y_ENABLE_PIN 12 -#define Y_MIN_PIN 33 -#define Y_MAX_PIN 32 - -#define Z_STEP_PIN 7 -#define Z_DIR_PIN 6 -#define Z_ENABLE_PIN 8 -#define Z_MIN_PIN 31 -#define Z_MAX_PIN 30 - -#define E2_STEP_PIN 43 -#define E2_DIR_PIN 47 -#define E2_ENABLE_PIN 42 - -#define E1_STEP_PIN 18 -#define E1_DIR_PIN 19 -#define E1_ENABLE_PIN 38 - -#define E0_STEP_PIN 40 -#define E0_DIR_PIN 41 -#define E0_ENABLE_PIN 37 - -#define FAN_PIN 16 //5V PWM - -#define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector -#define SLEEP_WAKE_PIN 26 //This feature still needs work - -#define HEATER_0_PIN 45 //12V PWM1 -#define HEATER_1_PIN 46 //12V PWM2 -#define HEATER_2_PIN 17 //12V PWM3 -#define HEATER_BED_PIN 44 //DOUBLE 12V PWM -#define TEMP_0_PIN 3 //ANALOG NUMBERING -#define TEMP_1_PIN 2 //ANALOG NUMBERING -#define TEMP_2_PIN 1 //ANALOG NUMBERING -#define TEMP_BED_PIN 0 //ANALOG NUMBERING - -#define BEEPER_PIN 36 - -// M240 Triggers a camera by emulating a Canon RC-1 Remote -// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ -#define PHOTOGRAPH_PIN 29 - -#if ENABLED(RA_CONTROL_PANEL) - - #define SDSS 53 - #define SD_DETECT_PIN 28 - - #define BTN_EN1 14 - #define BTN_EN2 39 - #define BTN_ENC 15 - -#endif // RA_CONTROL_PANEL - -#if ENABLED(RA_DISCO) - //variables for which pins the TLC5947 is using - #define TLC_CLOCK_PIN 25 - #define TLC_BLANK_PIN 23 - #define TLC_XLAT_PIN 22 - #define TLC_DATA_PIN 24 - - //We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet! - //This currently only works with the RA Board. - #define TLC_CLOCK_BIT 3 //bit 3 on port A - #define TLC_CLOCK_PORT &PORTA //bit 3 on port A - - #define TLC_BLANK_BIT 1 //bit 1 on port A - #define TLC_BLANK_PORT &PORTA //bit 1 on port A - - #define TLC_DATA_BIT 2 //bit 2 on port A - #define TLC_DATA_PORT &PORTA //bit 2 on port A - - #define TLC_XLAT_BIT 0 //bit 0 on port A - #define TLC_XLAT_PORT &PORTA //bit 0 on port A - - //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful - //Leave it at at least 1 if you have enabled RA_LIGHTING - //The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module. - #define NUM_TLCS 2 - - //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions. - //Modify them according to your specific situation. - //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs. - #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards - //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards -#endif // RA_DISCO diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h deleted file mode 100644 index 31906b5..0000000 --- a/Marlin/pins_FELIX2.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments - */ - -#if HOTENDS > 2 - #error "Felix 2.0+ supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "Felix 2.0+" - -// Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 - -#include "pins_RAMPS.h" - -#undef SDPOWER -#define SDPOWER 1 - -#define PS_ON_PIN 12 - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - - #define SD_DETECT_PIN 6 - -#endif // NEWPANEL && ULTRA_LCD diff --git a/Marlin/pins_GEN3_MONOLITHIC.h b/Marlin/pins_GEN3_MONOLITHIC.h deleted file mode 100644 index 85d5b3f..0000000 --- a/Marlin/pins_GEN3_MONOLITHIC.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen3 Monolithic Electronics pin assignments - */ - -#ifndef __AVR_ATmega644P__ - #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Gen3 Monolithic" -#define DEBUG_PIN 0 - -// x axis -#define X_STEP_PIN 15 -#define X_DIR_PIN 18 -#define X_MIN_PIN 20 -// Alex Checar #define X_STOP_PIN 20 -#define X_ENABLE_PIN 24 // actually uses Y_enable_pin -#define X_MAX_PIN -1 - -// y axis -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_MIN_PIN 25 -// Alex Checar #define Y_STOP_PIN 25 -#define Y_ENABLE_PIN 24 // shared with X_enable_pin -#define Y_MAX_PIN -1 - -// z axis -#define Z_STEP_PIN 27 -#define Z_DIR_PIN 28 -#define Z_MIN_PIN 30 -// Alex Checar #define Z_STOP_PIN 30 -#define Z_ENABLE_PIN 29 -#define Z_MAX_PIN -1 - -// extruder pins -#define E0_STEP_PIN 12 -#define E0_DIR_PIN 17 -#define E0_ENABLE_PIN 3 - -#define HEATER_0_PIN 16 -#define TEMP_0_PIN 0 - -// pin for controlling the PSU. -#define PS_ON_PIN 14 // Alex, Do this work on the card? - -// Alex extras from Gen3+ diff --git a/Marlin/pins_GEN3_PLUS.h b/Marlin/pins_GEN3_PLUS.h deleted file mode 100644 index 7889a01..0000000 --- a/Marlin/pins_GEN3_PLUS.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen3+ pin assignments - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Gen3+" - -#define X_STEP_PIN 15 -#define X_DIR_PIN 18 -#define X_STOP_PIN 20 - -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_STOP_PIN 25 - -#define Z_STEP_PIN 27 -#define Z_DIR_PIN 28 -#define Z_STOP_PIN 30 - -#define E0_STEP_PIN 17 -#define E0_DIR_PIN 21 - -#define PS_ON_PIN 14 - -#define HEATER_0_PIN 12 // (extruder) - -#define HEATER_BED_PIN 16 // (bed) -#define X_ENABLE_PIN 19 -#define Y_ENABLE_PIN 24 -#define Z_ENABLE_PIN 29 -#define E0_ENABLE_PIN 13 - -#define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder) -#define TEMP_BED_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed) -#define SDSS 4 diff --git a/Marlin/pins_GEN6.h b/Marlin/pins_GEN6.h deleted file mode 100644 index ae3d33a..0000000 --- a/Marlin/pins_GEN6.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen6 pin assignments - */ - -#ifndef __AVR_ATmega644P__ - #ifndef __AVR_ATmega1284P__ - #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." - #endif -#endif - -#ifndef BOARD_NAME - #define BOARD_NAME "Gen6" -#endif - -//x axis pins -#define X_STEP_PIN 15 -#define X_DIR_PIN 18 -#define X_ENABLE_PIN 19 -#define X_STOP_PIN 20 - -//y axis pins -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_ENABLE_PIN 24 -#define Y_STOP_PIN 25 - -//z axis pins -#define Z_STEP_PIN 27 -#define Z_DIR_PIN 28 -#define Z_ENABLE_PIN 29 -#define Z_STOP_PIN 30 - -//extruder pins -#define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715 -#define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715 -#define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715 -#define TEMP_0_PIN 5 //changed @ rkoeppl 20110410 - -#define HEATER_0_PIN 14 //changed @ rkoeppl 20110410 - -#if !MB(GEN6) - #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410 - #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410 -#endif - -#define SDSS 17 -//our pin for debugging. - -#define DEBUG_PIN 0 - -//our RS485 pins -#define TX_ENABLE_PIN 12 -#define RX_ENABLE_PIN 13 diff --git a/Marlin/pins_GEN6_DELUXE.h b/Marlin/pins_GEN6_DELUXE.h deleted file mode 100644 index b1a1037..0000000 --- a/Marlin/pins_GEN6_DELUXE.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen6 Deluxe pin assignments - */ - -#define BOARD_NAME "Gen6 Deluxe" - -#include "pins_GEN6.h" diff --git a/Marlin/pins_GEN7_12.h b/Marlin/pins_GEN7_12.h deleted file mode 100644 index 1e59ae6..0000000 --- a/Marlin/pins_GEN7_12.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen7 v1.1, v1.2, v1.3 pin assignments - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." -#endif - -#ifndef BOARD_NAME - #define BOARD_NAME "Gen7 v1.1 / 1.2" -#endif - -#ifndef GEN7_VERSION - #define GEN7_VERSION 12 // v1.x -#endif - -//x axis pins -#define X_STEP_PIN 19 -#define X_DIR_PIN 18 -#define X_ENABLE_PIN 24 -#define X_STOP_PIN 7 - -//y axis pins -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_ENABLE_PIN 24 -#define Y_STOP_PIN 5 - -//z axis pins -#define Z_STEP_PIN 26 -#define Z_DIR_PIN 25 -#define Z_ENABLE_PIN 24 -#define Z_MIN_PIN 1 -#define Z_MAX_PIN 0 - -//extruder pins -#define E0_STEP_PIN 28 -#define E0_DIR_PIN 27 -#define E0_ENABLE_PIN 24 - -#define TEMP_0_PIN 1 -#define TEMP_BED_PIN 2 - -#define HEATER_0_PIN 4 -#define HEATER_BED_PIN 3 - - -// Gen7 v1.3 removed the fan pin -#if GEN7_VERSION < 13 - #define FAN_PIN 31 -#endif - -#define PS_ON_PIN 15 - -//All these generations of Gen7 supply thermistor power -//via PS_ON, so ignore bad thermistor readings -#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE - -//our pin for debugging. -#define DEBUG_PIN 0 - -//our RS485 pins -#define TX_ENABLE_PIN 12 -#define RX_ENABLE_PIN 13 - diff --git a/Marlin/pins_GEN7_13.h b/Marlin/pins_GEN7_13.h deleted file mode 100644 index 2365ae8..0000000 --- a/Marlin/pins_GEN7_13.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen7 v1.3 pin assignments - */ - -#define BOARD_NAME "Gen7 v1.3" - -#define GEN7_VERSION 13 // v1.3 -#include "pins_GEN7_12.h" diff --git a/Marlin/pins_GEN7_14.h b/Marlin/pins_GEN7_14.h deleted file mode 100644 index 87ccb60..0000000 --- a/Marlin/pins_GEN7_14.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen7 v1.4 pin assignments - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Gen7 v1.4" - -#define GEN7_VERSION 14 // v1.4 - -//x axis pins -#define X_STEP_PIN 29 -#define X_DIR_PIN 28 -#define X_ENABLE_PIN 25 -#define X_STOP_PIN 0 - -//y axis pins -#define Y_STEP_PIN 27 -#define Y_DIR_PIN 26 -#define Y_ENABLE_PIN 25 -#define Y_STOP_PIN 1 - -//z axis pins -#define Z_STEP_PIN 23 -#define Z_DIR_PIN 22 -#define Z_ENABLE_PIN 25 -#define Z_STOP_PIN 2 - -//extruder pins -#define E0_STEP_PIN 19 -#define E0_DIR_PIN 18 -#define E0_ENABLE_PIN 25 - -#define TEMP_0_PIN 1 -#define TEMP_BED_PIN 0 - -#define HEATER_0_PIN 4 -#define HEATER_BED_PIN 3 - -#define PS_ON_PIN 15 - -//our pin for debugging. -#define DEBUG_PIN 0 - -//our RS485 pins -#define TX_ENABLE_PIN 12 -#define RX_ENABLE_PIN 13 diff --git a/Marlin/pins_GEN7_CUSTOM.h b/Marlin/pins_GEN7_CUSTOM.h deleted file mode 100644 index 06aaebd..0000000 --- a/Marlin/pins_GEN7_CUSTOM.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Gen7 Alfons3 board pin assignments - * - * These Pins are assigned for the modified GEN7 Board from Alfons3. - * Please review the pins and adjust them for your needs. - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Gen7 Custom" - -//x axis pins -#define X_STEP_PIN 21 // different from standard GEN7 -#define X_DIR_PIN 20 // different from standard GEN7 -#define X_ENABLE_PIN 24 -#define X_STOP_PIN 0 - -//y axis pins -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_ENABLE_PIN 24 -#define Y_STOP_PIN 1 - -//z axis pins -#define Z_STEP_PIN 26 -#define Z_DIR_PIN 25 -#define Z_ENABLE_PIN 24 -#define Z_STOP_PIN 2 - -//extruder pins -#define E0_STEP_PIN 28 -#define E0_DIR_PIN 27 -#define E0_ENABLE_PIN 24 - -#define TEMP_0_PIN 2 -#define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed) - -#define HEATER_0_PIN 4 -#define HEATER_BED_PIN 3 // (bed) - -#define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support - -#define PS_ON_PIN 19 -//our pin for debugging. - -#define DEBUG_PIN -1 - -//our RS485 pins -//#define TX_ENABLE_PIN 12 -//#define RX_ENABLE_PIN 13 - -#define BEEPER_PIN -1 - -//Pins for 4bit LCD Support -#define LCD_PINS_RS 18 -#define LCD_PINS_ENABLE 17 -#define LCD_PINS_D4 16 -#define LCD_PINS_D5 15 -#define LCD_PINS_D6 13 -#define LCD_PINS_D7 14 - -//buttons are directly attached -#define BTN_EN1 11 -#define BTN_EN2 10 -#define BTN_ENC 12 - diff --git a/Marlin/pins_K8200.h b/Marlin/pins_K8200.h deleted file mode 100644 index cc3e731..0000000 --- a/Marlin/pins_K8200.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * K8200 Arduino Mega with RAMPS v1.3 pin assignments - * Identical to 3DRAG - */ - -#define BOARD_NAME "Velleman K8200" -#define DEFAULT_MACHINE_NAME "K8200" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/CONSULitAS/Marlin-K8200" - -#include "pins_3DRAG.h" diff --git a/Marlin/pins_K8400.h b/Marlin/pins_K8400.h deleted file mode 100644 index a15e9e4..0000000 --- a/Marlin/pins_K8400.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Velleman K8400 (Vertex) - * 3DRAG clone - * - * K8400 has some minor differences over a normal 3Drag: - * - No X/Y max endstops - * - Second extruder step pin has moved - * - No power supply control - * - Second heater has moved pin - */ - -#define BOARD_NAME "K8400" -#define DEFAULT_MACHINE_NAME "Vertex" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/birkett/Vertex-K8400-Firmware" - -#include "pins_3DRAG.h" - -#undef X_MAX_PIN -#define X_MAX_PIN -1 -#undef Y_MAX_PIN -#define Y_MAX_PIN -1 - -#undef E1_STEP_PIN -#define E1_STEP_PIN 32 - -#undef PS_ON_PIN -#undef KILL_PIN - -#undef HEATER_1_PIN -#define HEATER_1_PIN 11 diff --git a/Marlin/pins_LEAPFROG.h b/Marlin/pins_LEAPFROG.h deleted file mode 100644 index acfba03..0000000 --- a/Marlin/pins_LEAPFROG.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Leapfrog Driver board pin assignments - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Leapfrog" - -#define X_STEP_PIN 28 -#define X_DIR_PIN 63 -#define X_ENABLE_PIN 29 -#define X_MIN_PIN 47 -#define X_MAX_PIN 2 //Max endstops default to disabled "-1", set to commented value to enable. - -#define Y_STEP_PIN 14 // A6 -#define Y_DIR_PIN 15 // A0 -#define Y_ENABLE_PIN 39 -#define Y_MIN_PIN 48 -#define Y_MAX_PIN 15 - -#define Z_STEP_PIN 31 // A2 -#define Z_DIR_PIN 32 // A6 -#define Z_ENABLE_PIN 30 // A1 -#define Z_MIN_PIN 49 -#define Z_MAX_PIN -1 - -#define E0_STEP_PIN 34 //34 -#define E0_DIR_PIN 35 //35 -#define E0_ENABLE_PIN 33 //33 - -#define E1_STEP_PIN 37 //37 -#define E1_DIR_PIN 40 //40 -#define E1_ENABLE_PIN 36 //36 - -#define SDSS 11 -#define LED_PIN 13 -#define FAN_PIN 7 -#define SOL1_PIN 16 -#define SOL2_PIN 17 - -#define HEATER_0_PIN 9 -#define HEATER_1_PIN 8 // 12 -#define HEATER_2_PIN 11 //-1 // 13 -#define TEMP_0_PIN 13 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! -#define TEMP_1_PIN 15 // 1 -#define HEATER_BED_PIN 10 // 14/15 -#define TEMP_BED_PIN 14 // 1,2 or I2C -/* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */ - diff --git a/Marlin/pins_MEGACONTROLLER.h b/Marlin/pins_MEGACONTROLLER.h deleted file mode 100644 index 7ea4ee3..0000000 --- a/Marlin/pins_MEGACONTROLLER.h +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Mega controller pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#if E_STEPPERS > 2 || HOTENDS > 2 - #error "Mega Controller supports up to 2 hotends / E-steppers. Comment this line to keep going." -#endif - -#define BOARD_NAME "Mega Controller" - -#define SERVO0_PIN 30 -#define SERVO1_PIN 31 -#define SERVO2_PIN 32 -#define SERVO3_PIN 33 - -#define X_STEP_PIN 62//A8 -#define X_DIR_PIN 63//A9 -#define X_ENABLE_PIN 61//A7 -#define X_MIN_PIN 43 -#define X_MAX_PIN 42 //Max endstops default to disabled "-1", set to commented value to enable. - -#define Y_STEP_PIN 65 // A11 -#define Y_DIR_PIN 66 // A12 -#define Y_ENABLE_PIN 64//A10 -#define Y_MIN_PIN 38 -#define Y_MAX_PIN 41 - -#define Z_STEP_PIN 68 // A14 -#define Z_DIR_PIN 69 // A15 -#define Z_ENABLE_PIN 67 // A13 -#define Z_MIN_PIN 40 -#define Z_MAX_PIN 37 - -#define E0_STEP_PIN 23 -#define E0_DIR_PIN 24 -#define E0_ENABLE_PIN 22 - -#define E1_STEP_PIN 26 -#define E1_DIR_PIN 27 -#define E1_ENABLE_PIN 25 - -#define SDSS 53 -#define LED_PIN 13 - -#define FAN_PIN 39 -#define FAN1_PIN 35 -#define FAN2_PIN 36 -#define FAN_SOFT_PWM -#define CONTROLLERFAN_PIN FAN2_PIN - -#define HEATER_0_PIN 29 // EXTRUDER 1 -#define HEATER_1_PIN 34 // EXTRUDER 2 - -#if TEMP_SENSOR_0 == -1 - #define TEMP_0_PIN 4 // ANALOG NUMBERING -#else - #define TEMP_0_PIN 0 // ANALOG NUMBERING -#endif - -#if TEMP_SENSOR_1 == -1 - #define TEMP_1_PIN 5 // ANALOG NUMBERING -#else - #define TEMP_1_PIN 2 // ANALOG NUMBERING -#endif - -#define TEMP_2_PIN 3 // ANALOG NUMBERING - -#define HEATER_BED_PIN 28 // BED - -#if TEMP_SENSOR_BED == -1 - #define TEMP_BED_PIN 6 // ANALOG NUMBERING -#else - #define TEMP_BED_PIN 1 // ANALOG NUMBERING -#endif - -#if ENABLED(MINIPANEL) - #define BEEPER_PIN 46 - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 47 - #define DOGLCD_CS 45 - #define LCD_PIN_BL 44 // backlight LED on PA3 - - #define KILL_PIN 12 - // GLCD features - //#define LCD_CONTRAST 190 - // Uncomment screen orientation - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 - - #define BTN_EN1 48 - #define BTN_EN2 11 - #define BTN_ENC 10 - - #define SD_DETECT_PIN 49 -#endif // MINIPANEL - diff --git a/Marlin/pins_MEGATRONICS.h b/Marlin/pins_MEGATRONICS.h deleted file mode 100644 index 1b95f52..0000000 --- a/Marlin/pins_MEGATRONICS.h +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * MegaTronics pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Megatronics" -#define LARGE_FLASH true - -#define X_STEP_PIN 26 -#define X_DIR_PIN 28 -#define X_ENABLE_PIN 24 -#define X_MIN_PIN 41 -#define X_MAX_PIN 37 - -#define Y_STEP_PIN 60 // A6 -#define Y_DIR_PIN 61 // A7 -#define Y_ENABLE_PIN 22 -#define Y_MIN_PIN 14 -#define Y_MAX_PIN 15 - -#define Z_STEP_PIN 54 // A0 -#define Z_DIR_PIN 55 // A1 -#define Z_ENABLE_PIN 56 // A2 -#define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 - -#define E0_STEP_PIN 31 -#define E0_DIR_PIN 32 -#define E0_ENABLE_PIN 38 - -#define E1_STEP_PIN 34 -#define E1_DIR_PIN 36 -#define E1_ENABLE_PIN 30 - -#define SDSS 53 -#define LED_PIN 13 - -#define FAN_PIN 7 // IO pin. Buffer needed -#define PS_ON_PIN 12 - -#define HEATER_0_PIN 9 -#define HEATER_1_PIN 8 -#define HEATER_BED_PIN 10 // BED - -#if TEMP_SENSOR_0 == -1 - #define TEMP_0_PIN 8 // ANALOG NUMBERING -#else - #define TEMP_0_PIN 13 // ANALOG NUMBERING -#endif -#define TEMP_1_PIN 15 // ANALOG NUMBERING -#define TEMP_BED_PIN 14 // ANALOG NUMBERING - -// AUX-4 -#define BEEPER_PIN 33 - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - - #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #define LCD_PINS_D7 29 - - // Buttons directly attached using AUX-2 - #define BTN_EN1 59 - #define BTN_EN2 64 - #define BTN_ENC 43 - - #define SD_DETECT_PIN -1 // RAMPS doesn't use this - -#endif // ULTRA_LCD && NEWPANEL diff --git a/Marlin/pins_MEGATRONICS_2.h b/Marlin/pins_MEGATRONICS_2.h deleted file mode 100644 index 991ab4a..0000000 --- a/Marlin/pins_MEGATRONICS_2.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * MegaTronics v2.0 pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Megatronics v2.0" -#define LARGE_FLASH true - -#define X_STEP_PIN 26 -#define X_DIR_PIN 27 -#define X_ENABLE_PIN 25 -#define X_MIN_PIN 37 -#define X_MAX_PIN 40 - -#define Y_STEP_PIN 4 // A6 -#define Y_DIR_PIN 54 // A0 -#define Y_ENABLE_PIN 5 -#define Y_MIN_PIN 41 -#define Y_MAX_PIN 38 - -#define Z_STEP_PIN 56 // A2 -#define Z_DIR_PIN 60 // A6 -#define Z_ENABLE_PIN 55 // A1 -#define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 - -#define E0_STEP_PIN 35 -#define E0_DIR_PIN 36 -#define E0_ENABLE_PIN 34 - -#define E1_STEP_PIN 29 -#define E1_DIR_PIN 39 -#define E1_ENABLE_PIN 28 - -#define E2_STEP_PIN 23 -#define E2_DIR_PIN 24 -#define E2_ENABLE_PIN 22 - -#define SDSS 53 -#define LED_PIN 13 - -#define FAN_PIN 7 -#define FAN2_PIN 6 -#define PS_ON_PIN 12 - -#define HEATER_0_PIN 9 // EXTRUDER 1 -#if TEMP_SENSOR_0 == -1 - #define TEMP_0_PIN 4 // ANALOG NUMBERING -#else - #define TEMP_0_PIN 13 // ANALOG NUMBERING -#endif - -#define HEATER_1_PIN 8 // EXTRUDER 2 -#if TEMP_SENSOR_1 == -1 - #define TEMP_1_PIN 8 // ANALOG NUMBERING -#else - #define TEMP_1_PIN 15 // ANALOG NUMBERING -#endif - -#define HEATER_BED_PIN 10 // BED -#if TEMP_SENSOR_BED == -1 - #define TEMP_BED_PIN 8 // ANALOG NUMBERING -#else - #define TEMP_BED_PIN 14 // ANALOG NUMBERING -#endif - -#define BEEPER_PIN 64 - -#define LCD_PINS_RS 14 -#define LCD_PINS_ENABLE 15 -#define LCD_PINS_D4 30 -#define LCD_PINS_D5 31 -#define LCD_PINS_D6 32 -#define LCD_PINS_D7 33 - -// Buttons are directly attached using keypad -#define BTN_EN1 61 -#define BTN_EN2 59 -#define BTN_ENC 43 diff --git a/Marlin/pins_MEGATRONICS_3.h b/Marlin/pins_MEGATRONICS_3.h deleted file mode 100644 index a983ee2..0000000 --- a/Marlin/pins_MEGATRONICS_3.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * MegaTronics v3.0 pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define MEGATRONICS_31 - -#if ENABLED(MEGATRONICS_31) - #define BOARD_NAME "Megatronics v3.1" -#else - #define BOARD_NAME "Megatronics v3.0" -#endif - -#define LARGE_FLASH true - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - -// Servo support -#define SERVO0_PIN 46 // AUX3-6 -#define SERVO1_PIN 47 // AUX3-5 -#define SERVO2_PIN 48 // AUX3-4 -#define SERVO3_PIN 49 // AUX3-3 - -#define X_STEP_PIN 58 -#define X_DIR_PIN 57 -#define X_ENABLE_PIN 59 -#define X_MIN_PIN 37 -#define X_MAX_PIN 40 - -#define Y_STEP_PIN 5 -#define Y_DIR_PIN 17 -#define Y_ENABLE_PIN 4 -#define Y_MIN_PIN 41 -#define Y_MAX_PIN 38 - -#define Z_STEP_PIN 16 -#define Z_DIR_PIN 11 -#define Z_ENABLE_PIN 3 -#define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 - -#define E0_STEP_PIN 28 -#define E0_DIR_PIN 27 -#define E0_ENABLE_PIN 29 - -#define E1_STEP_PIN 25 -#define E1_DIR_PIN 24 -#define E1_ENABLE_PIN 26 - -#define E2_STEP_PIN 22 -#define E2_DIR_PIN 60 -#define E2_ENABLE_PIN 23 - -#define SDSS 53 -#define LED_PIN 13 - -#define PS_ON_PIN 12 - -#define HEATER_0_PIN 2 -#define HEATER_1_PIN 9 -#define HEATER_2_PIN 8 -#define HEATER_BED_PIN 10 -#define FAN_PIN 6 -#define FAN2_PIN 7 - -#if TEMP_SENSOR_0 == -1 - #define TEMP_0_PIN 11 // ANALOG NUMBERING -#else - #define TEMP_0_PIN 15 // ANALOG NUMBERING -#endif -#if TEMP_SENSOR_1 == -1 - #define TEMP_1_PIN 10 // ANALOG NUMBERING -#else - #define TEMP_1_PIN 13 // ANALOG NUMBERING -#endif -#if TEMP_SENSOR_2 == -1 - #define TEMP_2_PIN 9 // ANALOG NUMBERING -#else - #define TEMP_2_PIN 12 // ANALOG NUMBERING -#endif -#if TEMP_SENSOR_BED == -1 - #define TEMP_BED_PIN 8 // ANALOG NUMBERING -#else - #define TEMP_BED_PIN 14 // ANALOG NUMBERING -#endif - -/** - * Controllers and LCDs - */ -#define BEEPER_PIN 61 - -#define BTN_EN1 44 -#define BTN_EN2 45 -#define BTN_ENC 33 - -#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 56 // CS chip select / SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock - #define SD_DETECT_PIN 35 -#else - #define LCD_PINS_RS 32 - #define LCD_PINS_ENABLE 31 - #define LCD_PINS_D4 14 - #define LCD_PINS_D5 30 - #define LCD_PINS_D6 39 - #define LCD_PINS_D7 15 - - #define SHIFT_CLK 43 - #define SHIFT_LD 35 - #define SHIFT_OUT 34 - #define SHIFT_EN 44 - - #if ENABLED(MEGATRONICS_31) - #define SD_DETECT_PIN 56 - #else - #define SD_DETECT_PIN -1 - #endif - -#endif diff --git a/Marlin/pins_MELZI.h b/Marlin/pins_MELZI.h deleted file mode 100644 index 677f0cf..0000000 --- a/Marlin/pins_MELZI.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Melzi pin assignments - */ - -#define BOARD_NAME "Melzi" - -#if defined(__AVR_ATmega1284P__) - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_MELZI_MAKR3D.h b/Marlin/pins_MELZI_MAKR3D.h deleted file mode 100644 index 877f8cb..0000000 --- a/Marlin/pins_MELZI_MAKR3D.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Melzi with ATmega1284 (MaKr3d version) pin assignments - */ - -#define BOARD_NAME "Melzi ATmega1284" - -#if defined(__AVR_ATmega1284P__) - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_MINIRAMBO.h b/Marlin/pins_MINIRAMBO.h deleted file mode 100644 index 089ea59..0000000 --- a/Marlin/pins_MINIRAMBO.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Mini-Rambo pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Mini Rambo" -#define LARGE_FLASH true - -#define X_STEP_PIN 37 -#define X_DIR_PIN 48 -#define X_MIN_PIN 12 -#define X_MAX_PIN 30 -#define X_ENABLE_PIN 29 -#define X_MS1_PIN 40 -#define X_MS2_PIN 41 - -#define Y_STEP_PIN 36 -#define Y_DIR_PIN 49 -#define Y_MIN_PIN 11 -#define Y_MAX_PIN 24 -#define Y_ENABLE_PIN 28 -#define Y_MS1_PIN 69 -#define Y_MS2_PIN 39 - -#define Z_STEP_PIN 35 -#define Z_DIR_PIN 47 -#define Z_MIN_PIN 10 -#define Z_MAX_PIN 23 -#define Z_ENABLE_PIN 27 -#define Z_MS1_PIN 68 -#define Z_MS2_PIN 67 - -#define HEATER_BED_PIN 4 -#define TEMP_BED_PIN 2 - -#define HEATER_0_PIN 3 -#define TEMP_0_PIN 0 - -#define HEATER_1_PIN 7 -#define TEMP_1_PIN 1 - -#if ENABLED(BARICUDA) - #define HEATER_2_PIN 6 -#endif - -#define E0_STEP_PIN 34 -#define E0_DIR_PIN 43 -#define E0_ENABLE_PIN 26 -#define E0_MS1_PIN 65 -#define E0_MS2_PIN 66 - -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 - -#define MOTOR_CURRENT_PWM_XY_PIN 46 -#define MOTOR_CURRENT_PWM_Z_PIN 45 -#define MOTOR_CURRENT_PWM_E_PIN 44 -//Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range -#define MOTOR_CURRENT_PWM_RANGE 2000 -#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250} -#define SDSS 53 -#define LED_PIN 13 -#define FAN_PIN 8 -#define FAN_1_PIN 6 - -#if ENABLED(ULTRA_LCD) - - #define KILL_PIN 32 - - #if ENABLED(NEWPANEL) - - // Beeper on AUX-4 - #define BEEPER_PIN 84 - - #define LCD_PINS_RS 82 - #define LCD_PINS_ENABLE 18 - #define LCD_PINS_D4 19 - #define LCD_PINS_D5 70 - #define LCD_PINS_D6 85 - #define LCD_PINS_D7 71 - - //buttons are directly attached using AUX-2 - #define BTN_EN1 14 - #define BTN_EN2 72 - #define BTN_ENC 9 // the click - - #define SD_DETECT_PIN 15 - - #endif //NEWPANEL -#endif //ULTRA_LCD diff --git a/Marlin/pins_MINITRONICS.h b/Marlin/pins_MINITRONICS.h deleted file mode 100644 index 34faa9a..0000000 --- a/Marlin/pins_MINITRONICS.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Minitronics v1.0/1.1 pin assignments - */ - -#ifndef __AVR_ATmega1281__ - #error "Oops! Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Minitronics v1.0 / v1.1" -#define LARGE_FLASH true - -#define X_STEP_PIN 48 -#define X_DIR_PIN 47 -#define X_ENABLE_PIN 49 -#define X_MIN_PIN 5 -#define X_MAX_PIN 2 - -#define Y_STEP_PIN 39 // A6 -#define Y_DIR_PIN 40 // A0 -#define Y_ENABLE_PIN 38 -#define Y_MIN_PIN 2 -#define Y_MAX_PIN 15 - -#define Z_STEP_PIN 42 // A2 -#define Z_DIR_PIN 43 // A6 -#define Z_ENABLE_PIN 41 // A1 -#define Z_MIN_PIN 6 -#define Z_MAX_PIN -1 - -#define E0_STEP_PIN 45 -#define E0_DIR_PIN 44 -#define E0_ENABLE_PIN 27 - -#define E1_STEP_PIN 36 -#define E1_DIR_PIN 35 -#define E1_ENABLE_PIN 37 - -#define E2_STEP_PIN -1 -#define E2_DIR_PIN -1 -#define E2_ENABLE_PIN -1 - -#define SDSS 16 -#define LED_PIN 46 - -#define FAN_PIN 9 - -#define TEMP_0_PIN 7 // ANALOG NUMBERING -#define TEMP_1_PIN 6 // ANALOG NUMBERING -#define TEMP_BED_PIN 6 // ANALOG NUMBERING - -#define HEATER_0_PIN 7 // EXTRUDER 1 -#define HEATER_1_PIN 8 // EXTRUDER 2 -#define HEATER_BED_PIN 3 // BED - -/** - * Controllers and LCDs - */ -#define BEEPER_PIN -1 - -#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - - #define LCD_PINS_RS 15 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 11 // SID (MOSI) - #define LCD_PINS_D4 10 // SCK (CLK) clock - - #define BTN_EN1 18 - #define BTN_EN2 17 - #define BTN_ENC 25 - - #define SD_DETECT_PIN 30 - -#else - - #define LCD_PINS_RS -1 - #define LCD_PINS_ENABLE -1 - #define LCD_PINS_D4 -1 - #define LCD_PINS_D5 -1 - #define LCD_PINS_D6 -1 - #define LCD_PINS_D7 -1 - - // Buttons are directly attached using keypad - #define BTN_EN1 -1 - #define BTN_EN2 -1 - #define BTN_ENC -1 - - #define SD_DETECT_PIN -1 // Minitronics doesn't use this -#endif diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h deleted file mode 100644 index 3b5b242..0000000 --- a/Marlin/pins_MKS_13.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.4 adjusted pin assignments - * - * MKS v1.3 (Extruder, Fan, Bed) - * MKS v1.3 (Extruder, Extruder, Fan, Bed) - * MKS v1.4 (Extruder, Fan, Bed) - * MKS v1.4 (Extruder, Extruder, Fan, Bed) - */ - -#if HOTENDS > 2 - #error "MKS 1.3/1.4 supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "MKS > v1.3" - -// Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 - -#include "pins_RAMPS.h" - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - /** - * VIKI2 Has two groups of wires with... - * - * +Vin + Input supply, requires 120ma for LCD and mSD card - * GND Ground Pin - * MOSI Data input for LCD and SD - * MISO Data output for SD - * SCK Clock for LCD and SD - * AO Reg. Sel for LCD - * LCS Chip Select for LCD - * SDCS Chip Select for SD - * SDCD Card Detect pin for SD - * ENCA Encoder output A - * ENCB Encoder output B - * ENCBTN Encoder button switch - * - * BTN Panel mounted button switch - * BUZZER Piezo buzzer - * BLUE-LED Blue LED ring pin (3 to 5v, mosfet buffered) - * RED-LED Red LED ring pin (3 to 5v, mosfet buffered) - * - * This configuration uses the following arrangement: - * - * EXP1 D37 = EN2 D35 = EN1 EXP2 D50 = MISO D52 = SCK - * D17 = BLUE D16 = RED D31 = ENC D53 = SDCS - * D23 = KILL D25 = BUZZ D33 = --- D51 = MOSI - * D27 = A0 D29 = LCS D49 = SDCD RST = --- - * GND = GND 5V = 5V GND = --- D41 = --- - */ - - #undef BTN_EN1 - #undef BTN_EN2 - #undef BTN_ENC - #undef DOGLCD_A0 - #undef DOGLCD_CS - #undef SD_DETECT_PIN - #undef BEEPER_PIN - #undef KILL_PIN - - // - // VIKI2 12-wire lead - // - - // orange/white SDCD - #define SD_DETECT_PIN 49 - - // white ENCA - #define BTN_EN1 35 - - // green ENCB - #define BTN_EN2 37 - - // purple ENCBTN - #define BTN_ENC 31 - - // brown A0 - #define DOGLCD_A0 27 - - // green/white LCS - #define DOGLCD_CS 29 - - // 50 gray MISO - // 51 yellow MOSI - // 52 orange SCK - - // blue SDCS - //#define SDSS 53 - - // - // VIKI2 4-wire lead - // - - // blue BTN - #define KILL_PIN 23 - - // green BUZZER - #define BEEPER_PIN 25 - - // yellow RED-LED - #define STAT_LED_RED 16 - - // white BLUE-LED - #define STAT_LED_BLUE 17 - -#endif diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h deleted file mode 100644 index 8c72220..0000000 --- a/Marlin/pins_MKS_BASE.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments - */ - -#if HOTENDS > 2 - #error "MKS BASE 1.0 supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "MKS BASE 1.0" - -// Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 - -#include "pins_RAMPS.h" \ No newline at end of file diff --git a/Marlin/pins_OMCA.h b/Marlin/pins_OMCA.h deleted file mode 100644 index 9ec6309..0000000 --- a/Marlin/pins_OMCA.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Open Motion controller with enable based extruders (Final!) - * - * ATMega644 - * - * +---\/---+ - * (D 0) PB0 1| |40 PA0 (AI 0 / D31) - * (D 1) PB1 2| |39 PA1 (AI 1 / D30) - * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29) - * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28) - * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27) - * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26) - * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25) - * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24) - * RST 9| |32 AREF - * VCC 10| |31 GND - * GND 11| |30 AVCC - * XTAL2 12| |29 PC7 (D 23) - * XTAL1 13| |28 PC6 (D 22) - * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI - * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO - * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS - * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK - * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA - * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL - * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM - * +--------+ - * - * REF http://sanguino.cc/hardware - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) - #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)" -#endif - -#define BOARD_NAME "Final OMCA" - -#define X_STEP_PIN 26 -#define X_DIR_PIN 25 -#define X_ENABLE_PIN 10 -#define X_STOP_PIN 0 - -#define Y_STEP_PIN 28 -#define Y_DIR_PIN 27 -#define Y_ENABLE_PIN 10 -#define Y_STOP_PIN 1 - -#define Z_STEP_PIN 23 -#define Z_DIR_PIN 22 -#define Z_ENABLE_PIN 10 -#define Z_STOP_PIN 2 - -#define E0_STEP_PIN 24 -#define E0_DIR_PIN 21 -#define E0_ENABLE_PIN 10 - -// future proofing -#define __FS 20 -#define __FD 19 -#define __GS 18 -#define __GD 13 - -#define UNUSED_PWM 14 // PWM on LEFT connector - -#define E1_STEP_PIN -1 // 21 -#define E1_DIR_PIN -1 // 20 -#define E1_ENABLE_PIN -1 // 19 - -#define E2_STEP_PIN -1 // 21 -#define E2_DIR_PIN -1 // 20 -#define E2_ENABLE_PIN -1 // 18 - -#define SDSS 11 -#define FAN_PIN 14 // PWM on MIDDLE connector - -#define HEATER_0_PIN 3 // DONE PWM on RIGHT connector -#define HEATER_BED_PIN 4 - -#define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING -#define TEMP_1_PIN 1 // ANALOG -#define TEMP_BED_PIN 2 // 1,2 or I2C - -#define I2C_SCL 16 -#define I2C_SDA 17 - diff --git a/Marlin/pins_OMCA_A.h b/Marlin/pins_OMCA_A.h deleted file mode 100644 index 39d232a..0000000 --- a/Marlin/pins_OMCA_A.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Open Motion controller with enable based extruders (Alpha!) - * - * ATMega644 - * - * +---\/---+ - * (D 0) PB0 1| |40 PA0 (AI 0 / D31) - * (D 1) PB1 2| |39 PA1 (AI 1 / D30) - * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29) - * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28) - * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27) - * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26) - * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25) - * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24) - * RST 9| |32 AREF - * VCC 10| |31 GND - * GND 11| |30 AVCC - * XTAL2 12| |29 PC7 (D 23) - * XTAL1 13| |28 PC6 (D 22) - * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI - * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO - * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS - * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK - * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA - * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL - * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM - * +--------+ - * - */ - -#ifndef __AVR_ATmega644__ - #error "Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Alpha OMCA" - -#define X_STEP_PIN 21 -#define X_DIR_PIN 20 -#define X_ENABLE_PIN 24 -#define X_STOP_PIN 0 - -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_ENABLE_PIN 24 -#define Y_STOP_PIN 1 - -#define Z_STEP_PIN 26 -#define Z_DIR_PIN 25 -#define Z_ENABLE_PIN 24 -#define Z_STOP_PIN 2 - -#define E0_STEP_PIN 28 -#define E0_DIR_PIN 27 -#define E0_ENABLE_PIN 24 - -#define E1_STEP_PIN -1 // 19 -#define E1_DIR_PIN -1 // 18 -#define E1_ENABLE_PIN 24 - -#define E2_STEP_PIN -1 // 17 -#define E2_DIR_PIN -1 // 16 -#define E2_ENABLE_PIN 24 - -#define SDSS 11 -#define FAN_PIN 3 - -#define HEATER_0_PIN 4 -#define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! - -/* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */ diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h deleted file mode 100644 index fb1874b..0000000 --- a/Marlin/pins_PRINTRBOARD.h +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Printrboard pin assignments (AT90USB1286) - * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! - * http://www.pjrc.com/teensy/teensyduino.html - * See http://reprap.org/wiki/Printrboard for more info - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. - #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" -#endif - -#define BOARD_NAME "Printrboard" -#define LARGE_FLASH true - -// Disable JTAG pins so they can be used for the Extrudrboard -#define DISABLE_JTAG true - -#define X_STEP_PIN 0 -#define X_DIR_PIN 1 -#define X_ENABLE_PIN 39 - -#define Y_STEP_PIN 2 -#define Y_DIR_PIN 3 -#define Y_ENABLE_PIN 38 - -#define Z_STEP_PIN 4 -#define Z_DIR_PIN 5 -#define Z_ENABLE_PIN 23 - -#define E0_STEP_PIN 6 -#define E0_DIR_PIN 7 -#define E0_ENABLE_PIN 19 - -#define HEATER_0_PIN 21 // Extruder -#define HEATER_1_PIN 46 -#define HEATER_2_PIN 47 -#define HEATER_BED_PIN 20 - -// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin -// fastio pin numbering otherwise -#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN) - #define FAN_PIN 22 -#else - #define FAN_PIN 16 -#endif - -#define X_STOP_PIN 35 -#if ENABLED(SDSUPPORT) - #define Y_STOP_PIN 37 // Move Ystop to Estop socket -#else - #define Y_STOP_PIN 8 // Ystop in Ystop socket -#endif -#define Z_STOP_PIN 36 -#define TEMP_0_PIN 1 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 0 // Bed / Analog pin numbering - -#define FILWIDTH_PIN 2 // ANALOG NUMBERING - -////LCD Pin Setup//// - -#define SDSS 26 - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - //we have no buzzer installed - #define BEEPER_PIN -1 - - //LCD Pins - #if ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 27 //RX1 - fastio.h pin mapping 27 - #define BTN_EN2 26 //TX1 - fastio.h pin mapping 26 - #define BTN_ENC 43 //A3 - fastio.h pin mapping 43 - #define SDSS 40 //use SD card on Panelolu2 (Teensyduino pin mapping) - #else - #define BTN_EN1 16 - #define BTN_EN2 17 - #define BTN_ENC 18//the click - #endif // LCD_I2C_PANELOLU2 - - //not connected to a pin - #define SD_DETECT_PIN -1 - - #define LCD_PINS_RS 9 - #define LCD_PINS_ENABLE 8 - #define LCD_PINS_D4 7 - #define LCD_PINS_D5 6 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 4 - -#endif // ULTRA_LCD && NEWPANEL - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - //FastIO - #define BEEPER_PIN 32 - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 42 //Non-FastIO - #define DOGLCD_CS 43 //Non-FastIO - #define LCD_SCREEN_ROT_180 - - //The encoder and click button (FastIO Pins) - #define BTN_EN1 26 - #define BTN_EN2 27 - #define BTN_ENC 47 - - #define SDSS 45 - #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test) - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 12 //Non-FastIO - #define STAT_LED_BLUE 10 //Non-FastIO - #endif -#endif diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h deleted file mode 100644 index 61b23fb..0000000 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ /dev/null @@ -1,137 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Printrboard pin assignments (AT90USB1286) - * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! - * http://www.pjrc.com/teensy/teensyduino.html - * See http://reprap.org/wiki/Printrboard for more info - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. - #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" -#endif - -#define BOARD_NAME "Printrboard Rev F" -#define LARGE_FLASH true - -#define X_STEP_PIN 0 -#define X_DIR_PIN 1 -#define X_ENABLE_PIN 39 - -#define Y_STEP_PIN 2 -#define Y_DIR_PIN 3 -#define Y_ENABLE_PIN 38 - -#define Z_STEP_PIN 4 -#define Z_DIR_PIN 5 -#define Z_ENABLE_PIN 23 - -#define E0_STEP_PIN 6 -#define E0_DIR_PIN 7 -#define E0_ENABLE_PIN 19 - -#define HEATER_0_PIN 21 // Extruder -#define HEATER_1_PIN 46 -#define HEATER_2_PIN 47 -#define HEATER_BED_PIN 20 - -// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin -// fastio pin numbering otherwise -#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN) - #define FAN_PIN 22 -#else - #define FAN_PIN 16 -#endif - -#define X_STOP_PIN 35 -#define Y_STOP_PIN 12 -#define Z_STOP_PIN 36 - -#define TEMP_0_PIN 1 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 0 // Bed / Analog pin numbering - -#define FILWIDTH_PIN 2 // ANALOG NUMBERING - -////LCD Pin Setup//// - -#define SDSS 20 // Teensylu pin mapping - -// uncomment to enable an I2C based DAC like on the Printrboard REVF -#define DAC_STEPPER_CURRENT -// Number of channels available for DAC, For Printrboar REVF there are 4 -#define DAC_STEPPER_ORDER {3,2,1,0} - -#define DAC_STEPPER_SENSE 0.11 -#define DAC_STEPPER_ADDRESS 0 -#define DAC_STEPPER_MAX 3520 -#define DAC_STEPPER_VREF 1 //internal Vref, gain 1x = 2.048V -#define DAC_STEPPER_GAIN 0 -#define DAC_OR_ADDRESS 0x00 - -#if ENABLED(ULTRA_LCD) - #define BEEPER_PIN -1 - - #define LCD_PINS_RS 9 - #define LCD_PINS_ENABLE 8 - #define LCD_PINS_D4 7 - #define LCD_PINS_D5 6 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 4 - - #define BTN_EN1 16 - #define BTN_EN2 17 - #define BTN_ENC 18//the click - - #define SD_DETECT_PIN -1 - - //encoder rotation values - #define encrot0 0 - #define encrot1 2 - #define encrot2 3 - #define encrot3 1 -#endif - -#if ENABLED(VIKI2) || ENABLED(miniVIKI) - #define BEEPER_PIN 32 //FastIO - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 42 //Non-FastIO - #define DOGLCD_CS 43 //Non-FastIO - #define LCD_SCREEN_ROT_180 - - //The encoder and click button (FastIO Pins) - #define BTN_EN1 26 - #define BTN_EN2 27 - #define BTN_ENC 47 - - #define SDSS 45 - #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test) - - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 12 //Non-FastIO - #define STAT_LED_BLUE 10 //Non-FastIO - #endif -#endif diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h deleted file mode 100644 index 278774c..0000000 --- a/Marlin/pins_RAMBO.h +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Rambo pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Rambo" - -#define LARGE_FLASH true - -// Servo support -#define SERVO0_PIN 22 // Motor header MX1 -#define SERVO1_PIN 23 // Motor header MX2 -#define SERVO2_PIN 24 // Motor header MX3 -#define SERVO3_PIN 5 // PWM header pin 5 - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - -#define X_MIN_PIN 12 -#define X_MAX_PIN 24 -#define Y_MIN_PIN 11 -#define Y_MAX_PIN 23 -#define Z_MIN_PIN 10 -#define Z_MAX_PIN 30 -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 10 -#endif - -#define X_STEP_PIN 37 -#define X_DIR_PIN 48 -#define X_ENABLE_PIN 29 -#define X_MS1_PIN 40 -#define X_MS2_PIN 41 - -#define Y_STEP_PIN 36 -#define Y_DIR_PIN 49 -#define Y_ENABLE_PIN 28 -#define Y_MS1_PIN 69 -#define Y_MS2_PIN 39 - -#define Z_STEP_PIN 35 -#define Z_DIR_PIN 47 -#define Z_ENABLE_PIN 27 -#define Z_MS1_PIN 68 -#define Z_MS2_PIN 67 - -#define HEATER_BED_PIN 3 -#define TEMP_BED_PIN 2 - -#define HEATER_0_PIN 9 -#define TEMP_0_PIN 0 - -#define HEATER_1_PIN 7 -#define TEMP_1_PIN 1 - -#if ENABLED(BARICUDA) - #define HEATER_2_PIN 6 -#endif - -#define E0_STEP_PIN 34 -#define E0_DIR_PIN 43 -#define E0_ENABLE_PIN 26 -#define E0_MS1_PIN 65 -#define E0_MS2_PIN 66 - -#define E1_STEP_PIN 33 -#define E1_DIR_PIN 42 -#define E1_ENABLE_PIN 25 -#define E1_MS1_PIN 63 -#define E1_MS2_PIN 64 - -#define DIGIPOTSS_PIN 38 -#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping - -#define SDSS 53 -#define LED_PIN 13 -#define FAN_PIN 8 - -#define FILWIDTH_PIN 3 // ANALOG NUMBERING - -/********************************************************** - Fan Pins - Fan_0 8 - Fan_1 6 - Fan_2 2 -***********************************************************/ -#define PS_ON_PIN 4 - -#if ENABLED(ULTRA_LCD) - - #define KILL_PIN 80 - - #if ENABLED(NEWPANEL) - - #define LCD_PINS_RS 70 - #define LCD_PINS_ENABLE 71 - #define LCD_PINS_D4 72 - #define LCD_PINS_D5 73 - #define LCD_PINS_D6 74 - #define LCD_PINS_D7 75 - - #if ENABLED(VIKI2) || ENABLED(miniVIKI) - #define BEEPER_PIN 44 - - #define DOGLCD_A0 70 - #define DOGLCD_CS 71 - #define LCD_SCREEN_ROT_180 - - #define BTN_EN1 85 - #define BTN_EN2 84 - #define BTN_ENC 83 - - #define SD_DETECT_PIN -1 // Pin 72 if using easy adapter board - - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 22 - #define STAT_LED_BLUE 32 - #endif - - #else - - #define BEEPER_PIN 79 // AUX-4 - - // AUX-2 - #define BTN_EN1 76 - #define BTN_EN2 77 - #define BTN_ENC 78 - - #define SD_DETECT_PIN 81 - - #endif // VIKI2/miniVIKI - - #else //!NEWPANEL - old style panel with shift register - - // No Beeper added - #define BEEPER_PIN 33 - - //buttons are attached to a shift register - // Not wired yet - //#define SHIFT_CLK 38 - //#define SHIFT_LD 42 - //#define SHIFT_OUT 40 - //#define SHIFT_EN 17 - - #define LCD_PINS_RS 75 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #define LCD_PINS_D7 29 - - #endif // !NEWPANEL - -#endif // ULTRA_LCD - diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h deleted file mode 100644 index 5f2e0d1..0000000 --- a/Marlin/pins_RAMPS.h +++ /dev/null @@ -1,344 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments - * - * Applies to the following boards: - * - * RAMPS_14_EFB (Hotend, Fan, Bed) - * RAMPS_14_EEB (Hotend0, Hotend1, Bed) - * RAMPS_14_EFF (Hotend, Fan0, Fan1) - * RAMPS_14_EEF (Hotend0, Hotend1, Fan) - * RAMPS_14_SF (Spindle, Controller Fan) - * - * RAMPS_13_EFB (Hotend, Fan, Bed) - * RAMPS_13_EEB (Hotend0, Hotend1, Bed) - * RAMPS_13_EFF (Hotend, Fan0, Fan1) - * RAMPS_13_EEF (Hotend0, Hotend1, Fan) - * RAMPS_13_SF (Spindle, Controller Fan) - * - * Other pins_MYBOARD.h files may override these defaults - * - * Differences between - * RAMPS_13 | RAMPS_14 - * 7 | 11 - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.4" -#endif - -#define LARGE_FLASH true - -#ifdef IS_RAMPS_13 - #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI -#else - #define SERVO0_PIN 11 -#endif -#define SERVO1_PIN 6 -#define SERVO2_PIN 5 -#define SERVO3_PIN 4 - -#define X_MIN_PIN 3 -#ifndef X_MAX_PIN - #define X_MAX_PIN 2 -#endif -#define Y_MIN_PIN 14 -#define Y_MAX_PIN 15 -#define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 32 -#endif - -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 -#define X_ENABLE_PIN 38 - -#define Y_STEP_PIN 60 -#define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 - -#define Z_STEP_PIN 46 -#define Z_DIR_PIN 48 -#define Z_ENABLE_PIN 62 - -#define E0_STEP_PIN 26 -#define E0_DIR_PIN 28 -#define E0_ENABLE_PIN 24 - -#define E1_STEP_PIN 36 -#define E1_DIR_PIN 34 -#define E1_ENABLE_PIN 30 - -#define SDSS 53 -#define LED_PIN 13 - -// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector -#define FILWIDTH_PIN 5 // ANALOG NUMBERING - -// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector -#define FIL_RUNOUT_PIN 4 - -#define PS_ON_PIN 12 -#define TEMP_0_PIN 13 // ANALOG NUMBERING -#define TEMP_1_PIN 15 // ANALOG NUMBERING -#define TEMP_BED_PIN 14 // ANALOG NUMBERING - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - -// Augmentation for auto-assigning RAMPS plugs -#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D) - #if HOTENDS > 1 - #if TEMP_SENSOR_BED - #define IS_RAMPS_EEB - #else - #define IS_RAMPS_EEF - #endif - #elif TEMP_SENSOR_BED - #define IS_RAMPS_EFB - #else - #define IS_RAMPS_EFF - #endif -#endif - -/** - * Hi Voltage PWM Pin Assignments - */ - -#ifndef MOSFET_D_PIN - #define MOSFET_D_PIN -1 -#endif -#ifndef RAMPS_D8_PIN - #define RAMPS_D8_PIN 8 -#endif -#ifndef RAMPS_D9_PIN - #define RAMPS_D9_PIN 9 -#endif -#ifndef RAMPS_D10_PIN - #define RAMPS_D10_PIN 10 -#endif - -#define HEATER_0_PIN RAMPS_D10_PIN - -#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed - #define FAN_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan - #define HEATER_1_PIN RAMPS_D9_PIN - #define FAN_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed - #define HEATER_1_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN -#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan - #define FAN_PIN RAMPS_D9_PIN - #define FAN1_PIN RAMPS_D8_PIN - #define CONTROLLERFAN_PIN -1 -#elif ENABLED(IS_RAMPS_SF) // Spindle, Fan - #define FAN_PIN RAMPS_D8_PIN -#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") - #define FAN_PIN RAMPS_D9_PIN - #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 - #define FAN1_PIN MOSFET_D_PIN - #else - #define HEATER_1_PIN MOSFET_D_PIN - #endif -#endif - -#ifndef FAN_PIN - #define FAN_PIN 4 // IO pin. Buffer needed -#endif - -/** - * LCD Controller Pin Assignments - */ - -#if ENABLED(ULTRA_LCD) - - #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 //CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 51 //SID (MOSI) - #define LCD_PINS_D4 52 //SCK (CLK) clock - #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE) - #define LCD_PINS_RS 40 - #define LCD_PINS_ENABLE 42 - #define LCD_PINS_D4 65 - #define LCD_PINS_D5 66 - #define LCD_PINS_D6 44 - #define LCD_PINS_D7 64 - #else - #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #define LCD_PINS_D7 29 - #if DISABLED(NEWPANEL) - #define BEEPER_PIN 33 - // Buttons are attached to a shift register - // Not wired yet - //#define SHIFT_CLK 38 - //#define SHIFT_LD 42 - //#define SHIFT_OUT 40 - //#define SHIFT_EN 17 - #endif - #endif - - #if ENABLED(NEWPANEL) - - #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - #define BEEPER_PIN 37 - - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 - - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 - - #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_PIN_BL 39 - #endif - - #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define BTN_EN1 64 - #define BTN_EN2 59 - #define BTN_ENC 63 - #define SD_DETECT_PIN 42 - #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 47 // reverse if the encoder turns the wrong way. - #define BTN_EN2 43 - #define BTN_ENC 32 - #define LCD_SDSS 53 - #define SD_DETECT_PIN -1 - #define KILL_PIN 41 - #elif ENABLED(LCD_I2C_VIKI) - #define BTN_EN1 22 // reverse if the encoder turns the wrong way. - #define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf - // tells about 40/42. - // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. - #define BTN_ENC -1 - #define LCD_SDSS 53 - #define SD_DETECT_PIN 49 - #elif ENABLED(VIKI2) || ENABLED(miniVIKI) - #define BEEPER_PIN 33 - - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 44 - #define DOGLCD_CS 45 - #define LCD_SCREEN_ROT_180 - - #define BTN_EN1 22 - #define BTN_EN2 7 - #define BTN_ENC 39 - - #define SDSS 53 - #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board - - #define KILL_PIN 31 - - #if ENABLED(TEMP_STAT_LEDS) - #define STAT_LED_RED 32 - #define STAT_LED_BLUE 35 - #endif - #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define BTN_EN1 35 // reverse if the encoder turns the wrong way. - #define BTN_EN2 37 - #define BTN_ENC 31 - #define SD_DETECT_PIN 49 - #define LCD_SDSS 53 - #define KILL_PIN 41 - #define BEEPER_PIN 23 - #define DOGLCD_CS 29 - #define DOGLCD_A0 27 - #define LCD_PIN_BL 33 - #elif ENABLED(MINIPANEL) - #define BEEPER_PIN 42 - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 44 - #define DOGLCD_CS 66 - #define LCD_PIN_BL 65 // backlight LED on A11/D65 - #define SDSS 53 - - #define KILL_PIN 64 - // GLCD features - //#define LCD_CONTRAST 190 - // Uncomment screen orientation - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 - //The encoder and click button - #define BTN_EN1 40 - #define BTN_EN2 63 - #define BTN_ENC 59 - //not connected to a pin - #define SD_DETECT_PIN 49 - - #else - - // Beeper on AUX-4 - #define BEEPER_PIN 33 - - // buttons are directly attached using AUX-2 - #if ENABLED(REPRAPWORLD_KEYPAD) - #define BTN_EN1 64 // encoder - #define BTN_EN2 59 // encoder - #define BTN_ENC 63 // enter button - #define SHIFT_OUT 40 // shift register - #define SHIFT_CLK 44 // shift register - #define SHIFT_LD 42 // shift register - #elif ENABLED(PANEL_ONE) - #define BTN_EN1 59 // AUX2 PIN 3 - #define BTN_EN2 63 // AUX2 PIN 4 - #define BTN_ENC 49 // AUX3 PIN 7 - #else - #define BTN_EN1 37 - #define BTN_EN2 35 - #define BTN_ENC 31 // the click - #endif - - #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 - #else - // #define SD_DETECT_PIN -1 // Ramps doesn't use this - #endif - - #endif - #endif // NEWPANEL - -#endif // ULTRA_LCD - -// SPI for Max6675 or Max31855 Thermocouple -#if DISABLED(SDSUPPORT) - #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card -#else - #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present -#endif diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h deleted file mode 100644 index effce90..0000000 --- a/Marlin/pins_RAMPS_13.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.3 pin assignments - * - * Applies to the following boards: - * - * RAMPS_13_EFB (Extruder, Fan, Bed) - * RAMPS_13_EEB (Extruder, Extruder, Bed) - * RAMPS_13_EFF (Extruder, Fan, Fan) - * RAMPS_13_EEF (Extruder, Extruder, Fan) - * RAMPS_13_SF (Spindle, Controller Fan) - * - */ - -#ifndef BOARD_NAME - #define BOARD_NAME "RAMPS 1.3" -#endif - -#define IS_RAMPS_13 -#include "pins_RAMPS.h" diff --git a/Marlin/pins_RAMPS_OLD.h b/Marlin/pins_RAMPS_OLD.h deleted file mode 100644 index 213bd3f..0000000 --- a/Marlin/pins_RAMPS_OLD.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "MEGA/RAMPS <1.2" - -// Uncomment the following line for RAMPS v1.0 -//#define RAMPS_V_1_0 - -#define X_STEP_PIN 26 -#define X_DIR_PIN 28 -#define X_ENABLE_PIN 24 -#define X_MIN_PIN 3 -#define X_MAX_PIN 2 - -#define Y_STEP_PIN 38 -#define Y_DIR_PIN 40 -#define Y_ENABLE_PIN 36 -#define Y_MIN_PIN 16 -#define Y_MAX_PIN 17 - -#define Z_STEP_PIN 44 -#define Z_DIR_PIN 46 -#define Z_ENABLE_PIN 42 -#define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 - -#define E0_STEP_PIN 32 -#define E0_DIR_PIN 34 -#define E0_ENABLE_PIN 30 - -#define SDPOWER 48 -#define SDSS 53 -#define LED_PIN 13 - -#if ENABLED(RAMPS_V_1_0) // RAMPS_V_1_0 - #define HEATER_0_PIN 12 // RAMPS 1.0 - #define HEATER_BED_PIN -1 // RAMPS 1.0 - #define FAN_PIN 11 // RAMPS 1.0 -#else // RAMPS_V_1_1 or RAMPS_V_1_2 - #define HEATER_0_PIN 10 // RAMPS 1.1 - #define HEATER_BED_PIN 8 // RAMPS 1.1 - #define FAN_PIN 9 // RAMPS 1.1 -#endif - -#define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! -#define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! - -// SPI for Max6675 or Max31855 Thermocouple -#if DISABLED(SDSUPPORT) - #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card -#else - #define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present -#endif diff --git a/Marlin/pins_RIGIDBOARD.h b/Marlin/pins_RIGIDBOARD.h deleted file mode 100644 index a60e492..0000000 --- a/Marlin/pins_RIGIDBOARD.h +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments - */ - -#define BOARD_NAME "RigidBoard" - -#define RAMPS_D10_PIN 9 // EXTRUDER 1 -#define MOSFET_D_PIN 12 // EXTRUDER 2 or FAN -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 19 // Z-MAX pin J14 End Stops -#endif - -#include "pins_RAMPS.h" - -#undef TEMP_0_PIN -#undef TEMP_1_PIN -#define TEMP_0_PIN 14 // ANALOG NUMBERING -#define TEMP_1_PIN 13 // ANALOG NUMBERING - -// LCD Panel options for the RigidBoard - -#if ENABLED(RIGIDBOT_PANEL) - - #undef BEEPER_PIN - #define BEEPER_PIN -1 - - // Direction buttons - #define BTN_UP 37 - #define BTN_DWN 35 - #define BTN_LFT 33 - #define BTN_RT 32 - - // 'R' button - #undef BTN_ENC - #define BTN_ENC 31 - - // Disable encoder - #undef BTN_EN1 - #define BTN_EN1 -1 - #undef BTN_EN2 - #define BTN_EN2 -1 - - #undef SD_DETECT_PIN - #define SD_DETECT_PIN 22 - -#elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - - #undef BEEPER_PIN - #define BEEPER_PIN -1 - - #undef SD_DETECT_PIN - #define SD_DETECT_PIN 22 - - #undef KILL_PIN - #define KILL_PIN 32 - -#endif - -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS -#if ENABLED(SDSUPPORT) - #define MAX6675_SS 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present -#else - #define MAX6675_SS 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card -#endif - -// RigidBot swaps E0 / E1 plugs vs RAMPS 1.3 - -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN -#define E0_STEP_PIN 36 -#define E0_DIR_PIN 34 -#define E0_ENABLE_PIN 30 - -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN -#define E1_STEP_PIN 26 -#define E1_DIR_PIN 28 -#define E1_ENABLE_PIN 24 - -#undef FAN_PIN -#define FAN_PIN 8 // Same as RAMPS_13_EEF - -#undef PS_ON_PIN -#define PS_ON_PIN -1 - -#undef HEATER_BED_PIN -#define HEATER_BED_PIN 10 - -#undef TEMP_BED_PIN -#define TEMP_BED_PIN 15 // ANALOG NUMBERING - -#define STEPPER_RESET_PIN 41 // Stepper drivers have a reset on RigidBot diff --git a/Marlin/pins_RIGIDBOARD_V2.h b/Marlin/pins_RIGIDBOARD_V2.h deleted file mode 100644 index 7aad12e..0000000 --- a/Marlin/pins_RIGIDBOARD_V2.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * RIGIDBOARD V2 Arduino Mega with RAMPS v1.4 pin assignments - */ - -#include "pins_RIGIDBOARD.h" - -#undef BOARD_NAME -#define BOARD_NAME "RigidBoard V2" - -// I2C based DAC like on the Printrboard REVF -#define DAC_STEPPER_CURRENT -// Channels available for DAC, For Rigidboard there are 4 -#define DAC_STEPPER_ORDER {0,1,2,3} - -#define DAC_STEPPER_SENSE 0.11 -#define DAC_STEPPER_ADDRESS 0 -#define DAC_STEPPER_MAX 5000 -#define DAC_STEPPER_VREF 1 //internal Vref, gain 1x = 2.048V -#define DAC_STEPPER_GAIN 0 -#define DAC_DISABLE_PIN 42 // set low to enable DAC -#define DAC_OR_ADDRESS 0x01 diff --git a/Marlin/pins_RUMBA.h b/Marlin/pins_RUMBA.h deleted file mode 100644 index ec5e023..0000000 --- a/Marlin/pins_RUMBA.h +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * RUMBA pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#if E_STEPPERS > 3 || HOTENDS > 3 - #error "RUMBA supports up to 3 hotends / E-steppers. Comment this line to keep going." -#endif - -#define DEFAULT_MACHINE_NAME "Rumba" -#define BOARD_NAME "Rumba" - -#define X_STEP_PIN 17 -#define X_DIR_PIN 16 -#define X_ENABLE_PIN 48 -#define X_MIN_PIN 37 -#define X_MAX_PIN 36 - -#define Y_STEP_PIN 54 -#define Y_DIR_PIN 47 -#define Y_ENABLE_PIN 55 -#define Y_MIN_PIN 35 -#define Y_MAX_PIN 34 - -#define Z_STEP_PIN 57 -#define Z_DIR_PIN 56 -#define Z_ENABLE_PIN 62 -#define Z_MIN_PIN 33 -#define Z_MAX_PIN 32 - -#ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 33 -#endif - -#define E0_STEP_PIN 23 -#define E0_DIR_PIN 22 -#define E0_ENABLE_PIN 24 - -#define E1_STEP_PIN 26 -#define E1_DIR_PIN 25 -#define E1_ENABLE_PIN 27 - -#define E2_STEP_PIN 29 -#define E2_DIR_PIN 28 -#define E2_ENABLE_PIN 39 - -#define LED_PIN 13 - -#define FAN_PIN 7 -#define FAN1_PIN 8 - -#define PS_ON_PIN 45 -#define KILL_PIN 46 - -#define HEATER_0_PIN 2 // EXTRUDER 1 -#define HEATER_1_PIN 3 // EXTRUDER 2 -#define HEATER_2_PIN 6 // EXTRUDER 3 - -#if TEMP_SENSOR_0 == -1 - #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used -#else - #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used -#endif - -#if TEMP_SENSOR_1 == -1 - #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used -#else - #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used -#endif - -#if TEMP_SENSOR_2 == -1 - #define TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple -#else - #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used -#endif - -//optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used -//optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4 - -#define HEATER_BED_PIN 9 // BED -#if TEMP_SENSOR_BED == -1 - #define TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple -#else - #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used -#endif - -#define SDSS 53 -#define SD_DETECT_PIN 49 -#define BEEPER_PIN 44 -#define LCD_PINS_RS 19 -#define LCD_PINS_ENABLE 42 -#define LCD_PINS_D4 18 -#define LCD_PINS_D5 38 -#define LCD_PINS_D6 41 -#define LCD_PINS_D7 40 -#define BTN_EN1 11 -#define BTN_EN2 12 -#define BTN_ENC 43 - -#define SERVO0_PIN 5 - diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h deleted file mode 100644 index 8d272ad..0000000 --- a/Marlin/pins_SAINSMART_2IN1.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Sainsmart 2-in-1 pin assignments - */ - -#if HOTENDS > 2 - #error "Sainsmart 2-in-1 supports up to 2 hotends. Comment this line to keep going." -#endif - -#define BOARD_NAME "Sainsmart" - -#define RAMPS_D10_PIN 9 // E -#define RAMPS_D9_PIN 7 // F PART FAN in front of board next to Extruder heat - // RAMPS_D8_PIN 8 // B -#define MOSFET_D_PIN 10 // F / E - -#include "pins_RAMPS.h" diff --git a/Marlin/pins_SANGUINOLOLU_11.h b/Marlin/pins_SANGUINOLOLU_11.h deleted file mode 100644 index a6220c5..0000000 --- a/Marlin/pins_SANGUINOLOLU_11.h +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Sanguinololu board pin assignments - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu." -#endif - -#ifndef BOARD_NAME - #define BOARD_NAME "Sanguinololu <1.2" -#endif - -#define IS_MELZI (MB(MELZI) || MB(MELZI_MAKR3D)) - -#define X_STEP_PIN 15 -#define X_DIR_PIN 21 -#define X_STOP_PIN 18 - -#define Y_STEP_PIN 22 -#define Y_DIR_PIN 23 -#define Y_STOP_PIN 19 - -#define Z_STEP_PIN 3 -#define Z_DIR_PIN 2 -#define Z_STOP_PIN 20 - -#define E0_STEP_PIN 1 -#define E0_DIR_PIN 0 - -#if MB(AZTEEG_X1) || MB(STB_11) || IS_MELZI - #define FAN_PIN 4 // Works for Panelolu2 too -#endif - -#if IS_MELZI - #define LED_PIN 27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368. -#elif MB(STB_11) - #define LCD_PIN_BL 17 // LCD backlight LED -#endif - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - -#define HEATER_0_PIN 13 // (extruder) - -#if ENABLED(SANGUINOLOLU_V_1_2) - - #define HEATER_BED_PIN 12 // (bed) - #define X_ENABLE_PIN 14 - #define Y_ENABLE_PIN 14 - #define Z_ENABLE_PIN 26 - #define E0_ENABLE_PIN 14 - - #if ENABLED(LCD_I2C_PANELOLU2) - #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan - #endif - -#else - - #define HEATER_BED_PIN 14 // (bed) - #define X_ENABLE_PIN -1 - #define Y_ENABLE_PIN -1 - #define Z_ENABLE_PIN -1 - #define E0_ENABLE_PIN -1 - -#endif - -#define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder) -#define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed) -#define SDSS 31 - -/** - * On some broken versions of the Sanguino libraries the pin definitions are wrong, - * which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368. - */ -//#define SDSS 24 - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - - // No buzzer installed - #define BEEPER_PIN -1 - - // LCD Pins - #if ENABLED(DOGLCD) - - #if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 - - #if IS_MELZI // Melzi board - #define LCD_PINS_RS 30 //CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 29 //SID (MOSI) - #define LCD_PINS_D4 17 //SCK (CLK) clock - // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with - // Marlin so this can be used for BEEPER_PIN. You can use this pin - // with M42 instead of BEEPER_PIN. - #define BEEPER_PIN 27 - #else // Sanguinololu 1.3 - #define LCD_PINS_RS 4 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 - #endif - - #else // DOGM SPI LCD Support - - #define DOGLCD_A0 30 - #define DOGLCD_CS 29 - #define LCD_CONTRAST 1 - - #endif - - // Uncomment screen orientation - #define LCD_SCREEN_ROT_0 - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 - - #else // !DOGLCD - Standard Hitachi LCD controller - - #define LCD_PINS_RS 4 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 - - #endif // !DOGLCD - - //The encoder and click button - #define BTN_EN1 11 - #define BTN_EN2 10 - #if ENABLED(LCD_I2C_PANELOLU2) - #if IS_MELZI - #define BTN_ENC 29 - #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi - #else - #define BTN_ENC 30 - #endif - #else - #define BTN_ENC 16 - #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi - #endif //Panelolu2 - - #define SD_DETECT_PIN -1 - -#elif ENABLED(MAKRPANEL) - - #define BEEPER_PIN 29 - - // Pins for DOGM SPI LCD Support - #define DOGLCD_A0 30 - #define DOGLCD_CS 17 - #define LCD_PIN_BL 28 // backlight LED on PA3 - // GLCD features - #define LCD_CONTRAST 1 - // Uncomment screen orientation - #define LCD_SCREEN_ROT_0 - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 - //The encoder and click button - #define BTN_EN1 11 - #define BTN_EN2 10 - #define BTN_ENC 16 - - #define SD_DETECT_PIN -1 - -#endif // MAKRPANEL diff --git a/Marlin/pins_SANGUINOLOLU_12.h b/Marlin/pins_SANGUINOLOLU_12.h deleted file mode 100644 index f214d6f..0000000 --- a/Marlin/pins_SANGUINOLOLU_12.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Sanguinololu V1.2 pin assignments - * - * Applies to the following boards: - * - * AZTEEG_X1 - * MELZI - * MELZI_MAKR3D - * SANGUINOLOLU_12 - * STB_11 - */ - -#define BOARD_NAME "Sanguinololu 1.2" - -#if defined(__AVR_ATmega1284P__) - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_SAV_MKI.h b/Marlin/pins_SAV_MKI.h deleted file mode 100644 index 530f63a..0000000 --- a/Marlin/pins_SAV_MKI.h +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * SAV MkI pin assignments (AT90USB1286) - * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! - * http://www.pjrc.com/teensy/teensyduino.html - * RepRap Clone Wars project board. - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#define DEFAULT_MACHINE_NAME "SAV MkI" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" -#define BOARD_NAME "SAV MkI" - -#define LARGE_FLASH true - -#define X_STEP_PIN 0 -#define X_DIR_PIN 1 -#define X_ENABLE_PIN 39 - -#define Y_STEP_PIN 2 -#define Y_DIR_PIN 3 -#define Y_ENABLE_PIN 38 - -#define Z_STEP_PIN 4 -#define Z_DIR_PIN 5 -#define Z_ENABLE_PIN 23 - -#define E0_STEP_PIN 6 -#define E0_DIR_PIN 7 -#define E0_ENABLE_PIN 19 - -#define HEATER_0_PIN 21 // Extruder -#define HEATER_BED_PIN 20 // Bed -#define FAN_PIN 16 // Fan -- from Teensyduino environment. - // For the fan and Teensyduino uses a different pin mapping. -#define X_STOP_PIN 13 -#define Y_STOP_PIN 14 -//#define Z_STOP_PIN 15 -#define Z_STOP_PIN 36 // For inductive sensor. - -#define TEMP_0_PIN 7 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 6 // Bed / Analog pin numbering - -#define SDSS 20 // PB0 - 8 in marlin env. - -// Extension header pin mapping -// ---------------------------- -// SCL (I2C)-D0 A0 (An), IO -// SDA (I2C)-D1 A1 (An), IO -// RX1-D2 A2 (An), IO -// TX1-D3 A3 (An), IO -// PWM-D24 A4 (An), IO -// 5V GND -// 12V GND -#define EXT_AUX_SCL_D0 0 // 0 (teensy), 24 (marlin) -#define EXT_AUX_SDA_D1 1 // 1 (teensy), 25 (marlin) -#define EXT_AUX_RX1_D2 26 // 2 (teensy), 26 (marlin) -#define EXT_AUX_TX1_D3 27 // 3 (teensy), 27 (marlin) -#define EXT_AUX_PWM_D24 12 // 24 (teensy), 12 (marlin) -#define EXT_AUX_A0 0 // Analog -#define EXT_AUX_A0_IO 40 // Digital IO, 38 (teensy), 40 (marlin) -#define EXT_AUX_A1 1 // Analog -#define EXT_AUX_A1_IO 41 // Digital IO, 39 (teensy), 41 (marlin) -#define EXT_AUX_A2 2 // Analog -#define EXT_AUX_A2_IO 42 // Digital IO, 40 (teensy), 42 (marlin) -#define EXT_AUX_A3 3 // Analog -#define EXT_AUX_A3_IO 43 // Digital IO, 41 (teensy), 43 (marlin) -#define EXT_AUX_A4 4 // Analog -#define EXT_AUX_A4_IO 44 // Digital IO, 42 (teensy), 44 (marlin) - - -#define BEEPER_PIN -1 -#define LCD_PINS_RS -1 -#define LCD_PINS_ENABLE -1 -#define LCD_PINS_D4 -1 -#define LCD_PINS_D5 -1 -#define LCD_PINS_D6 -1 -#define LCD_PINS_D7 -1 - -#if ENABLED(SAV_3DLCD) - // For LCD SHIFT register LCD - #define SR_DATA_PIN EXT_AUX_SDA_D1 - #define SR_CLK_PIN EXT_AUX_SCL_D0 -#endif // SAV_3DLCD - -#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD) - #define BTN_EN1 EXT_AUX_A1_IO - #define BTN_EN2 EXT_AUX_A0_IO - #define BTN_ENC EXT_AUX_PWM_D24 - - #define KILL_PIN EXT_AUX_A2_IO - #define HOME_PIN EXT_AUX_A4_IO -#endif // SAV_3DLCD || SAV_3DGLCD - -#define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in servo.cpp) diff --git a/Marlin/pins_SETHI.h b/Marlin/pins_SETHI.h deleted file mode 100644 index ff154ac..0000000 --- a/Marlin/pins_SETHI.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Sethi 3D_1 pin assignments - www.sethi3d.com.br - */ - -#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__) - #error "Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu." -#endif - -#define BOARD_NAME "Sethi 3D_1" - -#ifndef GEN7_VERSION - #define GEN7_VERSION 12 // v1.x -#endif - -//x axis pins -#define X_STEP_PIN 19 -#define X_DIR_PIN 18 -#define X_ENABLE_PIN 24 -#define X_STOP_PIN 2 - -//y axis pins -#define Y_STEP_PIN 23 -#define Y_DIR_PIN 22 -#define Y_ENABLE_PIN 24 -#define Y_STOP_PIN 0 - -//z axis pins -#define Z_STEP_PIN 26 -#define Z_DIR_PIN 25 -#define Z_ENABLE_PIN 24 -#define Z_MIN_PIN 1 -#define Z_MAX_PIN 0 - -//extruder pins -#define E0_STEP_PIN 28 -#define E0_DIR_PIN 27 -#define E0_ENABLE_PIN 24 - -#define TEMP_0_PIN 1 -#define TEMP_BED_PIN 2 - -#define HEATER_0_PIN 4 -#define HEATER_BED_PIN 3 - - -#if (GEN7_VERSION >= 13) - // Gen7 v1.3 removed the fan pin - #define FAN_PIN -1 -#else - #define FAN_PIN 31 -#endif - -#define PS_ON_PIN 15 - -//All these generations of Gen7 supply thermistor power -//via PS_ON, so ignore bad thermistor readings -#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE - -//our pin for debugging. -#define DEBUG_PIN 0 - -//our RS485 pins -#define TX_ENABLE_PIN 12 -#define RX_ENABLE_PIN 13 diff --git a/Marlin/pins_STB_11.h b/Marlin/pins_STB_11.h deleted file mode 100644 index 318dc39..0000000 --- a/Marlin/pins_STB_11.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * STB V1.1 pin assignments - */ - -#define BOARD_NAME "STB V1.1" - -#if defined(__AVR_ATmega1284P__) - #define LARGE_FLASH true -#endif - -#define SANGUINOLOLU_V_1_2 -#include "pins_SANGUINOLOLU_11.h" diff --git a/Marlin/pins_Swift.h b/Marlin/pins_Swift.h deleted file mode 100644 index 370099d..0000000 --- a/Marlin/pins_Swift.h +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - - - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#ifndef BOARD_NAME - #define BOARD_NAME "Swift 1.0" -#endif - -#define LARGE_FLASH true - - -#define SERVO0_PIN 6 - -//#define SERVO1_PIN 6 -//#define SERVO2_PIN 5 -//#define SERVO3_PIN 4 - -#define X_MIN_PIN 27 -#ifndef X_MAX_PIN - //#define X_MAX_PIN 41 -#endif -#define Y_MIN_PIN 42 -//#define Y_MAX_PIN 25 -#define Z_MIN_PIN 29 -//#define Z_MAX_PIN 29 -#ifndef Z_MIN_PROBE_PIN - //#define Z_MIN_PROBE_PIN 32 -#endif - -#define X_STEP_PIN 54 //S -#define X_DIR_PIN 55 //S -#define X_ENABLE_PIN 38 //S - -#define Y_STEP_PIN 60 //S -#define Y_DIR_PIN 61 //S -#define Y_ENABLE_PIN 56 //S - -#define Z_STEP_PIN 46 //S -#define Z_DIR_PIN 48 //S -#define Z_ENABLE_PIN 62 //S - -#define E0_STEP_PIN 26 //S -#define E0_DIR_PIN 28 //S -#define E0_ENABLE_PIN 24 //S - -#define E1_STEP_PIN 36 -#define E1_DIR_PIN 34 -#define E1_ENABLE_PIN 30 - -#define SDSS 53 // sd card cs pin -#define LED_PIN 2 // R 13 - -#define LED_G 3 //G -#define LED_B 5 //B - -#define BEEPER_PIN 44 - -#define KEY_MENU_PIN //PE6 -#define KEY_PLAY_PIN // PE7 -#define KEY_STATE_PIN 11 - -#define E2PROM_SCL // 12 PB7 -#define E2PROM_SDA // 13 PB6 - -#define X_SCL // PD6 -#define X_SDA // PD5 - -#define Y_SCL 34 // PC3 -#define Y_SDA 36 // PC1 - -#define Z_SCL // PH7 -#define Z_SDA // PH2 - -#define SERVO_HAND_ROT_ANALOG_PIN A3 - -#define POWER_DETECT A5 - -// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector -#define FILWIDTH_PIN 47 //5 // ANALOG NUMBERING - -// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector -#define FIL_RUNOUT_PIN 49 // 4 - -//#define PS_ON_PIN 12 // PS POWER -#define TEMP_0_PIN 13 // ANALOG NUMBERING -#define TEMP_1_PIN 14 // ANALOG NUMBERING -#define TEMP_BED_PIN 15 // ANALOG NUMBERING - -#define HEATER_0_PIN 9 - - -#define FAN_PIN 8 -#define HEATER_BED_PIN 10 - -#define VALVE_EN 4 -//#define PUMP_EN //PG4 - - -#define PUMP_FEEDBACK A9 - -//#define GRIPPER pC7 -#define GRIPPER_FEEDBACK 22 -//#define HW_PIN_0 - - -#if ENABLED(Z_PROBE_SLED) - #define SLED_PIN -1 -#endif - - - - - #define MOSFET_D_PIN -1 - - - - - - -#ifndef FAN_PIN - #define FAN_PIN 4 // IO pin. Buffer needed -#endif - - diff --git a/Marlin/pins_TEENSY2.h b/Marlin/pins_TEENSY2.h deleted file mode 100644 index f4f7d4c..0000000 --- a/Marlin/pins_TEENSY2.h +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286) - * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! - * http://www.pjrc.com/teensy/teensyduino.html - * See http://reprap.org/wiki/Printrboard for more info - * - * CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make - * - * DaveX plan for Teensylu/printrboard-type pinouts for a TeensyBreadboard: - * (ref teensylu & sprinter) - * - * USB - * GND GND |-----#####-----| +5V ATX +5SB - * ATX PS_ON PWM 27 |b7 ##### b6| 26 PWM* Stepper Enable - * PWM 0 |d0 b5| 25 PWM* - * PWM 1 |d1 b4| 24 PWM - * X_MIN 2 |d2 b3| 23 MISO_PIN - * Y_MIN 3 |d3 b2| 22 MOSI_PIN - * Z_MIN 4 |d4 * * b1| 21 SCK_PIN - * 5 |d5 e e b0| 20 SDSS - * LED 6 |d6 5 4 e7| 19 - * 7 |d7 e6| 18 - * LCD RS 8 |e0 | GND - * LCD EN 9 |e1 a4 a0 R| AREF - * LCD D4 10 |c0 a5 a1 f0| 38 A0 ENC_1 - * LCD D5 11 |c1 a6 a2 f1| 39 A1 ENC_2 - * LCD D6 12 |c2 a7 a3 f2| 40 A2 ENC_CLK - * LCD D6 13 |c3 f3| 41 A3 - * Bed Heat PWM 14 |c4 V G R f4| 42 A4 - * Extruder Heat PWM 15 |c5 c n S f5| 43 A5 - * Fan PWM 16 |c6 c d T f6| 44 A6 Bed TC - * 17 |c7 * * * f7| 45 A7 Extruder TC * 4.7k * +5 - * ----------------- - * - * Interior E4: 36, INT4 - * Interior E5: 37, INT5 - * Interior PA0-7: 28-35 -- Printrboard and Teensylu use these pins for step & direction: - * T++ PA Signal Marlin - * - * Z STEP 32 a4 a0 28 X STEP - * Z DIR 33 a5 a1 29 X DIR - * E STEP 34 a6 a2 30 Y STEP - * E DIR 35 a7 a3 31 Y DIR - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical. - #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config" - // (or build from command line) -#endif - -#define BOARD_NAME "Teensy++2.0" - -#define LARGE_FLASH true - -#define X_STEP_PIN 28 // 0 Marlin -#define X_DIR_PIN 29 // 1 Marlin -#define X_ENABLE_PIN 26 - -#define Y_STEP_PIN 30 // 2 Marlin -#define Y_DIR_PIN 31 // 3 -#define Y_ENABLE_PIN 26 // Shared w/x - -#define Z_STEP_PIN 32 // 4 -#define Z_DIR_PIN 33 // 5 -#define Z_ENABLE_PIN 26 // Shared w/x - -#define E0_STEP_PIN 34 // 6 -#define E0_DIR_PIN 35 // 7 -#define E0_ENABLE_PIN 26 // Shared w/x - -#define HEATER_0_PIN 15 // 21 // Extruder -#define HEATER_BED_PIN 14 // 20 // Bed -#define FAN_PIN 16 // 22 // Fan - -#define X_STOP_PIN 2 -#define Y_STOP_PIN 3 -#define Z_STOP_PIN 4 - -#define TEMP_0_PIN 7 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 6 // Bed / Analog pin numbering - -#define SDSS 20 // 8 -#define LED_PIN 6 -#define PS_ON_PIN 27 - -#if ENABLED(ULTIPANEL) - #define LCD_PINS_RS 8 - #define LCD_PINS_ENABLE 9 - #define LCD_PINS_D4 10 - #define LCD_PINS_D5 11 - #define LCD_PINS_D6 12 - #define LCD_PINS_D7 13 - #define BTN_EN1 38 - #define BTN_EN2 39 - #define BTN_ENC 40 -#endif diff --git a/Marlin/pins_TEENSYLU.h b/Marlin/pins_TEENSYLU.h deleted file mode 100644 index 7758377..0000000 --- a/Marlin/pins_TEENSYLU.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Teensylu 0.7 pin assignments (AT90USB1286) - * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! - * http://www.pjrc.com/teensy/teensyduino.html - * See http://reprap.org/wiki/Printrboard for more info - */ - -#ifndef __AVR_AT90USB1286__ - #error "Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu." -#endif - -#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional. - #error "These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h" -#endif - -#define BOARD_NAME "Teensylu" - -#define LARGE_FLASH true - -#define X_STEP_PIN 0 -#define X_DIR_PIN 1 -#define X_ENABLE_PIN 39 - -#define Y_STEP_PIN 2 -#define Y_DIR_PIN 3 -#define Y_ENABLE_PIN 38 - -#define Z_STEP_PIN 4 -#define Z_DIR_PIN 5 -#define Z_ENABLE_PIN 23 - -#define E0_STEP_PIN 6 -#define E0_DIR_PIN 7 -#define E0_ENABLE_PIN 19 - -#define HEATER_0_PIN 21 // Extruder -#define HEATER_1_PIN 46 -#define HEATER_2_PIN 47 -#define HEATER_BED_PIN 20 - -// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin -// fastio pin numbering otherwise -#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN) - #define FAN_PIN 22 -#else - #define FAN_PIN 16 -#endif - -#define X_STOP_PIN 13 -#define Y_STOP_PIN 14 -#define Z_STOP_PIN 15 -#define TEMP_0_PIN 7 // Extruder / Analog pin numbering -#define TEMP_BED_PIN 6 // Bed / Analog pin numbering - -#define SDSS 8 - -#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) - - #define BEEPER_PIN -1 - - #if ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 27 //RX1 - fastio.h pin mapping 27 - #define BTN_EN2 26 //TX1 - fastio.h pin mapping 26 - #define BTN_ENC 43 //A3 - fastio.h pin mapping 43 - #define SDSS 40 //use SD card on Panelolu2 (Teensyduino pin mapping) - #endif // LCD_I2C_PANELOLU2 - - #define SD_DETECT_PIN -1 - -#endif // ULTRA_LCD && NEWPANEL - diff --git a/Marlin/pins_ULTIMAIN_2.h b/Marlin/pins_ULTIMAIN_2.h deleted file mode 100644 index c2de0a4..0000000 --- a/Marlin/pins_ULTIMAIN_2.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Ultiboard v2.0 pin assignments - */ - -#ifndef __AVR_ATmega2560__ - #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." -#endif - -#define DEFAULT_MACHINE_NAME "Ultimaker" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" -#define BOARD_NAME "Ultimaker 2.x" - -#define X_STEP_PIN 25 -#define X_DIR_PIN 23 -#define X_STOP_PIN 22 -#define X_ENABLE_PIN 27 - -#define Y_STEP_PIN 32 -#define Y_DIR_PIN 33 -#define Y_STOP_PIN 26 -#define Y_ENABLE_PIN 31 - -#define Z_STEP_PIN 35 -#define Z_DIR_PIN 36 -#define Z_STOP_PIN 29 -#define Z_ENABLE_PIN 34 - -#define HEATER_BED_PIN 4 -#define TEMP_BED_PIN 10 - -#define HEATER_0_PIN 2 -#define TEMP_0_PIN 8 - -#define HEATER_1_PIN 3 -#define TEMP_1_PIN 9 - -#define E0_STEP_PIN 42 -#define E0_DIR_PIN 43 -#define E0_ENABLE_PIN 37 - -#define E1_STEP_PIN 49 -#define E1_DIR_PIN 47 -#define E1_ENABLE_PIN 48 - -#define SDSS 53 -#define LED_PIN 8 -#define FAN_PIN 7 -#define SAFETY_TRIGGERED_PIN 28 //PIN to detect the safety circuit has triggered -#define MAIN_VOLTAGE_MEASURE_PIN 14 //Analogue PIN to measure the main voltage, with a 100k - 4k7 resitor divider. - -#define MOTOR_CURRENT_PWM_XY_PIN 44 -#define MOTOR_CURRENT_PWM_Z_PIN 45 -#define MOTOR_CURRENT_PWM_E_PIN 46 -//Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range -#define MOTOR_CURRENT_PWM_RANGE 2000 -#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250} - -#define BEEPER_PIN 18 - -#define LCD_PINS_RS 20 -#define LCD_PINS_ENABLE 15 -#define LCD_PINS_D4 14 -#define LCD_PINS_D5 21 -#define LCD_PINS_D6 5 -#define LCD_PINS_D7 6 - -//buttons are directly attached -#define BTN_EN1 40 -#define BTN_EN2 41 -#define BTN_ENC 19 - -#define SD_DETECT_PIN 39 diff --git a/Marlin/pins_ULTIMAKER.h b/Marlin/pins_ULTIMAKER.h deleted file mode 100644 index d770f3a..0000000 --- a/Marlin/pins_ULTIMAKER.h +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Ultimaker pin assignments - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define DEFAULT_MACHINE_NAME "Ultimaker" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" -#define BOARD_NAME "Ultimaker" - -#define LARGE_FLASH true - -#define SERVO0_PIN 13 // untested - -#define X_STEP_PIN 25 -#define X_DIR_PIN 23 -#define X_MIN_PIN 22 -#define X_MAX_PIN 24 -#define X_ENABLE_PIN 27 - -#define Y_STEP_PIN 31 -#define Y_DIR_PIN 33 -#define Y_MIN_PIN 26 -#define Y_MAX_PIN 28 -#define Y_ENABLE_PIN 29 - -#define Z_STEP_PIN 37 -#define Z_DIR_PIN 39 -#define Z_MIN_PIN 30 -#define Z_MAX_PIN 32 -#define Z_ENABLE_PIN 35 - -#define HEATER_BED_PIN 4 -#define TEMP_BED_PIN 10 - -#define HEATER_0_PIN 2 -#define TEMP_0_PIN 8 - -#define HEATER_1_PIN 3 -#define TEMP_1_PIN 9 - -#define E0_STEP_PIN 43 -#define E0_DIR_PIN 45 -#define E0_ENABLE_PIN 41 - -#define E1_STEP_PIN 49 -#define E1_DIR_PIN 47 -#define E1_ENABLE_PIN 48 - -#define SDSS 53 -#define LED_PIN 13 -#define FAN_PIN 7 -#define PS_ON_PIN 12 -#define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing. - -#if ENABLED(ULTRA_LCD) - - #define BEEPER_PIN 18 - - #if ENABLED(NEWPANEL) - - #define LCD_PINS_RS 20 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 16 - #define LCD_PINS_D5 21 - #define LCD_PINS_D6 5 - #define LCD_PINS_D7 6 - - //buttons are directly attached - #define BTN_EN1 40 - #define BTN_EN2 42 - #define BTN_ENC 19 - - #define SD_DETECT_PIN 38 - - #else //!NEWPANEL - Old style panel with shift register - - //buttons are attached to a shift register - #define SHIFT_CLK 38 - #define SHIFT_LD 42 - #define SHIFT_OUT 40 - #define SHIFT_EN 17 - - #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 5 - #define LCD_PINS_D4 6 - #define LCD_PINS_D5 21 - #define LCD_PINS_D6 20 - #define LCD_PINS_D7 19 - - #define SD_DETECT_PIN -1 - - #endif // !NEWPANEL - -#endif // ULTRA_LCD diff --git a/Marlin/pins_ULTIMAKER_OLD.h b/Marlin/pins_ULTIMAKER_OLD.h deleted file mode 100644 index 33bc26c..0000000 --- a/Marlin/pins_ULTIMAKER_OLD.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * Ultimaker pin assignments (Old electronics) - */ - -#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - -#define DEFAULT_MACHINE_NAME "Ultimaker" -#define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin" -#define BOARD_NAME "Ultimaker <1.5.4" - -#define LARGE_FLASH true - -#define X_STEP_PIN 25 -#define X_DIR_PIN 23 -#define X_MIN_PIN 15 -#define X_MAX_PIN 14 -#define X_ENABLE_PIN 27 - -#define Y_STEP_PIN 31 -#define Y_DIR_PIN 33 -#define Y_MIN_PIN 17 -#define Y_MAX_PIN 16 -#define Y_ENABLE_PIN 29 - -#define Z_STEP_PIN 37 -#define Z_DIR_PIN 39 -#define Z_MIN_PIN 19 -#define Z_MAX_PIN 18 -#define Z_ENABLE_PIN 35 - -#define TEMP_0_PIN 8 -#define TEMP_1_PIN 1 - -#define HEATER_0_PIN 2 -#define HEATER_1_PIN 1 - -#define E0_STEP_PIN 43 -#define E0_DIR_PIN 45 -#define E0_ENABLE_PIN 41 - -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 - -#define LCD_PINS_RS 24 -#define LCD_PINS_ENABLE 22 -#define LCD_PINS_D4 36 -#define LCD_PINS_D5 34 -#define LCD_PINS_D6 32 -#define LCD_PINS_D7 30 diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp deleted file mode 100644 index 708fc42..0000000 --- a/Marlin/planner.cpp +++ /dev/null @@ -1,1222 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * planner.cpp - * - * Buffer movement commands and manage the acceleration profile plan - * - * Derived from Grbl - * Copyright (c) 2009-2011 Simen Svale Skogsrud - * - * The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis. - * - * - * Reasoning behind the mathematics in this module (in the key of 'Mathematica'): - * - * s == speed, a == acceleration, t == time, d == distance - * - * Basic definitions: - * Speed[s_, a_, t_] := s + (a*t) - * Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t] - * - * Distance to reach a specific speed with a constant acceleration: - * Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t] - * d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance() - * - * Speed after a given distance of travel with constant acceleration: - * Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t] - * m -> Sqrt[2 a d + s^2] - * - * DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2] - * - * When to start braking (di) to reach a specified destination speed (s2) after accelerating - * from initial speed s1 without ever stopping at a plateau: - * Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di] - * di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance() - * - * IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a) - * - */ - -#include "planner.h" -#include "stepper.h" -#include "temperature.h" -#include "ultralcd.h" -#include "language.h" - -#include "Marlin.h" - -#if ENABLED(MESH_BED_LEVELING) - #include "mesh_bed_leveling.h" -#endif - -Planner planner; - - // public: - -/** - * A ring buffer of moves described in steps - */ -block_t Planner::block_buffer[BLOCK_BUFFER_SIZE]; -volatile uint8_t Planner::block_buffer_head = 0; // Index of the next block to be pushed -volatile uint8_t Planner::block_buffer_tail = 0; - -float Planner::max_feedrate_mm_s[NUM_AXIS], // Max speeds in mm per second - Planner::axis_steps_per_mm[NUM_AXIS], - Planner::steps_to_mm[NUM_AXIS]; - -unsigned long Planner::max_acceleration_steps_per_s2[NUM_AXIS], - Planner::max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software - -millis_t Planner::min_segment_time; -float Planner::min_feedrate_mm_s, - Planner::acceleration, // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX - Planner::retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX - Planner::travel_acceleration, // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX - Planner::max_xy_jerk, // The largest speed change requiring no acceleration - Planner::max_z_jerk, - Planner::max_e_jerk, - Planner::min_travel_feedrate_mm_s; - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - matrix_3x3 Planner::bed_level_matrix; // Transform to compensate for bed level -#endif - -#if ENABLED(AUTOTEMP) - float Planner::autotemp_max = 250, - Planner::autotemp_min = 210, - Planner::autotemp_factor = 0.1; - bool Planner::autotemp_enabled = false; -#endif - -// private: - -long Planner::position[NUM_AXIS] = { 0 }; - -float Planner::previous_speed[NUM_AXIS], - Planner::previous_nominal_speed; - -#if ENABLED(DISABLE_INACTIVE_EXTRUDER) - uint8_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 }; -#endif // DISABLE_INACTIVE_EXTRUDER - -#ifdef XY_FREQUENCY_LIMIT - // Old direction bits. Used for speed calculations - unsigned char Planner::old_direction_bits = 0; - // Segment times (in µs). Used for speed calculations - long Planner::axis_segment_time[2][3] = { {MAX_FREQ_TIME + 1, 0, 0}, {MAX_FREQ_TIME + 1, 0, 0} }; -#endif - -/** - * Class and Instance Methods - */ - -Planner::Planner() { init(); } - -void Planner::init() { - block_buffer_head = block_buffer_tail = 0; - memset(position, 0, sizeof(position)); // clear position - LOOP_XYZE(i) previous_speed[i] = 0.0; - previous_nominal_speed = 0.0; - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - bed_level_matrix.set_to_identity(); - #endif -} - -/** - * Calculate trapezoid parameters, multiplying the entry- and exit-speeds - * by the provided factors. - */ -void Planner::calculate_trapezoid_for_block(block_t* block, float entry_factor, float exit_factor) { - unsigned long initial_rate = ceil(block->nominal_rate * entry_factor), - final_rate = ceil(block->nominal_rate * exit_factor); // (steps per second) - - // Limit minimal step rate (Otherwise the timer will overflow.) - NOLESS(initial_rate, 120); - NOLESS(final_rate, 120); - - long accel = block->acceleration_steps_per_s2; - int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, accel)); - int32_t decelerate_steps = floor(estimate_acceleration_distance(block->nominal_rate, final_rate, -accel)); - - // Calculate the size of Plateau of Nominal Rate. - int32_t plateau_steps = block->step_event_count - accelerate_steps - decelerate_steps; - - // Is the Plateau of Nominal Rate smaller than nothing? That means no cruising, and we will - // have to use intersection_distance() to calculate when to abort accel and start braking - // in order to reach the final_rate exactly at the end of this block. - if (plateau_steps < 0) { - accelerate_steps = ceil(intersection_distance(initial_rate, final_rate, accel, block->step_event_count)); - accelerate_steps = max(accelerate_steps, 0); // Check limits due to numerical round-off - accelerate_steps = min((uint32_t)accelerate_steps, block->step_event_count);//(We can cast here to unsigned, because the above line ensures that we are above zero) - plateau_steps = 0; - } - - #if ENABLED(ADVANCE) - volatile long initial_advance = block->advance * sq(entry_factor); - volatile long final_advance = block->advance * sq(exit_factor); - #endif // ADVANCE - - // block->accelerate_until = accelerate_steps; - // block->decelerate_after = accelerate_steps+plateau_steps; - CRITICAL_SECTION_START; // Fill variables used by the stepper in a critical section - if (!block->busy) { // Don't update variables if block is busy. - block->accelerate_until = accelerate_steps; - block->decelerate_after = accelerate_steps + plateau_steps; - block->initial_rate = initial_rate; - block->final_rate = final_rate; - #if ENABLED(ADVANCE) - block->initial_advance = initial_advance; - block->final_advance = final_advance; - #endif - } - CRITICAL_SECTION_END; -} - -// "Junction jerk" in this context is the immediate change in speed at the junction of two blocks. -// This method will calculate the junction jerk as the euclidean distance between the nominal -// velocities of the respective blocks. -//inline float junction_jerk(block_t *before, block_t *after) { -// return sqrt( -// pow((before->speed_x-after->speed_x), 2)+pow((before->speed_y-after->speed_y), 2)); -//} - - -// The kernel called by recalculate() when scanning the plan from last to first entry. -void Planner::reverse_pass_kernel(block_t* previous, block_t* current, block_t* next) { - if (!current) return; - UNUSED(previous); - - if (next) { - // If entry speed is already at the maximum entry speed, no need to recheck. Block is cruising. - // If not, block in state of acceleration or deceleration. Reset entry speed to maximum and - // check for maximum allowable speed reductions to ensure maximum possible planned speed. - float max_entry_speed = current->max_entry_speed; - if (current->entry_speed != max_entry_speed) { - - // If nominal length true, max junction speed is guaranteed to be reached. Only compute - // for max allowable speed if block is decelerating and nominal length is false. - if (!current->nominal_length_flag && max_entry_speed > next->entry_speed) { - current->entry_speed = min(max_entry_speed, - max_allowable_speed(-current->acceleration, next->entry_speed, current->millimeters)); - } - else { - current->entry_speed = max_entry_speed; - } - current->recalculate_flag = true; - - } - } // Skip last block. Already initialized and set for recalculation. -} - -/** - * recalculate() needs to go over the current plan twice. - * Once in reverse and once forward. This implements the reverse pass. - */ -void Planner::reverse_pass() { - - if (movesplanned() > 3) { - - block_t* block[3] = { NULL, NULL, NULL }; - - // Make a local copy of block_buffer_tail, because the interrupt can alter it - CRITICAL_SECTION_START; - uint8_t tail = block_buffer_tail; - CRITICAL_SECTION_END - - uint8_t b = BLOCK_MOD(block_buffer_head - 3); - while (b != tail) { - b = prev_block_index(b); - block[2] = block[1]; - block[1] = block[0]; - block[0] = &block_buffer[b]; - reverse_pass_kernel(block[0], block[1], block[2]); - } - } -} - -// The kernel called by recalculate() when scanning the plan from first to last entry. -void Planner::forward_pass_kernel(block_t* previous, block_t* current, block_t* next) { - if (!previous) return; - UNUSED(next); - - // If the previous block is an acceleration block, but it is not long enough to complete the - // full speed change within the block, we need to adjust the entry speed accordingly. Entry - // speeds have already been reset, maximized, and reverse planned by reverse planner. - // If nominal length is true, max junction speed is guaranteed to be reached. No need to recheck. - if (!previous->nominal_length_flag) { - if (previous->entry_speed < current->entry_speed) { - double entry_speed = min(current->entry_speed, - max_allowable_speed(-previous->acceleration, previous->entry_speed, previous->millimeters)); - // Check for junction speed change - if (current->entry_speed != entry_speed) { - current->entry_speed = entry_speed; - current->recalculate_flag = true; - } - } - } -} - -/** - * recalculate() needs to go over the current plan twice. - * Once in reverse and once forward. This implements the forward pass. - */ -void Planner::forward_pass() { - block_t* block[3] = { NULL, NULL, NULL }; - - for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { - block[0] = block[1]; - block[1] = block[2]; - block[2] = &block_buffer[b]; - forward_pass_kernel(block[0], block[1], block[2]); - } - forward_pass_kernel(block[1], block[2], NULL); -} - -/** - * Recalculate the trapezoid speed profiles for all blocks in the plan - * according to the entry_factor for each junction. Must be called by - * recalculate() after updating the blocks. - */ -void Planner::recalculate_trapezoids() { - int8_t block_index = block_buffer_tail; - block_t* current; - block_t* next = NULL; - - while (block_index != block_buffer_head) { - current = next; - next = &block_buffer[block_index]; - if (current) { - // Recalculate if current block entry or exit junction speed has changed. - if (current->recalculate_flag || next->recalculate_flag) { - // NOTE: Entry and exit factors always > 0 by all previous logic operations. - float nom = current->nominal_speed; - calculate_trapezoid_for_block(current, current->entry_speed / nom, next->entry_speed / nom); - current->recalculate_flag = false; // Reset current only to ensure next trapezoid is computed - } - } - block_index = next_block_index(block_index); - } - // Last/newest block in buffer. Exit speed is set with MINIMUM_PLANNER_SPEED. Always recalculated. - if (next) { - float nom = next->nominal_speed; - calculate_trapezoid_for_block(next, next->entry_speed / nom, (MINIMUM_PLANNER_SPEED) / nom); - next->recalculate_flag = false; - } -} - -/* - * Recalculate the motion plan according to the following algorithm: - * - * 1. Go over every block in reverse order... - * - * Calculate a junction speed reduction (block_t.entry_factor) so: - * - * a. The junction jerk is within the set limit, and - * - * b. No speed reduction within one block requires faster - * deceleration than the one, true constant acceleration. - * - * 2. Go over every block in chronological order... - * - * Dial down junction speed reduction values if: - * a. The speed increase within one block would require faster - * acceleration than the one, true constant acceleration. - * - * After that, all blocks will have an entry_factor allowing all speed changes to - * be performed using only the one, true constant acceleration, and where no junction - * jerk is jerkier than the set limit, Jerky. Finally it will: - * - * 3. Recalculate "trapezoids" for all blocks. - */ -void Planner::recalculate() { - reverse_pass(); - forward_pass(); - recalculate_trapezoids(); -} - - -#if ENABLED(AUTOTEMP) - - void Planner::getHighESpeed() { - static float oldt = 0; - - if (!autotemp_enabled) return; - if (thermalManager.degTargetHotend(0) + 2 < autotemp_min) return; // probably temperature set to zero. - - float high = 0.0; - for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { - block_t* block = &block_buffer[b]; - if (block->steps[X_AXIS] || block->steps[Y_AXIS] || block->steps[Z_AXIS]) { - float se = (float)block->steps[E_AXIS] / block->step_event_count * block->nominal_speed; // mm/sec; - NOLESS(high, se); - } - } - - float t = autotemp_min + high * autotemp_factor; - t = constrain(t, autotemp_min, autotemp_max); - if (oldt > t) { - t *= (1 - (AUTOTEMP_OLDWEIGHT)); - t += (AUTOTEMP_OLDWEIGHT) * oldt; - } - oldt = t; - thermalManager.setTargetHotend(t, 0); - } - -#endif //AUTOTEMP - -/** - * Maintain fans, paste extruder pressure, - */ -void Planner::check_axes_activity() { - unsigned char axis_active[NUM_AXIS] = { 0 }, - tail_fan_speed[FAN_COUNT]; - - #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) tail_fan_speed[i] = fanSpeeds[i]; - #endif - - #if ENABLED(BARICUDA) - #if HAS_HEATER_1 - unsigned char tail_valve_pressure = baricuda_valve_pressure; - #endif - #if HAS_HEATER_2 - unsigned char tail_e_to_p_pressure = baricuda_e_to_p_pressure; - #endif - #endif - - if (blocks_queued()) { - - #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) tail_fan_speed[i] = block_buffer[block_buffer_tail].fan_speed[i]; - #endif - - block_t* block; - - #if ENABLED(BARICUDA) - block = &block_buffer[block_buffer_tail]; - #if HAS_HEATER_1 - tail_valve_pressure = block->valve_pressure; - #endif - #if HAS_HEATER_2 - tail_e_to_p_pressure = block->e_to_p_pressure; - #endif - #endif - - for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { - block = &block_buffer[b]; - LOOP_XYZE(i) if (block->steps[i]) axis_active[i]++; - } - } - #if ENABLED(DISABLE_X) - if (!axis_active[X_AXIS]) disable_x(); - #endif - #if ENABLED(DISABLE_Y) - if (!axis_active[Y_AXIS]) disable_y(); - #endif - #if ENABLED(DISABLE_Z) - if (!axis_active[Z_AXIS]) disable_z(); - #endif - #if ENABLED(DISABLE_E) - if (!axis_active[E_AXIS]) { - disable_e0(); - disable_e1(); - disable_e2(); - disable_e3(); - } - #endif - - #if FAN_COUNT > 0 - - #if defined(FAN_MIN_PWM) - #define CALC_FAN_SPEED(f) (tail_fan_speed[f] ? ( FAN_MIN_PWM + (tail_fan_speed[f] * (255 - FAN_MIN_PWM)) / 255 ) : 0) - #else - #define CALC_FAN_SPEED(f) tail_fan_speed[f] - #endif - - #ifdef FAN_KICKSTART_TIME - - static millis_t fan_kick_end[FAN_COUNT] = { 0 }; - - #define KICKSTART_FAN(f) \ - if (tail_fan_speed[f]) { \ - millis_t ms = millis(); \ - if (fan_kick_end[f] == 0) { \ - fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \ - tail_fan_speed[f] = 255; \ - } else { \ - if (PENDING(ms, fan_kick_end[f])) { \ - tail_fan_speed[f] = 255; \ - } \ - } \ - } else { \ - fan_kick_end[f] = 0; \ - } - - #if HAS_FAN0 - KICKSTART_FAN(0); - #endif - #if HAS_FAN1 - KICKSTART_FAN(1); - #endif - #if HAS_FAN2 - KICKSTART_FAN(2); - #endif - - #endif //FAN_KICKSTART_TIME - - #if ENABLED(FAN_SOFT_PWM) - #if HAS_FAN0 - thermalManager.fanSpeedSoftPwm[0] = CALC_FAN_SPEED(0); - #endif - #if HAS_FAN1 - thermalManager.fanSpeedSoftPwm[1] = CALC_FAN_SPEED(1); - #endif - #if HAS_FAN2 - thermalManager.fanSpeedSoftPwm[2] = CALC_FAN_SPEED(2); - #endif - #else - #if HAS_FAN0 - - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - analogWrite(FAN_PIN, CALC_FAN_SPEED(0)); - #endif - #endif - #if HAS_FAN1 - analogWrite(FAN1_PIN, CALC_FAN_SPEED(1)); - #endif - #if HAS_FAN2 - analogWrite(FAN2_PIN, CALC_FAN_SPEED(2)); - #endif - #endif - - #endif // FAN_COUNT > 0 - - #if ENABLED(AUTOTEMP) - getHighESpeed(); - #endif - - #if ENABLED(BARICUDA) - #if HAS_HEATER_1 - analogWrite(HEATER_1_PIN, tail_valve_pressure); - #endif - #if HAS_HEATER_2 - analogWrite(HEATER_2_PIN, tail_e_to_p_pressure); - #endif - #endif -} - -/** - * Planner::buffer_line - * - * Add a new linear movement to the buffer. - * - * x,y,z,e - target position in mm - * fr_mm_s - (target) speed of the move - * extruder - target extruder - */ - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING) - void Planner::buffer_line(float x, float y, float z, const float& e, float fr_mm_s, const uint8_t extruder) -#else - void Planner::buffer_line(const float& x, const float& y, const float& z, const float& e, float fr_mm_s, const uint8_t extruder) -#endif // AUTO_BED_LEVELING_FEATURE -{ - // Calculate the buffer head after we push this byte - int next_buffer_head = next_block_index(block_buffer_head); - - // If the buffer is full: good! That means we are well ahead of the robot. - // Rest here until there is room in the buffer. - while (block_buffer_tail == next_buffer_head) idle(); - - #if ENABLED(MESH_BED_LEVELING) - if (mbl.active()) - z += mbl.get_z(x - home_offset[X_AXIS], y - home_offset[Y_AXIS]); - #elif ENABLED(AUTO_BED_LEVELING_FEATURE) - apply_rotation_xyz(bed_level_matrix, x, y, z); - #endif - - // The target position of the tool 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 - long target[NUM_AXIS] = { - lround(x * axis_steps_per_mm[X_AXIS]), - lround(y * axis_steps_per_mm[Y_AXIS]), - lround(z * axis_steps_per_mm[Z_AXIS]), - lround(e * axis_steps_per_mm[E_AXIS]) - }; - - long dx = target[X_AXIS] - position[X_AXIS], - dy = target[Y_AXIS] - position[Y_AXIS], - dz = target[Z_AXIS] - position[Z_AXIS]; - - // DRYRUN ignores all temperature constraints and assures that the extruder is instantly satisfied - if (DEBUGGING(DRYRUN)) - position[E_AXIS] = target[E_AXIS]; - - long de = target[E_AXIS] - position[E_AXIS]; - - #if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - if (de) { - if (thermalManager.tooColdToExtrude(extruder)) { - position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part - de = 0; // no difference - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); - } - #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - if (labs(de) > axis_steps_per_mm[E_AXIS] * (EXTRUDE_MAXLENGTH)) { - position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part - de = 0; // no difference - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); - } - #endif - } - #endif - - // Prepare to set up new block - block_t* block = &block_buffer[block_buffer_head]; - - // Mark block as not busy (Not executed by the stepper interrupt) - block->busy = false; - - // Number of steps for each axis - #if ENABLED(COREXY) - // corexy planning - // these equations follow the form of the dA and dB equations on http://www.corexy.com/theory.html - block->steps[A_AXIS] = labs(dx + dy); - block->steps[B_AXIS] = labs(dx - dy); - block->steps[Z_AXIS] = labs(dz); - #elif ENABLED(COREXZ) - // corexz planning - block->steps[A_AXIS] = labs(dx + dz); - block->steps[Y_AXIS] = labs(dy); - block->steps[C_AXIS] = labs(dx - dz); - #elif ENABLED(COREYZ) - // coreyz planning - block->steps[X_AXIS] = labs(dx); - block->steps[B_AXIS] = labs(dy + dz); - block->steps[C_AXIS] = labs(dy - dz); - #else - // default non-h-bot planning - block->steps[X_AXIS] = labs(dx); - block->steps[Y_AXIS] = labs(dy); - block->steps[Z_AXIS] = labs(dz); - #endif - - block->steps[E_AXIS] = labs(de); - block->steps[E_AXIS] *= volumetric_multiplier[extruder]; - block->steps[E_AXIS] *= extruder_multiplier[extruder]; - block->steps[E_AXIS] /= 100; - block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS]))); - - // Bail if this is a zero-length block - if (block->step_event_count <= dropsegments) return; - - // For a mixing extruder, get a magnified step_event_count for each - #if ENABLED(MIXING_EXTRUDER) - for (uint8_t i = 0; i < MIXING_STEPPERS; i++) - block->mix_event_count[i] = (mixing_factor[i] < 0.0001) ? 0 : block->step_event_count / mixing_factor[i]; - #endif - - #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) block->fan_speed[i] = fanSpeeds[i]; - #endif - - #if ENABLED(BARICUDA) - block->valve_pressure = baricuda_valve_pressure; - block->e_to_p_pressure = baricuda_e_to_p_pressure; - #endif - - // Compute direction bits for this block - uint8_t db = 0; - #if ENABLED(COREXY) - if (dx < 0) SBI(db, X_HEAD); // Save the real Extruder (head) direction in X Axis - if (dy < 0) SBI(db, Y_HEAD); // ...and Y - if (dz < 0) SBI(db, Z_AXIS); - if (dx + dy < 0) SBI(db, A_AXIS); // Motor A direction - if (dx - dy < 0) SBI(db, B_AXIS); // Motor B direction - #elif ENABLED(COREXZ) - if (dx < 0) SBI(db, X_HEAD); // Save the real Extruder (head) direction in X Axis - if (dy < 0) SBI(db, Y_AXIS); - if (dz < 0) SBI(db, Z_HEAD); // ...and Z - if (dx + dz < 0) SBI(db, A_AXIS); // Motor A direction - if (dx - dz < 0) SBI(db, C_AXIS); // Motor C direction - #elif ENABLED(COREYZ) - if (dx < 0) SBI(db, X_AXIS); - if (dy < 0) SBI(db, Y_HEAD); // Save the real Extruder (head) direction in Y Axis - if (dz < 0) SBI(db, Z_HEAD); // ...and Z - if (dy + dz < 0) SBI(db, B_AXIS); // Motor B direction - if (dy - dz < 0) SBI(db, C_AXIS); // Motor C direction - #else - if (dx < 0) SBI(db, X_AXIS); - if (dy < 0) SBI(db, Y_AXIS); - if (dz < 0) SBI(db, Z_AXIS); - #endif - if (de < 0) SBI(db, E_AXIS); - block->direction_bits = db; - - block->active_extruder = extruder; - - //enable active axes - #if ENABLED(COREXY) - if (block->steps[A_AXIS] || block->steps[B_AXIS]) { - enable_x(); - enable_y(); - } - #if DISABLED(Z_LATE_ENABLE) - if (block->steps[Z_AXIS]) enable_z(); - #endif - #elif ENABLED(COREXZ) - if (block->steps[A_AXIS] || block->steps[C_AXIS]) { - enable_x(); - enable_z(); - } - if (block->steps[Y_AXIS]) enable_y(); - #else - if (block->steps[X_AXIS]) enable_x(); - if (block->steps[Y_AXIS]) enable_y(); - #if DISABLED(Z_LATE_ENABLE) - if (block->steps[Z_AXIS]) enable_z(); - #endif - #endif - - // Enable extruder(s) - if (block->steps[E_AXIS]) { - - #if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder - - for (int i = 0; i < EXTRUDERS; i++) - if (g_uc_extruder_last_move[i] > 0) g_uc_extruder_last_move[i]--; - - switch(extruder) { - case 0: - enable_e0(); - #if ENABLED(DUAL_X_CARRIAGE) - if (extruder_duplication_enabled) { - enable_e1(); - g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; - } - #endif - g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2; - #if EXTRUDERS > 1 - if (g_uc_extruder_last_move[1] == 0) disable_e1(); - #if EXTRUDERS > 2 - if (g_uc_extruder_last_move[2] == 0) disable_e2(); - #if EXTRUDERS > 3 - if (g_uc_extruder_last_move[3] == 0) disable_e3(); - #endif - #endif - #endif - break; - #if EXTRUDERS > 1 - case 1: - enable_e1(); - g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2; - if (g_uc_extruder_last_move[0] == 0) disable_e0(); - #if EXTRUDERS > 2 - if (g_uc_extruder_last_move[2] == 0) disable_e2(); - #if EXTRUDERS > 3 - if (g_uc_extruder_last_move[3] == 0) disable_e3(); - #endif - #endif - break; - #if EXTRUDERS > 2 - case 2: - enable_e2(); - g_uc_extruder_last_move[2] = (BLOCK_BUFFER_SIZE) * 2; - if (g_uc_extruder_last_move[0] == 0) disable_e0(); - if (g_uc_extruder_last_move[1] == 0) disable_e1(); - #if EXTRUDERS > 3 - if (g_uc_extruder_last_move[3] == 0) disable_e3(); - #endif - break; - #if EXTRUDERS > 3 - case 3: - enable_e3(); - g_uc_extruder_last_move[3] = (BLOCK_BUFFER_SIZE) * 2; - if (g_uc_extruder_last_move[0] == 0) disable_e0(); - if (g_uc_extruder_last_move[1] == 0) disable_e1(); - if (g_uc_extruder_last_move[2] == 0) disable_e2(); - break; - #endif // EXTRUDERS > 3 - #endif // EXTRUDERS > 2 - #endif // EXTRUDERS > 1 - } - #else - enable_e0(); - enable_e1(); - enable_e2(); - enable_e3(); - #endif - } - - if (block->steps[E_AXIS]) - NOLESS(fr_mm_s, min_feedrate_mm_s); - else - NOLESS(fr_mm_s, min_travel_feedrate_mm_s); - - /** - * This part of the code calculates the total length of the movement. - * For cartesian bots, the X_AXIS is the real X movement and same for Y_AXIS. - * But for corexy bots, that is not true. The "X_AXIS" and "Y_AXIS" motors (that should be named to A_AXIS - * and B_AXIS) cannot be used for X and Y length, because A=X+Y and B=X-Y. - * So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head. - * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed. - */ - #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) - float delta_mm[7]; - #if ENABLED(COREXY) - delta_mm[X_HEAD] = dx * steps_to_mm[A_AXIS]; - delta_mm[Y_HEAD] = dy * steps_to_mm[B_AXIS]; - delta_mm[Z_AXIS] = dz * steps_to_mm[Z_AXIS]; - delta_mm[A_AXIS] = (dx + dy) * steps_to_mm[A_AXIS]; - delta_mm[B_AXIS] = (dx - dy) * steps_to_mm[B_AXIS]; - #elif ENABLED(COREXZ) - delta_mm[X_HEAD] = dx * steps_to_mm[A_AXIS]; - delta_mm[Y_AXIS] = dy * steps_to_mm[Y_AXIS]; - delta_mm[Z_HEAD] = dz * steps_to_mm[C_AXIS]; - delta_mm[A_AXIS] = (dx + dz) * steps_to_mm[A_AXIS]; - delta_mm[C_AXIS] = (dx - dz) * steps_to_mm[C_AXIS]; - #elif ENABLED(COREYZ) - delta_mm[X_AXIS] = dx * steps_to_mm[X_AXIS]; - delta_mm[Y_HEAD] = dy * steps_to_mm[B_AXIS]; - delta_mm[Z_HEAD] = dz * steps_to_mm[C_AXIS]; - delta_mm[B_AXIS] = (dy + dz) * steps_to_mm[B_AXIS]; - delta_mm[C_AXIS] = (dy - dz) * steps_to_mm[C_AXIS]; - #endif - #else - float delta_mm[4]; - delta_mm[X_AXIS] = dx * steps_to_mm[X_AXIS]; - delta_mm[Y_AXIS] = dy * steps_to_mm[Y_AXIS]; - delta_mm[Z_AXIS] = dz * steps_to_mm[Z_AXIS]; - #endif - delta_mm[E_AXIS] = 0.01 * (de * steps_to_mm[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiplier[extruder]; - - if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) { - block->millimeters = fabs(delta_mm[E_AXIS]); - } - else { - block->millimeters = sqrt( - #if ENABLED(COREXY) - sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_AXIS]) - #elif ENABLED(COREXZ) - sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_HEAD]) - #elif ENABLED(COREYZ) - sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_HEAD]) - #else - sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_AXIS]) - #endif - ); - } - float inverse_millimeters = 1.0 / block->millimeters; // Inverse millimeters to remove multiple divides - - // Calculate moves/second for this move. No divide by zero due to previous checks. - float inverse_mm_s = fr_mm_s * inverse_millimeters; - - int moves_queued = movesplanned(); - - // Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill - #if ENABLED(OLD_SLOWDOWN) || ENABLED(SLOWDOWN) - bool mq = moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2; - #if ENABLED(OLD_SLOWDOWN) - if (mq) fr_mm_s *= 2.0 * moves_queued / (BLOCK_BUFFER_SIZE); - #endif - #if ENABLED(SLOWDOWN) - // segment time im micro seconds - unsigned long segment_time = lround(1000000.0/inverse_mm_s); - if (mq) { - if (segment_time < min_segment_time) { - // buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more. - inverse_mm_s = 1000000.0 / (segment_time + lround(2 * (min_segment_time - segment_time) / moves_queued)); - #ifdef XY_FREQUENCY_LIMIT - segment_time = lround(1000000.0 / inverse_mm_s); - #endif - } - } - #endif - #endif - - block->nominal_speed = block->millimeters * inverse_mm_s; // (mm/sec) Always > 0 - block->nominal_rate = ceil(block->step_event_count * inverse_mm_s); // (step/sec) Always > 0 - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - static float filwidth_e_count = 0, filwidth_delay_dist = 0; - - //FMM update ring buffer used for delay with filament measurements - if (extruder == FILAMENT_SENSOR_EXTRUDER_NUM && filwidth_delay_index2 >= 0) { //only for extruder with filament sensor and if ring buffer is initialized - - const int MMD_CM = MAX_MEASUREMENT_DELAY + 1, MMD_MM = MMD_CM * 10; - - // increment counters with next move in e axis - filwidth_e_count += delta_mm[E_AXIS]; - filwidth_delay_dist += delta_mm[E_AXIS]; - - // Only get new measurements on forward E movement - if (filwidth_e_count > 0.0001) { - - // Loop the delay distance counter (modulus by the mm length) - while (filwidth_delay_dist >= MMD_MM) filwidth_delay_dist -= MMD_MM; - - // Convert into an index into the measurement array - filwidth_delay_index1 = (int)(filwidth_delay_dist * 0.1 + 0.0001); - - // If the index has changed (must have gone forward)... - if (filwidth_delay_index1 != filwidth_delay_index2) { - filwidth_e_count = 0; // Reset the E movement counter - int8_t meas_sample = thermalManager.widthFil_to_size_ratio() - 100; // Subtract 100 to reduce magnitude - to store in a signed char - do { - filwidth_delay_index2 = (filwidth_delay_index2 + 1) % MMD_CM; // The next unused slot - measurement_delay[filwidth_delay_index2] = meas_sample; // Store the measurement - } while (filwidth_delay_index1 != filwidth_delay_index2); // More slots to fill? - } - } - } - #endif - - // Calculate and limit speed in mm/sec for each axis - float current_speed[NUM_AXIS]; - float speed_factor = 1.0; //factor <=1 do decrease speed - LOOP_XYZE(i) { - current_speed[i] = delta_mm[i] * inverse_mm_s; - float cs = fabs(current_speed[i]), mf = max_feedrate_mm_s[i]; - if (cs > mf) speed_factor = min(speed_factor, mf / cs); - } - - // Max segement time in us. - #ifdef XY_FREQUENCY_LIMIT - - // Check and limit the xy direction change frequency - unsigned char direction_change = block->direction_bits ^ old_direction_bits; - old_direction_bits = block->direction_bits; - segment_time = lround((float)segment_time / speed_factor); - - long xs0 = axis_segment_time[X_AXIS][0], - xs1 = axis_segment_time[X_AXIS][1], - xs2 = axis_segment_time[X_AXIS][2], - ys0 = axis_segment_time[Y_AXIS][0], - ys1 = axis_segment_time[Y_AXIS][1], - ys2 = axis_segment_time[Y_AXIS][2]; - - if (TEST(direction_change, X_AXIS)) { - xs2 = axis_segment_time[X_AXIS][2] = xs1; - xs1 = axis_segment_time[X_AXIS][1] = xs0; - xs0 = 0; - } - xs0 = axis_segment_time[X_AXIS][0] = xs0 + segment_time; - - if (TEST(direction_change, Y_AXIS)) { - ys2 = axis_segment_time[Y_AXIS][2] = axis_segment_time[Y_AXIS][1]; - ys1 = axis_segment_time[Y_AXIS][1] = axis_segment_time[Y_AXIS][0]; - ys0 = 0; - } - ys0 = axis_segment_time[Y_AXIS][0] = ys0 + segment_time; - - long max_x_segment_time = max(xs0, max(xs1, xs2)), - max_y_segment_time = max(ys0, max(ys1, ys2)), - min_xy_segment_time = min(max_x_segment_time, max_y_segment_time); - if (min_xy_segment_time < MAX_FREQ_TIME) { - float low_sf = speed_factor * min_xy_segment_time / (MAX_FREQ_TIME); - speed_factor = min(speed_factor, low_sf); - } - #endif // XY_FREQUENCY_LIMIT - - // Correct the speed - if (speed_factor < 1.0) { - LOOP_XYZE(i) current_speed[i] *= speed_factor; - block->nominal_speed *= speed_factor; - block->nominal_rate *= speed_factor; - } - - // Compute and limit the acceleration rate for the trapezoid generator. - float steps_per_mm = block->step_event_count / block->millimeters; - if (!block->steps[X_AXIS] && !block->steps[Y_AXIS] && !block->steps[Z_AXIS]) { - block->acceleration_steps_per_s2 = ceil(retract_acceleration * steps_per_mm); // convert to: acceleration steps/sec^2 - } - else { - // Limit acceleration per axis - block->acceleration_steps_per_s2 = ceil((block->steps[E_AXIS] ? acceleration : travel_acceleration) * steps_per_mm); - if (max_acceleration_steps_per_s2[X_AXIS] < (block->acceleration_steps_per_s2 * block->steps[X_AXIS]) / block->step_event_count) - block->acceleration_steps_per_s2 = (max_acceleration_steps_per_s2[X_AXIS] * block->step_event_count) / block->steps[X_AXIS]; - if (max_acceleration_steps_per_s2[Y_AXIS] < (block->acceleration_steps_per_s2 * block->steps[Y_AXIS]) / block->step_event_count) - block->acceleration_steps_per_s2 = (max_acceleration_steps_per_s2[Y_AXIS] * block->step_event_count) / block->steps[Y_AXIS]; - if (max_acceleration_steps_per_s2[Z_AXIS] < (block->acceleration_steps_per_s2 * block->steps[Z_AXIS]) / block->step_event_count) - block->acceleration_steps_per_s2 = (max_acceleration_steps_per_s2[Z_AXIS] * block->step_event_count) / block->steps[Z_AXIS]; - if (max_acceleration_steps_per_s2[E_AXIS] < (block->acceleration_steps_per_s2 * block->steps[E_AXIS]) / block->step_event_count) - block->acceleration_steps_per_s2 = (max_acceleration_steps_per_s2[E_AXIS] * block->step_event_count) / block->steps[E_AXIS]; - } - block->acceleration = block->acceleration_steps_per_s2 / steps_per_mm; - block->acceleration_rate = (long)(block->acceleration_steps_per_s2 * 16777216.0 / ((F_CPU) * 0.125)); - - #if 0 // Use old jerk for now - - float junction_deviation = 0.1; - - // Compute path unit vector - double unit_vec[3]; - - unit_vec[X_AXIS] = delta_mm[X_AXIS] * inverse_millimeters; - unit_vec[Y_AXIS] = delta_mm[Y_AXIS] * inverse_millimeters; - unit_vec[Z_AXIS] = delta_mm[Z_AXIS] * inverse_millimeters; - - // Compute maximum allowable entry speed at junction by centripetal acceleration approximation. - // Let a circle be tangent to both previous and current path line segments, where the junction - // deviation is defined as the distance from the junction to the closest edge of the circle, - // collinear with the circle center. The circular segment joining the two paths represents the - // path of centripetal acceleration. Solve for max velocity based on max acceleration about the - // radius of the circle, defined indirectly by junction deviation. This may be also viewed as - // path width or max_jerk in the previous grbl version. This approach does not actually deviate - // from path, but used as a robust way to compute cornering speeds, as it takes into account the - // nonlinearities of both the junction angle and junction velocity. - double vmax_junction = MINIMUM_PLANNER_SPEED; // Set default max junction speed - - // Skip first block or when previous_nominal_speed is used as a flag for homing and offset cycles. - if ((block_buffer_head != block_buffer_tail) && (previous_nominal_speed > 0.0)) { - // Compute cosine of angle between previous and current path. (prev_unit_vec is negative) - // NOTE: Max junction velocity is computed without sin() or acos() by trig half angle identity. - double cos_theta = - previous_unit_vec[X_AXIS] * unit_vec[X_AXIS] - - previous_unit_vec[Y_AXIS] * unit_vec[Y_AXIS] - - previous_unit_vec[Z_AXIS] * unit_vec[Z_AXIS] ; - // Skip and use default max junction speed for 0 degree acute junction. - if (cos_theta < 0.95) { - vmax_junction = min(previous_nominal_speed, block->nominal_speed); - // Skip and avoid divide by zero for straight junctions at 180 degrees. Limit to min() of nominal speeds. - if (cos_theta > -0.95) { - // Compute maximum junction velocity based on maximum acceleration and junction deviation - double sin_theta_d2 = sqrt(0.5 * (1.0 - cos_theta)); // Trig half angle identity. Always positive. - vmax_junction = min(vmax_junction, - sqrt(block->acceleration * junction_deviation * sin_theta_d2 / (1.0 - sin_theta_d2))); - } - } - } - #endif - - // Start with a safe speed - float vmax_junction = max_xy_jerk * 0.5, - vmax_junction_factor = 1.0, - mz2 = max_z_jerk * 0.5, - me2 = max_e_jerk * 0.5, - csz = current_speed[Z_AXIS], - cse = current_speed[E_AXIS]; - if (fabs(csz) > mz2) vmax_junction = min(vmax_junction, mz2); - if (fabs(cse) > me2) vmax_junction = min(vmax_junction, me2); - vmax_junction = min(vmax_junction, block->nominal_speed); - float safe_speed = vmax_junction; - - if ((moves_queued > 1) && (previous_nominal_speed > 0.0001)) { - float dsx = current_speed[X_AXIS] - previous_speed[X_AXIS], - dsy = current_speed[Y_AXIS] - previous_speed[Y_AXIS], - dsz = fabs(csz - previous_speed[Z_AXIS]), - dse = fabs(cse - previous_speed[E_AXIS]), - jerk = HYPOT(dsx, dsy); - - // if ((fabs(previous_speed[X_AXIS]) > 0.0001) || (fabs(previous_speed[Y_AXIS]) > 0.0001)) { - vmax_junction = block->nominal_speed; - // } - if (jerk > max_xy_jerk) vmax_junction_factor = max_xy_jerk / jerk; - if (dsz > max_z_jerk) vmax_junction_factor = min(vmax_junction_factor, max_z_jerk / dsz); - if (dse > max_e_jerk) vmax_junction_factor = min(vmax_junction_factor, max_e_jerk / dse); - - vmax_junction = min(previous_nominal_speed, vmax_junction * vmax_junction_factor); // Limit speed to max previous speed - } - block->max_entry_speed = vmax_junction; - - // Initialize block entry speed. Compute based on deceleration to user-defined MINIMUM_PLANNER_SPEED. - double v_allowable = max_allowable_speed(-block->acceleration, MINIMUM_PLANNER_SPEED, block->millimeters); - block->entry_speed = min(vmax_junction, v_allowable); - - // Initialize planner efficiency flags - // Set flag if block will always reach maximum junction speed regardless of entry/exit speeds. - // If a block can de/ac-celerate from nominal speed to zero within the length of the block, then - // the current block and next block junction speeds are guaranteed to always be at their maximum - // junction speeds in deceleration and acceleration, respectively. This is due to how the current - // block nominal speed limits both the current and next maximum junction speeds. Hence, in both - // the reverse and forward planners, the corresponding block junction speed will always be at the - // the maximum junction speed and may always be ignored for any speed reduction checks. - block->nominal_length_flag = (block->nominal_speed <= v_allowable); - block->recalculate_flag = true; // Always calculate trapezoid for new block - - // Update previous path unit_vector and nominal speed - LOOP_XYZE(i) previous_speed[i] = current_speed[i]; - previous_nominal_speed = block->nominal_speed; - - #if ENABLED(LIN_ADVANCE) - - // block->steps[E_AXIS] == block->step_event_count: A problem occurs when there's a very tiny move before a retract. - // In this case, the retract and the move will be executed together. - // This leads to an enormous number of advance steps due to a huge e_acceleration. - // The math is correct, but you don't want a retract move done with advance! - // So this situation is filtered out here. - if (!block->steps[E_AXIS] || (!block->steps[X_AXIS] && !block->steps[Y_AXIS] && !block->steps[Z_AXIS]) || stepper.get_advance_k() == 0 || (uint32_t) block->steps[E_AXIS] == block->step_event_count) { - block->use_advance_lead = false; - } - else { - block->use_advance_lead = true; - block->e_speed_multiplier8 = (block->steps[E_AXIS] << 8) / block->step_event_count; - } - - #elif ENABLED(ADVANCE) - - // Calculate advance rate - if (!block->steps[E_AXIS] || (!block->steps[X_AXIS] && !block->steps[Y_AXIS] && !block->steps[Z_AXIS])) { - block->advance_rate = 0; - block->advance = 0; - } - else { - long acc_dist = estimate_acceleration_distance(0, block->nominal_rate, block->acceleration_steps_per_s2); - float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(cse, EXTRUSION_AREA) * 256; - block->advance = advance; - block->advance_rate = acc_dist ? advance / (float)acc_dist : 0; - } - /** - SERIAL_ECHO_START; - SERIAL_ECHOPGM("advance :"); - SERIAL_ECHO(block->advance/256.0); - SERIAL_ECHOPGM("advance rate :"); - SERIAL_ECHOLN(block->advance_rate/256.0); - */ - - #endif // ADVANCE or LIN_ADVANCE - - calculate_trapezoid_for_block(block, block->entry_speed / block->nominal_speed, safe_speed / block->nominal_speed); - - // Move buffer head - block_buffer_head = next_buffer_head; - - // Update position - LOOP_XYZE(i) position[i] = target[i]; - - recalculate(); - - stepper.wake_up(); - -} // buffer_line() - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(DELTA) - - /** - * Get the XYZ position of the steppers as a vector_3. - * - * On CORE machines XYZ is derived from ABC. - */ - vector_3 Planner::adjusted_position() { - vector_3 pos = vector_3(stepper.get_axis_position_mm(X_AXIS), stepper.get_axis_position_mm(Y_AXIS), stepper.get_axis_position_mm(Z_AXIS)); - - //pos.debug("in Planner::adjusted_position"); - //bed_level_matrix.debug("in Planner::adjusted_position"); - - matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); - //inverse.debug("in Planner::inverse"); - - pos.apply_rotation(inverse); - //pos.debug("after rotation"); - - return pos; - } - -#endif // AUTO_BED_LEVELING_FEATURE && !DELTA - -#ifdef UARM_SWIFT -void Planner::set_position_mm(float angle_x, float angle_y, float angle_z) -{ - position[X_AXIS] = lround(angle_x * axis_steps_per_mm[X_AXIS]); - position[Y_AXIS] = lround(angle_y * axis_steps_per_mm[Y_AXIS]); - position[Z_AXIS] = lround(angle_z * axis_steps_per_mm[Z_AXIS]); -} - -#endif // UARM_SWIFT - - -/** - * Directly set the planner XYZ position (hence the stepper positions). - * - * On CORE machines stepper ABC will be translated from the given XYZ. - */ -#if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING) - void Planner::set_position_mm(float x, float y, float z, const float& e) -#else - void Planner::set_position_mm(const float& x, const float& y, const float& z, const float& e) -#endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING - { - #if ENABLED(MESH_BED_LEVELING) - - if (mbl.active()) - z += mbl.get_z(RAW_X_POSITION(x), RAW_Y_POSITION(y)); - - #elif ENABLED(AUTO_BED_LEVELING_FEATURE) - - apply_rotation_xyz(bed_level_matrix, x, y, z); - - #endif - - long nx = position[X_AXIS] = lround(x * axis_steps_per_mm[X_AXIS]), - ny = position[Y_AXIS] = lround(y * axis_steps_per_mm[Y_AXIS]), - nz = position[Z_AXIS] = lround(z * axis_steps_per_mm[Z_AXIS]), - ne = position[E_AXIS] = lround(e * axis_steps_per_mm[E_AXIS]); - stepper.set_position(nx, ny, nz, ne); - previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest. - - LOOP_XYZE(i) previous_speed[i] = 0.0; - } - -/** - * Directly set the planner E position (hence the stepper E position). - */ -void Planner::set_e_position_mm(const float& e) { - position[E_AXIS] = lround(e * axis_steps_per_mm[E_AXIS]); - stepper.set_e_position(position[E_AXIS]); - previous_speed[E_AXIS] = 0.0; -} - -// Recalculate the steps/s^2 acceleration rates, based on the mm/s^2 -void Planner::reset_acceleration_rates() { - LOOP_XYZE(i) - max_acceleration_steps_per_s2[i] = max_acceleration_mm_per_s2[i] * axis_steps_per_mm[i]; -} - -// Recalculate position, steps_to_mm if axis_steps_per_mm changes! -void Planner::refresh_positioning() { - LOOP_XYZE(i) steps_to_mm[i] = 1.0 / axis_steps_per_mm[i]; - #if ENABLED(DELTA) || ENABLED(SCARA) - inverse_kinematics(current_position); - set_position_mm(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]); - #else - set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); - #endif - reset_acceleration_rates(); -} - -#if ENABLED(AUTOTEMP) - - void Planner::autotemp_M109() { - autotemp_enabled = code_seen('F'); - if (autotemp_enabled) autotemp_factor = code_value_temp_diff(); - if (code_seen('S')) autotemp_min = code_value_temp_abs(); - if (code_seen('B')) autotemp_max = code_value_temp_abs(); - } - -#endif diff --git a/Marlin/planner.h b/Marlin/planner.h deleted file mode 100644 index 785b1a7..0000000 --- a/Marlin/planner.h +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * planner.h - * - * Buffer movement commands and manage the acceleration profile plan - * - * Derived from Grbl - * Copyright (c) 2009-2011 Simen Svale Skogsrud - */ - -#ifndef PLANNER_H -#define PLANNER_H - -#include "types.h" -#include "MarlinConfig.h" - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) - #include "vector_3.h" -#endif - -class Planner; -extern Planner planner; - -/** - * struct block_t - * - * A single entry in the planner buffer. - * Tracks linear movement over multiple axes. - * - * The "nominal" values are as-specified by gcode, and - * may never actually be reached due to acceleration limits. - */ -typedef struct { - - unsigned char active_extruder; // The extruder to move (if E move) - - // Fields used by the bresenham algorithm for tracing the line - long steps[NUM_AXIS]; // Step count along each axis - unsigned long step_event_count; // The number of step events required to complete this block - - #if ENABLED(MIXING_EXTRUDER) - unsigned long mix_event_count[MIXING_STEPPERS]; // Scaled step_event_count for the mixing steppers - #endif - - long accelerate_until, // The index of the step event on which to stop acceleration - decelerate_after, // The index of the step event on which to start decelerating - acceleration_rate; // The acceleration rate used for acceleration calculation - - unsigned char direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) - - // Advance extrusion - #if ENABLED(LIN_ADVANCE) - bool use_advance_lead; - int e_speed_multiplier8; // Factorised by 2^8 to avoid float - #elif ENABLED(ADVANCE) - long advance_rate; - volatile long initial_advance; - volatile long final_advance; - float advance; - #endif - - // Fields used by the motion planner to manage acceleration - float nominal_speed, // The nominal speed for this block in mm/sec - entry_speed, // Entry speed at previous-current junction in mm/sec - max_entry_speed, // Maximum allowable junction entry speed in mm/sec - millimeters, // The total travel of this block in mm - acceleration; // acceleration mm/sec^2 - unsigned char recalculate_flag, // Planner flag to recalculate trapezoids on entry junction - nominal_length_flag; // Planner flag for nominal speed always reached - - // Settings for the trapezoid generator - unsigned long nominal_rate, // The nominal step rate for this block in step_events/sec - initial_rate, // The jerk-adjusted step rate at start of block - final_rate, // The minimal rate at exit - acceleration_steps_per_s2; // acceleration steps/sec^2 - - #if FAN_COUNT > 0 - unsigned long fan_speed[FAN_COUNT]; - #endif - - #if ENABLED(BARICUDA) - unsigned long valve_pressure, e_to_p_pressure; - #endif - - volatile char busy; - -} block_t; - -#define BLOCK_MOD(n) ((n)&(BLOCK_BUFFER_SIZE-1)) - -class Planner { - - public: - - /** - * A ring buffer of moves described in steps - */ - static block_t block_buffer[BLOCK_BUFFER_SIZE]; - static volatile uint8_t block_buffer_head; // Index of the next block to be pushed - static volatile uint8_t block_buffer_tail; - - static float max_feedrate_mm_s[NUM_AXIS]; // Max speeds in mm per second - static float axis_steps_per_mm[NUM_AXIS]; - static float steps_to_mm[NUM_AXIS]; - static unsigned long max_acceleration_steps_per_s2[NUM_AXIS]; - static unsigned long max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software - - static millis_t min_segment_time; - static float min_feedrate_mm_s; - static float acceleration; // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX - static float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX - static float travel_acceleration; // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX - static float max_xy_jerk; // The largest speed change requiring no acceleration - static float max_z_jerk; - static float max_e_jerk; - static float min_travel_feedrate_mm_s; - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - static matrix_3x3 bed_level_matrix; // Transform to compensate for bed level - #endif - - - - private: - - /** - * The current position of the tool in absolute steps - * Recalculated if any axis_steps_per_mm are changed by gcode - */ - static long position[NUM_AXIS]; - - /** - * Speed of previous path line segment - */ - static float previous_speed[NUM_AXIS]; - - /** - * Nominal speed of previous path line segment - */ - static float previous_nominal_speed; - - #if ENABLED(DISABLE_INACTIVE_EXTRUDER) - /** - * Counters to manage disabling inactive extruders - */ - static uint8_t g_uc_extruder_last_move[EXTRUDERS]; - #endif // DISABLE_INACTIVE_EXTRUDER - - #ifdef XY_FREQUENCY_LIMIT - // Used for the frequency limit - #define MAX_FREQ_TIME long(1000000.0/XY_FREQUENCY_LIMIT) - // Old direction bits. Used for speed calculations - static unsigned char old_direction_bits; - // Segment times (in µs). Used for speed calculations - static long axis_segment_time[2][3]; - #endif - - public: - - /** - * Instance Methods - */ - - Planner(); - - void init(); - - /** - * Static (class) Methods - */ - - static void reset_acceleration_rates(); - static void refresh_positioning(); - - // Manage fans, paste pressure, etc. - static void check_axes_activity(); - - /** - * Number of moves currently in the planner - */ - static uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block_buffer_tail + BLOCK_BUFFER_SIZE); } - - static bool is_full() { return (block_buffer_tail == BLOCK_MOD(block_buffer_head + 1)); } - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING) - - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - /** - * The corrected position, applying the bed level matrix - */ - static vector_3 adjusted_position(); - #endif - - /** - * Add a new linear movement to the buffer. - * - * x,y,z,e - target position in mm - * fr_mm_s - (target) speed of the move (mm/s) - * extruder - target extruder - */ - static void buffer_line(float x, float y, float z, const float& e, float fr_mm_s, const uint8_t extruder); - - /** - * Set the planner.position and individual stepper positions. - * Used by G92, G28, G29, and other procedures. - * - * Multiplies by axis_steps_per_mm[] and does necessary conversion - * for COREXY / COREXZ / COREYZ to set the corresponding stepper positions. - * - * Clears previous speed values. - */ - static void set_position_mm(float x, float y, float z, const float& e); - - #else - - static void buffer_line(const float& x, const float& y, const float& z, const float& e, float fr_mm_s, const uint8_t extruder); - static void set_position_mm(const float& x, const float& y, const float& z, const float& e); - - #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING - -#ifdef UARM_SWIFT - static void set_position_mm(float angle_x, float angle_y, float angle_z); -#endif - - - /** - * Set the E position (mm) of the planner (and the E stepper) - */ - static void set_e_position_mm(const float& e); - - /** - * Does the buffer have any blocks queued? - */ - static bool blocks_queued() { return (block_buffer_head != block_buffer_tail); } - - /** - * "Discards" the block and "releases" the memory. - * Called when the current block is no longer needed. - */ - static void discard_current_block() { - if (blocks_queued()) - block_buffer_tail = BLOCK_MOD(block_buffer_tail + 1); - } - - /** - * The current block. NULL if the buffer is empty. - * This also marks the block as busy. - */ - static block_t* get_current_block() { - if (blocks_queued()) { - block_t* block = &block_buffer[block_buffer_tail]; - block->busy = true; - return block; - } - else - return NULL; - } - - #if ENABLED(AUTOTEMP) - static float autotemp_max; - static float autotemp_min; - static float autotemp_factor; - static bool autotemp_enabled; - static void getHighESpeed(); - static void autotemp_M109(); - #endif - - private: - - /** - * Get the index of the next / previous block in the ring buffer - */ - static int8_t next_block_index(int8_t block_index) { return BLOCK_MOD(block_index + 1); } - static int8_t prev_block_index(int8_t block_index) { return BLOCK_MOD(block_index - 1); } - - /** - * Calculate the distance (not time) it takes to accelerate - * from initial_rate to target_rate using the given acceleration: - */ - static float estimate_acceleration_distance(float initial_rate, float target_rate, float accel) { - if (accel == 0) return 0; // accel was 0, set acceleration distance to 0 - return (sq(target_rate) - sq(initial_rate)) / (accel * 2); - } - - /** - * Return the point at which you must start braking (at the rate of -'acceleration') if - * you start at 'initial_rate', accelerate (until reaching the point), and want to end at - * 'final_rate' after traveling 'distance'. - * - * This is used to compute the intersection point between acceleration and deceleration - * in cases where the "trapezoid" has no plateau (i.e., never reaches maximum speed) - */ - static float intersection_distance(float initial_rate, float final_rate, float accel, float distance) { - if (accel == 0) return 0; // accel was 0, set intersection distance to 0 - return (accel * 2 * distance - sq(initial_rate) + sq(final_rate)) / (accel * 4); - } - - /** - * Calculate the maximum allowable speed at this point, in order - * to reach 'target_velocity' using 'acceleration' within a given - * 'distance'. - */ - static float max_allowable_speed(float accel, float target_velocity, float distance) { - return sqrt(sq(target_velocity) - 2 * accel * distance); - } - - static void calculate_trapezoid_for_block(block_t* block, float entry_factor, float exit_factor); - - static void reverse_pass_kernel(block_t* previous, block_t* current, block_t* next); - static void forward_pass_kernel(block_t* previous, block_t* current, block_t* next); - - static void reverse_pass(); - static void forward_pass(); - - static void recalculate_trapezoids(); - - static void recalculate(); - -}; - -#endif // PLANNER_H diff --git a/Marlin/planner_bezier.cpp b/Marlin/planner_bezier.cpp deleted file mode 100644 index 6ca7afd..0000000 --- a/Marlin/planner_bezier.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * planner_bezier.cpp - * - * Compute and buffer movement commands for bezier curves - * - */ - -#include "Marlin.h" - -#if ENABLED(BEZIER_CURVE_SUPPORT) - -#include "planner.h" -#include "language.h" -#include "temperature.h" - -// See the meaning in the documentation of cubic_b_spline(). -#define MIN_STEP 0.002 -#define MAX_STEP 0.1 -#define SIGMA 0.1 - -/* Compute the linear interpolation between to real numbers. -*/ -inline static float interp(float a, float b, float t) { return (1.0 - t) * a + t * b; } - -/** - * Compute a Bézier curve using the De Casteljau's algorithm (see - * https://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm), which is - * easy to code and has good numerical stability (very important, - * since Arudino works with limited precision real numbers). - */ -inline static float eval_bezier(float a, float b, float c, float d, float t) { - float iab = interp(a, b, t); - float ibc = interp(b, c, t); - float icd = interp(c, d, t); - float iabc = interp(iab, ibc, t); - float ibcd = interp(ibc, icd, t); - float iabcd = interp(iabc, ibcd, t); - return iabcd; -} - -/** - * We approximate Euclidean distance with the sum of the coordinates - * offset (so-called "norm 1"), which is quicker to compute. - */ -inline static float dist1(float x1, float y1, float x2, float y2) { return fabs(x1 - x2) + fabs(y1 - y2); } - -/** - * The algorithm for computing the step is loosely based on the one in Kig - * (See https://sources.debian.net/src/kig/4:15.08.3-1/misc/kigpainter.cpp/#L759) - * However, we do not use the stack. - * - * The algorithm goes as it follows: the parameters t runs from 0.0 to - * 1.0 describing the curve, which is evaluated by eval_bezier(). At - * each iteration we have to choose a step, i.e., the increment of the - * t variable. By default the step of the previous iteration is taken, - * and then it is enlarged or reduced depending on how straight the - * curve locally is. The step is always clamped between MIN_STEP/2 and - * 2*MAX_STEP. MAX_STEP is taken at the first iteration. - * - * For some t, the step value is considered acceptable if the curve in - * the interval [t, t+step] is sufficiently straight, i.e., - * sufficiently close to linear interpolation. In practice the - * following test is performed: the distance between eval_bezier(..., - * t+step/2) is evaluated and compared with 0.5*(eval_bezier(..., - * t)+eval_bezier(..., t+step)). If it is smaller than SIGMA, then the - * step value is considered acceptable, otherwise it is not. The code - * seeks to find the larger step value which is considered acceptable. - * - * At every iteration the recorded step value is considered and then - * iteratively halved until it becomes acceptable. If it was already - * acceptable in the beginning (i.e., no halving were done), then - * maybe it was necessary to enlarge it; then it is iteratively - * doubled while it remains acceptable. The last acceptable value - * found is taken, provided that it is between MIN_STEP and MAX_STEP - * and does not bring t over 1.0. - * - * Caveat: this algorithm is not perfect, since it can happen that a - * step is considered acceptable even when the curve is not linear at - * all in the interval [t, t+step] (but its mid point coincides "by - * chance" with the midpoint according to the parametrization). This - * kind of glitches can be eliminated with proper first derivative - * estimates; however, given the improbability of such configurations, - * the mitigation offered by MIN_STEP and the small computational - * power available on Arduino, I think it is not wise to implement it. - */ -void cubic_b_spline(const float position[NUM_AXIS], const float target[NUM_AXIS], const float offset[4], float fr_mm_s, uint8_t extruder) { - // Absolute first and second control points are recovered. - float first0 = position[X_AXIS] + offset[0]; - float first1 = position[Y_AXIS] + offset[1]; - float second0 = target[X_AXIS] + offset[2]; - float second1 = target[Y_AXIS] + offset[3]; - float t = 0.0; - - float bez_target[4]; - bez_target[X_AXIS] = position[X_AXIS]; - bez_target[Y_AXIS] = position[Y_AXIS]; - float step = MAX_STEP; - - millis_t next_idle_ms = millis() + 200UL; - - while (t < 1.0) { - - thermalManager.manage_heater(); - millis_t now = millis(); - if (ELAPSED(now, next_idle_ms)) { - next_idle_ms = now + 200UL; - idle(); - } - - // First try to reduce the step in order to make it sufficiently - // close to a linear interpolation. - bool did_reduce = false; - float new_t = t + step; - NOMORE(new_t, 1.0); - float new_pos0 = eval_bezier(position[X_AXIS], first0, second0, target[X_AXIS], new_t); - float new_pos1 = eval_bezier(position[Y_AXIS], first1, second1, target[Y_AXIS], new_t); - for (;;) { - if (new_t - t < (MIN_STEP)) break; - float candidate_t = 0.5 * (t + new_t); - float candidate_pos0 = eval_bezier(position[X_AXIS], first0, second0, target[X_AXIS], candidate_t); - float candidate_pos1 = eval_bezier(position[Y_AXIS], first1, second1, target[Y_AXIS], candidate_t); - float interp_pos0 = 0.5 * (bez_target[X_AXIS] + new_pos0); - float interp_pos1 = 0.5 * (bez_target[Y_AXIS] + new_pos1); - if (dist1(candidate_pos0, candidate_pos1, interp_pos0, interp_pos1) <= (SIGMA)) break; - new_t = candidate_t; - new_pos0 = candidate_pos0; - new_pos1 = candidate_pos1; - did_reduce = true; - } - - // If we did not reduce the step, maybe we should enlarge it. - if (!did_reduce) for (;;) { - if (new_t - t > MAX_STEP) break; - float candidate_t = t + 2.0 * (new_t - t); - if (candidate_t >= 1.0) break; - float candidate_pos0 = eval_bezier(position[X_AXIS], first0, second0, target[X_AXIS], candidate_t); - float candidate_pos1 = eval_bezier(position[Y_AXIS], first1, second1, target[Y_AXIS], candidate_t); - float interp_pos0 = 0.5 * (bez_target[X_AXIS] + candidate_pos0); - float interp_pos1 = 0.5 * (bez_target[Y_AXIS] + candidate_pos1); - if (dist1(new_pos0, new_pos1, interp_pos0, interp_pos1) > (SIGMA)) break; - new_t = candidate_t; - new_pos0 = candidate_pos0; - new_pos1 = candidate_pos1; - } - - // Check some postcondition; they are disabled in the actual - // Marlin build, but if you test the same code on a computer you - // may want to check they are respect. - /* - assert(new_t <= 1.0); - if (new_t < 1.0) { - assert(new_t - t >= (MIN_STEP) / 2.0); - assert(new_t - t <= (MAX_STEP) * 2.0); - } - */ - - step = new_t - t; - t = new_t; - - // Compute and send new position - bez_target[X_AXIS] = new_pos0; - bez_target[Y_AXIS] = new_pos1; - // FIXME. The following two are wrong, since the parameter t is - // not linear in the distance. - bez_target[Z_AXIS] = interp(position[Z_AXIS], target[Z_AXIS], t); - bez_target[E_AXIS] = interp(position[E_AXIS], target[E_AXIS], t); - clamp_to_software_endstops(bez_target); - - #if ENABLED(DELTA) || ENABLED(SCARA) - inverse_kinematics(bez_target); - #if ENABLED(DELTA) && ENABLED(AUTO_BED_LEVELING_FEATURE) - adjust_delta(bez_target); - #endif - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], bez_target[E_AXIS], fr_mm_s, extruder); - #else - planner.buffer_line(bez_target[X_AXIS], bez_target[Y_AXIS], bez_target[Z_AXIS], bez_target[E_AXIS], fr_mm_s, extruder); - #endif - } -} - -#endif // BEZIER_CURVE_SUPPORT diff --git a/Marlin/planner_bezier.h b/Marlin/planner_bezier.h deleted file mode 100644 index d17e7c8..0000000 --- a/Marlin/planner_bezier.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * planner_bezier.h - * - * Compute and buffer movement commands for bezier curves - * - */ - -#ifndef PLANNER_BEZIER_H -#define PLANNER_BEZIER_H - -#include "Marlin.h" - -void cubic_b_spline( - const float position[NUM_AXIS], // current position - const float target[NUM_AXIS], // target position - const float offset[4], // a pair of offsets - float fr_mm_s, - uint8_t extruder - ); - -#endif // PLANNER_BEZIER_H diff --git a/Marlin/point_t.h b/Marlin/point_t.h deleted file mode 100644 index 360abce..0000000 --- a/Marlin/point_t.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __POINT_T__ -#define __POINT_T__ - -/** - * @brief Cartesian Point - * @details Represents a three dimensional point on Cartesian coordinate system, - * using an additional fourth dimension for the extrusion length. - * - * @param x The x-coordinate of the point. - * @param y The y-coordinate of the point. - * @param z The z-coordinate of the point. - * @param e The e-coordinate of the point. - */ -struct point_t { - float x; - float y; - float z; - float e; - - /** - * @brief Two dimensional point constructor - * - * @param x The x-coordinate of the point. - * @param y The y-coordinate of the point. - */ - point_t(float const x, float const y) - : point_t(x, y, NAN, NAN) {} - - /** - * @brief Three dimensional point constructor - * - * @param x The x-coordinate of the point. - * @param y The y-coordinate of the point. - * @param z The z-coordinate of the point. - */ - point_t(float const x, float const y, float const z) - : point_t(x, y, z, NAN) {} - - /** - * @brief Tree dimensional point constructor with extrusion length - * - * @param x The x-coordinate of the point. - * @param y The y-coordinate of the point. - * @param z The z-coordinate of the point. - * @param e The e-coordinate of the point. - */ - point_t(float const x, float const y, float const z, float const e) { - this->x = x; - this->y = y; - this->z = z; - this->e = e; - } -}; - -#endif // __POINT_T__ diff --git a/Marlin/printcounter.cpp b/Marlin/printcounter.cpp deleted file mode 100644 index b6cef6e..0000000 --- a/Marlin/printcounter.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" -#include "printcounter.h" -#include "duration_t.h" - -PrintCounter::PrintCounter(): super() { - this->loadStats(); -} - -millis_t PrintCounter::deltaDuration() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("deltaDuration")); - #endif - - millis_t tmp = this->lastDuration; - this->lastDuration = this->duration(); - return this->lastDuration - tmp; -} - -bool PrintCounter::isLoaded() { - return this->loaded; -} - -void PrintCounter::incFilamentUsed(double const &amount) { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("incFilamentUsed")); - #endif - - // Refuses to update data if object is not loaded - if (!this->isLoaded()) return; - - this->data.filamentUsed += amount; // mm -} - - -void PrintCounter::initStats() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("initStats")); - #endif - - this->loaded = true; - this->data = { 0, 0, 0, 0, 0.0 }; - - this->saveStats(); - eeprom_write_byte((uint8_t *) this->address, 0x16); -} - -void PrintCounter::loadStats() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("loadStats")); - #endif - - // Checks if the EEPROM block is initialized - if (eeprom_read_byte((uint8_t *) this->address) != 0x16) this->initStats(); - else eeprom_read_block(&this->data, - (void *)(this->address + sizeof(uint8_t)), sizeof(printStatistics)); - - this->loaded = true; -} - -void PrintCounter::saveStats() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("saveStats")); - #endif - - // Refuses to save data if object is not loaded - if (!this->isLoaded()) return; - - // Saves the struct to EEPROM - eeprom_update_block(&this->data, - (void *)(this->address + sizeof(uint8_t)), sizeof(printStatistics)); -} - -void PrintCounter::showStats() { - char buffer[21]; - duration_t elapsed; - - SERIAL_PROTOCOLPGM(MSG_STATS); - - SERIAL_ECHOPGM("Prints: "); - SERIAL_ECHO(this->data.totalPrints); - - SERIAL_ECHOPGM(", Finished: "); - SERIAL_ECHO(this->data.finishedPrints); - - SERIAL_ECHOPGM(", Failed: "); // Note: Removes 1 from failures with an active counter - SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints - - ((this->isRunning() || this->isPaused()) ? 1 : 0)); - - SERIAL_EOL; - SERIAL_PROTOCOLPGM(MSG_STATS); - - elapsed = this->data.printTime; - elapsed.toString(buffer); - - SERIAL_ECHOPGM("Total time: "); - SERIAL_ECHO(buffer); - - #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPGM(" ("); - SERIAL_ECHO(this->data.printTime); - SERIAL_ECHOPGM(")"); - #endif - - elapsed = this->data.longestPrint; - elapsed.toString(buffer); - - SERIAL_ECHOPGM(", Longest job: "); - SERIAL_ECHO(buffer); - - #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPGM(" ("); - SERIAL_ECHO(this->data.longestPrint); - SERIAL_ECHOPGM(")"); - #endif - - SERIAL_EOL; - SERIAL_PROTOCOLPGM(MSG_STATS); - - SERIAL_ECHOPGM("Filament used: "); - SERIAL_ECHO(this->data.filamentUsed / 1000); - SERIAL_ECHOPGM("m"); - - SERIAL_EOL; -} - -void PrintCounter::tick() { - if (!this->isRunning()) return; - - static uint32_t update_last = millis(), - eeprom_last = millis(); - - millis_t now = millis(); - - // Trying to get the amount of calculations down to the bare min - const static uint16_t i = this->updateInterval * 1000; - - if (now - update_last >= i) { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("tick")); - #endif - - this->data.printTime += this->deltaDuration(); - update_last = now; - } - - // Trying to get the amount of calculations down to the bare min - const static millis_t j = this->saveInterval * 1000; - if (now - eeprom_last >= j) { - eeprom_last = now; - this->saveStats(); - } -} - -// @Override -bool PrintCounter::start() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("start")); - #endif - - bool paused = this->isPaused(); - - if (super::start()) { - if (!paused) { - this->data.totalPrints++; - this->lastDuration = 0; - } - return true; - } - else return false; -} - -// @Override -bool PrintCounter::stop() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("stop")); - #endif - - if (super::stop()) { - this->data.finishedPrints++; - this->data.printTime += this->deltaDuration(); - - if (this->duration() > this->data.longestPrint) - this->data.longestPrint = this->duration(); - - this->saveStats(); - return true; - } - else return false; -} - -// @Override -void PrintCounter::reset() { - #if ENABLED(DEBUG_PRINTCOUNTER) - PrintCounter::debug(PSTR("stop")); - #endif - - super::reset(); - this->lastDuration = 0; -} - -#if ENABLED(DEBUG_PRINTCOUNTER) - - void PrintCounter::debug(const char func[]) { - if (DEBUGGING(INFO)) { - SERIAL_ECHOPGM("PrintCounter::"); - serialprintPGM(func); - SERIAL_ECHOLNPGM("()"); - } - } - -#endif diff --git a/Marlin/printcounter.h b/Marlin/printcounter.h deleted file mode 100644 index 0e9d06f..0000000 --- a/Marlin/printcounter.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef PRINTCOUNTER_H -#define PRINTCOUNTER_H - -#include "macros.h" -#include "language.h" -#include "stopwatch.h" -#include - - -// Print debug messages with M111 S2 -//#define DEBUG_PRINTCOUNTER - -struct printStatistics { // 13 bytes - //const uint8_t magic; // Magic header, it will always be 0x16 - uint16_t totalPrints; // Number of prints - uint16_t finishedPrints; // Number of complete prints - uint32_t printTime; // Accumulated printing time - uint32_t longestPrint; // Longest successfull print job - double filamentUsed; // Accumulated filament consumed in mm -}; - -class PrintCounter: public Stopwatch { - private: - typedef Stopwatch super; - - printStatistics data; - - /** - * @brief EEPROM address - * @details Defines the start offset address where the data is stored. - */ - const uint16_t address = 0x32; - - /** - * @brief Interval in seconds between counter updates - * @details This const value defines what will be the time between each - * accumulator update. This is different from the EEPROM save interval. - * - * @note The max value for this option is 60(s), otherwise integer - * overflow will happen. - */ - const uint16_t updateInterval = 10; - - /** - * @brief Interval in seconds between EEPROM saves - * @details This const value defines what will be the time between each - * EEPROM save cycle, the development team recommends to set this value - * no lower than 3600 secs (1 hour). - */ - const uint16_t saveInterval = 3600; - - /** - * @brief Timestamp of the last call to deltaDuration() - * @details Stores the timestamp of the last deltaDuration(), this is - * required due to the updateInterval cycle. - */ - millis_t lastDuration; - - /** - * @brief Stats were loaded from EERPROM - * @details If set to true it indicates if the statistical data was already - * loaded from the EEPROM. - */ - bool loaded = false; - - protected: - /** - * @brief dT since the last call - * @details Returns the elapsed time in seconds since the last call, this is - * used internally for print statistics accounting is not intended to be a - * user callable function. - */ - millis_t deltaDuration(); - - public: - /** - * @brief Class constructor - */ - PrintCounter(); - - /** - * @brief Checks if Print Statistics has been loaded - * @details Returns true if the statistical data has been loaded. - * @return bool - */ - bool isLoaded(); - - /** - * @brief Increments the total filament used - * @details The total filament used counter will be incremented by "amount". - * - * @param amount The amount of filament used in mm - */ - void incFilamentUsed(double const &amount); - - /** - * @brief Resets the Print Statistics - * @details Resets the statistics to zero and saves them to EEPROM creating - * also the magic header. - */ - void initStats(); - - /** - * @brief Loads the Print Statistics - * @details Loads the statistics from EEPROM - */ - void loadStats(); - - /** - * @brief Saves the Print Statistics - * @details Saves the statistics to EEPROM - */ - void saveStats(); - - /** - * @brief Serial output the Print Statistics - * @details This function may change in the future, for now it directly - * prints the statistical data to serial. - */ - void showStats(); - - /** - * @brief Return the currently loaded statistics - * @details Return the raw data, in the same structure used internally - */ - printStatistics getStats() { return this->data; } - - /** - * @brief Loop function - * @details This function should be called at loop, it will take care of - * periodically save the statistical data to EEPROM and do time keeping. - */ - void tick(); - - /** - * The following functions are being overridden - */ - bool start(); - bool stop(); - void reset(); - - #if ENABLED(DEBUG_PRINTCOUNTER) - - /** - * @brief Prints a debug message - * @details Prints a simple debug message "PrintCounter::function" - */ - static void debug(const char func[]); - - #endif -}; - -#endif // PRINTCOUNTER_H diff --git a/Marlin/qr_solve.cpp b/Marlin/qr_solve.cpp deleted file mode 100644 index ddafb00..0000000 --- a/Marlin/qr_solve.cpp +++ /dev/null @@ -1,1591 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "qr_solve.h" - -#if ENABLED(AUTO_BED_LEVELING_GRID) - -#include -#include - -//# include "r8lib.h" - -int i4_min(int i1, int i2) - -/******************************************************************************/ -/** - Purpose: - - I4_MIN returns the smaller of two I4's. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 29 August 2006 - - Author: - - John Burkardt - - Parameters: - - Input, int I1, I2, two integers to be compared. - - Output, int I4_MIN, the smaller of I1 and I2. -*/ -{ - return (i1 < i2) ? i1 : i2; -} - -double r8_epsilon(void) - -/******************************************************************************/ -/** - Purpose: - - R8_EPSILON returns the R8 round off unit. - - Discussion: - - R8_EPSILON is a number R which is a power of 2 with the property that, - to the precision of the computer's arithmetic, - 1 < 1 + R - but - 1 = ( 1 + R / 2 ) - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 01 September 2012 - - Author: - - John Burkardt - - Parameters: - - Output, double R8_EPSILON, the R8 round-off unit. -*/ -{ - const double value = 2.220446049250313E-016; - return value; -} - -double r8_max(double x, double y) - -/******************************************************************************/ -/** - Purpose: - - R8_MAX returns the maximum of two R8's. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 07 May 2006 - - Author: - - John Burkardt - - Parameters: - - Input, double X, Y, the quantities to compare. - - Output, double R8_MAX, the maximum of X and Y. -*/ -{ - return (y < x) ? x : y; -} - -double r8_abs(double x) - -/******************************************************************************/ -/** - Purpose: - - R8_ABS returns the absolute value of an R8. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 07 May 2006 - - Author: - - John Burkardt - - Parameters: - - Input, double X, the quantity whose absolute value is desired. - - Output, double R8_ABS, the absolute value of X. -*/ -{ - return (x < 0.0) ? -x : x; -} - -double r8_sign(double x) - -/******************************************************************************/ -/** - Purpose: - - R8_SIGN returns the sign of an R8. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 08 May 2006 - - Author: - - John Burkardt - - Parameters: - - Input, double X, the number whose sign is desired. - - Output, double R8_SIGN, the sign of X. -*/ -{ - return (x < 0.0) ? -1.0 : 1.0; -} - -double r8mat_amax(int m, int n, double a[]) - -/******************************************************************************/ -/** - Purpose: - - R8MAT_AMAX returns the maximum absolute value entry of an R8MAT. - - Discussion: - - An R8MAT is a doubly dimensioned array of R8 values, stored as a vector - in column-major order. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 07 September 2012 - - Author: - - John Burkardt - - Parameters: - - Input, int M, the number of rows in A. - - Input, int N, the number of columns in A. - - Input, double A[M*N], the M by N matrix. - - Output, double R8MAT_AMAX, the maximum absolute value entry of A. -*/ -{ - double value = r8_abs(a[0 + 0 * m]); - for (int j = 0; j < n; j++) { - for (int i = 0; i < m; i++) { - NOLESS(value, r8_abs(a[i + j * m])); - } - } - return value; -} - -void r8mat_copy(double a2[], int m, int n, double a1[]) - -/******************************************************************************/ -/** - Purpose: - - R8MAT_COPY_NEW copies one R8MAT to a "new" R8MAT. - - Discussion: - - An R8MAT is a doubly dimensioned array of R8 values, stored as a vector - in column-major order. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 26 July 2008 - - Author: - - John Burkardt - - Parameters: - - Input, int M, N, the number of rows and columns. - - Input, double A1[M*N], the matrix to be copied. - - Output, double R8MAT_COPY_NEW[M*N], the copy of A1. -*/ -{ - for (int j = 0; j < n; j++) { - for (int i = 0; i < m; i++) - a2[i + j * m] = a1[i + j * m]; - } -} - -/******************************************************************************/ - -void daxpy(int n, double da, double dx[], int incx, double dy[], int incy) - -/******************************************************************************/ -/** - Purpose: - - DAXPY computes constant times a vector plus a vector. - - Discussion: - - This routine uses unrolled loops for increments equal to one. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 30 March 2007 - - Author: - - C version by John Burkardt - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979. - - Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh, - Basic Linear Algebra Subprograms for Fortran Usage, - Algorithm 539, - ACM Transactions on Mathematical Software, - Volume 5, Number 3, September 1979, pages 308-323. - - Parameters: - - Input, int N, the number of elements in DX and DY. - - Input, double DA, the multiplier of DX. - - Input, double DX[*], the first vector. - - Input, int INCX, the increment between successive entries of DX. - - Input/output, double DY[*], the second vector. - On output, DY[*] has been replaced by DY[*] + DA * DX[*]. - - Input, int INCY, the increment between successive entries of DY. -*/ -{ - if (n <= 0 || da == 0.0) return; - - int i, ix, iy, m; - /** - Code for unequal increments or equal increments - not equal to 1. - */ - if (incx != 1 || incy != 1) { - if (0 <= incx) - ix = 0; - else - ix = (- n + 1) * incx; - if (0 <= incy) - iy = 0; - else - iy = (- n + 1) * incy; - for (i = 0; i < n; i++) { - dy[iy] = dy[iy] + da * dx[ix]; - ix = ix + incx; - iy = iy + incy; - } - } - /** - Code for both increments equal to 1. - */ - else { - m = n % 4; - for (i = 0; i < m; i++) - dy[i] = dy[i] + da * dx[i]; - for (i = m; i < n; i = i + 4) { - dy[i ] = dy[i ] + da * dx[i ]; - dy[i + 1] = dy[i + 1] + da * dx[i + 1]; - dy[i + 2] = dy[i + 2] + da * dx[i + 2]; - dy[i + 3] = dy[i + 3] + da * dx[i + 3]; - } - } -} -/******************************************************************************/ - -double ddot(int n, double dx[], int incx, double dy[], int incy) - -/******************************************************************************/ -/** - Purpose: - - DDOT forms the dot product of two vectors. - - Discussion: - - This routine uses unrolled loops for increments equal to one. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 30 March 2007 - - Author: - - C version by John Burkardt - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979. - - Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh, - Basic Linear Algebra Subprograms for Fortran Usage, - Algorithm 539, - ACM Transactions on Mathematical Software, - Volume 5, Number 3, September 1979, pages 308-323. - - Parameters: - - Input, int N, the number of entries in the vectors. - - Input, double DX[*], the first vector. - - Input, int INCX, the increment between successive entries in DX. - - Input, double DY[*], the second vector. - - Input, int INCY, the increment between successive entries in DY. - - Output, double DDOT, the sum of the product of the corresponding - entries of DX and DY. -*/ -{ - - if (n <= 0) return 0.0; - - int i, m; - double dtemp = 0.0; - - /** - Code for unequal increments or equal increments - not equal to 1. - */ - if (incx != 1 || incy != 1) { - int ix = (incx >= 0) ? 0 : (-n + 1) * incx, - iy = (incy >= 0) ? 0 : (-n + 1) * incy; - for (i = 0; i < n; i++) { - dtemp += dx[ix] * dy[iy]; - ix = ix + incx; - iy = iy + incy; - } - } - /** - Code for both increments equal to 1. - */ - else { - m = n % 5; - for (i = 0; i < m; i++) - dtemp += dx[i] * dy[i]; - for (i = m; i < n; i = i + 5) { - dtemp += dx[i] * dy[i] - + dx[i + 1] * dy[i + 1] - + dx[i + 2] * dy[i + 2] - + dx[i + 3] * dy[i + 3] - + dx[i + 4] * dy[i + 4]; - } - } - return dtemp; -} -/******************************************************************************/ - -double dnrm2(int n, double x[], int incx) - -/******************************************************************************/ -/** - Purpose: - - DNRM2 returns the euclidean norm of a vector. - - Discussion: - - DNRM2 ( X ) = sqrt ( X' * X ) - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 30 March 2007 - - Author: - - C version by John Burkardt - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979. - - Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh, - Basic Linear Algebra Subprograms for Fortran Usage, - Algorithm 539, - ACM Transactions on Mathematical Software, - Volume 5, Number 3, September 1979, pages 308-323. - - Parameters: - - Input, int N, the number of entries in the vector. - - Input, double X[*], the vector whose norm is to be computed. - - Input, int INCX, the increment between successive entries of X. - - Output, double DNRM2, the Euclidean norm of X. -*/ -{ - double norm; - if (n < 1 || incx < 1) - norm = 0.0; - else if (n == 1) - norm = r8_abs(x[0]); - else { - double scale = 0.0, ssq = 1.0; - int ix = 0; - for (int i = 0; i < n; i++) { - if (x[ix] != 0.0) { - double absxi = r8_abs(x[ix]); - if (scale < absxi) { - ssq = 1.0 + ssq * (scale / absxi) * (scale / absxi); - scale = absxi; - } - else - ssq = ssq + (absxi / scale) * (absxi / scale); - } - ix += incx; - } - norm = scale * sqrt(ssq); - } - return norm; -} -/******************************************************************************/ - -void dqrank(double a[], int lda, int m, int n, double tol, int* kr, - int jpvt[], double qraux[]) - -/******************************************************************************/ -/** - Purpose: - - DQRANK computes the QR factorization of a rectangular matrix. - - Discussion: - - This routine is used in conjunction with DQRLSS to solve - overdetermined, underdetermined and singular linear systems - in a least squares sense. - - DQRANK uses the LINPACK subroutine DQRDC to compute the QR - factorization, with column pivoting, of an M by N matrix A. - The numerical rank is determined using the tolerance TOL. - - Note that on output, ABS ( A(1,1) ) / ABS ( A(KR,KR) ) is an estimate - of the condition number of the matrix of independent columns, - and of R. This estimate will be <= 1/TOL. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 21 April 2012 - - Author: - - C version by John Burkardt. - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979, - ISBN13: 978-0-898711-72-1, - LC: QA214.L56. - - Parameters: - - Input/output, double A[LDA*N]. On input, the matrix whose - decomposition is to be computed. On output, the information from DQRDC. - The triangular matrix R of the QR factorization is contained in the - upper triangle and information needed to recover the orthogonal - matrix Q is stored below the diagonal in A and in the vector QRAUX. - - Input, int LDA, the leading dimension of A, which must - be at least M. - - Input, int M, the number of rows of A. - - Input, int N, the number of columns of A. - - Input, double TOL, a relative tolerance used to determine the - numerical rank. The problem should be scaled so that all the elements - of A have roughly the same absolute accuracy, EPS. Then a reasonable - value for TOL is roughly EPS divided by the magnitude of the largest - element. - - Output, int *KR, the numerical rank. - - Output, int JPVT[N], the pivot information from DQRDC. - Columns JPVT(1), ..., JPVT(KR) of the original matrix are linearly - independent to within the tolerance TOL and the remaining columns - are linearly dependent. - - Output, double QRAUX[N], will contain extra information defining - the QR factorization. -*/ -{ - double work[n]; - - for (int i = 0; i < n; i++) - jpvt[i] = 0; - - int job = 1; - - dqrdc(a, lda, m, n, qraux, jpvt, work, job); - - *kr = 0; - int k = i4_min(m, n); - for (int j = 0; j < k; j++) { - if (r8_abs(a[j + j * lda]) <= tol * r8_abs(a[0 + 0 * lda])) - return; - *kr = j + 1; - } -} -/******************************************************************************/ - -void dqrdc(double a[], int lda, int n, int p, double qraux[], int jpvt[], - double work[], int job) - -/******************************************************************************/ -/** - Purpose: - - DQRDC computes the QR factorization of a real rectangular matrix. - - Discussion: - - DQRDC uses Householder transformations. - - Column pivoting based on the 2-norms of the reduced columns may be - performed at the user's option. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 07 June 2005 - - Author: - - C version by John Burkardt. - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch and Pete Stewart, - LINPACK User's Guide, - SIAM, (Society for Industrial and Applied Mathematics), - 3600 University City Science Center, - Philadelphia, PA, 19104-2688. - ISBN 0-89871-172-X - - Parameters: - - Input/output, double A(LDA,P). On input, the N by P matrix - whose decomposition is to be computed. On output, A contains in - its upper triangle the upper triangular matrix R of the QR - factorization. Below its diagonal A contains information from - which the orthogonal part of the decomposition can be recovered. - Note that if pivoting has been requested, the decomposition is not that - of the original matrix A but that of A with its columns permuted - as described by JPVT. - - Input, int LDA, the leading dimension of the array A. LDA must - be at least N. - - Input, int N, the number of rows of the matrix A. - - Input, int P, the number of columns of the matrix A. - - Output, double QRAUX[P], contains further information required - to recover the orthogonal part of the decomposition. - - Input/output, integer JPVT[P]. On input, JPVT contains integers that - control the selection of the pivot columns. The K-th column A(*,K) of A - is placed in one of three classes according to the value of JPVT(K). - > 0, then A(K) is an initial column. - = 0, then A(K) is a free column. - < 0, then A(K) is a final column. - Before the decomposition is computed, initial columns are moved to - the beginning of the array A and final columns to the end. Both - initial and final columns are frozen in place during the computation - and only free columns are moved. At the K-th stage of the - reduction, if A(*,K) is occupied by a free column it is interchanged - with the free column of largest reduced norm. JPVT is not referenced - if JOB == 0. On output, JPVT(K) contains the index of the column of the - original matrix that has been interchanged into the K-th column, if - pivoting was requested. - - Workspace, double WORK[P]. WORK is not referenced if JOB == 0. - - Input, int JOB, initiates column pivoting. - 0, no pivoting is done. - nonzero, pivoting is done. -*/ -{ - int jp; - int j; - int lup; - int maxj; - double maxnrm, nrmxl, t, tt; - - int pl = 1, pu = 0; - /** - If pivoting is requested, rearrange the columns. - */ - if (job != 0) { - for (j = 1; j <= p; j++) { - int swapj = (0 < jpvt[j - 1]); - jpvt[j - 1] = (jpvt[j - 1] < 0) ? -j : j; - if (swapj) { - if (j != pl) - dswap(n, a + 0 + (pl - 1)*lda, 1, a + 0 + (j - 1), 1); - jpvt[j - 1] = jpvt[pl - 1]; - jpvt[pl - 1] = j; - pl++; - } - } - pu = p; - for (j = p; 1 <= j; j--) { - if (jpvt[j - 1] < 0) { - jpvt[j - 1] = -jpvt[j - 1]; - if (j != pu) { - dswap(n, a + 0 + (pu - 1)*lda, 1, a + 0 + (j - 1)*lda, 1); - jp = jpvt[pu - 1]; - jpvt[pu - 1] = jpvt[j - 1]; - jpvt[j - 1] = jp; - } - pu = pu - 1; - } - } - } - /** - Compute the norms of the free columns. - */ - for (j = pl; j <= pu; j++) - qraux[j - 1] = dnrm2(n, a + 0 + (j - 1) * lda, 1); - for (j = pl; j <= pu; j++) - work[j - 1] = qraux[j - 1]; - /** - Perform the Householder reduction of A. - */ - lup = i4_min(n, p); - for (int l = 1; l <= lup; l++) { - /** - Bring the column of largest norm into the pivot position. - */ - if (pl <= l && l < pu) { - maxnrm = 0.0; - maxj = l; - for (j = l; j <= pu; j++) { - if (maxnrm < qraux[j - 1]) { - maxnrm = qraux[j - 1]; - maxj = j; - } - } - if (maxj != l) { - dswap(n, a + 0 + (l - 1)*lda, 1, a + 0 + (maxj - 1)*lda, 1); - qraux[maxj - 1] = qraux[l - 1]; - work[maxj - 1] = work[l - 1]; - jp = jpvt[maxj - 1]; - jpvt[maxj - 1] = jpvt[l - 1]; - jpvt[l - 1] = jp; - } - } - /** - Compute the Householder transformation for column L. - */ - qraux[l - 1] = 0.0; - if (l != n) { - nrmxl = dnrm2(n - l + 1, a + l - 1 + (l - 1) * lda, 1); - if (nrmxl != 0.0) { - if (a[l - 1 + (l - 1)*lda] != 0.0) - nrmxl = nrmxl * r8_sign(a[l - 1 + (l - 1) * lda]); - dscal(n - l + 1, 1.0 / nrmxl, a + l - 1 + (l - 1)*lda, 1); - a[l - 1 + (l - 1)*lda] = 1.0 + a[l - 1 + (l - 1) * lda]; - /** - Apply the transformation to the remaining columns, updating the norms. - */ - for (j = l + 1; j <= p; j++) { - t = -ddot(n - l + 1, a + l - 1 + (l - 1) * lda, 1, a + l - 1 + (j - 1) * lda, 1) - / a[l - 1 + (l - 1) * lda]; - daxpy(n - l + 1, t, a + l - 1 + (l - 1)*lda, 1, a + l - 1 + (j - 1)*lda, 1); - if (pl <= j && j <= pu) { - if (qraux[j - 1] != 0.0) { - tt = 1.0 - pow(r8_abs(a[l - 1 + (j - 1) * lda]) / qraux[j - 1], 2); - tt = r8_max(tt, 0.0); - t = tt; - tt = 1.0 + 0.05 * tt * pow(qraux[j - 1] / work[j - 1], 2); - if (tt != 1.0) - qraux[j - 1] = qraux[j - 1] * sqrt(t); - else { - qraux[j - 1] = dnrm2(n - l, a + l + (j - 1) * lda, 1); - work[j - 1] = qraux[j - 1]; - } - } - } - } - /** - Save the transformation. - */ - qraux[l - 1] = a[l - 1 + (l - 1) * lda]; - a[l - 1 + (l - 1)*lda] = -nrmxl; - } - } - } -} -/******************************************************************************/ - -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) - -/******************************************************************************/ -/** - Purpose: - - DQRLS factors and solves a linear system in the least squares sense. - - Discussion: - - The linear system may be overdetermined, underdetermined or singular. - The solution is obtained using a QR factorization of the - coefficient matrix. - - DQRLS can be efficiently used to solve several least squares - problems with the same matrix A. The first system is solved - with ITASK = 1. The subsequent systems are solved with - ITASK = 2, to avoid the recomputation of the matrix factors. - The parameters KR, JPVT, and QRAUX must not be modified - between calls to DQRLS. - - DQRLS is used to solve in a least squares sense - overdetermined, underdetermined and singular linear systems. - The system is A*X approximates B where A is M by N. - B is a given M-vector, and X is the N-vector to be computed. - A solution X is found which minimimzes the sum of squares (2-norm) - of the residual, A*X - B. - - The numerical rank of A is determined using the tolerance TOL. - - DQRLS uses the LINPACK subroutine DQRDC to compute the QR - factorization, with column pivoting, of an M by N matrix A. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 10 September 2012 - - Author: - - C version by John Burkardt. - - Reference: - - David Kahaner, Cleve Moler, Steven Nash, - Numerical Methods and Software, - Prentice Hall, 1989, - ISBN: 0-13-627258-4, - LC: TA345.K34. - - Parameters: - - Input/output, double A[LDA*N], an M by N matrix. - On input, the matrix whose decomposition is to be computed. - In a least squares data fitting problem, A(I,J) is the - value of the J-th basis (model) function at the I-th data point. - On output, A contains the output from DQRDC. The triangular matrix R - of the QR factorization is contained in the upper triangle and - information needed to recover the orthogonal matrix Q is stored - below the diagonal in A and in the vector QRAUX. - - Input, int LDA, the leading dimension of A. - - Input, int M, the number of rows of A. - - Input, int N, the number of columns of A. - - Input, double TOL, a relative tolerance used to determine the - numerical rank. The problem should be scaled so that all the elements - of A have roughly the same absolute accuracy EPS. Then a reasonable - value for TOL is roughly EPS divided by the magnitude of the largest - element. - - Output, int *KR, the numerical rank. - - Input, double B[M], the right hand side of the linear system. - - Output, double X[N], a least squares solution to the linear - system. - - Output, double RSD[M], the residual, B - A*X. RSD may - overwrite B. - - Workspace, int JPVT[N], required if ITASK = 1. - Columns JPVT(1), ..., JPVT(KR) of the original matrix are linearly - independent to within the tolerance TOL and the remaining columns - are linearly dependent. ABS ( A(1,1) ) / ABS ( A(KR,KR) ) is an estimate - of the condition number of the matrix of independent columns, - and of R. This estimate will be <= 1/TOL. - - Workspace, double QRAUX[N], required if ITASK = 1. - - Input, int ITASK. - 1, DQRLS factors the matrix A and solves the least squares problem. - 2, DQRLS assumes that the matrix A was factored with an earlier - call to DQRLS, and only solves the least squares problem. - - Output, int DQRLS, error code. - 0: no error - -1: LDA < M (fatal error) - -2: N < 1 (fatal error) - -3: ITASK < 1 (fatal error) -*/ -{ - int ind; - if (lda < m) { - /*fprintf ( stderr, "\n" ); - fprintf ( stderr, "DQRLS - Fatal error!\n" ); - fprintf ( stderr, " LDA < M.\n" );*/ - ind = -1; - return ind; - } - - if (n <= 0) { - /*fprintf ( stderr, "\n" ); - fprintf ( stderr, "DQRLS - Fatal error!\n" ); - fprintf ( stderr, " N <= 0.\n" );*/ - ind = -2; - return ind; - } - - if (itask < 1) { - /*fprintf ( stderr, "\n" ); - fprintf ( stderr, "DQRLS - Fatal error!\n" ); - fprintf ( stderr, " ITASK < 1.\n" );*/ - ind = -3; - return ind; - } - - ind = 0; - /** - Factor the matrix. - */ - if (itask == 1) - dqrank(a, lda, m, n, tol, kr, jpvt, qraux); - /** - Solve the least-squares problem. - */ - dqrlss(a, lda, m, n, *kr, b, x, rsd, jpvt, qraux); - return ind; -} -/******************************************************************************/ - -void dqrlss(double a[], int lda, int m, int n, int kr, double b[], double x[], - double rsd[], int jpvt[], double qraux[]) - -/******************************************************************************/ -/** - Purpose: - - DQRLSS solves a linear system in a least squares sense. - - Discussion: - - DQRLSS must be preceded by a call to DQRANK. - - The system is to be solved is - A * X = B - where - A is an M by N matrix with rank KR, as determined by DQRANK, - B is a given M-vector, - X is the N-vector to be computed. - - A solution X, with at most KR nonzero components, is found which - minimizes the 2-norm of the residual (A*X-B). - - Once the matrix A has been formed, DQRANK should be - called once to decompose it. Then, for each right hand - side B, DQRLSS should be called once to obtain the - solution and residual. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 10 September 2012 - - Author: - - C version by John Burkardt - - Parameters: - - Input, double A[LDA*N], the QR factorization information - from DQRANK. The triangular matrix R of the QR factorization is - contained in the upper triangle and information needed to recover - the orthogonal matrix Q is stored below the diagonal in A and in - the vector QRAUX. - - Input, int LDA, the leading dimension of A, which must - be at least M. - - Input, int M, the number of rows of A. - - Input, int N, the number of columns of A. - - Input, int KR, the rank of the matrix, as estimated by DQRANK. - - Input, double B[M], the right hand side of the linear system. - - Output, double X[N], a least squares solution to the - linear system. - - Output, double RSD[M], the residual, B - A*X. RSD may - overwrite B. - - Input, int JPVT[N], the pivot information from DQRANK. - Columns JPVT[0], ..., JPVT[KR-1] of the original matrix are linearly - independent to within the tolerance TOL and the remaining columns - are linearly dependent. - - Input, double QRAUX[N], auxiliary information from DQRANK - defining the QR factorization. -*/ -{ - int i; - int info; - int j; - int job; - int k; - double t; - - if (kr != 0) { - job = 110; - info = dqrsl(a, lda, m, kr, qraux, b, rsd, rsd, x, rsd, rsd, job); UNUSED(info); - } - - for (i = 0; i < n; i++) - jpvt[i] = - jpvt[i]; - - for (i = kr; i < n; i++) - x[i] = 0.0; - - for (j = 1; j <= n; j++) { - if (jpvt[j - 1] <= 0) { - k = - jpvt[j - 1]; - jpvt[j - 1] = k; - - while (k != j) { - t = x[j - 1]; - x[j - 1] = x[k - 1]; - x[k - 1] = t; - jpvt[k - 1] = -jpvt[k - 1]; - k = jpvt[k - 1]; - } - } - } -} -/******************************************************************************/ - -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) - -/******************************************************************************/ -/** - Purpose: - - DQRSL computes transformations, projections, and least squares solutions. - - Discussion: - - DQRSL requires the output of DQRDC. - - For K <= min(N,P), let AK be the matrix - - AK = ( A(JPVT[0]), A(JPVT(2)), ..., A(JPVT(K)) ) - - formed from columns JPVT[0], ..., JPVT(K) of the original - N by P matrix A that was input to DQRDC. If no pivoting was - done, AK consists of the first K columns of A in their - original order. DQRDC produces a factored orthogonal matrix Q - and an upper triangular matrix R such that - - AK = Q * (R) - (0) - - This information is contained in coded form in the arrays - A and QRAUX. - - The parameters QY, QTY, B, RSD, and AB are not referenced - if their computation is not requested and in this case - can be replaced by dummy variables in the calling program. - To save storage, the user may in some cases use the same - array for different parameters in the calling sequence. A - frequently occurring example is when one wishes to compute - any of B, RSD, or AB and does not need Y or QTY. In this - case one may identify Y, QTY, and one of B, RSD, or AB, while - providing separate arrays for anything else that is to be - computed. - - Thus the calling sequence - - dqrsl ( a, lda, n, k, qraux, y, dum, y, b, y, dum, 110, info ) - - will result in the computation of B and RSD, with RSD - overwriting Y. More generally, each item in the following - list contains groups of permissible identifications for - a single calling sequence. - - 1. (Y,QTY,B) (RSD) (AB) (QY) - - 2. (Y,QTY,RSD) (B) (AB) (QY) - - 3. (Y,QTY,AB) (B) (RSD) (QY) - - 4. (Y,QY) (QTY,B) (RSD) (AB) - - 5. (Y,QY) (QTY,RSD) (B) (AB) - - 6. (Y,QY) (QTY,AB) (B) (RSD) - - In any group the value returned in the array allocated to - the group corresponds to the last member of the group. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 07 June 2005 - - Author: - - C version by John Burkardt. - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch and Pete Stewart, - LINPACK User's Guide, - SIAM, (Society for Industrial and Applied Mathematics), - 3600 University City Science Center, - Philadelphia, PA, 19104-2688. - ISBN 0-89871-172-X - - Parameters: - - Input, double A[LDA*P], contains the output of DQRDC. - - Input, int LDA, the leading dimension of the array A. - - Input, int N, the number of rows of the matrix AK. It must - have the same value as N in DQRDC. - - Input, int K, the number of columns of the matrix AK. K - must not be greater than min(N,P), where P is the same as in the - calling sequence to DQRDC. - - Input, double QRAUX[P], the auxiliary output from DQRDC. - - Input, double Y[N], a vector to be manipulated by DQRSL. - - Output, double QY[N], contains Q * Y, if requested. - - Output, double QTY[N], contains Q' * Y, if requested. - - Output, double B[K], the solution of the least squares problem - minimize norm2 ( Y - AK * B), - if its computation has been requested. Note that if pivoting was - requested in DQRDC, the J-th component of B will be associated with - column JPVT(J) of the original matrix A that was input into DQRDC. - - Output, double RSD[N], the least squares residual Y - AK * B, - if its computation has been requested. RSD is also the orthogonal - projection of Y onto the orthogonal complement of the column space - of AK. - - Output, double AB[N], the least squares approximation Ak * B, - if its computation has been requested. AB is also the orthogonal - projection of Y onto the column space of A. - - Input, integer JOB, specifies what is to be computed. JOB has - the decimal expansion ABCDE, with the following meaning: - - if A != 0, compute QY. - if B != 0, compute QTY. - if C != 0, compute QTY and B. - if D != 0, compute QTY and RSD. - if E != 0, compute QTY and AB. - - Note that a request to compute B, RSD, or AB automatically triggers - the computation of QTY, for which an array must be provided in the - calling sequence. - - Output, int DQRSL, is zero unless the computation of B has - been requested and R is exactly singular. In this case, INFO is the - index of the first zero diagonal element of R, and B is left unaltered. -*/ -{ - int cab; - int cb; - int cqty; - int cqy; - int cr; - int i; - int info; - int j; - int jj; - int ju; - double t; - double temp; - /** - Set INFO flag. - */ - info = 0; - - /** - Determine what is to be computed. - */ - cqy = ( job / 10000 != 0); - cqty = ((job % 10000) != 0); - cb = ((job % 1000) / 100 != 0); - cr = ((job % 100) / 10 != 0); - cab = ((job % 10) != 0); - ju = i4_min(k, n - 1); - - /** - Special action when N = 1. - */ - if (ju == 0) { - if (cqy) - qy[0] = y[0]; - if (cqty) - qty[0] = y[0]; - if (cab) - ab[0] = y[0]; - if (cb) { - if (a[0 + 0 * lda] == 0.0) - info = 1; - else - b[0] = y[0] / a[0 + 0 * lda]; - } - if (cr) - rsd[0] = 0.0; - return info; - } - /** - Set up to compute QY or QTY. - */ - if (cqy) { - for (i = 1; i <= n; i++) - qy[i - 1] = y[i - 1]; - } - if (cqty) { - for (i = 1; i <= n; i++) - qty[i - 1] = y[i - 1]; - } - /** - Compute QY. - */ - if (cqy) { - for (jj = 1; jj <= ju; jj++) { - j = ju - jj + 1; - if (qraux[j - 1] != 0.0) { - temp = a[j - 1 + (j - 1) * lda]; - a[j - 1 + (j - 1)*lda] = qraux[j - 1]; - t = -ddot(n - j + 1, a + j - 1 + (j - 1) * lda, 1, qy + j - 1, 1) / a[j - 1 + (j - 1) * lda]; - daxpy(n - j + 1, t, a + j - 1 + (j - 1)*lda, 1, qy + j - 1, 1); - a[j - 1 + (j - 1)*lda] = temp; - } - } - } - /** - Compute Q'*Y. - */ - if (cqty) { - for (j = 1; j <= ju; j++) { - if (qraux[j - 1] != 0.0) { - temp = a[j - 1 + (j - 1) * lda]; - a[j - 1 + (j - 1)*lda] = qraux[j - 1]; - t = -ddot(n - j + 1, a + j - 1 + (j - 1) * lda, 1, qty + j - 1, 1) / a[j - 1 + (j - 1) * lda]; - daxpy(n - j + 1, t, a + j - 1 + (j - 1)*lda, 1, qty + j - 1, 1); - a[j - 1 + (j - 1)*lda] = temp; - } - } - } - /** - Set up to compute B, RSD, or AB. - */ - if (cb) { - for (i = 1; i <= k; i++) - b[i - 1] = qty[i - 1]; - } - if (cab) { - for (i = 1; i <= k; i++) - ab[i - 1] = qty[i - 1]; - } - if (cr && k < n) { - for (i = k + 1; i <= n; i++) - rsd[i - 1] = qty[i - 1]; - } - if (cab && k + 1 <= n) { - for (i = k + 1; i <= n; i++) - ab[i - 1] = 0.0; - } - if (cr) { - for (i = 1; i <= k; i++) - rsd[i - 1] = 0.0; - } - /** - Compute B. - */ - if (cb) { - for (jj = 1; jj <= k; jj++) { - j = k - jj + 1; - if (a[j - 1 + (j - 1)*lda] == 0.0) { - info = j; - break; - } - b[j - 1] = b[j - 1] / a[j - 1 + (j - 1) * lda]; - if (j != 1) { - t = -b[j - 1]; - daxpy(j - 1, t, a + 0 + (j - 1)*lda, 1, b, 1); - } - } - } - /** - Compute RSD or AB as required. - */ - if (cr || cab) { - for (jj = 1; jj <= ju; jj++) { - j = ju - jj + 1; - if (qraux[j - 1] != 0.0) { - temp = a[j - 1 + (j - 1) * lda]; - a[j - 1 + (j - 1)*lda] = qraux[j - 1]; - if (cr) { - t = -ddot(n - j + 1, a + j - 1 + (j - 1) * lda, 1, rsd + j - 1, 1) - / a[j - 1 + (j - 1) * lda]; - daxpy(n - j + 1, t, a + j - 1 + (j - 1)*lda, 1, rsd + j - 1, 1); - } - if (cab) { - t = -ddot(n - j + 1, a + j - 1 + (j - 1) * lda, 1, ab + j - 1, 1) - / a[j - 1 + (j - 1) * lda]; - daxpy(n - j + 1, t, a + j - 1 + (j - 1)*lda, 1, ab + j - 1, 1); - } - a[j - 1 + (j - 1)*lda] = temp; - } - } - } - return info; -} -/******************************************************************************/ - -/******************************************************************************/ - -void dscal(int n, double sa, double x[], int incx) - -/******************************************************************************/ -/** - Purpose: - - DSCAL scales a vector by a constant. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 30 March 2007 - - Author: - - C version by John Burkardt - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979. - - Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh, - Basic Linear Algebra Subprograms for Fortran Usage, - Algorithm 539, - ACM Transactions on Mathematical Software, - Volume 5, Number 3, September 1979, pages 308-323. - - Parameters: - - Input, int N, the number of entries in the vector. - - Input, double SA, the multiplier. - - Input/output, double X[*], the vector to be scaled. - - Input, int INCX, the increment between successive entries of X. -*/ -{ - int i; - int ix; - int m; - - if (n <= 0) return; - - if (incx == 1) { - m = n % 5; - for (i = 0; i < m; i++) - x[i] = sa * x[i]; - for (i = m; i < n; i = i + 5) { - x[i] = sa * x[i]; - x[i + 1] = sa * x[i + 1]; - x[i + 2] = sa * x[i + 2]; - x[i + 3] = sa * x[i + 3]; - x[i + 4] = sa * x[i + 4]; - } - } - else { - if (0 <= incx) - ix = 0; - else - ix = (- n + 1) * incx; - for (i = 0; i < n; i++) { - x[ix] = sa * x[ix]; - ix = ix + incx; - } - } -} -/******************************************************************************/ - - -void dswap(int n, double x[], int incx, double y[], int incy) - -/******************************************************************************/ -/** - Purpose: - - DSWAP interchanges two vectors. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 30 March 2007 - - Author: - - C version by John Burkardt - - Reference: - - Jack Dongarra, Cleve Moler, Jim Bunch, Pete Stewart, - LINPACK User's Guide, - SIAM, 1979. - - Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh, - Basic Linear Algebra Subprograms for Fortran Usage, - Algorithm 539, - ACM Transactions on Mathematical Software, - Volume 5, Number 3, September 1979, pages 308-323. - - Parameters: - - Input, int N, the number of entries in the vectors. - - Input/output, double X[*], one of the vectors to swap. - - Input, int INCX, the increment between successive entries of X. - - Input/output, double Y[*], one of the vectors to swap. - - Input, int INCY, the increment between successive elements of Y. -*/ -{ - if (n <= 0) return; - - int i, ix, iy, m; - double temp; - - if (incx == 1 && incy == 1) { - m = n % 3; - for (i = 0; i < m; i++) { - temp = x[i]; - x[i] = y[i]; - y[i] = temp; - } - for (i = m; i < n; i = i + 3) { - temp = x[i]; - x[i] = y[i]; - y[i] = temp; - temp = x[i + 1]; - x[i + 1] = y[i + 1]; - y[i + 1] = temp; - temp = x[i + 2]; - x[i + 2] = y[i + 2]; - y[i + 2] = temp; - } - } - else { - ix = (incx >= 0) ? 0 : (-n + 1) * incx; - iy = (incy >= 0) ? 0 : (-n + 1) * incy; - for (i = 0; i < n; i++) { - temp = x[ix]; - x[ix] = y[iy]; - y[iy] = temp; - ix = ix + incx; - iy = iy + incy; - } - } -} -/******************************************************************************/ - -/******************************************************************************/ - -void qr_solve(double x[], int m, int n, double a[], double b[]) - -/******************************************************************************/ -/** - Purpose: - - QR_SOLVE solves a linear system in the least squares sense. - - Discussion: - - If the matrix A has full column rank, then the solution X should be the - unique vector that minimizes the Euclidean norm of the residual. - - If the matrix A does not have full column rank, then the solution is - not unique; the vector X will minimize the residual norm, but so will - various other vectors. - - Licensing: - - This code is distributed under the GNU LGPL license. - - Modified: - - 11 September 2012 - - Author: - - John Burkardt - - Reference: - - David Kahaner, Cleve Moler, Steven Nash, - Numerical Methods and Software, - Prentice Hall, 1989, - ISBN: 0-13-627258-4, - LC: TA345.K34. - - Parameters: - - Input, int M, the number of rows of A. - - Input, int N, the number of columns of A. - - Input, double A[M*N], the matrix. - - Input, double B[M], the right hand side. - - Output, double QR_SOLVE[N], the least squares solution. -*/ -{ - double a_qr[n * m], qraux[n], r[m], tol; - int ind, itask, jpvt[n], kr, lda; - - r8mat_copy(a_qr, m, n, a); - lda = m; - tol = r8_epsilon() / r8mat_amax(m, n, a_qr); - itask = 1; - - ind = dqrls(a_qr, lda, m, n, tol, &kr, b, x, r, jpvt, qraux, itask); UNUSED(ind); -} -/******************************************************************************/ - -#endif diff --git a/Marlin/qr_solve.h b/Marlin/qr_solve.h deleted file mode 100644 index 3ea30e9..0000000 --- a/Marlin/qr_solve.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "MarlinConfig.h" - -#if ENABLED(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); -void qr_solve(double x[], int m, int n, double a[], double b[]); - -#endif diff --git a/Marlin/servo.cpp b/Marlin/servo.cpp deleted file mode 100644 index b5f9ed8..0000000 --- a/Marlin/servo.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 - * Copyright (c) 2009 Michael Margolis. All right reserved. - */ - -/** - * 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) - Attach a servo motor to an i/o pin. - * attach(pin, min, max) - Attach to a pin, setting min and max values in microseconds - * Default min is 544, max is 2400 - * - * write() - Set the servo angle in degrees. (Invalid angles —over MIN_PULSE_WIDTH— are treated as µs.) - * writeMicroseconds() - Set the servo pulse width in microseconds. - * move(pin, angle) - Sequence of attach(pin), write(angle), delay(SERVO_DELAY). - * With DEACTIVATE_SERVOS_AFTER_MOVE it detaches after SERVO_DELAY. - * read() - Get the last-written servo pulse width as an angle between 0 and 180. - * readMicroseconds() - Get the last-written servo pulse width in microseconds. - * attached() - Return true if a servo is attached. - * detach() - Stop an attached servo from pulsing its i/o pin. - * - */ -#include "MarlinConfig.h" - -#if HAS_SERVOS - -#include -#include - -#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 ServoInfo_t servo_info[MAX_SERVOS]; // static array of servo info 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) (servo_info[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) - 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) // 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 ENABLED(_useTimer1) - SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); } - #endif - - #if ENABLED(_useTimer3) - SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); } - #endif - - #if ENABLED(_useTimer4) - SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); } - #endif - - #if ENABLED(_useTimer5) - SIGNAL (TIMER5_COMPA_vect) { handle_interrupts(_timer5, &TCNT5, &OCR5A); } - #endif - -#else //!WIRING - - // Interrupt handlers for Wiring - #if ENABLED(_useTimer1) - void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); } - #endif - #if ENABLED(_useTimer3) - void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); } - #endif - -#endif //!WIRING - - -static void initISR(timer16_Sequence_t timer) { - #if ENABLED(_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__) - SBI(TIFR, OCF1A); // clear any pending interrupts; - SBI(TIMSK, OCIE1A); // enable the output compare interrupt - #else - // here if not ATmega8 or ATmega128 - SBI(TIFR1, OCF1A); // clear any pending interrupts; - SBI(TIMSK1, OCIE1A); // enable the output compare interrupt - #endif - #ifdef WIRING - timerAttach(TIMER1OUTCOMPAREA_INT, Timer1Service); - #endif - } - #endif - - #if ENABLED(_useTimer3) - if (timer == _timer3) { - TCCR3A = 0; // normal counting mode - TCCR3B = _BV(CS31); // set prescaler of 8 - TCNT3 = 0; // clear the timer count - #ifdef __AVR_ATmega128__ - SBI(TIFR, OCF3A); // clear any pending interrupts; - SBI(ETIMSK, OCIE3A); // enable the output compare interrupt - #else - TIFR3 = _BV(OCF3A); // clear any pending interrupts; - TIMSK3 = _BV(OCIE3A) ; // enable the output compare interrupt - #endif - #ifdef WIRING - timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service); // for Wiring platform only - #endif - } - #endif - - #if ENABLED(_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 ENABLED(_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 - #ifdef WIRING - if (timer == _timer1) { - CBI( - #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) - TIMSK1 - #else - TIMSK - #endif - , OCIE1A); // disable timer 1 output compare interrupt - timerDetach(TIMER1OUTCOMPAREA_INT); - } - else if (timer == _timer3) { - CBI( - #if defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) - TIMSK3 - #else - ETIMSK - #endif - , OCIE3A); // disable the timer3 output compare A interrupt - timerDetach(TIMER3OUTCOMPAREA_INT); - } - #else //!WIRING - // For arduino - in future: call here to a currently undefined function to reset the timer - UNUSED(timer); - #endif -} - -static boolean 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) - return true; - } - return false; -} - - -/****************** end of static functions ******************************/ - -Servo::Servo() { - if (ServoCount < MAX_SERVOS) { - this->servoIndex = ServoCount++; // assign a servo index to this instance - servo_info[this->servoIndex].ticks = usToTicks(DEFAULT_PULSE_WIDTH); // store default values - 12 Aug 2009 - } - else - this->servoIndex = INVALID_SERVO; // too many servos -} - -int8_t Servo::attach(int pin) { - return this->attach(pin, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH); -} - -int8_t Servo::attach(int pin, int min, int max) { - - if (this->servoIndex >= MAX_SERVOS) return -1; - - if (pin > 0) servo_info[this->servoIndex].Pin.nbr = pin; - pinMode(servo_info[this->servoIndex].Pin.nbr, OUTPUT); // set servo pin to output - - // 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)) initISR(timer); - servo_info[this->servoIndex].Pin.isActive = true; // this must be set after the check for isTimerActive - - return this->servoIndex; -} - -void Servo::detach() { - servo_info[this->servoIndex].Pin.isActive = false; - timer16_Sequence_t timer = SERVO_INDEX_TO_TIMER(servoIndex); - if (!isTimerActive(timer)) 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) - value = map(constrain(value, 0, 180), 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 - // ensure pulse width is valid - value = constrain(value, SERVO_MIN(), SERVO_MAX()) - (TRIM_DURATION); - value = usToTicks(value); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009 - - CRITICAL_SECTION_START; - servo_info[channel].ticks = value; - CRITICAL_SECTION_END; - } -} - -// return the value as degrees -int Servo::read() { return map(this->readMicroseconds() + 1, SERVO_MIN(), SERVO_MAX(), 0, 180); } - -int Servo::readMicroseconds() { - return (this->servoIndex == INVALID_SERVO) ? 0 : ticksToUs(servo_info[this->servoIndex].ticks) + TRIM_DURATION; -} - -bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; } - -void Servo::move(int value) { - if (this->attach(0) >= 0) { - this->write(value); - delay(SERVO_DELAY); - #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) - this->detach(); - #endif - } -} - -#endif diff --git a/Marlin/servo.h b/Marlin/servo.h deleted file mode 100644 index 9f5b0eb..0000000 --- a/Marlin/servo.h +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - 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. - move(angle) - Sequence of attach(0), write(angle), - With DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY and detach. - */ - -#ifndef servo_h -#define servo_h - -#include - -/** - * 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 _useTimer1 - #define _useTimer3 - #define _useTimer4 - #if !HAS_MOTOR_CURRENT_PWM - #define _useTimer5 // Timer 5 is used for motor current PWM and can't be used for servos. - #endif -#elif defined(__AVR_ATmega32U4__) - #define _useTimer3 -#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) - #define _useTimer3 -#elif defined(__AVR_ATmega128__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2561__) - #define _useTimer3 -#else - // everything else -#endif - -typedef enum { - #if ENABLED(_useTimer1) - _timer1, - #endif - #if ENABLED(_useTimer3) - _timer3, - #endif - #if ENABLED(_useTimer4) - _timer4, - #endif - #if ENABLED(_useTimer5) - _timer5, - #endif - _Nbr_16timers -} timer16_Sequence_t; - - -#define Servo_VERSION 2 // software version of this library - -#define MIN_PULSE_WIDTH 600 //544 // the shortest pulse sent to a servo -#define MAX_PULSE_WIDTH 2400 //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; -} ServoInfo_t; - -class Servo { - public: - Servo(); - int8_t attach(int pin); // attach the given pin to the next free channel, set pinMode, return channel number (-1 on fail) - int8_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 - void move(int value); // attach the servo, then move to value - // if value is < 200 it is treated as an angle, otherwise as pulse width in microseconds - // if DEACTIVATE_SERVOS_AFTER_MOVE wait SERVO_DELAY, then detach - 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 - - 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 diff --git a/Marlin/speed_lookuptable.h b/Marlin/speed_lookuptable.h deleted file mode 100644 index 08cc483..0000000 --- a/Marlin/speed_lookuptable.h +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef SPEED_LOOKUPTABLE_H -#define SPEED_LOOKUPTABLE_H - -#include "Marlin.h" - -#if F_CPU == 16000000 - -const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {\ - { 62500, 55556}, { 6944, 3268}, { 3676, 1176}, { 2500, 607}, { 1893, 369}, { 1524, 249}, { 1275, 179}, { 1096, 135}, - { 961, 105}, { 856, 85}, { 771, 69}, { 702, 58}, { 644, 49}, { 595, 42}, { 553, 37}, { 516, 32}, - { 484, 28}, { 456, 25}, { 431, 23}, { 408, 20}, { 388, 19}, { 369, 16}, { 353, 16}, { 337, 14}, - { 323, 13}, { 310, 11}, { 299, 11}, { 288, 11}, { 277, 9}, { 268, 9}, { 259, 8}, { 251, 8}, - { 243, 8}, { 235, 7}, { 228, 6}, { 222, 6}, { 216, 6}, { 210, 6}, { 204, 5}, { 199, 5}, - { 194, 5}, { 189, 4}, { 185, 4}, { 181, 4}, { 177, 4}, { 173, 4}, { 169, 4}, { 165, 3}, - { 162, 3}, { 159, 4}, { 155, 3}, { 152, 3}, { 149, 2}, { 147, 3}, { 144, 3}, { 141, 2}, - { 139, 3}, { 136, 2}, { 134, 2}, { 132, 3}, { 129, 2}, { 127, 2}, { 125, 2}, { 123, 2}, - { 121, 2}, { 119, 1}, { 118, 2}, { 116, 2}, { 114, 1}, { 113, 2}, { 111, 2}, { 109, 1}, - { 108, 2}, { 106, 1}, { 105, 2}, { 103, 1}, { 102, 1}, { 101, 1}, { 100, 2}, { 98, 1}, - { 97, 1}, { 96, 1}, { 95, 2}, { 93, 1}, { 92, 1}, { 91, 1}, { 90, 1}, { 89, 1}, - { 88, 1}, { 87, 1}, { 86, 1}, { 85, 1}, { 84, 1}, { 83, 0}, { 83, 1}, { 82, 1}, - { 81, 1}, { 80, 1}, { 79, 1}, { 78, 0}, { 78, 1}, { 77, 1}, { 76, 1}, { 75, 0}, - { 75, 1}, { 74, 1}, { 73, 1}, { 72, 0}, { 72, 1}, { 71, 1}, { 70, 0}, { 70, 1}, - { 69, 0}, { 69, 1}, { 68, 1}, { 67, 0}, { 67, 1}, { 66, 0}, { 66, 1}, { 65, 0}, - { 65, 1}, { 64, 1}, { 63, 0}, { 63, 1}, { 62, 0}, { 62, 1}, { 61, 0}, { 61, 1}, - { 60, 0}, { 60, 0}, { 60, 1}, { 59, 0}, { 59, 1}, { 58, 0}, { 58, 1}, { 57, 0}, - { 57, 1}, { 56, 0}, { 56, 0}, { 56, 1}, { 55, 0}, { 55, 1}, { 54, 0}, { 54, 0}, - { 54, 1}, { 53, 0}, { 53, 0}, { 53, 1}, { 52, 0}, { 52, 0}, { 52, 1}, { 51, 0}, - { 51, 0}, { 51, 1}, { 50, 0}, { 50, 0}, { 50, 1}, { 49, 0}, { 49, 0}, { 49, 1}, - { 48, 0}, { 48, 0}, { 48, 1}, { 47, 0}, { 47, 0}, { 47, 0}, { 47, 1}, { 46, 0}, - { 46, 0}, { 46, 1}, { 45, 0}, { 45, 0}, { 45, 0}, { 45, 1}, { 44, 0}, { 44, 0}, - { 44, 0}, { 44, 1}, { 43, 0}, { 43, 0}, { 43, 0}, { 43, 1}, { 42, 0}, { 42, 0}, - { 42, 0}, { 42, 1}, { 41, 0}, { 41, 0}, { 41, 0}, { 41, 0}, { 41, 1}, { 40, 0}, - { 40, 0}, { 40, 0}, { 40, 0}, { 40, 1}, { 39, 0}, { 39, 0}, { 39, 0}, { 39, 0}, - { 39, 1}, { 38, 0}, { 38, 0}, { 38, 0}, { 38, 0}, { 38, 1}, { 37, 0}, { 37, 0}, - { 37, 0}, { 37, 0}, { 37, 0}, { 37, 1}, { 36, 0}, { 36, 0}, { 36, 0}, { 36, 0}, - { 36, 1}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 0}, { 35, 1}, - { 34, 0}, { 34, 0}, { 34, 0}, { 34, 0}, { 34, 0}, { 34, 1}, { 33, 0}, { 33, 0}, - { 33, 0}, { 33, 0}, { 33, 0}, { 33, 0}, { 33, 1}, { 32, 0}, { 32, 0}, { 32, 0}, - { 32, 0}, { 32, 0}, { 32, 0}, { 32, 0}, { 32, 1}, { 31, 0}, { 31, 0}, { 31, 0}, - { 31, 0}, { 31, 0}, { 31, 0}, { 31, 1}, { 30, 0}, { 30, 0}, { 30, 0}, { 30, 0} -}; - -const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {\ - { 62500, 12500}, { 50000, 8334}, { 41666, 5952}, { 35714, 4464}, { 31250, 3473}, { 27777, 2777}, { 25000, 2273}, { 22727, 1894}, - { 20833, 1603}, { 19230, 1373}, { 17857, 1191}, { 16666, 1041}, { 15625, 920}, { 14705, 817}, { 13888, 731}, { 13157, 657}, - { 12500, 596}, { 11904, 541}, { 11363, 494}, { 10869, 453}, { 10416, 416}, { 10000, 385}, { 9615, 356}, { 9259, 331}, - { 8928, 308}, { 8620, 287}, { 8333, 269}, { 8064, 252}, { 7812, 237}, { 7575, 223}, { 7352, 210}, { 7142, 198}, - { 6944, 188}, { 6756, 178}, { 6578, 168}, { 6410, 160}, { 6250, 153}, { 6097, 145}, { 5952, 139}, { 5813, 132}, - { 5681, 126}, { 5555, 121}, { 5434, 115}, { 5319, 111}, { 5208, 106}, { 5102, 102}, { 5000, 99}, { 4901, 94}, - { 4807, 91}, { 4716, 87}, { 4629, 84}, { 4545, 81}, { 4464, 79}, { 4385, 75}, { 4310, 73}, { 4237, 71}, - { 4166, 68}, { 4098, 66}, { 4032, 64}, { 3968, 62}, { 3906, 60}, { 3846, 59}, { 3787, 56}, { 3731, 55}, - { 3676, 53}, { 3623, 52}, { 3571, 50}, { 3521, 49}, { 3472, 48}, { 3424, 46}, { 3378, 45}, { 3333, 44}, - { 3289, 43}, { 3246, 41}, { 3205, 41}, { 3164, 39}, { 3125, 39}, { 3086, 38}, { 3048, 36}, { 3012, 36}, - { 2976, 35}, { 2941, 35}, { 2906, 33}, { 2873, 33}, { 2840, 32}, { 2808, 31}, { 2777, 30}, { 2747, 30}, - { 2717, 29}, { 2688, 29}, { 2659, 28}, { 2631, 27}, { 2604, 27}, { 2577, 26}, { 2551, 26}, { 2525, 25}, - { 2500, 25}, { 2475, 25}, { 2450, 23}, { 2427, 24}, { 2403, 23}, { 2380, 22}, { 2358, 22}, { 2336, 22}, - { 2314, 21}, { 2293, 21}, { 2272, 20}, { 2252, 20}, { 2232, 20}, { 2212, 20}, { 2192, 19}, { 2173, 18}, - { 2155, 19}, { 2136, 18}, { 2118, 18}, { 2100, 17}, { 2083, 17}, { 2066, 17}, { 2049, 17}, { 2032, 16}, - { 2016, 16}, { 2000, 16}, { 1984, 16}, { 1968, 15}, { 1953, 16}, { 1937, 14}, { 1923, 15}, { 1908, 15}, - { 1893, 14}, { 1879, 14}, { 1865, 14}, { 1851, 13}, { 1838, 14}, { 1824, 13}, { 1811, 13}, { 1798, 13}, - { 1785, 12}, { 1773, 13}, { 1760, 12}, { 1748, 12}, { 1736, 12}, { 1724, 12}, { 1712, 12}, { 1700, 11}, - { 1689, 12}, { 1677, 11}, { 1666, 11}, { 1655, 11}, { 1644, 11}, { 1633, 10}, { 1623, 11}, { 1612, 10}, - { 1602, 10}, { 1592, 10}, { 1582, 10}, { 1572, 10}, { 1562, 10}, { 1552, 9}, { 1543, 10}, { 1533, 9}, - { 1524, 9}, { 1515, 9}, { 1506, 9}, { 1497, 9}, { 1488, 9}, { 1479, 9}, { 1470, 9}, { 1461, 8}, - { 1453, 8}, { 1445, 9}, { 1436, 8}, { 1428, 8}, { 1420, 8}, { 1412, 8}, { 1404, 8}, { 1396, 8}, - { 1388, 7}, { 1381, 8}, { 1373, 7}, { 1366, 8}, { 1358, 7}, { 1351, 7}, { 1344, 8}, { 1336, 7}, - { 1329, 7}, { 1322, 7}, { 1315, 7}, { 1308, 6}, { 1302, 7}, { 1295, 7}, { 1288, 6}, { 1282, 7}, - { 1275, 6}, { 1269, 7}, { 1262, 6}, { 1256, 6}, { 1250, 7}, { 1243, 6}, { 1237, 6}, { 1231, 6}, - { 1225, 6}, { 1219, 6}, { 1213, 6}, { 1207, 6}, { 1201, 5}, { 1196, 6}, { 1190, 6}, { 1184, 5}, - { 1179, 6}, { 1173, 5}, { 1168, 6}, { 1162, 5}, { 1157, 5}, { 1152, 6}, { 1146, 5}, { 1141, 5}, - { 1136, 5}, { 1131, 5}, { 1126, 5}, { 1121, 5}, { 1116, 5}, { 1111, 5}, { 1106, 5}, { 1101, 5}, - { 1096, 5}, { 1091, 5}, { 1086, 4}, { 1082, 5}, { 1077, 5}, { 1072, 4}, { 1068, 5}, { 1063, 4}, - { 1059, 5}, { 1054, 4}, { 1050, 4}, { 1046, 5}, { 1041, 4}, { 1037, 4}, { 1033, 5}, { 1028, 4}, - { 1024, 4}, { 1020, 4}, { 1016, 4}, { 1012, 4}, { 1008, 4}, { 1004, 4}, { 1000, 4}, { 996, 4}, - { 992, 4}, { 988, 4}, { 984, 4}, { 980, 4}, { 976, 4}, { 972, 4}, { 968, 3}, { 965, 3} -}; - -#elif F_CPU == 20000000 - -const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { - {62500, 54055}, {8445, 3917}, {4528, 1434}, {3094, 745}, {2349, 456}, {1893, 307}, {1586, 222}, {1364, 167}, - {1197, 131}, {1066, 105}, {961, 86}, {875, 72}, {803, 61}, {742, 53}, {689, 45}, {644, 40}, - {604, 35}, {569, 32}, {537, 28}, {509, 25}, {484, 23}, {461, 21}, {440, 19}, {421, 17}, - {404, 16}, {388, 15}, {373, 14}, {359, 13}, {346, 12}, {334, 11}, {323, 10}, {313, 10}, - {303, 9}, {294, 9}, {285, 8}, {277, 7}, {270, 8}, {262, 7}, {255, 6}, {249, 6}, - {243, 6}, {237, 6}, {231, 5}, {226, 5}, {221, 5}, {216, 5}, {211, 4}, {207, 5}, - {202, 4}, {198, 4}, {194, 4}, {190, 3}, {187, 4}, {183, 3}, {180, 3}, {177, 4}, - {173, 3}, {170, 3}, {167, 2}, {165, 3}, {162, 3}, {159, 2}, {157, 3}, {154, 2}, - {152, 3}, {149, 2}, {147, 2}, {145, 2}, {143, 2}, {141, 2}, {139, 2}, {137, 2}, - {135, 2}, {133, 2}, {131, 2}, {129, 1}, {128, 2}, {126, 2}, {124, 1}, {123, 2}, - {121, 1}, {120, 2}, {118, 1}, {117, 1}, {116, 2}, {114, 1}, {113, 1}, {112, 2}, - {110, 1}, {109, 1}, {108, 1}, {107, 2}, {105, 1}, {104, 1}, {103, 1}, {102, 1}, - {101, 1}, {100, 1}, {99, 1}, {98, 1}, {97, 1}, {96, 1}, {95, 1}, {94, 1}, - {93, 1}, {92, 1}, {91, 0}, {91, 1}, {90, 1}, {89, 1}, {88, 1}, {87, 0}, - {87, 1}, {86, 1}, {85, 1}, {84, 0}, {84, 1}, {83, 1}, {82, 1}, {81, 0}, - {81, 1}, {80, 1}, {79, 0}, {79, 1}, {78, 0}, {78, 1}, {77, 1}, {76, 0}, - {76, 1}, {75, 0}, {75, 1}, {74, 1}, {73, 0}, {73, 1}, {72, 0}, {72, 1}, - {71, 0}, {71, 1}, {70, 0}, {70, 1}, {69, 0}, {69, 1}, {68, 0}, {68, 1}, - {67, 0}, {67, 1}, {66, 0}, {66, 1}, {65, 0}, {65, 0}, {65, 1}, {64, 0}, - {64, 1}, {63, 0}, {63, 1}, {62, 0}, {62, 0}, {62, 1}, {61, 0}, {61, 1}, - {60, 0}, {60, 0}, {60, 1}, {59, 0}, {59, 0}, {59, 1}, {58, 0}, {58, 0}, - {58, 1}, {57, 0}, {57, 0}, {57, 1}, {56, 0}, {56, 0}, {56, 1}, {55, 0}, - {55, 0}, {55, 1}, {54, 0}, {54, 0}, {54, 1}, {53, 0}, {53, 0}, {53, 0}, - {53, 1}, {52, 0}, {52, 0}, {52, 1}, {51, 0}, {51, 0}, {51, 0}, {51, 1}, - {50, 0}, {50, 0}, {50, 0}, {50, 1}, {49, 0}, {49, 0}, {49, 0}, {49, 1}, - {48, 0}, {48, 0}, {48, 0}, {48, 1}, {47, 0}, {47, 0}, {47, 0}, {47, 1}, - {46, 0}, {46, 0}, {46, 0}, {46, 0}, {46, 1}, {45, 0}, {45, 0}, {45, 0}, - {45, 1}, {44, 0}, {44, 0}, {44, 0}, {44, 0}, {44, 1}, {43, 0}, {43, 0}, - {43, 0}, {43, 0}, {43, 1}, {42, 0}, {42, 0}, {42, 0}, {42, 0}, {42, 0}, - {42, 1}, {41, 0}, {41, 0}, {41, 0}, {41, 0}, {41, 0}, {41, 1}, {40, 0}, - {40, 0}, {40, 0}, {40, 0}, {40, 1}, {39, 0}, {39, 0}, {39, 0}, {39, 0}, - {39, 0}, {39, 0}, {39, 1}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, -}; - -const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { - {62500, 10417}, {52083, 7441}, {44642, 5580}, {39062, 4340}, {34722, 3472}, {31250, 2841}, {28409, 2368}, {26041, 2003}, - {24038, 1717}, {22321, 1488}, {20833, 1302}, {19531, 1149}, {18382, 1021}, {17361, 914}, {16447, 822}, {15625, 745}, - {14880, 676}, {14204, 618}, {13586, 566}, {13020, 520}, {12500, 481}, {12019, 445}, {11574, 414}, {11160, 385}, - {10775, 359}, {10416, 336}, {10080, 315}, {9765, 296}, {9469, 278}, {9191, 263}, {8928, 248}, {8680, 235}, - {8445, 222}, {8223, 211}, {8012, 200}, {7812, 191}, {7621, 181}, {7440, 173}, {7267, 165}, {7102, 158}, - {6944, 151}, {6793, 145}, {6648, 138}, {6510, 133}, {6377, 127}, {6250, 123}, {6127, 118}, {6009, 113}, - {5896, 109}, {5787, 106}, {5681, 101}, {5580, 98}, {5482, 95}, {5387, 91}, {5296, 88}, {5208, 86}, - {5122, 82}, {5040, 80}, {4960, 78}, {4882, 75}, {4807, 73}, {4734, 70}, {4664, 69}, {4595, 67}, - {4528, 64}, {4464, 63}, {4401, 61}, {4340, 60}, {4280, 58}, {4222, 56}, {4166, 55}, {4111, 53}, - {4058, 52}, {4006, 51}, {3955, 49}, {3906, 48}, {3858, 48}, {3810, 45}, {3765, 45}, {3720, 44}, - {3676, 43}, {3633, 42}, {3591, 40}, {3551, 40}, {3511, 39}, {3472, 38}, {3434, 38}, {3396, 36}, - {3360, 36}, {3324, 35}, {3289, 34}, {3255, 34}, {3221, 33}, {3188, 32}, {3156, 31}, {3125, 31}, - {3094, 31}, {3063, 30}, {3033, 29}, {3004, 28}, {2976, 28}, {2948, 28}, {2920, 27}, {2893, 27}, - {2866, 26}, {2840, 25}, {2815, 25}, {2790, 25}, {2765, 24}, {2741, 24}, {2717, 24}, {2693, 23}, - {2670, 22}, {2648, 22}, {2626, 22}, {2604, 22}, {2582, 21}, {2561, 21}, {2540, 20}, {2520, 20}, - {2500, 20}, {2480, 20}, {2460, 19}, {2441, 19}, {2422, 19}, {2403, 18}, {2385, 18}, {2367, 18}, - {2349, 17}, {2332, 18}, {2314, 17}, {2297, 16}, {2281, 17}, {2264, 16}, {2248, 16}, {2232, 16}, - {2216, 16}, {2200, 15}, {2185, 15}, {2170, 15}, {2155, 15}, {2140, 15}, {2125, 14}, {2111, 14}, - {2097, 14}, {2083, 14}, {2069, 14}, {2055, 13}, {2042, 13}, {2029, 13}, {2016, 13}, {2003, 13}, - {1990, 13}, {1977, 12}, {1965, 12}, {1953, 13}, {1940, 11}, {1929, 12}, {1917, 12}, {1905, 12}, - {1893, 11}, {1882, 11}, {1871, 11}, {1860, 11}, {1849, 11}, {1838, 11}, {1827, 11}, {1816, 10}, - {1806, 11}, {1795, 10}, {1785, 10}, {1775, 10}, {1765, 10}, {1755, 10}, {1745, 9}, {1736, 10}, - {1726, 9}, {1717, 10}, {1707, 9}, {1698, 9}, {1689, 9}, {1680, 9}, {1671, 9}, {1662, 9}, - {1653, 9}, {1644, 8}, {1636, 9}, {1627, 8}, {1619, 9}, {1610, 8}, {1602, 8}, {1594, 8}, - {1586, 8}, {1578, 8}, {1570, 8}, {1562, 8}, {1554, 7}, {1547, 8}, {1539, 8}, {1531, 7}, - {1524, 8}, {1516, 7}, {1509, 7}, {1502, 7}, {1495, 7}, {1488, 7}, {1481, 7}, {1474, 7}, - {1467, 7}, {1460, 7}, {1453, 7}, {1446, 6}, {1440, 7}, {1433, 7}, {1426, 6}, {1420, 6}, - {1414, 7}, {1407, 6}, {1401, 6}, {1395, 7}, {1388, 6}, {1382, 6}, {1376, 6}, {1370, 6}, - {1364, 6}, {1358, 6}, {1352, 6}, {1346, 5}, {1341, 6}, {1335, 6}, {1329, 5}, {1324, 6}, - {1318, 5}, {1313, 6}, {1307, 5}, {1302, 6}, {1296, 5}, {1291, 5}, {1286, 6}, {1280, 5}, - {1275, 5}, {1270, 5}, {1265, 5}, {1260, 5}, {1255, 5}, {1250, 5}, {1245, 5}, {1240, 5}, - {1235, 5}, {1230, 5}, {1225, 5}, {1220, 5}, {1215, 4}, {1211, 5}, {1206, 5}, {1201, 5}, -}; - -#endif - -#endif diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp deleted file mode 100644 index a3e858d..0000000 --- a/Marlin/stepper.cpp +++ /dev/null @@ -1,1260 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * stepper.cpp - A singleton object to execute motion plans using stepper motors - * Marlin Firmware - * - * Derived from Grbl - * Copyright (c) 2009-2011 Simen Svale Skogsrud - * - * Grbl is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Grbl is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Grbl. If not, see . - */ - -/* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith - and Philipp Tiefenbacher. */ - -#include "Marlin.h" -#include "stepper.h" -#include "endstops.h" -#include "planner.h" -#include "temperature.h" -#include "ultralcd.h" -#include "language.h" -#include "cardreader.h" -#include "speed_lookuptable.h" - -#if HAS_DIGIPOTSS - #include -#endif - -Stepper stepper; // Singleton - -// public: - -block_t* Stepper::current_block = NULL; // A pointer to the block currently being traced - -#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - bool Stepper::abort_on_endstop_hit = false; -#endif - -#if ENABLED(Z_DUAL_ENDSTOPS) - bool Stepper::performing_homing = false; -#endif - -// private: - -unsigned char Stepper::last_direction_bits = 0; // The next stepping-bits to be output -unsigned int Stepper::cleaning_buffer_counter = 0; - -#if ENABLED(Z_DUAL_ENDSTOPS) - bool Stepper::locked_z_motor = false; - bool Stepper::locked_z2_motor = false; -#endif - -long Stepper::counter_X = 0, - Stepper::counter_Y = 0, - Stepper::counter_Z = 0, - Stepper::counter_E = 0; - -volatile unsigned long Stepper::step_events_completed = 0; // The number of step events executed in the current block - -#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - - unsigned char Stepper::old_OCR0A; - volatile unsigned char Stepper::eISR_Rate = 200; // Keep the ISR at a low rate until needed - - #if ENABLED(LIN_ADVANCE) - volatile int Stepper::e_steps[E_STEPPERS]; - int Stepper::extruder_advance_k = LIN_ADVANCE_K, - Stepper::final_estep_rate, - Stepper::current_estep_rate[E_STEPPERS], - Stepper::current_adv_steps[E_STEPPERS]; - #else - long Stepper::e_steps[E_STEPPERS], - Stepper::final_advance = 0, - Stepper::old_advance = 0, - Stepper::advance_rate, - Stepper::advance; - #endif -#endif - -long Stepper::acceleration_time, Stepper::deceleration_time; - -volatile long Stepper::count_position[NUM_AXIS] = { 0 }; -volatile signed char Stepper::count_direction[NUM_AXIS] = { 1, 1, 1, 1 }; - -#if ENABLED(MIXING_EXTRUDER) - long Stepper::counter_M[MIXING_STEPPERS]; -#endif - -unsigned short Stepper::acc_step_rate; // needed for deceleration start point -uint8_t Stepper::step_loops, Stepper::step_loops_nominal; -unsigned short Stepper::OCR1A_nominal; - -volatile long Stepper::endstops_trigsteps[3]; - -#if ENABLED(X_DUAL_STEPPER_DRIVERS) - #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) != INVERT_X2_VS_X_DIR); }while(0) - #define X_APPLY_STEP(v,Q) do{ X_STEP_WRITE(v); X2_STEP_WRITE(v); }while(0) -#elif ENABLED(DUAL_X_CARRIAGE) - #define X_APPLY_DIR(v,ALWAYS) \ - if (extruder_duplication_enabled || ALWAYS) { \ - X_DIR_WRITE(v); \ - X2_DIR_WRITE(v); \ - } \ - else { \ - if (current_block->active_extruder) X2_DIR_WRITE(v); else X_DIR_WRITE(v); \ - } - #define X_APPLY_STEP(v,ALWAYS) \ - if (extruder_duplication_enabled || ALWAYS) { \ - X_STEP_WRITE(v); \ - X2_STEP_WRITE(v); \ - } \ - else { \ - if (current_block->active_extruder != 0) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \ - } -#else - #define X_APPLY_DIR(v,Q) X_DIR_WRITE(v) - #define X_APPLY_STEP(v,Q) X_STEP_WRITE(v) -#endif - -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) != INVERT_Y2_VS_Y_DIR); }while(0) - #define Y_APPLY_STEP(v,Q) do{ Y_STEP_WRITE(v); Y2_STEP_WRITE(v); }while(0) -#else - #define Y_APPLY_DIR(v,Q) Y_DIR_WRITE(v) - #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v) -#endif - -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }while(0) - #if ENABLED(Z_DUAL_ENDSTOPS) - #define Z_APPLY_STEP(v,Q) \ - if (performing_homing) { \ - if (Z_HOME_DIR > 0) {\ - if (!(TEST(endstops.old_endstop_bits, Z_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z_motor) Z_STEP_WRITE(v); \ - if (!(TEST(endstops.old_endstop_bits, Z2_MAX) && (count_direction[Z_AXIS] > 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \ - } \ - else { \ - if (!(TEST(endstops.old_endstop_bits, Z_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z_motor) Z_STEP_WRITE(v); \ - if (!(TEST(endstops.old_endstop_bits, Z2_MIN) && (count_direction[Z_AXIS] < 0)) && !locked_z2_motor) Z2_STEP_WRITE(v); \ - } \ - } \ - else { \ - Z_STEP_WRITE(v); \ - Z2_STEP_WRITE(v); \ - } - #else - #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }while(0) - #endif -#else - #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v) - #define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v) -#endif - -#if DISABLED(MIXING_EXTRUDER) - #define E_APPLY_STEP(v,Q) E_STEP_WRITE(v) -#endif - -// intRes = longIn1 * longIn2 >> 24 -// uses: -// r26 to store 0 -// r27 to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result. -// note that the lower two bytes and the upper byte of the 48bit result are not calculated. -// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones. -// B0 A0 are bits 24-39 and are the returned value -// C1 B1 A1 is longIn1 -// D2 C2 B2 A2 is longIn2 -// -#define MultiU24X32toH16(intRes, longIn1, longIn2) \ - asm volatile ( \ - "clr r26 \n\t" \ - "mul %A1, %B2 \n\t" \ - "mov r27, r1 \n\t" \ - "mul %B1, %C2 \n\t" \ - "movw %A0, r0 \n\t" \ - "mul %C1, %C2 \n\t" \ - "add %B0, r0 \n\t" \ - "mul %C1, %B2 \n\t" \ - "add %A0, r0 \n\t" \ - "adc %B0, r1 \n\t" \ - "mul %A1, %C2 \n\t" \ - "add r27, r0 \n\t" \ - "adc %A0, r1 \n\t" \ - "adc %B0, r26 \n\t" \ - "mul %B1, %B2 \n\t" \ - "add r27, r0 \n\t" \ - "adc %A0, r1 \n\t" \ - "adc %B0, r26 \n\t" \ - "mul %C1, %A2 \n\t" \ - "add r27, r0 \n\t" \ - "adc %A0, r1 \n\t" \ - "adc %B0, r26 \n\t" \ - "mul %B1, %A2 \n\t" \ - "add r27, r1 \n\t" \ - "adc %A0, r26 \n\t" \ - "adc %B0, r26 \n\t" \ - "lsr r27 \n\t" \ - "adc %A0, r26 \n\t" \ - "adc %B0, r26 \n\t" \ - "mul %D2, %A1 \n\t" \ - "add %A0, r0 \n\t" \ - "adc %B0, r1 \n\t" \ - "mul %D2, %B1 \n\t" \ - "add %B0, r0 \n\t" \ - "clr r1 \n\t" \ - : \ - "=&r" (intRes) \ - : \ - "d" (longIn1), \ - "d" (longIn2) \ - : \ - "r26" , "r27" \ - ) - -// Some useful constants - -#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A) -#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A) - -/** - * __________________________ - * /| |\ _________________ ^ - * / | | \ /| |\ | - * / | | \ / | | \ s - * / | | | | | \ p - * / | | | | | \ e - * +-----+------------------------+---+--+---------------+----+ e - * | BLOCK 1 | BLOCK 2 | d - * - * time -----> - * - * The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates - * first block->accelerate_until step_events_completed, then keeps going at constant speed until - * step_events_completed reaches block->decelerate_after after which it decelerates until the trapezoid generator is reset. - * The slope of acceleration is calculated using v = u + at where t is the accumulated timer values of the steps so far. - */ -void Stepper::wake_up() { - // TCNT1 = 0; - ENABLE_STEPPER_DRIVER_INTERRUPT(); -} - -/** - * Set the stepper direction of each axis - * - * COREXY: X_AXIS=A_AXIS and Y_AXIS=B_AXIS - * COREXZ: X_AXIS=A_AXIS and Z_AXIS=C_AXIS - * COREYZ: Y_AXIS=B_AXIS and Z_AXIS=C_AXIS - */ -void Stepper::set_directions() { - - #define SET_STEP_DIR(AXIS) \ - if (motor_direction(AXIS ##_AXIS)) { \ - AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR, false); \ - count_direction[AXIS ##_AXIS] = -1; \ - } \ - else { \ - AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR, false); \ - count_direction[AXIS ##_AXIS] = 1; \ - } - - SET_STEP_DIR(X); // A - SET_STEP_DIR(Y); // B - SET_STEP_DIR(Z); // C - - #if DISABLED(ADVANCE) - if (motor_direction(E_AXIS)) { - REV_E_DIR(); - count_direction[E_AXIS] = -1; - } - else { - NORM_E_DIR(); - count_direction[E_AXIS] = 1; - } - #endif //!ADVANCE -} - -// "The Stepper Driver Interrupt" - This timer interrupt is the workhorse. -// It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately. -ISR(TIMER1_COMPA_vect) { Stepper::isr(); } - -void Stepper::isr() { - if (cleaning_buffer_counter) { - current_block = NULL; - planner.discard_current_block(); - #ifdef SD_FINISHED_RELEASECOMMAND - if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); - #endif - cleaning_buffer_counter--; - OCR1A = 200; - return; - } - - // If there is no current block, attempt to pop one from the buffer - if (!current_block) { - // Anything in the buffer? - current_block = planner.get_current_block(); - if (current_block) { - current_block->busy = true; - trapezoid_generator_reset(); - - // Initialize Bresenham counters to 1/2 the ceiling - counter_X = counter_Y = counter_Z = counter_E = -(current_block->step_event_count >> 1); - - #if ENABLED(MIXING_EXTRUDER) - MIXING_STEPPERS_LOOP(i) - counter_M[i] = -(current_block->mix_event_count[i] >> 1); - #endif -#ifdef UARM_SWIFT - set_block_running(true); -#endif // UARM_SWIFT - - step_events_completed = 0; - - #if ENABLED(Z_LATE_ENABLE) - if (current_block->steps[Z_AXIS] > 0) { - enable_z(); - OCR1A = 2000; //1ms wait - return; - } - #endif - - // #if ENABLED(ADVANCE) - // e_steps[TOOL_E_INDEX] = 0; - // #endif - } - else { - OCR1A = 2000; // 1kHz. - #ifdef UARM_SWIFT - set_block_running(false); - #endif // UARM_SWIFT - } - } - - if (current_block) { - -#ifdef UARM_SWIFT - set_block_running(true); -#endif // UARM_SWIFT - - // Update endstops state, if enabled - if (endstops.enabled - #if HAS_BED_PROBE - || endstops.z_probe_enabled - #endif - ) endstops.update(); - - // Take multiple steps per interrupt (For high speed moves) - for (int8_t i = 0; i < step_loops; i++) { - #if !defined(USBCON) && !defined(UARM_SWIFT) - customizedSerial.checkRx(); // Check for serial chars. - #endif - - #if ENABLED(LIN_ADVANCE) - - counter_E += current_block->steps[E_AXIS]; - if (counter_E > 0) { - counter_E -= current_block->step_event_count; - #if DISABLED(MIXING_EXTRUDER) - // Don't step E here for mixing extruder - count_position[E_AXIS] += count_direction[E_AXIS]; - e_steps[TOOL_E_INDEX] += motor_direction(E_AXIS) ? -1 : 1; - #endif - } - - #if ENABLED(MIXING_EXTRUDER) - // Step mixing steppers proportionally - long dir = motor_direction(E_AXIS) ? -1 : 1; - MIXING_STEPPERS_LOOP(j) { - counter_m[j] += current_block->steps[E_AXIS]; - if (counter_m[j] > 0) { - counter_m[j] -= current_block->mix_event_count[j]; - e_steps[j] += dir; - } - } - #endif - - if (current_block->use_advance_lead) { - int delta_adv_steps = (((long)extruder_advance_k * current_estep_rate[TOOL_E_INDEX]) >> 9) - current_adv_steps[TOOL_E_INDEX]; - #if ENABLED(MIXING_EXTRUDER) - // Mixing extruders apply advance lead proportionally - MIXING_STEPPERS_LOOP(j) { - int steps = delta_adv_steps * current_block->step_event_count / current_block->mix_event_count[j]; - e_steps[j] += steps; - current_adv_steps[j] += steps; - } - #else - // For most extruders, advance the single E stepper - e_steps[TOOL_E_INDEX] += delta_adv_steps; - current_adv_steps[TOOL_E_INDEX] += delta_adv_steps; - #endif - } - - #elif ENABLED(ADVANCE) - - // Always count the unified E axis - counter_E += current_block->steps[E_AXIS]; - if (counter_E > 0) { - counter_E -= current_block->step_event_count; - #if DISABLED(MIXING_EXTRUDER) - // Don't step E here for mixing extruder - e_steps[TOOL_E_INDEX] += motor_direction(E_AXIS) ? -1 : 1; - #endif - } - - #if ENABLED(MIXING_EXTRUDER) - - // Step mixing steppers proportionally - long dir = motor_direction(E_AXIS) ? -1 : 1; - MIXING_STEPPERS_LOOP(j) { - counter_m[j] += current_block->steps[E_AXIS]; - if (counter_m[j] > 0) { - counter_m[j] -= current_block->mix_event_count[j]; - e_steps[j] += dir; - } - } - - #endif // MIXING_EXTRUDER - - #endif // ADVANCE or LIN_ADVANCE - - #define _COUNTER(AXIS) counter_## AXIS - #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP - #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN - - #define STEP_ADD(AXIS) \ - _COUNTER(AXIS) += current_block->steps[_AXIS(AXIS)]; \ - if (_COUNTER(AXIS) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); } - - STEP_ADD(X); - STEP_ADD(Y); - STEP_ADD(Z); - - #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE) - #if ENABLED(MIXING_EXTRUDER) - // Keep updating the single E axis - counter_E += current_block->steps[E_AXIS]; - // Tick the counters used for this mix - MIXING_STEPPERS_LOOP(j) { - // Step mixing steppers (proportionally) - counter_M[j] += current_block->steps[E_AXIS]; - // Step when the counter goes over zero - if (counter_M[j] > 0) En_STEP_WRITE(j, !INVERT_E_STEP_PIN); - } - #else // !MIXING_EXTRUDER - STEP_ADD(E); - #endif - #endif // !ADVANCE && !LIN_ADVANCE - - #define STEP_IF_COUNTER(AXIS) \ - if (_COUNTER(AXIS) > 0) { \ - _COUNTER(AXIS) -= current_block->step_event_count; \ - count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \ - _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \ - } - - STEP_IF_COUNTER(X); - STEP_IF_COUNTER(Y); - STEP_IF_COUNTER(Z); - - #if DISABLED(ADVANCE) && DISABLED(LIN_ADVANCE) - #if ENABLED(MIXING_EXTRUDER) - // Always step the single E axis - if (counter_E > 0) { - counter_E -= current_block->step_event_count; - count_position[E_AXIS] += count_direction[E_AXIS]; - } - MIXING_STEPPERS_LOOP(j) { - if (counter_M[j] > 0) { - counter_M[j] -= current_block->mix_event_count[j]; - En_STEP_WRITE(j, INVERT_E_STEP_PIN); - } - } - #else // !MIXING_EXTRUDER - STEP_IF_COUNTER(E); - #endif - #endif // !ADVANCE && !LIN_ADVANCE - - step_events_completed++; - if (step_events_completed >= current_block->step_event_count) break; - } - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - // If we have esteps to execute, fire the next ISR "now" - if (e_steps[TOOL_E_INDEX]) OCR0A = TCNT0 + 2; - #endif - - // Calculate new timer value - unsigned short timer, step_rate; - if (step_events_completed <= (unsigned long)current_block->accelerate_until) { - - MultiU24X32toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate); - acc_step_rate += current_block->initial_rate; - - // upper limit - NOMORE(acc_step_rate, current_block->nominal_rate); - - // step_rate to timer interval - timer = calc_timer(acc_step_rate); - OCR1A = timer; - acceleration_time += timer; - - #if ENABLED(LIN_ADVANCE) - - if (current_block->use_advance_lead) - current_estep_rate[TOOL_E_INDEX] = ((unsigned long)acc_step_rate * current_block->e_speed_multiplier8) >> 8; - - if (current_block->use_advance_lead) { - #if ENABLED(MIXING_EXTRUDER) - MIXING_STEPPERS_LOOP(j) - current_estep_rate[j] = ((unsigned long)acc_step_rate * current_block->e_speed_multiplier8 * current_block->step_event_count / current_block->mix_event_count[j]) >> 8; - #else - current_estep_rate[TOOL_E_INDEX] = ((unsigned long)acc_step_rate * current_block->e_speed_multiplier8) >> 8; - #endif - } - - #elif ENABLED(ADVANCE) - - advance += advance_rate * step_loops; - //NOLESS(advance, current_block->advance); - - long advance_whole = advance >> 8, - advance_factor = advance_whole - old_advance; - - // Do E steps + advance steps - #if ENABLED(MIXING_EXTRUDER) - // ...for mixing steppers proportionally - MIXING_STEPPERS_LOOP(j) - e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j]; - #else - // ...for the active extruder - e_steps[TOOL_E_INDEX] += advance_factor; - #endif - - old_advance = advance_whole; - - #endif // ADVANCE or LIN_ADVANCE - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - eISR_Rate = (timer >> 2) * step_loops / abs(e_steps[TOOL_E_INDEX]); - #endif - } - else if (step_events_completed > (unsigned long)current_block->decelerate_after) { - MultiU24X32toH16(step_rate, deceleration_time, current_block->acceleration_rate); - - if (step_rate <= acc_step_rate) { // Still decelerating? - step_rate = acc_step_rate - step_rate; - NOLESS(step_rate, current_block->final_rate); - } - else - step_rate = current_block->final_rate; - - // step_rate to timer interval - timer = calc_timer(step_rate); - OCR1A = timer; - deceleration_time += timer; - - #if ENABLED(LIN_ADVANCE) - - if (current_block->use_advance_lead) { - #if ENABLED(MIXING_EXTRUDER) - MIXING_STEPPERS_LOOP(j) - current_estep_rate[j] = ((unsigned long)step_rate * current_block->e_speed_multiplier8 * current_block->step_event_count / current_block->mix_event_count[j]) >> 8; - #else - current_estep_rate[TOOL_E_INDEX] = ((unsigned long)step_rate * current_block->e_speed_multiplier8) >> 8; - #endif - } - - #elif ENABLED(ADVANCE) - - advance -= advance_rate * step_loops; - NOLESS(advance, final_advance); - - // Do E steps + advance steps - long advance_whole = advance >> 8, - advance_factor = advance_whole - old_advance; - - #if ENABLED(MIXING_EXTRUDER) - MIXING_STEPPERS_LOOP(j) - e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j]; - #else - e_steps[TOOL_E_INDEX] += advance_factor; - #endif - - old_advance = advance_whole; - - #endif // ADVANCE or LIN_ADVANCE - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - eISR_Rate = (timer >> 2) * step_loops / abs(e_steps[TOOL_E_INDEX]); - #endif - } - else { - - #if ENABLED(LIN_ADVANCE) - - if (current_block->use_advance_lead) - current_estep_rate[TOOL_E_INDEX] = final_estep_rate; - - eISR_Rate = (OCR1A_nominal >> 2) * step_loops_nominal / abs(e_steps[TOOL_E_INDEX]); - - #endif - - OCR1A = OCR1A_nominal; - // ensure we're running at the correct step rate, even if we just came off an acceleration - step_loops = step_loops_nominal; - } - - OCR1A = (OCR1A < (TCNT1 + 16)) ? (TCNT1 + 16) : OCR1A; - - // If current block is finished, reset pointer - if (step_events_completed >= current_block->step_event_count) { - current_block = NULL; - planner.discard_current_block(); - } - } -} - -#if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - - // Timer interrupt for E. e_steps is set in the main routine; - // Timer 0 is shared with millies - ISR(TIMER0_COMPA_vect) { Stepper::advance_isr(); } - - void Stepper::advance_isr() { - - old_OCR0A += eISR_Rate; - OCR0A = old_OCR0A; - - #define STEP_E_ONCE(INDEX) \ - if (e_steps[INDEX] != 0) { \ - E## INDEX ##_STEP_WRITE(INVERT_E_STEP_PIN); \ - if (e_steps[INDEX] < 0) { \ - E## INDEX ##_DIR_WRITE(INVERT_E## INDEX ##_DIR); \ - e_steps[INDEX]++; \ - } \ - else { \ - E## INDEX ##_DIR_WRITE(!INVERT_E## INDEX ##_DIR); \ - e_steps[INDEX]--; \ - } \ - E## INDEX ##_STEP_WRITE(!INVERT_E_STEP_PIN); \ - } - - // Step all E steppers that have steps - for (uint8_t i = 0; i < step_loops; i++) { - STEP_E_ONCE(0); - #if E_STEPPERS > 1 - STEP_E_ONCE(1); - #if E_STEPPERS > 2 - STEP_E_ONCE(2); - #if E_STEPPERS > 3 - STEP_E_ONCE(3); - #endif - #endif - #endif - } - - } - -#endif // ADVANCE or LIN_ADVANCE - -void Stepper::init() { - - digipot_init(); //Initialize Digipot Motor Current - microstep_init(); //Initialize Microstepping Pins - - // initialise TMC Steppers - #if ENABLED(HAVE_TMCDRIVER) - tmc_init(); - #endif - // initialise L6470 Steppers - #if ENABLED(HAVE_L6470DRIVER) - L6470_init(); - #endif - - // Initialize Dir Pins - #if HAS_X_DIR - X_DIR_INIT; - #endif - #if HAS_X2_DIR - X2_DIR_INIT; - #endif - #if HAS_Y_DIR - Y_DIR_INIT; - #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_DIR - Y2_DIR_INIT; - #endif - #endif - #if HAS_Z_DIR - Z_DIR_INIT; - #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_DIR - Z2_DIR_INIT; - #endif - #endif - #if HAS_E0_DIR - E0_DIR_INIT; - #endif - #if HAS_E1_DIR - E1_DIR_INIT; - #endif - #if HAS_E2_DIR - E2_DIR_INIT; - #endif - #if HAS_E3_DIR - E3_DIR_INIT; - #endif - - //Initialize Enable Pins - steppers default to disabled. - - #if HAS_X_ENABLE - X_ENABLE_INIT; - if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH); - #if ENABLED(DUAL_X_CARRIAGE) && HAS_X2_ENABLE - X2_ENABLE_INIT; - if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH); - #endif - #endif - - #if HAS_Y_ENABLE - Y_ENABLE_INIT; - if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH); - #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE - Y2_ENABLE_INIT; - if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH); - #endif - #endif - - #if HAS_Z_ENABLE - Z_ENABLE_INIT; - if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH); - #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_ENABLE - Z2_ENABLE_INIT; - if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH); - #endif - #endif - - #if HAS_E0_ENABLE - E0_ENABLE_INIT; - if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH); - #endif - #if HAS_E1_ENABLE - E1_ENABLE_INIT; - if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH); - #endif - #if HAS_E2_ENABLE - E2_ENABLE_INIT; - if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH); - #endif - #if HAS_E3_ENABLE - E3_ENABLE_INIT; - if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH); - #endif - - // - // Init endstops and pullups here - // - endstops.init(); - - #define _STEP_INIT(AXIS) AXIS ##_STEP_INIT - #define _WRITE_STEP(AXIS, HIGHLOW) AXIS ##_STEP_WRITE(HIGHLOW) - #define _DISABLE(axis) disable_## axis() - - #define AXIS_INIT(axis, AXIS, PIN) \ - _STEP_INIT(AXIS); \ - _WRITE_STEP(AXIS, _INVERT_STEP_PIN(PIN)); \ - _DISABLE(axis) - - #define E_AXIS_INIT(NUM) AXIS_INIT(e## NUM, E## NUM, E) - - // Initialize Step Pins - #if HAS_X_STEP - #if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE) - X2_STEP_INIT; - X2_STEP_WRITE(INVERT_X_STEP_PIN); - #endif - AXIS_INIT(x, X, X); - #endif - - #if HAS_Y_STEP - #if ENABLED(Y_DUAL_STEPPER_DRIVERS) - Y2_STEP_INIT; - Y2_STEP_WRITE(INVERT_Y_STEP_PIN); - #endif - AXIS_INIT(y, Y, Y); - #endif - - #if HAS_Z_STEP - #if ENABLED(Z_DUAL_STEPPER_DRIVERS) - Z2_STEP_INIT; - Z2_STEP_WRITE(INVERT_Z_STEP_PIN); - #endif - AXIS_INIT(z, Z, Z); - #endif - - #if HAS_E0_STEP - E_AXIS_INIT(0); - #endif - #if HAS_E1_STEP - E_AXIS_INIT(1); - #endif - #if HAS_E2_STEP - E_AXIS_INIT(2); - #endif - #if HAS_E3_STEP - E_AXIS_INIT(3); - #endif - - // waveform generation = 0100 = CTC - CBI(TCCR1B, WGM13); - SBI(TCCR1B, WGM12); - CBI(TCCR1A, WGM11); - CBI(TCCR1A, WGM10); - - // output mode = 00 (disconnected) - TCCR1A &= ~(3 << COM1A0); - TCCR1A &= ~(3 << COM1B0); - // Set the timer pre-scaler - // Generally we use a divider of 8, resulting in a 2MHz timer - // frequency on a 16MHz MCU. If you are going to change this, be - // sure to regenerate speed_lookuptable.h with - // create_speed_lookuptable.py - TCCR1B = (TCCR1B & ~(0x07 << CS10)) | (2 << CS10); - - OCR1A = 0x4000; - TCNT1 = 0; - ENABLE_STEPPER_DRIVER_INTERRUPT(); - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - - for (int i = 0; i < E_STEPPERS; i++) { - e_steps[i] = 0; - #if ENABLED(LIN_ADVANCE) - current_adv_steps[i] = 0; - #endif - } - - #if defined(TCCR0A) && defined(WGM01) - CBI(TCCR0A, WGM01); - CBI(TCCR0A, WGM00); - #endif - SBI(TIMSK0, OCIE0A); - - #endif // ADVANCE or LIN_ADVANCE - - endstops.enable(true); // Start with endstops active. After homing they can be disabled - sei(); - - set_directions(); // Init directions to last_direction_bits = 0 -} - - -/** - * Block until all buffered steps are executed - */ -void Stepper::synchronize() { while (planner.blocks_queued()) idle(); } - -/** - * Set the stepper positions directly in steps - * - * The input is based on the typical per-axis XYZ steps. - * For CORE machines XYZ needs to be translated to ABC. - * - * This allows get_axis_position_mm to correctly - * derive the current XYZ position later on. - */ -void Stepper::set_position(const long& x, const long& y, const long& z, const long& e) { - CRITICAL_SECTION_START; - - #if ENABLED(COREXY) - // corexy positioning - // these equations follow the form of the dA and dB equations on http://www.corexy.com/theory.html - count_position[A_AXIS] = x + y; - count_position[B_AXIS] = x - y; - count_position[Z_AXIS] = z; - #elif ENABLED(COREXZ) - // corexz planning - count_position[A_AXIS] = x + z; - count_position[Y_AXIS] = y; - count_position[C_AXIS] = x - z; - #elif ENABLED(COREYZ) - // coreyz planning - count_position[X_AXIS] = x; - count_position[B_AXIS] = y + z; - count_position[C_AXIS] = y - z; - #else - // default non-h-bot planning - count_position[X_AXIS] = x; - count_position[Y_AXIS] = y; - count_position[Z_AXIS] = z; - #endif - - count_position[E_AXIS] = e; - CRITICAL_SECTION_END; -} - -void Stepper::set_e_position(const long& e) { - CRITICAL_SECTION_START; - count_position[E_AXIS] = e; - CRITICAL_SECTION_END; -} - -/** - * Get a stepper's position in steps. - */ -long Stepper::position(AxisEnum axis) { - CRITICAL_SECTION_START; - long count_pos = count_position[axis]; - CRITICAL_SECTION_END; - return count_pos; -} - -/** - * Get an axis position according to stepper position(s) - * For CORE machines apply translation from ABC to XYZ. - */ -float Stepper::get_axis_position_mm(AxisEnum axis) { - float axis_steps; - #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) - // Requesting one of the "core" axes? - if (axis == CORE_AXIS_1 || axis == CORE_AXIS_2) { - CRITICAL_SECTION_START; - long pos1 = count_position[CORE_AXIS_1], - pos2 = count_position[CORE_AXIS_2]; - CRITICAL_SECTION_END; - // ((a1+a2)+(a1-a2))/2 -> (a1+a2+a1-a2)/2 -> (a1+a1)/2 -> a1 - // ((a1+a2)-(a1-a2))/2 -> (a1+a2-a1+a2)/2 -> (a2+a2)/2 -> a2 - axis_steps = (pos1 + ((axis == CORE_AXIS_1) ? pos2 : -pos2)) * 0.5f; - } - else - axis_steps = position(axis); - #else - axis_steps = position(axis); - #endif - return axis_steps * planner.steps_to_mm[axis]; -} - -void Stepper::finish_and_disable() { - synchronize(); - disable_all_steppers(); -} - -void Stepper::quick_stop() { - cleaning_buffer_counter = 5000; - DISABLE_STEPPER_DRIVER_INTERRUPT(); - while (planner.blocks_queued()) planner.discard_current_block(); - current_block = NULL; - ENABLE_STEPPER_DRIVER_INTERRUPT(); -} - -void Stepper::endstop_triggered(AxisEnum axis) { - - #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) - - float axis_pos = count_position[axis]; - if (axis == CORE_AXIS_1) - axis_pos = (axis_pos + count_position[CORE_AXIS_2]) * 0.5; - else if (axis == CORE_AXIS_2) - axis_pos = (count_position[CORE_AXIS_1] - axis_pos) * 0.5; - endstops_trigsteps[axis] = axis_pos; - - #else // !COREXY && !COREXZ && !COREYZ - - endstops_trigsteps[axis] = count_position[axis]; - - #endif // !COREXY && !COREXZ && !COREYZ - - kill_current_block(); -} - -void Stepper::report_positions() { - CRITICAL_SECTION_START; - long xpos = count_position[X_AXIS], - ypos = count_position[Y_AXIS], - zpos = count_position[Z_AXIS]; - CRITICAL_SECTION_END; - - #if ENABLED(COREXY) || ENABLED(COREXZ) - SERIAL_PROTOCOLPGM(MSG_COUNT_A); - #else - SERIAL_PROTOCOLPGM(MSG_COUNT_X); - #endif - SERIAL_PROTOCOL(xpos); - - #if ENABLED(COREXY) || ENABLED(COREYZ) - SERIAL_PROTOCOLPGM(" B:"); - #else - SERIAL_PROTOCOLPGM(" Y:"); - #endif - SERIAL_PROTOCOL(ypos); - - #if ENABLED(COREXZ) || ENABLED(COREYZ) - SERIAL_PROTOCOLPGM(" C:"); - #else - SERIAL_PROTOCOLPGM(" Z:"); - #endif - SERIAL_PROTOCOL(zpos); - - SERIAL_EOL; -} - -#if ENABLED(BABYSTEPPING) - - // MUST ONLY BE CALLED BY AN ISR, - // No other ISR should ever interrupt this! - void Stepper::babystep(const uint8_t axis, const bool direction) { - - #define _ENABLE(axis) enable_## axis() - #define _READ_DIR(AXIS) AXIS ##_DIR_READ - #define _INVERT_DIR(AXIS) INVERT_## AXIS ##_DIR - #define _APPLY_DIR(AXIS, INVERT) AXIS ##_APPLY_DIR(INVERT, true) - - #define BABYSTEP_AXIS(axis, AXIS, INVERT) { \ - _ENABLE(axis); \ - uint8_t old_pin = _READ_DIR(AXIS); \ - _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^direction^INVERT); \ - _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \ - delayMicroseconds(2); \ - _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS), true); \ - _APPLY_DIR(AXIS, old_pin); \ - } - - switch (axis) { - - case X_AXIS: - BABYSTEP_AXIS(x, X, false); - break; - - case Y_AXIS: - BABYSTEP_AXIS(y, Y, false); - break; - - case Z_AXIS: { - - #if DISABLED(DELTA) - - BABYSTEP_AXIS(z, Z, BABYSTEP_INVERT_Z); - - #else // DELTA - - bool z_direction = direction ^ BABYSTEP_INVERT_Z; - - enable_x(); - enable_y(); - enable_z(); - uint8_t old_x_dir_pin = X_DIR_READ, - old_y_dir_pin = Y_DIR_READ, - old_z_dir_pin = Z_DIR_READ; - //setup new step - X_DIR_WRITE(INVERT_X_DIR ^ z_direction); - Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); - Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction); - //perform step - X_STEP_WRITE(!INVERT_X_STEP_PIN); - Y_STEP_WRITE(!INVERT_Y_STEP_PIN); - Z_STEP_WRITE(!INVERT_Z_STEP_PIN); - delayMicroseconds(2); - X_STEP_WRITE(INVERT_X_STEP_PIN); - Y_STEP_WRITE(INVERT_Y_STEP_PIN); - Z_STEP_WRITE(INVERT_Z_STEP_PIN); - //get old pin state back. - X_DIR_WRITE(old_x_dir_pin); - Y_DIR_WRITE(old_y_dir_pin); - Z_DIR_WRITE(old_z_dir_pin); - - #endif - - } break; - - default: break; - } - } - -#endif //BABYSTEPPING - -/** - * Software-controlled Stepper Motor Current - */ - -#if HAS_DIGIPOTSS - - // From Arduino DigitalPotControl example - void Stepper::digitalPotWrite(int address, int value) { - digitalWrite(DIGIPOTSS_PIN, LOW); // take the SS pin low to select the chip - SPI.transfer(address); // send in the address and value via SPI: - SPI.transfer(value); - digitalWrite(DIGIPOTSS_PIN, HIGH); // take the SS pin high to de-select the chip: - //delay(10); - } - -#endif //HAS_DIGIPOTSS - -void Stepper::digipot_init() { - #if HAS_DIGIPOTSS - const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT; - - SPI.begin(); - pinMode(DIGIPOTSS_PIN, OUTPUT); - for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++) { - //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]); - digipot_current(i, digipot_motor_current[i]); - } - #endif - #if HAS_MOTOR_CURRENT_PWM - #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) - pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT); - digipot_current(0, motor_current_setting[0]); - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) - pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT); - digipot_current(1, motor_current_setting[1]); - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) - pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT); - digipot_current(2, motor_current_setting[2]); - #endif - //Set timer5 to 31khz so the PWM of the motor power is as constant as possible. (removes a buzzing noise) - TCCR5B = (TCCR5B & ~(_BV(CS50) | _BV(CS51) | _BV(CS52))) | _BV(CS50); - #endif -} - -void Stepper::digipot_current(uint8_t driver, int current) { - #if HAS_DIGIPOTSS - const uint8_t digipot_ch[] = DIGIPOT_CHANNELS; - digitalPotWrite(digipot_ch[driver], current); - #elif HAS_MOTOR_CURRENT_PWM - #define _WRITE_CURRENT_PWM(P) analogWrite(P, 255L * current / (MOTOR_CURRENT_PWM_RANGE)) - switch (driver) { - #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) - case 0: _WRITE_CURRENT_PWM(MOTOR_CURRENT_PWM_XY_PIN); break; - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) - case 1: _WRITE_CURRENT_PWM(MOTOR_CURRENT_PWM_Z_PIN); break; - #endif - #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) - case 2: _WRITE_CURRENT_PWM(MOTOR_CURRENT_PWM_E_PIN); break; - #endif - } - #else - UNUSED(driver); - UNUSED(current); - #endif -} - -void Stepper::microstep_init() { - #if HAS_MICROSTEPS_E1 - pinMode(E1_MS1_PIN, OUTPUT); - pinMode(E1_MS2_PIN, OUTPUT); - #endif - - #if HAS_MICROSTEPS - pinMode(X_MS1_PIN, OUTPUT); - pinMode(X_MS2_PIN, OUTPUT); - pinMode(Y_MS1_PIN, OUTPUT); - pinMode(Y_MS2_PIN, OUTPUT); - pinMode(Z_MS1_PIN, OUTPUT); - pinMode(Z_MS2_PIN, OUTPUT); - pinMode(E0_MS1_PIN, OUTPUT); - pinMode(E0_MS2_PIN, OUTPUT); - const uint8_t microstep_modes[] = MICROSTEP_MODES; - for (uint16_t i = 0; i < COUNT(microstep_modes); i++) - microstep_mode(i, microstep_modes[i]); - #endif -} - -/** - * Software-controlled Microstepping - */ - -void Stepper::microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) { - if (ms1 >= 0) switch (driver) { - case 0: digitalWrite(X_MS1_PIN, ms1); break; - case 1: digitalWrite(Y_MS1_PIN, ms1); break; - case 2: digitalWrite(Z_MS1_PIN, ms1); break; - case 3: digitalWrite(E0_MS1_PIN, ms1); break; - #if HAS_MICROSTEPS_E1 - case 4: digitalWrite(E1_MS1_PIN, ms1); break; - #endif - } - if (ms2 >= 0) switch (driver) { - case 0: digitalWrite(X_MS2_PIN, ms2); break; - case 1: digitalWrite(Y_MS2_PIN, ms2); break; - case 2: digitalWrite(Z_MS2_PIN, ms2); break; - case 3: digitalWrite(E0_MS2_PIN, ms2); break; - #if PIN_EXISTS(E1_MS2) - case 4: digitalWrite(E1_MS2_PIN, ms2); break; - #endif - } -} - -void Stepper::microstep_mode(uint8_t driver, uint8_t stepping_mode) { - switch (stepping_mode) { - case 1: microstep_ms(driver, MICROSTEP1); break; - case 2: microstep_ms(driver, MICROSTEP2); break; - case 4: microstep_ms(driver, MICROSTEP4); break; - case 8: microstep_ms(driver, MICROSTEP8); break; - case 16: microstep_ms(driver, MICROSTEP16); break; - } -} - -void Stepper::microstep_readings() { - SERIAL_PROTOCOLLNPGM("MS1,MS2 Pins"); - SERIAL_PROTOCOLPGM("X: "); - SERIAL_PROTOCOL(digitalRead(X_MS1_PIN)); - SERIAL_PROTOCOLLN(digitalRead(X_MS2_PIN)); - SERIAL_PROTOCOLPGM("Y: "); - SERIAL_PROTOCOL(digitalRead(Y_MS1_PIN)); - SERIAL_PROTOCOLLN(digitalRead(Y_MS2_PIN)); - SERIAL_PROTOCOLPGM("Z: "); - SERIAL_PROTOCOL(digitalRead(Z_MS1_PIN)); - SERIAL_PROTOCOLLN(digitalRead(Z_MS2_PIN)); - SERIAL_PROTOCOLPGM("E0: "); - SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN)); - SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN)); - #if HAS_MICROSTEPS_E1 - SERIAL_PROTOCOLPGM("E1: "); - SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN)); - SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN)); - #endif -} - -#if ENABLED(LIN_ADVANCE) - - void Stepper::advance_M905(const float &k) { - if (k >= 0) extruder_advance_k = k; - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("Advance factor: ", extruder_advance_k); - SERIAL_EOL; - } - -#endif // LIN_ADVANCE diff --git a/Marlin/stepper.h b/Marlin/stepper.h deleted file mode 100644 index 1dd1531..0000000 --- a/Marlin/stepper.h +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * stepper.h - stepper motor driver: executes motion plans of planner.c using the stepper motors - * Derived from Grbl - * - * Copyright (c) 2009-2011 Simen Svale Skogsrud - * - * Grbl is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Grbl is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Grbl. If not, see . - */ - -#ifndef STEPPER_H -#define STEPPER_H - -#include "planner.h" -#include "speed_lookuptable.h" -#include "stepper_indirection.h" -#include "language.h" -#include "types.h" - -class Stepper; -extern Stepper stepper; - -// intRes = intIn1 * intIn2 >> 16 -// uses: -// r26 to store 0 -// r27 to store the byte 1 of the 24 bit result -#define MultiU16X8toH16(intRes, charIn1, intIn2) \ - asm volatile ( \ - "clr r26 \n\t" \ - "mul %A1, %B2 \n\t" \ - "movw %A0, r0 \n\t" \ - "mul %A1, %A2 \n\t" \ - "add %A0, r1 \n\t" \ - "adc %B0, r26 \n\t" \ - "lsr r0 \n\t" \ - "adc %A0, r26 \n\t" \ - "adc %B0, r26 \n\t" \ - "clr r1 \n\t" \ - : \ - "=&r" (intRes) \ - : \ - "d" (charIn1), \ - "d" (intIn2) \ - : \ - "r26" \ - ) - -class Stepper { - - public: - - static block_t* current_block; // A pointer to the block currently being traced - - #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - static bool abort_on_endstop_hit; - #endif - - #if ENABLED(Z_DUAL_ENDSTOPS) - static bool performing_homing; - #endif - - private: - - static unsigned char last_direction_bits; // The next stepping-bits to be output - static unsigned int cleaning_buffer_counter; - - #if ENABLED(Z_DUAL_ENDSTOPS) - static bool locked_z_motor, locked_z2_motor; - #endif - - // Counter variables for the Bresenham line tracer - static long counter_X, counter_Y, counter_Z, counter_E; - static volatile unsigned long step_events_completed; // The number of step events executed in the current block - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - static unsigned char old_OCR0A; - static volatile unsigned char eISR_Rate; - #if ENABLED(LIN_ADVANCE) - static volatile int e_steps[E_STEPPERS]; - static int extruder_advance_k; - static int final_estep_rate; - static int current_estep_rate[E_STEPPERS]; // Actual extruder speed [steps/s] - static int current_adv_steps[E_STEPPERS]; // The amount of current added esteps due to advance. - // i.e., the current amount of pressure applied - // to the spring (=filament). - #else - static long e_steps[E_STEPPERS]; - static long advance_rate, advance, final_advance; - static long old_advance; - #endif - #endif // ADVANCE or LIN_ADVANCE - - static long acceleration_time, deceleration_time; - //unsigned long accelerate_until, decelerate_after, acceleration_rate, initial_rate, final_rate, nominal_rate; - static unsigned short acc_step_rate; // needed for deceleration start point - static uint8_t step_loops, step_loops_nominal; - static unsigned short OCR1A_nominal; - - static volatile long endstops_trigsteps[3]; - static volatile long endstops_stepsTotal, endstops_stepsDone; - - #if HAS_MOTOR_CURRENT_PWM - #ifndef PWM_MOTOR_CURRENT - #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT - #endif - static constexpr int motor_current_setting[3] = PWM_MOTOR_CURRENT; - #endif - - // - // Positions of stepper motors, in step units - // - static volatile long count_position[NUM_AXIS]; - - // - // Current direction of stepper motors (+1 or -1) - // - static volatile signed char count_direction[NUM_AXIS]; - - // - // Mixing extruder mix counters - // - #if ENABLED(MIXING_EXTRUDER) - static long counter_M[MIXING_STEPPERS]; - #define MIXING_STEPPERS_LOOP(VAR) \ - for (uint8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++) \ - if (current_block->mix_event_count[VAR]) - #endif - - public: - - // - // Constructor / initializer - // - Stepper() { }; - - // - // Initialize stepper hardware - // - static void init(); - - // - // Interrupt Service Routines - // - - static void isr(); - - #if ENABLED(ADVANCE) || ENABLED(LIN_ADVANCE) - static void advance_isr(); - #endif - - // - // Block until all buffered steps are executed - // - static void synchronize(); - - // - // Set the current position in steps - // - static void set_position(const long& x, const long& y, const long& z, const long& e); - static void set_e_position(const long& e); - - // - // Set direction bits for all steppers - // - static void set_directions(); - - // - // Get the position of a stepper, in steps - // - static long position(AxisEnum axis); - - // - // Report the positions of the steppers, in steps - // - static void report_positions(); - - // - // Get the position (mm) of an axis based on stepper position(s) - // - static float get_axis_position_mm(AxisEnum axis); - - // - // The stepper subsystem goes to sleep when it runs out of things to execute. Call this - // to notify the subsystem that it is time to go to work. - // - static void wake_up(); - - // - // Wait for moves to finish and disable all steppers - // - static void finish_and_disable(); - - // - // Quickly stop all steppers and clear the blocks queue - // - static void quick_stop(); - - // - // The direction of a single motor - // - static FORCE_INLINE bool motor_direction(AxisEnum axis) { return TEST(last_direction_bits, axis); } - - #if HAS_DIGIPOTSS - static void digitalPotWrite(int address, int value); - #endif - static void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2); - static void digipot_current(uint8_t driver, int current); - static void microstep_mode(uint8_t driver, uint8_t stepping); - static void microstep_readings(); - - #if ENABLED(Z_DUAL_ENDSTOPS) - static FORCE_INLINE void set_homing_flag(bool state) { performing_homing = state; } - static FORCE_INLINE void set_z_lock(bool state) { locked_z_motor = state; } - static FORCE_INLINE void set_z2_lock(bool state) { locked_z2_motor = state; } - #endif - - #if ENABLED(BABYSTEPPING) - static void babystep(const uint8_t axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention - #endif - - static inline void kill_current_block() { - step_events_completed = current_block->step_event_count; - } - - // - // Handle a triggered endstop - // - static void endstop_triggered(AxisEnum axis); - - // - // Triggered position of an axis in mm (not core-savvy) - // - static FORCE_INLINE float triggered_position_mm(AxisEnum axis) { - return endstops_trigsteps[axis] * planner.steps_to_mm[axis]; - } - - #if ENABLED(LIN_ADVANCE) - void advance_M905(const float &k); - FORCE_INLINE int get_advance_k() { return extruder_advance_k; } - #endif - - private: - - static FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { - unsigned short timer; - - NOMORE(step_rate, MAX_STEP_FREQUENCY); - - if (step_rate > 20000) { // If steprate > 20kHz >> step 4 times - step_rate >>= 2; - step_loops = 4; - } - else if (step_rate > 10000) { // If steprate > 10kHz >> step 2 times - step_rate >>= 1; - step_loops = 2; - } - else { - step_loops = 1; - } - - NOLESS(step_rate, F_CPU / 500000); - step_rate -= F_CPU / 500000; // Correct for minimal speed - if (step_rate >= (8 * 256)) { // higher step rate - unsigned short table_address = (unsigned short)&speed_lookuptable_fast[(unsigned char)(step_rate >> 8)][0]; - unsigned char tmp_step_rate = (step_rate & 0x00ff); - unsigned short gain = (unsigned short)pgm_read_word_near(table_address + 2); - MultiU16X8toH16(timer, tmp_step_rate, gain); - timer = (unsigned short)pgm_read_word_near(table_address) - timer; - } - else { // lower step rates - unsigned short table_address = (unsigned short)&speed_lookuptable_slow[0][0]; - table_address += ((step_rate) >> 1) & 0xfffc; - timer = (unsigned short)pgm_read_word_near(table_address); - timer -= (((unsigned short)pgm_read_word_near(table_address + 2) * (unsigned char)(step_rate & 0x0007)) >> 3); - } - if (timer < 100) { // (20kHz - this should never happen) - timer = 100; - MYSERIAL.print(MSG_STEPPER_TOO_HIGH); - MYSERIAL.println(step_rate); - } - return timer; - } - - // Initializes the trapezoid generator from the current block. Called whenever a new - // block begins. - static FORCE_INLINE void trapezoid_generator_reset() { - - static int8_t last_extruder = -1; - - if (current_block->direction_bits != last_direction_bits || current_block->active_extruder != last_extruder) { - last_direction_bits = current_block->direction_bits; - last_extruder = current_block->active_extruder; - set_directions(); - } - - #if ENABLED(ADVANCE) - - advance = current_block->initial_advance; - final_advance = current_block->final_advance; - - // Do E steps + advance steps - #if ENABLED(MIXING_EXTRUDER) - long advance_factor = (advance >> 8) - old_advance; - // ...for mixing steppers proportionally - MIXING_STEPPERS_LOOP(j) - e_steps[j] += advance_factor * current_block->step_event_count / current_block->mix_event_count[j]; - #else - // ...for the active extruder - e_steps[TOOL_E_INDEX] += ((advance >> 8) - old_advance); - #endif - - old_advance = advance >> 8; - - #endif - - deceleration_time = 0; - // step_rate to timer interval - OCR1A_nominal = calc_timer(current_block->nominal_rate); - // make a note of the number of step loops required at nominal speed - step_loops_nominal = step_loops; - acc_step_rate = current_block->initial_rate; - acceleration_time = calc_timer(acc_step_rate); - OCR1A = acceleration_time; - - #if ENABLED(LIN_ADVANCE) - if (current_block->use_advance_lead) { - current_estep_rate[current_block->active_extruder] = ((unsigned long)acc_step_rate * current_block->e_speed_multiplier8) >> 8; - final_estep_rate = (current_block->nominal_rate * current_block->e_speed_multiplier8) >> 8; - } - #endif - - // SERIAL_ECHO_START; - // SERIAL_ECHOPGM("advance :"); - // SERIAL_ECHO(current_block->advance/256.0); - // SERIAL_ECHOPGM("advance rate :"); - // SERIAL_ECHO(current_block->advance_rate/256.0); - // SERIAL_ECHOPGM("initial advance :"); - // SERIAL_ECHO(current_block->initial_advance/256.0); - // SERIAL_ECHOPGM("final advance :"); - // SERIAL_ECHOLN(current_block->final_advance/256.0); - } - - static void digipot_init(); - static void microstep_init(); - -}; - -#endif // STEPPER_H \ No newline at end of file diff --git a/Marlin/stepper_dac.cpp b/Marlin/stepper_dac.cpp deleted file mode 100644 index 6c71b89..0000000 --- a/Marlin/stepper_dac.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - stepper_dac.cpp - To set stepper current via DAC - - Part of Marlin - - Copyright (c) 2016 MarlinFirmware - - Marlin is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Marlin is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Marlin. If not, see . -*/ - -#include "Marlin.h" - -#if ENABLED(DAC_STEPPER_CURRENT) - - #include "stepper_dac.h" - - bool dac_present = false; - const uint8_t dac_order[NUM_AXIS] = DAC_STEPPER_ORDER; - - int dac_init() { - #if PIN_EXISTS(DAC_DISABLE) - pinMode(DAC_DISABLE_PIN, OUTPUT); - digitalWrite(DAC_DISABLE_PIN, LOW); // set pin low to enable DAC - #endif - - mcp4728_init(); - - if (mcp4728_simpleCommand(RESET)) return -1; - - dac_present = true; - - mcp4728_setVref_all(DAC_STEPPER_VREF); - mcp4728_setGain_all(DAC_STEPPER_GAIN); - - return 0; - } - - void dac_current_percent(uint8_t channel, float val) { - if (!dac_present) return; - - NOMORE(val, 100); - - mcp4728_analogWrite(dac_order[channel], val * DAC_STEPPER_MAX / 100); - mcp4728_simpleCommand(UPDATE); - } - - void dac_current_raw(uint8_t channel, uint16_t val) { - if (!dac_present) return; - - NOMORE(val, DAC_STEPPER_MAX); - - mcp4728_analogWrite(dac_order[channel], val); - mcp4728_simpleCommand(UPDATE); - } - - static float dac_perc(int8_t n) { return 100.0 * mcp4728_getValue(dac_order[n]) / DAC_STEPPER_MAX; } - static float dac_amps(int8_t n) { return ((2.048 * mcp4728_getValue(dac_order[n])) / 4096.0) / (8.0 * DAC_STEPPER_SENSE); } - - void dac_print_values() { - if (!dac_present) return; - - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Stepper current values in % (Amps):"); - SERIAL_ECHO_START; - SERIAL_ECHOPAIR(" X:", dac_perc(0)); - SERIAL_ECHOPAIR(" (", dac_amps(0)); - SERIAL_ECHOPAIR(") Y:", dac_perc(1)); - SERIAL_ECHOPAIR(" (", dac_amps(1)); - SERIAL_ECHOPAIR(") Z:", dac_perc(2)); - SERIAL_ECHOPAIR(" (", dac_amps(2)); - SERIAL_ECHOPAIR(") E:", dac_perc(3)); - SERIAL_ECHOPAIR(" (", dac_amps(3)); - SERIAL_ECHOLNPGM(")"); - } - - void dac_commit_eeprom() { - if (!dac_present) return; - mcp4728_eepromWrite(); - } - -#endif // DAC_STEPPER_CURRENT diff --git a/Marlin/stepper_dac.h b/Marlin/stepper_dac.h deleted file mode 100644 index d80a846..0000000 --- a/Marlin/stepper_dac.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - stepper_dac.h - To set stepper current via DAC - - Part of Marlin - - Copyright (c) 2016 MarlinFirmware - - Marlin is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Marlin is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Marlin. If not, see . -*/ - -#ifndef STEPPER_DAC_H -#define STEPPER_DAC_H - -#include "dac_mcp4728.h" - -int dac_init(); -void dac_current_percent(uint8_t channel, float val); -void dac_current_raw(uint8_t channel, uint16_t val); -void dac_print_values(); -void dac_commit_eeprom(); - -#endif // STEPPER_DAC_H diff --git a/Marlin/stepper_indirection.cpp b/Marlin/stepper_indirection.cpp deleted file mode 100644 index 101249e..0000000 --- a/Marlin/stepper_indirection.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - stepper_indirection.c - stepper motor driver indirection - to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation - Part of Marlin - - Copyright (c) 2015 Dominik Wenger - - Marlin is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Marlin is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Marlin. If not, see . -*/ - -#include "stepper_indirection.h" - -#include "MarlinConfig.h" - -#if ENABLED(HAVE_TMCDRIVER) - #include - #include -#endif - -// Stepper objects of TMC steppers used -#if ENABLED(X_IS_TMC) - TMC26XStepper stepperX(200, X_ENABLE_PIN, X_STEP_PIN, X_DIR_PIN, X_MAX_CURRENT, X_SENSE_RESISTOR); -#endif -#if ENABLED(X2_IS_TMC) - TMC26XStepper stepperX2(200, X2_ENABLE_PIN, X2_STEP_PIN, X2_DIR_PIN, X2_MAX_CURRENT, X2_SENSE_RESISTOR); -#endif -#if ENABLED(Y_IS_TMC) - TMC26XStepper stepperY(200, Y_ENABLE_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_MAX_CURRENT, Y_SENSE_RESISTOR); -#endif -#if ENABLED(Y2_IS_TMC) - TMC26XStepper stepperY2(200, Y2_ENABLE_PIN, Y2_STEP_PIN, Y2_DIR_PIN, Y2_MAX_CURRENT, Y2_SENSE_RESISTOR); -#endif -#if ENABLED(Z_IS_TMC) - TMC26XStepper stepperZ(200, Z_ENABLE_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_MAX_CURRENT, Z_SENSE_RESISTOR); -#endif -#if ENABLED(Z2_IS_TMC) - TMC26XStepper stepperZ2(200, Z2_ENABLE_PIN, Z2_STEP_PIN, Z2_DIR_PIN, Z2_MAX_CURRENT, Z2_SENSE_RESISTOR); -#endif -#if ENABLED(E0_IS_TMC) - TMC26XStepper stepperE0(200, E0_ENABLE_PIN, E0_STEP_PIN, E0_DIR_PIN, E0_MAX_CURRENT, E0_SENSE_RESISTOR); -#endif -#if ENABLED(E1_IS_TMC) - TMC26XStepper stepperE1(200, E1_ENABLE_PIN, E1_STEP_PIN, E1_DIR_PIN, E1_MAX_CURRENT, E1_SENSE_RESISTOR); -#endif -#if ENABLED(E2_IS_TMC) - TMC26XStepper stepperE2(200, E2_ENABLE_PIN, E2_STEP_PIN, E2_DIR_PIN, E2_MAX_CURRENT, E2_SENSE_RESISTOR); -#endif -#if ENABLED(E3_IS_TMC) - TMC26XStepper stepperE3(200, E3_ENABLE_PIN, E3_STEP_PIN, E3_DIR_PIN, E3_MAX_CURRENT, E3_SENSE_RESISTOR); -#endif - -#if ENABLED(HAVE_TMCDRIVER) -void tmc_init() { - #if ENABLED(X_IS_TMC) - stepperX.setMicrosteps(X_MICROSTEPS); - stepperX.start(); - #endif - #if ENABLED(X2_IS_TMC) - stepperX2.setMicrosteps(X2_MICROSTEPS); - stepperX2.start(); - #endif - #if ENABLED(Y_IS_TMC) - stepperY.setMicrosteps(Y_MICROSTEPS); - stepperY.start(); - #endif - #if ENABLED(Y2_IS_TMC) - stepperY2.setMicrosteps(Y2_MICROSTEPS); - stepperY2.start(); - #endif - #if ENABLED(Z_IS_TMC) - stepperZ.setMicrosteps(Z_MICROSTEPS); - stepperZ.start(); - #endif - #if ENABLED(Z2_IS_TMC) - stepperZ2.setMicrosteps(Z2_MICROSTEPS); - stepperZ2.start(); - #endif - #if ENABLED(E0_IS_TMC) - stepperE0.setMicrosteps(E0_MICROSTEPS); - stepperE0.start(); - #endif - #if ENABLED(E1_IS_TMC) - stepperE1.setMicrosteps(E1_MICROSTEPS); - stepperE1.start(); - #endif - #if ENABLED(E2_IS_TMC) - stepperE2.setMicrosteps(E2_MICROSTEPS); - stepperE2.start(); - #endif - #if ENABLED(E3_IS_TMC) - stepperE3.setMicrosteps(E3_MICROSTEPS); - stepperE3.start(); - #endif -} -#endif - -// L6470 Driver objects and inits - -#if ENABLED(HAVE_L6470DRIVER) - #include - #include -#endif - -// L6470 Stepper objects -#if ENABLED(X_IS_L6470) - L6470 stepperX(X_ENABLE_PIN); -#endif -#if ENABLED(X2_IS_L6470) - L6470 stepperX2(X2_ENABLE_PIN); -#endif -#if ENABLED(Y_IS_L6470) - L6470 stepperY(Y_ENABLE_PIN); -#endif -#if ENABLED(Y2_IS_L6470) - L6470 stepperY2(Y2_ENABLE_PIN); -#endif -#if ENABLED(Z_IS_L6470) - L6470 stepperZ(Z_ENABLE_PIN); -#endif -#if ENABLED(Z2_IS_L6470) - L6470 stepperZ2(Z2_ENABLE_PIN); -#endif -#if ENABLED(E0_IS_L6470) - L6470 stepperE0(E0_ENABLE_PIN); -#endif -#if ENABLED(E1_IS_L6470) - L6470 stepperE1(E1_ENABLE_PIN); -#endif -#if ENABLED(E2_IS_L6470) - L6470 stepperE2(E2_ENABLE_PIN); -#endif -#if ENABLED(E3_IS_L6470) - L6470 stepperE3(E3_ENABLE_PIN); -#endif - - -// init routine -#if ENABLED(HAVE_L6470DRIVER) -void L6470_init() { - #if ENABLED(X_IS_L6470) - stepperX.init(X_K_VAL); - stepperX.softFree(); - stepperX.setMicroSteps(X_MICROSTEPS); - stepperX.setOverCurrent(X_OVERCURRENT); //set overcurrent protection - stepperX.setStallCurrent(X_STALLCURRENT); - #endif - #if ENABLED(X2_IS_L6470) - stepperX2.init(X2_K_VAL); - stepperX2.softFree(); - stepperX2.setMicroSteps(X2_MICROSTEPS); - stepperX2.setOverCurrent(X2_OVERCURRENT); //set overcurrent protection - stepperX2.setStallCurrent(X2_STALLCURRENT); - #endif - #if ENABLED(Y_IS_L6470) - stepperY.init(Y_K_VAL); - stepperY.softFree(); - stepperY.setMicroSteps(Y_MICROSTEPS); - stepperY.setOverCurrent(Y_OVERCURRENT); //set overcurrent protection - stepperY.setStallCurrent(Y_STALLCURRENT); - #endif - #if ENABLED(Y2_IS_L6470) - stepperY2.init(Y2_K_VAL); - stepperY2.softFree(); - stepperY2.setMicroSteps(Y2_MICROSTEPS); - stepperY2.setOverCurrent(Y2_OVERCURRENT); //set overcurrent protection - stepperY2.setStallCurrent(Y2_STALLCURRENT); - #endif - #if ENABLED(Z_IS_L6470) - stepperZ.init(Z_K_VAL); - stepperZ.softFree(); - stepperZ.setMicroSteps(Z_MICROSTEPS); - stepperZ.setOverCurrent(Z_OVERCURRENT); //set overcurrent protection - stepperZ.setStallCurrent(Z_STALLCURRENT); - #endif - #if ENABLED(Z2_IS_L6470) - stepperZ2.init(Z2_K_VAL); - stepperZ2.softFree(); - stepperZ2.setMicroSteps(Z2_MICROSTEPS); - stepperZ2.setOverCurrent(Z2_OVERCURRENT); //set overcurrent protection - stepperZ2.setStallCurrent(Z2_STALLCURRENT); - #endif - #if ENABLED(E0_IS_L6470) - stepperE0.init(E0_K_VAL); - stepperE0.softFree(); - stepperE0.setMicroSteps(E0_MICROSTEPS); - stepperE0.setOverCurrent(E0_OVERCURRENT); //set overcurrent protection - stepperE0.setStallCurrent(E0_STALLCURRENT); - #endif - #if ENABLED(E1_IS_L6470) - stepperE1.init(E1_K_VAL); - stepperE1.softFree(); - stepperE1.setMicroSteps(E1_MICROSTEPS); - stepperE1.setOverCurrent(E1_OVERCURRENT); //set overcurrent protection - stepperE1.setStallCurrent(E1_STALLCURRENT); - #endif - #if ENABLED(E2_IS_L6470) - stepperE2.init(E2_K_VAL); - stepperE2.softFree(); - stepperE2.setMicroSteps(E2_MICROSTEPS); - stepperE2.setOverCurrent(E2_OVERCURRENT); //set overcurrent protection - stepperE2.setStallCurrent(E2_STALLCURRENT); - #endif - #if ENABLED(E3_IS_L6470) - stepperE3.init(E3_K_VAL); - stepperE3.softFree(); - stepperE3.setMicroSteps(E3_MICROSTEPS); - stepperE3.setOverCurrent(E3_OVERCURRENT); //set overcurrent protection - stepperE3.setStallCurrent(E3_STALLCURRENT); - #endif -} -#endif - diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h deleted file mode 100644 index 6fd19dd..0000000 --- a/Marlin/stepper_indirection.h +++ /dev/null @@ -1,395 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - stepper_indirection.h - stepper motor driver indirection macros - to allow some stepper functions to be done via SPI/I2c instead of direct pin manipulation - Part of Marlin - - Copyright (c) 2015 Dominik Wenger - - Marlin is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Marlin is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Marlin. If not, see . -*/ - -#ifndef STEPPER_INDIRECTION_H -#define STEPPER_INDIRECTION_H - -#include "MarlinConfig.h" - -// TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI -#if ENABLED(HAVE_TMCDRIVER) - #include - #include - void tmc_init(); -#endif - -// L6470 has STEP on normal pins, but DIR/ENABLE via SPI -#if ENABLED(HAVE_L6470DRIVER) - #include - #include - void L6470_init(); -#endif - -// X Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(X_IS_L6470) - extern L6470 stepperX; - #define X_ENABLE_INIT NOOP - #define X_ENABLE_WRITE(STATE) do{if(STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree();}while(0) - #define X_ENABLE_READ (stepperX.getStatus() & STATUS_HIZ) - #define X_DIR_INIT NOOP - #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE) - #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(X_IS_TMC) - extern TMC26XStepper stepperX; - #define X_ENABLE_INIT NOOP - #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) - #define X_ENABLE_READ stepperX.isEnabled() - #else - #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) - #define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE) - #define X_ENABLE_READ READ(X_ENABLE_PIN) - #endif - #define X_DIR_INIT SET_OUTPUT(X_DIR_PIN) - #define X_DIR_WRITE(STATE) WRITE(X_DIR_PIN,STATE) - #define X_DIR_READ READ(X_DIR_PIN) -#endif -#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN) -#define X_STEP_WRITE(STATE) WRITE(X_STEP_PIN,STATE) -#define X_STEP_READ READ(X_STEP_PIN) - -// Y Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(Y_IS_L6470) - extern L6470 stepperY; - #define Y_ENABLE_INIT NOOP - #define Y_ENABLE_WRITE(STATE) do{if(STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree();}while(0) - #define Y_ENABLE_READ (stepperY.getStatus() & STATUS_HIZ) - #define Y_DIR_INIT NOOP - #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE) - #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Y_IS_TMC) - extern TMC26XStepper stepperY; - #define Y_ENABLE_INIT NOOP - #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) - #define Y_ENABLE_READ stepperY.isEnabled() - #else - #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) - #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE) - #define Y_ENABLE_READ READ(Y_ENABLE_PIN) - #endif - #define Y_DIR_INIT SET_OUTPUT(Y_DIR_PIN) - #define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE) - #define Y_DIR_READ READ(Y_DIR_PIN) -#endif -#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN) -#define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE) -#define Y_STEP_READ READ(Y_STEP_PIN) - -// Z Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(Z_IS_L6470) - extern L6470 stepperZ; - #define Z_ENABLE_INIT NOOP - #define Z_ENABLE_WRITE(STATE) do{if(STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree();}while(0) - #define Z_ENABLE_READ (stepperZ.getStatus() & STATUS_HIZ) - #define Z_DIR_INIT NOOP - #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE) - #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Z_IS_TMC) - extern TMC26XStepper stepperZ; - #define Z_ENABLE_INIT NOOP - #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) - #define Z_ENABLE_READ stepperZ.isEnabled() - #else - #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) - #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE) - #define Z_ENABLE_READ READ(Z_ENABLE_PIN) - #endif - #define Z_DIR_INIT SET_OUTPUT(Z_DIR_PIN) - #define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE) - #define Z_DIR_READ READ(Z_DIR_PIN) -#endif -#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN) -#define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE) -#define Z_STEP_READ READ(Z_STEP_PIN) - -// X2 Stepper -#if HAS_X2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(X2_IS_L6470) - extern L6470 stepperX2; - #define X2_ENABLE_INIT NOOP - #define X2_ENABLE_WRITE(STATE) do{if(STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree();}while(0) - #define X2_ENABLE_READ (stepperX2.getStatus() & STATUS_HIZ) - #define X2_DIR_INIT NOOP - #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE) - #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) - #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(X2_IS_TMC) - extern TMC26XStepper stepperX2; - #define X2_ENABLE_INIT NOOP - #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) - #define X2_ENABLE_READ stepperX2.isEnabled() - #else - #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) - #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE) - #define X2_ENABLE_READ READ(X2_ENABLE_PIN) - #endif - #define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN) - #define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE) - #define X2_DIR_READ READ(X2_DIR_PIN) - #endif - #define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN) - #define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE) - #define X2_STEP_READ READ(X2_STEP_PIN) -#endif - -// Y2 Stepper -#if HAS_Y2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(Y2_IS_L6470) - extern L6470 stepperY2; - #define Y2_ENABLE_INIT NOOP - #define Y2_ENABLE_WRITE(STATE) do{if(STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree();}while(0) - #define Y2_ENABLE_READ (stepperY2.getStatus() & STATUS_HIZ) - #define Y2_DIR_INIT NOOP - #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE) - #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) - #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Y2_IS_TMC) - extern TMC26XStepper stepperY2; - #define Y2_ENABLE_INIT NOOP - #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) - #define Y2_ENABLE_READ stepperY2.isEnabled() - #else - #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) - #define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE) - #define Y2_ENABLE_READ READ(Y2_ENABLE_PIN) - #endif - #define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN) - #define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE) - #define Y2_DIR_READ READ(Y2_DIR_PIN) - #endif - #define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN) - #define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE) - #define Y2_STEP_READ READ(Y2_STEP_PIN) -#endif - -// Z2 Stepper -#if HAS_Z2_ENABLE - #if ENABLED(HAVE_L6470DRIVER) && ENABLED(Z2_IS_L6470) - extern L6470 stepperZ2; - #define Z2_ENABLE_INIT NOOP - #define Z2_ENABLE_WRITE(STATE) do{if(STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree();}while(0) - #define Z2_ENABLE_READ (stepperZ2.getStatus() & STATUS_HIZ) - #define Z2_DIR_INIT NOOP - #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE) - #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) - #else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(Z2_IS_TMC) - extern TMC26XStepper stepperZ2; - #define Z2_ENABLE_INIT NOOP - #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) - #define Z2_ENABLE_READ stepperZ2.isEnabled() - #else - #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) - #define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE) - #define Z2_ENABLE_READ READ(Z2_ENABLE_PIN) - #endif - #define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN) - #define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE) - #define Z2_DIR_READ READ(Z2_DIR_PIN) - #endif - #define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN) - #define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE) - #define Z2_STEP_READ READ(Z2_STEP_PIN) -#endif - -// E0 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E0_IS_L6470) - extern L6470 stepperE0; - #define E0_ENABLE_INIT NOOP - #define E0_ENABLE_WRITE(STATE) do{if(STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree();}while(0) - #define E0_ENABLE_READ (stepperE0.getStatus() & STATUS_HIZ) - #define E0_DIR_INIT NOOP - #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE) - #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E0_IS_TMC) - extern TMC26XStepper stepperE0; - #define E0_ENABLE_INIT NOOP - #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) - #define E0_ENABLE_READ stepperE0.isEnabled() - #else - #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) - #define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE) - #define E0_ENABLE_READ READ(E0_ENABLE_PIN) - #endif - #define E0_DIR_INIT SET_OUTPUT(E0_DIR_PIN) - #define E0_DIR_WRITE(STATE) WRITE(E0_DIR_PIN,STATE) - #define E0_DIR_READ READ(E0_DIR_PIN) -#endif -#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN) -#define E0_STEP_WRITE(STATE) WRITE(E0_STEP_PIN,STATE) -#define E0_STEP_READ READ(E0_STEP_PIN) - -// E1 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E1_IS_L6470) - extern L6470 stepperE1; - #define E1_ENABLE_INIT NOOP - #define E1_ENABLE_WRITE(STATE) do{if(STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree();}while(0) - #define E1_ENABLE_READ (stepperE1.getStatus() & STATUS_HIZ) - #define E1_DIR_INIT NOOP - #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE) - #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E1_IS_TMC) - extern TMC26XStepper stepperE1; - #define E1_ENABLE_INIT NOOP - #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) - #define E1_ENABLE_READ stepperE1.isEnabled() - #else - #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) - #define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE) - #define E1_ENABLE_READ READ(E1_ENABLE_PIN) - #endif - #define E1_DIR_INIT SET_OUTPUT(E1_DIR_PIN) - #define E1_DIR_WRITE(STATE) WRITE(E1_DIR_PIN,STATE) - #define E1_DIR_READ READ(E1_DIR_PIN) -#endif -#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN) -#define E1_STEP_WRITE(STATE) WRITE(E1_STEP_PIN,STATE) -#define E1_STEP_READ READ(E1_STEP_PIN) - -// E2 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E2_IS_L6470) - extern L6470 stepperE2; - #define E2_ENABLE_INIT NOOP - #define E2_ENABLE_WRITE(STATE) do{if(STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree();}while(0) - #define E2_ENABLE_READ (stepperE2.getStatus() & STATUS_HIZ) - #define E2_DIR_INIT NOOP - #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE) - #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E2_IS_TMC) - extern TMC26XStepper stepperE2; - #define E2_ENABLE_INIT NOOP - #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) - #define E2_ENABLE_READ stepperE2.isEnabled() - #else - #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) - #define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE) - #define E2_ENABLE_READ READ(E2_ENABLE_PIN) - #endif - #define E2_DIR_INIT SET_OUTPUT(E2_DIR_PIN) - #define E2_DIR_WRITE(STATE) WRITE(E2_DIR_PIN,STATE) - #define E2_DIR_READ READ(E2_DIR_PIN) -#endif -#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN) -#define E2_STEP_WRITE(STATE) WRITE(E2_STEP_PIN,STATE) -#define E2_STEP_READ READ(E2_STEP_PIN) - -// E3 Stepper -#if ENABLED(HAVE_L6470DRIVER) && ENABLED(E3_IS_L6470) - extern L6470 stepperE3; - #define E3_ENABLE_INIT NOOP - #define E3_ENABLE_WRITE(STATE) do{if(STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree();}while(0) - #define E3_ENABLE_READ (stepperE3.getStatus() & STATUS_HIZ) - #define E3_DIR_INIT NOOP - #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE) - #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) -#else - #if ENABLED(HAVE_TMCDRIVER) && ENABLED(E3_IS_TMC) - extern TMC26XStepper stepperE3; - #define E3_ENABLE_INIT NOOP - #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) - #define E3_ENABLE_READ stepperE3.isEnabled() - #else - #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) - #define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE) - #define E3_ENABLE_READ READ(E3_ENABLE_PIN) - #endif - #define E3_DIR_INIT SET_OUTPUT(E3_DIR_PIN) - #define E3_DIR_WRITE(STATE) WRITE(E3_DIR_PIN,STATE) - #define E3_DIR_READ READ(E3_DIR_PIN) -#endif -#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN) -#define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE) -#define E3_STEP_READ READ(E3_STEP_PIN) - -/** - * Extruder indirection for the single E axis - */ -#if ENABLED(SWITCHING_EXTRUDER) - #define E_STEP_WRITE(v) E0_STEP_WRITE(v) - #define NORM_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? INVERT_E0_DIR : !INVERT_E0_DIR) - #define REV_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? !INVERT_E0_DIR : INVERT_E0_DIR) -#elif EXTRUDERS > 3 - #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } } - #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); } } - #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(INVERT_E3_DIR); } } -#elif EXTRUDERS > 2 - #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); } } - #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); } } - #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(INVERT_E2_DIR); } } -#elif EXTRUDERS > 1 - #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) - #define E_STEP_WRITE(v) { if (extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } - #define NORM_E_DIR() { if (extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } - #define REV_E_DIR() { if (extruder_duplication_enabled) { E0_DIR_WRITE(INVERT_E0_DIR); E1_DIR_WRITE(INVERT_E1_DIR); } else if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } - #else - #define E_STEP_WRITE(v) { if (current_block->active_extruder == 0) { E0_STEP_WRITE(v); } else { E1_STEP_WRITE(v); } } - #define NORM_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(!INVERT_E0_DIR); } else { E1_DIR_WRITE(!INVERT_E1_DIR); } } - #define REV_E_DIR() { if (current_block->active_extruder == 0) { E0_DIR_WRITE(INVERT_E0_DIR); } else { E1_DIR_WRITE(INVERT_E1_DIR); } } - #endif -#elif ENABLED(MIXING_EXTRUDER) - #define E_STEP_WRITE(v) NOOP /* not used for mixing extruders! */ - #if MIXING_STEPPERS > 3 - #define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } } - #define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); } - #define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); } - #elif MIXING_STEPPERS > 2 - #define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); } } - #define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); } - #define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); } - #else - #define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); } } - #define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } - #define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } - #endif -#else - #define E_STEP_WRITE(v) E0_STEP_WRITE(v) - #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR) - #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR) -#endif - -#endif // STEPPER_INDIRECTION_H diff --git a/Marlin/stopwatch.cpp b/Marlin/stopwatch.cpp deleted file mode 100644 index ef701a1..0000000 --- a/Marlin/stopwatch.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" -#include "stopwatch.h" - -Stopwatch::Stopwatch() { - this->reset(); -} - -bool Stopwatch::stop() { - #if ENABLED(DEBUG_STOPWATCH) - Stopwatch::debug(PSTR("stop")); - #endif - - if (this->isRunning() || this->isPaused()) { - this->state = STOPPED; - this->stopTimestamp = millis(); - return true; - } - else return false; -} - -bool Stopwatch::pause() { - #if ENABLED(DEBUG_STOPWATCH) - Stopwatch::debug(PSTR("pause")); - #endif - - if (this->isRunning()) { - this->state = PAUSED; - this->stopTimestamp = millis(); - return true; - } - else return false; -} - -bool Stopwatch::start() { - #if ENABLED(DEBUG_STOPWATCH) - Stopwatch::debug(PSTR("start")); - #endif - - if (!this->isRunning()) { - if (this->isPaused()) this->accumulator = this->duration(); - else this->reset(); - - this->state = RUNNING; - this->startTimestamp = millis(); - return true; - } - else return false; -} - -void Stopwatch::reset() { - #if ENABLED(DEBUG_STOPWATCH) - Stopwatch::debug(PSTR("reset")); - #endif - - this->state = STOPPED; - this->startTimestamp = 0; - this->stopTimestamp = 0; - this->accumulator = 0; -} - -bool Stopwatch::isRunning() { - return (this->state == RUNNING) ? true : false; -} - -bool Stopwatch::isPaused() { - return (this->state == PAUSED) ? true : false; -} - -millis_t Stopwatch::duration() { - return (((this->isRunning()) ? millis() : this->stopTimestamp) - - this->startTimestamp) / 1000UL + this->accumulator; -} - -#if ENABLED(DEBUG_STOPWATCH) - - void Stopwatch::debug(const char func[]) { - if (DEBUGGING(INFO)) { - SERIAL_ECHOPGM("Stopwatch::"); - serialprintPGM(func); - SERIAL_ECHOLNPGM("()"); - } - } - -#endif diff --git a/Marlin/stopwatch.h b/Marlin/stopwatch.h deleted file mode 100644 index 7094828..0000000 --- a/Marlin/stopwatch.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef STOPWATCH_H -#define STOPWATCH_H - -#include "macros.h" - -// Print debug messages with M111 S2 (Uses 156 bytes of PROGMEM) -//#define DEBUG_STOPWATCH - -/** - * @brief Stopwatch class - * @details This class acts as a timer proving stopwatch functionality including - * the ability to pause the running time counter. - */ -class Stopwatch { - private: - enum State { - STOPPED, - RUNNING, - PAUSED - }; - - Stopwatch::State state; - millis_t accumulator; - millis_t startTimestamp; - millis_t stopTimestamp; - - public: - /** - * @brief Class constructor - */ - Stopwatch(); - - /** - * @brief Stops the stopwatch - * @details Stops the running timer, it will silently ignore the request if - * no timer is currently running. - * @return true is method was successful - */ - bool stop(); - - /** - * @brief Pause the stopwatch - * @details Pauses the running timer, it will silently ignore the request if - * no timer is currently running. - * @return true is method was successful - */ - bool pause(); - - /** - * @brief Starts the stopwatch - * @details Starts the timer, it will silently ignore the request if the - * timer is already running. - * @return true is method was successful - */ - bool start(); - - /** - * @brief Resets the stopwatch - * @details Resets all settings to their default values. - */ - void reset(); - - /** - * @brief Checks if the timer is running - * @details Returns true if the timer is currently running, false otherwise. - * @return true if stopwatch is running - */ - bool isRunning(); - - /** - * @brief Checks if the timer is paused - * @details Returns true if the timer is currently paused, false otherwise. - * @return true if stopwatch is paused - */ - bool isPaused(); - - /** - * @brief Gets the running time - * @details Returns the total number of seconds the timer has been running. - * @return the delta since starting the stopwatch - */ - millis_t duration(); - - #if ENABLED(DEBUG_STOPWATCH) - - /** - * @brief Prints a debug message - * @details Prints a simple debug message "Stopwatch::function" - */ - static void debug(const char func[]); - - #endif -}; - -#endif //STOPWATCH_H diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp deleted file mode 100644 index 5b1d019..0000000 --- a/Marlin/temperature.cpp +++ /dev/null @@ -1,1873 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * temperature.cpp - temperature control - */ - -#include "Marlin.h" -#include "ultralcd.h" -#include "temperature.h" -#include "thermistortables.h" -#include "language.h" -#if ENABLED(BABYSTEPPING) - #include "stepper.h" -#endif - -#if ENABLED(USE_WATCHDOG) - #include "watchdog.h" -#endif - -#ifdef K1 // Defined in Configuration.h in the PID settings - #define K2 (1.0-K1) -#endif - -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - static void* heater_ttbl_map[2] = {(void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE }; - static uint8_t heater_ttbllen_map[2] = { HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN }; -#else - static void* heater_ttbl_map[HOTENDS] = ARRAY_BY_HOTENDS((void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE, (void*)HEATER_2_TEMPTABLE, (void*)HEATER_3_TEMPTABLE); - static uint8_t heater_ttbllen_map[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN, HEATER_2_TEMPTABLE_LEN, HEATER_3_TEMPTABLE_LEN); -#endif - -Temperature thermalManager; - -// public: - -float Temperature::current_temperature[HOTENDS] = { 0.0 }, - Temperature::current_temperature_bed = 0.0; -int Temperature::current_temperature_raw[HOTENDS] = { 0 }, - Temperature::target_temperature[HOTENDS] = { 0 }, - Temperature::current_temperature_bed_raw = 0, - Temperature::target_temperature_bed = 0; - -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - float Temperature::redundant_temperature = 0.0; -#endif - -unsigned char Temperature::soft_pwm_bed; - -#if ENABLED(FAN_SOFT_PWM) - unsigned char Temperature::fanSpeedSoftPwm[FAN_COUNT]; -#endif - -#if ENABLED(PIDTEMP) - #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1 - float Temperature::Kp[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kp), - Temperature::Ki[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Ki) * (PID_dT)), - Temperature::Kd[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Kd) / (PID_dT)); - #if ENABLED(PID_EXTRUSION_SCALING) - float Temperature::Kc[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kc); - #endif - #else - float Temperature::Kp = DEFAULT_Kp, - Temperature::Ki = (DEFAULT_Ki) * (PID_dT), - Temperature::Kd = (DEFAULT_Kd) / (PID_dT); - #if ENABLED(PID_EXTRUSION_SCALING) - float Temperature::Kc = DEFAULT_Kc; - #endif - #endif -#endif - -#if ENABLED(PIDTEMPBED) - float Temperature::bedKp = DEFAULT_bedKp, - Temperature::bedKi = ((DEFAULT_bedKi) * PID_dT), - Temperature::bedKd = ((DEFAULT_bedKd) / PID_dT); -#endif - -#if ENABLED(BABYSTEPPING) - volatile int Temperature::babystepsTodo[3] = { 0 }; -#endif - -#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - int Temperature::watch_target_temp[HOTENDS] = { 0 }; - millis_t Temperature::watch_heater_next_ms[HOTENDS] = { 0 }; -#endif - -#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - int Temperature::watch_target_bed_temp = 0; - millis_t Temperature::watch_bed_next_ms = 0; -#endif - -#if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - bool Temperature::allow_cold_extrude = false; - float Temperature::extrude_min_temp = EXTRUDE_MINTEMP; -#endif - -// private: - -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - int Temperature::redundant_temperature_raw = 0; - float Temperature::redundant_temperature = 0.0; -#endif - -volatile bool Temperature::temp_meas_ready = false; - -#if ENABLED(PIDTEMP) - float Temperature::temp_iState[HOTENDS] = { 0 }, - Temperature::temp_dState[HOTENDS] = { 0 }, - Temperature::pTerm[HOTENDS], - Temperature::iTerm[HOTENDS], - Temperature::dTerm[HOTENDS]; - - #if ENABLED(PID_EXTRUSION_SCALING) - float Temperature::cTerm[HOTENDS]; - long Temperature::last_e_position; - long Temperature::lpq[LPQ_MAX_LEN]; - int Temperature::lpq_ptr = 0; - #endif - - float Temperature::pid_error[HOTENDS], - Temperature::temp_iState_min[HOTENDS], - Temperature::temp_iState_max[HOTENDS]; - bool Temperature::pid_reset[HOTENDS]; -#endif - -#if ENABLED(PIDTEMPBED) - float Temperature::temp_iState_bed = { 0 }, - Temperature::temp_dState_bed = { 0 }, - Temperature::pTerm_bed, - Temperature::iTerm_bed, - Temperature::dTerm_bed, - Temperature::pid_error_bed, - Temperature::temp_iState_min_bed, - Temperature::temp_iState_max_bed; -#else - millis_t Temperature::next_bed_check_ms; -#endif - -unsigned long Temperature::raw_temp_value[4] = { 0 }; -unsigned long Temperature::raw_temp_bed_value = 0; - -// Init min and max temp with extreme values to prevent false errors during startup -int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP), - Temperature::maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP), - Temperature::minttemp[HOTENDS] = { 0 }, - Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383); - -#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - int Temperature::consecutive_low_temperature_error[HOTENDS] = { 0 }; -#endif - -#ifdef MILLISECONDS_PREHEAT_TIME - unsigned long Temperature::preheat_end_time[HOTENDS] = { 0 }; -#endif - -#ifdef BED_MINTEMP - int Temperature::bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; -#endif - -#ifdef BED_MAXTEMP - int Temperature::bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP; -#endif - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - int Temperature::meas_shift_index; // Index of a delayed sample in buffer -#endif - -#if HAS_AUTO_FAN - millis_t Temperature::next_auto_fan_check_ms; -#endif - -unsigned char Temperature::soft_pwm[HOTENDS]; - -#if ENABLED(FAN_SOFT_PWM) - unsigned char Temperature::soft_pwm_fan[FAN_COUNT]; -#endif - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - int Temperature::current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only -#endif - -#if HAS_PID_HEATING - - void Temperature::PID_autotune(float temp, int hotend, int ncycles, bool set_result/*=false*/) { - float input = 0.0; - int cycles = 0; - bool heating = true; - - millis_t temp_ms = millis(), t1 = temp_ms, t2 = temp_ms; - long t_high = 0, t_low = 0; - - long bias, d; - float Ku, Tu; - float workKp = 0, workKi = 0, workKd = 0; - float max = 0, min = 10000; - - #if HAS_AUTO_FAN - next_auto_fan_check_ms = temp_ms + 2500UL; - #endif - - if (hotend >= - #if ENABLED(PIDTEMP) - HOTENDS - #else - 0 - #endif - || hotend < - #if ENABLED(PIDTEMPBED) - -1 - #else - 0 - #endif - ) { - SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM); - return; - } - - SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START); - - disable_all_heaters(); // switch off all heaters. - - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_bed = bias = d = (MAX_BED_POWER) / 2; - else - soft_pwm[hotend] = bias = d = (PID_MAX) / 2; - #elif ENABLED(PIDTEMP) - soft_pwm[hotend] = bias = d = (PID_MAX) / 2; - #else - soft_pwm_bed = bias = d = (MAX_BED_POWER) / 2; - #endif - - wait_for_heatup = true; - - // PID Tuning loop - while (wait_for_heatup) { - - millis_t ms = millis(); - - if (temp_meas_ready) { // temp sample ready - updateTemperaturesFromRawValues(); - - input = - #if HAS_PID_FOR_BOTH - hotend < 0 ? current_temperature_bed : current_temperature[hotend] - #elif ENABLED(PIDTEMP) - current_temperature[hotend] - #else - current_temperature_bed - #endif - ; - - max = max(max, input); - min = min(min, input); - - #if HAS_AUTO_FAN - if (ELAPSED(ms, next_auto_fan_check_ms)) { - checkExtruderAutoFans(); - next_auto_fan_check_ms = ms + 2500UL; - } - #endif - - if (heating && input > temp) { - if (ELAPSED(ms, t2 + 5000UL)) { - heating = false; - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_bed = (bias - d) >> 1; - else - soft_pwm[hotend] = (bias - d) >> 1; - #elif ENABLED(PIDTEMP) - soft_pwm[hotend] = (bias - d) >> 1; - #elif ENABLED(PIDTEMPBED) - soft_pwm_bed = (bias - d) >> 1; - #endif - t1 = ms; - t_high = t1 - t2; - max = temp; - } - } - - if (!heating && input < temp) { - if (ELAPSED(ms, t1 + 5000UL)) { - heating = true; - t2 = ms; - t_low = t2 - t1; - if (cycles > 0) { - long max_pow = - #if HAS_PID_FOR_BOTH - hotend < 0 ? MAX_BED_POWER : PID_MAX - #elif ENABLED(PIDTEMP) - PID_MAX - #else - MAX_BED_POWER - #endif - ; - bias += (d * (t_high - t_low)) / (t_low + t_high); - bias = constrain(bias, 20, max_pow - 20); - d = (bias > max_pow / 2) ? max_pow - 1 - bias : bias; - - SERIAL_PROTOCOLPAIR(MSG_BIAS, bias); - SERIAL_PROTOCOLPAIR(MSG_D, d); - SERIAL_PROTOCOLPAIR(MSG_T_MIN, min); - SERIAL_PROTOCOLPAIR(MSG_T_MAX, max); - if (cycles > 2) { - Ku = (4.0 * d) / (3.14159265 * (max - min) * 0.5); - Tu = ((float)(t_low + t_high) * 0.001); - SERIAL_PROTOCOLPAIR(MSG_KU, Ku); - SERIAL_PROTOCOLPAIR(MSG_TU, Tu); - workKp = 0.6 * Ku; - workKi = 2 * workKp / Tu; - workKd = workKp * Tu * 0.125; - SERIAL_PROTOCOLLNPGM(MSG_CLASSIC_PID); - SERIAL_PROTOCOLPAIR(MSG_KP, workKp); - SERIAL_PROTOCOLPAIR(MSG_KI, workKi); - SERIAL_PROTOCOLPAIR(MSG_KD, workKd); - /** - workKp = 0.33*Ku; - workKi = workKp/Tu; - workKd = workKp*Tu/3; - SERIAL_PROTOCOLLNPGM(" Some overshoot"); - SERIAL_PROTOCOLPAIR(" Kp: ", workKp); - SERIAL_PROTOCOLPAIR(" Ki: ", workKi); - SERIAL_PROTOCOLPAIR(" Kd: ", workKd); - workKp = 0.2*Ku; - workKi = 2*workKp/Tu; - workKd = workKp*Tu/3; - SERIAL_PROTOCOLLNPGM(" No overshoot"); - SERIAL_PROTOCOLPAIR(" Kp: ", workKp); - SERIAL_PROTOCOLPAIR(" Ki: ", workKi); - SERIAL_PROTOCOLPAIR(" Kd: ", workKd); - */ - } - } - #if HAS_PID_FOR_BOTH - if (hotend < 0) - soft_pwm_bed = (bias + d) >> 1; - else - soft_pwm[hotend] = (bias + d) >> 1; - #elif ENABLED(PIDTEMP) - soft_pwm[hotend] = (bias + d) >> 1; - #else - soft_pwm_bed = (bias + d) >> 1; - #endif - cycles++; - min = temp; - } - } - } - #define MAX_OVERSHOOT_PID_AUTOTUNE 20 - if (input > temp + MAX_OVERSHOOT_PID_AUTOTUNE) { - SERIAL_PROTOCOLLNPGM(MSG_PID_TEMP_TOO_HIGH); - return; - } - // Every 2 seconds... - if (ELAPSED(ms, temp_ms + 2000UL)) { - #if HAS_TEMP_HOTEND || HAS_TEMP_BED - print_heaterstates(); - SERIAL_EOL; - #endif - - temp_ms = ms; - } // every 2 seconds - // Over 2 minutes? - if (((ms - t1) + (ms - t2)) > (10L * 60L * 1000L * 2L)) { - SERIAL_PROTOCOLLNPGM(MSG_PID_TIMEOUT); - return; - } - if (cycles > ncycles) { - SERIAL_PROTOCOLLNPGM(MSG_PID_AUTOTUNE_FINISHED); - - #if HAS_PID_FOR_BOTH - const char* estring = hotend < 0 ? "bed" : ""; - SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Kp ", workKp); - SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Ki ", workKi); - SERIAL_PROTOCOLPAIR("#define DEFAULT_", estring); SERIAL_PROTOCOLPAIR("Kd ", workKd); - #elif ENABLED(PIDTEMP) - SERIAL_PROTOCOLPAIR("#define DEFAULT_Kp ", workKp); - SERIAL_PROTOCOLPAIR("#define DEFAULT_Ki ", workKi); - SERIAL_PROTOCOLPAIR("#define DEFAULT_Kd ", workKd); - #else - SERIAL_PROTOCOLPAIR("#define DEFAULT_bedKp ", workKp); - SERIAL_PROTOCOLPAIR("#define DEFAULT_bedKi ", workKi); - SERIAL_PROTOCOLPAIR("#define DEFAULT_bedKd ", workKd); - #endif - - #define _SET_BED_PID() \ - bedKp = workKp; \ - bedKi = scalePID_i(workKi); \ - bedKd = scalePID_d(workKd); \ - updatePID() - - #define _SET_EXTRUDER_PID() \ - PID_PARAM(Kp, hotend) = workKp; \ - PID_PARAM(Ki, hotend) = scalePID_i(workKi); \ - PID_PARAM(Kd, hotend) = scalePID_d(workKd); \ - updatePID() - - // Use the result? (As with "M303 U1") - if (set_result) { - #if HAS_PID_FOR_BOTH - if (hotend < 0) { - _SET_BED_PID(); - } - else { - _SET_EXTRUDER_PID(); - } - #elif ENABLED(PIDTEMP) - _SET_EXTRUDER_PID(); - #else - _SET_BED_PID(); - #endif - } - return; - } - lcd_update(); - } - if (!wait_for_heatup) disable_all_heaters(); - } - -#endif // HAS_PID_HEATING - -/** - * Class and Instance Methods - */ - -Temperature::Temperature() { } - -void Temperature::updatePID() { - #if ENABLED(PIDTEMP) - #if ENABLED(PID_EXTRUSION_SCALING) - last_e_position = 0; - #endif - HOTEND_LOOP() { - temp_iState_max[e] = (PID_INTEGRAL_DRIVE_MAX) / PID_PARAM(Ki, e); - } - #endif - #if ENABLED(PIDTEMPBED) - temp_iState_max_bed = (PID_BED_INTEGRAL_DRIVE_MAX) / bedKi; - #endif -} - -int Temperature::getHeaterPower(int heater) { - return heater < 0 ? soft_pwm_bed : soft_pwm[heater]; -} - -#if HAS_AUTO_FAN - - void Temperature::checkExtruderAutoFans() { - const int8_t fanPin[] = { EXTRUDER_0_AUTO_FAN_PIN, EXTRUDER_1_AUTO_FAN_PIN, EXTRUDER_2_AUTO_FAN_PIN, EXTRUDER_3_AUTO_FAN_PIN }; - const int fanBit[] = { 0, - EXTRUDER_1_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN ? 0 : 1, - EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN ? 0 : - EXTRUDER_2_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN ? 1 : 2, - EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_0_AUTO_FAN_PIN ? 0 : - EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_1_AUTO_FAN_PIN ? 1 : - EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3 - }; - uint8_t fanState = 0; - HOTEND_LOOP() { - if (current_temperature[e] > EXTRUDER_AUTO_FAN_TEMPERATURE) - SBI(fanState, fanBit[e]); - } - uint8_t fanDone = 0; - for (int8_t f = 0; f <= 3; f++) { - int8_t pin = fanPin[f]; - if (pin >= 0 && !TEST(fanDone, fanBit[f])) { - unsigned char newFanSpeed = TEST(fanState, fanBit[f]) ? EXTRUDER_AUTO_FAN_SPEED : 0; - // this idiom allows both digital and PWM fan outputs (see M42 handling). - digitalWrite(pin, newFanSpeed); - analogWrite(pin, newFanSpeed); - SBI(fanDone, fanBit[f]); - } - } - } - -#endif // HAS_AUTO_FAN - -// -// Temperature Error Handlers -// -void Temperature::_temp_error(int e, const char* serial_msg, const char* lcd_msg) { - static bool killed = false; - if (IsRunning()) { - SERIAL_ERROR_START; - serialprintPGM(serial_msg); - SERIAL_ERRORPGM(MSG_STOPPED_HEATER); - if (e >= 0) SERIAL_ERRORLN((int)e); else SERIAL_ERRORLNPGM(MSG_HEATER_BED); - } - #if DISABLED(BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE) - if (!killed) { - Running = false; - killed = true; - kill(lcd_msg); - } - else - disable_all_heaters(); // paranoia - #endif -} - -void Temperature::max_temp_error(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - _temp_error(HOTEND_INDEX, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP)); -} -void Temperature::min_temp_error(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - _temp_error(HOTEND_INDEX, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP)); -} - -float Temperature::get_pid_output(int e) { - #if HOTENDS == 1 - UNUSED(e); - #define _HOTEND_TEST true - #else - #define _HOTEND_TEST e == active_extruder - #endif - float pid_output; - #if ENABLED(PIDTEMP) - #if DISABLED(PID_OPENLOOP) - pid_error[HOTEND_INDEX] = target_temperature[HOTEND_INDEX] - current_temperature[HOTEND_INDEX]; - dTerm[HOTEND_INDEX] = K2 * PID_PARAM(Kd, HOTEND_INDEX) * (current_temperature[HOTEND_INDEX] - temp_dState[HOTEND_INDEX]) + K1 * dTerm[HOTEND_INDEX]; - temp_dState[HOTEND_INDEX] = current_temperature[HOTEND_INDEX]; - if (pid_error[HOTEND_INDEX] > PID_FUNCTIONAL_RANGE) { - pid_output = BANG_MAX; - pid_reset[HOTEND_INDEX] = true; - } - else if (pid_error[HOTEND_INDEX] < -(PID_FUNCTIONAL_RANGE) || target_temperature[HOTEND_INDEX] == 0) { - pid_output = 0; - pid_reset[HOTEND_INDEX] = true; - } - else { - if (pid_reset[HOTEND_INDEX]) { - temp_iState[HOTEND_INDEX] = 0.0; - pid_reset[HOTEND_INDEX] = false; - } - pTerm[HOTEND_INDEX] = PID_PARAM(Kp, HOTEND_INDEX) * pid_error[HOTEND_INDEX]; - temp_iState[HOTEND_INDEX] += pid_error[HOTEND_INDEX]; - temp_iState[HOTEND_INDEX] = constrain(temp_iState[HOTEND_INDEX], temp_iState_min[HOTEND_INDEX], temp_iState_max[HOTEND_INDEX]); - iTerm[HOTEND_INDEX] = PID_PARAM(Ki, HOTEND_INDEX) * temp_iState[HOTEND_INDEX]; - - pid_output = pTerm[HOTEND_INDEX] + iTerm[HOTEND_INDEX] - dTerm[HOTEND_INDEX]; - - #if ENABLED(PID_EXTRUSION_SCALING) - cTerm[HOTEND_INDEX] = 0; - if (_HOTEND_TEST) { - long e_position = stepper.position(E_AXIS); - if (e_position > last_e_position) { - lpq[lpq_ptr] = e_position - last_e_position; - last_e_position = e_position; - } - else { - lpq[lpq_ptr] = 0; - } - if (++lpq_ptr >= lpq_len) lpq_ptr = 0; - cTerm[HOTEND_INDEX] = (lpq[lpq_ptr] * planner.steps_to_mm[E_AXIS]) * PID_PARAM(Kc, HOTEND_INDEX); - pid_output += cTerm[HOTEND_INDEX]; - } - #endif // PID_EXTRUSION_SCALING - - if (pid_output > PID_MAX) { - if (pid_error[HOTEND_INDEX] > 0) temp_iState[HOTEND_INDEX] -= pid_error[HOTEND_INDEX]; // conditional un-integration - pid_output = PID_MAX; - } - else if (pid_output < 0) { - if (pid_error[HOTEND_INDEX] < 0) temp_iState[HOTEND_INDEX] -= pid_error[HOTEND_INDEX]; // conditional un-integration - pid_output = 0; - } - } - #else - pid_output = constrain(target_temperature[HOTEND_INDEX], 0, PID_MAX); - #endif //PID_OPENLOOP - - #if ENABLED(PID_DEBUG) - SERIAL_ECHO_START; - SERIAL_ECHOPAIR(MSG_PID_DEBUG, HOTEND_INDEX); - SERIAL_ECHOPAIR(MSG_PID_DEBUG_INPUT, current_temperature[HOTEND_INDEX]); - SERIAL_ECHOPAIR(MSG_PID_DEBUG_OUTPUT, pid_output); - SERIAL_ECHOPAIR(MSG_PID_DEBUG_PTERM, pTerm[HOTEND_INDEX]); - SERIAL_ECHOPAIR(MSG_PID_DEBUG_ITERM, iTerm[HOTEND_INDEX]); - SERIAL_ECHOPAIR(MSG_PID_DEBUG_DTERM, dTerm[HOTEND_INDEX]); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(MSG_PID_DEBUG_CTERM, cTerm[HOTEND_INDEX]); - #endif - SERIAL_EOL; - #endif //PID_DEBUG - - #else /* PID off */ - pid_output = (current_temperature[HOTEND_INDEX] < target_temperature[HOTEND_INDEX]) ? PID_MAX : 0; - #endif - - return pid_output; -} - -#if ENABLED(PIDTEMPBED) - float Temperature::get_pid_output_bed() { - float pid_output; - #if DISABLED(PID_OPENLOOP) - pid_error_bed = target_temperature_bed - current_temperature_bed; - pTerm_bed = bedKp * pid_error_bed; - temp_iState_bed += pid_error_bed; - temp_iState_bed = constrain(temp_iState_bed, temp_iState_min_bed, temp_iState_max_bed); - iTerm_bed = bedKi * temp_iState_bed; - - dTerm_bed = K2 * bedKd * (current_temperature_bed - temp_dState_bed) + K1 * dTerm_bed; - temp_dState_bed = current_temperature_bed; - - pid_output = pTerm_bed + iTerm_bed - dTerm_bed; - if (pid_output > MAX_BED_POWER) { - if (pid_error_bed > 0) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output = MAX_BED_POWER; - } - else if (pid_output < 0) { - if (pid_error_bed < 0) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output = 0; - } - #else - pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER); - #endif // PID_OPENLOOP - - #if ENABLED(PID_BED_DEBUG) - SERIAL_ECHO_START; - SERIAL_ECHOPGM(" PID_BED_DEBUG "); - SERIAL_ECHOPGM(": Input "); - SERIAL_ECHO(current_temperature_bed); - SERIAL_ECHOPGM(" Output "); - SERIAL_ECHO(pid_output); - SERIAL_ECHOPGM(" pTerm "); - SERIAL_ECHO(pTerm_bed); - SERIAL_ECHOPGM(" iTerm "); - SERIAL_ECHO(iTerm_bed); - SERIAL_ECHOPGM(" dTerm "); - SERIAL_ECHOLN(dTerm_bed); - #endif //PID_BED_DEBUG - - return pid_output; - } -#endif //PIDTEMPBED - -/** - * Manage heating activities for extruder hot-ends and a heated bed - * - Acquire updated temperature readings - * - Also resets the watchdog timer - * - Invoke thermal runaway protection - * - Manage extruder auto-fan - * - Apply filament width to the extrusion rate (may move) - * - Update the heated bed PID output value - */ -void Temperature::manage_heater() { - -#ifdef SWIFT_TEST_MODE - - return; -#endif - - if (!temp_meas_ready) return; - - updateTemperaturesFromRawValues(); // also resets the watchdog - - #if ENABLED(HEATER_0_USES_MAX6675) - float ct = current_temperature[0]; - if (ct > min(HEATER_0_MAXTEMP, 1023)) max_temp_error(0); - if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0); - #endif - - #if (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) || (ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0) || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN - millis_t ms = millis(); - #endif - - // Loop through all hotends - HOTEND_LOOP() { - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) - thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS); - #endif - - float pid_output = get_pid_output(e); - - // Check if temperature is within the correct range - soft_pwm[e] = (current_temperature[e] > minttemp[e] || is_preheating(e)) && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0; - - // Check if the temperature is failing to increase - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - - // Is it time to check this extruder's heater? - if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) { - // Has it failed to increase enough? - if (degHotend(e) < watch_target_temp[e]) { - // Stop! - _temp_error(e, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); - } - else { - // Start again if the target is still far off - start_watching_heater(e); - } - } - - #endif // THERMAL_PROTECTION_HOTENDS - - // Check if the temperature is failing to increase - #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - - // Is it time to check the bed? - if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) { - // Has it failed to increase enough? - if (degBed() < watch_target_bed_temp) { - // Stop! - _temp_error(-1, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD)); - } - else { - // Start again if the target is still far off - start_watching_bed(); - } - } - - #endif // THERMAL_PROTECTION_HOTENDS - - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) { - _temp_error(0, PSTR(MSG_REDUNDANCY), PSTR(MSG_ERR_REDUNDANT_TEMP)); - } - #endif - - } // Hotends Loop - - #if HAS_AUTO_FAN - if (ELAPSED(ms, next_auto_fan_check_ms)) { // only need to check fan state very infrequently - checkExtruderAutoFans(); - next_auto_fan_check_ms = ms + 2500UL; - } - #endif - - // Control the extruder rate based on the width sensor - #if ENABLED(FILAMENT_WIDTH_SENSOR) - if (filament_sensor) { - meas_shift_index = filwidth_delay_index1 - meas_delay_cm; - if (meas_shift_index < 0) meas_shift_index += MAX_MEASUREMENT_DELAY + 1; //loop around buffer if needed - - // Get the delayed info and add 100 to reconstitute to a percent of - // the nominal filament diameter then square it to get an area - meas_shift_index = constrain(meas_shift_index, 0, MAX_MEASUREMENT_DELAY); - float vm = pow((measurement_delay[meas_shift_index] + 100.0) * 0.01, 2); - NOLESS(vm, 0.01); - volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = vm; - } - #endif //FILAMENT_WIDTH_SENSOR - - #if DISABLED(PIDTEMPBED) - if (PENDING(ms, next_bed_check_ms)) return; - next_bed_check_ms = ms + BED_CHECK_INTERVAL; - #endif - - #if TEMP_SENSOR_BED != 0 - - #if HAS_THERMALLY_PROTECTED_BED - thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); - #endif - - #if ENABLED(PIDTEMPBED) - float pid_output = get_pid_output_bed(); - - soft_pwm_bed = current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP ? (int)pid_output >> 1 : 0; - - #elif ENABLED(BED_LIMIT_SWITCHING) - // Check if temperature is within the correct band - if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) { - if (current_temperature_bed >= target_temperature_bed + BED_HYSTERESIS) - soft_pwm_bed = 0; - else if (current_temperature_bed <= target_temperature_bed - (BED_HYSTERESIS)) - soft_pwm_bed = MAX_BED_POWER >> 1; - } - else { - soft_pwm_bed = 0; - WRITE_HEATER_BED(LOW); - } - #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING - // Check if temperature is within the correct range - if (current_temperature_bed > BED_MINTEMP && current_temperature_bed < BED_MAXTEMP) { - soft_pwm_bed = current_temperature_bed < target_temperature_bed ? MAX_BED_POWER >> 1 : 0; - } - else { - soft_pwm_bed = 0; - WRITE_HEATER_BED(LOW); - } - #endif - #endif //TEMP_SENSOR_BED != 0 -} - -#define PGM_RD_W(x) (short)pgm_read_word(&x) - -// Derived from RepRap FiveD extruder::getTemperature() -// For hot end temperature measurement. -float Temperature::analog2temp(int raw, uint8_t e) { - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - if (e > HOTENDS) - #else - if (e >= HOTENDS) - #endif - { - SERIAL_ERROR_START; - SERIAL_ERROR((int)e); - SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER_NUM); - kill(PSTR(MSG_KILLED)); - return 0.0; - } - - #if ENABLED(HEATER_0_USES_MAX6675) - if (e == 0) return 0.25 * raw; - #endif - - if (heater_ttbl_map[e] != NULL) { - float celsius = 0; - uint8_t i; - short(*tt)[][2] = (short(*)[][2])(heater_ttbl_map[e]); - - for (i = 1; i < heater_ttbllen_map[e]; i++) { - if (PGM_RD_W((*tt)[i][0]) > raw) { - celsius = PGM_RD_W((*tt)[i - 1][1]) + - (raw - PGM_RD_W((*tt)[i - 1][0])) * - (float)(PGM_RD_W((*tt)[i][1]) - PGM_RD_W((*tt)[i - 1][1])) / - (float)(PGM_RD_W((*tt)[i][0]) - PGM_RD_W((*tt)[i - 1][0])); - break; - } - } - - // Overflow: Set to last value in the table - if (i == heater_ttbllen_map[e]) celsius = PGM_RD_W((*tt)[i - 1][1]); - - return celsius; - } - return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET; -} - -// Derived from RepRap FiveD extruder::getTemperature() -// For bed temperature measurement. -float Temperature::analog2tempBed(int raw) { - #if ENABLED(BED_USES_THERMISTOR) - float celsius = 0; - byte i; - - for (i = 1; i < BEDTEMPTABLE_LEN; i++) { - if (PGM_RD_W(BEDTEMPTABLE[i][0]) > raw) { - celsius = PGM_RD_W(BEDTEMPTABLE[i - 1][1]) + - (raw - PGM_RD_W(BEDTEMPTABLE[i - 1][0])) * - (float)(PGM_RD_W(BEDTEMPTABLE[i][1]) - PGM_RD_W(BEDTEMPTABLE[i - 1][1])) / - (float)(PGM_RD_W(BEDTEMPTABLE[i][0]) - PGM_RD_W(BEDTEMPTABLE[i - 1][0])); - break; - } - } - - // Overflow: Set to last value in the table - if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i - 1][1]); - - return celsius; - - #elif defined(BED_USES_AD595) - - return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN)) + TEMP_SENSOR_AD595_OFFSET; - - #else - - UNUSED(raw); - return 0; - - #endif -} - -/** - * Get the raw values into the actual temperatures. - * The raw values are created in interrupt context, - * and this function is called from normal context - * as it would block the stepper routine. - */ -void Temperature::updateTemperaturesFromRawValues() { - #if ENABLED(HEATER_0_USES_MAX6675) - current_temperature_raw[0] = read_max6675(); - #endif - HOTEND_LOOP() { - current_temperature[e] = Temperature::analog2temp(current_temperature_raw[e], e); - } - current_temperature_bed = Temperature::analog2tempBed(current_temperature_bed_raw); - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - redundant_temperature = Temperature::analog2temp(redundant_temperature_raw, 1); - #endif - #if ENABLED(FILAMENT_WIDTH_SENSOR) - filament_width_meas = analog2widthFil(); - #endif - - #if ENABLED(USE_WATCHDOG) - // Reset the watchdog after we know we have a temperature measurement. - watchdog_reset(); - #endif - - CRITICAL_SECTION_START; - temp_meas_ready = false; - CRITICAL_SECTION_END; -} - - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - - // Convert raw Filament Width to millimeters - float Temperature::analog2widthFil() { - return current_raw_filwidth / 16383.0 * 5.0; - //return current_raw_filwidth; - } - - // Convert raw Filament Width to a ratio - int Temperature::widthFil_to_size_ratio() { - float temp = filament_width_meas; - if (temp < MEASURED_LOWER_LIMIT) temp = filament_width_nominal; //assume sensor cut out - else NOMORE(temp, MEASURED_UPPER_LIMIT); - return filament_width_nominal / temp * 100; - } - -#endif - - -/** - * Initialize the temperature manager - * The manager is implemented by periodic calls to manage_heater() - */ -void Temperature::init() { - - #if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1)) - //disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector - MCUCR = _BV(JTD); - MCUCR = _BV(JTD); - #endif - - // Finish init of mult hotend arrays - HOTEND_LOOP() { - // populate with the first value - maxttemp[e] = maxttemp[0]; - #if ENABLED(PIDTEMP) - temp_iState_min[e] = 0.0; - temp_iState_max[e] = (PID_INTEGRAL_DRIVE_MAX) / PID_PARAM(Ki, e); - #if ENABLED(PID_EXTRUSION_SCALING) - last_e_position = 0; - #endif - #endif //PIDTEMP - #if ENABLED(PIDTEMPBED) - temp_iState_min_bed = 0.0; - temp_iState_max_bed = (PID_BED_INTEGRAL_DRIVE_MAX) / bedKi; - #endif //PIDTEMPBED - } - - #if ENABLED(PIDTEMP) && ENABLED(PID_EXTRUSION_SCALING) - last_e_position = 0; - #endif - - #if HAS_HEATER_0 - SET_OUTPUT(HEATER_0_PIN); - #endif - #if HAS_HEATER_1 - SET_OUTPUT(HEATER_1_PIN); - #endif - #if HAS_HEATER_2 - SET_OUTPUT(HEATER_2_PIN); - #endif - #if HAS_HEATER_3 - SET_OUTPUT(HEATER_3_PIN); - #endif - #if HAS_HEATER_BED - SET_OUTPUT(HEATER_BED_PIN); - #endif - - #if ENABLED(FAST_PWM_FAN) || ENABLED(FAN_SOFT_PWM) - - #if HAS_FAN0 - SET_OUTPUT(FAN_PIN); - #if ENABLED(FAST_PWM_FAN) - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 - #endif - #endif - #if ENABLED(FAN_SOFT_PWM) - soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2; - #endif - #endif - - #if HAS_FAN1 - SET_OUTPUT(FAN1_PIN); - #if ENABLED(FAST_PWM_FAN) - setPwmFrequency(FAN1_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 - #endif - #if ENABLED(FAN_SOFT_PWM) - soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2; - #endif - #endif - - #if HAS_FAN2 - SET_OUTPUT(FAN2_PIN); - #if ENABLED(FAST_PWM_FAN) - setPwmFrequency(FAN2_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 - #endif - #if ENABLED(FAN_SOFT_PWM) - soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2; - #endif - #endif - - #endif // FAST_PWM_FAN || FAN_SOFT_PWM - - #if ENABLED(HEATER_0_USES_MAX6675) - - #if DISABLED(SDSUPPORT) - OUT_WRITE(SCK_PIN, LOW); - OUT_WRITE(MOSI_PIN, HIGH); - OUT_WRITE(MISO_PIN, HIGH); - #else - OUT_WRITE(SS_PIN, HIGH); - #endif - - OUT_WRITE(MAX6675_SS, HIGH); - - #endif //HEATER_0_USES_MAX6675 - - #ifdef DIDR2 - #define ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin - 8); }while(0) - #else - #define ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0) - #endif - - // Set analog inputs - ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07; - DIDR0 = 0; - #ifdef DIDR2 - DIDR2 = 0; - #endif - #if HAS_TEMP_0 - ANALOG_SELECT(TEMP_0_PIN); - #endif - #if HAS_TEMP_1 - ANALOG_SELECT(TEMP_1_PIN); - #endif - #if HAS_TEMP_2 - ANALOG_SELECT(TEMP_2_PIN); - #endif - #if HAS_TEMP_3 - ANALOG_SELECT(TEMP_3_PIN); - #endif - #if HAS_TEMP_BED - ANALOG_SELECT(TEMP_BED_PIN); - #endif - #if ENABLED(FILAMENT_WIDTH_SENSOR) - ANALOG_SELECT(FILWIDTH_PIN); - #endif - - #if HAS_AUTO_FAN_0 - pinMode(EXTRUDER_0_AUTO_FAN_PIN, OUTPUT); - #endif - #if HAS_AUTO_FAN_1 && (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) - pinMode(EXTRUDER_1_AUTO_FAN_PIN, OUTPUT); - #endif - #if HAS_AUTO_FAN_2 && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN) - pinMode(EXTRUDER_2_AUTO_FAN_PIN, OUTPUT); - #endif - #if HAS_AUTO_FAN_3 && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN) - pinMode(EXTRUDER_3_AUTO_FAN_PIN, OUTPUT); - #endif - - // Use timer0 for temperature measurement - // Interleave temperature interrupt with millies interrupt - OCR0B = 128; - SBI(TIMSK0, OCIE0B); - - // Wait for temperature measurement to settle - delay(250); - - #define TEMP_MIN_ROUTINE(NR) \ - minttemp[NR] = HEATER_ ## NR ## _MINTEMP; \ - while(analog2temp(minttemp_raw[NR], NR) < HEATER_ ## NR ## _MINTEMP) { \ - if (HEATER_ ## NR ## _RAW_LO_TEMP < HEATER_ ## NR ## _RAW_HI_TEMP) \ - minttemp_raw[NR] += OVERSAMPLENR; \ - else \ - minttemp_raw[NR] -= OVERSAMPLENR; \ - } - #define TEMP_MAX_ROUTINE(NR) \ - maxttemp[NR] = HEATER_ ## NR ## _MAXTEMP; \ - while(analog2temp(maxttemp_raw[NR], NR) > HEATER_ ## NR ## _MAXTEMP) { \ - if (HEATER_ ## NR ## _RAW_LO_TEMP < HEATER_ ## NR ## _RAW_HI_TEMP) \ - maxttemp_raw[NR] -= OVERSAMPLENR; \ - else \ - maxttemp_raw[NR] += OVERSAMPLENR; \ - } - - #ifdef HEATER_0_MINTEMP - TEMP_MIN_ROUTINE(0); - #endif - #ifdef HEATER_0_MAXTEMP - TEMP_MAX_ROUTINE(0); - #endif - #if HOTENDS > 1 - #ifdef HEATER_1_MINTEMP - TEMP_MIN_ROUTINE(1); - #endif - #ifdef HEATER_1_MAXTEMP - TEMP_MAX_ROUTINE(1); - #endif - #if HOTENDS > 2 - #ifdef HEATER_2_MINTEMP - TEMP_MIN_ROUTINE(2); - #endif - #ifdef HEATER_2_MAXTEMP - TEMP_MAX_ROUTINE(2); - #endif - #if HOTENDS > 3 - #ifdef HEATER_3_MINTEMP - TEMP_MIN_ROUTINE(3); - #endif - #ifdef HEATER_3_MAXTEMP - TEMP_MAX_ROUTINE(3); - #endif - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - - #ifdef BED_MINTEMP - while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) { - #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP - bed_minttemp_raw += OVERSAMPLENR; - #else - bed_minttemp_raw -= OVERSAMPLENR; - #endif - } - #endif //BED_MINTEMP - #ifdef BED_MAXTEMP - while (analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) { - #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP - bed_maxttemp_raw -= OVERSAMPLENR; - #else - bed_maxttemp_raw += OVERSAMPLENR; - #endif - } - #endif //BED_MAXTEMP -} - -#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - /** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. - * This is called when the temperature is set. (M104, M109) - */ - void Temperature::start_watching_heater(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - if (degHotend(HOTEND_INDEX) < degTargetHotend(HOTEND_INDEX) - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1)) { - watch_target_temp[HOTEND_INDEX] = degHotend(HOTEND_INDEX) + WATCH_TEMP_INCREASE; - watch_heater_next_ms[HOTEND_INDEX] = millis() + (WATCH_TEMP_PERIOD) * 1000UL; - } - else - watch_heater_next_ms[HOTEND_INDEX] = 0; - } -#endif - -#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - /** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. - * This is called when the temperature is set. (M140, M190) - */ - void Temperature::start_watching_bed() { - if (degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) { - watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE; - watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL; - } - else - watch_bed_next_ms = 0; - } -#endif - -#if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) - Temperature::TRState Temperature::thermal_runaway_state_machine[HOTENDS] = { TRInactive }; - millis_t Temperature::thermal_runaway_timer[HOTENDS] = { 0 }; - #endif - - #if HAS_THERMALLY_PROTECTED_BED - Temperature::TRState Temperature::thermal_runaway_bed_state_machine = TRInactive; - millis_t Temperature::thermal_runaway_bed_timer; - #endif - - void Temperature::thermal_runaway_protection(Temperature::TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) { - - static float tr_target_temperature[HOTENDS + 1] = { 0.0 }; - - /** - SERIAL_ECHO_START; - SERIAL_ECHOPGM("Thermal Thermal Runaway Running. Heater ID: "); - if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHO(heater_id); - SERIAL_ECHOPAIR(" ; State:", *state); - SERIAL_ECHOPAIR(" ; Timer:", *timer); - SERIAL_ECHOPAIR(" ; Temperature:", temperature); - SERIAL_ECHOPAIR(" ; Target Temp:", target_temperature); - SERIAL_EOL; - */ - - int heater_index = heater_id >= 0 ? heater_id : HOTENDS; - - // If the target temperature changes, restart - if (tr_target_temperature[heater_index] != target_temperature) { - tr_target_temperature[heater_index] = target_temperature; - *state = target_temperature > 0 ? TRFirstHeating : TRInactive; - } - - switch (*state) { - // Inactive state waits for a target temperature to be set - case TRInactive: break; - // When first heating, wait for the temperature to be reached then go to Stable state - case TRFirstHeating: - if (temperature < tr_target_temperature[heater_index]) break; - *state = TRStable; - // While the temperature is stable watch for a bad temperature - case TRStable: - if (temperature < tr_target_temperature[heater_index] - hysteresis_degc && ELAPSED(millis(), *timer)) - *state = TRRunaway; - else { - *timer = millis() + period_seconds * 1000UL; - break; - } - case TRRunaway: - _temp_error(heater_id, PSTR(MSG_T_THERMAL_RUNAWAY), PSTR(MSG_THERMAL_RUNAWAY)); - } - } - -#endif // THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED - -void Temperature::disable_all_heaters() { - HOTEND_LOOP() setTargetHotend(0, e); - setTargetBed(0); - - // If all heaters go down then for sure our print job has stopped - print_job_timer.stop(); - - #define DISABLE_HEATER(NR) { \ - setTargetHotend(0, NR); \ - soft_pwm[NR] = 0; \ - WRITE_HEATER_ ## NR (LOW); \ - } - - #if HAS_TEMP_HOTEND - setTargetHotend(0, 0); - soft_pwm[0] = 0; - #ifndef SWIFT_TEST_MODE - WRITE_HEATER_0P(LOW); // Should HEATERS_PARALLEL apply here? Then change to DISABLE_HEATER(0) - #endif - #endif - - #if HOTENDS > 1 && HAS_TEMP_1 - DISABLE_HEATER(1); - #endif - - #if HOTENDS > 2 && HAS_TEMP_2 - DISABLE_HEATER(2); - #endif - - #if HOTENDS > 3 && HAS_TEMP_3 - DISABLE_HEATER(3); - #endif - - #if HAS_TEMP_BED - target_temperature_bed = 0; - soft_pwm_bed = 0; - #if HAS_HEATER_BED - WRITE_HEATER_BED(LOW); - #endif - #endif -} - -#if ENABLED(HEATER_0_USES_MAX6675) - - #define MAX6675_HEAT_INTERVAL 250u - - #if ENABLED(MAX6675_IS_MAX31855) - uint32_t max6675_temp = 2000; - #define MAX6675_ERROR_MASK 7 - #define MAX6675_DISCARD_BITS 18 - #define MAX6675_SPEED_BITS (_BV(SPR1)) // clock ÷ 64 - #else - uint16_t max6675_temp = 2000; - #define MAX6675_ERROR_MASK 4 - #define MAX6675_DISCARD_BITS 3 - #define MAX6675_SPEED_BITS (_BV(SPR0)) // clock ÷ 16 - #endif - - int Temperature::read_max6675() { - - static millis_t next_max6675_ms = 0; - - millis_t ms = millis(); - - if (PENDING(ms, next_max6675_ms)) return (int)max6675_temp; - - next_max6675_ms = ms + MAX6675_HEAT_INTERVAL; - - CBI( - #ifdef PRR - PRR - #elif defined(PRR0) - PRR0 - #endif - , PRSPI); - SPCR = _BV(MSTR) | _BV(SPE) | MAX6675_SPEED_BITS; - - WRITE(MAX6675_SS, 0); // enable TT_MAX6675 - - // ensure 100ns delay - a bit extra is fine - asm("nop");//50ns on 20Mhz, 62.5ns on 16Mhz - asm("nop");//50ns on 20Mhz, 62.5ns on 16Mhz - - // Read a big-endian temperature value - max6675_temp = 0; - for (uint8_t i = sizeof(max6675_temp); i--;) { - SPDR = 0; - for (;!TEST(SPSR, SPIF);); - max6675_temp |= SPDR; - if (i > 0) max6675_temp <<= 8; // shift left if not the last byte - } - - WRITE(MAX6675_SS, 1); // disable TT_MAX6675 - - if (max6675_temp & MAX6675_ERROR_MASK) - max6675_temp = 4000; // thermocouple open - else - max6675_temp >>= MAX6675_DISCARD_BITS; - - return (int)max6675_temp; - } - -#endif //HEATER_0_USES_MAX6675 - -/** - * Get raw temperatures - */ -void Temperature::set_current_temp_raw() { - #if HAS_TEMP_0 && DISABLED(HEATER_0_USES_MAX6675) - current_temperature_raw[0] = raw_temp_value[0]; - #endif - #if HAS_TEMP_1 - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - redundant_temperature_raw = raw_temp_value[1]; - #else - current_temperature_raw[1] = raw_temp_value[1]; - #endif - #if HAS_TEMP_2 - current_temperature_raw[2] = raw_temp_value[2]; - #if HAS_TEMP_3 - current_temperature_raw[3] = raw_temp_value[3]; - #endif - #endif - #endif - current_temperature_bed_raw = raw_temp_bed_value; - temp_meas_ready = true; -} - -/** - * Timer 0 is shared with millies - * - Manage PWM to all the heaters and fan - * - Update the raw temperature values - * - Check new temperature values for MIN/MAX errors - * - Step the babysteps value for each axis towards 0 - */ -ISR(TIMER0_COMPB_vect) { Temperature::isr(); } - -void Temperature::isr() { - - static unsigned char temp_count = 0; - static TempState temp_state = StartupDelay; - static unsigned char pwm_count = _BV(SOFT_PWM_SCALE); - - // Static members for each heater - #if ENABLED(SLOW_PWM_HEATERS) - static unsigned char slow_pwm_count = 0; - #define ISR_STATICS(n) \ - static unsigned char soft_pwm_ ## n; \ - static unsigned char state_heater_ ## n = 0; \ - static unsigned char state_timer_heater_ ## n = 0 - #else - #define ISR_STATICS(n) static unsigned char soft_pwm_ ## n - #endif - - // Statics per heater - ISR_STATICS(0); - #if (HOTENDS > 1) || ENABLED(HEATERS_PARALLEL) - ISR_STATICS(1); - #if HOTENDS > 2 - ISR_STATICS(2); - #if HOTENDS > 3 - ISR_STATICS(3); - #endif - #endif - #endif - #if HAS_HEATER_BED - ISR_STATICS(BED); - #endif - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - static unsigned long raw_filwidth_value = 0; - #endif - - #if DISABLED(SLOW_PWM_HEATERS) - /** - * standard PWM modulation - */ - if (pwm_count == 0) { - soft_pwm_0 = soft_pwm[0]; - #ifndef SWIFT_TEST_MODE - if (soft_pwm_0 > 0) { - WRITE_HEATER_0(1); - } - else WRITE_HEATER_0P(0); // If HEATERS_PARALLEL should apply, change to WRITE_HEATER_0 - #endif - #if HOTENDS > 1 - soft_pwm_1 = soft_pwm[1]; - WRITE_HEATER_1(soft_pwm_1 > 0 ? 1 : 0); - #if HOTENDS > 2 - soft_pwm_2 = soft_pwm[2]; - WRITE_HEATER_2(soft_pwm_2 > 0 ? 1 : 0); - #if HOTENDS > 3 - soft_pwm_3 = soft_pwm[3]; - WRITE_HEATER_3(soft_pwm_3 > 0 ? 1 : 0); - #endif - #endif - #endif - - #if HAS_HEATER_BED - soft_pwm_BED = soft_pwm_bed; - WRITE_HEATER_BED(soft_pwm_BED > 0 ? 1 : 0); - #endif - - #if ENABLED(FAN_SOFT_PWM) - #if HAS_FAN0 - soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2; - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0); - #endif - #endif - #if HAS_FAN1 - soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2; - WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0); - #endif - #if HAS_FAN2 - soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2; - WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0); - #endif - #endif - } - -#ifndef SWIFT_TEST_MODE - - if (soft_pwm_0 < pwm_count) WRITE_HEATER_0(0); -#endif - #if HOTENDS > 1 - if (soft_pwm_1 < pwm_count) WRITE_HEATER_1(0); - #if HOTENDS > 2 - if (soft_pwm_2 < pwm_count) WRITE_HEATER_2(0); - #if HOTENDS > 3 - if (soft_pwm_3 < pwm_count) WRITE_HEATER_3(0); - #endif - #endif - #endif - - #if HAS_HEATER_BED - if (soft_pwm_BED < pwm_count) WRITE_HEATER_BED(0); - #endif - - #if ENABLED(FAN_SOFT_PWM) - #if HAS_FAN0 - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - if (soft_pwm_fan[0] < pwm_count) WRITE_FAN(0); - #endif - #endif - #if HAS_FAN1 - if (soft_pwm_fan[1] < pwm_count) WRITE_FAN1(0); - #endif - #if HAS_FAN2 - if (soft_pwm_fan[2] < pwm_count) WRITE_FAN2(0); - #endif - #endif - - pwm_count += _BV(SOFT_PWM_SCALE); - pwm_count &= 0x7f; - - #else // SLOW_PWM_HEATERS - - /** - * SLOW PWM HEATERS - * - * for heaters drived by relay - */ - #ifndef MIN_STATE_TIME - #define MIN_STATE_TIME 16 // MIN_STATE_TIME * 65.5 = time in milliseconds - #endif - - // Macros for Slow PWM timer logic - HEATERS_PARALLEL applies - #define _SLOW_PWM_ROUTINE(NR, src) \ - soft_pwm_ ## NR = src; \ - if (soft_pwm_ ## NR > 0) { \ - if (state_timer_heater_ ## NR == 0) { \ - if (state_heater_ ## NR == 0) state_timer_heater_ ## NR = MIN_STATE_TIME; \ - state_heater_ ## NR = 1; \ - WRITE_HEATER_ ## NR(1); \ - } \ - } \ - else { \ - if (state_timer_heater_ ## NR == 0) { \ - if (state_heater_ ## NR == 1) state_timer_heater_ ## NR = MIN_STATE_TIME; \ - state_heater_ ## NR = 0; \ - WRITE_HEATER_ ## NR(0); \ - } \ - } - #define SLOW_PWM_ROUTINE(n) _SLOW_PWM_ROUTINE(n, soft_pwm[n]) - - #define PWM_OFF_ROUTINE(NR) \ - if (soft_pwm_ ## NR < slow_pwm_count) { \ - if (state_timer_heater_ ## NR == 0) { \ - if (state_heater_ ## NR == 1) state_timer_heater_ ## NR = MIN_STATE_TIME; \ - state_heater_ ## NR = 0; \ - WRITE_HEATER_ ## NR (0); \ - } \ - } - - if (slow_pwm_count == 0) { - - SLOW_PWM_ROUTINE(0); // EXTRUDER 0 - #if HOTENDS > 1 - SLOW_PWM_ROUTINE(1); // EXTRUDER 1 - #if HOTENDS > 2 - SLOW_PWM_ROUTINE(2); // EXTRUDER 2 - #if HOTENDS > 3 - SLOW_PWM_ROUTINE(3); // EXTRUDER 3 - #endif - #endif - #endif - #if HAS_HEATER_BED - _SLOW_PWM_ROUTINE(BED, soft_pwm_bed); // BED - #endif - - } // slow_pwm_count == 0 - - PWM_OFF_ROUTINE(0); // EXTRUDER 0 - #if HOTENDS > 1 - PWM_OFF_ROUTINE(1); // EXTRUDER 1 - #if HOTENDS > 2 - PWM_OFF_ROUTINE(2); // EXTRUDER 2 - #if HOTENDS > 3 - PWM_OFF_ROUTINE(3); // EXTRUDER 3 - #endif - #endif - #endif - #if HAS_HEATER_BED - PWM_OFF_ROUTINE(BED); // BED - #endif - - #if ENABLED(FAN_SOFT_PWM) - if (pwm_count == 0) { - #if HAS_FAN0 - soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2; - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0); - #endif - #endif - #if HAS_FAN1 - soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2; - WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0); - #endif - #if HAS_FAN2 - soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2; - WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0); - #endif - } - #if HAS_FAN0 - #ifndef SWIFT_TEST_MODE - #ifdef UARM_SWIFT - if (is_fan_enable()) - #endif - if (soft_pwm_fan[0] < pwm_count) WRITE_FAN(0); - #endif - #endif - #if HAS_FAN1 - if (soft_pwm_fan[1] < pwm_count) WRITE_FAN1(0); - #endif - #if HAS_FAN2 - if (soft_pwm_fan[2] < pwm_count) WRITE_FAN2(0); - #endif - #endif //FAN_SOFT_PWM - - pwm_count += _BV(SOFT_PWM_SCALE); - pwm_count &= 0x7f; - - // increment slow_pwm_count only every 64 pwm_count circa 65.5ms - if ((pwm_count % 64) == 0) { - slow_pwm_count++; - slow_pwm_count &= 0x7f; - - // EXTRUDER 0 - if (state_timer_heater_0 > 0) state_timer_heater_0--; - #if HOTENDS > 1 // EXTRUDER 1 - if (state_timer_heater_1 > 0) state_timer_heater_1--; - #if HOTENDS > 2 // EXTRUDER 2 - if (state_timer_heater_2 > 0) state_timer_heater_2--; - #if HOTENDS > 3 // EXTRUDER 3 - if (state_timer_heater_3 > 0) state_timer_heater_3--; - #endif - #endif - #endif - #if HAS_HEATER_BED - if (state_timer_heater_BED > 0) state_timer_heater_BED--; - #endif - } // (pwm_count % 64) == 0 - - #endif // SLOW_PWM_HEATERS - - #define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC) - #ifdef MUX5 - #define START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin) - #else - #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin) - #endif - - // Prepare or measure a sensor, each one every 12th frame - switch (temp_state) { - case PrepareTemp_0: - #if HAS_TEMP_0 - START_ADC(TEMP_0_PIN); - #endif - lcd_buttons_update(); - temp_state = MeasureTemp_0; - break; - case MeasureTemp_0: - #if HAS_TEMP_0 - raw_temp_value[0] += ADC; - #endif - temp_state = PrepareTemp_BED; - break; - - case PrepareTemp_BED: - #if HAS_TEMP_BED - START_ADC(TEMP_BED_PIN); - #endif - lcd_buttons_update(); - temp_state = MeasureTemp_BED; - break; - case MeasureTemp_BED: - #if HAS_TEMP_BED - raw_temp_bed_value += ADC; - #endif - temp_state = PrepareTemp_1; - break; - - case PrepareTemp_1: - #if HAS_TEMP_1 - START_ADC(TEMP_1_PIN); - #endif - lcd_buttons_update(); - temp_state = MeasureTemp_1; - break; - case MeasureTemp_1: - #if HAS_TEMP_1 - raw_temp_value[1] += ADC; - #endif - temp_state = PrepareTemp_2; - break; - - case PrepareTemp_2: - #if HAS_TEMP_2 - START_ADC(TEMP_2_PIN); - #endif - lcd_buttons_update(); - temp_state = MeasureTemp_2; - break; - case MeasureTemp_2: - #if HAS_TEMP_2 - raw_temp_value[2] += ADC; - #endif - temp_state = PrepareTemp_3; - break; - - case PrepareTemp_3: - #if HAS_TEMP_3 - START_ADC(TEMP_3_PIN); - #endif - lcd_buttons_update(); - temp_state = MeasureTemp_3; - break; - case MeasureTemp_3: - #if HAS_TEMP_3 - raw_temp_value[3] += ADC; - #endif - temp_state = Prepare_FILWIDTH; - break; - - case Prepare_FILWIDTH: - #if ENABLED(FILAMENT_WIDTH_SENSOR) - START_ADC(FILWIDTH_PIN); - #endif - lcd_buttons_update(); - temp_state = Measure_FILWIDTH; - break; - case Measure_FILWIDTH: - #if ENABLED(FILAMENT_WIDTH_SENSOR) - // raw_filwidth_value += ADC; //remove to use an IIR filter approach - if (ADC > 102) { //check that ADC is reading a voltage > 0.5 volts, otherwise don't take in the data. - raw_filwidth_value -= (raw_filwidth_value >> 7); //multiply raw_filwidth_value by 127/128 - raw_filwidth_value += ((unsigned long)ADC << 7); //add new ADC reading - } - #endif - temp_state = PrepareTemp_0; - temp_count++; - break; - - case StartupDelay: - temp_state = PrepareTemp_0; - break; - - // default: - // SERIAL_ERROR_START; - // SERIAL_ERRORLNPGM("Temp measurement error!"); - // break; - } // switch(temp_state) - - if (temp_count >= OVERSAMPLENR) { // 10 * 16 * 1/(16000000/64/256) = 164ms. - // Update the raw values if they've been read. Else we could be updating them during reading. - if (!temp_meas_ready) set_current_temp_raw(); - - // Filament Sensor - can be read any time since IIR filtering is used - #if ENABLED(FILAMENT_WIDTH_SENSOR) - current_raw_filwidth = raw_filwidth_value >> 10; // Divide to get to 0-16384 range since we used 1/128 IIR filter approach - #endif - - temp_count = 0; - for (int i = 0; i < 4; i++) raw_temp_value[i] = 0; - raw_temp_bed_value = 0; - - #if HAS_TEMP_0 && DISABLED(HEATER_0_USES_MAX6675) - #if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP - #define GE0 <= - #else - #define GE0 >= - #endif - if (current_temperature_raw[0] GE0 maxttemp_raw[0]) max_temp_error(0); - if (minttemp_raw[0] GE0 current_temperature_raw[0] && !is_preheating(0) && target_temperature[0] > 0.0f) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[0] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error(0); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[0] = 0; - #endif - #endif - - #if HAS_TEMP_1 && HOTENDS > 1 - #if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP - #define GE1 <= - #else - #define GE1 >= - #endif - if (current_temperature_raw[1] GE1 maxttemp_raw[1]) max_temp_error(1); - if (minttemp_raw[1] GE1 current_temperature_raw[1] && !is_preheating(1) && target_temperature[1] > 0.0f) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[1] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error(1); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[1] = 0; - #endif - #endif // TEMP_SENSOR_1 - - #if HAS_TEMP_2 && HOTENDS > 2 - #if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP - #define GE2 <= - #else - #define GE2 >= - #endif - if (current_temperature_raw[2] GE2 maxttemp_raw[2]) max_temp_error(2); - if (minttemp_raw[2] GE2 current_temperature_raw[2] && !is_preheating(2) && target_temperature[2] > 0.0f) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[2] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error(2); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[2] = 0; - #endif - #endif // TEMP_SENSOR_2 - - #if HAS_TEMP_3 && HOTENDS > 3 - #if HEATER_3_RAW_LO_TEMP > HEATER_3_RAW_HI_TEMP - #define GE3 <= - #else - #define GE3 >= - #endif - if (current_temperature_raw[3] GE3 maxttemp_raw[3]) max_temp_error(3); - if (minttemp_raw[3] GE3 current_temperature_raw[3] && !is_preheating(3) && target_temperature[3] > 0.0f) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[3] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error(3); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[3] = 0; - #endif - #endif // TEMP_SENSOR_3 - - #if HAS_TEMP_BED - #if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP - #define GEBED <= - #else - #define GEBED >= - #endif - if (current_temperature_bed_raw GEBED bed_maxttemp_raw) _temp_error(-1, PSTR(MSG_T_MAXTEMP), PSTR(MSG_ERR_MAXTEMP_BED)); - if (bed_minttemp_raw GEBED current_temperature_bed_raw) _temp_error(-1, PSTR(MSG_T_MINTEMP), PSTR(MSG_ERR_MINTEMP_BED)); - #endif - - } // temp_count >= OVERSAMPLENR - - #if ENABLED(BABYSTEPPING) - for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) { - int curTodo = babystepsTodo[axis]; //get rid of volatile for performance - - if (curTodo > 0) { - stepper.babystep(axis,/*fwd*/true); - babystepsTodo[axis]--; //fewer to do next time - } - else if (curTodo < 0) { - stepper.babystep(axis,/*fwd*/false); - babystepsTodo[axis]++; //fewer to do next time - } - } - #endif //BABYSTEPPING -} diff --git a/Marlin/temperature.h b/Marlin/temperature.h deleted file mode 100644 index ffb47a5..0000000 --- a/Marlin/temperature.h +++ /dev/null @@ -1,465 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * temperature.h - temperature controller - */ - -#ifndef TEMPERATURE_H -#define TEMPERATURE_H - -#include "planner.h" -#include "thermistortables.h" - -#include "MarlinConfig.h" - -#if ENABLED(PID_EXTRUSION_SCALING) - #include "stepper.h" -#endif - -#ifndef SOFT_PWM_SCALE - #define SOFT_PWM_SCALE 0 -#endif - -#if HOTENDS == 1 - #define HOTEND_LOOP() const int8_t e = 0; - #define HOTEND_INDEX 0 - #define EXTRUDER_IDX 0 -#else - #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) - #define HOTEND_INDEX e - #define EXTRUDER_IDX active_extruder -#endif - -class Temperature { - - public: - - static float current_temperature[HOTENDS], - current_temperature_bed; - static int current_temperature_raw[HOTENDS], - target_temperature[HOTENDS], - current_temperature_bed_raw, - target_temperature_bed; - - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - static float redundant_temperature; - #endif - - static unsigned char soft_pwm_bed; - - #if ENABLED(FAN_SOFT_PWM) - static unsigned char fanSpeedSoftPwm[FAN_COUNT]; - #endif - - #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED) - #define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0)) - #endif - - #if ENABLED(PIDTEMP) - - #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1 - - static float Kp[HOTENDS], Ki[HOTENDS], Kd[HOTENDS]; - #if ENABLED(PID_EXTRUSION_SCALING) - static float Kc[HOTENDS]; - #endif - #define PID_PARAM(param, h) Temperature::param[h] - - #else - - static float Kp, Ki, Kd; - #if ENABLED(PID_EXTRUSION_SCALING) - static float Kc; - #endif - #define PID_PARAM(param, h) Temperature::param - - #endif // PID_PARAMS_PER_HOTEND - - // Apply the scale factors to the PID values - #define scalePID_i(i) ( (i) * PID_dT ) - #define unscalePID_i(i) ( (i) / PID_dT ) - #define scalePID_d(d) ( (d) / PID_dT ) - #define unscalePID_d(d) ( (d) * PID_dT ) - - #endif - - #if ENABLED(PIDTEMPBED) - static float bedKp, bedKi, bedKd; - #endif - - #if ENABLED(BABYSTEPPING) - static volatile int babystepsTodo[3]; - #endif - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - static int watch_target_temp[HOTENDS]; - static millis_t watch_heater_next_ms[HOTENDS]; - #endif - - #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - static int watch_target_bed_temp; - static millis_t watch_bed_next_ms; - #endif - - #if ENABLED(PREVENT_DANGEROUS_EXTRUDE) - static bool allow_cold_extrude; - static float extrude_min_temp; - static bool tooColdToExtrude(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return allow_cold_extrude ? false : degHotend(HOTEND_INDEX) < extrude_min_temp; - } - #else - static bool tooColdToExtrude(uint8_t e) { UNUSED(e); return false; } - #endif - - private: - - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - static int redundant_temperature_raw; - static float redundant_temperature; - #endif - - static volatile bool temp_meas_ready; - - #if ENABLED(PIDTEMP) - static float temp_iState[HOTENDS], - temp_dState[HOTENDS], - pTerm[HOTENDS], - iTerm[HOTENDS], - dTerm[HOTENDS]; - - #if ENABLED(PID_EXTRUSION_SCALING) - static float cTerm[HOTENDS]; - static long last_e_position; - static long lpq[LPQ_MAX_LEN]; - static int lpq_ptr; - #endif - - static float pid_error[HOTENDS], - temp_iState_min[HOTENDS], - temp_iState_max[HOTENDS]; - static bool pid_reset[HOTENDS]; - #endif - - #if ENABLED(PIDTEMPBED) - static float temp_iState_bed, - temp_dState_bed, - pTerm_bed, - iTerm_bed, - dTerm_bed, - pid_error_bed, - temp_iState_min_bed, - temp_iState_max_bed; - #else - static millis_t next_bed_check_ms; - #endif - - static unsigned long raw_temp_value[4], - raw_temp_bed_value; - - // Init min and max temp with extreme values to prevent false errors during startup - static int minttemp_raw[HOTENDS], - maxttemp_raw[HOTENDS], - minttemp[HOTENDS], - maxttemp[HOTENDS]; - - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - static int consecutive_low_temperature_error[HOTENDS]; - #endif - - #ifdef MILLISECONDS_PREHEAT_TIME - static unsigned long preheat_end_time[HOTENDS]; - #endif - - #ifdef BED_MINTEMP - static int bed_minttemp_raw; - #endif - - #ifdef BED_MAXTEMP - static int bed_maxttemp_raw; - #endif - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - static int meas_shift_index; // Index of a delayed sample in buffer - #endif - - #if HAS_AUTO_FAN - static millis_t next_auto_fan_check_ms; - #endif - - static unsigned char soft_pwm[HOTENDS]; - - #if ENABLED(FAN_SOFT_PWM) - static unsigned char soft_pwm_fan[FAN_COUNT]; - #endif - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - static int current_raw_filwidth; //Holds measured filament diameter - one extruder only - #endif - - public: - - /** - * Instance Methods - */ - - Temperature(); - - void init(); - - /** - * Static (class) methods - */ - static float analog2temp(int raw, uint8_t e); - static float analog2tempBed(int raw); - - /** - * Called from the Temperature ISR - */ - static void isr(); - - /** - * Call periodically to manage heaters - */ - static void manage_heater(); - - /** - * Preheating hotends - */ - #ifdef MILLISECONDS_PREHEAT_TIME - static bool is_preheating(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]); - } - static void start_preheat_time(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME; - } - static void reset_preheat_time(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - preheat_end_time[HOTEND_INDEX] = 0; - } - #else - #define is_preheating(n) (false) - #endif - - #if ENABLED(FILAMENT_WIDTH_SENSOR) - static float analog2widthFil(); // Convert raw Filament Width to millimeters - static int widthFil_to_size_ratio(); // Convert raw Filament Width to an extrusion ratio - #endif - - - //high level conversion routines, for use outside of temperature.cpp - //inline so that there is no performance decrease. - //deg=degreeCelsius - - static float degHotend(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return current_temperature[HOTEND_INDEX]; - } - static float degBed() { return current_temperature_bed; } - - #if ENABLED(SHOW_TEMP_ADC_VALUES) - static float rawHotendTemp(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return current_temperature_raw[HOTEND_INDEX]; - } - static float rawBedTemp() { return current_temperature_bed_raw; } - #endif - - static float degTargetHotend(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return target_temperature[HOTEND_INDEX]; - } - static float degTargetBed() { return target_temperature_bed; } - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - static void start_watching_heater(uint8_t e = 0); - #endif - - #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - static void start_watching_bed(); - #endif - - static void setTargetHotend(const float& celsius, uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - #ifdef MILLISECONDS_PREHEAT_TIME - if (celsius == 0.0f) - reset_preheat_time(HOTEND_INDEX); - else if (target_temperature[HOTEND_INDEX] == 0.0f) - start_preheat_time(HOTEND_INDEX); - #endif - target_temperature[HOTEND_INDEX] = celsius; - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - start_watching_heater(HOTEND_INDEX); - #endif - } - - static void setTargetBed(const float& celsius) { - target_temperature_bed = celsius; - #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - start_watching_bed(); - #endif - } - - static bool isHeatingHotend(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return target_temperature[HOTEND_INDEX] > current_temperature[HOTEND_INDEX]; - } - static bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; } - - static bool isCoolingHotend(uint8_t e) { - #if HOTENDS == 1 - UNUSED(e); - #endif - return target_temperature[HOTEND_INDEX] < current_temperature[HOTEND_INDEX]; - } - static bool isCoolingBed() { return target_temperature_bed < current_temperature_bed; } - - /** - * The software PWM power for a heater - */ - static int getHeaterPower(int heater); - - /** - * Switch off all heaters, set all target temperatures to 0 - */ - static void disable_all_heaters(); - - /** - * Perform auto-tuning for hotend or bed in response to M303 - */ - #if HAS_PID_HEATING - static void PID_autotune(float temp, int hotend, int ncycles, bool set_result=false); - #endif - - /** - * Update the temp manager when PID values change - */ - static void updatePID(); - - static void autotempShutdown() { - #if ENABLED(AUTOTEMP) - if (planner.autotemp_enabled) { - planner.autotemp_enabled = false; - if (degTargetHotend(EXTRUDER_IDX) > planner.autotemp_min) - setTargetHotend(0, EXTRUDER_IDX); - } - #endif - } - - #if ENABLED(BABYSTEPPING) - - static void babystep_axis(AxisEnum axis, int distance) { - #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ) - #if ENABLED(BABYSTEP_XY) - switch (axis) { - case CORE_AXIS_1: // X on CoreXY and CoreXZ, Y on CoreYZ - babystepsTodo[CORE_AXIS_1] += distance * 2; - babystepsTodo[CORE_AXIS_2] += distance * 2; - break; - case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ and CoreYZ - babystepsTodo[CORE_AXIS_1] += distance * 2; - babystepsTodo[CORE_AXIS_2] -= distance * 2; - break; - case NORMAL_AXIS: // Z on CoreXY, Y on CoreXZ, X on CoreYZ - babystepsTodo[NORMAL_AXIS] += distance; - break; - } - #elif ENABLED(COREXZ) || ENABLED(COREYZ) - // Only Z stepping needs to be handled here - babystepsTodo[CORE_AXIS_1] += distance * 2; - babystepsTodo[CORE_AXIS_2] -= distance * 2; - #else - babystepsTodo[Z_AXIS] += distance; - #endif - #else - babystepsTodo[axis] += distance; - #endif - } - - #endif // BABYSTEPPING - - private: - - static void set_current_temp_raw(); - - static void updateTemperaturesFromRawValues(); - - #if ENABLED(HEATER_0_USES_MAX6675) - static int read_max6675(); - #endif - - static void checkExtruderAutoFans(); - - static float get_pid_output(int e); - - #if ENABLED(PIDTEMPBED) - static float get_pid_output_bed(); - #endif - - static void _temp_error(int e, const char* serial_msg, const char* lcd_msg); - static void min_temp_error(uint8_t e); - static void max_temp_error(uint8_t e); - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED - - typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate; - - static void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc); - - #if ENABLED(THERMAL_PROTECTION_HOTENDS) - static TRState thermal_runaway_state_machine[HOTENDS]; - static millis_t thermal_runaway_timer[HOTENDS]; - #endif - - #if HAS_THERMALLY_PROTECTED_BED - static TRState thermal_runaway_bed_state_machine; - static millis_t thermal_runaway_bed_timer; - #endif - - #endif // THERMAL_PROTECTION - -}; - -extern Temperature thermalManager; - -#endif // TEMPERATURE_H diff --git a/Marlin/thermistornames.h b/Marlin/thermistornames.h deleted file mode 100644 index 64829ce..0000000 --- a/Marlin/thermistornames.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#undef THERMISTOR_NAME - -// Thermcouples -#if THERMISTOR_ID == -3 - #define THERMISTOR_NAME "MAX31855" -#elif THERMISTOR_ID == -2 - #define THERMISTOR_NAME "MAX6675" -#elif THERMISTOR_ID == -1 - #define THERMISTOR_NAME "AD595" - -// Standard thermistors -#elif THERMISTOR_ID == 1 - #define THERMISTOR_NAME "EPCOS 100K" -#elif THERMISTOR_ID == 2 - #define THERMISTOR_NAME "ATC 204GT-2" -#elif THERMISTOR_ID == 3 - #define THERMISTOR_NAME "Mendel-parts" -#elif THERMISTOR_ID == 4 - #define THERMISTOR_NAME "Generic 10K" -#elif THERMISTOR_ID == 5 - #define THERMISTOR_NAME "ATC 104GT-2" -#elif THERMISTOR_ID == 6 - #define THERMISTOR_NAME "EPCOS (alt)" -#elif THERMISTOR_ID == 7 - #define THERMISTOR_NAME "HW 104LAG" -#elif THERMISTOR_ID == 71 - #define THERMISTOR_NAME "HW 104LAF" -#elif THERMISTOR_ID == 8 - #define THERMISTOR_NAME "E3104FXT" -#elif THERMISTOR_ID == 9 - #define THERMISTOR_NAME "GE AL03006" -#elif THERMISTOR_ID == 10 - #define THERMISTOR_NAME "RS 198-961" -#elif THERMISTOR_ID == 11 - #define THERMISTOR_NAME "1% beta 3950" -#elif THERMISTOR_ID == 12 - #define THERMISTOR_NAME "E3104FXT (alt)" -#elif THERMISTOR_ID == 13 - #define THERMISTOR_NAME "Hisens 3950" -#elif THERMISTOR_ID == 20 - #define THERMISTOR_NAME "PT100 UltiMB" -#elif THERMISTOR_ID == 60 - #define THERMISTOR_NAME "Makers Tool" -#elif THERMISTOR_ID == 70 - #define THERMISTOR_NAME "Hephestos 2" - -// Modified thermistors -#elif THERMISTOR_ID == 51 - #define THERMISTOR_NAME "EPCOS 1K" -#elif THERMISTOR_ID == 52 - #define THERMISTOR_NAME "ATC204GT-2 1K" -#elif THERMISTOR_ID == 55 - #define THERMISTOR_NAME "ATC104GT-2 1K" -#elif THERMISTOR_ID == 1047 - #define THERMISTOR_NAME "PT1000 4K7" -#elif THERMISTOR_ID == 1010 - #define THERMISTOR_NAME "PT1000 1K" -#elif THERMISTOR_ID == 147 - #define THERMISTOR_NAME "PT100 4K7" -#elif THERMISTOR_ID == 110 - #define THERMISTOR_NAME "PT100 1K" - -// High Temperature thermistors -#elif THERMISTOR_ID == 66 - #define THERMISTOR_NAME "Dyze 4.7M" - -// Dummies for dev testing -#elif THERMISTOR_ID == 998 - #define THERMISTOR_NAME "Dummy 1" -#elif THERMISTOR_ID == 999 - #define THERMISTOR_NAME "Dummy 2" - -#endif // THERMISTOR_ID diff --git a/Marlin/thermistortables.h b/Marlin/thermistortables.h deleted file mode 100644 index 7980b72..0000000 --- a/Marlin/thermistortables.h +++ /dev/null @@ -1,1323 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef THERMISTORTABLES_H_ -#define THERMISTORTABLES_H_ - -#include "Marlin.h" -#include "macros.h" - -#define OVERSAMPLENR 16 - -#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORBED == n) - -#if ANY_THERMISTOR_IS(1) // 100k bed thermistor -const short temptable_1[][2] PROGMEM = { - { 23 * OVERSAMPLENR, 300 }, - { 25 * OVERSAMPLENR, 295 }, - { 27 * OVERSAMPLENR, 290 }, - { 28 * OVERSAMPLENR, 285 }, - { 31 * OVERSAMPLENR, 280 }, - { 33 * OVERSAMPLENR, 275 }, - { 35 * OVERSAMPLENR, 270 }, - { 38 * OVERSAMPLENR, 265 }, - { 41 * OVERSAMPLENR, 260 }, - { 44 * OVERSAMPLENR, 255 }, - { 48 * OVERSAMPLENR, 250 }, - { 52 * OVERSAMPLENR, 245 }, - { 56 * OVERSAMPLENR, 240 }, - { 61 * OVERSAMPLENR, 235 }, - { 66 * OVERSAMPLENR, 230 }, - { 71 * OVERSAMPLENR, 225 }, - { 78 * OVERSAMPLENR, 220 }, - { 84 * OVERSAMPLENR, 215 }, - { 92 * OVERSAMPLENR, 210 }, - { 100 * OVERSAMPLENR, 205 }, - { 109 * OVERSAMPLENR, 200 }, - { 120 * OVERSAMPLENR, 195 }, - { 131 * OVERSAMPLENR, 190 }, - { 143 * OVERSAMPLENR, 185 }, - { 156 * OVERSAMPLENR, 180 }, - { 171 * OVERSAMPLENR, 175 }, - { 187 * OVERSAMPLENR, 170 }, - { 205 * OVERSAMPLENR, 165 }, - { 224 * OVERSAMPLENR, 160 }, - { 245 * OVERSAMPLENR, 155 }, - { 268 * OVERSAMPLENR, 150 }, - { 293 * OVERSAMPLENR, 145 }, - { 320 * OVERSAMPLENR, 140 }, - { 348 * OVERSAMPLENR, 135 }, - { 379 * OVERSAMPLENR, 130 }, - { 411 * OVERSAMPLENR, 125 }, - { 445 * OVERSAMPLENR, 120 }, - { 480 * OVERSAMPLENR, 115 }, - { 516 * OVERSAMPLENR, 110 }, - { 553 * OVERSAMPLENR, 105 }, - { 591 * OVERSAMPLENR, 100 }, - { 628 * OVERSAMPLENR, 95 }, - { 665 * OVERSAMPLENR, 90 }, - { 702 * OVERSAMPLENR, 85 }, - { 737 * OVERSAMPLENR, 80 }, - { 770 * OVERSAMPLENR, 75 }, - { 801 * OVERSAMPLENR, 70 }, - { 830 * OVERSAMPLENR, 65 }, - { 857 * OVERSAMPLENR, 60 }, - { 881 * OVERSAMPLENR, 55 }, - { 903 * OVERSAMPLENR, 50 }, - { 922 * OVERSAMPLENR, 45 }, - { 939 * OVERSAMPLENR, 40 }, - { 954 * OVERSAMPLENR, 35 }, - { 966 * OVERSAMPLENR, 30 }, - { 977 * OVERSAMPLENR, 25 }, - { 985 * OVERSAMPLENR, 20 }, - { 993 * OVERSAMPLENR, 15 }, - { 999 * OVERSAMPLENR, 10 }, - { 1004 * OVERSAMPLENR, 5 }, - { 1008 * OVERSAMPLENR, 0 } // safety -}; -#endif - -#if ANY_THERMISTOR_IS(2) // 200k bed thermistor -// 200k ATC Semitec 204GT-2 -// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf -// Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance -const short temptable_2[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 848 }, - { 30 * OVERSAMPLENR, 300 }, // top rating 300C - { 34 * OVERSAMPLENR, 290 }, - { 39 * OVERSAMPLENR, 280 }, - { 46 * OVERSAMPLENR, 270 }, - { 53 * OVERSAMPLENR, 260 }, - { 63 * OVERSAMPLENR, 250 }, - { 74 * OVERSAMPLENR, 240 }, - { 87 * OVERSAMPLENR, 230 }, - { 104 * OVERSAMPLENR, 220 }, - { 124 * OVERSAMPLENR, 210 }, - { 148 * OVERSAMPLENR, 200 }, - { 176 * OVERSAMPLENR, 190 }, - { 211 * OVERSAMPLENR, 180 }, - { 252 * OVERSAMPLENR, 170 }, - { 301 * OVERSAMPLENR, 160 }, - { 357 * OVERSAMPLENR, 150 }, - { 420 * OVERSAMPLENR, 140 }, - { 489 * OVERSAMPLENR, 130 }, - { 562 * OVERSAMPLENR, 120 }, - { 636 * OVERSAMPLENR, 110 }, - { 708 * OVERSAMPLENR, 100 }, - { 775 * OVERSAMPLENR, 90 }, - { 835 * OVERSAMPLENR, 80 }, - { 884 * OVERSAMPLENR, 70 }, - { 924 * OVERSAMPLENR, 60 }, - { 955 * OVERSAMPLENR, 50 }, - { 977 * OVERSAMPLENR, 40 }, - { 993 * OVERSAMPLENR, 30 }, - { 1004 * OVERSAMPLENR, 20 }, - { 1012 * OVERSAMPLENR, 10 }, - { 1016 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(3) // mendel-parts -const short temptable_3[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 864 }, - { 21 * OVERSAMPLENR, 300 }, - { 25 * OVERSAMPLENR, 290 }, - { 29 * OVERSAMPLENR, 280 }, - { 33 * OVERSAMPLENR, 270 }, - { 39 * OVERSAMPLENR, 260 }, - { 46 * OVERSAMPLENR, 250 }, - { 54 * OVERSAMPLENR, 240 }, - { 64 * OVERSAMPLENR, 230 }, - { 75 * OVERSAMPLENR, 220 }, - { 90 * OVERSAMPLENR, 210 }, - { 107 * OVERSAMPLENR, 200 }, - { 128 * OVERSAMPLENR, 190 }, - { 154 * OVERSAMPLENR, 180 }, - { 184 * OVERSAMPLENR, 170 }, - { 221 * OVERSAMPLENR, 160 }, - { 265 * OVERSAMPLENR, 150 }, - { 316 * OVERSAMPLENR, 140 }, - { 375 * OVERSAMPLENR, 130 }, - { 441 * OVERSAMPLENR, 120 }, - { 513 * OVERSAMPLENR, 110 }, - { 588 * OVERSAMPLENR, 100 }, - { 734 * OVERSAMPLENR, 80 }, - { 856 * OVERSAMPLENR, 60 }, - { 938 * OVERSAMPLENR, 40 }, - { 986 * OVERSAMPLENR, 20 }, - { 1008 * OVERSAMPLENR, 0 }, - { 1018 * OVERSAMPLENR, -20 } -}; -#endif - -#if ANY_THERMISTOR_IS(4) // 10k thermistor -const short temptable_4[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 430 }, - { 54 * OVERSAMPLENR, 137 }, - { 107 * OVERSAMPLENR, 107 }, - { 160 * OVERSAMPLENR, 91 }, - { 213 * OVERSAMPLENR, 80 }, - { 266 * OVERSAMPLENR, 71 }, - { 319 * OVERSAMPLENR, 64 }, - { 372 * OVERSAMPLENR, 57 }, - { 425 * OVERSAMPLENR, 51 }, - { 478 * OVERSAMPLENR, 46 }, - { 531 * OVERSAMPLENR, 41 }, - { 584 * OVERSAMPLENR, 35 }, - { 637 * OVERSAMPLENR, 30 }, - { 690 * OVERSAMPLENR, 25 }, - { 743 * OVERSAMPLENR, 20 }, - { 796 * OVERSAMPLENR, 14 }, - { 849 * OVERSAMPLENR, 7 }, - { 902 * OVERSAMPLENR, 0 }, - { 955 * OVERSAMPLENR, -11 }, - { 1008 * OVERSAMPLENR, -35 } -}; -#endif - -#if ANY_THERMISTOR_IS(5) // 100k ParCan thermistor (104GT-2) -// ATC Semitec 104GT-2 (Used in ParCan) -// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf -// Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance -const short temptable_5[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 713 }, - { 17 * OVERSAMPLENR, 300 }, // top rating 300C - { 20 * OVERSAMPLENR, 290 }, - { 23 * OVERSAMPLENR, 280 }, - { 27 * OVERSAMPLENR, 270 }, - { 31 * OVERSAMPLENR, 260 }, - { 37 * OVERSAMPLENR, 250 }, - { 43 * OVERSAMPLENR, 240 }, - { 51 * OVERSAMPLENR, 230 }, - { 61 * OVERSAMPLENR, 220 }, - { 73 * OVERSAMPLENR, 210 }, - { 87 * OVERSAMPLENR, 200 }, - { 106 * OVERSAMPLENR, 190 }, - { 128 * OVERSAMPLENR, 180 }, - { 155 * OVERSAMPLENR, 170 }, - { 189 * OVERSAMPLENR, 160 }, - { 230 * OVERSAMPLENR, 150 }, - { 278 * OVERSAMPLENR, 140 }, - { 336 * OVERSAMPLENR, 130 }, - { 402 * OVERSAMPLENR, 120 }, - { 476 * OVERSAMPLENR, 110 }, - { 554 * OVERSAMPLENR, 100 }, - { 635 * OVERSAMPLENR, 90 }, - { 713 * OVERSAMPLENR, 80 }, - { 784 * OVERSAMPLENR, 70 }, - { 846 * OVERSAMPLENR, 60 }, - { 897 * OVERSAMPLENR, 50 }, - { 937 * OVERSAMPLENR, 40 }, - { 966 * OVERSAMPLENR, 30 }, - { 986 * OVERSAMPLENR, 20 }, - { 1000 * OVERSAMPLENR, 10 }, - { 1010 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(6) // 100k Epcos thermistor -const short temptable_6[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 350 }, - { 28 * OVERSAMPLENR, 250 }, // top rating 250C - { 31 * OVERSAMPLENR, 245 }, - { 35 * OVERSAMPLENR, 240 }, - { 39 * OVERSAMPLENR, 235 }, - { 42 * OVERSAMPLENR, 230 }, - { 44 * OVERSAMPLENR, 225 }, - { 49 * OVERSAMPLENR, 220 }, - { 53 * OVERSAMPLENR, 215 }, - { 62 * OVERSAMPLENR, 210 }, - { 71 * OVERSAMPLENR, 205 }, // fitted graphically - { 78 * OVERSAMPLENR, 200 }, // fitted graphically - { 94 * OVERSAMPLENR, 190 }, - { 102 * OVERSAMPLENR, 185 }, - { 116 * OVERSAMPLENR, 170 }, - { 143 * OVERSAMPLENR, 160 }, - { 183 * OVERSAMPLENR, 150 }, - { 223 * OVERSAMPLENR, 140 }, - { 270 * OVERSAMPLENR, 130 }, - { 318 * OVERSAMPLENR, 120 }, - { 383 * OVERSAMPLENR, 110 }, - { 413 * OVERSAMPLENR, 105 }, - { 439 * OVERSAMPLENR, 100 }, - { 484 * OVERSAMPLENR, 95 }, - { 513 * OVERSAMPLENR, 90 }, - { 607 * OVERSAMPLENR, 80 }, - { 664 * OVERSAMPLENR, 70 }, - { 781 * OVERSAMPLENR, 60 }, - { 810 * OVERSAMPLENR, 55 }, - { 849 * OVERSAMPLENR, 50 }, - { 914 * OVERSAMPLENR, 45 }, - { 914 * OVERSAMPLENR, 40 }, - { 935 * OVERSAMPLENR, 35 }, - { 954 * OVERSAMPLENR, 30 }, - { 970 * OVERSAMPLENR, 25 }, - { 978 * OVERSAMPLENR, 22 }, - { 1008 * OVERSAMPLENR, 3 }, - { 1023 * OVERSAMPLENR, 0 } // to allow internal 0 degrees C -}; -#endif - -#if ANY_THERMISTOR_IS(7) // 100k Honeywell 135-104LAG-J01 -const short temptable_7[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 941 }, - { 19 * OVERSAMPLENR, 362 }, - { 37 * OVERSAMPLENR, 299 }, // top rating 300C - { 55 * OVERSAMPLENR, 266 }, - { 73 * OVERSAMPLENR, 245 }, - { 91 * OVERSAMPLENR, 229 }, - { 109 * OVERSAMPLENR, 216 }, - { 127 * OVERSAMPLENR, 206 }, - { 145 * OVERSAMPLENR, 197 }, - { 163 * OVERSAMPLENR, 190 }, - { 181 * OVERSAMPLENR, 183 }, - { 199 * OVERSAMPLENR, 177 }, - { 217 * OVERSAMPLENR, 171 }, - { 235 * OVERSAMPLENR, 166 }, - { 253 * OVERSAMPLENR, 162 }, - { 271 * OVERSAMPLENR, 157 }, - { 289 * OVERSAMPLENR, 153 }, - { 307 * OVERSAMPLENR, 149 }, - { 325 * OVERSAMPLENR, 146 }, - { 343 * OVERSAMPLENR, 142 }, - { 361 * OVERSAMPLENR, 139 }, - { 379 * OVERSAMPLENR, 135 }, - { 397 * OVERSAMPLENR, 132 }, - { 415 * OVERSAMPLENR, 129 }, - { 433 * OVERSAMPLENR, 126 }, - { 451 * OVERSAMPLENR, 123 }, - { 469 * OVERSAMPLENR, 121 }, - { 487 * OVERSAMPLENR, 118 }, - { 505 * OVERSAMPLENR, 115 }, - { 523 * OVERSAMPLENR, 112 }, - { 541 * OVERSAMPLENR, 110 }, - { 559 * OVERSAMPLENR, 107 }, - { 577 * OVERSAMPLENR, 105 }, - { 595 * OVERSAMPLENR, 102 }, - { 613 * OVERSAMPLENR, 99 }, - { 631 * OVERSAMPLENR, 97 }, - { 649 * OVERSAMPLENR, 94 }, - { 667 * OVERSAMPLENR, 92 }, - { 685 * OVERSAMPLENR, 89 }, - { 703 * OVERSAMPLENR, 86 }, - { 721 * OVERSAMPLENR, 84 }, - { 739 * OVERSAMPLENR, 81 }, - { 757 * OVERSAMPLENR, 78 }, - { 775 * OVERSAMPLENR, 75 }, - { 793 * OVERSAMPLENR, 72 }, - { 811 * OVERSAMPLENR, 69 }, - { 829 * OVERSAMPLENR, 66 }, - { 847 * OVERSAMPLENR, 62 }, - { 865 * OVERSAMPLENR, 59 }, - { 883 * OVERSAMPLENR, 55 }, - { 901 * OVERSAMPLENR, 51 }, - { 919 * OVERSAMPLENR, 46 }, - { 937 * OVERSAMPLENR, 41 }, - { 955 * OVERSAMPLENR, 35 }, - { 973 * OVERSAMPLENR, 27 }, - { 991 * OVERSAMPLENR, 17 }, - { 1009 * OVERSAMPLENR, 1 }, - { 1023 * OVERSAMPLENR, 0 } // to allow internal 0 degrees C -}; -#endif - -#if ANY_THERMISTOR_IS(71) // 100k Honeywell 135-104LAF-J01 -// R0 = 100000 Ohm -// T0 = 25 °C -// Beta = 3974 -// R1 = 0 Ohm -// R2 = 4700 Ohm -const short temptable_71[][2] PROGMEM = { - { 35 * OVERSAMPLENR, 300 }, - { 51 * OVERSAMPLENR, 270 }, - { 54 * OVERSAMPLENR, 265 }, - { 58 * OVERSAMPLENR, 260 }, - { 59 * OVERSAMPLENR, 258 }, - { 61 * OVERSAMPLENR, 256 }, - { 63 * OVERSAMPLENR, 254 }, - { 64 * OVERSAMPLENR, 252 }, - { 66 * OVERSAMPLENR, 250 }, - { 67 * OVERSAMPLENR, 249 }, - { 68 * OVERSAMPLENR, 248 }, - { 69 * OVERSAMPLENR, 247 }, - { 70 * OVERSAMPLENR, 246 }, - { 71 * OVERSAMPLENR, 245 }, - { 72 * OVERSAMPLENR, 244 }, - { 73 * OVERSAMPLENR, 243 }, - { 74 * OVERSAMPLENR, 242 }, - { 75 * OVERSAMPLENR, 241 }, - { 76 * OVERSAMPLENR, 240 }, - { 77 * OVERSAMPLENR, 239 }, - { 78 * OVERSAMPLENR, 238 }, - { 79 * OVERSAMPLENR, 237 }, - { 80 * OVERSAMPLENR, 236 }, - { 81 * OVERSAMPLENR, 235 }, - { 82 * OVERSAMPLENR, 234 }, - { 84 * OVERSAMPLENR, 233 }, - { 85 * OVERSAMPLENR, 232 }, - { 86 * OVERSAMPLENR, 231 }, - { 87 * OVERSAMPLENR, 230 }, - { 89 * OVERSAMPLENR, 229 }, - { 90 * OVERSAMPLENR, 228 }, - { 91 * OVERSAMPLENR, 227 }, - { 92 * OVERSAMPLENR, 226 }, - { 94 * OVERSAMPLENR, 225 }, - { 95 * OVERSAMPLENR, 224 }, - { 97 * OVERSAMPLENR, 223 }, - { 98 * OVERSAMPLENR, 222 }, - { 99 * OVERSAMPLENR, 221 }, - { 101 * OVERSAMPLENR, 220 }, - { 102 * OVERSAMPLENR, 219 }, - { 104 * OVERSAMPLENR, 218 }, - { 106 * OVERSAMPLENR, 217 }, - { 107 * OVERSAMPLENR, 216 }, - { 109 * OVERSAMPLENR, 215 }, - { 110 * OVERSAMPLENR, 214 }, - { 112 * OVERSAMPLENR, 213 }, - { 114 * OVERSAMPLENR, 212 }, - { 115 * OVERSAMPLENR, 211 }, - { 117 * OVERSAMPLENR, 210 }, - { 119 * OVERSAMPLENR, 209 }, - { 121 * OVERSAMPLENR, 208 }, - { 123 * OVERSAMPLENR, 207 }, - { 125 * OVERSAMPLENR, 206 }, - { 126 * OVERSAMPLENR, 205 }, - { 128 * OVERSAMPLENR, 204 }, - { 130 * OVERSAMPLENR, 203 }, - { 132 * OVERSAMPLENR, 202 }, - { 134 * OVERSAMPLENR, 201 }, - { 136 * OVERSAMPLENR, 200 }, - { 139 * OVERSAMPLENR, 199 }, - { 141 * OVERSAMPLENR, 198 }, - { 143 * OVERSAMPLENR, 197 }, - { 145 * OVERSAMPLENR, 196 }, - { 147 * OVERSAMPLENR, 195 }, - { 150 * OVERSAMPLENR, 194 }, - { 152 * OVERSAMPLENR, 193 }, - { 154 * OVERSAMPLENR, 192 }, - { 157 * OVERSAMPLENR, 191 }, - { 159 * OVERSAMPLENR, 190 }, - { 162 * OVERSAMPLENR, 189 }, - { 164 * OVERSAMPLENR, 188 }, - { 167 * OVERSAMPLENR, 187 }, - { 170 * OVERSAMPLENR, 186 }, - { 172 * OVERSAMPLENR, 185 }, - { 175 * OVERSAMPLENR, 184 }, - { 178 * OVERSAMPLENR, 183 }, - { 181 * OVERSAMPLENR, 182 }, - { 184 * OVERSAMPLENR, 181 }, - { 187 * OVERSAMPLENR, 180 }, - { 190 * OVERSAMPLENR, 179 }, - { 193 * OVERSAMPLENR, 178 }, - { 196 * OVERSAMPLENR, 177 }, - { 199 * OVERSAMPLENR, 176 }, - { 202 * OVERSAMPLENR, 175 }, - { 205 * OVERSAMPLENR, 174 }, - { 208 * OVERSAMPLENR, 173 }, - { 212 * OVERSAMPLENR, 172 }, - { 215 * OVERSAMPLENR, 171 }, - { 219 * OVERSAMPLENR, 170 }, - { 237 * OVERSAMPLENR, 165 }, - { 256 * OVERSAMPLENR, 160 }, - { 300 * OVERSAMPLENR, 150 }, - { 351 * OVERSAMPLENR, 140 }, - { 470 * OVERSAMPLENR, 120 }, - { 504 * OVERSAMPLENR, 115 }, - { 538 * OVERSAMPLENR, 110 }, - { 552 * OVERSAMPLENR, 108 }, - { 566 * OVERSAMPLENR, 106 }, - { 580 * OVERSAMPLENR, 104 }, - { 594 * OVERSAMPLENR, 102 }, - { 608 * OVERSAMPLENR, 100 }, - { 622 * OVERSAMPLENR, 98 }, - { 636 * OVERSAMPLENR, 96 }, - { 650 * OVERSAMPLENR, 94 }, - { 664 * OVERSAMPLENR, 92 }, - { 678 * OVERSAMPLENR, 90 }, - { 712 * OVERSAMPLENR, 85 }, - { 745 * OVERSAMPLENR, 80 }, - { 758 * OVERSAMPLENR, 78 }, - { 770 * OVERSAMPLENR, 76 }, - { 783 * OVERSAMPLENR, 74 }, - { 795 * OVERSAMPLENR, 72 }, - { 806 * OVERSAMPLENR, 70 }, - { 818 * OVERSAMPLENR, 68 }, - { 829 * OVERSAMPLENR, 66 }, - { 840 * OVERSAMPLENR, 64 }, - { 850 * OVERSAMPLENR, 62 }, - { 860 * OVERSAMPLENR, 60 }, - { 870 * OVERSAMPLENR, 58 }, - { 879 * OVERSAMPLENR, 56 }, - { 888 * OVERSAMPLENR, 54 }, - { 897 * OVERSAMPLENR, 52 }, - { 905 * OVERSAMPLENR, 50 }, - { 924 * OVERSAMPLENR, 45 }, - { 940 * OVERSAMPLENR, 40 }, - { 955 * OVERSAMPLENR, 35 }, - { 967 * OVERSAMPLENR, 30 }, - { 970 * OVERSAMPLENR, 29 }, - { 972 * OVERSAMPLENR, 28 }, - { 974 * OVERSAMPLENR, 27 }, - { 976 * OVERSAMPLENR, 26 }, - { 978 * OVERSAMPLENR, 25 }, - { 980 * OVERSAMPLENR, 24 }, - { 982 * OVERSAMPLENR, 23 }, - { 984 * OVERSAMPLENR, 22 }, - { 985 * OVERSAMPLENR, 21 }, - { 987 * OVERSAMPLENR, 20 }, - { 995 * OVERSAMPLENR, 15 }, - { 1001 * OVERSAMPLENR, 10 }, - { 1006 * OVERSAMPLENR, 5 }, - { 1010 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(8) -// 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) -const short temptable_8[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 704 }, - { 54 * OVERSAMPLENR, 216 }, - { 107 * OVERSAMPLENR, 175 }, - { 160 * OVERSAMPLENR, 152 }, - { 213 * OVERSAMPLENR, 137 }, - { 266 * OVERSAMPLENR, 125 }, - { 319 * OVERSAMPLENR, 115 }, - { 372 * OVERSAMPLENR, 106 }, - { 425 * OVERSAMPLENR, 99 }, - { 478 * OVERSAMPLENR, 91 }, - { 531 * OVERSAMPLENR, 85 }, - { 584 * OVERSAMPLENR, 78 }, - { 637 * OVERSAMPLENR, 71 }, - { 690 * OVERSAMPLENR, 65 }, - { 743 * OVERSAMPLENR, 58 }, - { 796 * OVERSAMPLENR, 50 }, - { 849 * OVERSAMPLENR, 42 }, - { 902 * OVERSAMPLENR, 31 }, - { 955 * OVERSAMPLENR, 17 }, - { 1008 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(9) -// 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) -const short temptable_9[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 936 }, - { 36 * OVERSAMPLENR, 300 }, - { 71 * OVERSAMPLENR, 246 }, - { 106 * OVERSAMPLENR, 218 }, - { 141 * OVERSAMPLENR, 199 }, - { 176 * OVERSAMPLENR, 185 }, - { 211 * OVERSAMPLENR, 173 }, - { 246 * OVERSAMPLENR, 163 }, - { 281 * OVERSAMPLENR, 155 }, - { 316 * OVERSAMPLENR, 147 }, - { 351 * OVERSAMPLENR, 140 }, - { 386 * OVERSAMPLENR, 134 }, - { 421 * OVERSAMPLENR, 128 }, - { 456 * OVERSAMPLENR, 122 }, - { 491 * OVERSAMPLENR, 117 }, - { 526 * OVERSAMPLENR, 112 }, - { 561 * OVERSAMPLENR, 107 }, - { 596 * OVERSAMPLENR, 102 }, - { 631 * OVERSAMPLENR, 97 }, - { 666 * OVERSAMPLENR, 92 }, - { 701 * OVERSAMPLENR, 87 }, - { 736 * OVERSAMPLENR, 81 }, - { 771 * OVERSAMPLENR, 76 }, - { 806 * OVERSAMPLENR, 70 }, - { 841 * OVERSAMPLENR, 63 }, - { 876 * OVERSAMPLENR, 56 }, - { 911 * OVERSAMPLENR, 48 }, - { 946 * OVERSAMPLENR, 38 }, - { 981 * OVERSAMPLENR, 23 }, - { 1005 * OVERSAMPLENR, 5 }, - { 1016 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(10) -// 100k RS thermistor 198-961 (4.7k pullup) -const short temptable_10[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 929 }, - { 36 * OVERSAMPLENR, 299 }, - { 71 * OVERSAMPLENR, 246 }, - { 106 * OVERSAMPLENR, 217 }, - { 141 * OVERSAMPLENR, 198 }, - { 176 * OVERSAMPLENR, 184 }, - { 211 * OVERSAMPLENR, 173 }, - { 246 * OVERSAMPLENR, 163 }, - { 281 * OVERSAMPLENR, 154 }, - { 316 * OVERSAMPLENR, 147 }, - { 351 * OVERSAMPLENR, 140 }, - { 386 * OVERSAMPLENR, 134 }, - { 421 * OVERSAMPLENR, 128 }, - { 456 * OVERSAMPLENR, 122 }, - { 491 * OVERSAMPLENR, 117 }, - { 526 * OVERSAMPLENR, 112 }, - { 561 * OVERSAMPLENR, 107 }, - { 596 * OVERSAMPLENR, 102 }, - { 631 * OVERSAMPLENR, 97 }, - { 666 * OVERSAMPLENR, 91 }, - { 701 * OVERSAMPLENR, 86 }, - { 736 * OVERSAMPLENR, 81 }, - { 771 * OVERSAMPLENR, 76 }, - { 806 * OVERSAMPLENR, 70 }, - { 841 * OVERSAMPLENR, 63 }, - { 876 * OVERSAMPLENR, 56 }, - { 911 * OVERSAMPLENR, 48 }, - { 946 * OVERSAMPLENR, 38 }, - { 981 * OVERSAMPLENR, 23 }, - { 1005 * OVERSAMPLENR, 5 }, - { 1016 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(11) -// QU-BD silicone bed QWG-104F-3950 thermistor -const short temptable_11[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 938 }, - { 31 * OVERSAMPLENR, 314 }, - { 41 * OVERSAMPLENR, 290 }, - { 51 * OVERSAMPLENR, 272 }, - { 61 * OVERSAMPLENR, 258 }, - { 71 * OVERSAMPLENR, 247 }, - { 81 * OVERSAMPLENR, 237 }, - { 91 * OVERSAMPLENR, 229 }, - { 101 * OVERSAMPLENR, 221 }, - { 111 * OVERSAMPLENR, 215 }, - { 121 * OVERSAMPLENR, 209 }, - { 131 * OVERSAMPLENR, 204 }, - { 141 * OVERSAMPLENR, 199 }, - { 151 * OVERSAMPLENR, 195 }, - { 161 * OVERSAMPLENR, 190 }, - { 171 * OVERSAMPLENR, 187 }, - { 181 * OVERSAMPLENR, 183 }, - { 191 * OVERSAMPLENR, 179 }, - { 201 * OVERSAMPLENR, 176 }, - { 221 * OVERSAMPLENR, 170 }, - { 241 * OVERSAMPLENR, 165 }, - { 261 * OVERSAMPLENR, 160 }, - { 281 * OVERSAMPLENR, 155 }, - { 301 * OVERSAMPLENR, 150 }, - { 331 * OVERSAMPLENR, 144 }, - { 361 * OVERSAMPLENR, 139 }, - { 391 * OVERSAMPLENR, 133 }, - { 421 * OVERSAMPLENR, 128 }, - { 451 * OVERSAMPLENR, 123 }, - { 491 * OVERSAMPLENR, 117 }, - { 531 * OVERSAMPLENR, 111 }, - { 571 * OVERSAMPLENR, 105 }, - { 611 * OVERSAMPLENR, 100 }, - { 641 * OVERSAMPLENR, 95 }, - { 681 * OVERSAMPLENR, 90 }, - { 711 * OVERSAMPLENR, 85 }, - { 751 * OVERSAMPLENR, 79 }, - { 791 * OVERSAMPLENR, 72 }, - { 811 * OVERSAMPLENR, 69 }, - { 831 * OVERSAMPLENR, 65 }, - { 871 * OVERSAMPLENR, 57 }, - { 881 * OVERSAMPLENR, 55 }, - { 901 * OVERSAMPLENR, 51 }, - { 921 * OVERSAMPLENR, 45 }, - { 941 * OVERSAMPLENR, 39 }, - { 971 * OVERSAMPLENR, 28 }, - { 981 * OVERSAMPLENR, 23 }, - { 991 * OVERSAMPLENR, 17 }, - { 1001 * OVERSAMPLENR, 9 }, - { 1021 * OVERSAMPLENR, -27 } -}; -#endif - -#if ANY_THERMISTOR_IS(13) -// Hisens thermistor B25/50 =3950 +/-1% -const short temptable_13[][2] PROGMEM = { - { 20.04 * OVERSAMPLENR, 300 }, - { 23.19 * OVERSAMPLENR, 290 }, - { 26.71 * OVERSAMPLENR, 280 }, - { 31.23 * OVERSAMPLENR, 270 }, - { 36.52 * OVERSAMPLENR, 260 }, - { 42.75 * OVERSAMPLENR, 250 }, - { 50.68 * OVERSAMPLENR, 240 }, - { 60.22 * OVERSAMPLENR, 230 }, - { 72.03 * OVERSAMPLENR, 220 }, - { 86.84 * OVERSAMPLENR, 210 }, - { 102.79 * OVERSAMPLENR, 200 }, - { 124.46 * OVERSAMPLENR, 190 }, - { 151.02 * OVERSAMPLENR, 180 }, - { 182.86 * OVERSAMPLENR, 170 }, - { 220.72 * OVERSAMPLENR, 160 }, - { 316.96 * OVERSAMPLENR, 140 }, - { 447.17 * OVERSAMPLENR, 120 }, - { 590.61 * OVERSAMPLENR, 100 }, - { 737.31 * OVERSAMPLENR, 80 }, - { 857.77 * OVERSAMPLENR, 60 }, - { 939.52 * OVERSAMPLENR, 40 }, - { 986.03 * OVERSAMPLENR, 20 }, - { 1008.7 * OVERSAMPLENR, 0 } - -}; -#endif - -#if ANY_THERMISTOR_IS(20) // PT100 with INA826 amp on Ultimaker v2.0 electronics -// The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature. -// This does not match the normal thermistor behaviour so we need to set the following defines -#if (THERMISTORHEATER_0 == 20) - #define HEATER_0_RAW_HI_TEMP 16383 - #define HEATER_0_RAW_LO_TEMP 0 -#endif -#if (THERMISTORHEATER_1 == 20) - #define HEATER_1_RAW_HI_TEMP 16383 - #define HEATER_1_RAW_LO_TEMP 0 -#endif -#if (THERMISTORHEATER_2 == 20) - #define HEATER_2_RAW_HI_TEMP 16383 - #define HEATER_2_RAW_LO_TEMP 0 -#endif -#if (THERMISTORHEATER_3 == 20) - #define HEATER_3_RAW_HI_TEMP 16383 - #define HEATER_3_RAW_LO_TEMP 0 -#endif -#if (THERMISTORBED == 20) - #define HEATER_BED_RAW_HI_TEMP 16383 - #define HEATER_BED_RAW_LO_TEMP 0 -#endif -const short temptable_20[][2] PROGMEM = { - { 0 * OVERSAMPLENR, 0 }, - { 227 * OVERSAMPLENR, 1 }, - { 236 * OVERSAMPLENR, 10 }, - { 245 * OVERSAMPLENR, 20 }, - { 253 * OVERSAMPLENR, 30 }, - { 262 * OVERSAMPLENR, 40 }, - { 270 * OVERSAMPLENR, 50 }, - { 279 * OVERSAMPLENR, 60 }, - { 287 * OVERSAMPLENR, 70 }, - { 295 * OVERSAMPLENR, 80 }, - { 304 * OVERSAMPLENR, 90 }, - { 312 * OVERSAMPLENR, 100 }, - { 320 * OVERSAMPLENR, 110 }, - { 329 * OVERSAMPLENR, 120 }, - { 337 * OVERSAMPLENR, 130 }, - { 345 * OVERSAMPLENR, 140 }, - { 353 * OVERSAMPLENR, 150 }, - { 361 * OVERSAMPLENR, 160 }, - { 369 * OVERSAMPLENR, 170 }, - { 377 * OVERSAMPLENR, 180 }, - { 385 * OVERSAMPLENR, 190 }, - { 393 * OVERSAMPLENR, 200 }, - { 401 * OVERSAMPLENR, 210 }, - { 409 * OVERSAMPLENR, 220 }, - { 417 * OVERSAMPLENR, 230 }, - { 424 * OVERSAMPLENR, 240 }, - { 432 * OVERSAMPLENR, 250 }, - { 440 * OVERSAMPLENR, 260 }, - { 447 * OVERSAMPLENR, 270 }, - { 455 * OVERSAMPLENR, 280 }, - { 463 * OVERSAMPLENR, 290 }, - { 470 * OVERSAMPLENR, 300 }, - { 478 * OVERSAMPLENR, 310 }, - { 485 * OVERSAMPLENR, 320 }, - { 493 * OVERSAMPLENR, 330 }, - { 500 * OVERSAMPLENR, 340 }, - { 507 * OVERSAMPLENR, 350 }, - { 515 * OVERSAMPLENR, 360 }, - { 522 * OVERSAMPLENR, 370 }, - { 529 * OVERSAMPLENR, 380 }, - { 537 * OVERSAMPLENR, 390 }, - { 544 * OVERSAMPLENR, 400 }, - { 614 * OVERSAMPLENR, 500 }, - { 681 * OVERSAMPLENR, 600 }, - { 744 * OVERSAMPLENR, 700 }, - { 805 * OVERSAMPLENR, 800 }, - { 862 * OVERSAMPLENR, 900 }, - { 917 * OVERSAMPLENR, 1000 }, - { 968 * OVERSAMPLENR, 1100 } -}; -#endif - -#if ANY_THERMISTOR_IS(51) -// 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) -// Verified by linagee. -// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance -// Advantage: Twice the resolution and better linearity from 150C to 200C -const short temptable_51[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 350 }, - { 190 * OVERSAMPLENR, 250 }, // top rating 250C - { 203 * OVERSAMPLENR, 245 }, - { 217 * OVERSAMPLENR, 240 }, - { 232 * OVERSAMPLENR, 235 }, - { 248 * OVERSAMPLENR, 230 }, - { 265 * OVERSAMPLENR, 225 }, - { 283 * OVERSAMPLENR, 220 }, - { 302 * OVERSAMPLENR, 215 }, - { 322 * OVERSAMPLENR, 210 }, - { 344 * OVERSAMPLENR, 205 }, - { 366 * OVERSAMPLENR, 200 }, - { 390 * OVERSAMPLENR, 195 }, - { 415 * OVERSAMPLENR, 190 }, - { 440 * OVERSAMPLENR, 185 }, - { 467 * OVERSAMPLENR, 180 }, - { 494 * OVERSAMPLENR, 175 }, - { 522 * OVERSAMPLENR, 170 }, - { 551 * OVERSAMPLENR, 165 }, - { 580 * OVERSAMPLENR, 160 }, - { 609 * OVERSAMPLENR, 155 }, - { 638 * OVERSAMPLENR, 150 }, - { 666 * OVERSAMPLENR, 145 }, - { 695 * OVERSAMPLENR, 140 }, - { 722 * OVERSAMPLENR, 135 }, - { 749 * OVERSAMPLENR, 130 }, - { 775 * OVERSAMPLENR, 125 }, - { 800 * OVERSAMPLENR, 120 }, - { 823 * OVERSAMPLENR, 115 }, - { 845 * OVERSAMPLENR, 110 }, - { 865 * OVERSAMPLENR, 105 }, - { 884 * OVERSAMPLENR, 100 }, - { 901 * OVERSAMPLENR, 95 }, - { 917 * OVERSAMPLENR, 90 }, - { 932 * OVERSAMPLENR, 85 }, - { 944 * OVERSAMPLENR, 80 }, - { 956 * OVERSAMPLENR, 75 }, - { 966 * OVERSAMPLENR, 70 }, - { 975 * OVERSAMPLENR, 65 }, - { 982 * OVERSAMPLENR, 60 }, - { 989 * OVERSAMPLENR, 55 }, - { 995 * OVERSAMPLENR, 50 }, - { 1000 * OVERSAMPLENR, 45 }, - { 1004 * OVERSAMPLENR, 40 }, - { 1007 * OVERSAMPLENR, 35 }, - { 1010 * OVERSAMPLENR, 30 }, - { 1013 * OVERSAMPLENR, 25 }, - { 1015 * OVERSAMPLENR, 20 }, - { 1017 * OVERSAMPLENR, 15 }, - { 1018 * OVERSAMPLENR, 10 }, - { 1019 * OVERSAMPLENR, 5 }, - { 1020 * OVERSAMPLENR, 0 }, - { 1021 * OVERSAMPLENR, -5 } -}; -#endif - -#if ANY_THERMISTOR_IS(52) -// 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) -// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf -// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance -// Advantage: More resolution and better linearity from 150C to 200C -const short temptable_52[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 500 }, - { 125 * OVERSAMPLENR, 300 }, // top rating 300C - { 142 * OVERSAMPLENR, 290 }, - { 162 * OVERSAMPLENR, 280 }, - { 185 * OVERSAMPLENR, 270 }, - { 211 * OVERSAMPLENR, 260 }, - { 240 * OVERSAMPLENR, 250 }, - { 274 * OVERSAMPLENR, 240 }, - { 312 * OVERSAMPLENR, 230 }, - { 355 * OVERSAMPLENR, 220 }, - { 401 * OVERSAMPLENR, 210 }, - { 452 * OVERSAMPLENR, 200 }, - { 506 * OVERSAMPLENR, 190 }, - { 563 * OVERSAMPLENR, 180 }, - { 620 * OVERSAMPLENR, 170 }, - { 677 * OVERSAMPLENR, 160 }, - { 732 * OVERSAMPLENR, 150 }, - { 783 * OVERSAMPLENR, 140 }, - { 830 * OVERSAMPLENR, 130 }, - { 871 * OVERSAMPLENR, 120 }, - { 906 * OVERSAMPLENR, 110 }, - { 935 * OVERSAMPLENR, 100 }, - { 958 * OVERSAMPLENR, 90 }, - { 976 * OVERSAMPLENR, 80 }, - { 990 * OVERSAMPLENR, 70 }, - { 1000 * OVERSAMPLENR, 60 }, - { 1008 * OVERSAMPLENR, 50 }, - { 1013 * OVERSAMPLENR, 40 }, - { 1017 * OVERSAMPLENR, 30 }, - { 1019 * OVERSAMPLENR, 20 }, - { 1021 * OVERSAMPLENR, 10 }, - { 1022 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(55) -// 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) -// Verified by linagee. Source: http://shop.arcol.hu/static/datasheets/thermistors.pdf -// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance -// Advantage: More resolution and better linearity from 150C to 200C -const short temptable_55[][2] PROGMEM = { - { 1 * OVERSAMPLENR, 500 }, - { 76 * OVERSAMPLENR, 300 }, - { 87 * OVERSAMPLENR, 290 }, - { 100 * OVERSAMPLENR, 280 }, - { 114 * OVERSAMPLENR, 270 }, - { 131 * OVERSAMPLENR, 260 }, - { 152 * OVERSAMPLENR, 250 }, - { 175 * OVERSAMPLENR, 240 }, - { 202 * OVERSAMPLENR, 230 }, - { 234 * OVERSAMPLENR, 220 }, - { 271 * OVERSAMPLENR, 210 }, - { 312 * OVERSAMPLENR, 200 }, - { 359 * OVERSAMPLENR, 190 }, - { 411 * OVERSAMPLENR, 180 }, - { 467 * OVERSAMPLENR, 170 }, - { 527 * OVERSAMPLENR, 160 }, - { 590 * OVERSAMPLENR, 150 }, - { 652 * OVERSAMPLENR, 140 }, - { 713 * OVERSAMPLENR, 130 }, - { 770 * OVERSAMPLENR, 120 }, - { 822 * OVERSAMPLENR, 110 }, - { 867 * OVERSAMPLENR, 100 }, - { 905 * OVERSAMPLENR, 90 }, - { 936 * OVERSAMPLENR, 80 }, - { 961 * OVERSAMPLENR, 70 }, - { 979 * OVERSAMPLENR, 60 }, - { 993 * OVERSAMPLENR, 50 }, - { 1003 * OVERSAMPLENR, 40 }, - { 1010 * OVERSAMPLENR, 30 }, - { 1015 * OVERSAMPLENR, 20 }, - { 1018 * OVERSAMPLENR, 10 }, - { 1020 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(60) // Maker's Tool Works Kapton Bed Thermistor -// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950 -// r0: 100000 -// t0: 25 -// r1: 0 (parallel with rTherm) -// r2: 4700 (series with rTherm) -// beta: 3950 -// min adc: 1 at 0.0048828125 V -// max adc: 1023 at 4.9951171875 V -const short temptable_60[][2] PROGMEM = { - { 51 * OVERSAMPLENR, 272 }, - { 61 * OVERSAMPLENR, 258 }, - { 71 * OVERSAMPLENR, 247 }, - { 81 * OVERSAMPLENR, 237 }, - { 91 * OVERSAMPLENR, 229 }, - { 101 * OVERSAMPLENR, 221 }, - { 131 * OVERSAMPLENR, 204 }, - { 161 * OVERSAMPLENR, 190 }, - { 191 * OVERSAMPLENR, 179 }, - { 231 * OVERSAMPLENR, 167 }, - { 271 * OVERSAMPLENR, 157 }, - { 311 * OVERSAMPLENR, 148 }, - { 351 * OVERSAMPLENR, 140 }, - { 381 * OVERSAMPLENR, 135 }, - { 411 * OVERSAMPLENR, 130 }, - { 441 * OVERSAMPLENR, 125 }, - { 451 * OVERSAMPLENR, 123 }, - { 461 * OVERSAMPLENR, 122 }, - { 471 * OVERSAMPLENR, 120 }, - { 481 * OVERSAMPLENR, 119 }, - { 491 * OVERSAMPLENR, 117 }, - { 501 * OVERSAMPLENR, 116 }, - { 511 * OVERSAMPLENR, 114 }, - { 521 * OVERSAMPLENR, 113 }, - { 531 * OVERSAMPLENR, 111 }, - { 541 * OVERSAMPLENR, 110 }, - { 551 * OVERSAMPLENR, 108 }, - { 561 * OVERSAMPLENR, 107 }, - { 571 * OVERSAMPLENR, 105 }, - { 581 * OVERSAMPLENR, 104 }, - { 591 * OVERSAMPLENR, 102 }, - { 601 * OVERSAMPLENR, 101 }, - { 611 * OVERSAMPLENR, 100 }, - { 621 * OVERSAMPLENR, 98 }, - { 631 * OVERSAMPLENR, 97 }, - { 641 * OVERSAMPLENR, 95 }, - { 651 * OVERSAMPLENR, 94 }, - { 661 * OVERSAMPLENR, 92 }, - { 671 * OVERSAMPLENR, 91 }, - { 681 * OVERSAMPLENR, 90 }, - { 691 * OVERSAMPLENR, 88 }, - { 701 * OVERSAMPLENR, 87 }, - { 711 * OVERSAMPLENR, 85 }, - { 721 * OVERSAMPLENR, 84 }, - { 731 * OVERSAMPLENR, 82 }, - { 741 * OVERSAMPLENR, 81 }, - { 751 * OVERSAMPLENR, 79 }, - { 761 * OVERSAMPLENR, 77 }, - { 771 * OVERSAMPLENR, 76 }, - { 781 * OVERSAMPLENR, 74 }, - { 791 * OVERSAMPLENR, 72 }, - { 801 * OVERSAMPLENR, 71 }, - { 811 * OVERSAMPLENR, 69 }, - { 821 * OVERSAMPLENR, 67 }, - { 831 * OVERSAMPLENR, 65 }, - { 841 * OVERSAMPLENR, 63 }, - { 851 * OVERSAMPLENR, 62 }, - { 861 * OVERSAMPLENR, 60 }, - { 871 * OVERSAMPLENR, 57 }, - { 881 * OVERSAMPLENR, 55 }, - { 891 * OVERSAMPLENR, 53 }, - { 901 * OVERSAMPLENR, 51 }, - { 911 * OVERSAMPLENR, 48 }, - { 921 * OVERSAMPLENR, 45 }, - { 931 * OVERSAMPLENR, 42 }, - { 941 * OVERSAMPLENR, 39 }, - { 951 * OVERSAMPLENR, 36 }, - { 961 * OVERSAMPLENR, 32 }, - { 981 * OVERSAMPLENR, 23 }, - { 991 * OVERSAMPLENR, 17 }, - { 1001 * OVERSAMPLENR, 9 }, - { 1008 * OVERSAMPLENR, 0 } -}; -#endif - -#if ANY_THERMISTOR_IS(66) -// DyzeDesign 500°C Thermistor -const short temptable_66[][2] PROGMEM = { - { 17.5 * OVERSAMPLENR, 850 }, - { 17.9 * OVERSAMPLENR, 500 }, - { 21.7 * OVERSAMPLENR, 480 }, - { 26.6 * OVERSAMPLENR, 460 }, - { 33.1 * OVERSAMPLENR, 440 }, - { 41.0 * OVERSAMPLENR, 420 }, - { 52.3 * OVERSAMPLENR, 400 }, - { 67.7 * OVERSAMPLENR, 380 }, - { 86.5 * OVERSAMPLENR, 360 }, - { 112.0 * OVERSAMPLENR, 340 }, - { 147.2 * OVERSAMPLENR, 320 }, - { 194.0 * OVERSAMPLENR, 300 }, - { 254.3 * OVERSAMPLENR, 280 }, - { 330.2 * OVERSAMPLENR, 260 }, - { 427.9 * OVERSAMPLENR, 240 }, - { 533.4 * OVERSAMPLENR, 220 }, - { 646.5 * OVERSAMPLENR, 200 }, - { 754.4 * OVERSAMPLENR, 180 }, - { 844.3 * OVERSAMPLENR, 160 }, - { 911.7 * OVERSAMPLENR, 140 }, - { 958.6 * OVERSAMPLENR, 120 }, - { 988.8 * OVERSAMPLENR, 100 }, - { 1006.6 * OVERSAMPLENR, 80 }, - { 1015.8 * OVERSAMPLENR, 60 }, - { 1021.3 * OVERSAMPLENR, 30 }, - { 1023 * OVERSAMPLENR - 1, 25}, - { 1023 * OVERSAMPLENR, 20} -}; -#endif - -#if ANY_THERMISTOR_IS(12) -// 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) -const short temptable_12[][2] PROGMEM = { - { 35 * OVERSAMPLENR, 180 }, // top rating 180C - { 211 * OVERSAMPLENR, 140 }, - { 233 * OVERSAMPLENR, 135 }, - { 261 * OVERSAMPLENR, 130 }, - { 290 * OVERSAMPLENR, 125 }, - { 328 * OVERSAMPLENR, 120 }, - { 362 * OVERSAMPLENR, 115 }, - { 406 * OVERSAMPLENR, 110 }, - { 446 * OVERSAMPLENR, 105 }, - { 496 * OVERSAMPLENR, 100 }, - { 539 * OVERSAMPLENR, 95 }, - { 585 * OVERSAMPLENR, 90 }, - { 629 * OVERSAMPLENR, 85 }, - { 675 * OVERSAMPLENR, 80 }, - { 718 * OVERSAMPLENR, 75 }, - { 758 * OVERSAMPLENR, 70 }, - { 793 * OVERSAMPLENR, 65 }, - { 822 * OVERSAMPLENR, 60 }, - { 841 * OVERSAMPLENR, 55 }, - { 875 * OVERSAMPLENR, 50 }, - { 899 * OVERSAMPLENR, 45 }, - { 926 * OVERSAMPLENR, 40 }, - { 946 * OVERSAMPLENR, 35 }, - { 962 * OVERSAMPLENR, 30 }, - { 977 * OVERSAMPLENR, 25 }, - { 987 * OVERSAMPLENR, 20 }, - { 995 * OVERSAMPLENR, 15 }, - { 1001 * OVERSAMPLENR, 10 }, - { 1010 * OVERSAMPLENR, 0 }, - { 1023 * OVERSAMPLENR, -40 } -}; -#endif - -#if ANY_THERMISTOR_IS(70) // bqh2 stock thermistor -const short temptable_70[][2] PROGMEM = { - { 22 * OVERSAMPLENR, 300 }, - { 24 * OVERSAMPLENR, 295 }, - { 25 * OVERSAMPLENR, 290 }, - { 27 * OVERSAMPLENR, 285 }, - { 29 * OVERSAMPLENR, 280 }, - { 32 * OVERSAMPLENR, 275 }, - { 34 * OVERSAMPLENR, 270 }, - { 37 * OVERSAMPLENR, 265 }, - { 40 * OVERSAMPLENR, 260 }, - { 43 * OVERSAMPLENR, 255 }, - { 46 * OVERSAMPLENR, 250 }, - { 50 * OVERSAMPLENR, 245 }, - { 54 * OVERSAMPLENR, 240 }, - { 59 * OVERSAMPLENR, 235 }, - { 64 * OVERSAMPLENR, 230 }, - { 70 * OVERSAMPLENR, 225 }, - { 76 * OVERSAMPLENR, 220 }, - { 83 * OVERSAMPLENR, 215 }, - { 90 * OVERSAMPLENR, 210 }, - { 99 * OVERSAMPLENR, 205 }, - { 108 * OVERSAMPLENR, 200 }, - { 118 * OVERSAMPLENR, 195 }, - { 129 * OVERSAMPLENR, 190 }, - { 141 * OVERSAMPLENR, 185 }, - { 154 * OVERSAMPLENR, 180 }, - { 169 * OVERSAMPLENR, 175 }, - { 185 * OVERSAMPLENR, 170 }, - { 203 * OVERSAMPLENR, 165 }, - { 222 * OVERSAMPLENR, 160 }, - { 243 * OVERSAMPLENR, 155 }, - { 266 * OVERSAMPLENR, 150 }, - { 290 * OVERSAMPLENR, 145 }, - { 317 * OVERSAMPLENR, 140 }, - { 346 * OVERSAMPLENR, 135 }, - { 376 * OVERSAMPLENR, 130 }, - { 408 * OVERSAMPLENR, 125 }, - { 442 * OVERSAMPLENR, 120 }, - { 477 * OVERSAMPLENR, 115 }, - { 513 * OVERSAMPLENR, 110 }, - { 551 * OVERSAMPLENR, 105 }, - { 588 * OVERSAMPLENR, 100 }, - { 626 * OVERSAMPLENR, 95 }, - { 663 * OVERSAMPLENR, 90 }, - { 699 * OVERSAMPLENR, 85 }, - { 735 * OVERSAMPLENR, 80 }, - { 768 * OVERSAMPLENR, 75 }, - { 800 * OVERSAMPLENR, 70 }, - { 829 * OVERSAMPLENR, 65 }, - { 856 * OVERSAMPLENR, 60 }, - { 881 * OVERSAMPLENR, 55 }, - { 903 * OVERSAMPLENR, 50 }, - { 922 * OVERSAMPLENR, 45 }, - { 939 * OVERSAMPLENR, 40 }, - { 954 * OVERSAMPLENR, 35 }, - { 966 * OVERSAMPLENR, 30 }, - { 977 * OVERSAMPLENR, 25 }, - { 986 * OVERSAMPLENR, 20 }, - { 994 * OVERSAMPLENR, 15 }, - { 1000 * OVERSAMPLENR, 10 }, - { 1005 * OVERSAMPLENR, 5 }, - { 1009 * OVERSAMPLENR, 0 } // safety -}; -#endif - -// Pt1000 and Pt100 handling -// -// Rt=R0*(1+a*T+b*T*T) [for T>0] -// a=3.9083E-3, b=-5.775E-7 - -#define PtA 3.9083E-3 -#define PtB -5.775E-7 -#define PtRt(T,R0) ((R0)*(1.0+(PtA)*(T)+(PtB)*(T)*(T))) -#define PtAdVal(T,R0,Rup) (short)(1024/(Rup/PtRt(T,R0)+1)) -#define PtLine(T,R0,Rup) { PtAdVal(T,R0,Rup)*OVERSAMPLENR, T }, - -#if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup -const short temptable_110[][2] PROGMEM = { - // only few values are needed as the curve is very flat - PtLine( 0, 100, 1000) - PtLine( 50, 100, 1000) - PtLine(100, 100, 1000) - PtLine(150, 100, 1000) - PtLine(200, 100, 1000) - PtLine(250, 100, 1000) - PtLine(300, 100, 1000) -}; -#endif -#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup -const short temptable_147[][2] PROGMEM = { - // only few values are needed as the curve is very flat - PtLine( 0, 100, 4700) - PtLine( 50, 100, 4700) - PtLine(100, 100, 4700) - PtLine(150, 100, 4700) - PtLine(200, 100, 4700) - PtLine(250, 100, 4700) - PtLine(300, 100, 4700) -}; -#endif -#if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup -const short temptable_1010[][2] PROGMEM = { - PtLine( 0, 1000, 1000) - PtLine( 25, 1000, 1000) - PtLine( 50, 1000, 1000) - PtLine( 75, 1000, 1000) - PtLine(100, 1000, 1000) - PtLine(125, 1000, 1000) - PtLine(150, 1000, 1000) - PtLine(175, 1000, 1000) - PtLine(200, 1000, 1000) - PtLine(225, 1000, 1000) - PtLine(250, 1000, 1000) - PtLine(275, 1000, 1000) - PtLine(300, 1000, 1000) -}; -#endif -#if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup -const short temptable_1047[][2] PROGMEM = { - // only few values are needed as the curve is very flat - PtLine( 0, 1000, 4700) - PtLine( 50, 1000, 4700) - PtLine(100, 1000, 4700) - PtLine(150, 1000, 4700) - PtLine(200, 1000, 4700) - PtLine(250, 1000, 4700) - PtLine(300, 1000, 4700) -}; -#endif - -#if ANY_THERMISTOR_IS(999) // User-defined table - // Dummy Thermistor table.. It will ALWAYS read a fixed value. - #ifndef DUMMY_THERMISTOR_999_VALUE - #define DUMMY_THERMISTOR_999_VALUE 25 - #endif - const short temptable_999[][2] PROGMEM = { - { 1 * OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE }, - { 1023 * OVERSAMPLENR, DUMMY_THERMISTOR_999_VALUE } -}; -#endif - -#if ANY_THERMISTOR_IS(998) // User-defined table - // Dummy Thermistor table.. It will ALWAYS read a fixed value. - #ifndef DUMMY_THERMISTOR_998_VALUE - #define DUMMY_THERMISTOR_998_VALUE 25 - #endif - const short temptable_998[][2] PROGMEM = { - { 1 * OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE }, - { 1023 * OVERSAMPLENR, DUMMY_THERMISTOR_998_VALUE } -}; -#endif - - -#define _TT_NAME(_N) temptable_ ## _N -#define TT_NAME(_N) _TT_NAME(_N) - -#ifdef THERMISTORHEATER_0 - #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0) - #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) -#else - #ifdef HEATER_0_USES_THERMISTOR - #error "No heater 0 thermistor table specified" - #else // HEATER_0_USES_THERMISTOR - #define HEATER_0_TEMPTABLE NULL - #define HEATER_0_TEMPTABLE_LEN 0 - #endif // HEATER_0_USES_THERMISTOR -#endif - -// Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature -#ifndef HEATER_0_RAW_HI_TEMP - #ifdef HEATER_0_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value - #define HEATER_0_RAW_HI_TEMP 0 - #define HEATER_0_RAW_LO_TEMP 16383 - #else // In case of an thermocouple the highest temperature results in the highest ADC value - #define HEATER_0_RAW_HI_TEMP 16383 - #define HEATER_0_RAW_LO_TEMP 0 - #endif -#endif - -#ifdef THERMISTORHEATER_1 - #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1) - #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) -#else - #ifdef HEATER_1_USES_THERMISTOR - #error "No heater 1 thermistor table specified" - #else // HEATER_1_USES_THERMISTOR - #define HEATER_1_TEMPTABLE NULL - #define HEATER_1_TEMPTABLE_LEN 0 - #endif // HEATER_1_USES_THERMISTOR -#endif - -// Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature -#ifndef HEATER_1_RAW_HI_TEMP - #ifdef HEATER_1_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value - #define HEATER_1_RAW_HI_TEMP 0 - #define HEATER_1_RAW_LO_TEMP 16383 - #else // In case of an thermocouple the highest temperature results in the highest ADC value - #define HEATER_1_RAW_HI_TEMP 16383 - #define HEATER_1_RAW_LO_TEMP 0 - #endif -#endif - -#ifdef THERMISTORHEATER_2 - #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2) - #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) -#else - #ifdef HEATER_2_USES_THERMISTOR - #error "No heater 2 thermistor table specified" - #else // HEATER_2_USES_THERMISTOR - #define HEATER_2_TEMPTABLE NULL - #define HEATER_2_TEMPTABLE_LEN 0 - #endif // HEATER_2_USES_THERMISTOR -#endif - -// Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature -#ifndef HEATER_2_RAW_HI_TEMP - #ifdef HEATER_2_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value - #define HEATER_2_RAW_HI_TEMP 0 - #define HEATER_2_RAW_LO_TEMP 16383 - #else // In case of an thermocouple the highest temperature results in the highest ADC value - #define HEATER_2_RAW_HI_TEMP 16383 - #define HEATER_2_RAW_LO_TEMP 0 - #endif -#endif - -#ifdef THERMISTORHEATER_3 - #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3) - #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) -#else - #ifdef HEATER_3_USES_THERMISTOR - #error "No heater 3 thermistor table specified" - #else // HEATER_3_USES_THERMISTOR - #define HEATER_3_TEMPTABLE NULL - #define HEATER_3_TEMPTABLE_LEN 0 - #endif // HEATER_3_USES_THERMISTOR -#endif - -// Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature -#ifndef HEATER_3_RAW_HI_TEMP - #ifdef HEATER_3_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value - #define HEATER_3_RAW_HI_TEMP 0 - #define HEATER_3_RAW_LO_TEMP 16383 - #else // In case of an thermocouple the highest temperature results in the highest ADC value - #define HEATER_3_RAW_HI_TEMP 16383 - #define HEATER_3_RAW_LO_TEMP 0 - #endif -#endif - -#ifdef THERMISTORBED - #define BEDTEMPTABLE TT_NAME(THERMISTORBED) - #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE) -#else - #ifdef BED_USES_THERMISTOR - #error "No bed thermistor table specified" - #endif // BED_USES_THERMISTOR -#endif - -// Set the high and low raw values for the heater, this indicates which raw value is a high or low temperature -#ifndef HEATER_BED_RAW_HI_TEMP - #ifdef BED_USES_THERMISTOR // In case of a thermistor the highest temperature results in the lowest ADC value - #define HEATER_BED_RAW_HI_TEMP 0 - #define HEATER_BED_RAW_LO_TEMP 16383 - #else // In case of an thermocouple the highest temperature results in the highest ADC value - #define HEATER_BED_RAW_HI_TEMP 16383 - #define HEATER_BED_RAW_LO_TEMP 0 - #endif -#endif - -#endif // THERMISTORTABLES_H_ diff --git a/Marlin/twibus.cpp b/Marlin/twibus.cpp deleted file mode 100644 index c1d6008..0000000 --- a/Marlin/twibus.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" - -#if ENABLED(EXPERIMENTAL_I2CBUS) - -#include "twibus.h" - -#include - -TWIBus::TWIBus() { - Wire.begin(); // We use no address so we will join the BUS as the master - this->reset(); -} - -void TWIBus::reset() { - this->addr = 0; - this->buffer_s = 0; - this->buffer[0] = 0x00; -} - -void TWIBus::address(uint8_t addr) { - this->addr = addr; - - #if ENABLED(DEBUG_TWIBUS) - debug(PSTR("sendto"), this->addr); - #endif -} - -void TWIBus::addbyte(char c) { - if (buffer_s >= sizeof(this->buffer)) return; - this->buffer[this->buffer_s++] = c; - - #if ENABLED(DEBUG_TWIBUS) - debug(PSTR("addbyte"), this->buffer[this->buffer_s - 1]); - #endif -} - -void TWIBus::send() { - if (!this->addr) return; - - #if ENABLED(DEBUG_TWIBUS) - debug(PSTR("send()")); - #endif - - Wire.beginTransmission(this->addr); - Wire.write(this->buffer, this->buffer_s); - Wire.endTransmission(); - - // Reset the buffer after sending the data - this->reset(); -} - -void TWIBus::reqbytes(uint8_t bytes) { - if (!this->addr) return; - - #if ENABLED(DEBUG_TWIBUS) - debug(PSTR("reqbytes"), bytes); - #endif - - millis_t t = millis() + this->timeout; - Wire.requestFrom(this->addr, bytes); - - // requestFrom() is a blocking function - while (Wire.available() < bytes) { - if (ELAPSED(millis(), t)) break; - else continue; - } - - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("i2c-reply: from:", this->addr); - SERIAL_ECHOPAIR(" bytes:", Wire.available()); - SERIAL_ECHOPGM (" data:"); - - // Protect against buffer overflows if the number of received bytes - // is less than the number of requested bytes - uint8_t wba = Wire.available(); - for (int i = 0; i < wba; i++) SERIAL_CHAR(Wire.read()); - SERIAL_EOL; - - // Reset the buffer after sending the data - this->reset(); -} - -#if ENABLED(DEBUG_TWIBUS) - - void TWIBus::debug(const char func[], int32_t val/*=-1*/) { - if (DEBUGGING(INFO)) { - SERIAL_ECHOPGM("TWIBus::"); - serialprintPGM(func); - if (val >= 0) SERIAL_ECHOPAIR(": ", val); - SERIAL_EOL; - } - } - -#endif - -#endif //EXPERIMENTAL_I2CBUS diff --git a/Marlin/twibus.h b/Marlin/twibus.h deleted file mode 100644 index d0d0e0f..0000000 --- a/Marlin/twibus.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef TWIBUS_H -#define TWIBUS_H - -#include "macros.h" - -// Print debug messages with M111 S2 (Uses 236 bytes of PROGMEM) -//#define DEBUG_TWIBUS - -/** - * TWIBUS class - * - * This class implements a wrapper around the two wire (I2C) bus, it allows - * Marlin to send and request data from any slave device on the bus. This is - * an experimental feature and it's inner workings as well as public facing - * interface are prune to change in the future. - * - * The two main consumers of this class are M155 and M156, where M155 allows - * Marlin to send a I2C packet to a device (please be aware that no repeated - * starts are possible), this can be done in caching method by calling multiple - * times M155 B or a one liner M155, have a look at - * the gcode_M155() function for more information. M156 allows Marlin to - * request data from a device, the received data is then relayed into the serial - * line for host interpretation. - * - */ -class TWIBus { - private: - /** - * @brief Timeout value in milliseconds - * @details For blocking operations this constant value will set the max - * amount of time Marlin will keep waiting for a reply. Useful is something - * goes wrong on the bus and the SDA/SCL lines are held up by another device. - */ - const int timeout = 5; - - /** - * @brief Target device address - * @description This stores, until the buffer is flushed, the target device - * address, take not we do follow Arduino 7bit addressing. - */ - uint8_t addr = 0; - - /** - * @brief Number of bytes on buffer - * @description This var holds the total number of bytes on our buffer - * waiting to be flushed to the bus. - */ - uint8_t buffer_s = 0; - - /** - * @brief Internal buffer - * @details This is a fixed buffer, TWI command cannot be longer than this - */ - char buffer[30]; - - - public: - /** - * @brief Class constructor - * @details Initialized the TWI bus and clears the buffer - */ - TWIBus(); - - /** - * @brief Reset the buffer - * @details Brings the internal buffer to a known-empty state - */ - void reset(); - - /** - * @brief Send the buffer data to the bus - * @details Flushed the buffer into the bus targeting the cached slave device - * address. - */ - void send(); - - /** - * @brief Add one byte to the buffer - * @details Adds the byte to the buffer in a sequential way, if buffer is full - * the request is silently ignored. - * - * @param c a data byte - */ - void addbyte(char c); - - /** - * @brief Sets the target slave address - * @details The target slave address is stored so it can be later used when - * the complete packet needs to be sent over the bus. - * - * @param addr 7-bit integer address - */ - void address(uint8_t addr); - - /** - * @brief Request data from slave device - * @details Requests data from a slave device, when the data is received it will - * be relayed to the serial line using a parser-friendly formatting. - * - * @param bytes the number of bytes to request - */ - void reqbytes(uint8_t bytes); - - #if ENABLED(DEBUG_TWIBUS) - - /** - * @brief Prints a debug message - * @details Prints a simple debug message "TWIBus::function: value" - */ - static void debug(const char func[], int32_t val = -1); - - #endif -}; - -#endif //TWIBUS_H diff --git a/Marlin/types.h b/Marlin/types.h deleted file mode 100644 index 8ab7bee..0000000 --- a/Marlin/types.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __TYPES_H__ -#define __TYPES_H__ - -typedef unsigned long millis_t; - -#endif diff --git a/Marlin/uArmAPI.cpp b/Marlin/uArmAPI.cpp deleted file mode 100644 index e5ade3d..0000000 --- a/Marlin/uArmAPI.cpp +++ /dev/null @@ -1,991 +0,0 @@ -/** - ****************************************************************************** - * @file uArmAPI.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-01-21 - ****************************************************************************** - */ - -#include "uArmAPI.h" - -static float front_end_offset = 0.0; -static float height_offset = 0.0; - -UserMode_t user_mode = USER_MODE_NORMAL; - -#define MAC_FLAG_ADDRESS 1000 -#define MAC_LEN 12 -#define MAC_FLAG_SET 0XCE -static unsigned char mMacStr[MAC_LEN+1] = {0}; -static unsigned char mHWSubVersion; - -/*! - \brief get mac of bt which as unique code of HW - */ -unsigned char* getMac() -{ - return mMacStr; -} - -void init_hardware() -{ - // PG4 output - DDRG |= 0x10; // PUMP_D5_N - - // PC7 input - //DDRC &= 0x7F; - - //PORTC |= 0X80; - DDRC |= 0x80; - - // tip PG3 input - DDRG &= 0xF7; // - PORTG |= 0X08; - - pinMode(GRIPPER_FEEDBACK, INPUT); - pinMode(VALVE_EN, OUTPUT); - pinMode(KEY_STATE_PIN, INPUT); - -} - -/*! - \brief read mac string from BT if not stored in e2prom. - */ -void getMacAddr() -{ - // get BT MAC - // if not set mac flag, get mac from bt - delay(10); - unsigned char macFlag = getE2PROMData(EEPROM_ON_CHIP, MAC_FLAG_ADDRESS, DATA_TYPE_BYTE); - debugPrint("mac flag =%d\r\n", macFlag); - // if flag set then read it from EEPROM - if (macFlag == MAC_FLAG_SET) - { - delay(10); - //iic_readbuf(mMacStr, EEPROM_ON_CHIP, MAC_ADDRESS, MAC_LEN);// write data - - for (int i = 0; i < MAC_LEN; i++) - { - mMacStr[i] = EEPROM.read(MAC_FLAG_ADDRESS+2+i); - } - mMacStr[MAC_LEN] = '\0'; - debugPrint("mac=%s\r\n", mMacStr); - } - else - { - unsigned char readBuf[128]; - int i = 0; - // get from BT - Serial1.write("AT+ADDR?"); - - delay(100); - - // set firmware flag - Serial1.write("AT+UUID0xFFE3"); - - // wait for reply - delay(100); - - // get data - while (Serial1.available()) - { - readBuf[i++] = Serial1.read(); - } - - readBuf[i] = '\0'; - debugPrint("%s\r\n", readBuf); - - // expect data: OK+ADDR:00FF00FF00FF - // parse datas - char *s = strstr(readBuf, "OK+ADDR:"); - - if (s != NULL) - { - //found - strncpy(mMacStr, s+8, MAC_LEN); - mMacStr[MAC_LEN] = '\0'; - debugPrint("mac=%s\r\n", mMacStr); - - delay(10); - // store in EEPROM - //iic_writebuf(mMacStr, EXTERNAL_EEPROM_SYS_ADDRESS, MAC_ADDRESS, MAC_LEN); - for (int i = 0; i < MAC_LEN; i++) - { - EEPROM.write(MAC_FLAG_ADDRESS+2+i, mMacStr[i] ); - } - delay(10); - // set mac flag - setE2PROMData(EEPROM_ON_CHIP, MAC_FLAG_ADDRESS, DATA_TYPE_BYTE, MAC_FLAG_SET); - } - - } -} - -/*! - \brief Get hardware subversion defined by 4 GPIOs. - */ -void getHWVersions() -{ - - DDRJ &= 0x87; //input - - - - mHWSubVersion = 0; - unsigned char bit = 1; - // get hw version - if (PINJ & 0x40) - { - mHWSubVersion |= bit; - } - - bit <<= 1; - if (PINJ & 0x20) - { - mHWSubVersion |= bit; - } - - bit <<= 1; - if (PINJ & 0x10) - { - mHWSubVersion |= bit; - } - - bit <<= 1; - if (PINJ & 0x08) - { - mHWSubVersion |= bit; - } - - debugPrint("subversion:%d\r\n", mHWSubVersion); - -} - -/*! - \brief clear mac flag stored in E2PROM, it will read mac from Bluetooth when power up. - */ -void clearMacFlag() -{ - setE2PROMData(EEPROM_ON_CHIP, MAC_FLAG_ADDRESS, DATA_TYPE_BYTE, 0); - mMacStr[0] = '\0'; -} - - -void swift_api_init() -{ - Serial1.begin(115200); - - getMacAddr(); - getHWVersions(); - - init_hardware(); - -} - -/*! - \brief Get the working mode set befored or set to default. - */ -void init_user_mode() -{ - uint8_t mode = read_user_mode(); - - if (isnan(mode) || mode >= USER_MODE_COUNT) - { - mode = USER_MODE_NORMAL; - save_user_mode(mode); - } - - - - - float height = read_height_offset(); - - if (isnan(height) || height > 150 || height < 0) - { - switch(mode) - { - case USER_MODE_LASER: - height = DEFAULT_LASER_HEIGHT; - break; - - case USER_MODE_3D_PRINT: - height = DEFAULT_3DPRINT_HEIGHT; - break; - - case USER_MODE_PEN: - height = DEFAULT_PEN_HEIGHT; - break; - - case USER_MODE_NORMAL: - default: - height = DEFAULT_NORMAL_HEIGHT; - break; - } - - save_height_offset(height); - - } - - float front = read_front_offset(); - - if (isnan(front) || front > 150 || front < 0) - { - switch(mode) - { - case USER_MODE_LASER: - front = DEFAULT_LASER_FRONT; - break; - - case USER_MODE_3D_PRINT: - front = DEFAULT_3DPRINT_FRONT; - break; - - case USER_MODE_PEN: - front = DEFAULT_PEN_FRONT; - break; - - case USER_MODE_NORMAL: - default: - front = DEFAULT_NORMAL_FRONT; - break; - } - - save_front_offset(front); - - } - - set_acceleration(mode); - - - user_mode = mode; - front_end_offset = front; - height_offset = height; - - set_fan_disable(user_mode != USER_MODE_3D_PRINT); - - debugPrint("Mode=%d, height=%f, front=%f\r\n", mode, height, front); - -} - -/*! - \brief Set acceleration by working mode. - */ -void set_acceleration(UserMode_t mode) -{ - if (mode >= USER_MODE_COUNT) - return; - - - - switch(mode) - { - case USER_MODE_LASER: - - planner.acceleration = 25; - planner.travel_acceleration = 25; - planner.max_xy_jerk = 0.5; - planner.max_z_jerk = 0.5; - - break; - - case USER_MODE_3D_PRINT: - - planner.acceleration = 25; - planner.travel_acceleration = 25; - planner.max_xy_jerk = 0.5; - planner.max_z_jerk = 0.5; - break; - - case USER_MODE_PEN: - - planner.acceleration = 25; - planner.travel_acceleration = 25; - planner.max_xy_jerk = 0.5; - planner.max_z_jerk = 0.5; - break; - - case USER_MODE_NORMAL: - default: - - planner.acceleration = 100; - planner.travel_acceleration = 100; - planner.max_xy_jerk = 50; - planner.max_z_jerk = 50; - break; - } -} - -/*! - \brief Set working mode and set parameters according to the mode. - */ -void set_user_mode(UserMode_t mode) -{ - if (mode >= USER_MODE_COUNT) - return; - - user_mode = mode; - - switch(mode) - { - case USER_MODE_LASER: - front_end_offset = DEFAULT_LASER_FRONT; - height_offset = DEFAULT_LASER_HEIGHT; - set_fan_disable(true); - break; - - case USER_MODE_3D_PRINT: - front_end_offset = DEFAULT_3DPRINT_FRONT; - height_offset = DEFAULT_3DPRINT_HEIGHT; - set_fan_disable(false); - break; - - case USER_MODE_PEN: - front_end_offset = DEFAULT_PEN_FRONT; - height_offset = DEFAULT_PEN_HEIGHT; - set_fan_disable(true); - - break; - - case USER_MODE_NORMAL: - default: - front_end_offset = DEFAULT_NORMAL_FRONT; - height_offset = DEFAULT_NORMAL_HEIGHT; - set_fan_disable(true); - - break; - } - - set_acceleration(mode); - - save_user_mode(mode); - save_height_offset(height_offset); - save_front_offset(front_end_offset); - -} - -/*! - \brief set bluetooth broadcast name - \return true if success - */ -bool setBtName(char btName[]) -{ - int strLength = strlen(btName); - - if (btName == NULL || strLength == 0) - return false; - - if (strLength > BT_NAME_MAX_LEN) - { - btName[BT_NAME_MAX_LEN] = '\0'; - } - - // bluetooth is working - if (PINE & 0x04) - { - return false; - } - - Serial1.write("AT+NAME"); - Serial1.write(btName); - - delay(100); - - - // set firmware flag - Serial1.write("AT+UUID0xFFE3"); - - delay(100); - - unsigned char readBuf[128]; - int i = 0; - - // get data - while (Serial1.available()) - { - readBuf[i++] = Serial1.read(); - } - - readBuf[i] = '\0'; - debugPrint("%s\r\n", readBuf); - - // expect data: OK+Set: - // parse datas - char *s = strstr(readBuf, "OK+Set:"); - - - return (s != NULL); - -} - -/*! - \brief Get current working mode - */ -UserMode_t get_user_mode() -{ - return user_mode; -} - - - -/*! - \brief set front end offset(mm) - */ -void set_front_end_offset(float offset) -{ - front_end_offset = offset; -} - -/*! - \brief get front end offset(mm) - */ -float get_front_end_offset() -{ - return front_end_offset; -} - -/*! - \brief set height offset(mm) - */ -void set_height_offset(float offset) -{ - height_offset = offset; -} - -/*! - \brief get height offset(mm) - */ -float get_height_offset() -{ - return height_offset; -} - -/*! - \brief get height offset from E2PROM(mm) - */ -float read_height_offset() -{ - return getE2PROMData(EEPROM_ON_CHIP, EEPROM_HEIGHT_ADDR, DATA_TYPE_FLOAT); -} - -/*! - \brief Save height offset to E2PROM(mm) - */ -void save_height_offset(float offset) -{ - setE2PROMData(EEPROM_ON_CHIP, EEPROM_HEIGHT_ADDR, DATA_TYPE_FLOAT, offset); -} - -/*! - \brief get front offset from E2PROM(mm) - */ -float read_front_offset() -{ - return getE2PROMData(EEPROM_ON_CHIP, EEPROM_FRONT_ADDR, DATA_TYPE_FLOAT); -} - -/*! - \brief Save front offset to E2PROM(mm) - */ -void save_front_offset(float offset) -{ - setE2PROMData(EEPROM_ON_CHIP, EEPROM_FRONT_ADDR, DATA_TYPE_FLOAT, offset); -} - -/*! - \brief get user mode from E2PROM(mm) - */ -uint8_t read_user_mode() -{ - return getE2PROMData(EEPROM_ON_CHIP, EEPROM_MODE_ADDR, DATA_TYPE_BYTE); -} - -/*! - \brief Save user mode to E2PROM(mm) - */ -void save_user_mode(uint8_t mode) -{ - setE2PROMData(EEPROM_ON_CHIP, EEPROM_MODE_ADDR, DATA_TYPE_BYTE, mode); -} - - - -unsigned char getXYZFromAngle(float& x, float& y, float& z, float rot, float left, float right) -{ - // 閿熸枻鎷稾Y骞抽敓é‚ゆ嫹閿熼åºé—ƒç†·åºœéŽ·çƒ½æ•“é‚ゆ嫹é–? - - - double stretch = MATH_LOWER_ARM * cos(left / MATH_TRANS) + MATH_UPPER_ARM * cos(right / MATH_TRANS) + MATH_L2 + front_end_offset; - - // 閿熸枻鎷ç©é–¿ç†¸æž»éŽ·çƒ½æ•“é–°ç”¸æ§¦ç”¯î†½å«¹é–¿ç†¸æž»éŽ·çƒ½æ•? - double height = MATH_LOWER_ARM * sin(left / MATH_TRANS) - MATH_UPPER_ARM * sin(right / MATH_TRANS) + MATH_L1; - y = -stretch * cos(rot / MATH_TRANS); - x = stretch * sin(rot / MATH_TRANS); - z = height - height_offset; - - return 0; -} - -/*! - \brief check if power plug in - */ -bool isPowerPlugIn() -{ - //debugPrint("power analog:%d\r\n", analogRead(POWER_DETECT)); - - if (analogRead(POWER_DETECT) > 100) - return true; - else - return false; -} - -/*! - \brief get e2prom data - \param device: EEPROM_ON_CHIP, EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM - \param addr: 0~2047(EEPROM_ON_CHIP), 0~65535(EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM) - \param type: DATA_TYPE_BYTE, DATA_TYPE_INTEGER, DATA_TYPE_FLOAT - */ -double getE2PROMData(unsigned char device, unsigned int addr, unsigned char type) -{ - double result = 0; - - uint8_t deviceAddr; - - - union { - float fdata; - uint8_t data[4]; - } FData; - - - switch(device) - { - - case 0: - - switch(type) - { - case DATA_TYPE_BYTE: - { - int val = EEPROM.read(addr); - result = val; - break; - } - case DATA_TYPE_INTEGER: - { - int i_val = 0; - EEPROM.get(addr, i_val); - result = i_val; - break; - } - case DATA_TYPE_FLOAT: - { - double f_val = 0.0f; - EEPROM.get(addr,f_val); - result = f_val; - break; - } - } - - break; - - case 1: - deviceAddr = EXTERNAL_EEPROM_USER_ADDRESS; - break; - - case 2: - deviceAddr = EXTERNAL_EEPROM_SYS_ADDRESS; - break; - - default: - return ADDRESS_ERROR; - } - - - if (device == 1 || device == 2) - { - int num = 0; - switch(type) - { - case DATA_TYPE_BYTE: - num = 1; - break; - - case DATA_TYPE_INTEGER: - num = 2; - break; - - case DATA_TYPE_FLOAT: - num = 4; - break; - - default: - return PARAMETER_ERROR; - } - - unsigned char i=0; - i = (addr % 128); - // Since the eeprom's sector is 128 byte, if we want to write 5 bytes per cycle we need to care about when there's less than 5 bytes left - if (i >= (129-num)) - { - i = 128 - i; - iic_readbuf(FData.data, deviceAddr, addr, i);// write data - delay(5); - iic_readbuf(FData.data + i, deviceAddr, addr + i, num - i);// write data - } - //if the left bytes are greater than 5, just do it - else - { - iic_readbuf(FData.data, deviceAddr, addr, num);// write data - } - - - switch(type) - { - case DATA_TYPE_BYTE: - result = FData.data[0]; - break; - - case DATA_TYPE_INTEGER: - result = (FData.data[0] << 8) + FData.data[1]; - break; - - case DATA_TYPE_FLOAT: - result = FData.fdata; - break; - - } - - - } - - return result; - -} - -/*! - \brief set e2prom data - \param device: EEPROM_ON_CHIP, EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM - \param addr: 0~2047(EEPROM_ON_CHIP), 0~65535(EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM) - \param type: DATA_TYPE_BYTE, DATA_TYPE_INTEGER, DATA_TYPE_FLOAT - \param value: value to write - */ -double setE2PROMData(unsigned char device, unsigned int addr, unsigned char type, double value) -{ - uint8_t deviceAddr; - - union { - float fdata; - uint8_t data[4]; - } FData; - - switch(device) - { - - case 0: - switch(type) - { - case DATA_TYPE_BYTE: - { - byte b_val; - b_val = byte(value); - EEPROM.write(addr, b_val); - break; - } - case DATA_TYPE_INTEGER: - { - int i_val = 0; - i_val = int(value); - EEPROM.put(addr, i_val); - break; - } - case DATA_TYPE_FLOAT: - { - float f_val = 0.0f; - f_val = float(value); - EEPROM.put(addr,f_val); - // Serial.println(f_val); - break; - } - } - break; - case 1: - deviceAddr = EXTERNAL_EEPROM_USER_ADDRESS; - break; - - case 2: - deviceAddr = EXTERNAL_EEPROM_SYS_ADDRESS; - break; - - default: - return ADDRESS_ERROR; - } - - - if (device == 1 || device == 2) - { - int num = 0; - switch(type) - { - case DATA_TYPE_BYTE: - FData.data[0] = byte(value); - num = 1; - break; - - case DATA_TYPE_INTEGER: - { - int i_val = 0; - i_val = int(value); - FData.data[0] = (i_val & 0xff00) >> 8; - FData.data[1] = i_val & 0xff; - num = 2; - break; - } - - case DATA_TYPE_FLOAT: - FData.fdata = float(value); - num = 4; - break; - - default: - return PARAMETER_ERROR; - } - - unsigned char i=0; - i = (addr % 128); - // Since the eeprom's sector is 128 byte, if we want to write 5 bytes per cycle we need to care about when there's less than 5 bytes left - if (i >= (129-num)) - { - i = 128 - i; - iic_writebuf(FData.data, deviceAddr, addr, i);// write data - delay(5); - iic_writebuf(FData.data + i, deviceAddr, addr + i, num - i);// write data - } - //if the left bytes are greater than 5, just do it - else - { - iic_writebuf(FData.data, deviceAddr, addr, num);// write data - } - - - - - } - -} - -static void _sort(unsigned int array[], unsigned int len) -{ - unsigned char i=0,j=0; - unsigned int temp = 0; - - for(i = 0; i < len; i++) - { - for(j = 0; i+j < (len-1); j++) - { - if(array[j] > array[j+1]) - { - temp = array[j]; - array[j] = array[j+1]; - array[j+1] = temp; - } - } - } -} -/*! - \brief get analog value of pin - \param pin of arduino - \return value of analog data - */ -int getAnalogPinValue(unsigned int pin) -{ - unsigned int dat[8]; - - - for(int i = 0; i < 8; i++) - { - dat[i] = analogRead(pin); - } - - _sort(dat, 8); - - unsigned int result = (dat[2]+dat[3]+dat[4]+dat[5])/4; - - return result; -} - -/*! - \brief pump working - */ -void pumpOn() -{ - - digitalWrite(VALVE_EN, LOW); - //digitalWrite(VALVE_EN, HIGH); - PORTG |= 0x10; - - pump_set_state(PUMP_STATE_ON); -} - -/*! - \brief pump stop - */ -void pumpOff() -{ - - - - digitalWrite(VALVE_EN, HIGH); - //digitalWrite(VALVE_EN, LOW); - PORTG &= 0xef; - - pump_set_state(PUMP_STATE_VALVE_ON); - -} - -/*! - \brief gripper work - */ -void gripperCatch() -{ - //digitalWrite(GRIPPER, LOW); - PORTC &= ~0X80; -} - -/*! - \brief gripper stop - */ -void gripperRelease() -{ - //digitalWrite(GRIPPER, HIGH); - - PORTC |= 0X80; -} - -/*! - \brief get pump status - \return STOP if pump is not working - \return WORKING if pump is working but not catched sth - \return GRABBING if pump got sth - */ -unsigned char getPumpStatus() -{ - - if (!(PORTG & 0x10)) - { - return STOP; - } - else - { - uint16_t value = getAnalogPinValue(PUMP_FEEDBACK); - debugPrint("pump value:%d\r\n", value); - if (value < 10) - { - // error, no work - return STOP; - } - else if (value <= PUMP_GRABBING_CURRENT) - { - return GRABBING; - } - else - { - return WORKING; - } - } - -} - -/*! - \brief get gripper status - \return STOP if gripper is not working - \return WORKING if gripper is working but not catched sth - \return GRABBING if gripper got sth - */ -unsigned char getGripperStatus() -{ - - if (PINC & 0X80) - { - return STOP;//NOT WORKING - } - else - { - - if (digitalRead(GRIPPER_FEEDBACK)) - { - return WORKING; - } - else - { - return GRABBING; - } - } - - -} - -/*! - \brief get hardware subvervion - */ -unsigned char getHWSubversion() -{ - return mHWSubVersion; -} - -/*! - \brief get the status of tip - return: 1. the switch is on - 0. the switch if off - */ -unsigned char getTip() -{ - return (PING & 0X08) ? 0 : 1; - -} - -/*! - \brief get the status of user defined key - return: 1. the key is down - 0. the key is up - */ -unsigned char getSwitchState() -{ - return digitalRead(KEY_STATE_PIN) ? 0 : 1; -} - -/*! - \brief test e2prom available - \param device: EEPROM_ON_CHIP, EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM - \return: true if available - */ -bool eeprom_write_test(uint8_t device) -{ - uint16_t value = 0; - - if (device > EEPROM_EXTERN_SYSTEM) - { - return false; - } - - delay(10); - setE2PROMData(device, EEPROM_WRITE_TEST_ADDR, DATA_TYPE_INTEGER, 0x5a5a); - delay(10); - value = getE2PROMData(device, EEPROM_WRITE_TEST_ADDR, DATA_TYPE_INTEGER); - if (value != 0x5a5a) - { - return false; - } - - delay(10); - setE2PROMData(device, EEPROM_WRITE_TEST_ADDR, DATA_TYPE_INTEGER, 0xa5a5); - delay(10); - value = getE2PROMData(device, EEPROM_WRITE_TEST_ADDR, DATA_TYPE_INTEGER); - if (value != 0xa5a5) - { - return false; - } - - return true; -} - diff --git a/Marlin/uArmAPI.h b/Marlin/uArmAPI.h deleted file mode 100644 index b56bdc5..0000000 --- a/Marlin/uArmAPI.h +++ /dev/null @@ -1,224 +0,0 @@ -/** - ****************************************************************************** - * @file uArmAPI.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-01-21 - ****************************************************************************** - */ - -#ifndef _UARMAPI_H_ -#define _UARMAPI_H_ - -#include -#include -#include "uArmParams.h" -#include "uArmIIC.h" -#include "Marlin.h" - -#define OUT_OF_RANGE 10 -#define NO_SUCH_CMD 20 -#define PARAMETER_ERROR 21 -#define ADDRESS_ERROR 22 - - -#define DEFAULT_NORMAL_HEIGHT 74.55 -#define DEFAULT_NORMAL_FRONT 56.65 - -#define DEFAULT_LASER_HEIGHT 51.04 -#define DEFAULT_LASER_FRONT 64.4 - -#define DEFAULT_3DPRINT_HEIGHT 74.43 -#define DEFAULT_3DPRINT_FRONT 56.5 - -#define DEFAULT_PEN_HEIGHT 74.43 -#define DEFAULT_PEN_FRONT 92.8 - - -typedef enum { - USER_MODE_NORMAL, - USER_MODE_LASER, - USER_MODE_3D_PRINT, - USER_MODE_PEN, - - USER_MODE_COUNT - -} UserMode_t; - -double getE2PROMData(unsigned char device, unsigned int addr, unsigned char type); - -double setE2PROMData(unsigned char device, unsigned int addr, unsigned char type, double value); - -void swift_api_init(); - -/*! - \brief check if power plug in - */ -bool isPowerPlugIn(); - -/*! - \brief get analog value of pin - \param pin of arduino - \return value of analog data - */ -int getAnalogPinValue(unsigned int pin); - -/*! - \brief Set working mode and set parameters according to the mode. - */ -void set_user_mode(UserMode_t mode); - -/*! - \brief Set acceleration by working mode. - */ -void set_acceleration(UserMode_t mode); - -/*! - \brief Get the working mode set befored or set to default. - */ -void init_user_mode(); - -/*! - \brief Get current working mode - */ -UserMode_t get_user_mode(); - -/*! - \brief set front end offset(mm) - */ -void set_front_end_offset(float offset); - -/*! - \brief get front end offset(mm) - */ -float get_front_end_offset(); - -/*! - \brief set height end offset(mm) - */ -void set_height_offset(float offset); - -/*! - \brief get height end offset(mm) - */ -float get_height_offset(); - -unsigned char getXYZFromAngle(float& x, float& y, float& z, float rot, float left, float right); - -/*! - \brief pump working - */ -void pumpOn(); - -/*! - \brief pump stop - */ -void pumpOff(); - - -/*! - \brief gripper work - */ -void gripperCatch(); - -/*! - \brief gripper stop - */ -void gripperRelease(); - -/*! - \brief get gripper status - \return STOP if gripper is not working - \return WORKING if gripper is working but not catched sth - \return GRABBING if gripper got sth - */ -unsigned char getGripperStatus(); - -/*! - \brief get pump status - \return STOP if pump is not working - \return WORKING if pump is working but not catched sth - \return GRABBING if pump got sth - */ -unsigned char getPumpStatus(); - -/*! - \brief get hardware subvervion - */ -unsigned char getHWSubversion(); - - -/*! - \brief get mac of bt which as unique code of HW - */ -unsigned char* getMac(); - -/*! - \brief get the status of tip - return: 1. the switch is on - 0. the switch if off - */ -unsigned char getTip(); - -/*! - \brief get the status of user defined key - return: 1. the key is down - 0. the key is up - */ -unsigned char getSwitchState(); - -/*! - \brief get height offset from E2PROM(mm) - */ -float read_height_offset(); - -/*! - \brief Save height offset to E2PROM(mm) - */ -void save_height_offset(float offset); - -/*! - \brief get front offset from E2PROM(mm) - */ -float read_front_offset(); - -/*! - \brief Save front offset to E2PROM(mm) - */ -void save_front_offset(float offset); - -/*! - \brief get user mode from E2PROM(mm) - */ -uint8_t read_user_mode(); - -/*! - \brief Save user mode to E2PROM(mm) - */ -void save_user_mode(uint8_t mode); - -/*! - \brief clear mac flag stored in E2PROM, it will read mac from Bluetooth when power up. - */ -void clearMacFlag(); - -/*! - \brief set bluetooth broadcast name - \return true if success - */ -bool setBtName(char btName[]); - -/*! - \brief test e2prom available - \param device: EEPROM_ON_CHIP, EEPROM_EXTERN_USER, EEPROM_EXTERN_SYSTEM - \return: true if available - */ -bool eeprom_write_test(uint8_t device); - -/*! - \brief read mac string from BT if not stored in e2prom. - */ -void getMacAddr(); - - -#endif // _UARMAPI_H_ diff --git a/Marlin/uArmButton.cpp b/Marlin/uArmButton.cpp deleted file mode 100644 index 326cfb8..0000000 --- a/Marlin/uArmButton.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/** - ****************************************************************************** - * @file uArmButton.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-17 - ****************************************************************************** - */ - -#include "uArmButton.h" - - - -uArmButton::uArmButton() -{ - mPin = 0xff; - mState = IDLE; - mEvent = EVENT_NONE; - - - pButtonEventCB = NULL; - pButtonLongPressedCB = NULL; - pIsButtonPressedCB = NULL; -} - - -void uArmButton::setClickedCB(ButtonEventCB_t clickedCB) -{ - pButtonEventCB = clickedCB; -} - -void uArmButton::setLongPressedCB(ButtonLongPressedCB_t longPressedCB) -{ - pButtonLongPressedCB = longPressedCB; -} - -void uArmButton::setIsButtonPressedCB(IsButtonPressedCB_t isButtonPressed) -{ - pIsButtonPressedCB = isButtonPressed; -} - - - -bool uArmButton::clicked() -{ - return (mEvent == EVENT_CLICK); -} - -bool uArmButton::longPressed() -{ - return (mEvent == EVENT_LONG_PRESS); -} - -bool uArmButton::isPressed() -{ - - if (pIsButtonPressedCB == NULL) - return false; - - if (pIsButtonPressedCB()) - return true; - - return false; -} - -void uArmButton::clearEvent() -{ - mEvent = EVENT_NONE; -} - -void uArmButton::tick() -{ - switch (mState) - { - case IDLE: - if (isPressed()) - { - mTicks = 0; - mState = HALF_PRESSED; - } - break; - - case HALF_PRESSED: - if (isPressed()) - { - swift_buzzer.tone(100, 4000); - mState = PRESSED; - } - else - { - mState = IDLE; - } - break; - - case PRESSED: - if (isPressed()) - { - - mTicks++; - } - else - { - mState = RELEASE; - } - break; - - case RELEASE: - - if (mTicks >= (1000/TICK_INTERVAL)) - { - mEvent = EVENT_LONG_PRESS; - - if (pButtonLongPressedCB != NULL) - { - pButtonLongPressedCB(); - } - - } - else - { - mEvent = EVENT_CLICK; - - if (pButtonEventCB != NULL) - { - pButtonEventCB(); - } - - } - - mTicks = 0; - mState = IDLE; - break; - - default: - break; - - } -} \ No newline at end of file diff --git a/Marlin/uArmButton.h b/Marlin/uArmButton.h deleted file mode 100644 index d75e1b2..0000000 --- a/Marlin/uArmButton.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - ****************************************************************************** - * @file uArmButton.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-17 - ****************************************************************************** - */ - -#ifndef _UARMBUTTON_H_ -#define _UARMBUTTON_H_ - -#include - -#include "Marlin.h" - - -#define EVENT_NONE 0 -#define EVENT_CLICK 1 -#define EVENT_LONG_PRESS 2 - -class uArmButton -{ - - typedef enum { - INIT, - IDLE, - HALF_PRESSED, - PRESSED, - RELEASE, - LONGPRESSED, - - STATE_COUNT - - } BUTTON_STATE; - -public: - uArmButton(); - - - bool clicked(); - bool longPressed(); - - void clearEvent(); - void tick(); - - bool isPressed(); - - - -public: - typedef void (*ButtonEventCB_t)(void); - typedef void (*ButtonLongPressedCB_t)(void); - typedef bool (*IsButtonPressedCB_t)(void); - - void setClickedCB(ButtonEventCB_t clickedCB); - void setLongPressedCB(ButtonLongPressedCB_t longPressedCB); - void setIsButtonPressedCB(IsButtonPressedCB_t isButtonPressed); -private: - ButtonEventCB_t pButtonEventCB; - ButtonLongPressedCB_t pButtonLongPressedCB; - IsButtonPressedCB_t pIsButtonPressedCB; - - -private: - unsigned char mPin; - unsigned int mTicks; - - unsigned char mEvent; - - BUTTON_STATE mState; -}; - - - -#endif // _UARMBUTTON_H_ diff --git a/Marlin/uArmBuzzer.cpp b/Marlin/uArmBuzzer.cpp deleted file mode 100644 index 612a2d2..0000000 --- a/Marlin/uArmBuzzer.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/** - ****************************************************************************** - * @file uArmBuzzer.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-09-30 - * @license GNU - * copyright(c) 2016 UFactory Team. All right reserved - ****************************************************************************** - */ - -#include "uArmBuzzer.h" - -uArmBuzzer swift_buzzer; - - - -uArmBuzzer::uArmBuzzer() -{ - mOn = false; -} - -void uArmBuzzer::setPin(unsigned char pin) -{ - mPin = pin; -} - - - -void uArmBuzzer::tone(unsigned long duration, unsigned int frequency) -{ - if (duration <= 0) - return; - - mOn = true; - pinMode(mPin, OUTPUT); - mDuration = duration; - mStartTime = millis(); - ::tone(mPin, frequency, duration); - -} - - -void uArmBuzzer::stop() -{ - noTone(mPin); -} - - -void uArmBuzzer::tick() -{ - if (mOn && (long)((millis() - mStartTime)) >= mDuration) - { - noTone(mPin); - mOn = false; - } -} - -bool uArmBuzzer::on() -{ - return mOn; -} \ No newline at end of file diff --git a/Marlin/uArmBuzzer.h b/Marlin/uArmBuzzer.h deleted file mode 100644 index 216fce0..0000000 --- a/Marlin/uArmBuzzer.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - ****************************************************************************** - * @file uArmBuzzer.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-09-30 - * @license GNU - * copyright(c) 2016 UFactory Team. All right reserved - ****************************************************************************** - */ - -#ifndef _UARMBUZZER_H_ -#define _UARMBUZZER_H_ - -#include -#include "Marlin.h" - - - -class uArmBuzzer -{ -public: - uArmBuzzer(); - - void setPin(unsigned char pin); - void tone(unsigned long duration, unsigned int frequency); - void stop(); - - void tick(); - - bool on(); - -private: - unsigned char mPin; - bool mOn; - unsigned long mStartTime; - unsigned long mDuration; -}; - -extern uArmBuzzer swift_buzzer; - -#endif // _UARMBUZZER_H_ diff --git a/Marlin/uArmCalibration.cpp b/Marlin/uArmCalibration.cpp deleted file mode 100644 index 57e0d08..0000000 --- a/Marlin/uArmCalibration.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/** - ****************************************************************************** - * @file uArmCalibration.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#include "uArmCalibration.h" -#include "macros.h" - - -uint16_t reference_angle_value[NUM_AXIS] = {95, 1429, 1998, 0}; - -float reference_angle[NUM_AXIS] = {90.0, 32.4, 90.6, 0.0}; - - -void init_reference_angle_value() -{ - //read value from eeprom - reference_angle_value[X_AXIS] = getE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR, DATA_TYPE_INTEGER); - reference_angle_value[Y_AXIS] = getE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR+2, DATA_TYPE_INTEGER); - reference_angle_value[Z_AXIS] = getE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR+4, DATA_TYPE_INTEGER); - - debugPrint("read ref value: %d, %d, %d\r\n", reference_angle_value[0], reference_angle_value[1], reference_angle_value[2]); -} - -void update_reference_angle_value(uint16_t value[NUM_AXIS]) -{ - - reference_angle_value[X_AXIS] = value[X_AXIS]; - reference_angle_value[Y_AXIS] = value[Y_AXIS]; - reference_angle_value[Z_AXIS] = value[Z_AXIS]; - - - setE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR, DATA_TYPE_INTEGER, reference_angle_value[X_AXIS]); - setE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR+2, DATA_TYPE_INTEGER, reference_angle_value[Y_AXIS]); - setE2PROMData(EEPROM_ON_CHIP, EEPROM_REFERENCE_VALUE_ADDR+4, DATA_TYPE_INTEGER, reference_angle_value[Z_AXIS]); - - debugPrint("set ref value: %d, %d, %d\r\n", reference_angle_value[0], reference_angle_value[1], reference_angle_value[2]); -} - -uint16_t get_current_angle_adc(uint8_t index) -{ - uint16_t value = 0; - - switch(index) - { - case X_AXIS: - value = X_IIC_Read_OneByte((0x36<<1),0x0e); - value <<= 8; - value |= X_IIC_Read_OneByte((0x36<<1),0x0f); - break; - - case Y_AXIS: - value = Y_IIC_Read_OneByte((0x36<<1),0x0e); - value <<= 8; - value |= Y_IIC_Read_OneByte((0x36<<1),0x0f); - break; - - case Z_AXIS: - value = Z_IIC_Read_OneByte((0x36<<1),0x0e); - value <<= 8; - value |= Z_IIC_Read_OneByte((0x36<<1),0x0f); - break; - - case E_AXIS: - //servo - value = map(getAnalogPinValue(SERVO_HAND_ROT_ANALOG_PIN), SERVO_9G_MIN, SERVO_9G_MAX, 0, 180);; - break; - - default: - value = 0; - } - - return value; -} - -float get_current_angle(uint8_t index) -{ - if (index > E_AXIS) - return 0; - - if (index == E_AXIS) - return get_current_angle_adc(index); - - float angle = 0.0; - uint16_t cur_value = get_current_angle_adc(index); - uint16_t diff = 0; - - if (cur_value > reference_angle_value[index]) - { - diff = cur_value - reference_angle_value[index]; - angle = reference_angle[index] + diff * 360.0 / 4096; - } - else if (cur_value < reference_angle_value[index]) - { - diff = reference_angle_value[index] - cur_value; - angle = reference_angle[index] - diff * 360.0 / 4096; - } - else - { - angle = reference_angle[index]; - } - - debugPrint("cur_value = %d\r\n", cur_value); - debugPrint("reference_value = %d\r\n", reference_angle_value[index]); - - debugPrint("angle = %f\r\n", angle); - - float origin_angle = angle; - float min = 0, max = 0; - - if (angle > 360) - { - angle -= 360; - } - - if (angle < 0) - { - angle += 360; - } - debugPrint("angle2 = %f\r\n", angle); - - switch (index) - { - case X_AXIS: - min = 0; - max = 180; - break; - - case Y_AXIS: - min = LOWER_ARM_MIN_ANGLE; - max = LOWER_ARM_MAX_ANGLE; - break; - - case Z_AXIS: - min = UPPER_ARM_MIN_ANGLE; - max = UPPER_ARM_MAX_ANGLE; - break; - - } - - if (angle >= min && angle <= max) - { - return angle; - } - else if (diff > 2048) - { - if (origin_angle < 0) - { - return max; - } - else - { - return min; - } - } - else - { - if (origin_angle < 0) - { - return min; - } - else - { - return max; - } - } - - //return angle; -} - - - - diff --git a/Marlin/uArmCalibration.h b/Marlin/uArmCalibration.h deleted file mode 100644 index b22f4f9..0000000 --- a/Marlin/uArmCalibration.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - ****************************************************************************** - * @file uArmCalibration.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#ifndef _UARMCALIBRATION_H_ -#define _UARMCALIBRATION_H_ - -#include "Marlin.h" -#include "uArmAPI.h" -#include "uArmParams.h" -#include "uArmDebug.h" -#include "uArmIIC.h" -#include "X_IIC.h" -#include "Y_IIC.h" -#include "Z_IIC.h" - -float get_current_angle(uint8_t index); -void init_reference_angle_value(); -void update_reference_angle_value(uint16_t value[NUM_AXIS]); - -uint16_t get_current_angle_adc(uint8_t index); -void set_current_pos_as_reference(); - - - -#endif // _UARMCALIBRATION_H_ diff --git a/Marlin/uArmDebug.cpp b/Marlin/uArmDebug.cpp deleted file mode 100644 index 0709453..0000000 --- a/Marlin/uArmDebug.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/** - ****************************************************************************** - * @file uArmDebug.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-12-02 - ****************************************************************************** - */ - -#include "uArmDebug.h" -#include - - -#define ARDBUFFER 50 - -int msprintf(char *result, char *str, ...) -{ - int i, count=0, j=0, flag=0; - char temp[ARDBUFFER+1]; - char num[ARDBUFFER+1]; - - for(i=0; str[i]!='\0';i++) - { - if(str[i]=='%') - count++; - } - - result[0] = '\0'; - - if (count == 0) - { - for (i = 0; str[i] != '\0'; i++) - { - result[i] = str[i]; - } - result[i] = '\0'; - } - else - { - - va_list argv; - va_start(argv, count); - for(i=0,j=0; str[i]!='\0';i++) - { - if(str[i]=='%') - { - temp[j] = '\0'; - strcat(result, temp); - j=0; - temp[0] = '\0'; - - switch(str[++i]) - { - case 'd': - { - - itoa(va_arg(argv, int), num, 10); - strcat(result, num); - break; - } - - case 'l': - ltoa(va_arg(argv, long), num, 10); - strcat(result, num); - break; - - case 'f': - { - char d_str[10]; - dtostrf(va_arg(argv, double), 4, 2, d_str); - strcat(result, d_str); - break; - } - - case 'c': - num[0] = (char)va_arg(argv, int); - num[1] = '\0'; - strcat(result, num); - break; - - case 's': - strcat(result, va_arg(argv, char *)); - break; - - default: - break; - } - } - else - { - temp[j] = str[i]; - j = (j+1)%ARDBUFFER; - if(j==0) - { - temp[ARDBUFFER] = '\0'; - strcat(result, temp); - temp[0]='\0'; - } - } - } - } - temp[j] = '\0'; - strcat(result, temp); - - return count + 1; -} - - - -void mprint(char *fmt, ...) -{ - char buf[PRINT_BUF] = {0}; - - int i, count=0, j=0, flag=0; - char temp[ARDBUFFER+1]; - char num[ARDBUFFER+1]; - - for(i=0; fmt[i]!='\0';i++) - { - if(fmt[i]=='%') - count++; - } - - if (count == 0) - { - for (i = 0; fmt[i] != '\0'; i++) - { - buf[i] = fmt[i]; - } - buf[i] = '\0'; - } - else - { - buf[0] = '\0'; - va_list argv; - va_start(argv, count); - for(i=0,j=0; fmt[i]!='\0';i++) - { - if(fmt[i]=='%') - { - temp[j] = '\0'; - strcat(buf, temp); - j=0; - temp[0] = '\0'; - - switch(fmt[++i]) - { - case 'd': - { - itoa(va_arg(argv, int), num, 10); - strcat(buf, num); - break; - } - - case 'l': - ltoa(va_arg(argv, long), num, 10); - strcat(buf, num); - break; - - case 'f': - { - char d_str[10]; - dtostrf(va_arg(argv, double), 4, 2, d_str); - strcat(buf, d_str); - break; - } - - case 'c': - num[0] = (char)va_arg(argv, int); - num[1] = '\0'; - strcat(buf, num); - break; - - case 's': - strcat(buf, va_arg(argv, char *)); - break; - default: - break; - }; - } - else - { - temp[j] = fmt[i]; - j = (j+1)%ARDBUFFER; - if(j==0) - { - temp[ARDBUFFER] = '\0'; - strcat(buf, temp); - temp[0]='\0'; - } - } - } - } - - - temp[j] = '\0'; - strcat(buf, temp); - - PrintSerial.print(buf); - -} - - diff --git a/Marlin/uArmDebug.h b/Marlin/uArmDebug.h deleted file mode 100644 index 0b368c1..0000000 --- a/Marlin/uArmDebug.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - ****************************************************************************** - * @file uArmDebug.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-12-02 - ****************************************************************************** - */ - -#ifndef _UARMDEBUG_H_ -#define _UARMDEBUG_H_ - -#include - -#include "Marlin.h" - - -#ifdef DEBUG - #define debugPrint mprint -#else - #define debugPrint -#endif - -#define PrintSerial Serial - -#define PRINT_BUF 128 - - -void mprint(char *fmt, ...); - -int msprintf(char *result, char *str, ...); - - -#endif // _UARMDEBUG_H_ diff --git a/Marlin/uArmGrove.cpp b/Marlin/uArmGrove.cpp deleted file mode 100644 index 10b7116..0000000 --- a/Marlin/uArmGrove.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/** - ****************************************************************************** - * @file uArmGrove.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-06 - ****************************************************************************** - */ - -#include "uArmGrove.h" -#include "GroveColorSensor.h" -#include "paj7620.h" -#include "Ultrasonic.h" - -GroveColorSensor colorSensor; -Ultrasonic ultrasonic(8); - -void GestureReport() -{ - uint8_t data = 0, data1 = 0, error; - char result[128]; - int gesture = 255; - - error = paj7620ReadReg(0x43, 1, &data); // Read Bank_0_Reg_0x43/0x44 for gesture result. - if (!error) - { - switch (data) // When different gestures be detected, the variable 'data' will be set to different values by paj7620ReadReg(0x43, 1, &data). - { - case GES_RIGHT_FLAG: - delay(GES_ENTRY_TIME); - paj7620ReadReg(0x43, 1, &data); - if(data == GES_FORWARD_FLAG) - { - gesture = GES_FORWARD_FLAG; - delay(GES_QUIT_TIME); - } - else if(data == GES_BACKWARD_FLAG) - { - gesture = GES_BACKWARD_FLAG; - delay(GES_QUIT_TIME); - } - else - { - gesture = GES_RIGHT_FLAG; - } - break; - case GES_LEFT_FLAG: - delay(GES_ENTRY_TIME); - paj7620ReadReg(0x43, 1, &data); - if(data == GES_FORWARD_FLAG) - { - gesture = GES_FORWARD_FLAG; - delay(GES_QUIT_TIME); - } - else if(data == GES_BACKWARD_FLAG) - { - gesture = GES_BACKWARD_FLAG; - delay(GES_QUIT_TIME); - } - else - { - gesture = GES_RIGHT_FLAG; - } - break; - case GES_UP_FLAG: - delay(GES_ENTRY_TIME); - paj7620ReadReg(0x43, 1, &data); - if(data == GES_FORWARD_FLAG) - { - gesture = GES_FORWARD_FLAG; - delay(GES_QUIT_TIME); - } - else if(data == GES_BACKWARD_FLAG) - { - gesture = GES_BACKWARD_FLAG; - delay(GES_QUIT_TIME); - } - else - { - gesture = GES_UP_FLAG; - } - break; - case GES_DOWN_FLAG: - delay(GES_ENTRY_TIME); - paj7620ReadReg(0x43, 1, &data); - if(data == GES_FORWARD_FLAG) - { - gesture = GES_FORWARD_FLAG; - delay(GES_QUIT_TIME); - } - else if(data == GES_BACKWARD_FLAG) - { - gesture = GES_BACKWARD_FLAG; - delay(GES_QUIT_TIME); - } - else - { - gesture = GES_DOWN_FLAG; - } - break; - case GES_FORWARD_FLAG: - gesture = GES_FORWARD_FLAG; - delay(GES_QUIT_TIME); - break; - case GES_BACKWARD_FLAG: - gesture = GES_BACKWARD_FLAG; - delay(GES_QUIT_TIME); - break; - case GES_CLOCKWISE_FLAG: - gesture = GES_CLOCKWISE_FLAG; - break; - case GES_COUNT_CLOCKWISE_FLAG: - gesture = GES_COUNT_CLOCKWISE_FLAG; - break; - default: - paj7620ReadReg(0x44, 1, &data1); - if (data1 == GES_WAVE_FLAG) - { - gesture = GES_WAVE_FLAG; - } - break; - } - } - - if (gesture != 255) - { - msprintf(result, "@%d N%d V%d\r\n", REPORT_TYPE_GROVE, GROVE_GESTURE_SERSOR, gesture); - reportString(result); - } - -} - -void GroveColorReport() -{ - char result[128]; - int red, green, blue; - - - colorSensor.readRGB(&red, &green, &blue); //Read RGB values to variables. - - - colorSensor.clearInterrupt(); - - msprintf(result, "@%d N%d R%d G%d B%d\r\n", REPORT_TYPE_GROVE, GROVE_COLOR_SENSOR, red, green, blue); - reportString(result); -} - - - -void UltrasonicReport() -{ - char result[128]; - - ultrasonic.MeasureInCentimeters(); - - msprintf(result, "@%d N%d V%d\r\n", REPORT_TYPE_GROVE, GROVE_ULTRASONIC, ultrasonic.RangeInCentimeters); - reportString(result); -} - -void initGroveModule(GroveType type) -{ - uint8_t error = 0; - - switch (type) { - case GROVE_COLOR_SENSOR: - debugPrint("initGroveModule\n"); - colorSensor.init(); - break; - - case GROVE_GESTURE_SERSOR: - error = paj7620Init(); // initialize Paj7620 registers - if (error) - { - debugPrint("INIT ERROR,CODE: %d\r\n", error); - } - - break; - - case GROVE_ULTRASONIC: - break; - - default: - break; - } -} - -void setGroveModuleReportInterval(GroveType type, long interval) -{ - - if (interval <= 0) - { - removeReportService(type); - } - else - { - - switch (type) { - case GROVE_COLOR_SENSOR: - addReportService(type, interval, GroveColorReport); - break; - - case GROVE_GESTURE_SERSOR: - addReportService(type, interval, GestureReport); - break; - - case GROVE_ULTRASONIC: - addReportService(type, interval, UltrasonicReport); - break; - - default: - break; - } - } -} diff --git a/Marlin/uArmGrove.h b/Marlin/uArmGrove.h deleted file mode 100644 index 46559ca..0000000 --- a/Marlin/uArmGrove.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - ****************************************************************************** - * @file uArmGrove.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-06 - ****************************************************************************** - */ - -#ifndef _UARMGROVE_H_ -#define _UARMGROVE_H_ - -#include -#include "Marlin.h" - -enum GroveType -{ - GROVE_TYPE_NONE = 0, - - GROVE_COLOR_SENSOR = 10, - GROVE_GESTURE_SERSOR = 11, - GROVE_ULTRASONIC = 12, - - GROVE_TYPE_COUNT -}; - -void initGroveModule(GroveType type); - -void setGroveModuleReportInterval(GroveType type, long interval); - -#endif // _UARMGROVE_H_ diff --git a/Marlin/uArmIIC.cpp b/Marlin/uArmIIC.cpp deleted file mode 100644 index 82b07c5..0000000 --- a/Marlin/uArmIIC.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/** - ****************************************************************************** - * @file uArmIIC.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-18 - ****************************************************************************** - */ - -#include "uArmIIC.h" -void delay_us() -{ - - -} - -void iic_start() -{ - SCL_SET;// SCL=1 - delay_us(); - SDA_SET;// SDA=1 - delay_us(); - SDA_CLEAR;// SDA=0 - delay_us(); - SCL_CLEAR;// SCL=0 - delay_us(); -} - -void iic_stop() -{ - SCL_CLEAR;// SCL=0 - delay_us(); - SDA_CLEAR;// SDA=0 - delay_us(); - SCL_SET;// SCL=1 - delay_us(); - SDA_SET;// SDA=1 - delay_us(); -} - -//return 0:ACK=0 -//return 1:NACK=1 -unsigned char read_ack() -{ - unsigned char old_state; - old_state = PORT_DDR; - SDA_INPUT;//SDA INPUT - SDA_SET;// SDA = 1; - delay_us(); - SCL_SET;// SCL=1 - delay_us(); - if(SDA_READ) // if(SDA) - { - SCL_CLEAR;// SCL=0 - iic_stop(); - PORT_DDR = old_state; - return 1; - } - else{ - SCL_CLEAR;// SCL=0 - PORT_DDR = old_state; - return 0; - } -} - -//ack=0:send ack -//ack=1:do not send ack -void send_ack() -{ - unsigned char old_state; - old_state = PORT_DDR; - SDA_OUTPUT;//SDA OUTPUT - SDA_CLEAR;// SDA=0 - delay_us(); - SCL_SET;// SCL=1 - delay_us(); - SCL_CLEAR;// SCL=0 - delay_us(); - PORT_DDR = old_state; - SDA_SET;// SDA=1 - delay_us(); -} - -void iic_sendbyte(unsigned char dat) -{ - unsigned char i; - for(i = 0; i < 8; i++) - { - if(dat & 0x80) - SDA_SET; // SDA = 1; - else - SDA_CLEAR; // SDA = 0; - dat <<= 1; - delay_us(); - SCL_SET;// SCL=1 - delay_us(); - SCL_CLEAR;// SCL=0 - } -} - -unsigned char iic_receivebyte() -{ - unsigned char i,byte = 0; - unsigned char old_state; - old_state = PORT_DDR; - SDA_INPUT;//SDA INPUT - for(i = 0; i < 8; i++) - { - SCL_SET;// SCL=1 - delay_us(); - byte <<= 1; - - if(SDA_READ) // if(SDA) - { - byte |= 0x01; - } - - delay_us(); - SCL_CLEAR;// SCL=0 - - delay_us(); - } - PORT_DDR = old_state; - return byte; -} - -unsigned char iic_writebuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len) -{ - SCL_OUTPUT; - SDA_OUTPUT; - SCL_SET; - SDA_SET; - - unsigned char length_of_data=0;//page write - length_of_data = len; - iic_start(); - iic_sendbyte(device_addr); - if(read_ack()) return 1; - iic_sendbyte(addr>>8); - if(read_ack()) return 1; - iic_sendbyte(addr%256); - if(read_ack()) return 1; - - while(len != 0) - { - iic_sendbyte(*(buf + length_of_data - len)); - len--; - if(read_ack()) return 1; - delay(5); - } - iic_stop(); - - return 0; -} - -unsigned char iic_readbuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len) -{ - SCL_OUTPUT; - SDA_OUTPUT; - SCL_SET; - SDA_SET; - - unsigned char length_of_data=0; - length_of_data = len; - iic_start(); - iic_sendbyte(device_addr); - if(read_ack()) return 1; - iic_sendbyte(addr>>8); - if(read_ack()) return 1; - iic_sendbyte(addr%256); - if(read_ack()) return 1; - iic_start(); - iic_sendbyte(device_addr+1); - if(read_ack()) return 1; - - while(len != 0) - { - *(buf + length_of_data - len) = iic_receivebyte(); - - len--; - if(len != 0) { - send_ack(); - } - } - iic_stop(); - return 0; -} \ No newline at end of file diff --git a/Marlin/uArmIIC.h b/Marlin/uArmIIC.h deleted file mode 100644 index cc77ce8..0000000 --- a/Marlin/uArmIIC.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - ****************************************************************************** - * @file uArmIIC.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-18 - ****************************************************************************** - */ - -#ifndef _UARMIIC_H_ -#define _UARMIIC_H_ - -#include - - - - -// scl pb6 -// sda pb7 - -#define SDA_SET PORTB |= 0x80 -#define SDA_CLEAR PORTB &= 0x7F -#define SCL_SET PORTB |= 0x40 -#define SCL_CLEAR PORTB &= 0xBF - -#define SDA_INPUT DDRB &= 0x7F -#define SDA_OUTPUT DDRB |= 0x80 - -#define SCL_INPUT DDRB &= 0xBF -#define SCL_OUTPUT DDRB |= 0x40 - -#define SDA_READ PINB & 0x80 - -#define PORT_DDR DDRB - - - - - -void delay_us(); - -void iic_start(); -void iic_stop(); - -//return 0:ACK=0 -//return 1:NACK=1 -unsigned char read_ack(); - -//ack=0:send ack -//ack=1:do not send ack -void send_ack(); - -void iic_sendbyte(unsigned char dat); - -unsigned char iic_receivebyte(); - -unsigned char iic_writebuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len); - -unsigned char iic_readbuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len); - - - - - -#endif // _UARMIIC_H_ diff --git a/Marlin/uArmLed.cpp b/Marlin/uArmLed.cpp deleted file mode 100644 index 4dd2585..0000000 --- a/Marlin/uArmLed.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/** - ****************************************************************************** - * @file uArmLed.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-17 - ****************************************************************************** - */ - -#include "uArmLed.h" - -uArmLed::uArmLed() -{ - mPin = 0xff; - mState = INIT; - mTicks = 0; -} - -void uArmLed::setPin(unsigned char pin, unsigned char polarity) -{ - mPin = pin; - mState = OFF; - mTicks = 0; - mPeriod = 500; - mBright = 255; - mPolarity = polarity; -} - -void uArmLed::on(unsigned char bright) -{ - //digitalWrite(mPin, LOW); - if (mPolarity) - { - analogWrite(mPin, bright); - } - else - { - analogWrite(mPin, 255-bright); - } - mState = ON; -} - -void uArmLed::off() -{ - //digitalWrite(mPin, HIGH); - if (mPolarity) - { - analogWrite(mPin, 0); - } - else - { - analogWrite(mPin, 255); - } - mState = OFF; - mTicks = 0; -} - - - -void uArmLed::blink(unsigned int period, unsigned char bright) -{ - if (mPeriod <= 10) - return ; - - on(bright); - mState = BLINK_ON; - mTicks = 1; - mPeriod = period; - mBright = bright; -} - -void uArmLed::tickInc() -{ - mTicks++; - - if (mTicks >= (mPeriod/TICK_INTERVAL)) - { - mTicks = 0; - - if (mState == BLINK_ON) - { - if (mPolarity) - { - analogWrite(mPin, mBright); - } - else - { - analogWrite(mPin, 255 - mBright); - } - mState = BLINK_OFF; - } - else - { - if (mPolarity) - { - analogWrite(mPin, 0); - } - else - { - analogWrite(mPin, 255); - } - mState = BLINK_ON; - } - } -} - -void uArmLed::tick() -{ - switch (mState) - { - case BLINK_OFF: - case BLINK_ON: - tickInc(); - break; - - default: - break; - - } -} \ No newline at end of file diff --git a/Marlin/uArmLed.h b/Marlin/uArmLed.h deleted file mode 100644 index 38a537c..0000000 --- a/Marlin/uArmLed.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - ****************************************************************************** - * @file uArmLed.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-10-17 - ****************************************************************************** - */ - -#ifndef _UARMLED_H_ -#define _UARMLED_H_ - -#include -#include "Marlin.h" - -class uArmLed -{ - typedef enum - { - INIT, - OFF, - ON, - BLINK_OFF, - BLINK_ON, - - STATE_COUNT - - } LEDState; - -public: - uArmLed(); - - // polarity = 1: HIGH=led on - // polarity = 0: LOW =led on - void setPin(unsigned char pin, unsigned char polarity = 0); - - void on(unsigned char bright = 255); - - void off(); - void blink(unsigned int period = 500, unsigned char bright = 255); - - - - void tick(); - -private: - void tickInc(); - -private: - unsigned char mPin; - unsigned int mPeriod; // ms - LEDState mState; - unsigned int mTicks; - unsigned char mBright; - unsigned char mPolarity; -}; - -#endif // _UARMLED_H_ diff --git a/Marlin/uArmParams.h b/Marlin/uArmParams.h deleted file mode 100644 index 70f5317..0000000 --- a/Marlin/uArmParams.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - ****************************************************************************** - * @file uArmParams.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#ifndef _UARMPARAMS_H_ -#define _UARMPARAMS_H_ - - - - - - -#define TICK_INTERVAL 50 - -#define EEPROM_X_ANGLE_ADDR 100 -#define EEPROM_Y_ANGLE_ADDR 110 -#define EEPROM_Z_ANGLE_ADDR 120 - -// e2prom device -#define EEPROM_ON_CHIP 0 -#define EEPROM_EXTERN_USER 1 -#define EEPROM_EXTERN_SYSTEM 2 - -// e2prom data type -#define DATA_TYPE_BYTE 1 -#define DATA_TYPE_INTEGER 2 -#define DATA_TYPE_FLOAT 4 - -#define EXTERNAL_EEPROM_USER_ADDRESS 0xa0 -#define EXTERNAL_EEPROM_SYS_ADDRESS 0xa2 - -#define SERVO_9G_MAX 460 -#define SERVO_9G_MIN 98 - - -#define EEPROM_REFERENCE_VALUE_ADDR 800 - -#define EEPROM_MODE_ADDR 900 -#define EEPROM_HEIGHT_ADDR 910 -#define EEPROM_FRONT_ADDR 920 - -#define EEPROM_WRITE_TEST_ADDR 1992 - - -#define MATH_PI 3.141592653589793238463 -#define MATH_TRANS 57.2958 -#define MATH_L1 106.6 //90.00 -#define MATH_L2 13.2 //21.17 -#define MATH_LOWER_ARM 142.07 //148.25 -#define MATH_UPPER_ARM 158.81 //158.8 //160.2 -//#define MATH_FRONT_HEADER 69//(29.4+38.6)//43.75) //25.00// the distance between wrist to the front point we use -#define MATH_UPPER_LOWER MATH_UPPER_ARM/MATH_LOWER_ARM - -// gripper or pump status -#define STOP 0 -#define WORKING 1 -#define GRABBING 2 - -#define PUMP_GRABBING_CURRENT 70 - -#define RESULT_BUFFER_SIZE 128 - -#define E_OK 0 -#define E_PARAMETERS_WRONG 21 -#define E_OUT_OF_RANGE 22 -#define E_BUFFER_FULL 23 -#define E_NO_POWER 24 -#define E_FAIL 25 - - -#define LOWER_ARM_MAX_ANGLE 135.6 -#define LOWER_ARM_MIN_ANGLE 0 -#define UPPER_ARM_MAX_ANGLE 100.7 -#define UPPER_ARM_MIN_ANGLE 0 -#define LOWER_UPPER_MAX_ANGLE 151 -#define LOWER_UPPER_MIN_ANGLE 10 - - -#define BT_NAME_MAX_LEN 11 - -#define UNLOCK_NUM 22765 - -#define REPORT_TYPE_POS 3 -#define REPORT_TYPE_GROVE 10 - - -#endif // _UARMPARAMS_H_ diff --git a/Marlin/uArmPump.cpp b/Marlin/uArmPump.cpp deleted file mode 100644 index 3c6d9f6..0000000 --- a/Marlin/uArmPump.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/** - ****************************************************************************** - * @file uArmPump.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-05-25 - ****************************************************************************** - */ - -#include "uArmPump.h" - -#define VALVE_ON_TIMES_MAX 10 - -pump_state_t pump_state = PUMP_STATE_OFF; - - -void pump_set_state(pump_state_t state) -{ - if (state >= PUMP_STATE_COUNT) - return; - - pump_state = state; -} - -void pump_run() -{ - static uint8_t valve_on_times = 0; - - - switch (pump_state) - { - case PUMP_STATE_OFF: - valve_on_times = 0; - break; - - case PUMP_STATE_ON: - valve_on_times = 0; - break; - - case PUMP_STATE_VALVE_ON: - valve_on_times++; - digitalWrite(VALVE_EN, HIGH); - if (valve_on_times >= VALVE_ON_TIMES_MAX) - { - valve_on_times = 0; - pump_state = PUMP_STATE_OFF; - } - else - { - pump_state = PUMP_STATE_VALVE_OFF; - } - break; - - case PUMP_STATE_VALVE_OFF: - digitalWrite(VALVE_EN, LOW); - pump_state = PUMP_STATE_VALVE_ON; - - break; - - - } -} \ No newline at end of file diff --git a/Marlin/uArmPump.h b/Marlin/uArmPump.h deleted file mode 100644 index de7c69a..0000000 --- a/Marlin/uArmPump.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - ****************************************************************************** - * @file uArmPump.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-05-25 - ****************************************************************************** - */ - -#ifndef _UARMPUMP_H_ -#define _UARMPUMP_H_ - -#include -#include "Marlin.h" - -typedef enum _pump_state_t -{ - PUMP_STATE_OFF, - PUMP_STATE_ON, - PUMP_STATE_VALVE_ON, - PUMP_STATE_VALVE_OFF, - - - PUMP_STATE_COUNT -} pump_state_t; - -void pump_run(); -void pump_set_state(pump_state_t state); - -#endif // _UARMPUMP_H_ diff --git a/Marlin/uArmRecorder.cpp b/Marlin/uArmRecorder.cpp deleted file mode 100644 index 5c55f37..0000000 --- a/Marlin/uArmRecorder.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - ****************************************************************************** - * @file uArmRecorder.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-09-30 - * @license GNU - * copyright(c) 2016 UFactory Team. All right reserved - ****************************************************************************** - */ - -#include "uArmRecorder.h" - -uArmRecorder recorder; - -extern void reportPos(); - -uArmRecorder::uArmRecorder() -{ - -} - -void uArmRecorder::write(unsigned int addr, unsigned char data[], int num) -{ - unsigned char i=0; - i = (addr % 128); - // Since the eeprom's sector is 128 byte, if we want to write 5 bytes per cycle we need to care about when there's less than 5 bytes left - if((i >= 124) && (num == 5)) - { - i = 128 - i; - iic_writebuf(data, EXTERNAL_EEPROM_USER_ADDRESS, addr, i);// write data - delay(5); - iic_writebuf(data + i, EXTERNAL_EEPROM_USER_ADDRESS, addr + i, num - i);// write data - } - //if the left bytes are greater than 5, just do it - else - { - iic_writebuf(data, EXTERNAL_EEPROM_USER_ADDRESS, addr, num);// write data - } -} - -void uArmRecorder::read(unsigned int addr, unsigned char data[], int num) -{ - unsigned char i=0; - i= (addr % 128); - // Since the eeprom's sector is 128 byte, if we want to write 5 bytes per cycle we need to care about when there's less than 5 bytes left - if( (i >= 124) && (num == 5)) - { - i = 128 - i; - iic_readbuf(data, EXTERNAL_EEPROM_USER_ADDRESS, addr, i);// write data - delay(5); - iic_readbuf(data + i, EXTERNAL_EEPROM_USER_ADDRESS, addr + i, num - i);// write data - } - //if the left bytes are greater than 5, just do it - else - { - iic_readbuf(data, EXTERNAL_EEPROM_USER_ADDRESS, addr, num);// write data - } -} - - diff --git a/Marlin/uArmRecorder.h b/Marlin/uArmRecorder.h deleted file mode 100644 index 6b9a940..0000000 --- a/Marlin/uArmRecorder.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - ****************************************************************************** - * @file uArmRecorder.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2016-09-30 - * @license GNU - * copyright(c) 2016 UFactory Team. All right reserved - ****************************************************************************** - */ - -#ifndef _UARMRECORDER_H_ -#define _UARMRECORDER_H_ - -#include -#include "Marlin.h" - - - - - -class uArmRecorder -{ -public: - uArmRecorder(); - void write(unsigned int addr, unsigned char data[], int num); - void read(unsigned int addr, unsigned char data[], int num); - -private: - - -}; - -extern uArmRecorder recorder; - - -#endif // _UARMRECORDER_H_ diff --git a/Marlin/uArmReportService.cpp b/Marlin/uArmReportService.cpp deleted file mode 100644 index ed2dfa4..0000000 --- a/Marlin/uArmReportService.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/** - ****************************************************************************** - * @file uArmReportService.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-06 - ****************************************************************************** - */ - -#include "uArmReportService.h" - -ReportServiceList reportServiceList; - -void reportServiceInit() -{ - - for (int i = 0; i = reportServiceList.item[i].interval) - { - reportServiceList.item[i].timestamp = curTimeStamp; - - if (reportServiceList.item[i].reportFuncCB != NULL) - { - debugPrint("reportFuncCB\r\n"); - reportServiceList.item[i].reportFuncCB(); - } - } - - } - } -} - -void addReportService(uint8_t type, long interval, void (*reportFuncCB)()) -{ - if (reportFuncCB == NULL) - return; - - if (type == TYPE_NONE) - return; - - if (interval == 0) - { - return; - } - - debugPrint("addReportService %d\r\n", type); - int i = 0; - for (i = 0; i < REPORT_SERVICE_ITEM_MAX; i++) - { - // exist - if (reportServiceList.item[i].type == type) - { - reportServiceList.item[i].interval = interval; - reportServiceList.item[i].timestamp = millis(); - reportServiceList.item[i].reportFuncCB = reportFuncCB; - break; - } - } - - // new item - if (i == REPORT_SERVICE_ITEM_MAX) - { - - - // find a hole - for (int j = 0; j < REPORT_SERVICE_ITEM_MAX; j++) - { - if (reportServiceList.item[j].type == TYPE_NONE) - { - reportServiceList.item[j].type = type; - reportServiceList.item[j].interval = interval; - reportServiceList.item[j].timestamp = millis(); - reportServiceList.item[j].reportFuncCB = reportFuncCB; - - - - return; - } - } - - - } - -} - - -void removeReportService(uint8_t type) -{ - if (type == TYPE_NONE) - return; - - for (int i = 0; i < REPORT_SERVICE_ITEM_MAX; i++) - { - // exist - if (reportServiceList.item[i].type == type) - { - reportServiceList.item[i].type = TYPE_NONE; - - break; - } - } -} \ No newline at end of file diff --git a/Marlin/uArmReportService.h b/Marlin/uArmReportService.h deleted file mode 100644 index 0545190..0000000 --- a/Marlin/uArmReportService.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - ****************************************************************************** - * @file uArmReportService.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-06 - ****************************************************************************** - */ - -#ifndef _UARMREPORTSERVICE_H_ -#define _UARMREPORTSERVICE_H_ - -#include -#include "Marlin.h" - -#define TYPE_NONE 0 -#define REPORT_SERVICE_ITEM_MAX 10 - -typedef struct _ReportServiceItem -{ - void (*reportFuncCB)(); - uint8_t type; - long interval; - long timestamp; -} ReportServiceItem; - -typedef struct _ReportServiceList -{ - ReportServiceItem item[REPORT_SERVICE_ITEM_MAX]; - -} ReportServiceList; - -void reportServiceInit(); -void reportServiceRun(); - -void addReportService(uint8_t type, long interval, void (*reportFuncCB)()); -void removeReportService(uint8_t type); - - -#endif // _UARMREPORTSERVICE_H_ diff --git a/Marlin/uArmSerial.cpp b/Marlin/uArmSerial.cpp deleted file mode 100644 index 0f1a25d..0000000 --- a/Marlin/uArmSerial.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - ****************************************************************************** - * @file uArmSerial.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-21 - ****************************************************************************** - */ - -#include "uArmSerial.h" - -uArmSerial commSerial; - -uArmSerial::uArmSerial() -{ - _serial = &Serial; -} - -void uArmSerial::setSerialPortLock(bool locked) -{ - _serialPortLock = locked; -} - -void uArmSerial::setSerialPort(HardwareSerial* serial) -{ - if (serial == NULL || _serialPortLock) - { - return; - } - - _serial = serial; -} - -void uArmSerial::begin(unsigned long baud, uint8_t config) -{ - _serial->begin(baud, config); -} - -void uArmSerial::end() -{ - _serial->end(); -} - -int uArmSerial::available(void) -{ - return _serial->available(); -} - -int uArmSerial::peek(void) -{ - return _serial->peek(); -} - -int uArmSerial::read(void) -{ - return _serial->read(); -} - -int uArmSerial::availableForWrite(void) -{ - return _serial->availableForWrite(); -} - -void uArmSerial::flush(void) -{ - _serial->flush(); -} - -size_t uArmSerial::write(uint8_t n) -{ - return _serial->write(n); -} \ No newline at end of file diff --git a/Marlin/uArmSerial.h b/Marlin/uArmSerial.h deleted file mode 100644 index f95e578..0000000 --- a/Marlin/uArmSerial.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - ****************************************************************************** - * @file uArmSerial.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-21 - ****************************************************************************** - */ - -#ifndef _UARMSERIAL_H_ -#define _UARMSERIAL_H_ - -#include -#include "Print.h" - -class uArmSerial : public Print -{ -public: - uArmSerial(); - void setSerialPortLock(bool locked); - void setSerialPort(HardwareSerial* serial); - - void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } - void begin(unsigned long, uint8_t); - void end(); - virtual int available(void); - virtual int peek(void); - virtual int read(void); - int availableForWrite(void); - virtual void flush(void); - virtual size_t write(uint8_t); - inline size_t write(unsigned long n) { return write((uint8_t)n); } - inline size_t write(long n) { return write((uint8_t)n); } - inline size_t write(unsigned int n) { return write((uint8_t)n); } - inline size_t write(int n) { return write((uint8_t)n); } - using Print::write; // pull in write(str) and write(buf, size) from Print - operator bool() { return true; } - -private: - HardwareSerial *_serial; - unsigned char _serialPortLock = false; -}; - -extern uArmSerial commSerial; - -#endif // _UARMSERIAL_H_ diff --git a/Marlin/uArmService.cpp b/Marlin/uArmService.cpp deleted file mode 100644 index 6b5a6df..0000000 --- a/Marlin/uArmService.cpp +++ /dev/null @@ -1,876 +0,0 @@ -/** - ****************************************************************************** - * @file uArmService.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-17 - ****************************************************************************** - */ - -#include "uArmService.h" -#include "macros.h" -#include "stepper_indirection.h" -#include "servo.h" - - - -uArmService service; - -extern uArmButton button_menu; -extern uArmButton button_play; -extern uArmLed led_R; -extern uArmLed led_G; -extern uArmLed led_B; -extern Servo servo[NUM_SERVOS]; - -extern float destination[NUM_AXIS]; -extern float feedrate_mm_m; -extern void prepare_move_to_destination(); -extern inline void set_current_to_destination(); - -uArmService::uArmService() -{ - - mRecordAddr = 0; - - mButtonServiceDisable = false; - mBTDisable = true; - mReportStartTime = millis(); - - mTickRecorderTime = millis(); - - mTipState = 0; - mPowerState = 0; -} - -void uArmService::setButtonService(bool on) -{ - if (on) - { - mButtonServiceDisable = false; - } - else - { - mButtonServiceDisable = true; - } -} - - -void uArmService::disableBT(bool disable) -{ - mBTDisable = disable; - - if (mBTDisable) - { - led_B.off(); - - commSerial.setSerialPort(&Serial1); - - mSysStatus = NORMAL_MODE; - } -} - -void menuButtonClicked() -{ - if (service.buttonServiceDisable()) - { - reportButtonEvent(BUTTON_MENU, EVENT_CLICK); - } - else - { - service.handleButtonEvent(BUTTON_MENU, EVENT_CLICK); - } -} - -void menuButtonLongPressed() -{ - if (service.buttonServiceDisable()) - { - reportButtonEvent(BUTTON_MENU, EVENT_LONG_PRESS); - } - else - { - service.handleButtonEvent(BUTTON_MENU, EVENT_LONG_PRESS); - } -} - -void playButtonClicked() -{ - if (service.buttonServiceDisable()) - { - reportButtonEvent(BUTTON_PLAY, EVENT_CLICK); - } - else - { - service.handleButtonEvent(BUTTON_PLAY, EVENT_CLICK); - } -} - -void playButtonLongPressed() -{ - if (service.buttonServiceDisable()) - { - reportButtonEvent(BUTTON_PLAY, EVENT_LONG_PRESS); - } - else - { - service.handleButtonEvent(BUTTON_PLAY, EVENT_LONG_PRESS); - } -} - -#ifdef SWIFT_TEST_MODE - -#define SCL_PIN 21 -#define SDA_PIN 20 - -uArmLed led_seeed; - -uint8_t test_result; - -enum bt_test_state_t -{ - BT_TEST_INIT, - BT_TEST_CONNECT, - BT_TEST_WAIT_RESPONSE, - BT_TEST_DISCONNECT, - BT_TEST_GET_DATA, - BT_TEST_GET_MAC, - BT_TEST_IDLE, - BT_TEST_DONE, - - BT_TEST_COUNT -}; - - -uint8_t bt_test_state = BT_TEST_INIT; - - -enum test_item_t -{ - TEST_ITEM_EEPROM, - TEST_ITEM_BT, - - TEST_ITEM_COUNT -}; - -uint8_t get_test_result() -{ - return test_result; -} - -void all_light_on() -{ - debugPrint("all_light_on\r\n"); - - PORTC &= ~0x80; - PORTA &= ~0x01; - - PORTG |= 0x08; - - digitalWrite(6, HIGH); - digitalWrite(8, LOW); - digitalWrite(9, LOW); - - - digitalWrite(A13, HIGH); - digitalWrite(A3, LOW); - - service.ledAllOff(); - led_R.on(); - - -} - -void all_light_off() -{ - debugPrint("all_light_off\r\n"); - - PORTC |= 0x80; - PORTA |= 0x01; - - PORTG &= ~0x08; - - digitalWrite(6, LOW); - digitalWrite(8, HIGH); - digitalWrite(9, HIGH); - - digitalWrite(A13, LOW); - digitalWrite(A3, HIGH); - service.ledAllOff(); - led_G.on(); - -} - - -void all_pins_init() -{ - // output - // pc7 - DDRC |= 0x80; - PORTC |= 0x80; - - // pa0 - DDRA |= 0x01; - PORTA |= 0x01; - // pg3 - DDRG |= 0x08; - PORTG |= 0x08; - - // pk5 a13 - // pf3 a3 - pinMode(A13, OUTPUT); - pinMode(A3, OUTPUT); - - // ph3 7 - // d8 d9 - pinMode(7, OUTPUT); - pinMode(8, OUTPUT); - pinMode(9, OUTPUT); - - pinMode(SCL_PIN, OUTPUT); - pinMode(SDA_PIN, INPUT_PULLUP); - - led_seeed.setPin(SCL_PIN); - - led_seeed.blink(); - - bt_test_state = BT_TEST_INIT; - - test_result |= eeprom_write_test(EEPROM_EXTERN_USER) ? (1 << TEST_ITEM_EEPROM) : 0; - - all_light_off(); - service.ledAllOff(); -} - - - - - -void bt_test() -{ - static uint32_t bt_tick_count = 0; - uint8_t readBuf[128]; - uint8_t i = 0; - - switch (bt_test_state) - { - case BT_TEST_INIT: - if (!(test_result & (1 << TEST_ITEM_BT))) - { - if (service.btConnected()) - { - bt_tick_count = 0; - - bt_test_state = BT_TEST_CONNECT; - } - } - - break; - - case BT_TEST_CONNECT: - Serial1.write("$1 VSwiftPro\r\n"); - debugPrint("$1 VSwiftPro\r\n"); - bt_test_state = BT_TEST_WAIT_RESPONSE; - break; - - case BT_TEST_WAIT_RESPONSE: - // wait 1s - bt_tick_count++; - if (bt_tick_count >= 2) - { - bt_tick_count = 0; - - // check result - i = 0; - while (Serial1.available()) - { - readBuf[i++] = Serial1.read(); - } - - readBuf[i] = '\0'; - debugPrint("Received:%s\r\n", readBuf); - - // expect data: #OK SwiftPro 8848+mac - // parse data - char *s = strstr(readBuf, "OK SwiftPro"); - - if (s != NULL) - { - - bt_test_state = BT_TEST_DISCONNECT; - } - else - { - bt_test_state = BT_TEST_IDLE; - } - } - break; - - case BT_TEST_DISCONNECT: - Serial1.write("$2 VDisconnect\r\n"); - bt_test_state = BT_TEST_GET_DATA; - bt_tick_count = 0; - break; - - case BT_TEST_GET_DATA: - bt_tick_count++; - if (bt_tick_count >= 10) - { - bt_tick_count = 0; - clearMacFlag(); - Serial1.write("AT"); // disconnect bt - bt_test_state = BT_TEST_GET_MAC; - bt_tick_count = 0; - } - break; - - case BT_TEST_GET_MAC: - bt_tick_count++; - if (bt_tick_count >= 10) - { - bt_tick_count = 0; - getMacAddr(); - bt_test_state = BT_TEST_DONE; - test_result |= (1 << TEST_ITEM_BT); - } - break; - - case BT_TEST_IDLE: - bt_tick_count++; - if (bt_tick_count >= 20) - { - bt_tick_count = 0; - bt_test_state = BT_TEST_INIT; - } - break; - - case BT_TEST_DONE: - break; - - - } -} - -void test_mode_run() -{ - - - static uint8_t last_switch_state = 0; - - uint8_t switch_state = getSwitchState(); - - if (switch_state != last_switch_state) - { - if (switch_state) - { - pumpOn(); - service.ledAllOff(); - led_B.on(); - } - else - { - pumpOff(); - service.ledAllOff(); - } - - last_switch_state = switch_state; - } - - - - E0_STEP_WRITE(1); - delayMicroseconds(50); - E0_STEP_WRITE(0); - delayMicroseconds(50); -} - -#endif - - -void uArmService::init() -{ - // bt pin set - DDRE &= 0xFB; - PORTE |= 0x04; - -#ifdef SWIFT_TEST_MODE - ::all_pins_init(); - - button_menu.setClickedCB(::all_light_on); - button_play.setClickedCB(::all_light_off); -#else - button_menu.setClickedCB(menuButtonClicked); - button_menu.setLongPressedCB(menuButtonLongPressed); - button_play.setClickedCB(playButtonClicked); - button_play.setLongPressedCB(playButtonLongPressed); -#endif // SWIFT_TEST_MODE -} - - -bool uArmService::buttonServiceDisable() -{ - return mButtonServiceDisable; -} - -void uArmService::ledLearning() -{ - led_B.off(); - led_R.off(); - led_G.on(); -} - -void uArmService::ledPlaying() -{ - led_B.off(); - led_R.off(); - led_G.blink(500, 255); - // led_B.off(); - // led_R.blink(500, 255); - // led_G.blink(500, 50); -} - -void uArmService::ledAllOff() -{ - led_R.off(); - led_G.off(); - led_B.off(); -} - -void uArmService::handleButtonEvent(BUTTON_ID button, unsigned char event) -{ - switch(button) - { - case BUTTON_MENU: - if (event == EVENT_CLICK) - { - switch (mSysStatus) - { - case NORMAL_MODE: - case NORMAL_BT_CONNECTED_MODE: - mSysStatus = LEARNING_MODE; - ledLearning(); - mRecordAddr = 0;//recording/playing address - - - disable_all_steppers(); - servo[0].detach(); - break; - - case LEARNING_MODE: - //LEARNING_MODE_STOP is just used to notificate record() function to stop, once record() get it then change the sys_status to normal_mode - mSysStatus = LEARNING_MODE_STOP;//do not detec if BT is connected here, will do it seperatly - ledAllOff(); - pumpOff(); - gripperRelease(); - break; - - default: - break; - } - } - - break; - - case BUTTON_PLAY: - if (event == EVENT_CLICK) - { - switch(mSysStatus) - { - case NORMAL_MODE: - case NORMAL_BT_CONNECTED_MODE: - mRecordAddr = 0;//recording/playing address - mSysStatus = SINGLE_PLAY_MODE; // or play just one time - ledPlaying(); - set_acceleration(USER_MODE_NORMAL); - break; - - case SINGLE_PLAY_MODE: - case LOOP_PLAY_MODE: - pumpOff(); - gripperRelease(); - mSysStatus = NORMAL_MODE; - ledAllOff(); - set_acceleration(get_user_mode()); - break; - - case LEARNING_MODE: - - if (!getSwitchState()) - { - if (getPumpStatus()) - { - pumpOff(); - } - else - { - pumpOn(); - } - } - else - { - if (getGripperStatus()) - { - gripperRelease(); - } - else - { - gripperCatch(); - } - } - break; - } - } - else if (event == EVENT_LONG_PRESS) - { - switch(mSysStatus) - { - case NORMAL_MODE: - case NORMAL_BT_CONNECTED_MODE: - mRecordAddr = 0; - mSysStatus = LOOP_PLAY_MODE; - ledPlaying(); - set_acceleration(USER_MODE_NORMAL); - break; - - case SINGLE_PLAY_MODE: - case LOOP_PLAY_MODE: - break; - - case LEARNING_MODE: - break; - } - } - break; - } -} - - -void uArmService::recorderTick() -{ - //sys led function detec every 0.05s----------------------------------------------------------------- - - switch(mSysStatus)//every 0.05s per point - { -/* - case SINGLE_PLAY_MODE: - if(play() == false) - { - mSysStatus = NORMAL_MODE; - - ledAllOff(); - - mRecordAddr = 0; - } - break; - - case LOOP_PLAY_MODE: - - if(play() == false) - { - - mRecordAddr = 0; - } - break; -*/ - - case LEARNING_MODE: - case LEARNING_MODE_STOP: - if(record() == false) - { - mSysStatus = NORMAL_MODE; - mRecordAddr = 0; - - ledAllOff(); - - //controller.attachAllServo(); - enable_all_steppers(); - servo[0].attach(SERVO0_PIN); - - delay(500); - - update_current_pos(); - - } - break; - - default: - break; - } - -} - - - -void uArmService::systemRun() -{ - static uint8_t last_switch_state = 0; - - uint8_t switch_state = getSwitchState(); - - if (switch_state != last_switch_state) - { - if (switch_state) - { - mBTDisable = false; - } - else - { - mBTDisable = true; - } - - last_switch_state = switch_state; - } - - btDetect(); - -} - -bool uArmService::btConnected() -{ - return (PINE & 0x04) ? true : false; -} - -void uArmService::btDetect() -{ - -/* - if ((mSysStatus == NORMAL_MODE) || (mSysStatus == NORMAL_BT_CONNECTED_MODE)) - { - - - if (btConnected() && !mBTDisable) - { - led_B.on(); - - commSerial.setSerialPort(&Serial1); - - mSysStatus = NORMAL_BT_CONNECTED_MODE; - } - else - { - led_B.off(); - - commSerial.setSerialPort(&Serial); - - mSysStatus = NORMAL_MODE; - } - - - } -*/ - - if (mSysStatus == NORMAL_MODE) - { - if (btConnected() && !mBTDisable) - { - led_B.on(); - - commSerial.setSerialPort(&Serial1); - - mSysStatus = NORMAL_BT_CONNECTED_MODE; - } - } - else if (mSysStatus == NORMAL_BT_CONNECTED_MODE) - { - if (!btConnected() || mBTDisable) - { - led_B.off(); - - commSerial.setSerialPort(&Serial); - - mSysStatus = NORMAL_MODE; - } - } - -} - - -void uArmService::powerDetect() -{ - unsigned char powerState = isPowerPlugIn() ? 1 : 0; - - if (powerState != mPowerState) - { - mPowerState = powerState; - char buf[128]; - - msprintf(buf, "@5 V%d\r\n", mPowerState); - - reportString(buf); - } - -} - -void uArmService::tipDetect() -{ - unsigned char tipState = getTip() ? 1 : 0; - - if (tipState != mTipState) - { - mTipState = tipState; - char buf[128]; - - msprintf(buf, "@6 N0 V%d\r\n", mTipState); - - reportString(buf); - } -} - -void uArmService::run() -{ -#ifdef SWIFT_TEST_MODE - ::test_mode_run(); - - if (millis() - mTickRecorderTime >= 50) - { - mTickRecorderTime= millis(); - - bt_test(); - led_seeed.tick(); - } - -#else - systemRun(); - - if (millis() - mTickRecorderTime >= 50) - { - mTickRecorderTime= millis(); - recorderTick(); - powerDetect(); - tipDetect(); - - } -#endif -} - - - - -bool uArmService::play() -{ - unsigned char data[5]; // 0: L 1: R 2: Rotation 3: hand rotation 4:gripper - - if (mRecordAddr >= 65535) - { - mRecordAddr = 0; - - if (mSysStatus == SINGLE_PLAY_MODE) - { - mSysStatus = NORMAL_MODE; - ledAllOff(); - } - else if (mSysStatus == LOOP_PLAY_MODE) - { - - } - else - { - mSysStatus = NORMAL_MODE; - } - } - - if (mSysStatus != SINGLE_PLAY_MODE && mSysStatus != LOOP_PLAY_MODE) - { - return false; - } - - recorder.read(mRecordAddr, data, 5); - mRecordAddr += 5; - debugPrint("mRecordAddr = %d, data=%d, %d, %d", mRecordAddr, data[0], data[1], data[2]); - - if(data[0] != 255) - { - servo[0].write((double)data[3]); - if (data[4] >= 0x10) - { - gripperCatch(); - } - else if (data[4] >= 0x01) - { - pumpOn(); - } - else - { - pumpOff(); - gripperRelease(); - } - - getXYZFromAngle(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], data[0], data[1], data[2]); - - float target[NUM_AXIS]; - LOOP_XYZE(i) target[i] = destination[i]; - - - float difference[NUM_AXIS]; - LOOP_XYZE(i) difference[i] = target[i] - current_position[i]; - - - - float cartesian_mm = sqrt(sq(difference[X_AXIS]) + sq(difference[Y_AXIS]) + sq(difference[Z_AXIS])); - feedrate_mm_m = cartesian_mm * 20 * 60; // the interval of points is 50ms - - prepare_move_to_destination(); - - set_current_to_destination(); - - } - else - { - - pumpOff(); - gripperRelease(); - - mRecordAddr = 65535; - - return false; - - } - - - return true; -} - -bool uArmService::record() -{ - debugPrint("mRecordAddr = %d", mRecordAddr); - - if(mRecordAddr <= 65530) - { - unsigned char data[5]; // 0: L 1: R 2: Rotation 3: hand rotation 4:gripper - if((mRecordAddr != 65530) && (mSysStatus != LEARNING_MODE_STOP)) - { - - data[0] = (unsigned char)get_current_angle(0); - data[1] = (unsigned char)get_current_angle(1); - data[2] = (unsigned char)get_current_angle(2); - data[3] = (unsigned char)get_current_angle(3); - if (!getSwitchState()) - { - data[4] = getPumpStatus() > 0 ? 1 : 0; - } - else - { - data[4] = getGripperStatus() > 0 ? 0x10 : 0; - } - - debugPrint("b=%d, l=%d, r= %d", data[0], data[1], data[2]); - } - else - { - data[0] = 255;//255 is the ending flag - recorder.write(mRecordAddr, data, 5); - - return false; - } - - recorder.write(mRecordAddr, data, 5); - mRecordAddr += 5; - - return true; - } - else - { - return false; - } - -} diff --git a/Marlin/uArmService.h b/Marlin/uArmService.h deleted file mode 100644 index 7d3510c..0000000 --- a/Marlin/uArmService.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - ****************************************************************************** - * @file uArmService.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-17 - ****************************************************************************** - */ - -#ifndef _UARMSERVICE_H_ -#define _UARMSERVICE_H_ - -#include -#include "Marlin.h" - -enum BUTTON_ID -{ - BUTTON_MENU, - BUTTON_PLAY, - BUTTON_STATE, - - BUTTON_COUNT -}; - -#define NORMAL_MODE 0 -#define NORMAL_BT_CONNECTED_MODE 1 -#define LEARNING_MODE 2 -#define SINGLE_PLAY_MODE 3 -#define LOOP_PLAY_MODE 4 -#define LEARNING_MODE_STOP 5 - -class uArmService -{ -public: - uArmService(); - - void init(); - void run(); - - void btDetect(); - - void setButtonService(bool on); - - void handleButtonEvent(BUTTON_ID button, unsigned char event); - bool buttonServiceDisable(); - bool play(); - void disableBT(bool disable); - bool btConnected(); - void ledAllOff(); - -private: - - void systemRun(); - - bool record(); - void tickTaskRun(); - void recorderTick(); - - void ledLearning(); - void ledPlaying(); - - void tipDetect(); - void powerDetect(); -private: - unsigned char mButtonServiceDisable = false; - unsigned char mSysStatus = NORMAL_MODE; - unsigned int mRecordAddr = 0; - unsigned char mBTDisable = false; - unsigned long mReportStartTime; - - unsigned long mTickRecorderTime; - unsigned char mPowerState; - unsigned char mTipState; -}; - -extern uArmService service; - -#endif // _UARMSERVICE_H_ diff --git a/Marlin/uArmSwift.cpp b/Marlin/uArmSwift.cpp deleted file mode 100644 index ecd8607..0000000 --- a/Marlin/uArmSwift.cpp +++ /dev/null @@ -1,1260 +0,0 @@ -/** - ****************************************************************************** - * @file uArmSwift.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#include "uArmSwift.h" -#include "macros.h" -#include "stepper_indirection.h" -#include "servo.h" - -// CAUTION: E_AXIS means FrontEnd Servo not extruder0 -//float current_angle[NUM_AXIS] = { 0.0 }; - -float angle_destination[NUM_AXIS] = { 0.0 }; - -extern float current_position[NUM_AXIS]; -extern float destination[NUM_AXIS]; - -bool block_running = false; - -unsigned long tickStartTime = millis(); // get timestamp; - - - -uArmButton button_menu; -uArmButton button_play; - -uArmLed led_R; -uArmLed led_G; -uArmLed led_B; - -extern Servo servo[NUM_SERVOS]; - -const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; - -extern void get_pos_from_polor(float pos[], float polor[]); -extern void get_current_pos_polor(float polor[], float pos[]); - -void set_block_running(bool running) -{ - block_running = running; -} - -bool get_block_running() -{ - return block_running; -} - -bool is_menu_button_pressed() -{ - if (PINE & 0x80) - { - return false; - } - - return true; -} - -bool is_play_button_pressed() -{ - if (PINE & 0x40) - { - return false; - } - - return true; -} - - -void buttons_init() -{ - PORTE |= 0xC0; - // set button pin as input - DDRE &= 0X3F; - - - button_menu.setIsButtonPressedCB(is_menu_button_pressed); - button_play.setIsButtonPressedCB(is_play_button_pressed); -} - - - -void swift_init() -{ - - - // setup stepper driver micro - pinMode(7, OUTPUT); - digitalWrite(7, HIGH); - - pinMode(A10, OUTPUT); - digitalWrite(A10, HIGH); - pinMode(A11, OUTPUT); - digitalWrite(A11, HIGH); - pinMode(A12, OUTPUT); - digitalWrite(A12, HIGH); - - DDRG |= 0x10; - - // setup encoder - X_IIC_Init(); - Y_IIC_Init(); - Z_IIC_Init(); - delay(10); - -#ifdef SWIFT_TEST_MODE - enable_e0(); -#else - enable_all_steppers(); - servo[0].attach(SERVO0_PIN); - -#endif - delay(1000); - - init_user_mode(); - - init_reference_angle_value(); - update_current_pos(); - - buttons_init(); - - led_R.setPin(LED_PIN); - led_G.setPin(LED_G); - led_B.setPin(LED_B); - - swift_buzzer.setPin(BEEPER_PIN); - swift_buzzer.tone(260, 1000); - - reportServiceInit(); - swift_api_init(); - service.init(); - - -} - -void tickTaskRun() -{ - swift_buzzer.tick(); - button_menu.tick(); - button_play.tick(); - - led_R.tick(); - led_G.tick(); - led_B.tick(); - - pump_run(); - -} - -void swift_run() -{ - - reportServiceRun(); - - service.run(); - - - - if(millis() - tickStartTime >= TICK_INTERVAL) - { - tickStartTime = millis(); - tickTaskRun(); - } -} - -unsigned char getXYZFromAngleOrigin(float& x, float& y, float& z, float rot, float left, float right) -{ - // 閿熸枻鎷稾Y骞抽敓é‚ゆ嫹閿熼åºé—ƒç†·åºœéŽ·çƒ½æ•“é‚ゆ嫹é–? - - - double stretch = MATH_LOWER_ARM * cos(left / MATH_TRANS) + MATH_UPPER_ARM * cos(right / MATH_TRANS) + MATH_L2; - - // 閿熸枻鎷ç©é–¿ç†¸æž»éŽ·çƒ½æ•“é–°ç”¸æ§¦ç”¯î†½å«¹é–¿ç†¸æž»éŽ·çƒ½æ•? - double height = MATH_LOWER_ARM * sin(left / MATH_TRANS) - MATH_UPPER_ARM * sin(right / MATH_TRANS) + MATH_L1; - x = stretch * cos(rot / MATH_TRANS); - y = stretch * sin(rot / MATH_TRANS); - z = height; - - return 0; -} - -float get_current_height() -{ - float angle[3]; - float pos[3]; - - if (!isPowerPlugIn()) - { - MYSERIAL.println("No Power Connected!"); - return ; - } - - for (int i = 0; i < 3; i++) - { - angle[i] = get_current_angle(i); - } - - debugPrint("angle: %f, %f, %f\r\n", angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS]); - - // get current pos - getXYZFromAngleOrigin(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS]); - - debugPrint("cur_pos: %f, %f, %f\r\n", pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); - - return pos[2]; -} - -void update_current_pos() -{ - float current_angle[NUM_AXIS]; - - if (!isPowerPlugIn()) - { - MYSERIAL.println("No Power Connected!"); - return ; - } - - for (int i = 0; i < NUM_AXIS; i++) - { - current_angle[i] = get_current_angle(i); - } - - - debugPrint("cur_angles: %f, %f, %f, %f\r\n", current_angle[X_AXIS], current_angle[Y_AXIS], current_angle[Z_AXIS], current_angle[E_AXIS]); - - // get current pos - getXYZFromAngle(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_angle[X_AXIS], current_angle[Y_AXIS], current_angle[Z_AXIS]); - - debugPrint("cur_pos: %f, %f, %f\r\n", current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]); - - - destination[X_AXIS] = current_position[X_AXIS]; - destination[Y_AXIS] = current_position[Y_AXIS]; - destination[Z_AXIS] = current_position[Z_AXIS]; - - planner.set_position_mm(current_angle[X_AXIS], current_angle[Y_AXIS], current_angle[Z_AXIS]); -} - -uint8_t last_G0_1_cmd = 0; -extern float code_value_float(); -extern uint8_t code_value_byte(); -extern uint16_t code_value_ushort(); - -bool fan_disable = false; - - - - -bool is_fan_disable() -{ - return fan_disable; -} - -bool is_fan_enable() -{ - return !fan_disable; -} - - -void set_fan_disable(bool disable) -{ - fan_disable = disable; -} - -void uarm_gcode_G0() -{ - if (get_user_mode() == USER_MODE_LASER || get_user_mode() == USER_MODE_PEN) - { - while (last_G0_1_cmd != 0 && block_running) idle(); - - last_G0_1_cmd = 0; - - if (get_user_mode() == USER_MODE_LASER) - { - - - - debugPrint("laser off"); - - // turn off laser - analogWrite(FAN_PIN, 0); - } - } -} - -void uarm_gcode_G1() -{ - if (get_user_mode() == USER_MODE_LASER || get_user_mode() == USER_MODE_PEN) - { - while (last_G0_1_cmd == 0 && block_running) idle(); - - last_G0_1_cmd = 1; - - if (get_user_mode() == USER_MODE_LASER) - { - - - static uint8_t power = 255; - - if (code_seen('P')) - { - power = code_value_byte(); - } - - debugPrint("laser on p=%d\r\n", power); - - // turn on laser - analogWrite(FAN_PIN, power); - } - } -} - - - -void reportString(String string) -{ - MYSERIAL.print(string); -} - -void reportButtonEvent(unsigned char buttonId, unsigned char event) -{ - char result[RESULT_BUFFER_SIZE]; - msprintf(result, "@4 B%d V%d\r\n", buttonId, event); - reportString(result); -} - -void reportPos() -{ - char result[128]; - //@3 X154.714 Y194.915 Z10.217\n - //msprintf(result, "@3 X%f Y%f Z%f\r\n", ); - float angle[NUM_AXIS]; - float pos[NUM_AXIS]; - - if (!isPowerPlugIn()) - { - MYSERIAL.println("No Power Connected!"); - return ; - } - - for (int i = 0; i < NUM_AXIS; i++) - { - angle[i] = get_current_angle(i); - } - - debugPrint("angle: %f, %f, %f, %f\r\n", angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS], angle[E_AXIS]); - - // get current pos - getXYZFromAngle(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS]); - - debugPrint("cur_pos: %f, %f, %f\r\n", pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS]); - - msprintf(result, "@3 X%f Y%f Z%f R%f\r\n", pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], angle[3]); - - reportString(result); -} - -void rotate_frontend_motor() -{ - float angle = 0; - uint32_t speed = 0; - - - - if (code_seen('V')) - { - angle = code_value_float(); - } - else - { - return; - } - - if (code_seen('F')) - { - speed = code_value_int(); - } - else - { - //return; - } - - - - servo[0].write((int)angle); - -} - - - -void uarm_gcode_M2120() -{ - float interval = 0; - if (code_seen('V')) - { - interval = code_value_float(); - - interval *= 1000; - - if (interval == 0) - { - removeReportService(3); - } - else - { - addReportService(3, interval, reportPos); - } - } -} - -uint8_t uarm_gcode_M2200(char reply[]) -{ - if (get_block_running()) - { - strcpy(reply, "V1"); - } - else - { - strcpy(reply, "V0"); - } - - return E_OK; -} - -void uarm_gcode_M2201() -{ - if (code_seen('N')) - { - uint8_t index = code_value_byte(); - switch(index) - { - case 0: - enable_x(); - break; - - case 1: - enable_y(); - break; - - case 2: - enable_z(); - break; - - case 3: - servo[0].attach(SERVO0_PIN); - break; - - } - } -} - -void uarm_gcode_M2202() -{ - if (code_seen('N')) - { - uint8_t index = code_value_byte(); - switch(index) - { - case 0: - disable_x(); - break; - - case 1: - disable_y(); - break; - - case 2: - disable_z(); - break; - - case 3: - servo[0].detach(); - break; - - } - } -} - -uint8_t uarm_gcode_M2203(char reply[]) -{ - bool attached = false; - if (code_seen('N')) - { - uint8_t index = code_value_byte(); - switch(index) - { - case 0: - attached = (digitalRead(X_ENABLE_PIN) == X_ENABLE_ON); - break; - - case 1: - attached = (digitalRead(Y_ENABLE_PIN) == Y_ENABLE_ON); - break; - - case 2: - attached = (digitalRead(Z_ENABLE_PIN) == Z_ENABLE_ON); - break; - - case 3: - attached = servo[0].attached(); - break; - - } - } - - if (attached) - { - strcpy(reply, "V1"); - } - else - { - strcpy(reply, "V0"); - } - - return E_OK; -} - -void uarm_gcode_M2210() -{ - uint16_t frequency = 1000; - uint16_t duration = 260; - - if (code_seen('F')) - { - frequency = code_value_ushort(); - } - - if (code_seen('T')) - { - duration = code_value_float(); - } - - NOMORE(frequency, 5000); - - swift_buzzer.tone(duration, frequency); -} - -uint8_t uarm_gcode_M2211(char reply[]) -{ - - - int device = 0; - int type = 0; - uint32_t addr = 0; - - - if (code_seen('N')) - { - device = code_value_ushort(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('A')) - { - addr = code_value_ushort(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('T')) - { - type = code_value_ushort(); - } - else - { - return E_PARAMETERS_WRONG; - } - - double resultVal = getE2PROMData(device, addr, type); - - switch(type) - { - case DATA_TYPE_BYTE: - { - int val = resultVal; - msprintf(reply, "V%d", val); - break; - } - case DATA_TYPE_INTEGER: - { - int i_val = resultVal; - msprintf(reply, "V%d", i_val); - break; - } - case DATA_TYPE_FLOAT: - { - double f_val = resultVal; - msprintf(reply, "V%f", f_val); - break; - } - } - - - return E_OK; -} - -void uarm_gcode_M2212() -{ - int type = 0; - int device = 0; - uint32_t addr = 0; - - double value; - - if (code_seen('N')) - { - device = code_value_ushort(); - } - else - { - return; - } - - if (code_seen('A')) - { - addr = code_value_ushort(); - } - else - { - return; - } - - if (code_seen('T')) - { - type = code_value_ushort(); - } - else - { - return; - } - - if (code_seen('V')) - { - value = code_value_float(); - } - else - { - return; - } - - setE2PROMData(device, addr, type, value); - - //replyOK(serialNum); - - return 0; -} - -void uarm_gcode_M2213() -{ - uint16_t value = 0; - if (code_seen('V')) - { - value = code_value_ushort(); - } - else - { - return; - } - - if (value) - { - service.setButtonService(true); - } - else - { - service.setButtonService(false); - } -} - -extern unsigned char inverse_kinematics(const float in_cartesian[3], float angle[3]); -uint8_t uarm_gcode_M2220(char reply[]) -{ - float value[3]; - float angle[3]; - - if (code_seen('X')) - { - value[0] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('Y')) - { - value[1] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('Z')) - { - value[2] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (inverse_kinematics(value, angle) == 0) - { - - //$n OK B50 L50 R50\n - msprintf(reply, "B%f L%f R%f", angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS]); - - return E_OK; - } - else - { - return E_OUT_OF_RANGE; - } -} - -uint8_t uarm_gcode_M2221(char reply[]) -{ - float value[3]; - float angle[3]; - - if (code_seen('B')) - { - angle[0] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('L')) - { - angle[1] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (code_seen('R')) - { - angle[2] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - - getXYZFromAngle(value[0], value[1], value[2], angle[0], angle[1], angle[2]); - - msprintf(reply, "X%f Y%f Z%f", value[X_AXIS], value[Y_AXIS], value[Z_AXIS]); - - return E_OK; -} - -uint8_t uarm_gcode_M2222(char reply[]) -{ - int i = 0; - float pos[NUM_AXIS]; - float value[NUM_AXIS]; - float angle[NUM_AXIS]; - - LOOP_XYZ(i) - { - if (code_seen(axis_codes[i])) - { - value[i] = code_value_float(); - } - else - { - return E_PARAMETERS_WRONG; - } - } - - uint8_t type = 0; - - if (code_seen('S')) - { - type = code_value_byte() ? 1 : 0; - } - - if (type) - { - get_pos_from_polor(pos, value); - } - else - { - LOOP_XYZ(i) - pos[i] = value[i]; - } - - if (inverse_kinematics(pos, angle) == 0) - { - strcpy(reply, "V1"); - } - else - { - strcpy(reply, "V0"); - } - - return E_OK; - -} - -void uarm_gcode_M2231() -{ - uint8_t value = 0; - - if (code_seen('V')) - { - value = code_value_byte(); - - if (value) - { - pumpOn(); - } - else - { - pumpOff(); - } - } - else - { - return; - } - - -} - - - -void uarm_gcode_M2232() -{ - uint8_t value = 0; - - if (code_seen('V')) - { - value = code_value_byte(); - - if (value) - { - gripperCatch(); - } - else - { - gripperRelease(); - } - } - else - { - return; - } -} - -void uarm_gcode_M2233() -{ - clearMacFlag(); -} - -void uarm_gcode_M2234() -{ - if (code_seen('V')) - { - uint8_t enable = code_value_byte(); - - service.disableBT(enable ? false : true); - } - -} - -void uarm_gcode_M2240() -{ - uint8_t value = 0; - uint8_t pin = 0; - - if (code_seen('N')) - { - pin = code_value_byte(); - } - else - { - return; - } - - if (code_seen('V')) - { - value = code_value_byte(); - } - else - { - return; - } - - if (value) - { - digitalWrite(pin, HIGH); - } - else - { - digitalWrite(pin, LOW); - } -} - -void uarm_gcode_M2300() -{ - uint8_t type; - - if (code_seen('N')) - { - type = code_value_byte(); - } - else - { - return; - } - - initGroveModule(type); -} - -void uarm_gcode_M2301() -{ - uint8_t type; - uint16_t time; - - if (code_seen('N')) - { - type = code_value_byte(); - } - else - { - return; - } - - if (code_seen('V')) - { - time = code_value_ushort(); - } - else - { - return; - } - - setGroveModuleReportInterval(type, time); -} - -void uarm_gcode_M2400() -{ - uint8_t mode = 0; - - if (code_seen('S')) - { - mode = code_value_byte(); - set_user_mode(mode); - update_current_pos(); - } - -} - -uint8_t uarm_gcode_M2401(char reply[]) -{ - uint16_t value[NUM_AXIS]; - - if (!isPowerPlugIn()) - return E_NO_POWER; - - // need unlock code, in case misoperation - if (code_seen('V')) - { - uint16_t value = code_value_ushort(); - - if (value != UNLOCK_NUM) - { - return E_FAIL; - } - } - else - { - return E_FAIL; - } - - for (int i = 0; i < 3; i++) - { - value[i] = get_current_angle_adc(i); - - if (value[i] > 4096) - { - return E_FAIL; - } - } - - - update_reference_angle_value(value); - - update_current_pos(); - - strcpy(reply, ""); - - return E_OK; -} - -void uarm_gcode_M2410() -{ - float value = 0; - if (code_seen('S')) - { - value = code_value_float(); - } - else - { - if (isPowerPlugIn()) - { - value = get_current_height(); - value += 0.3; - } - } - - debugPrint("height: %f\r\n", value); - - if (isPowerPlugIn()) - { - set_height_offset(value); - save_height_offset(value); - - update_current_pos(); - } - -} - -void uarm_gcode_M2411() -{ - float value = 0; - if (code_seen('S')) - { - value = code_value_float(); - - if (isPowerPlugIn()) - { - set_front_end_offset(value); - - update_current_pos(); - } - } -} - - - -// get current angles -uint8_t uarm_gcode_P2200(char reply[]) -{ - float angle[3]; - - for (int i = 0; i < 3; i++) - { - angle[i] = get_current_angle(i); - } - - msprintf(reply, "B%f L%f R%f", angle[X_AXIS], angle[Y_AXIS], angle[Z_AXIS]); - - return E_OK; -} - -uint8_t uarm_gcode_P2201(char reply[]) -{ - msprintf(reply, "V%s", DEVICE_NAME); - - return E_OK; -} - -uint8_t uarm_gcode_P2202(char reply[]) -{ - msprintf(reply, "V%s.%d", HW_VER, getHWSubversion()); - - return E_OK; -} - -uint8_t uarm_gcode_P2203(char reply[]) -{ - - - msprintf(reply, "V%s", SW_VER); - - - return E_OK; -} - -uint8_t uarm_gcode_P2204(char reply[]) -{ - - - msprintf(reply, "V%s", SW_VER); - - - return E_OK; -} - -uint8_t uarm_gcode_P2205(char reply[]) -{ - - - - msprintf(reply, "V%s", getMac()); - - - return E_OK; -} - -uint8_t uarm_gcode_P2206(char reply[]) -{ - float angle; - uint8_t index = 0; - - if (code_seen('N')) - { - index = code_value_byte(); - } - else - { - return E_PARAMETERS_WRONG; - } - - if (index > 3) - return E_OUT_OF_RANGE; - - angle = get_current_angle(index); - - msprintf(reply, "V%f\r\n", angle); - - return E_OK; -} - -uint8_t uarm_gcode_P2220(char reply[]) -{ - msprintf(reply, "X%f Y%f Z%f", current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]); - - return E_OK; -} - -uint8_t uarm_gcode_P2221(char reply[]) -{ - float polor[3]; - - get_current_pos_polor(polor, current_position); - - msprintf(reply, "S%f R%f H%f", polor[X_AXIS], polor[Y_AXIS], polor[Z_AXIS]); - - return E_OK; -} - -uint8_t uarm_gcode_P2231(char reply[]) -{ - msprintf(reply, "V%d", getPumpStatus()); - - return E_OK; -} - -uint8_t uarm_gcode_P2232(char reply[]) -{ - msprintf(reply, "V%d", getGripperStatus()); - - return E_OK; -} - -uint8_t uarm_gcode_P2233(char reply[]) -{ - msprintf(reply, "V%d", getTip()); - - return E_OK; -} - -uint8_t uarm_gcode_P2234(char reply[]) -{ - msprintf(reply, "V%d", isPowerPlugIn() ? 1 : 0); - - return E_OK; -} - - -uint8_t uarm_gcode_P2240(char reply[]) -{ - uint8_t index = 0; - - if (code_seen('N')) - { - index = code_value_byte(); - } - else - { - return E_PARAMETERS_WRONG; - } - - msprintf(reply, "V%d", digitalRead(index)); - - return E_OK; -} - -uint8_t uarm_gcode_P2241(char reply[]) -{ - uint8_t index = 0; - - if (code_seen('N')) - { - index = code_value_byte(); - } - else - { - return E_PARAMETERS_WRONG; - } - - msprintf(reply, "V%d", analogRead(index)); - - return E_OK; -} - -uint8_t uarm_gcode_P2242(char reply[]) -{ - uint16_t value[3]; - - for (int i = 0; i < 3; i++) - { - value[i] = get_current_angle_adc(i); - } - - msprintf(reply, "B%d L%d R%d", value[0], value[1], value[2]); - - return E_OK; -} - -uint8_t uarm_gcode_P2245(char reply[]) -{ - strcpy(reply, ""); - return E_OK; -} - - -uint8_t uarm_gcode_P2400(char reply[]) -{ - msprintf(reply, "V%d", get_user_mode()); - return E_OK; -} - -#ifdef SWIFT_TEST_MODE -extern uint8_t get_test_result(); -uint8_t uarm_gcode_P2250(char reply[]) -{ - msprintf(reply, "R%d V", get_test_result()); - - strcat(reply, getMac()); - - return E_OK; -} -#endif // SWIFT_TEST_MODE diff --git a/Marlin/uArmSwift.h b/Marlin/uArmSwift.h deleted file mode 100644 index c5dba51..0000000 --- a/Marlin/uArmSwift.h +++ /dev/null @@ -1,121 +0,0 @@ -/** - ****************************************************************************** - * @file uArmSwift.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#ifndef _UARMSWIFT_H_ -#define _UARMSWIFT_H_ - -#include -#include "Marlin.h" -#include "uArmParams.h" -#include "uArmDebug.h" -#include "uArmIIC.h" -#include "X_IIC.h" -#include "Y_IIC.h" -#include "Z_IIC.h" -#include "uArmCalibration.h" -#include "uArmButton.h" -#include "uArmLed.h" - - - - - -void swift_init(); - -void swift_run(); - -bool is_fan_disable(); -bool is_fan_enable(); - -void set_fan_disable(bool disable); - - -void update_current_pos(); - -void set_block_running(bool running); - -bool get_block_running(); - -void reportString(String string); -void reportButtonEvent(unsigned char buttonId, unsigned char event); -void rotate_frontend_motor(); - -void uarm_gcode_G0(); - -void uarm_gcode_G1(); - -void uarm_gcode_M2120(); -uint8_t uarm_gcode_M2200(char reply[]); - -void uarm_gcode_M2201(); -void uarm_gcode_M2202(); -uint8_t uarm_gcode_M2203(char reply[]); - -void uarm_gcode_M2210(); -uint8_t uarm_gcode_M2211(char reply[]); -void uarm_gcode_M2212(); -void uarm_gcode_M2213(); - -uint8_t uarm_gcode_M2220(char reply[]); -uint8_t uarm_gcode_M2221(char reply[]); - -uint8_t uarm_gcode_M2222(char reply[]); - -void uarm_gcode_M2231(); -void uarm_gcode_M2232(); -void uarm_gcode_M2233(); -void uarm_gcode_M2234(); - - - -void uarm_gcode_M2240(); - -void uarm_gcode_M2300(); -void uarm_gcode_M2301(); - -void uarm_gcode_M2400(); -uint8_t uarm_gcode_M2401(char reply[]); -void uarm_gcode_M2410(); -void uarm_gcode_M2411(); - -uint8_t uarm_gcode_M2420(char reply[]); - - -uint8_t uarm_gcode_P2200(char reply[]); -uint8_t uarm_gcode_P2201(char reply[]); -uint8_t uarm_gcode_P2202(char reply[]); -uint8_t uarm_gcode_P2203(char reply[]); -uint8_t uarm_gcode_P2204(char reply[]); -uint8_t uarm_gcode_P2205(char reply[]); -uint8_t uarm_gcode_P2206(char reply[]); - -uint8_t uarm_gcode_P2220(char reply[]); -uint8_t uarm_gcode_P2221(char reply[]); -uint8_t uarm_gcode_P2231(char reply[]); -uint8_t uarm_gcode_P2232(char reply[]); -uint8_t uarm_gcode_P2233(char reply[]); -uint8_t uarm_gcode_P2234(char reply[]); - -uint8_t uarm_gcode_P2240(char reply[]); -uint8_t uarm_gcode_P2241(char reply[]); -uint8_t uarm_gcode_P2242(char reply[]); - -uint8_t uarm_gcode_P2245(char reply[]); -uint8_t uarm_gcode_P2400(char reply[]); - - -#ifdef SWIFT_TEST_MODE -uint8_t uarm_gcode_P2250(char reply[]); -#endif // SWIFT_TEST_MODE - - - - - -#endif // _UARMSWIFT_H_ diff --git a/Marlin/uArmUtils.cpp b/Marlin/uArmUtils.cpp deleted file mode 100644 index 2c3648c..0000000 --- a/Marlin/uArmUtils.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/** - ****************************************************************************** - * @file uArmUtils.cpp - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#include "uArmUtils.h" - diff --git a/Marlin/uArmUtils.h b/Marlin/uArmUtils.h deleted file mode 100644 index 482617e..0000000 --- a/Marlin/uArmUtils.h +++ /dev/null @@ -1,17 +0,0 @@ -/** - ****************************************************************************** - * @file uArmUtils.h - * @author David.Long - * @email xiaokun.long@ufactory.cc - * @date 2017-03-15 - ****************************************************************************** - */ - -#ifndef _UARMUTILS_H_ -#define _UARMUTILS_H_ - -#include -#include "Marlin.h" - - -#endif // _UARMUTILS_H_ diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp deleted file mode 100644 index da214aa..0000000 --- a/Marlin/ultralcd.cpp +++ /dev/null @@ -1,3166 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "ultralcd.h" -#if ENABLED(ULTRA_LCD) -#include "Marlin.h" -#include "language.h" -#include "cardreader.h" -#include "temperature.h" -#include "stepper.h" -#include "configuration_store.h" - -#if ENABLED(PRINTCOUNTER) - #include "printcounter.h" - #include "duration_t.h" -#endif - -int preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1, - preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2; - -#if ENABLED(FILAMENT_LCD_DISPLAY) - millis_t previous_lcd_status_ms = 0; -#endif - -uint8_t lcd_status_message_level; -char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1 - -#if ENABLED(DOGLCD) - #include "ultralcd_impl_DOGM.h" -#else - #include "ultralcd_impl_HD44780.h" -#endif - -// The main status screen -static void lcd_status_screen(); - -millis_t next_lcd_update_ms; - -uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) - -#if ENABLED(ULTIPANEL) - - // place-holders for Ki and Kd edits - float raw_Ki, raw_Kd; - - /** - * REVERSE_MENU_DIRECTION - * - * To reverse the menu direction we need a general way to reverse - * the direction of the encoder everywhere. So encoderDirection is - * added to allow the encoder to go the other way. - * - * This behavior is limited to scrolling Menus and SD card listings, - * and is disabled in other contexts. - */ - #if ENABLED(REVERSE_MENU_DIRECTION) - int8_t encoderDirection = 1; - #define ENCODER_DIRECTION_NORMAL() (encoderDirection = 1) - #define ENCODER_DIRECTION_MENUS() (encoderDirection = -1) - #else - #define ENCODER_DIRECTION_NORMAL() ; - #define ENCODER_DIRECTION_MENUS() ; - #endif - - int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update - - millis_t manual_move_start_time = 0; - int8_t manual_move_axis = (int8_t)NO_AXIS; - #if EXTRUDERS > 1 - int8_t manual_move_e_index = 0; - #else - #define manual_move_e_index 0 - #endif - - bool encoderRateMultiplierEnabled; - int32_t lastEncoderMovementMillis; - - #if HAS_POWER_SWITCH - extern bool powersupply; - #endif - const float manual_feedrate_mm_m[] = MANUAL_FEEDRATE; - static void lcd_main_menu(); - static void lcd_tune_menu(); - static void lcd_prepare_menu(); - static void lcd_move_menu(); - static void lcd_control_menu(); - static void lcd_control_temperature_menu(); - static void lcd_control_temperature_preheat_pla_settings_menu(); - static void lcd_control_temperature_preheat_abs_settings_menu(); - static void lcd_control_motion_menu(); - static void lcd_control_volumetric_menu(); - - #if ENABLED(LCD_INFO_MENU) - #if ENABLED(PRINTCOUNTER) - static void lcd_info_stats_menu(); - #endif - static void lcd_info_thermistors_menu(); - static void lcd_info_board_menu(); - static void lcd_info_menu(); - #endif // LCD_INFO_MENU - - #if ENABLED(FILAMENT_CHANGE_FEATURE) - static void lcd_filament_change_option_menu(); - static void lcd_filament_change_init_message(); - static void lcd_filament_change_unload_message(); - static void lcd_filament_change_insert_message(); - static void lcd_filament_change_load_message(); - static void lcd_filament_change_extrude_message(); - static void lcd_filament_change_resume_message(); - #endif - - #if HAS_LCD_CONTRAST - static void lcd_set_contrast(); - #endif - - #if ENABLED(FWRETRACT) - static void lcd_control_retract_menu(); - #endif - - #if ENABLED(DELTA_CALIBRATION_MENU) - static void lcd_delta_calibrate_menu(); - #endif - - #if ENABLED(MANUAL_BED_LEVELING) - #include "mesh_bed_leveling.h" - #endif - - // Function pointer to menu functions. - typedef void (*screenFunc_t)(); - - // Different types of actions that can be used in menu items. - static void menu_action_back(); - static void menu_action_submenu(screenFunc_t data); - static void menu_action_gcode(const char* pgcode); - static void menu_action_function(screenFunc_t data); - static void menu_action_setting_edit_bool(const char* pstr, bool* ptr); - static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); - static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue); - static void menu_action_setting_edit_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue); - static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, screenFunc_t callbackFunc); - static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, screenFunc_t callbackFunc); - - #if ENABLED(SDSUPPORT) - static void lcd_sdcard_menu(); - static void menu_action_sdfile(const char* filename, char* longFilename); - static void menu_action_sddirectory(const char* filename, char* longFilename); - #endif - - /* Helper macros for menus */ - - #ifndef ENCODER_FEEDRATE_DEADZONE - #define ENCODER_FEEDRATE_DEADZONE 10 - #endif - #ifndef ENCODER_STEPS_PER_MENU_ITEM - #define ENCODER_STEPS_PER_MENU_ITEM 5 - #endif - #ifndef ENCODER_PULSES_PER_STEP - #define ENCODER_PULSES_PER_STEP 1 - #endif - - /** - * START_SCREEN_OR_MENU generates init code for a screen or menu - * - * encoderLine is the position based on the encoder - * encoderTopLine is the top menu line to display - * _lcdLineNr is the index of the LCD line (e.g., 0-3) - * _menuLineNr is the menu item to draw and process - * _thisItemNr is the index of each MENU_ITEM or STATIC_ITEM - * _countedItems is the total number of items in the menu (after one call) - */ - #define START_SCREEN_OR_MENU(LIMIT) \ - ENCODER_DIRECTION_MENUS(); \ - encoderRateMultiplierEnabled = false; \ - if (encoderPosition > 0x8000) encoderPosition = 0; \ - static int8_t _countedItems = 0; \ - int8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \ - if (_countedItems > 0 && encoderLine >= _countedItems - LIMIT) { \ - encoderLine = _countedItems - LIMIT; \ - encoderPosition = encoderLine * (ENCODER_STEPS_PER_MENU_ITEM); \ - } - - #define SCREEN_OR_MENU_LOOP() \ - int8_t _menuLineNr = encoderTopLine, _thisItemNr; \ - for (int8_t _lcdLineNr = 0; _lcdLineNr < LCD_HEIGHT; _lcdLineNr++, _menuLineNr++) { \ - _thisItemNr = 0 - - /** - * START_SCREEN Opening code for a screen having only static items. - * Do simplified scrolling of the entire screen. - * - * START_MENU Opening code for a screen with menu items. - * Scroll as-needed to keep the selected line in view. - * 'wasClicked' indicates the controller was clicked. - */ - #define START_SCREEN() \ - START_SCREEN_OR_MENU(LCD_HEIGHT); \ - encoderTopLine = encoderLine; \ - bool _skipStatic = false; \ - SCREEN_OR_MENU_LOOP() - - #define START_MENU() \ - START_SCREEN_OR_MENU(1); \ - NOMORE(encoderTopLine, encoderLine); \ - if (encoderLine >= encoderTopLine + LCD_HEIGHT) { \ - encoderTopLine = encoderLine - (LCD_HEIGHT - 1); \ - } \ - bool wasClicked = LCD_CLICKED; \ - bool _skipStatic = true; \ - SCREEN_OR_MENU_LOOP() - - /** - * MENU_ITEM generates draw & handler code for a menu item, potentially calling: - * - * lcd_implementation_drawmenu_[type](sel, row, label, arg3...) - * menu_action_[type](arg3...) - * - * Examples: - * MENU_ITEM(back, MSG_WATCH) - * lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH)) - * menu_action_back() - * - * MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause) - * lcd_implementation_drawmenu_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause) - * menu_action_function(lcd_sdcard_pause) - * - * MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999) - * MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) - * lcd_implementation_drawmenu_setting_edit_int3(sel, row, PSTR(MSG_SPEED), PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) - * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) - * - */ - #define _MENU_ITEM_PART_1(TYPE, LABEL, ARGS...) \ - if (_menuLineNr == _thisItemNr) { \ - if (lcdDrawUpdate) \ - lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## ARGS); \ - if (wasClicked && encoderLine == _thisItemNr) { \ - lcd_quick_feedback() - - #define _MENU_ITEM_PART_2(TYPE, ARGS...) \ - menu_action_ ## TYPE(ARGS); \ - return; \ - } \ - } \ - ++_thisItemNr - - #define MENU_ITEM(TYPE, LABEL, ARGS...) do { \ - _skipStatic = false; \ - _MENU_ITEM_PART_1(TYPE, LABEL, ## ARGS); \ - _MENU_ITEM_PART_2(TYPE, ## ARGS); \ - } while(0) - - // Used to print static text with no visible cursor. - #define STATIC_ITEM(LABEL, ARGS...) \ - if (_menuLineNr == _thisItemNr) { \ - if (_skipStatic && encoderLine <= _thisItemNr) { \ - encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \ - lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT; \ - } \ - if (lcdDrawUpdate) \ - lcd_implementation_drawmenu_static(_lcdLineNr, PSTR(LABEL), ## ARGS); \ - } \ - ++_thisItemNr - - #define END_SCREEN() \ - } \ - _countedItems = _thisItemNr - - #define END_MENU() \ - } \ - _countedItems = _thisItemNr; \ - UNUSED(_skipStatic) - - #if ENABLED(ENCODER_RATE_MULTIPLIER) - - //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value - - /** - * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item - */ - #define MENU_MULTIPLIER_ITEM(type, label, args...) do { \ - _MENU_ITEM_PART_1(type, label, ## args); \ - encoderRateMultiplierEnabled = true; \ - lastEncoderMovementMillis = 0; \ - _MENU_ITEM_PART_2(type, ## args); \ - } while(0) - - #endif //ENCODER_RATE_MULTIPLIER - - #define MENU_ITEM_DUMMY() do { _thisItemNr++; } while(0) - #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) - #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) - #if ENABLED(ENCODER_RATE_MULTIPLIER) - #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) - #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) - #else //!ENCODER_RATE_MULTIPLIER - #define MENU_MULTIPLIER_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) - #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) - #endif //!ENCODER_RATE_MULTIPLIER - - /** Used variables to keep track of the menu */ - volatile uint8_t buttons; //the last checked buttons in a bit array. - #if ENABLED(REPRAPWORLD_KEYPAD) - volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values - #endif - - #if ENABLED(LCD_HAS_SLOW_BUTTONS) - volatile uint8_t slow_buttons; // Bits of the pressed buttons. - #endif - int8_t encoderTopLine; /* scroll offset in the current menu */ - millis_t next_button_update_ms; - uint8_t lastEncoderBits; - uint32_t encoderPosition; - #if PIN_EXISTS(SD_DETECT) - uint8_t lcd_sd_status; - #endif - - typedef struct { - screenFunc_t menu_function; - uint32_t encoder_position; - } menuPosition; - - screenFunc_t currentScreen = lcd_status_screen; // pointer to the currently active menu handler - - menuPosition screen_history[10]; - uint8_t screen_history_depth = 0; - - bool ignore_click = false; - bool wait_for_unclick; - bool defer_return_to_status = false; - - // Variables used when editing values. - const char* editLabel; - void* editValue; - int32_t minEditValue, maxEditValue; - screenFunc_t callbackFunc; // call this after editing - - /** - * General function to go directly to a menu - * Remembers the previous position - */ - static void lcd_goto_screen(screenFunc_t screen, const bool feedback = false, const uint32_t encoder = 0) { - if (currentScreen != screen) { - currentScreen = screen; - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; - encoderPosition = encoder; - if (feedback) lcd_quick_feedback(); - if (screen == lcd_status_screen) { - defer_return_to_status = false; - screen_history_depth = 0; - } - #if ENABLED(LCD_PROGRESS_BAR) - // For LCD_PROGRESS_BAR re-initialize custom characters - lcd_set_custom_characters(screen == lcd_status_screen); - #endif - } - } - - static void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); } - - inline void lcd_save_previous_menu() { - if (screen_history_depth < COUNT(screen_history)) { - screen_history[screen_history_depth].menu_function = currentScreen; - screen_history[screen_history_depth].encoder_position = encoderPosition; - ++screen_history_depth; - } - } - - static void lcd_goto_previous_menu(bool feedback=false) { - if (screen_history_depth > 0) { - --screen_history_depth; - lcd_goto_screen( - screen_history[screen_history_depth].menu_function, - feedback, - screen_history[screen_history_depth].encoder_position - ); - } - else - lcd_return_to_status(); - } - - void lcd_ignore_click(bool b) { - ignore_click = b; - wait_for_unclick = false; - } - -#endif // ULTIPANEL - -/** - * - * "Info Screen" - * - * This is very display-dependent, so the lcd implementation draws this. - */ - -static void lcd_status_screen() { - - #if ENABLED(ULTIPANEL) - ENCODER_DIRECTION_NORMAL(); - encoderRateMultiplierEnabled = false; - #endif - - #if ENABLED(LCD_PROGRESS_BAR) - millis_t ms = millis(); - #if DISABLED(PROGRESS_MSG_ONCE) - if (ELAPSED(ms, progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME)) { - progress_bar_ms = ms; - } - #endif - #if PROGRESS_MSG_EXPIRE > 0 - // Handle message expire - if (expire_status_ms > 0) { - #if ENABLED(SDSUPPORT) - if (card.isFileOpen()) { - // Expire the message when printing is active - if (IS_SD_PRINTING) { - if (ELAPSED(ms, expire_status_ms)) { - lcd_status_message[0] = '\0'; - expire_status_ms = 0; - } - } - else { - expire_status_ms += LCD_UPDATE_INTERVAL; - } - } - else { - expire_status_ms = 0; - } - #else - expire_status_ms = 0; - #endif //SDSUPPORT - } - #endif - #endif //LCD_PROGRESS_BAR - - lcd_implementation_status_screen(); - - #if ENABLED(ULTIPANEL) - - bool current_click = LCD_CLICKED; - - if (ignore_click) { - if (wait_for_unclick) { - if (!current_click) - ignore_click = wait_for_unclick = false; - else - current_click = false; - } - else if (current_click) { - lcd_quick_feedback(); - wait_for_unclick = true; - current_click = false; - } - } - - if (current_click) { - lcd_goto_screen(lcd_main_menu, true); - lcd_implementation_init( // to maybe revive the LCD if static electricity killed it. - #if ENABLED(LCD_PROGRESS_BAR) && ENABLED(ULTIPANEL) - currentScreen == lcd_status_screen - #endif - ); - #if ENABLED(FILAMENT_LCD_DISPLAY) - previous_lcd_status_ms = millis(); // get status message to show up for a while - #endif - } - - #if ENABLED(ULTIPANEL_FEEDMULTIPLY) - int new_frm = feedrate_percentage + (int32_t)encoderPosition; - // Dead zone at 100% feedrate - if ((feedrate_percentage < 100 && new_frm > 100) || (feedrate_percentage > 100 && new_frm < 100)) { - feedrate_percentage = 100; - encoderPosition = 0; - } - else if (feedrate_percentage == 100) { - if ((int32_t)encoderPosition > ENCODER_FEEDRATE_DEADZONE) { - feedrate_percentage += (int32_t)encoderPosition - (ENCODER_FEEDRATE_DEADZONE); - encoderPosition = 0; - } - else if ((int32_t)encoderPosition < -(ENCODER_FEEDRATE_DEADZONE)) { - feedrate_percentage += (int32_t)encoderPosition + ENCODER_FEEDRATE_DEADZONE; - encoderPosition = 0; - } - } - else { - feedrate_percentage = new_frm; - encoderPosition = 0; - } - #endif // ULTIPANEL_FEEDMULTIPLY - - feedrate_percentage = constrain(feedrate_percentage, 10, 999); - - #endif //ULTIPANEL -} - -/** - * - * draw the kill screen - * - */ -void kill_screen(const char* lcd_msg) { - lcd_init(); - lcd_setalertstatuspgm(lcd_msg); - #if ENABLED(DOGLCD) - u8g.firstPage(); - do { - lcd_kill_screen(); - } while (u8g.nextPage()); - #else - lcd_kill_screen(); - #endif -} - -#if ENABLED(ULTIPANEL) - - inline void line_to_current(AxisEnum axis) { - #if ENABLED(DELTA) - inverse_kinematics(current_position); - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder); - #else // !DELTA - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder); - #endif // !DELTA - } - - #if ENABLED(SDSUPPORT) - - static void lcd_sdcard_pause() { - card.pauseSDPrint(); - print_job_timer.pause(); - } - - static void lcd_sdcard_resume() { - card.startFileprint(); - print_job_timer.start(); - } - - static void lcd_sdcard_stop() { - card.stopSDPrint(); - clear_command_queue(); - quickstop_stepper(); - print_job_timer.stop(); - thermalManager.autotempShutdown(); - wait_for_heatup = false; - lcd_setstatus(MSG_PRINT_ABORTED, true); - } - - #endif //SDSUPPORT - - /** - * - * "Main" menu - * - */ - - static void lcd_main_menu() { - START_MENU(); - MENU_ITEM(back, MSG_WATCH); - if (planner.movesplanned() || IS_SD_PRINTING) { - MENU_ITEM(submenu, MSG_TUNE, lcd_tune_menu); - } - else { - MENU_ITEM(submenu, MSG_PREPARE, lcd_prepare_menu); - #if ENABLED(DELTA_CALIBRATION_MENU) - MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu); - #endif - } - MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu); - - #if ENABLED(SDSUPPORT) - if (card.cardOK) { - if (card.isFileOpen()) { - if (card.sdprinting) - MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause); - else - MENU_ITEM(function, MSG_RESUME_PRINT, lcd_sdcard_resume); - MENU_ITEM(function, MSG_STOP_PRINT, lcd_sdcard_stop); - } - else { - MENU_ITEM(submenu, MSG_CARD_MENU, lcd_sdcard_menu); - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_CNG_SDCARD, PSTR("M21")); // SD-card changed by user - #endif - } - } - else { - MENU_ITEM(submenu, MSG_NO_CARD, lcd_sdcard_menu); - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually initialize the SD-card via user interface - #endif - } - #endif //SDSUPPORT - - #if ENABLED(LCD_INFO_MENU) - MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu); - #endif - - END_MENU(); - } - - /** - * - * "Tune" submenu items - * - */ - - /** - * Set the home offset based on the current_position - */ - void lcd_set_home_offsets() { - // M428 Command - enqueue_and_echo_commands_P(PSTR("M428")); - lcd_return_to_status(); - } - - #if ENABLED(BABYSTEPPING) - - long babysteps_done = 0; - - static void _lcd_babystep(const AxisEnum axis, const char* msg) { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - ENCODER_DIRECTION_NORMAL(); - if (encoderPosition) { - int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR; - encoderPosition = 0; - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - thermalManager.babystep_axis(axis, babystep_increment); - babysteps_done += babystep_increment; - } - if (lcdDrawUpdate) - lcd_implementation_drawedit(msg, ftostr43sign( - ((1000 * babysteps_done) * planner.steps_to_mm[axis]) * 0.001f - )); - } - - #if ENABLED(BABYSTEP_XY) - static void _lcd_babystep_x() { _lcd_babystep(X_AXIS, PSTR(MSG_BABYSTEPPING_X)); } - static void _lcd_babystep_y() { _lcd_babystep(Y_AXIS, PSTR(MSG_BABYSTEPPING_Y)); } - static void lcd_babystep_x() { babysteps_done = 0; lcd_goto_screen(_lcd_babystep_x); } - static void lcd_babystep_y() { babysteps_done = 0; lcd_goto_screen(_lcd_babystep_y); } - #endif - static void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); } - static void lcd_babystep_z() { babysteps_done = 0; lcd_goto_screen(_lcd_babystep_z); } - - #endif //BABYSTEPPING - - /** - * Watch temperature callbacks - */ - #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0 - #if TEMP_SENSOR_0 != 0 - void watch_temp_callback_E0() { thermalManager.start_watching_heater(0); } - #endif - #if HOTENDS > 1 && TEMP_SENSOR_1 != 0 - void watch_temp_callback_E1() { thermalManager.start_watching_heater(1); } - #endif // HOTENDS > 1 - #if HOTENDS > 2 && TEMP_SENSOR_2 != 0 - void watch_temp_callback_E2() { thermalManager.start_watching_heater(2); } - #endif // HOTENDS > 2 - #if HOTENDS > 3 && TEMP_SENSOR_3 != 0 - void watch_temp_callback_E3() { thermalManager.start_watching_heater(3); } - #endif // HOTENDS > 3 - #else - #if TEMP_SENSOR_0 != 0 - void watch_temp_callback_E0() {} - #endif - #if HOTENDS > 1 && TEMP_SENSOR_1 != 0 - void watch_temp_callback_E1() {} - #endif // HOTENDS > 1 - #if HOTENDS > 2 && TEMP_SENSOR_2 != 0 - void watch_temp_callback_E2() {} - #endif // HOTENDS > 2 - #if HOTENDS > 3 && TEMP_SENSOR_3 != 0 - void watch_temp_callback_E3() {} - #endif // HOTENDS > 3 - #endif - - #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0 - #if TEMP_SENSOR_BED != 0 - void watch_temp_callback_bed() { thermalManager.start_watching_bed(); } - #endif - #else - #if TEMP_SENSOR_BED != 0 - void watch_temp_callback_bed() {} - #endif - #endif - - /** - * - * "Tune" submenu - * - */ - static void lcd_tune_menu() { - START_MENU(); - - // - // ^ Main - // - MENU_ITEM(back, MSG_MAIN); - - // - // Speed: - // - MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999); - - // Manual bed leveling, Bed Z: - #if ENABLED(MANUAL_BED_LEVELING) - MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); - #endif - - // - // Nozzle: - // Nozzle [1-4]: - // - #if HOTENDS == 1 - #if TEMP_SENSOR_0 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0); - #endif - #else //HOTENDS > 1 - #if TEMP_SENSOR_0 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0); - #endif - #if TEMP_SENSOR_1 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1); - #endif - #if HOTENDS > 2 - #if TEMP_SENSOR_2 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2); - #endif - #if HOTENDS > 3 - #if TEMP_SENSOR_3 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3); - #endif - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - - // - // Bed: - // - #if TEMP_SENSOR_BED != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed); - #endif - - // - // Fan Speed: - // - #if FAN_COUNT > 0 - #if HAS_FAN0 - #if FAN_COUNT > 1 - #define MSG_1ST_FAN_SPEED MSG_FAN_SPEED " 1" - #else - #define MSG_1ST_FAN_SPEED MSG_FAN_SPEED - #endif - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_1ST_FAN_SPEED, &fanSpeeds[0], 0, 255); - #endif - #if HAS_FAN1 - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED " 2", &fanSpeeds[1], 0, 255); - #endif - #if HAS_FAN2 - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED " 3", &fanSpeeds[2], 0, 255); - #endif - #endif // FAN_COUNT > 0 - - // - // Flow: - // Flow 1: - // Flow 2: - // Flow 3: - // Flow 4: - // - #if EXTRUDERS == 1 - MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiplier[0], 10, 999); - #else // EXTRUDERS > 1 - MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiplier[active_extruder], 10, 999); - MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N1, &extruder_multiplier[0], 10, 999); - MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N2, &extruder_multiplier[1], 10, 999); - #if EXTRUDERS > 2 - MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &extruder_multiplier[2], 10, 999); - #if EXTRUDERS > 3 - MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N4, &extruder_multiplier[3], 10, 999); - #endif //EXTRUDERS > 3 - #endif //EXTRUDERS > 2 - #endif //EXTRUDERS > 1 - - // - // Babystep X: - // Babystep Y: - // Babystep Z: - // - #if ENABLED(BABYSTEPPING) - #if ENABLED(BABYSTEP_XY) - MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x); - MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y); - #endif //BABYSTEP_XY - MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z); - #endif - - // - // Change filament - // - #if ENABLED(FILAMENT_CHANGE_FEATURE) - MENU_ITEM(gcode, MSG_FILAMENTCHANGE, PSTR("M600")); - #endif - - END_MENU(); - } - - /** - * - * "Prepare" submenu items - * - */ - void _lcd_preheat(int endnum, const float temph, const float tempb, const int fan) { - if (temph > 0) thermalManager.setTargetHotend(temph, endnum); - #if TEMP_SENSOR_BED != 0 - thermalManager.setTargetBed(tempb); - #else - UNUSED(tempb); - #endif - #if FAN_COUNT > 0 - #if FAN_COUNT > 1 - fanSpeeds[active_extruder < FAN_COUNT ? active_extruder : 0] = fan; - #else - fanSpeeds[0] = fan; - #endif - #else - UNUSED(fan); - #endif - lcd_return_to_status(); - } - - #if TEMP_SENSOR_0 != 0 - void lcd_preheat_pla0() { _lcd_preheat(0, preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1); } - void lcd_preheat_abs0() { _lcd_preheat(0, preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2); } - #endif - - #if HOTENDS > 1 - void lcd_preheat_pla1() { _lcd_preheat(1, preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1); } - void lcd_preheat_abs1() { _lcd_preheat(1, preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2); } - #if HOTENDS > 2 - void lcd_preheat_pla2() { _lcd_preheat(2, preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1); } - void lcd_preheat_abs2() { _lcd_preheat(2, preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2); } - #if HOTENDS > 3 - void lcd_preheat_pla3() { _lcd_preheat(3, preheatHotendTemp1, preheatBedTemp1, preheatFanSpeed1); } - void lcd_preheat_abs3() { _lcd_preheat(3, preheatHotendTemp2, preheatBedTemp2, preheatFanSpeed2); } - #endif - #endif - - void lcd_preheat_pla0123() { - #if HOTENDS > 1 - thermalManager.setTargetHotend(preheatHotendTemp1, 1); - #if HOTENDS > 2 - thermalManager.setTargetHotend(preheatHotendTemp1, 2); - #if HOTENDS > 3 - thermalManager.setTargetHotend(preheatHotendTemp1, 3); - #endif - #endif - #endif - lcd_preheat_pla0(); - } - void lcd_preheat_abs0123() { - #if HOTENDS > 1 - thermalManager.setTargetHotend(preheatHotendTemp2, 1); - #if HOTENDS > 2 - thermalManager.setTargetHotend(preheatHotendTemp2, 2); - #if HOTENDS > 3 - thermalManager.setTargetHotend(preheatHotendTemp2, 3); - #endif - #endif - #endif - lcd_preheat_abs0(); - } - - #endif // HOTENDS > 1 - - #if TEMP_SENSOR_BED != 0 - void lcd_preheat_pla_bedonly() { _lcd_preheat(0, 0, preheatBedTemp1, preheatFanSpeed1); } - void lcd_preheat_abs_bedonly() { _lcd_preheat(0, 0, preheatBedTemp2, preheatFanSpeed2); } - #endif - - #if TEMP_SENSOR_0 != 0 && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0) - - static void lcd_preheat_pla_menu() { - START_MENU(); - MENU_ITEM(back, MSG_PREPARE); - #if HOTENDS == 1 - MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0); - #else - MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_pla0); - MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_pla1); - #if HOTENDS > 2 - MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_pla2); - #if HOTENDS > 3 - MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_pla3); - #endif - #endif - MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_pla0123); - #endif - #if TEMP_SENSOR_BED != 0 - MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_pla_bedonly); - #endif - END_MENU(); - } - - static void lcd_preheat_abs_menu() { - START_MENU(); - MENU_ITEM(back, MSG_PREPARE); - #if HOTENDS == 1 - MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0); - #else - MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_abs0); - MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_abs1); - #if HOTENDS > 2 - MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_abs2); - #if HOTENDS > 3 - MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_abs3); - #endif - #endif - MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_abs0123); - #endif - #if TEMP_SENSOR_BED != 0 - MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_abs_bedonly); - #endif - END_MENU(); - } - - #endif // TEMP_SENSOR_0 && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_BED) - - void lcd_cooldown() { - #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; - #endif - thermalManager.disable_all_heaters(); - lcd_return_to_status(); - } - - #if ENABLED(SDSUPPORT) && ENABLED(MENU_ADDAUTOSTART) - - static void lcd_autostart_sd() { - card.autostart_index = 0; - card.setroot(); - card.checkautostart(true); - } - - #endif - - #if ENABLED(MANUAL_BED_LEVELING) - - /** - * - * "Prepare" > "Bed Leveling" handlers - * - */ - - static uint8_t _lcd_level_bed_position; - - // Utility to go to the next mesh point - // A raise is added between points if Z_HOMING_HEIGHT is in use - // Note: During Manual Bed Leveling the homed Z position is MESH_HOME_SEARCH_Z - // Z position will be restored with the final action, a G28 - inline void _mbl_goto_xy(float x, float y) { - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT; - line_to_current(Z_AXIS); - current_position[X_AXIS] = x + home_offset[X_AXIS]; - current_position[Y_AXIS] = y + home_offset[Y_AXIS]; - line_to_current(manual_feedrate_mm_m[X_AXIS] <= manual_feedrate_mm_m[Y_AXIS] ? X_AXIS : Y_AXIS); - #if Z_HOMING_HEIGHT > 0 - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; // How do condition and action match? - line_to_current(Z_AXIS); - #endif - stepper.synchronize(); - } - - static void _lcd_level_goto_next_point(); - - static void _lcd_level_bed_done() { - if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_DONE)); - lcdDrawUpdate = - #if ENABLED(DOGLCD) - LCDVIEW_CALL_REDRAW_NEXT - #else - LCDVIEW_CALL_NO_REDRAW - #endif - ; - } - - /** - * Step 7: Get the Z coordinate, then goto next point or exit - */ - static void _lcd_level_bed_get_z() { - ENCODER_DIRECTION_NORMAL(); - - // Encoder wheel adjusts the Z position - if (encoderPosition) { - refresh_cmd_timeout(); - current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP); - NOLESS(current_position[Z_AXIS], 0); - NOMORE(current_position[Z_AXIS], MESH_HOME_SEARCH_Z * 2); - line_to_current(Z_AXIS); - lcdDrawUpdate = - #if ENABLED(DOGLCD) - LCDVIEW_CALL_REDRAW_NEXT - #else - LCDVIEW_REDRAW_NOW - #endif - ; - encoderPosition = 0; - } - - static bool debounce_click = false; - if (LCD_CLICKED) { - if (!debounce_click) { - debounce_click = true; // ignore multiple "clicks" in a row - mbl.set_zigzag_z(_lcd_level_bed_position++, current_position[Z_AXIS]); - if (_lcd_level_bed_position == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) { - lcd_goto_screen(_lcd_level_bed_done, true); - - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT; - line_to_current(Z_AXIS); - stepper.synchronize(); - - mbl.set_has_mesh(true); - enqueue_and_echo_commands_P(PSTR("G28")); - lcd_return_to_status(); - //LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE); - #if HAS_BUZZER - lcd_buzz(200, 659); - lcd_buzz(200, 698); - #endif - } - else { - lcd_goto_screen(_lcd_level_goto_next_point, true); - } - } - } - else { - debounce_click = false; - } - - // Update on first display, then only on updates to Z position - // Show message above on clicks instead - if (lcdDrawUpdate) { - float v = current_position[Z_AXIS] - MESH_HOME_SEARCH_Z; - lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+')); - } - - } - - /** - * Step 6: Display "Next point: 1 / 9" while waiting for move to finish - */ - static void _lcd_level_bed_moving() { - if (lcdDrawUpdate) { - char msg[10]; - sprintf_P(msg, PSTR("%i / %u"), (int)(_lcd_level_bed_position + 1), (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)); - lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg); - } - - lcdDrawUpdate = - #if ENABLED(DOGLCD) - LCDVIEW_CALL_REDRAW_NEXT - #else - LCDVIEW_CALL_NO_REDRAW - #endif - ; - } - - /** - * Step 5: Initiate a move to the next point - */ - static void _lcd_level_goto_next_point() { - // Set the menu to display ahead of blocking call - lcd_goto_screen(_lcd_level_bed_moving); - - // _mbl_goto_xy runs the menu loop until the move is done - int8_t px, py; - mbl.zigzag(_lcd_level_bed_position, px, py); - _mbl_goto_xy(mbl.get_probe_x(px), mbl.get_probe_y(py)); - - // After the blocking function returns, change menus - lcd_goto_screen(_lcd_level_bed_get_z); - } - - /** - * Step 4: Display "Click to Begin", wait for click - * Move to the first probe position - */ - static void _lcd_level_bed_homing_done() { - if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING)); - if (LCD_CLICKED) { - _lcd_level_bed_position = 0; - current_position[Z_AXIS] = MESH_HOME_SEARCH_Z - #if Z_HOME_DIR > 0 - + Z_MAX_POS - #endif - ; - planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); - lcd_goto_screen(_lcd_level_goto_next_point, true); - } - } - - /** - * Step 3: Display "Homing XYZ" - Wait for homing to finish - */ - static void _lcd_level_bed_homing() { - if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL); - lcdDrawUpdate = - #if ENABLED(DOGLCD) - LCDVIEW_CALL_REDRAW_NEXT - #else - LCDVIEW_CALL_NO_REDRAW - #endif - ; - if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) - lcd_goto_screen(_lcd_level_bed_homing_done); - } - - /** - * Step 2: Continue Bed Leveling... - */ - static void _lcd_level_bed_continue() { - defer_return_to_status = true; - axis_homed[X_AXIS] = axis_homed[Y_AXIS] = axis_homed[Z_AXIS] = false; - mbl.reset(); - enqueue_and_echo_commands_P(PSTR("G28")); - lcd_goto_screen(_lcd_level_bed_homing); - } - - /** - * Step 1: MBL entry-point: "Cancel" or "Level Bed" - */ - static void lcd_level_bed() { - START_MENU(); - MENU_ITEM(back, MSG_LEVEL_BED_CANCEL); - MENU_ITEM(submenu, MSG_LEVEL_BED, _lcd_level_bed_continue); - END_MENU(); - } - - #endif // MANUAL_BED_LEVELING - - /** - * - * "Prepare" submenu - * - */ - - static void lcd_prepare_menu() { - START_MENU(); - - // - // ^ Main - // - MENU_ITEM(back, MSG_MAIN); - - // - // Auto Home - // - MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) - MENU_ITEM(gcode, MSG_AUTO_HOME_X, PSTR("G28 X")); - MENU_ITEM(gcode, MSG_AUTO_HOME_Y, PSTR("G28 Y")); - MENU_ITEM(gcode, MSG_AUTO_HOME_Z, PSTR("G28 Z")); - #endif - - // - // Set Home Offsets - // - MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); - //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); - - // - // Level Bed - // - #if ENABLED(AUTO_BED_LEVELING_FEATURE) - MENU_ITEM(gcode, MSG_LEVEL_BED, - axis_homed[X_AXIS] && axis_homed[Y_AXIS] ? PSTR("G29") : PSTR("G28\nG29") - ); - #elif ENABLED(MANUAL_BED_LEVELING) - MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed); - #endif - - // - // Move Axis - // - MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); - - // - // Disable Steppers - // - MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); - - // - // Preheat PLA - // Preheat ABS - // - #if TEMP_SENSOR_0 != 0 - #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0 - MENU_ITEM(submenu, MSG_PREHEAT_1, lcd_preheat_pla_menu); - MENU_ITEM(submenu, MSG_PREHEAT_2, lcd_preheat_abs_menu); - #else - MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_pla0); - MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_abs0); - #endif - #endif - - // - // Cooldown - // - MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown); - - // - // Switch power on/off - // - #if HAS_POWER_SWITCH - if (powersupply) - MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81")); - else - MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80")); - #endif - - // - // Autostart - // - #if ENABLED(SDSUPPORT) && ENABLED(MENU_ADDAUTOSTART) - MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd); - #endif - - END_MENU(); - } - - #if ENABLED(DELTA_CALIBRATION_MENU) - - static void lcd_delta_calibrate_menu() { - START_MENU(); - MENU_ITEM(back, MSG_MAIN); - MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_X, PSTR("G0 F8000 X-77.94 Y-45 Z0")); - MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Y, PSTR("G0 F8000 X77.94 Y-45 Z0")); - MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_Z, PSTR("G0 F8000 X0 Y90 Z0")); - MENU_ITEM(gcode, MSG_DELTA_CALIBRATE_CENTER, PSTR("G0 F8000 X0 Y0 Z0")); - END_MENU(); - } - - #endif // DELTA_CALIBRATION_MENU - - float move_menu_scale; - - /** - * If the most recent manual move hasn't been fed to the planner yet, - * and the planner can accept one, send immediately - */ - inline void manage_manual_move() { - if (manual_move_axis != (int8_t)NO_AXIS && ELAPSED(millis(), manual_move_start_time) && !planner.is_full()) { - #if ENABLED(DELTA) - inverse_kinematics(current_position); - planner.buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]), manual_move_e_index); - #else - planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMM_TO_MMS(manual_feedrate_mm_m[manual_move_axis]), manual_move_e_index); - #endif - manual_move_axis = (int8_t)NO_AXIS; - } - } - - /** - * Set a flag that lcd_update() should start a move - * to "current_position" after a short delay. - */ - inline void manual_move_to_current(AxisEnum axis - #if E_MANUAL > 1 - , int8_t eindex=-1 - #endif - ) { - #if E_MANUAL > 1 - if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder; - #endif - manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves - manual_move_axis = (int8_t)axis; - } - - /** - * - * "Prepare" > "Move Axis" submenu - * - */ - - static void _lcd_move_xyz(const char* name, AxisEnum axis, float min, float max) { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - ENCODER_DIRECTION_NORMAL(); - if (encoderPosition) { - refresh_cmd_timeout(); - current_position[axis] += float((int32_t)encoderPosition) * move_menu_scale; - if (min_software_endstops) NOLESS(current_position[axis], min); - if (max_software_endstops) NOMORE(current_position[axis], max); - encoderPosition = 0; - manual_move_to_current(axis); - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - } - if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr41sign(current_position[axis])); - } - #if ENABLED(DELTA) - static float delta_clip_radius_2 = (DELTA_PRINTABLE_RADIUS) * (DELTA_PRINTABLE_RADIUS); - static int delta_clip( float a ) { return sqrt(delta_clip_radius_2 - sq(a)); } - static void lcd_move_x() { int clip = delta_clip(current_position[Y_AXIS]); _lcd_move_xyz(PSTR(MSG_MOVE_X), X_AXIS, max(sw_endstop_min[X_AXIS], -clip), min(sw_endstop_max[X_AXIS], clip)); } - static void lcd_move_y() { int clip = delta_clip(current_position[X_AXIS]); _lcd_move_xyz(PSTR(MSG_MOVE_Y), Y_AXIS, max(sw_endstop_min[Y_AXIS], -clip), min(sw_endstop_max[Y_AXIS], clip)); } - #else - static void lcd_move_x() { _lcd_move_xyz(PSTR(MSG_MOVE_X), X_AXIS, sw_endstop_min[X_AXIS], sw_endstop_max[X_AXIS]); } - static void lcd_move_y() { _lcd_move_xyz(PSTR(MSG_MOVE_Y), Y_AXIS, sw_endstop_min[Y_AXIS], sw_endstop_max[Y_AXIS]); } - #endif - static void lcd_move_z() { _lcd_move_xyz(PSTR(MSG_MOVE_Z), Z_AXIS, sw_endstop_min[Z_AXIS], sw_endstop_max[Z_AXIS]); } - static void _lcd_move_e( - #if E_MANUAL > 1 - int8_t eindex=-1 - #endif - ) { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - ENCODER_DIRECTION_NORMAL(); - if (encoderPosition) { - current_position[E_AXIS] += float((int32_t)encoderPosition) * move_menu_scale; - encoderPosition = 0; - manual_move_to_current(E_AXIS - #if E_MANUAL > 1 - , eindex - #endif - ); - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - } - if (lcdDrawUpdate) { - PGM_P pos_label; - #if E_MANUAL == 1 - pos_label = PSTR(MSG_MOVE_E); - #else - switch (eindex) { - default: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E1); break; - case 1: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E2); break; - #if E_MANUAL > 2 - case 2: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E3); break; - #if E_MANUAL > 3 - case 3: pos_label = PSTR(MSG_MOVE_E MSG_MOVE_E4); break; - #endif - #endif - } - #endif - lcd_implementation_drawedit(pos_label, ftostr41sign(current_position[E_AXIS])); - } - } - - static void lcd_move_e() { _lcd_move_e(); } - #if E_MANUAL > 1 - static void lcd_move_e0() { _lcd_move_e(0); } - static void lcd_move_e1() { _lcd_move_e(1); } - #if E_MANUAL > 2 - static void lcd_move_e2() { _lcd_move_e(2); } - #if E_MANUAL > 3 - static void lcd_move_e3() { _lcd_move_e(3); } - #endif - #endif - #endif - - /** - * - * "Prepare" > "Move Xmm" > "Move XYZ" submenu - * - */ - - #if ENABLED(DELTA) || ENABLED(SCARA) - #define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) - #else - #define _MOVE_XYZ_ALLOWED true - #endif - - static void _lcd_move_menu_axis() { - START_MENU(); - MENU_ITEM(back, MSG_MOVE_AXIS); - - if (_MOVE_XYZ_ALLOWED) { - MENU_ITEM(submenu, MSG_MOVE_X, lcd_move_x); - MENU_ITEM(submenu, MSG_MOVE_Y, lcd_move_y); - } - - if (move_menu_scale < 10.0) { - if (_MOVE_XYZ_ALLOWED) MENU_ITEM(submenu, MSG_MOVE_Z, lcd_move_z); - - #if ENABLED(SWITCHING_EXTRUDER) - if (active_extruder) - MENU_ITEM(gcode, MSG_SELECT MSG_E1, PSTR("T0")); - else - MENU_ITEM(gcode, MSG_SELECT MSG_E2, PSTR("T1")); - #endif - - MENU_ITEM(submenu, MSG_MOVE_E, lcd_move_e); - #if E_MANUAL > 1 - MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E1, lcd_move_e0); - MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E2, lcd_move_e1); - #if E_MANUAL > 2 - MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E3, lcd_move_e2); - #if E_MANUAL > 3 - MENU_ITEM(submenu, MSG_MOVE_E MSG_MOVE_E4, lcd_move_e3); - #endif - #endif - #endif - } - END_MENU(); - } - - static void lcd_move_menu_10mm() { - move_menu_scale = 10.0; - _lcd_move_menu_axis(); - } - static void lcd_move_menu_1mm() { - move_menu_scale = 1.0; - _lcd_move_menu_axis(); - } - static void lcd_move_menu_01mm() { - move_menu_scale = 0.1; - _lcd_move_menu_axis(); - } - - /** - * - * "Prepare" > "Move Axis" submenu - * - */ - - static void lcd_move_menu() { - START_MENU(); - MENU_ITEM(back, MSG_PREPARE); - - if (_MOVE_XYZ_ALLOWED) - MENU_ITEM(submenu, MSG_MOVE_10MM, lcd_move_menu_10mm); - - MENU_ITEM(submenu, MSG_MOVE_1MM, lcd_move_menu_1mm); - MENU_ITEM(submenu, MSG_MOVE_01MM, lcd_move_menu_01mm); - //TODO:X,Y,Z,E - END_MENU(); - } - - /** - * - * "Control" submenu - * - */ - - static void lcd_control_menu() { - START_MENU(); - MENU_ITEM(back, MSG_MAIN); - MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu); - MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu); - MENU_ITEM(submenu, MSG_VOLUMETRIC, lcd_control_volumetric_menu); - - #if HAS_LCD_CONTRAST - //MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); - MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); - #endif - #if ENABLED(FWRETRACT) - MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu); - #endif - #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings); - MENU_ITEM(function, MSG_LOAD_EPROM, Config_RetrieveSettings); - #endif - MENU_ITEM(function, MSG_RESTORE_FAILSAFE, Config_ResetDefault); - END_MENU(); - } - - /** - * - * "Temperature" submenu - * - */ - - #if ENABLED(PID_AUTOTUNE_MENU) - - #if ENABLED(PIDTEMP) - int autotune_temp[HOTENDS] = ARRAY_BY_HOTENDS1(150); - const int heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP); - #endif - - #if ENABLED(PIDTEMPBED) - int autotune_temp_bed = 70; - #endif - - static void _lcd_autotune(int e) { - char cmd[30]; - sprintf_P(cmd, PSTR("M303 U1 E%i S%i"), e, - #if HAS_PID_FOR_BOTH - e < 0 ? autotune_temp_bed : autotune_temp[e] - #elif ENABLED(PIDTEMPBED) - autotune_temp_bed - #else - autotune_temp[e] - #endif - ); - enqueue_and_echo_command(cmd); - } - - #endif //PID_AUTOTUNE_MENU - - #if ENABLED(PIDTEMP) - - // Helpers for editing PID Ki & Kd values - // grab the PID value out of the temp variable; scale it; then update the PID driver - void copy_and_scalePID_i(int e) { - #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1 - UNUSED(e); - #endif - PID_PARAM(Ki, e) = scalePID_i(raw_Ki); - thermalManager.updatePID(); - } - void copy_and_scalePID_d(int e) { - #if DISABLED(PID_PARAMS_PER_HOTEND) || HOTENDS == 1 - UNUSED(e); - #endif - PID_PARAM(Kd, e) = scalePID_d(raw_Kd); - thermalManager.updatePID(); - } - #define _PIDTEMP_BASE_FUNCTIONS(eindex) \ - void copy_and_scalePID_i_E ## eindex() { copy_and_scalePID_i(eindex); } \ - void copy_and_scalePID_d_E ## eindex() { copy_and_scalePID_d(eindex); } - - #if ENABLED(PID_AUTOTUNE_MENU) - #define _PIDTEMP_FUNCTIONS(eindex) \ - _PIDTEMP_BASE_FUNCTIONS(eindex); \ - void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); } - #else - #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex) - #endif - - _PIDTEMP_FUNCTIONS(0); - #if ENABLED(PID_PARAMS_PER_HOTEND) - #if HOTENDS > 1 - _PIDTEMP_FUNCTIONS(1); - #if HOTENDS > 2 - _PIDTEMP_FUNCTIONS(2); - #if HOTENDS > 3 - _PIDTEMP_FUNCTIONS(3); - #endif //HOTENDS > 3 - #endif //HOTENDS > 2 - #endif //HOTENDS > 1 - #endif //PID_PARAMS_PER_HOTEND - - #endif //PIDTEMP - - /** - * - * "Control" > "Temperature" submenu - * - */ - static void lcd_control_temperature_menu() { - START_MENU(); - - // - // ^ Control - // - MENU_ITEM(back, MSG_CONTROL); - - // - // Nozzle: - // Nozzle [1-4]: - // - #if HOTENDS == 1 - #if TEMP_SENSOR_0 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0); - #endif - #else //HOTENDS > 1 - #if TEMP_SENSOR_0 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0); - #endif - #if TEMP_SENSOR_1 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1); - #endif - #if HOTENDS > 2 - #if TEMP_SENSOR_2 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2); - #endif - #if HOTENDS > 3 - #if TEMP_SENSOR_3 != 0 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3); - #endif - #endif // HOTENDS > 3 - #endif // HOTENDS > 2 - #endif // HOTENDS > 1 - - // - // Bed: - // - #if TEMP_SENSOR_BED != 0 - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &thermalManager.target_temperature_bed, 0, BED_MAXTEMP - 15); - #endif - - // - // Fan Speed: - // - #if FAN_COUNT > 0 - #if HAS_FAN0 - #if FAN_COUNT > 1 - #define MSG_1ST_FAN_SPEED MSG_FAN_SPEED " 1" - #else - #define MSG_1ST_FAN_SPEED MSG_FAN_SPEED - #endif - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_1ST_FAN_SPEED, &fanSpeeds[0], 0, 255); - #endif - #if HAS_FAN1 - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED " 2", &fanSpeeds[1], 0, 255); - #endif - #if HAS_FAN2 - MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED " 3", &fanSpeeds[2], 0, 255); - #endif - #endif // FAN_COUNT > 0 - - // - // Autotemp, Min, Max, Fact - // - #if ENABLED(AUTOTEMP) && (TEMP_SENSOR_0 != 0) - MENU_ITEM_EDIT(bool, MSG_AUTOTEMP, &planner.autotemp_enabled); - MENU_ITEM_EDIT(float3, MSG_MIN, &planner.autotemp_min, 0, HEATER_0_MAXTEMP - 15); - MENU_ITEM_EDIT(float3, MSG_MAX, &planner.autotemp_max, 0, HEATER_0_MAXTEMP - 15); - MENU_ITEM_EDIT(float32, MSG_FACTOR, &planner.autotemp_factor, 0.0, 1.0); - #endif - - // - // PID-P, PID-I, PID-D, PID-C, PID Autotune - // PID-P E1, PID-I E1, PID-D E1, PID-C E1, PID Autotune E1 - // PID-P E2, PID-I E2, PID-D E2, PID-C E2, PID Autotune E2 - // PID-P E3, PID-I E3, PID-D E3, PID-C E3, PID Autotune E3 - // PID-P E4, PID-I E4, PID-D E4, PID-C E4, PID Autotune E4 - // - #if ENABLED(PIDTEMP) - - #define _PID_BASE_MENU_ITEMS(ELABEL, eindex) \ - raw_Ki = unscalePID_i(PID_PARAM(Ki, eindex)); \ - raw_Kd = unscalePID_d(PID_PARAM(Kd, eindex)); \ - MENU_ITEM_EDIT(float52, MSG_PID_P ELABEL, &PID_PARAM(Kp, eindex), 1, 9990); \ - MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_I ELABEL, &raw_Ki, 0.01, 9990, copy_and_scalePID_i_E ## eindex); \ - MENU_ITEM_EDIT_CALLBACK(float52, MSG_PID_D ELABEL, &raw_Kd, 1, 9990, copy_and_scalePID_d_E ## eindex) - - #if ENABLED(PID_EXTRUSION_SCALING) - #define _PID_MENU_ITEMS(ELABEL, eindex) \ - _PID_BASE_MENU_ITEMS(ELABEL, eindex); \ - MENU_ITEM_EDIT(float3, MSG_PID_C ELABEL, &PID_PARAM(Kc, eindex), 1, 9990) - #else - #define _PID_MENU_ITEMS(ELABEL, eindex) _PID_BASE_MENU_ITEMS(ELABEL, eindex) - #endif - - #if ENABLED(PID_AUTOTUNE_MENU) - #define PID_MENU_ITEMS(ELABEL, eindex) \ - _PID_MENU_ITEMS(ELABEL, eindex); \ - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_PID_AUTOTUNE ELABEL, &autotune_temp[eindex], 150, heater_maxtemp[eindex] - 15, lcd_autotune_callback_E ## eindex) - #else - #define PID_MENU_ITEMS(ELABEL, eindex) _PID_MENU_ITEMS(ELABEL, eindex) - #endif - - #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1 - PID_MENU_ITEMS(MSG_E1, 0); - PID_MENU_ITEMS(MSG_E2, 1); - #if HOTENDS > 2 - PID_MENU_ITEMS(MSG_E3, 2); - #if HOTENDS > 3 - PID_MENU_ITEMS(MSG_E4, 3); - #endif //HOTENDS > 3 - #endif //HOTENDS > 2 - #else //!PID_PARAMS_PER_HOTEND || HOTENDS == 1 - PID_MENU_ITEMS("", 0); - #endif //!PID_PARAMS_PER_HOTEND || HOTENDS == 1 - - #endif //PIDTEMP - - // - // Preheat PLA conf - // - MENU_ITEM(submenu, MSG_PREHEAT_1_SETTINGS, lcd_control_temperature_preheat_pla_settings_menu); - - // - // Preheat ABS conf - // - MENU_ITEM(submenu, MSG_PREHEAT_2_SETTINGS, lcd_control_temperature_preheat_abs_settings_menu); - END_MENU(); - } - - /** - * - * "Temperature" > "Preheat PLA conf" submenu - * - */ - static void lcd_control_temperature_preheat_pla_settings_menu() { - START_MENU(); - MENU_ITEM(back, MSG_TEMPERATURE); - MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed1, 0, 255); - #if TEMP_SENSOR_0 != 0 - MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp1, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15); - #endif - #if TEMP_SENSOR_BED != 0 - MENU_ITEM_EDIT(int3, MSG_BED, &preheatBedTemp1, BED_MINTEMP, BED_MAXTEMP - 15); - #endif - #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings); - #endif - END_MENU(); - } - - /** - * - * "Temperature" > "Preheat ABS conf" submenu - * - */ - static void lcd_control_temperature_preheat_abs_settings_menu() { - START_MENU(); - MENU_ITEM(back, MSG_TEMPERATURE); - MENU_ITEM_EDIT(int3, MSG_FAN_SPEED, &preheatFanSpeed2, 0, 255); - #if TEMP_SENSOR_0 != 0 - MENU_ITEM_EDIT(int3, MSG_NOZZLE, &preheatHotendTemp2, HEATER_0_MINTEMP, HEATER_0_MAXTEMP - 15); - #endif - #if TEMP_SENSOR_BED != 0 - MENU_ITEM_EDIT(int3, MSG_BED, &preheatBedTemp2, BED_MINTEMP, BED_MAXTEMP - 15); - #endif - #if ENABLED(EEPROM_SETTINGS) - MENU_ITEM(function, MSG_STORE_EPROM, Config_StoreSettings); - #endif - END_MENU(); - } - - static void _reset_acceleration_rates() { planner.reset_acceleration_rates(); } - static void _planner_refresh_positioning() { planner.refresh_positioning(); } - - /** - * - * "Control" > "Motion" submenu - * - */ - static void lcd_control_motion_menu() { - START_MENU(); - MENU_ITEM(back, MSG_CONTROL); - #if HAS_BED_PROBE - MENU_ITEM_EDIT(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); - #endif - // Manual bed leveling, Bed Z: - #if ENABLED(MANUAL_BED_LEVELING) - MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); - #endif - MENU_ITEM_EDIT(float5, MSG_ACC, &planner.acceleration, 10, 99000); - MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &planner.max_xy_jerk, 1, 990); - #if ENABLED(DELTA) - MENU_ITEM_EDIT(float3, MSG_VZ_JERK, &planner.max_z_jerk, 1, 990); - #else - MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_z_jerk, 0.1, 990); - #endif - MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_e_jerk, 1, 990); - MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999); - MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999); - MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999); - MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999); - MENU_ITEM_EDIT(float3, MSG_VMIN, &planner.min_feedrate_mm_s, 0, 999); - MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.min_travel_feedrate_mm_s, 0, 999); - MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &planner.max_acceleration_mm_per_s2[X_AXIS], 100, 99000, _reset_acceleration_rates); - MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &planner.max_acceleration_mm_per_s2[Y_AXIS], 100, 99000, _reset_acceleration_rates); - MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &planner.max_acceleration_mm_per_s2[Z_AXIS], 10, 99000, _reset_acceleration_rates); - MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates); - MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.retract_acceleration, 100, 99000); - MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.travel_acceleration, 100, 99000); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_XSTEPS, &planner.axis_steps_per_mm[X_AXIS], 5, 9999, _planner_refresh_positioning); - MENU_ITEM_EDIT_CALLBACK(float52, MSG_YSTEPS, &planner.axis_steps_per_mm[Y_AXIS], 5, 9999, _planner_refresh_positioning); - #if ENABLED(DELTA) - MENU_ITEM_EDIT_CALLBACK(float52, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning); - #else - MENU_ITEM_EDIT_CALLBACK(float51, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning); - #endif - MENU_ITEM_EDIT_CALLBACK(float51, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); - #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) - MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit); - #endif - #if ENABLED(SCARA) - MENU_ITEM_EDIT(float74, MSG_XSCALE, &axis_scaling[X_AXIS], 0.5, 2); - MENU_ITEM_EDIT(float74, MSG_YSCALE, &axis_scaling[Y_AXIS], 0.5, 2); - #endif - END_MENU(); - } - - /** - * - * "Control" > "Filament" submenu - * - */ - static void lcd_control_volumetric_menu() { - START_MENU(); - MENU_ITEM(back, MSG_CONTROL); - - MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers); - - if (volumetric_enabled) { - #if EXTRUDERS == 1 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers); - #else //EXTRUDERS > 1 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers); - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers); - #if EXTRUDERS > 2 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers); - #if EXTRUDERS > 3 - MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E4, &filament_size[3], 1.5, 3.25, calculate_volumetric_multipliers); - #endif //EXTRUDERS > 3 - #endif //EXTRUDERS > 2 - #endif //EXTRUDERS > 1 - } - - END_MENU(); - } - - /** - * - * "Control" > "Contrast" submenu - * - */ - #if HAS_LCD_CONTRAST - static void lcd_set_contrast() { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - ENCODER_DIRECTION_NORMAL(); - if (encoderPosition) { - set_lcd_contrast(lcd_contrast + encoderPosition); - encoderPosition = 0; - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - } - if (lcdDrawUpdate) { - lcd_implementation_drawedit(PSTR(MSG_CONTRAST), - #if LCD_CONTRAST_MAX >= 100 - itostr3(lcd_contrast) - #else - itostr2(lcd_contrast) - #endif - ); - } - } - #endif // HAS_LCD_CONTRAST - - /** - * - * "Control" > "Retract" submenu - * - */ - #if ENABLED(FWRETRACT) - static void lcd_control_retract_menu() { - START_MENU(); - MENU_ITEM(back, MSG_CONTROL); - MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100); - #if EXTRUDERS > 1 - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100); - #endif - MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate_mm_s, 1, 999); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999); - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, 0, 100); - #if EXTRUDERS > 1 - MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, 0, 100); - #endif - MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate_mm_s, 1, 999); - END_MENU(); - } - #endif // FWRETRACT - - #if ENABLED(SDSUPPORT) - - #if !PIN_EXISTS(SD_DETECT) - static void lcd_sd_refresh() { - card.initsd(); - encoderTopLine = 0; - } - #endif - - static void lcd_sd_updir() { - card.updir(); - encoderTopLine = 0; - } - - /** - * - * "Print from SD" submenu - * - */ - void lcd_sdcard_menu() { - ENCODER_DIRECTION_MENUS(); - if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return; // nothing to do (so don't thrash the SD card) - uint16_t fileCnt = card.getnrfilenames(); - START_MENU(); - MENU_ITEM(back, MSG_MAIN); - card.getWorkDirName(); - if (card.filename[0] == '/') { - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh); - #endif - } - else { - MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir); - } - - for (uint16_t i = 0; i < fileCnt; i++) { - if (_menuLineNr == _thisItemNr) { - card.getfilename( - #if ENABLED(SDCARD_RATHERRECENTFIRST) - fileCnt-1 - - #endif - i - ); - - if (card.filenameIsDir) - MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename); - else - MENU_ITEM(sdfile, MSG_CARD_MENU, card.filename, card.longFilename); - } - else { - MENU_ITEM_DUMMY(); - } - } - END_MENU(); - } - - #endif //SDSUPPORT - - #if ENABLED(LCD_INFO_MENU) - - #if ENABLED(PRINTCOUNTER) - /** - * - * About Printer > Statistics submenu - * - */ - static void lcd_info_stats_menu() { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - - char buffer[21]; - printStatistics stats = print_job_timer.getStats(); - - START_SCREEN(); // 12345678901234567890 - STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count: 999 - STATIC_ITEM(MSG_INFO_COMPLETED_PRINTS" : ", false, false, itostr3left(stats.finishedPrints)); // Completed : 666 - - duration_t elapsed = stats.printTime; - elapsed.toString(buffer); - - STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false); // Total print Time: - STATIC_ITEM("", false, false, buffer); // 99y 364d 23h 59m 59s - - elapsed = stats.longestPrint; - elapsed.toString(buffer); - - STATIC_ITEM(MSG_INFO_PRINT_LONGEST ": ", false, false); // Longest job time: - STATIC_ITEM("", false, false, buffer); // 99y 364d 23h 59m 59s - - sprintf_P(buffer, PSTR("%im"), stats.filamentUsed / 1000); - STATIC_ITEM(MSG_INFO_PRINT_FILAMENT ": ", false, false); // Extruded total: - STATIC_ITEM("", false, false, buffer); // 125m - END_SCREEN(); - } - #endif // PRINTCOUNTER - - /** - * - * About Printer > Thermistors - * - */ - static void lcd_info_thermistors_menu() { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - START_SCREEN(); - #define THERMISTOR_ID TEMP_SENSOR_0 - #include "thermistornames.h" - STATIC_ITEM("T0: " THERMISTOR_NAME, false, true); - STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_0_MINTEMP), false); - STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_0_MAXTEMP), false); - - #if TEMP_SENSOR_1 != 0 - #undef THERMISTOR_ID - #define THERMISTOR_ID TEMP_SENSOR_1 - #include "thermistornames.h" - STATIC_ITEM("T1: " THERMISTOR_NAME, false, true); - STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_1_MINTEMP), false); - STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_1_MAXTEMP), false); - #endif - - #if TEMP_SENSOR_2 != 0 - #undef THERMISTOR_ID - #define THERMISTOR_ID TEMP_SENSOR_2 - #include "thermistornames.h" - STATIC_ITEM("T2: " THERMISTOR_NAME, false, true); - STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_2_MINTEMP), false); - STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_2_MAXTEMP), false); - #endif - - #if TEMP_SENSOR_3 != 0 - #undef THERMISTOR_ID - #define THERMISTOR_ID TEMP_SENSOR_3 - #include "thermistornames.h" - STATIC_ITEM("T3: " THERMISTOR_NAME, false, true); - STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(HEATER_3_MINTEMP), false); - STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(HEATER_3_MAXTEMP), false); - #endif - - #if TEMP_SENSOR_BED != 0 - #undef THERMISTOR_ID - #define THERMISTOR_ID TEMP_SENSOR_BED - #include "thermistornames.h" - STATIC_ITEM("TBed:" THERMISTOR_NAME, false, true); - STATIC_ITEM(MSG_INFO_MIN_TEMP ": " STRINGIFY(BED_MINTEMP), false); - STATIC_ITEM(MSG_INFO_MAX_TEMP ": " STRINGIFY(BED_MAXTEMP), false); - #endif - END_SCREEN(); - } - - /** - * - * About Printer > Board Info - * - */ - static void lcd_info_board_menu() { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - START_SCREEN(); - STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController - STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000 - STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0 - #ifdef POWER_SUPPLY - #if (POWER_SUPPLY == 1) - STATIC_ITEM(MSG_INFO_PSU ": ATX"); // Power Supply: ATX - #elif (POWER_SUPPLY == 2) - STATIC_ITEM(MSG_INFO_PSU ": XBox"); // Power Supply: XBox - #endif - #endif // POWER_SUPPLY - END_SCREEN(); - } - - /** - * - * About Printer > Printer Info - * - */ - static void lcd_info_printer_menu() { - if (LCD_CLICKED) { lcd_goto_previous_menu(true); return; } - START_SCREEN(); - STATIC_ITEM(MSG_MARLIN, true, true); // Marlin - STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch - STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM - STATIC_ITEM(MACHINE_NAME); // My3DPrinter - STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com - STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2 - END_SCREEN(); - } - - /** - * - * "About Printer" submenu - * - */ - static void lcd_info_menu() { - START_MENU(); - MENU_ITEM(back, MSG_MAIN); - MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, lcd_info_printer_menu); // Printer Info > - MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, lcd_info_board_menu); // Board Info > - MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, lcd_info_thermistors_menu); // Thermistors > - #if ENABLED(PRINTCOUNTER) - MENU_ITEM(submenu, MSG_INFO_STATS_MENU, lcd_info_stats_menu); // Printer Statistics > - #endif - END_MENU(); - } - #endif // LCD_INFO_MENU - - #if ENABLED(FILAMENT_CHANGE_FEATURE) - - static void lcd_filament_change_resume_print() { - filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_RESUME_PRINT; - lcdDrawUpdate = 2; - lcd_goto_screen(lcd_status_screen); - } - - static void lcd_filament_change_extrude_more() { - filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_EXTRUDE_MORE; - } - - static void lcd_filament_change_option_menu() { - START_MENU(); - #if LCD_HEIGHT > 2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER, true, false); - #endif - MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_filament_change_resume_print); - MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_EXTRUDE, lcd_filament_change_extrude_more); - END_MENU(); - } - - static void lcd_filament_change_init_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1); - #ifdef MSG_FILAMENT_CHANGE_INIT_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_INIT_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_3); - #endif - END_SCREEN(); - } - - static void lcd_filament_change_unload_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1); - #ifdef MSG_FILAMENT_CHANGE_UNLOAD_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_UNLOAD_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_3); - #endif - END_SCREEN(); - } - - static void lcd_filament_change_insert_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1); - #ifdef MSG_FILAMENT_CHANGE_INSERT_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_INSERT_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_3); - #endif - END_SCREEN(); - } - - static void lcd_filament_change_load_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1); - #ifdef MSG_FILAMENT_CHANGE_LOAD_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_LOAD_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_3); - #endif - END_SCREEN(); - } - - static void lcd_filament_change_extrude_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_1); - #ifdef MSG_FILAMENT_CHANGE_EXTRUDE_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_EXTRUDE_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_3); - #endif - END_SCREEN(); - } - - static void lcd_filament_change_resume_message() { - START_SCREEN(); - STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true); - STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1); - #ifdef MSG_FILAMENT_CHANGE_RESUME_2 - STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_2); - #endif - #ifdef MSG_FILAMENT_CHANGE_RESUME_3 - STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_3); - #endif - END_SCREEN(); - } - - void lcd_filament_change_show_message(FilamentChangeMessage message) { - switch (message) { - case FILAMENT_CHANGE_MESSAGE_INIT: - defer_return_to_status = true; - lcd_goto_screen(lcd_filament_change_init_message); - break; - case FILAMENT_CHANGE_MESSAGE_UNLOAD: - lcd_goto_screen(lcd_filament_change_unload_message); - break; - case FILAMENT_CHANGE_MESSAGE_INSERT: - lcd_goto_screen(lcd_filament_change_insert_message); - break; - case FILAMENT_CHANGE_MESSAGE_LOAD: - lcd_goto_screen(lcd_filament_change_load_message); - break; - case FILAMENT_CHANGE_MESSAGE_EXTRUDE: - lcd_goto_screen(lcd_filament_change_extrude_message); - break; - case FILAMENT_CHANGE_MESSAGE_OPTION: - filament_change_menu_response = FILAMENT_CHANGE_RESPONSE_WAIT_FOR; - lcd_goto_screen(lcd_filament_change_option_menu); - break; - case FILAMENT_CHANGE_MESSAGE_RESUME: - lcd_goto_screen(lcd_filament_change_resume_message); - break; - case FILAMENT_CHANGE_MESSAGE_STATUS: - lcd_return_to_status(); - break; - } - } - - #endif // FILAMENT_CHANGE_FEATURE - - /** - * - * Functions for editing single values - * - * The "menu_edit_type" macro generates the functions needed to edit a numerical value. - * - * For example, menu_edit_type(int, int3, itostr3, 1) expands into these functions: - * - * bool _menu_edit_int3(); - * void menu_edit_int3(); // edit int (interactively) - * void menu_edit_callback_int3(); // edit int (interactively) with callback on completion - * static void _menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); - * static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue); - * static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, screenFunc_t callback); // edit int with callback - * - * You can then use one of the menu macros to present the edit interface: - * MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999) - * - * This expands into a more primitive menu item: - * MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) - * - * - * Also: MENU_MULTIPLIER_ITEM_EDIT, MENU_ITEM_EDIT_CALLBACK, and MENU_MULTIPLIER_ITEM_EDIT_CALLBACK - * - * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999) - */ - #define menu_edit_type(_type, _name, _strFunc, scale) \ - bool _menu_edit_ ## _name () { \ - ENCODER_DIRECTION_NORMAL(); \ - bool isClicked = LCD_CLICKED; \ - if ((int32_t)encoderPosition < 0) encoderPosition = 0; \ - if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \ - if (lcdDrawUpdate) \ - lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \ - if (isClicked) { \ - *((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \ - lcd_goto_previous_menu(true); \ - } \ - return isClicked; \ - } \ - void menu_edit_ ## _name () { _menu_edit_ ## _name(); } \ - void menu_edit_callback_ ## _name () { if (_menu_edit_ ## _name ()) (*callbackFunc)(); } \ - static void _menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) { \ - lcd_save_previous_menu(); \ - \ - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; \ - \ - editLabel = pstr; \ - editValue = ptr; \ - minEditValue = minValue * scale; \ - maxEditValue = maxValue * scale - minEditValue; \ - encoderPosition = (*ptr) * scale - minEditValue; \ - } \ - static void menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) { \ - _menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \ - currentScreen = menu_edit_ ## _name; \ - }\ - static void menu_action_setting_edit_callback_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue, screenFunc_t callback) { \ - _menu_action_setting_edit_ ## _name(pstr, ptr, minValue, maxValue); \ - currentScreen = menu_edit_callback_ ## _name; \ - callbackFunc = callback; \ - } - - menu_edit_type(int, int3, itostr3, 1); - menu_edit_type(float, float3, ftostr3, 1); - menu_edit_type(float, float32, ftostr32, 100); - menu_edit_type(float, float43, ftostr43sign, 1000); - menu_edit_type(float, float5, ftostr5rj, 0.01); - menu_edit_type(float, float51, ftostr51sign, 10); - menu_edit_type(float, float52, ftostr52sign, 100); - menu_edit_type(unsigned long, long5, ftostr5rj, 0.01); - - /** - * - * Handlers for RepRap World Keypad input - * - */ - #if ENABLED(REPRAPWORLD_KEYPAD) - static void _reprapworld_keypad_move(AxisEnum axis, int dir) { - move_menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - encoderPosition = dir; - switch (axis) { - case X_AXIS: lcd_move_x(); break; - case Y_AXIS: lcd_move_y(); break; - case Z_AXIS: lcd_move_z(); - } - } - static void reprapworld_keypad_move_z_up() { _reprapworld_keypad_move(Z_AXIS, 1); } - static void reprapworld_keypad_move_z_down() { _reprapworld_keypad_move(Z_AXIS, -1); } - static void reprapworld_keypad_move_x_left() { _reprapworld_keypad_move(X_AXIS, -1); } - static void reprapworld_keypad_move_x_right() { _reprapworld_keypad_move(X_AXIS, 1); } - static void reprapworld_keypad_move_y_up() { _reprapworld_keypad_move(Y_AXIS, -1); } - static void reprapworld_keypad_move_y_down() { _reprapworld_keypad_move(Y_AXIS, 1); } - static void reprapworld_keypad_move_home() { enqueue_and_echo_commands_P(PSTR("G28")); } // move all axes home and wait - static void reprapworld_keypad_move_menu() { lcd_goto_screen(lcd_move_menu); } - #endif // REPRAPWORLD_KEYPAD - - /** - * - * Audio feedback for controller clicks - * - */ - void lcd_buzz(long duration, uint16_t freq) { - #if ENABLED(LCD_USE_I2C_BUZZER) - lcd.buzz(duration, freq); - #elif PIN_EXISTS(BEEPER) - buzzer.tone(duration, freq); - #endif - } - - void lcd_quick_feedback() { - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; - next_button_update_ms = millis() + 500; - - // Buzz and wait. The delay is needed for buttons to settle! - lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); - #if ENABLED(LCD_USE_I2C_BUZZER) - delay(10); - #elif PIN_EXISTS(BEEPER) - for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } - #endif - } - - /** - * - * Menu actions - * - */ - static void menu_action_back() { lcd_goto_previous_menu(); } - static void menu_action_submenu(screenFunc_t func) { lcd_save_previous_menu(); lcd_goto_screen(func); } - static void menu_action_gcode(const char* pgcode) { enqueue_and_echo_commands_P(pgcode); } - static void menu_action_function(screenFunc_t func) { (*func)(); } - - #if ENABLED(SDSUPPORT) - - static void menu_action_sdfile(const char* filename, char* longFilename) { - UNUSED(longFilename); - card.openAndPrintFile(filename); - lcd_return_to_status(); - } - - static void menu_action_sddirectory(const char* filename, char* longFilename) { - UNUSED(longFilename); - card.chdir(filename); - encoderPosition = 0; - } - - #endif //SDSUPPORT - - static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr = !(*ptr); } - static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) { - menu_action_setting_edit_bool(pstr, ptr); - (*callback)(); - } - -#endif //ULTIPANEL - -/** LCD API **/ -void lcd_init() { - - lcd_implementation_init(); - - #if ENABLED(NEWPANEL) - #if BUTTON_EXISTS(EN1) - SET_INPUT(BTN_EN1); - WRITE(BTN_EN1, HIGH); - #endif - - #if BUTTON_EXISTS(EN2) - SET_INPUT(BTN_EN2); - WRITE(BTN_EN2, HIGH); - #endif - - #if BUTTON_EXISTS(ENC) - SET_INPUT(BTN_ENC); - WRITE(BTN_ENC, HIGH); - #endif - - #if ENABLED(REPRAPWORLD_KEYPAD) - pinMode(SHIFT_CLK, OUTPUT); - pinMode(SHIFT_LD, OUTPUT); - pinMode(SHIFT_OUT, INPUT); - WRITE(SHIFT_OUT, HIGH); - WRITE(SHIFT_LD, HIGH); - #endif - - #if BUTTON_EXISTS(UP) - SET_INPUT(BTN_UP); - #endif - #if BUTTON_EXISTS(DWN) - SET_INPUT(BTN_DWN); - #endif - #if BUTTON_EXISTS(LFT) - SET_INPUT(BTN_LFT); - #endif - #if BUTTON_EXISTS(RT) - SET_INPUT(BTN_RT); - #endif - - #else // !NEWPANEL - - #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register - pinMode(SR_DATA_PIN, OUTPUT); - pinMode(SR_CLK_PIN, OUTPUT); - #elif defined(SHIFT_CLK) - pinMode(SHIFT_CLK, OUTPUT); - pinMode(SHIFT_LD, OUTPUT); - pinMode(SHIFT_EN, OUTPUT); - pinMode(SHIFT_OUT, INPUT); - WRITE(SHIFT_OUT, HIGH); - WRITE(SHIFT_LD, HIGH); - WRITE(SHIFT_EN, LOW); - #endif // SR_LCD_2W_NL - - #endif // !NEWPANEL - - #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) - SET_INPUT(SD_DETECT_PIN); - WRITE(SD_DETECT_PIN, HIGH); - lcd_sd_status = 2; // UNKNOWN - #endif - - #if ENABLED(LCD_HAS_SLOW_BUTTONS) - slow_buttons = 0; - #endif - - lcd_buttons_update(); - - #if ENABLED(ULTIPANEL) - encoderDiff = 0; - #endif -} - -int lcd_strlen(const char* s) { - int i = 0, j = 0; - while (s[i]) { - #if ENABLED(MAPPER_NON) - j++; - #else - if ((s[i] & 0xC0u) != 0x80u) j++; - #endif - i++; - } - return j; -} - -int lcd_strlen_P(const char* s) { - int j = 0; - while (pgm_read_byte(s)) { - #if ENABLED(MAPPER_NON) - j++; - #else - if ((pgm_read_byte(s) & 0xC0u) != 0x80u) j++; - #endif - s++; - } - return j; -} - -bool lcd_blink() { - static uint8_t blink = 0; - static millis_t next_blink_ms = 0; - millis_t ms = millis(); - if (ELAPSED(ms, next_blink_ms)) { - blink ^= 0xFF; - next_blink_ms = ms + 1000 - LCD_UPDATE_INTERVAL / 2; - } - return blink != 0; -} - -/** - * Update the LCD, read encoder buttons, etc. - * - Read button states - * - Check the SD Card slot state - * - Act on RepRap World keypad input - * - Update the encoder position - * - Apply acceleration to the encoder position - * - Set lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NOW on controller events - * - Reset the Info Screen timeout if there's any input - * - Update status indicators, if any - * - * Run the current LCD menu handler callback function: - * - Call the handler only if lcdDrawUpdate != LCDVIEW_NONE - * - Before calling the handler, LCDVIEW_CALL_NO_REDRAW => LCDVIEW_NONE - * - Call the menu handler. Menu handlers should do the following: - * - If a value changes, set lcdDrawUpdate to LCDVIEW_REDRAW_NOW and draw the value - * (Encoder events automatically set lcdDrawUpdate for you.) - * - if (lcdDrawUpdate) { redraw } - * - Before exiting the handler set lcdDrawUpdate to: - * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. - * - LCDVIEW_REDRAW_NOW or LCDVIEW_NONE to keep drawingm but only in this loop. - * - LCDVIEW_REDRAW_NEXT to keep drawing and draw on the next loop also. - * - LCDVIEW_CALL_NO_REDRAW to keep drawing (or start drawing) with no redraw on the next loop. - * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, - * so don't change lcdDrawUpdate without considering this. - * - * After the menu handler callback runs (or not): - * - Clear the LCD if lcdDrawUpdate == LCDVIEW_CLEAR_CALL_REDRAW - * - Update lcdDrawUpdate for the next loop (i.e., move one state down, usually) - * - * No worries. This function is only called from the main thread. - */ -void lcd_update() { - - #if ENABLED(ULTIPANEL) - static millis_t return_to_status_ms = 0; - manage_manual_move(); - #endif - - lcd_buttons_update(); - - #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) - - bool sd_status = IS_SD_INSERTED; - if (sd_status != lcd_sd_status && lcd_detected()) { - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; - lcd_implementation_init( // to maybe revive the LCD if static electricity killed it. - #if ENABLED(LCD_PROGRESS_BAR) && ENABLED(ULTIPANEL) - currentScreen == lcd_status_screen - #endif - ); - - if (sd_status) { - card.initsd(); - if (lcd_sd_status != 2) LCD_MESSAGEPGM(MSG_SD_INSERTED); - } - else { - card.release(); - if (lcd_sd_status != 2) LCD_MESSAGEPGM(MSG_SD_REMOVED); - } - - lcd_sd_status = sd_status; - } - - #endif //SDSUPPORT && SD_DETECT_PIN - - millis_t ms = millis(); - if (ELAPSED(ms, next_lcd_update_ms)) { - - next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; - - #if ENABLED(LCD_HAS_STATUS_INDICATORS) - lcd_implementation_update_indicators(); - #endif - - #if ENABLED(LCD_HAS_SLOW_BUTTONS) - slow_buttons = lcd_implementation_read_slow_buttons(); // buttons which take too long to read in interrupt context - #endif - - #if ENABLED(ULTIPANEL) - - #if ENABLED(REPRAPWORLD_KEYPAD) - - static uint8_t keypad_debounce = 0; - - if (!REPRAPWORLD_KEYPAD_PRESSED) { - if (keypad_debounce > 0) keypad_debounce--; - } - else if (!keypad_debounce) { - keypad_debounce = 2; - - if (REPRAPWORLD_KEYPAD_MOVE_MENU) reprapworld_keypad_move_menu(); - - #if DISABLED(DELTA) && Z_HOME_DIR == -1 - if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); - #endif - - if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) { - #if ENABLED(DELTA) || Z_HOME_DIR != -1 - if (REPRAPWORLD_KEYPAD_MOVE_Z_UP) reprapworld_keypad_move_z_up(); - #endif - if (REPRAPWORLD_KEYPAD_MOVE_Z_DOWN) reprapworld_keypad_move_z_down(); - if (REPRAPWORLD_KEYPAD_MOVE_X_LEFT) reprapworld_keypad_move_x_left(); - if (REPRAPWORLD_KEYPAD_MOVE_X_RIGHT) reprapworld_keypad_move_x_right(); - if (REPRAPWORLD_KEYPAD_MOVE_Y_DOWN) reprapworld_keypad_move_y_down(); - if (REPRAPWORLD_KEYPAD_MOVE_Y_UP) reprapworld_keypad_move_y_up(); - } - else { - if (REPRAPWORLD_KEYPAD_MOVE_HOME) reprapworld_keypad_move_home(); - } - } - #endif // REPRAPWORLD_KEYPAD - - bool encoderPastThreshold = (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP); - if (encoderPastThreshold || LCD_CLICKED) { - if (encoderPastThreshold) { - int32_t encoderMultiplier = 1; - - #if ENABLED(ENCODER_RATE_MULTIPLIER) - - if (encoderRateMultiplierEnabled) { - int32_t encoderMovementSteps = abs(encoderDiff) / ENCODER_PULSES_PER_STEP; - - if (lastEncoderMovementMillis != 0) { - // Note that the rate is always calculated between to passes through the - // loop and that the abs of the encoderDiff value is tracked. - float encoderStepRate = (float)(encoderMovementSteps) / ((float)(ms - lastEncoderMovementMillis)) * 1000.0; - - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - - #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START; - SERIAL_ECHOPAIR("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPAIR(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL; - #endif //ENCODER_RATE_MULTIPLIER_DEBUG - } - - lastEncoderMovementMillis = ms; - } // encoderRateMultiplierEnabled - #endif //ENCODER_RATE_MULTIPLIER - - encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP; - encoderDiff = 0; - } - return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - } - #endif // ULTIPANEL - - // We arrive here every ~100ms when idling often enough. - // Instead of tracking the changes simply redraw the Info Screen ~1 time a second. - static int8_t lcd_status_update_delay = 1; // first update one loop delayed - if ( - #if ENABLED(ULTIPANEL) - currentScreen == lcd_status_screen && - #endif - !lcd_status_update_delay--) { - lcd_status_update_delay = 9; - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - } - - if (lcdDrawUpdate) { - - switch (lcdDrawUpdate) { - case LCDVIEW_CALL_NO_REDRAW: - lcdDrawUpdate = LCDVIEW_NONE; - break; - case LCDVIEW_CLEAR_CALL_REDRAW: // set by handlers, then altered after (rarely occurs here) - case LCDVIEW_CALL_REDRAW_NEXT: // set by handlers, then altered after (never occurs here?) - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT - case LCDVIEW_NONE: - break; - } - - #if ENABLED(DOGLCD) // Changes due to different driver architecture of the DOGM display - static int8_t dot_color = 0; - dot_color = 1 - dot_color; - u8g.firstPage(); - do { - lcd_setFont(FONT_MENU); - u8g.setPrintPos(125, 0); - u8g.setColorIndex(dot_color); // Set color for the alive dot - u8g.drawPixel(127, 63); // draw alive dot - u8g.setColorIndex(1); // black on white - (*currentScreen)(); - } while (u8g.nextPage()); - #elif ENABLED(ULTIPANEL) - (*currentScreen)(); - #else - lcd_status_screen(); - #endif - } - - #if ENABLED(ULTIPANEL) - - // Return to Status Screen after a timeout - if (currentScreen == lcd_status_screen || defer_return_to_status) - return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; - else if (ELAPSED(ms, return_to_status_ms)) - lcd_return_to_status(); - - #endif // ULTIPANEL - - switch (lcdDrawUpdate) { - case LCDVIEW_CLEAR_CALL_REDRAW: - lcd_implementation_clear(); - case LCDVIEW_CALL_REDRAW_NEXT: - lcdDrawUpdate = LCDVIEW_REDRAW_NOW; - break; - case LCDVIEW_REDRAW_NOW: - lcdDrawUpdate = LCDVIEW_NONE; - break; - case LCDVIEW_NONE: - break; - } - - } -} - -void set_utf_strlen(char* s, uint8_t n) { - uint8_t i = 0, j = 0; - while (s[i] && (j < n)) { - #if ENABLED(MAPPER_NON) - j++; - #else - if ((s[i] & 0xC0u) != 0x80u) j++; - #endif - i++; - } - while (j++ < n) s[i++] = ' '; - s[i] = '\0'; -} - -void lcd_finishstatus(bool persist=false) { - set_utf_strlen(lcd_status_message, LCD_WIDTH); - #if !(ENABLED(LCD_PROGRESS_BAR) && (PROGRESS_MSG_EXPIRE > 0)) - UNUSED(persist); - #endif - - #if ENABLED(LCD_PROGRESS_BAR) - progress_bar_ms = millis(); - #if PROGRESS_MSG_EXPIRE > 0 - expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE; - #endif - #endif - lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; - - #if ENABLED(FILAMENT_LCD_DISPLAY) - previous_lcd_status_ms = millis(); //get status message to show up for a while - #endif -} - -#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0 - void dontExpireStatus() { expire_status_ms = 0; } -#endif - -bool lcd_hasstatus() { return (lcd_status_message[0] != '\0'); } - -void lcd_setstatus(const char* message, bool persist) { - if (lcd_status_message_level > 0) return; - strncpy(lcd_status_message, message, 3 * (LCD_WIDTH)); - lcd_finishstatus(persist); -} - -void lcd_setstatuspgm(const char* message, uint8_t level) { - if (level < lcd_status_message_level) return; - lcd_status_message_level = level; - strncpy_P(lcd_status_message, message, 3 * (LCD_WIDTH)); - lcd_finishstatus(level > 0); -} - -void lcd_setalertstatuspgm(const char* message) { - lcd_setstatuspgm(message, 1); - #if ENABLED(ULTIPANEL) - lcd_return_to_status(); - #endif -} - -void lcd_reset_alert_level() { lcd_status_message_level = 0; } - -#if HAS_LCD_CONTRAST - void set_lcd_contrast(int value) { - lcd_contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); - u8g.setContrast(lcd_contrast); - } -#endif - -#if ENABLED(ULTIPANEL) - - /** - * Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement) - * These values are independent of which pins are used for EN_A and EN_B indications - * The rotary encoder part is also independent to the chipset used for the LCD - */ - #if defined(EN_A) && defined(EN_B) - #define encrot0 0 - #define encrot1 2 - #define encrot2 3 - #define encrot3 1 - #endif - - #define GET_BUTTON_STATES(DST) \ - uint8_t new_##DST = 0; \ - WRITE(SHIFT_LD, LOW); \ - WRITE(SHIFT_LD, HIGH); \ - for (int8_t i = 0; i < 8; i++) { \ - new_##DST >>= 1; \ - if (READ(SHIFT_OUT)) SBI(new_##DST, 7); \ - WRITE(SHIFT_CLK, HIGH); \ - WRITE(SHIFT_CLK, LOW); \ - } \ - DST = ~new_##DST; //invert it, because a pressed switch produces a logical 0 - - - /** - * Read encoder buttons from the hardware registers - * Warning: This function is called from interrupt context! - */ - void lcd_buttons_update() { - #if ENABLED(NEWPANEL) - uint8_t newbutton = 0; - #if BUTTON_EXISTS(EN1) - if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; - #endif - #if BUTTON_EXISTS(EN2) - if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; - #endif - #if LCD_HAS_DIRECTIONAL_BUTTONS || BUTTON_EXISTS(ENC) - millis_t now = millis(); - #endif - - #if LCD_HAS_DIRECTIONAL_BUTTONS - if (ELAPSED(now, next_button_update_ms)) { - if (false) { - // for the else-ifs below - } - #if BUTTON_EXISTS(UP) - else if (BUTTON_PRESSED(UP)) { - encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM); - next_button_update_ms = now + 300; - } - #endif - #if BUTTON_EXISTS(DWN) - else if (BUTTON_PRESSED(DWN)) { - encoderDiff = ENCODER_STEPS_PER_MENU_ITEM; - next_button_update_ms = now + 300; - } - #endif - #if BUTTON_EXISTS(LFT) - else if (BUTTON_PRESSED(LFT)) { - encoderDiff = -(ENCODER_PULSES_PER_STEP); - next_button_update_ms = now + 300; - } - #endif - #if BUTTON_EXISTS(RT) - else if (BUTTON_PRESSED(RT)) { - encoderDiff = ENCODER_PULSES_PER_STEP; - next_button_update_ms = now + 300; - } - #endif - } - #endif - - #if BUTTON_EXISTS(ENC) - if (ELAPSED(now, next_button_update_ms) && BUTTON_PRESSED(ENC)) newbutton |= EN_C; - #endif - - buttons = newbutton; - #if ENABLED(LCD_HAS_SLOW_BUTTONS) - buttons |= slow_buttons; - #endif - #if ENABLED(REPRAPWORLD_KEYPAD) - GET_BUTTON_STATES(buttons_reprapworld_keypad); - #endif - #else - GET_BUTTON_STATES(buttons); - #endif //!NEWPANEL - - // Manage encoder rotation - #if ENABLED(REVERSE_MENU_DIRECTION) && ENABLED(REVERSE_ENCODER_DIRECTION) - #define ENCODER_DIFF_CW (encoderDiff -= encoderDirection) - #define ENCODER_DIFF_CCW (encoderDiff += encoderDirection) - #elif ENABLED(REVERSE_MENU_DIRECTION) - #define ENCODER_DIFF_CW (encoderDiff += encoderDirection) - #define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection) - #elif ENABLED(REVERSE_ENCODER_DIRECTION) - #define ENCODER_DIFF_CW (encoderDiff--) - #define ENCODER_DIFF_CCW (encoderDiff++) - #else - #define ENCODER_DIFF_CW (encoderDiff++) - #define ENCODER_DIFF_CCW (encoderDiff--) - #endif - #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: ENCODER_DIFF_CW; break; case _E2: ENCODER_DIFF_CCW; } - - uint8_t enc = 0; - if (buttons & EN_A) enc |= B01; - if (buttons & EN_B) enc |= B10; - if (enc != lastEncoderBits) { - switch (enc) { - case encrot0: ENCODER_SPIN(encrot3, encrot1); break; - case encrot1: ENCODER_SPIN(encrot0, encrot2); break; - case encrot2: ENCODER_SPIN(encrot1, encrot3); break; - case encrot3: ENCODER_SPIN(encrot2, encrot0); break; - } - } - lastEncoderBits = enc; - } - - bool lcd_detected(void) { - #if (ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)) && ENABLED(DETECT_DEVICE) - return lcd.LcdDetected() == 1; - #else - return true; - #endif - } - - bool lcd_clicked() { return LCD_CLICKED; } - -#endif // ULTIPANEL - -/*********************************/ -/** Number to string conversion **/ -/*********************************/ - -#define DIGIT(n) ('0' + (n)) -#define DIGIMOD(n) DIGIT((n) % 10) - -char conv[8]; - -// Convert float to rj string with 123 or -12 format -char *ftostr3(const float& x) { return itostr3((int)x); } - -// Convert float to rj string with _123, -123, _-12, or __-1 format -char *ftostr4sign(const float& x) { return itostr4sign((int)x); } - -// Convert unsigned int to string with 12 format -char* itostr2(const uint8_t& x) { - int xx = x; - conv[0] = DIGIMOD(xx / 10); - conv[1] = DIGIMOD(xx); - conv[2] = '\0'; - return conv; -} - -// Convert float to string with +123.4 / -123.4 format -char* ftostr41sign(const float& x) { - int xx = int(abs(x * 10)) % 10000; - conv[0] = x >= 0 ? '+' : '-'; - conv[1] = DIGIMOD(xx / 1000); - conv[2] = DIGIMOD(xx / 100); - conv[3] = DIGIMOD(xx / 10); - conv[4] = '.'; - conv[5] = DIGIMOD(xx); - conv[6] = '\0'; - return conv; -} - -// Convert signed float to string with 023.45 / -23.45 format -char *ftostr32(const float& x) { - long xx = abs(x * 100); - conv[0] = x >= 0 ? DIGIMOD(xx / 10000) : '-'; - conv[1] = DIGIMOD(xx / 1000); - conv[2] = DIGIMOD(xx / 100); - conv[3] = '.'; - conv[4] = DIGIMOD(xx / 10); - conv[5] = DIGIMOD(xx); - conv[6] = '\0'; - return conv; -} - -// Convert signed float to string (6 digit) with -1.234 / _0.000 / +1.234 format -char* ftostr43sign(const float& x, char plus/*=' '*/) { - long xx = x * 1000; - if (xx == 0) - conv[0] = ' '; - else if (xx > 0) - conv[0] = plus; - else { - xx = -xx; - conv[0] = '-'; - } - conv[1] = DIGIMOD(xx / 1000); - conv[2] = '.'; - conv[3] = DIGIMOD(xx / 100); - conv[4] = DIGIMOD(xx / 10); - conv[5] = DIGIMOD(xx); - conv[6] = '\0'; - return conv; -} - -// Convert unsigned float to string with 1.23 format -char* ftostr12ns(const float& x) { - long xx = x * 100; - xx = abs(xx); - conv[0] = DIGIMOD(xx / 100); - conv[1] = '.'; - conv[2] = DIGIMOD(xx / 10); - conv[3] = DIGIMOD(xx); - conv[4] = '\0'; - return conv; -} - -// Convert signed int to lj string with +012 / -012 format -char* itostr3sign(const int& x) { - int xx; - if (x >= 0) { - conv[0] = '+'; - xx = x; - } - else { - conv[0] = '-'; - xx = -x; - } - conv[1] = DIGIMOD(xx / 100); - conv[2] = DIGIMOD(xx / 10); - conv[3] = DIGIMOD(xx); - conv[4] = '.'; - conv[5] = '0'; - conv[6] = '\0'; - return conv; -} - -// Convert signed int to rj string with 123 or -12 format -char* itostr3(const int& x) { - int xx = x; - if (xx < 0) { - conv[0] = '-'; - xx = -xx; - } - else - conv[0] = xx >= 100 ? DIGIMOD(xx / 100) : ' '; - - conv[1] = xx >= 10 ? DIGIMOD(xx / 10) : ' '; - conv[2] = DIGIMOD(xx); - conv[3] = '\0'; - return conv; -} - -// Convert unsigned int to lj string with 123 format -char* itostr3left(const int& xx) { - if (xx >= 100) { - conv[0] = DIGIMOD(xx / 100); - conv[1] = DIGIMOD(xx / 10); - conv[2] = DIGIMOD(xx); - conv[3] = '\0'; - } - else if (xx >= 10) { - conv[0] = DIGIMOD(xx / 10); - conv[1] = DIGIMOD(xx); - conv[2] = '\0'; - } - else { - conv[0] = DIGIMOD(xx); - conv[1] = '\0'; - } - return conv; -} - -// Convert signed int to rj string with _123, -123, _-12, or __-1 format -char *itostr4sign(const int& x) { - int xx = abs(x); - int sign = 0; - if (xx >= 100) { - conv[1] = DIGIMOD(xx / 100); - conv[2] = DIGIMOD(xx / 10); - } - else if (xx >= 10) { - conv[0] = ' '; - sign = 1; - conv[2] = DIGIMOD(xx / 10); - } - else { - conv[0] = ' '; - conv[1] = ' '; - sign = 2; - } - conv[sign] = x < 0 ? '-' : ' '; - conv[3] = DIGIMOD(xx); - conv[4] = '\0'; - return conv; -} - -// Convert unsigned float to rj string with 12345 format -char* ftostr5rj(const float& x) { - long xx = abs(x); - conv[0] = xx >= 10000 ? DIGIMOD(xx / 10000) : ' '; - conv[1] = xx >= 1000 ? DIGIMOD(xx / 1000) : ' '; - conv[2] = xx >= 100 ? DIGIMOD(xx / 100) : ' '; - conv[3] = xx >= 10 ? DIGIMOD(xx / 10) : ' '; - conv[4] = DIGIMOD(xx); - conv[5] = '\0'; - return conv; -} - -// Convert signed float to string with +1234.5 format -char* ftostr51sign(const float& x) { - long xx = abs(x * 10); - conv[0] = (x >= 0) ? '+' : '-'; - conv[1] = DIGIMOD(xx / 10000); - conv[2] = DIGIMOD(xx / 1000); - conv[3] = DIGIMOD(xx / 100); - conv[4] = DIGIMOD(xx / 10); - conv[5] = '.'; - conv[6] = DIGIMOD(xx); - conv[7] = '\0'; - return conv; -} - -// Convert signed float to string with +123.45 format -char* ftostr52sign(const float& x) { - long xx = abs(x * 100); - conv[0] = (x >= 0) ? '+' : '-'; - conv[1] = DIGIMOD(xx / 10000); - conv[2] = DIGIMOD(xx / 1000); - conv[3] = DIGIMOD(xx / 100); - conv[4] = '.'; - conv[5] = DIGIMOD(xx / 10); - conv[6] = DIGIMOD(xx); - conv[7] = '\0'; - return conv; -} - -// Convert signed float to space-padded string with -_23.4_ format -char* ftostr52sp(const float& x) { - long xx = x * 100; - uint8_t dig; - if (xx < 0) { // negative val = -_0 - xx = -xx; - conv[0] = '-'; - dig = (xx / 1000) % 10; - conv[1] = dig ? DIGIT(dig) : ' '; - } - else { // positive val = __0 - dig = (xx / 10000) % 10; - if (dig) { - conv[0] = DIGIT(dig); - conv[1] = DIGIMOD(xx / 1000); - } - else { - conv[0] = ' '; - dig = (xx / 1000) % 10; - conv[1] = dig ? DIGIT(dig) : ' '; - } - } - - conv[2] = DIGIMOD(xx / 100); // lsd always - - dig = xx % 10; - if (dig) { // 2 decimal places - conv[5] = DIGIT(dig); - conv[4] = DIGIMOD(xx / 10); - conv[3] = '.'; - } - else { // 1 or 0 decimal place - dig = (xx / 10) % 10; - if (dig) { - conv[4] = DIGIT(dig); - conv[3] = '.'; - } - else { - conv[3] = conv[4] = ' '; - } - conv[5] = ' '; - } - conv[6] = '\0'; - return conv; -} - -#endif // ULTRA_LCD diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h deleted file mode 100644 index 4cc8334..0000000 --- a/Marlin/ultralcd.h +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef ULTRALCD_H -#define ULTRALCD_H - -#include "Marlin.h" - -#if ENABLED(ULTRA_LCD) - - #define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0) - #define BUTTON_PRESSED(BN) !READ(BTN_## BN) - - int lcd_strlen(const char* s); - int lcd_strlen_P(const char* s); - void lcd_update(); - void lcd_init(); - bool lcd_hasstatus(); - void lcd_setstatus(const char* message, const bool persist=false); - void lcd_setstatuspgm(const char* message, const uint8_t level=0); - void lcd_setalertstatuspgm(const char* message); - void lcd_reset_alert_level(); - bool lcd_detected(void); - void lcd_kill_screen(); - void kill_screen(const char* lcd_msg); - - #if HAS_BUZZER - void lcd_buzz(long duration, uint16_t freq); - #endif - - #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0 - void dontExpireStatus(); - #endif - - #if ENABLED(DOGLCD) - extern int lcd_contrast; - void set_lcd_contrast(int value); - #elif ENABLED(SHOW_BOOTSCREEN) - void bootscreen(); - #endif - - #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x)) - #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x)) - - #define LCD_UPDATE_INTERVAL 100 - #define LCD_TIMEOUT_TO_STATUS 15000 - - #if ENABLED(ULTIPANEL) - extern volatile uint8_t buttons; //the last checked buttons in a bit array. - void lcd_buttons_update(); - void lcd_quick_feedback(); // Audible feedback for a button click - could also be visual - bool lcd_clicked(); - void lcd_ignore_click(bool b=true); - - #if ENABLED(FILAMENT_CHANGE_FEATURE) - void lcd_filament_change_show_message(FilamentChangeMessage message); - #endif // FILAMENT_CHANGE_FEATURE - - #else - FORCE_INLINE void lcd_buttons_update() {} - #endif - - extern int preheatHotendTemp1; - extern int preheatBedTemp1; - extern int preheatFanSpeed1; - extern int preheatHotendTemp2; - extern int preheatBedTemp2; - extern int preheatFanSpeed2; - - #if ENABLED(FILAMENT_LCD_DISPLAY) - extern millis_t previous_lcd_status_ms; - #endif - - bool lcd_blink(); - - #if ENABLED(ULTIPANEL) - #define BLEN_A 0 - #define BLEN_B 1 - // Encoder click is directly connected - #if BUTTON_EXISTS(ENC) - #define BLEN_C 2 - #define EN_C (_BV(BLEN_C)) - #endif - #define EN_A (_BV(BLEN_A)) - #define EN_B (_BV(BLEN_B)) - #define EN_C (_BV(BLEN_C)) - #endif - - #if ENABLED(REPRAPWORLD_KEYPAD) // is also ULTIPANEL and NEWPANEL - - #define REPRAPWORLD_BTN_OFFSET 0 // bit offset into buttons for shift register values - - #define BLEN_REPRAPWORLD_KEYPAD_F3 0 - #define BLEN_REPRAPWORLD_KEYPAD_F2 1 - #define BLEN_REPRAPWORLD_KEYPAD_F1 2 - #define BLEN_REPRAPWORLD_KEYPAD_DOWN 3 - #define BLEN_REPRAPWORLD_KEYPAD_RIGHT 4 - #define BLEN_REPRAPWORLD_KEYPAD_MIDDLE 5 - #define BLEN_REPRAPWORLD_KEYPAD_UP 6 - #define BLEN_REPRAPWORLD_KEYPAD_LEFT 7 - - #define EN_REPRAPWORLD_KEYPAD_F3 (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_F3)) - #define EN_REPRAPWORLD_KEYPAD_F2 (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_F2)) - #define EN_REPRAPWORLD_KEYPAD_F1 (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_F1)) - #define EN_REPRAPWORLD_KEYPAD_DOWN (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_DOWN)) - #define EN_REPRAPWORLD_KEYPAD_RIGHT (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_RIGHT)) - #define EN_REPRAPWORLD_KEYPAD_MIDDLE (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_MIDDLE)) - #define EN_REPRAPWORLD_KEYPAD_UP (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_UP)) - #define EN_REPRAPWORLD_KEYPAD_LEFT (_BV(REPRAPWORLD_BTN_OFFSET + BLEN_REPRAPWORLD_KEYPAD_LEFT)) - - #define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F3) - #define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F2) - #define REPRAPWORLD_KEYPAD_MOVE_MENU (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F1) - #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN) - #define REPRAPWORLD_KEYPAD_MOVE_X_RIGHT (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT) - #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_MIDDLE) - #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_UP) - #define REPRAPWORLD_KEYPAD_MOVE_X_LEFT (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_LEFT) - - #define REPRAPWORLD_KEYPAD_PRESSED (buttons_reprapworld_keypad & ( \ - EN_REPRAPWORLD_KEYPAD_F3 | \ - EN_REPRAPWORLD_KEYPAD_F2 | \ - EN_REPRAPWORLD_KEYPAD_F1 | \ - EN_REPRAPWORLD_KEYPAD_DOWN | \ - EN_REPRAPWORLD_KEYPAD_RIGHT | \ - EN_REPRAPWORLD_KEYPAD_MIDDLE | \ - EN_REPRAPWORLD_KEYPAD_UP | \ - EN_REPRAPWORLD_KEYPAD_LEFT) \ - ) - - #define LCD_CLICKED ((buttons & EN_C) || (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_F1)) - #elif ENABLED(NEWPANEL) - #define LCD_CLICKED (buttons & EN_C) - #endif - -#else //no LCD - FORCE_INLINE void lcd_update() {} - FORCE_INLINE void lcd_init() {} - FORCE_INLINE bool lcd_hasstatus() { return false; } - FORCE_INLINE void lcd_setstatus(const char* message, const bool persist=false) {UNUSED(message); UNUSED(persist);} - FORCE_INLINE void lcd_setstatuspgm(const char* message, const uint8_t level=0) {UNUSED(message); UNUSED(level);} - FORCE_INLINE void lcd_buttons_update() {} - FORCE_INLINE void lcd_reset_alert_level() {} - FORCE_INLINE bool lcd_detected(void) { return true; } - - #define LCD_MESSAGEPGM(x) NOOP - #define LCD_ALERTMESSAGEPGM(x) NOOP - -#endif //ULTRA_LCD - -char* itostr2(const uint8_t& x); -char* itostr3sign(const int& x); -char* itostr3(const int& x); -char* itostr3left(const int& x); -char* itostr4sign(const int& x); - -char* ftostr3(const float& x); -char* ftostr4sign(const float& x); -char* ftostr41sign(const float& x); -char* ftostr32(const float& x); -char* ftostr43sign(const float& x, char plus=' '); -char* ftostr12ns(const float& x); -char* ftostr5rj(const float& x); -char* ftostr51sign(const float& x); -char* ftostr52sign(const float& x); -char* ftostr52sp(const float& x); // remove zero-padding from ftostr32 - -#endif //ULTRALCD_H diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h deleted file mode 100644 index f8ffd4d..0000000 --- a/Marlin/ultralcd_impl_DOGM.h +++ /dev/null @@ -1,634 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * ultralcd_impl_DOGM.h - * - * Graphics LCD implementation for 128x64 pixel LCDs by STB for ErikZalm/Marlin - * Demonstrator: http://www.reprap.org/wiki/STB_Electronics - * License: http://opensource.org/licenses/BSD-3-Clause - * - * With the use of: - * u8glib by Oliver Kraus - * https://github.com/olikraus/U8glib_Arduino - * License: http://opensource.org/licenses/BSD-3-Clause - */ - -#ifndef ULTRALCD_IMPL_DOGM_H -#define ULTRALCD_IMPL_DOGM_H - -#include "MarlinConfig.h" - -/** - * Implementation of the LCD display routines for a DOGM128 graphic display. - * These are common LCD 128x64 pixel graphic displays. - */ -#include "ultralcd.h" -#include "ultralcd_st7920_u8glib_rrd.h" -#include "dogm_bitmaps.h" -#include "duration_t.h" - -#include - -#if ENABLED(SHOW_BOOTSCREEN) && ENABLED(SHOW_CUSTOM_BOOTSCREEN) - #include "_Bootscreen.h" -#endif - -#if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT) - #undef USE_BIG_EDIT_FONT -#endif - -#if ENABLED(USE_SMALL_INFOFONT) - #include "dogm_font_data_6x9_marlin.h" - #define FONT_STATUSMENU_NAME u8g_font_6x9 -#else - #define FONT_STATUSMENU_NAME FONT_MENU_NAME -#endif - -#include "dogm_font_data_Marlin_symbols.h" // The Marlin special symbols -#define FONT_SPECIAL_NAME Marlin_symbols - -#if DISABLED(SIMULATE_ROMFONT) - #if ENABLED(DISPLAY_CHARSET_ISO10646_1) - #include "dogm_font_data_ISO10646_1.h" - #define FONT_MENU_NAME ISO10646_1_5x7 - #elif ENABLED(DISPLAY_CHARSET_ISO10646_5) - #include "dogm_font_data_ISO10646_5_Cyrillic.h" - #define FONT_MENU_NAME ISO10646_5_Cyrillic_5x7 - #elif ENABLED(DISPLAY_CHARSET_ISO10646_KANA) - #include "dogm_font_data_ISO10646_Kana.h" - #define FONT_MENU_NAME ISO10646_Kana_5x7 - #elif ENABLED(DISPLAY_CHARSET_ISO10646_GREEK) - #include "dogm_font_data_ISO10646_Greek.h" - #define FONT_MENU_NAME ISO10646_Greek_5x7 - #elif ENABLED(DISPLAY_CHARSET_ISO10646_CN) - #include "dogm_font_data_ISO10646_CN.h" - #define FONT_MENU_NAME ISO10646_CN - #define TALL_FONT_CORRECTION 1 - #else // fall-back - #include "dogm_font_data_ISO10646_1.h" - #define FONT_MENU_NAME ISO10646_1_5x7 - #endif -#else // SIMULATE_ROMFONT - #if DISPLAY_CHARSET_HD44780 == JAPANESE - #include "dogm_font_data_HD44780_J.h" - #define FONT_MENU_NAME HD44780_J_5x7 - #elif DISPLAY_CHARSET_HD44780 == WESTERN - #include "dogm_font_data_HD44780_W.h" - #define FONT_MENU_NAME HD44780_W_5x7 - #elif DISPLAY_CHARSET_HD44780 == CYRILLIC - #include "dogm_font_data_HD44780_C.h" - #define FONT_MENU_NAME HD44780_C_5x7 - #else // fall-back - #include "dogm_font_data_ISO10646_1.h" - #define FONT_MENU_NAME ISO10646_1_5x7 - #endif -#endif // SIMULATE_ROMFONT - -//#define FONT_STATUSMENU_NAME FONT_MENU_NAME - -#define FONT_STATUSMENU 1 -#define FONT_SPECIAL 2 -#define FONT_MENU_EDIT 3 -#define FONT_MENU 4 - -// DOGM parameters (size in pixels) -#define DOG_CHAR_WIDTH 6 -#define DOG_CHAR_HEIGHT 12 -#if ENABLED(USE_BIG_EDIT_FONT) - #define FONT_MENU_EDIT_NAME u8g_font_9x18 - #define DOG_CHAR_WIDTH_EDIT 9 - #define DOG_CHAR_HEIGHT_EDIT 18 - #define LCD_WIDTH_EDIT 14 -#else - #define FONT_MENU_EDIT_NAME FONT_MENU_NAME - #define DOG_CHAR_WIDTH_EDIT 6 - #define DOG_CHAR_HEIGHT_EDIT 12 - #define LCD_WIDTH_EDIT 22 -#endif - -#ifndef TALL_FONT_CORRECTION - #define TALL_FONT_CORRECTION 0 -#endif - -#define START_COL 0 - -// LCD selection -#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); -#elif ENABLED(U8GLIB_ST7920) - //U8GLIB_ST7920_128X64_RRD u8g(0,0,0); - U8GLIB_ST7920_128X64_RRD u8g(0); -#elif ENABLED(CARTESIO_UI) - // The CartesioUI display - #if DOGLCD_MOSI != -1 && DOGLCD_SCK != -1 - // using SW-SPI - U8GLIB_DOGM128 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); - #else - U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); - #endif -#elif ENABLED(U8GLIB_LM6059_AF) - // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250) - U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); -#elif ENABLED(MAKRPANEL) || ENABLED(VIKI2) || ENABLED(miniVIKI) - // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller as well - U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0); -#elif ENABLED(U8GLIB_SSD1306) - // Generic support for SSD1306 OLED I2C LCDs - U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); -#elif ENABLED(U8GLIB_SH1106) - // Generic support for SH1106 OLED I2C LCDs - U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); -#elif ENABLED(MINIPANEL) - // The MINIPanel display - U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); -#else - // for regular DOGM128 display with HW-SPI - U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 -#endif - -#ifndef LCD_PIXEL_WIDTH - #define LCD_PIXEL_WIDTH 128 -#endif -#ifndef LCD_PIXEL_HEIGHT - #define LCD_PIXEL_HEIGHT 64 -#endif - -#include "utf_mapper.h" - -int lcd_contrast; -static char currentfont = 0; - -static void lcd_setFont(char font_nr) { - switch(font_nr) { - case FONT_STATUSMENU : {u8g.setFont(FONT_STATUSMENU_NAME); currentfont = FONT_STATUSMENU;}; break; - case FONT_MENU : {u8g.setFont(FONT_MENU_NAME); currentfont = FONT_MENU;}; break; - case FONT_SPECIAL : {u8g.setFont(FONT_SPECIAL_NAME); currentfont = FONT_SPECIAL;}; break; - case FONT_MENU_EDIT : {u8g.setFont(FONT_MENU_EDIT_NAME); currentfont = FONT_MENU_EDIT;}; break; - break; - } -} - -char lcd_print(char c) { - if ((c > 0) && (c <= LCD_STR_SPECIAL_MAX)) { - u8g.setFont(FONT_SPECIAL_NAME); - u8g.print(c); - lcd_setFont(currentfont); - return 1; - } else { - return charset_mapper(c); - } -} - -char lcd_print(const char* str) { - char c; - int i = 0; - char n = 0; - while ((c = str[i++])) { - n += lcd_print(c); - } - return n; -} - -/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ -char lcd_printPGM(const char* str) { - char c; - char n = 0; - while ((c = pgm_read_byte(str++))) { - n += lcd_print(c); - } - return n; -} - -/* Warning: This function is called from interrupt context */ -static void lcd_implementation_init() { - - #if defined(LCD_PIN_BL) && LCD_PIN_BL > -1 // Enable LCD backlight - pinMode(LCD_PIN_BL, OUTPUT); - digitalWrite(LCD_PIN_BL, HIGH); - #endif - - #if defined(LCD_PIN_RESET) && LCD_PIN_RESET > -1 - pinMode(LCD_PIN_RESET, OUTPUT); - digitalWrite(LCD_PIN_RESET, HIGH); - #endif - - #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel - u8g.setContrast(lcd_contrast); - #endif - - #if ENABLED(LCD_SCREEN_ROT_90) - u8g.setRot90(); // Rotate screen by 90° - #elif ENABLED(LCD_SCREEN_ROT_180) - u8g.setRot180(); // Rotate screen by 180° - #elif ENABLED(LCD_SCREEN_ROT_270) - u8g.setRot270(); // Rotate screen by 270° - #endif - - #if ENABLED(SHOW_BOOTSCREEN) - static bool show_bootscreen = true; - - #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) - if (show_bootscreen) { - u8g.firstPage(); - do { - u8g.drawBitmapP( - (128 - (CUSTOM_BOOTSCREEN_BMPWIDTH)) /2, - ( 64 - (CUSTOM_BOOTSCREEN_BMPHEIGHT)) /2, - CEILING(CUSTOM_BOOTSCREEN_BMPWIDTH, 8), CUSTOM_BOOTSCREEN_BMPHEIGHT, custom_start_bmp); - } while (u8g.nextPage()); - safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT); - } - #endif // SHOW_CUSTOM_BOOTSCREEN - - int offx = (u8g.getWidth() - (START_BMPWIDTH)) / 2; - - #if ENABLED(START_BMPHIGH) - int offy = 0; - #else - int offy = DOG_CHAR_HEIGHT; - #endif - - int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1) * (DOG_CHAR_WIDTH)) / 2; - - if (show_bootscreen) { - u8g.firstPage(); - do { - u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); - lcd_setFont(FONT_MENU); - #ifndef STRING_SPLASH_LINE2 - u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT), STRING_SPLASH_LINE1); - #else - int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1) * (DOG_CHAR_WIDTH)) / 2; - u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 3 / 2, STRING_SPLASH_LINE1); - u8g.drawStr(txt2X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 1 / 2, STRING_SPLASH_LINE2); - #endif - } while (u8g.nextPage()); - } - - show_bootscreen = false; - - #endif // SHOW_BOOTSCREEN -} - -void lcd_kill_screen() { - lcd_setFont(FONT_MENU); - u8g.setPrintPos(0, u8g.getHeight()/4*1); - lcd_print(lcd_status_message); - u8g.setPrintPos(0, u8g.getHeight()/4*2); - lcd_printPGM(PSTR(MSG_HALTED)); - u8g.setPrintPos(0, u8g.getHeight()/4*3); - lcd_printPGM(PSTR(MSG_PLEASE_RESET)); -} - -static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop - -FORCE_INLINE void _draw_centered_temp(int temp, int x, int y) { - int degsize = 6 * (temp >= 100 ? 3 : temp >= 10 ? 2 : 1); // number's pixel width - u8g.setPrintPos(x - (18 - degsize) / 2, y); // move left if shorter - lcd_print(itostr3(temp)); - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); -} - -FORCE_INLINE void _draw_heater_status(int x, int heater) { - #if HAS_TEMP_BED - bool isBed = heater < 0; - #else - const bool isBed = false; - #endif - - _draw_centered_temp((isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)) + 0.5, x, 7); - - _draw_centered_temp((isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)) + 0.5, x, 28); - - int h = isBed ? 7 : 8, - y = isBed ? 18 : 17; - if (isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater)) { - u8g.setColorIndex(0); // white on black - u8g.drawBox(x + h, y, 2, 2); - u8g.setColorIndex(1); // black on white - } - else { - u8g.drawBox(x + h, y, 2, 2); - } -} - -FORCE_INLINE void _draw_axis_label(AxisEnum axis, const char *pstr, bool blink) { - if (blink) - lcd_printPGM(pstr); - else { - if (!axis_homed[axis]) - lcd_printPGM(PSTR("?")); - else { - #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) - if (!axis_known_position[axis]) - lcd_printPGM(PSTR(" ")); - else - #endif - lcd_printPGM(pstr); - } - } -} - -static void lcd_implementation_status_screen() { - u8g.setColorIndex(1); // black on white - - bool blink = lcd_blink(); - - // Symbols menu graphics, animated fan - u8g.drawBitmapP(9, 1, STATUS_SCREENBYTEWIDTH, STATUS_SCREENHEIGHT, - #if HAS_FAN0 - blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp - #else - status_screen0_bmp - #endif - ); - - // Status Menu Font for SD info, Heater status, Fan, XYZ - lcd_setFont(FONT_STATUSMENU); - - #if ENABLED(SDSUPPORT) - // SD Card Symbol - u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); - u8g.drawBox(50, 44 - (TALL_FONT_CORRECTION), 2, 5); - u8g.drawFrame(42, 49 - (TALL_FONT_CORRECTION), 10, 4); - u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); - - // Progress bar frame - u8g.drawFrame(54, 49, 73, 4 - (TALL_FONT_CORRECTION)); - - // SD Card Progress bar and clock - if (IS_SD_PRINTING) { - // Progress bar solid part - u8g.drawBox(55, 50, (unsigned int)(71 * card.percentDone() * 0.01), 2 - (TALL_FONT_CORRECTION)); - } - - u8g.setPrintPos(80,48); - - char buffer[10]; - duration_t elapsed = print_job_timer.duration(); - elapsed.toDigital(buffer); - lcd_print(buffer); - - #endif - - // Extruders - HOTEND_LOOP() _draw_heater_status(5 + e * 25, e); - - // Heated bed - #if HOTENDS < 4 && HAS_TEMP_BED - _draw_heater_status(81, -1); - #endif - - // Fan - u8g.setPrintPos(104, 27); - #if HAS_FAN0 - int per = ((fanSpeeds[0] + 1) * 100) / 256; - if (per) { - lcd_print(itostr3(per)); - lcd_print('%'); - } - #endif - - // X, Y, Z-Coordinates - // Before homing the axis letters are blinking 'X' <-> '?'. - // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. - // When everything is ok you see a constant 'X'. - #define XYZ_BASELINE 38 - - #if ENABLED(USE_SMALL_INFOFONT) - u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 10); - #else - u8g.drawBox(0, 30, LCD_PIXEL_WIDTH, 9); - #endif - u8g.setColorIndex(0); // white on black - - u8g.setPrintPos(2, XYZ_BASELINE); - _draw_axis_label(X_AXIS, PSTR(MSG_X), blink); - u8g.setPrintPos(10, XYZ_BASELINE); - lcd_print(ftostr4sign(current_position[X_AXIS])); - - u8g.setPrintPos(43, XYZ_BASELINE); - _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink); - u8g.setPrintPos(51, XYZ_BASELINE); - lcd_print(ftostr4sign(current_position[Y_AXIS])); - - u8g.setPrintPos(83, XYZ_BASELINE); - _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink); - u8g.setPrintPos(91, XYZ_BASELINE); - lcd_print(ftostr52sp(current_position[Z_AXIS] + 0.00001)); - - u8g.setColorIndex(1); // black on white - - // Feedrate - lcd_setFont(FONT_MENU); - u8g.setPrintPos(3, 49); - lcd_print(LCD_STR_FEEDRATE[0]); - - lcd_setFont(FONT_STATUSMENU); - u8g.setPrintPos(12, 49); - lcd_print(itostr3(feedrate_percentage)); - lcd_print('%'); - - // Status line - #if ENABLED(USE_SMALL_INFOFONT) - u8g.setPrintPos(0, 62); - #else - u8g.setPrintPos(0, 63); - #endif - #if DISABLED(FILAMENT_LCD_DISPLAY) - lcd_print(lcd_status_message); - #else - if (PENDING(millis(), previous_lcd_status_ms + 5000UL)) { //Display both Status message line and Filament display on the last line - lcd_print(lcd_status_message); - } - else { - lcd_printPGM(PSTR("dia:")); - lcd_print(ftostr12ns(filament_width_meas)); - lcd_printPGM(PSTR(" factor:")); - lcd_print(itostr3(100.0 * volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM])); - lcd_print('%'); - } - #endif -} - -static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) { - if (isSelected) { - u8g.setColorIndex(1); // black on white - u8g.drawBox(0, row * (DOG_CHAR_HEIGHT) + 3 - (TALL_FONT_CORRECTION), LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT); - u8g.setColorIndex(0); // following text must be white on black - } - else { - u8g.setColorIndex(1); // unmarked text is black on white - } - u8g.setPrintPos((START_COL) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT)); -} - -#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE) - - static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true, bool invert=false, const char* valstr=NULL) { - - lcd_implementation_mark_as_selected(row, invert); - - char c; - int8_t n = LCD_WIDTH - (START_COL); - - if (center && !valstr) { - int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2; - while (--pad >= 0) { lcd_print(' '); n--; } - } - while (n > 0 && (c = pgm_read_byte(pstr))) { - n -= lcd_print(c); - pstr++; - } - if (valstr) while (n > 0 && (c = *valstr)) { - n -= lcd_print(c); - valstr++; - } - while (n-- > 0) lcd_print(' '); - } - -#endif // LCD_INFO_MENU || FILAMENT_CHANGE_FEATURE - -static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) { - UNUSED(pre_char); - - char c; - uint8_t n = LCD_WIDTH - (START_COL) - 2; - - lcd_implementation_mark_as_selected(row, isSelected); - - while (c = pgm_read_byte(pstr)) { - n -= lcd_print(c); - pstr++; - } - while (n--) lcd_print(' '); - u8g.setPrintPos(LCD_PIXEL_WIDTH - (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT)); - lcd_print(post_char); - lcd_print(' '); -} - -static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) { - char c; - uint8_t vallen = (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data))); - uint8_t n = LCD_WIDTH - (START_COL) - 2 - vallen; - - lcd_implementation_mark_as_selected(row, isSelected); - - while (c = pgm_read_byte(pstr)) { - n -= lcd_print(c); - pstr++; - } - lcd_print(':'); - while (n--) lcd_print(' '); - u8g.setPrintPos(LCD_PIXEL_WIDTH - (DOG_CHAR_WIDTH) * vallen, (row + 1) * (DOG_CHAR_HEIGHT)); - if (pgm) lcd_printPGM(data); else lcd_print((char*)data); -} - -#define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false) -#define lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, true) - -#define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, itostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr32(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr43sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr52sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr51sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) - -//Add version for callback functions -#define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, itostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr32(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr43sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr52sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr51sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) - -void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) { - uint8_t rows = 1; - uint8_t lcd_width = LCD_WIDTH - (START_COL), char_width = DOG_CHAR_WIDTH; - uint8_t vallen = lcd_strlen(value); - - #if ENABLED(USE_BIG_EDIT_FONT) - if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) { - lcd_setFont(FONT_MENU_EDIT); - lcd_width = LCD_WIDTH_EDIT + 1; - char_width = DOG_CHAR_WIDTH_EDIT; - if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - vallen) rows = 2; - } - else { - lcd_setFont(FONT_MENU); - } - #endif - - if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - vallen) rows = 2; - - const float kHalfChar = (DOG_CHAR_HEIGHT_EDIT) / 2; - float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3 - - u8g.setPrintPos(0, rowHeight + kHalfChar); - lcd_printPGM(pstr); - if (value != NULL) { - lcd_print(':'); - u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar); - lcd_print(value); - } -} - -#if ENABLED(SDSUPPORT) - - static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) { - UNUSED(pstr); - char c; - uint8_t n = LCD_WIDTH - (START_COL) - 1; - - if (longFilename[0]) { - filename = longFilename; - longFilename[n] = '\0'; - } - - lcd_implementation_mark_as_selected(row, isSelected); - - if (isDir) lcd_print(LCD_STR_FOLDER[0]); - while ((c = *filename)) { - n -= lcd_print(c); - filename++; - } - while (n--) lcd_print(' '); - } - - #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false) - #define lcd_implementation_drawmenu_sddirectory(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, true) - -#endif //SDSUPPORT - -#define lcd_implementation_drawmenu_back(sel, row, pstr) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) -#define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) -#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') -#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') - -#endif //__ULTRALCD_IMPL_DOGM_H diff --git a/Marlin/ultralcd_impl_HD44780.h b/Marlin/ultralcd_impl_HD44780.h deleted file mode 100644 index ab120c2..0000000 --- a/Marlin/ultralcd_impl_HD44780.h +++ /dev/null @@ -1,978 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef ULTRALCD_IMPL_HD44780_H -#define ULTRALCD_IMPL_HD44780_H - -/** -* Implementation of the LCD display routines for a Hitachi HD44780 display. These are common LCD character displays. -**/ - -#include "duration_t.h" - -extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array. - -//////////////////////////////////// -// Setup button and encode mappings for each panel (into 'buttons' variable -// -// This is just to map common functions (across different panels) onto the same -// macro name. The mapping is independent of whether the button is directly connected or -// via a shift/i2c register. - -#if ENABLED(ULTIPANEL) - - // - // Setup other button mappings of each panel - // - #if ENABLED(LCD_I2C_VIKI) - #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C) - - // button and encoder bit positions within 'buttons' - #define B_LE (BUTTON_LEFT< - #include - #include - #define LCD_CLASS LiquidCrystal_I2C - LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_I2C_PIN_EN, LCD_I2C_PIN_RW, LCD_I2C_PIN_RS, LCD_I2C_PIN_D4, LCD_I2C_PIN_D5, LCD_I2C_PIN_D6, LCD_I2C_PIN_D7); - -#elif ENABLED(LCD_I2C_TYPE_MCP23017) - //for the LED indicators (which maybe mapped to different things in lcd_implementation_update_indicators()) - #define LED_A 0x04 //100 - #define LED_B 0x02 //010 - #define LED_C 0x01 //001 - - #define LCD_HAS_STATUS_INDICATORS - - #include - #include - #define LCD_CLASS LiquidTWI2 - #if ENABLED(DETECT_DEVICE) - LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); - #else - LCD_CLASS lcd(LCD_I2C_ADDRESS); - #endif - -#elif ENABLED(LCD_I2C_TYPE_MCP23008) - #include - #include - #define LCD_CLASS LiquidTWI2 - #if ENABLED(DETECT_DEVICE) - LCD_CLASS lcd(LCD_I2C_ADDRESS, 1); - #else - LCD_CLASS lcd(LCD_I2C_ADDRESS); - #endif - -#elif ENABLED(LCD_I2C_TYPE_PCA8574) - #include - #define LCD_CLASS LiquidCrystal_I2C - LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_WIDTH, LCD_HEIGHT); - -// 2 wire Non-latching LCD SR from: -// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection -#elif ENABLED(SR_LCD_2W_NL) - extern "C" void __cxa_pure_virtual() { while (1); } - #include - #include - #define LCD_CLASS LiquidCrystal_SR - LCD_CLASS lcd(SR_DATA_PIN, SR_CLK_PIN); -#elif ENABLED(LCM1602) - #include - #include - #include - #define LCD_CLASS LiquidCrystal_I2C - LCD_CLASS lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); -#else - // Standard directly connected LCD implementations - #include - #define LCD_CLASS LiquidCrystal - LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7 -#endif - -#include "utf_mapper.h" - -#if ENABLED(LCD_PROGRESS_BAR) - static millis_t progress_bar_ms = 0; - #if PROGRESS_MSG_EXPIRE > 0 - static millis_t expire_status_ms = 0; - #endif - #define LCD_STR_PROGRESS "\x03\x04\x05" -#endif - -#if ENABLED(LCD_HAS_STATUS_INDICATORS) - static void lcd_implementation_update_indicators(); -#endif - -static void lcd_set_custom_characters( - #if ENABLED(LCD_PROGRESS_BAR) - bool progress_bar_set = true - #endif -) { - byte bedTemp[8] = { - B00000, - B11111, - B10101, - B10001, - B10101, - B11111, - B00000, - B00000 - }; //thanks Sonny Mounicou - byte degree[8] = { - B01100, - B10010, - B10010, - B01100, - B00000, - B00000, - B00000, - B00000 - }; - byte thermometer[8] = { - B00100, - B01010, - B01010, - B01010, - B01010, - B10001, - B10001, - B01110 - }; - byte uplevel[8] = { - B00100, - B01110, - B11111, - B00100, - B11100, - B00000, - B00000, - B00000 - }; //thanks joris - byte refresh[8] = { - B00000, - B00110, - B11001, - B11000, - B00011, - B10011, - B01100, - B00000, - }; //thanks joris - byte folder[8] = { - B00000, - B11100, - B11111, - B10001, - B10001, - B11111, - B00000, - B00000 - }; //thanks joris - byte feedrate[8] = { - B11100, - B10000, - B11000, - B10111, - B00101, - B00110, - B00101, - B00000 - }; //thanks Sonny Mounicou - byte clock[8] = { - B00000, - B01110, - B10011, - B10101, - B10001, - B01110, - B00000, - B00000 - }; //thanks Sonny Mounicou - - #if ENABLED(LCD_PROGRESS_BAR) - static bool char_mode = false; - byte progress[3][8] = { { - B00000, - B10000, - B10000, - B10000, - B10000, - B10000, - B10000, - B00000 - }, { - B00000, - B10100, - B10100, - B10100, - B10100, - B10100, - B10100, - B00000 - }, { - B00000, - B10101, - B10101, - B10101, - B10101, - B10101, - B10101, - B00000 - } }; - if (progress_bar_set != char_mode) { - char_mode = progress_bar_set; - lcd.createChar(LCD_STR_BEDTEMP[0], bedTemp); - lcd.createChar(LCD_STR_DEGREE[0], degree); - lcd.createChar(LCD_STR_THERMOMETER[0], thermometer); - lcd.createChar(LCD_STR_FEEDRATE[0], feedrate); - lcd.createChar(LCD_STR_CLOCK[0], clock); - if (progress_bar_set) { - // Progress bar characters for info screen - for (int i = 3; i--;) lcd.createChar(LCD_STR_PROGRESS[i], progress[i]); - } - else { - // Custom characters for submenus - lcd.createChar(LCD_STR_UPLEVEL[0], uplevel); - lcd.createChar(LCD_STR_REFRESH[0], refresh); - lcd.createChar(LCD_STR_FOLDER[0], folder); - } - } - #else - lcd.createChar(LCD_STR_BEDTEMP[0], bedTemp); - lcd.createChar(LCD_STR_DEGREE[0], degree); - lcd.createChar(LCD_STR_THERMOMETER[0], thermometer); - lcd.createChar(LCD_STR_UPLEVEL[0], uplevel); - lcd.createChar(LCD_STR_REFRESH[0], refresh); - lcd.createChar(LCD_STR_FOLDER[0], folder); - lcd.createChar(LCD_STR_FEEDRATE[0], feedrate); - lcd.createChar(LCD_STR_CLOCK[0], clock); - #endif -} - -static void lcd_implementation_init( - #if ENABLED(LCD_PROGRESS_BAR) - bool progress_bar_set = true - #endif -) { - - #if ENABLED(LCD_I2C_TYPE_PCF8575) - lcd.begin(LCD_WIDTH, LCD_HEIGHT); - #ifdef LCD_I2C_PIN_BL - lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE); - lcd.setBacklight(HIGH); - #endif - - #elif ENABLED(LCD_I2C_TYPE_MCP23017) - lcd.setMCPType(LTI_TYPE_MCP23017); - lcd.begin(LCD_WIDTH, LCD_HEIGHT); - lcd_implementation_update_indicators(); - - #elif ENABLED(LCD_I2C_TYPE_MCP23008) - lcd.setMCPType(LTI_TYPE_MCP23008); - lcd.begin(LCD_WIDTH, LCD_HEIGHT); - - #elif ENABLED(LCD_I2C_TYPE_PCA8574) - lcd.init(); - lcd.backlight(); - - #else - lcd.begin(LCD_WIDTH, LCD_HEIGHT); - #endif - - lcd_set_custom_characters( - #if ENABLED(LCD_PROGRESS_BAR) - progress_bar_set - #endif - ); - - lcd.clear(); -} - -static void lcd_implementation_clear() { lcd.clear(); } - -/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ -char lcd_printPGM(const char* str) { - char c, n = 0; - while ((c = pgm_read_byte(str++))) n += charset_mapper(c); - return n; -} - -char lcd_print(const char* str) { - char c, n = 0; - unsigned char i = 0; - while ((c = str[i++])) n += charset_mapper(c); - return n; -} - -unsigned lcd_print(char c) { return charset_mapper(c); } - -#if ENABLED(SHOW_BOOTSCREEN) - - void lcd_erase_line(int line) { - lcd.setCursor(0, line); - for (int i = 0; i < LCD_WIDTH; i++) - lcd_print(' '); - } - - // Scroll the PSTR 'text' in a 'len' wide field for 'time' milliseconds at position col,line - void lcd_scroll(int col, int line, const char* text, int len, int time) { - char tmp[LCD_WIDTH + 1] = {0}; - int n = max(lcd_strlen_P(text) - len, 0); - for (int i = 0; i <= n; i++) { - strncpy_P(tmp, text + i, min(len, LCD_WIDTH)); - lcd.setCursor(col, line); - lcd_print(tmp); - delay(time / max(n, 1)); - } - } - - static void logo_lines(const char *extra) { - int indent = (LCD_WIDTH - 8 - lcd_strlen_P(extra)) / 2; - lcd.setCursor(indent, 0); lcd.print('\x00'); lcd_printPGM(PSTR( "------" )); lcd.print('\x01'); - lcd.setCursor(indent, 1); lcd_printPGM(PSTR("|Marlin|")); lcd_printPGM(extra); - lcd.setCursor(indent, 2); lcd.print('\x02'); lcd_printPGM(PSTR( "------" )); lcd.print('\x03'); - } - - void bootscreen() { - byte top_left[8] = { - B00000, - B00000, - B00000, - B00000, - B00001, - B00010, - B00100, - B00100 - }; - byte top_right[8] = { - B00000, - B00000, - B00000, - B11100, - B11100, - B01100, - B00100, - B00100 - }; - byte botom_left[8] = { - B00100, - B00010, - B00001, - B00000, - B00000, - B00000, - B00000, - B00000 - }; - byte botom_right[8] = { - B00100, - B01000, - B10000, - B00000, - B00000, - B00000, - B00000, - B00000 - }; - lcd.createChar(0, top_left); - lcd.createChar(1, top_right); - lcd.createChar(2, botom_left); - lcd.createChar(3, botom_right); - - lcd.clear(); - - #define LCD_EXTRA_SPACE (LCD_WIDTH-8) - - #define CENTER_OR_SCROLL(STRING,DELAY) \ - lcd_erase_line(3); \ - if (strlen(STRING) <= LCD_WIDTH) { \ - lcd.setCursor((LCD_WIDTH - lcd_strlen_P(PSTR(STRING))) / 2, 3); \ - lcd_printPGM(PSTR(STRING)); \ - safe_delay(DELAY); \ - } \ - else { \ - lcd_scroll(0, 3, PSTR(STRING), LCD_WIDTH, DELAY); \ - } - - #ifdef STRING_SPLASH_LINE1 - // - // Show the Marlin logo with splash line 1 - // - if (LCD_EXTRA_SPACE >= strlen(STRING_SPLASH_LINE1) + 1) { - // - // Show the Marlin logo, splash line1, and splash line 2 - // - logo_lines(PSTR(" " STRING_SPLASH_LINE1)); - #ifdef STRING_SPLASH_LINE2 - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 2000); - #else - safe_delay(2000); - #endif - } - else { - // - // Show the Marlin logo with splash line 1 - // After a delay show splash line 2, if it exists - // - #ifdef STRING_SPLASH_LINE2 - #define _SPLASH_WAIT_1 1500 - #else - #define _SPLASH_WAIT_1 2000 - #endif - logo_lines(PSTR("")); - CENTER_OR_SCROLL(STRING_SPLASH_LINE1, _SPLASH_WAIT_1); - #ifdef STRING_SPLASH_LINE2 - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 1500); - #endif - } - #elif defined(STRING_SPLASH_LINE2) - // - // Show splash line 2 only, alongside the logo if possible - // - if (LCD_EXTRA_SPACE >= strlen(STRING_SPLASH_LINE2) + 1) { - logo_lines(PSTR(" " STRING_SPLASH_LINE2)); - safe_delay(2000); - } - else { - logo_lines(PSTR("")); - CENTER_OR_SCROLL(STRING_SPLASH_LINE2, 2000); - } - #else - // - // Show only the Marlin logo - // - logo_lines(PSTR("")); - safe_delay(2000); - #endif - lcd_set_custom_characters( - #if ENABLED(LCD_PROGRESS_BAR) - false - #endif - ); - } - -#endif // SHOW_BOOTSCREEN - -void lcd_kill_screen() { - lcd.setCursor(0, 0); - lcd_print(lcd_status_message); - #if LCD_HEIGHT < 4 - lcd.setCursor(0, 2); - #else - lcd.setCursor(0, 2); - lcd_printPGM(PSTR(MSG_HALTED)); - lcd.setCursor(0, 3); - #endif - lcd_printPGM(PSTR(MSG_PLEASE_RESET)); -} - -FORCE_INLINE void _draw_axis_label(AxisEnum axis, const char *pstr, bool blink) { - if (blink) - lcd_printPGM(pstr); - else { - if (!axis_homed[axis]) - lcd_printPGM(PSTR("?")); - else { - #if DISABLED(DISABLE_REDUCED_ACCURACY_WARNING) - if (!axis_known_position[axis]) - lcd_printPGM(PSTR(" ")); - else - #endif - lcd_printPGM(pstr); - } - } -} - -/** -Possible status screens: -16x2 |000/000 B000/000| - |0123456789012345| - -16x4 |000/000 B000/000| - |SD100% Z 000.00| - |F100% T--:--| - |0123456789012345| - -20x2 |T000/000D B000/000D | - |01234567890123456789| - -20x4 |T000/000D B000/000D | - |X 000 Y 000 Z 000.00| - |F100% SD100% T--:--| - |01234567890123456789| - -20x4 |T000/000D B000/000D | - |T000/000D Z 000.00| - |F100% SD100% T--:--| - |01234567890123456789| -*/ -static void lcd_implementation_status_screen() { - - #define LCD_TEMP_ONLY(T1,T2) \ - lcd.print(itostr3(T1 + 0.5)); \ - lcd.print('/'); \ - lcd.print(itostr3left(T2 + 0.5)) - - #define LCD_TEMP(T1,T2,PREFIX) \ - lcd.print(PREFIX); \ - LCD_TEMP_ONLY(T1,T2); \ - lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); \ - if (T2 < 10) lcd.print(' ') - - // - // Line 1 - // - - lcd.setCursor(0, 0); - - #if LCD_WIDTH < 20 - - // - // Hotend 0 Temperature - // - LCD_TEMP_ONLY(thermalManager.degHotend(0), thermalManager.degTargetHotend(0)); - - // - // Hotend 1 or Bed Temperature - // - #if HOTENDS > 1 || TEMP_SENSOR_BED != 0 - - lcd.setCursor(8, 0); - #if HOTENDS > 1 - lcd.print(LCD_STR_THERMOMETER[0]); - LCD_TEMP_ONLY(thermalManager.degHotend(1), thermalManager.degTargetHotend(1)); - #else - lcd.print(LCD_STR_BEDTEMP[0]); - LCD_TEMP_ONLY(thermalManager.degBed(), thermalManager.degTargetBed()); - #endif - - #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0 - - #else // LCD_WIDTH >= 20 - - // - // Hotend 0 Temperature - // - LCD_TEMP(thermalManager.degHotend(0), thermalManager.degTargetHotend(0), LCD_STR_THERMOMETER[0]); - - // - // Hotend 1 or Bed Temperature - // - #if HOTENDS > 1 || TEMP_SENSOR_BED != 0 - lcd.setCursor(10, 0); - #if HOTENDS > 1 - LCD_TEMP(thermalManager.degHotend(1), thermalManager.degTargetHotend(1), LCD_STR_THERMOMETER[0]); - #else - LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]); - #endif - - #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0 - - #endif // LCD_WIDTH >= 20 - - // - // Line 2 - // - - #if LCD_HEIGHT > 2 - - bool blink = lcd_blink(); - - #if LCD_WIDTH < 20 - - #if ENABLED(SDSUPPORT) - lcd.setCursor(0, 2); - lcd_printPGM(PSTR("SD")); - if (IS_SD_PRINTING) - lcd.print(itostr3(card.percentDone())); - else - lcd_printPGM(PSTR("---")); - lcd.print('%'); - #endif // SDSUPPORT - - #else // LCD_WIDTH >= 20 - - lcd.setCursor(0, 1); - - #if HOTENDS > 1 && TEMP_SENSOR_BED != 0 - - // If we both have a 2nd extruder and a heated bed, - // show the heated bed temp on the left, - // since the first line is filled with extruder temps - LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]); - - #else - // Before homing the axis letters are blinking 'X' <-> '?'. - // When axis is homed but axis_known_position is false the axis letters are blinking 'X' <-> ' '. - // When everything is ok you see a constant 'X'. - - _draw_axis_label(X_AXIS, PSTR(MSG_X), blink); - lcd.print(ftostr4sign(current_position[X_AXIS])); - - lcd_printPGM(PSTR(" ")); - - _draw_axis_label(Y_AXIS, PSTR(MSG_Y), blink); - lcd.print(ftostr4sign(current_position[Y_AXIS])); - - #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0 - - #endif // LCD_WIDTH >= 20 - - lcd.setCursor(LCD_WIDTH - 8, 1); - _draw_axis_label(Z_AXIS, PSTR(MSG_Z), blink); - lcd.print(ftostr52sp(current_position[Z_AXIS] + 0.00001)); - - #endif // LCD_HEIGHT > 2 - - // - // Line 3 - // - - #if LCD_HEIGHT > 3 - - lcd.setCursor(0, 2); - lcd.print(LCD_STR_FEEDRATE[0]); - lcd.print(itostr3(feedrate_percentage)); - lcd.print('%'); - - #if LCD_WIDTH > 19 && ENABLED(SDSUPPORT) - - lcd.setCursor(7, 2); - lcd_printPGM(PSTR("SD")); - if (IS_SD_PRINTING) - lcd.print(itostr3(card.percentDone())); - else - lcd_printPGM(PSTR("---")); - lcd.print('%'); - - #endif // LCD_WIDTH > 19 && SDSUPPORT - - lcd.setCursor(LCD_WIDTH - 6, 2); - lcd.print(LCD_STR_CLOCK[0]); - - char buffer[10]; - duration_t elapsed = print_job_timer.duration(); - elapsed.toDigital(buffer); - lcd_print(buffer); - - #endif // LCD_HEIGHT > 3 - - // - // Last Line - // Status Message (which may be a Progress Bar or Filament display) - // - - lcd.setCursor(0, LCD_HEIGHT - 1); - - #if ENABLED(LCD_PROGRESS_BAR) - - if (card.isFileOpen()) { - // Draw the progress bar if the message has shown long enough - // or if there is no message set. - if (ELAPSED(millis(), progress_bar_ms + PROGRESS_BAR_MSG_TIME) || !lcd_status_message[0]) { - int tix = (int)(card.percentDone() * (LCD_WIDTH) * 3) / 100, - cel = tix / 3, rem = tix % 3, i = LCD_WIDTH; - char msg[LCD_WIDTH + 1], b = ' '; - msg[i] = '\0'; - while (i--) { - if (i == cel - 1) - b = LCD_STR_PROGRESS[2]; - else if (i == cel && rem != 0) - b = LCD_STR_PROGRESS[rem - 1]; - msg[i] = b; - } - lcd.print(msg); - return; - } - } //card.isFileOpen - - #elif ENABLED(FILAMENT_LCD_DISPLAY) - - // Show Filament Diameter and Volumetric Multiplier % - // After allowing lcd_status_message to show for 5 seconds - if (ELAPSED(millis(), previous_lcd_status_ms + 5000UL)) { - lcd_printPGM(PSTR("Dia ")); - lcd.print(ftostr12ns(filament_width_meas)); - lcd_printPGM(PSTR(" V")); - lcd.print(itostr3(100.0 * volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM])); - lcd.print('%'); - return; - } - - #endif // FILAMENT_LCD_DISPLAY - - lcd_print(lcd_status_message); -} - -#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE) - - static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true, bool invert=false, const char *valstr=NULL) { - UNUSED(invert); - char c; - int8_t n = LCD_WIDTH; - lcd.setCursor(0, row); - if (center && !valstr) { - int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2; - while (--pad >= 0) { lcd.print(' '); n--; } - } - while (n > 0 && (c = pgm_read_byte(pstr))) { - n -= lcd_print(c); - pstr++; - } - if (valstr) while (n > 0 && (c = *valstr)) { - n -= lcd_print(c); - valstr++; - } - while (n-- > 0) lcd.print(' '); - } - -#endif // LCD_INFO_MENU || FILAMENT_CHANGE_FEATURE - -static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) { - char c; - uint8_t n = LCD_WIDTH - 2; - lcd.setCursor(0, row); - lcd.print(sel ? pre_char : ' '); - while ((c = pgm_read_byte(pstr)) && n > 0) { - n -= lcd_print(c); - pstr++; - } - while (n--) lcd.print(' '); - lcd.print(post_char); -} - -static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) { - char c; - uint8_t n = LCD_WIDTH - 2 - lcd_strlen(data); - lcd.setCursor(0, row); - lcd.print(sel ? pre_char : ' '); - while ((c = pgm_read_byte(pstr)) && n > 0) { - n -= lcd_print(c); - pstr++; - } - lcd.print(':'); - while (n--) lcd.print(' '); - lcd_print(data); -} -static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) { - char c; - uint8_t n = LCD_WIDTH - 2 - lcd_strlen_P(data); - lcd.setCursor(0, row); - lcd.print(sel ? pre_char : ' '); - while ((c = pgm_read_byte(pstr)) && n > 0) { - n -= lcd_print(c); - pstr++; - } - lcd.print(':'); - while (n--) lcd.print(' '); - lcd_printPGM(data); -} - -#define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr43sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr52sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr51sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) - -//Add version for callback functions -#define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', itostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr3(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr32(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr43sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr52sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr51sign(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5rj(*(data))) -#define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) - -void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) { - lcd.setCursor(1, 1); - lcd_printPGM(pstr); - if (value != NULL) { - lcd.print(':'); - lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1); - lcd_print(value); - } -} - -#if ENABLED(SDSUPPORT) - - static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat, char post_char) { - UNUSED(pstr); - char c; - uint8_t n = LCD_WIDTH - concat; - lcd.setCursor(0, row); - lcd.print(sel ? '>' : ' '); - if (longFilename[0]) { - filename = longFilename; - longFilename[n] = '\0'; - } - while ((c = *filename) && n > 0) { - n -= lcd_print(c); - filename++; - } - while (n--) lcd.print(' '); - lcd.print(post_char); - } - - static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { - lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, ' '); - } - - static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { - lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, LCD_STR_FOLDER[0]); - } - -#endif //SDSUPPORT - -#define lcd_implementation_drawmenu_back(sel, row, pstr) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) -#define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) -#define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') -#define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') - -#if ENABLED(LCD_HAS_STATUS_INDICATORS) - - static void lcd_implementation_update_indicators() { - // Set the LEDS - referred to as backlights by the LiquidTWI2 library - static uint8_t ledsprev = 0; - uint8_t leds = 0; - - if (thermalManager.degTargetBed() > 0) leds |= LED_A; - - if (thermalManager.degTargetHotend(0) > 0) leds |= LED_B; - - #if FAN_COUNT > 0 - if (0 - #if HAS_FAN0 - || fanSpeeds[0] - #endif - #if HAS_FAN1 - || fanSpeeds[1] - #endif - #if HAS_FAN2 - || fanSpeeds[2] - #endif - ) leds |= LED_C; - #endif // FAN_COUNT > 0 - - #if HOTENDS > 1 - if (thermalManager.degTargetHotend(1) > 0) leds |= LED_C; - #endif - - if (leds != ledsprev) { - lcd.setBacklight(leds); - ledsprev = leds; - } - - } - -#endif // LCD_HAS_STATUS_INDICATORS - -#if ENABLED(LCD_HAS_SLOW_BUTTONS) - - extern millis_t next_button_update_ms; - - static uint8_t lcd_implementation_read_slow_buttons() { - #if ENABLED(LCD_I2C_TYPE_MCP23017) - // Reading these buttons this is likely to be too slow to call inside interrupt context - // so they are called during normal lcd_update - uint8_t slow_bits = lcd.readButtons() << B_I2C_BTN_OFFSET; - #if ENABLED(LCD_I2C_VIKI) - if ((slow_bits & (B_MI | B_RI)) && PENDING(millis(), next_button_update_ms)) // LCD clicked - slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated - #endif // LCD_I2C_VIKI - return slow_bits; - #endif // LCD_I2C_TYPE_MCP23017 - } - -#endif // LCD_HAS_SLOW_BUTTONS - -#endif // ULTRALCD_IMPL_HD44780_H diff --git a/Marlin/ultralcd_st7920_u8glib_rrd.h b/Marlin/ultralcd_st7920_u8glib_rrd.h deleted file mode 100644 index 7226f55..0000000 --- a/Marlin/ultralcd_st7920_u8glib_rrd.h +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef ULCDST7920_H -#define ULCDST7920_H - -#include "Marlin.h" - -#if ENABLED(U8GLIB_ST7920) - -#define ST7920_CLK_PIN LCD_PINS_D4 -#define ST7920_DAT_PIN LCD_PINS_ENABLE -#define ST7920_CS_PIN LCD_PINS_RS - -//#define PAGE_HEIGHT 8 //128 byte framebuffer -//#define PAGE_HEIGHT 16 //256 byte framebuffer -#define PAGE_HEIGHT 32 //512 byte framebuffer - -#define LCD_PIXEL_WIDTH 128 -#define LCD_PIXEL_HEIGHT 64 - -#include - -//set optimization so ARDUINO optimizes this file -#pragma GCC optimize (3) - -#define DELAY_0_NOP NOOP -#define DELAY_1_NOP __asm__("nop\n\t") -#define DELAY_2_NOP __asm__("nop\n\t" "nop\n\t") -#define DELAY_3_NOP __asm__("nop\n\t" "nop\n\t" "nop\n\t") -#define DELAY_4_NOP __asm__("nop\n\t" "nop\n\t" "nop\n\t" "nop\n\t") - - -// If you want you can define your own set of delays in Configuration.h -//#define ST7920_DELAY_1 DELAY_0_NOP -//#define ST7920_DELAY_2 DELAY_0_NOP -//#define ST7920_DELAY_3 DELAY_0_NOP - -#if F_CPU >= 20000000 - #define CPU_ST7920_DELAY_1 DELAY_0_NOP - #define CPU_ST7920_DELAY_2 DELAY_0_NOP - #define CPU_ST7920_DELAY_3 DELAY_1_NOP -#elif (MOTHERBOARD == BOARD_3DRAG) || (MOTHERBOARD == BOARD_K8200) || (MOTHERBOARD == BOARD_K8400) - #define CPU_ST7920_DELAY_1 DELAY_0_NOP - #define CPU_ST7920_DELAY_2 DELAY_3_NOP - #define CPU_ST7920_DELAY_3 DELAY_0_NOP -#elif (MOTHERBOARD == BOARD_MINIRAMBO) - #define CPU_ST7920_DELAY_1 DELAY_0_NOP - #define CPU_ST7920_DELAY_2 DELAY_4_NOP - #define CPU_ST7920_DELAY_3 DELAY_0_NOP -#elif (MOTHERBOARD == BOARD_RAMBO) - #define CPU_ST7920_DELAY_1 DELAY_0_NOP - #define CPU_ST7920_DELAY_2 DELAY_0_NOP - #define CPU_ST7920_DELAY_3 DELAY_0_NOP -#elif F_CPU == 16000000 - #define CPU_ST7920_DELAY_1 DELAY_0_NOP - #define CPU_ST7920_DELAY_2 DELAY_0_NOP - #define CPU_ST7920_DELAY_3 DELAY_1_NOP -#else - #error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd.h'" -#endif - -#ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 -#endif -#ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 -#endif -#ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 -#endif - -#define ST7920_SND_BIT \ - WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \ - WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \ - WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \ - val <<= 1 - -static void ST7920_SWSPI_SND_8BIT(uint8_t val) { - ST7920_SND_BIT; // 1 - ST7920_SND_BIT; // 2 - ST7920_SND_BIT; // 3 - ST7920_SND_BIT; // 4 - ST7920_SND_BIT; // 5 - ST7920_SND_BIT; // 6 - ST7920_SND_BIT; // 7 - ST7920_SND_BIT; // 8 -} - -#define ST7920_CS() {WRITE(ST7920_CS_PIN,1);u8g_10MicroDelay();} -#define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);} -#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();} -#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();} -#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();} -#define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;idev_mem); - y = pb->p.page_y0; - ptr = (uint8_t*)pb->buf; - - ST7920_CS(); - for (i = 0; i < PAGE_HEIGHT; i ++) { - ST7920_SET_CMD(); - if (y < 32) { - ST7920_WRITE_BYTE(0x80 | y); //y - ST7920_WRITE_BYTE(0x80); //x=0 - } - else { - ST7920_WRITE_BYTE(0x80 | (y - 32)); //y - ST7920_WRITE_BYTE(0x80 | 8); //x=64 - } - ST7920_SET_DAT(); - ST7920_WRITE_BYTES(ptr, (LCD_PIXEL_WIDTH) / 8); //ptr is incremented inside of macro - y++; - } - ST7920_NCS(); - } - break; - } -#if PAGE_HEIGHT == 8 - return u8g_dev_pb8h1_base_fn(u8g, dev, msg, arg); -#elif PAGE_HEIGHT == 16 - return u8g_dev_pb16h1_base_fn(u8g, dev, msg, arg); -#else - return u8g_dev_pb32h1_base_fn(u8g, dev, msg, arg); -#endif -} - -uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U8G_NOCOMMON; -u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf}; -u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn}; - -class U8GLIB_ST7920_128X64_RRD : public U8GLIB { - public: - U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) { UNUSED(dummy); } -}; - -#pragma GCC reset_options - -#endif //U8GLIB_ST7920 -#endif //ULCDST7920_H diff --git a/Marlin/utf_mapper.h b/Marlin/utf_mapper.h deleted file mode 100644 index bba85e1..0000000 --- a/Marlin/utf_mapper.h +++ /dev/null @@ -1,358 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef UTF_MAPPER_H -#define UTF_MAPPER_H - -#include "language.h" - -#if ENABLED(DOGLCD) - #define HARDWARE_CHAR_OUT u8g.print -#else - #define HARDWARE_CHAR_OUT lcd.write -#endif - -#if DISABLED(SIMULATE_ROMFONT) && ENABLED(DOGLCD) - #if ENABLED(DISPLAY_CHARSET_ISO10646_1) - #define MAPPER_ONE_TO_ONE - #elif ENABLED(DISPLAY_CHARSET_ISO10646_5) - #define MAPPER_ONE_TO_ONE - #elif ENABLED(DISPLAY_CHARSET_ISO10646_KANA) - #define MAPPER_ONE_TO_ONE - #elif ENABLED(DISPLAY_CHARSET_ISO10646_GREEK) - #define MAPPER_ONE_TO_ONE - #endif -#else // SIMULATE_ROMFONT - #if DISPLAY_CHARSET_HD44780 == JAPANESE - #if ENABLED(MAPPER_C2C3) - const PROGMEM uint8_t utf_recode[] = - { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is fair for symbols - 0x20,0x3f,0xec,0xed,0x3f,0x5c,0x7c,0x3f,0x22,0x63,0x61,0x7f,0x3f,0x3f,0x52,0xb0, // c2a - // ' ' ¢ £ ­ l " c a « R - 0xdf,0x3f,0x32,0x33,0x27,0xe4,0xf1,0xa5,0x2c,0x31,0xdf,0x7e,0x3f,0x3f,0x3f,0x3f, // c2b but relatively bad for letters. - // ° 2 3 ` N p . , 1 ° » - 0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c38 - // ä - 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0xef,0x78,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0xe2, // c39 missing characters display as '?' - // ö x ü ß - 0x3f,0x3f,0x3f,0x3f,0xe1,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f, // c3a - // ä - 0x3f,0xee,0x3f,0x3f,0x3f,0x3f,0xef,0xfd,0x3f,0x3f,0x3f,0x3f,0xf5,0x3f,0x3f,0x3f // c3b - // n ö ÷ ü - }; - #elif ENABLED(MAPPER_E382E383) - const PROGMEM uint8_t utf_recode[] = - { // 0 1 2 3 4 5 6 7 8 9 a b c d e f - 0x3d,0xb1,0xb1,0xa8,0xb2,0xa9,0xb3,0xaa,0xb4,0xab,0xb5,0xb6,0xb6,0xb7,0xb7,0xb8, // e382a Please test and correct - // = ã‚¢ ã‚¢ ã‚£ イ ã‚¥ ウ ã‚§ エ ã‚© オ ガ ガ ã‚­ ã‚­ ク - 0xb8,0xb9,0xb9,0xba,0xba,0xbb,0xbb,0xbc,0xbc,0xbd,0xbd,0xbe,0xbe,0xbf,0xbf,0xc0, // e382b - // ク ケ ケ コ コ サ サ ã‚· ã‚· ス ス ã‚» ã‚» ソ ソ ã‚¿ - 0xc0,0xc1,0xc1,0xc2,0xc2,0xc2,0xc3,0xc3,0xc4,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca, // e3838 - // ã‚¿ ムムッ ッ ッ テ テ ト ト ナ ニ ヌ ムノ ム- 0xca,0xca,0xcb,0xcb,0xcb,0xcc,0xcc,0xcc,0xcd,0xcd,0xcd,0xce,0xce,0xce,0xcf,0xd0, // e3839 - // ムムヒ ヒ ヒ フ フ フ ヘ ヘ ヘ ホ ホ ホ マ ミ - 0xd1,0xd2,0xd3,0xd4,0xd4,0xd5,0xd5,0xae,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdc, // e383a - // ム メ モ ャ ャ ユ ユ ョ ヨ ラ リ ル レ ロ ワ ワ - 0xec,0xa7,0xa6,0xdd,0xcc,0x3f,0x3f,0x3f,0x3f,0x3f,0xa6,0xa5,0xb0,0xa4,0xa4,0x3f // e383b - // ヰ ヱ ヲ ン フ ? ? ? ? ? ヲ ・ ー ヽ ヽ ? - }; - #elif ENABLED(MAPPER_D0D1) - #error "Cyrillic on a JAPANESE display makes no sense. There are no matching symbols." - #endif - - #elif DISPLAY_CHARSET_HD44780 == WESTERN - #if ENABLED(MAPPER_C2C3) - const PROGMEM uint8_t utf_recode[] = - { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is relative complete. - 0x20,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0x22,0xa9,0xaa,0xab,0x3f,0x3f,0xae,0x3f, // c2a ¡¢£¤¥¦§¨©ª«¬­®¯ - // ' ' ¡ ¢ £ ¤ Â¥ ¦ § " © ª « ? ? ® ? - 0xb0,0xb1,0xb2,0xb3,0x27,0xb5,0xb6,0xb7,0x2c,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf, // c2b °±²³´µ¶·¸¹º»¼½¾¿ - // ° ± ³ ² ? µ ¶ · , ¹ º » ¼ ½ ¾ ¿ - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf, // c38 ÀÃÃÄÅÆÇÈÉÊËÌÃÃŽÃ - // À à Â Ã Ä Ã… Æ Ç È É Ê Ë ÃŒ à Î à - 0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf, // c39 ÃÑÓÔÕÖרÙÚÛÜÃÞß - // à Ñ Ã’ Ó Ô Õ Ö × Ø Ù Ú Û Ü à Þ ß - 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef, // c3a àáãäåæçèéêëìíîï - // à á â ã ä Ã¥ æ ç è é ê ë ì í î ï - 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff // c3b ðñóôõö÷øùúûüýþÿ - // ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ - }; - #elif ENABLED(MAPPER_D0D1) - #define MAPPER_D0D1_MOD - const PROGMEM uint8_t utf_recode[] = - {//0 1 2 3 4 5 6 7 8 9 a b c d e f - 0x41,0x80,0x42,0x92,0x81,0x45,0x82,0x83,0x84,0x85,0x4b,0x86,0x4d,0x48,0x4f,0x87, // d0a - // A Б B Г Д E Ж З И Й K Л M H O П - 0x50,0x43,0x54,0x88,0xd8,0x58,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad, // d0b - // P C T У Ф X Ч ч Ш Щ Ъ Ы b Э Ю Я - 0x61,0x36,0x42,0x92,0x81,0x65,0x82,0xb3,0x84,0x85,0x6b,0x86,0x4d,0x48,0x6f,0x87, // d18 - // a 6 B Г Д e Ж ³ И Й k Л M H o П - 0x70,0x63,0x54,0x79,0xd8,0x78,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x62,0x8f,0xac,0xad // d19 - // p c T y Ф x Ч ч Ш Щ Ъ Ы b Э Ю Я - }; - #elif ENABLED(MAPPER_E382E383) - #error "Katakana on a WESTERN display makes no sense. There are no matching symbols." - #endif - - #elif DISPLAY_CHARSET_HD44780 == CYRILLIC - #if ENABLED(MAPPER_D0D1) - #define MAPPER_D0D1_MOD - // it is a Russian alphabet translation - // except 0401 --> 0xa2 = Ð, 0451 --> 0xb5 = Ñ‘ - const PROGMEM uint8_t utf_recode[] = - { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4, // unicode U+0400 to U+047f - // A Б->Ð B Г Д E Ж З // 0 Ѐ РЂ Ѓ Є Ð… І Ї - 0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8, // Ј Љ Њ Ћ ÐŒ Ð ÐŽ Ð - // И Й K Л M H O П // 1 РБ Ð’ Г Д Е Ж З - 0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab, // И Й К Л М РО П - // P C T У Ф X Ч ч // 2 Р С Т У Ф Ð¥ Г Ч - 0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1, // Ш Щ Ъ Ы Ь Э Ю Я - // Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з - 0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7, // и й к л м н о п - // a б->Ñ‘ в г д e ж з // 4 Ñ€ Ñ Ñ‚ у Ñ„ Ñ… ц ч - 0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe, // ш щ ÑŠ Ñ‹ ÑŒ Ñ ÑŽ Ñ - // и й к л м н o п // 5 Ñ Ñ‘ Ñ’ Ñ“ Ñ” Ñ• Ñ– Ñ— - 0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0, // ј Ñ™ Ñš Ñ› Ñœ Ñ Ñž ÑŸ - // p c Ñ‚ y Ñ„ x ц ч // 6 Ñ  Ñ¡ Ñ¢ Ñ£ Ѥ Ñ¥ Ѧ ѧ - 0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7 // Ѫ Ñ© Ѫ Ñ« Ѭ Ñ­ Ñ® ѯ - // ш щ ÑŠ Ñ‹ ÑŒ Ñ ÑŽ Ñ // 7 Ѱ ѱ Ѳ ѳ Ñ´ ѵ Ѷ Ñ· - }; // Ñ» ѹ Ѻ Ñ» Ѽ ѽ Ѿ Ñ¿ - #elif ENABLED(MAPPER_C2C3) - #error "Western languages on a CYRILLIC display makes no sense. There are no matching symbols." - #elif ENABLED(MAPPER_E382E383) - #error "Katakana on a CYRILLIC display makes no sense. There are no matching symbols." - #endif - #else - #error "Something went wrong in the setting of DISPLAY_CHARSET_HD44780" - #endif // DISPLAY_CHARSET_HD44780 -#endif // SIMULATE_ROMFONT - -#if ENABLED(MAPPER_C2C3) - - char charset_mapper(char c) { - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_c2 = false; - uint8_t d = c; - if ( d >= 0x80u ) { // UTF-8 handling - if ( (d >= 0xc0u) && (!seen_c2) ) { - utf_hi_char = d - 0xc2u; - seen_c2 = true; - return 0; - } - else if (seen_c2) { - d &= 0x3fu; - #ifndef MAPPER_ONE_TO_ONE - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); - #else - HARDWARE_CHAR_OUT((char)(0x80u + (utf_hi_char << 6) + d)) ; - #endif - } - else { - HARDWARE_CHAR_OUT('?'); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_c2 = false; - return 1; - } - -#elif ENABLED(MAPPER_CECF) - - char charset_mapper(char c) { - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_ce = false; - uint8_t d = c; - if ( d >= 0x80 ) { // UTF-8 handling - if ( (d >= 0xc0) && (!seen_ce) ) { - utf_hi_char = d - 0xce; - seen_ce = true; - return 0; - } - else if (seen_ce) { - d &= 0x3f; - #ifndef MAPPER_ONE_TO_ONE - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); - #else - HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ; - #endif - } - else { - HARDWARE_CHAR_OUT('?'); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_ce = false; - return 1; - } - -#elif ENABLED(MAPPER_CECF) - - char charset_mapper(char c) { - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_ce = false; - uint8_t d = c; - if ( d >= 0x80 ) { // UTF-8 handling - if ( (d >= 0xc0) && (!seen_ce) ) { - utf_hi_char = d - 0xce; - seen_ce = true; - return 0; - } - else if (seen_ce) { - d &= 0x3f; - #ifndef MAPPER_ONE_TO_ONE - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); - #else - HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ; - #endif - } - else { - HARDWARE_CHAR_OUT('?'); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_ce = false; - return 1; - } - -#elif ENABLED(MAPPER_D0D1_MOD) - - char charset_mapper(char c) { - // it is a Russian alphabet translation - // except 0401 --> 0xa2 = Ð, 0451 --> 0xb5 = Ñ‘ - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_d5 = false; - uint8_t d = c; - if (d >= 0x80) { // UTF-8 handling - if (d >= 0xd0 && !seen_d5) { - utf_hi_char = d - 0xd0; - seen_d5 = true; - return 0; - } - else if (seen_d5) { - d &= 0x3f; - if (!utf_hi_char && d == 1) { - HARDWARE_CHAR_OUT((char) 0xa2); // Ð - } - else if (utf_hi_char == 1 && d == 0x11) { - HARDWARE_CHAR_OUT((char)0xb5); // Ñ‘ - } - else { - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x10)); - } - } - else { - HARDWARE_CHAR_OUT('?'); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_d5 = false; - return 1; - } - -#elif ENABLED(MAPPER_D0D1) - - char charset_mapper(char c) { - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_d5 = false; - uint8_t d = c; - if (d >= 0x80u) { // UTF-8 handling - if (d >= 0xd0u && !seen_d5) { - utf_hi_char = d - 0xd0u; - seen_d5 = true; - return 0; - } - else if (seen_d5) { - d &= 0x3fu; - #ifndef MAPPER_ONE_TO_ONE - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); - #else - HARDWARE_CHAR_OUT((char)(0xa0u + (utf_hi_char << 6) + d)) ; - #endif - } - else { - HARDWARE_CHAR_OUT('?'); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_d5 = false; - return 1; - } - -#elif ENABLED(MAPPER_E382E383) - - char charset_mapper(char c) { - static uint8_t utf_hi_char; // UTF-8 high part - static bool seen_e3 = false; - static bool seen_82_83 = false; - uint8_t d = c; - if (d >= 0x80) { // UTF-8 handling - if (d == 0xe3 && !seen_e3) { - seen_e3 = true; - return 0; // eat 0xe3 - } - else if (d >= 0x82 && seen_e3 && !seen_82_83) { - utf_hi_char = d - 0x82; - seen_82_83 = true; - return 0; - } - else if (seen_e3 && seen_82_83) { - d &= 0x3f; - #ifndef MAPPER_ONE_TO_ONE - HARDWARE_CHAR_OUT((char)pgm_read_byte_near(utf_recode + d + (utf_hi_char << 6) - 0x20)); - #else - HARDWARE_CHAR_OUT((char)(0x80 + (utf_hi_char << 6) + d)) ; - #endif - } - else { - HARDWARE_CHAR_OUT((char) '?' ); - } - } - else { - HARDWARE_CHAR_OUT((char) c ); - } - seen_e3 = false; - seen_82_83 = false; - return 1; - } - -#else - - #define MAPPER_NON - - char charset_mapper(char c) { - HARDWARE_CHAR_OUT( c ); - return 1; - } - - #endif // code mappers - -#endif // UTF_MAPPER_H diff --git a/Marlin/utility.cpp b/Marlin/utility.cpp deleted file mode 100644 index 0285219..0000000 --- a/Marlin/utility.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" -#include "utility.h" -#include "temperature.h" - -void safe_delay(millis_t ms) { - while (ms > 50) { - ms -= 50; - delay(50); - thermalManager.manage_heater(); - } - delay(ms); -} diff --git a/Marlin/utility.h b/Marlin/utility.h deleted file mode 100644 index 8ca70db..0000000 --- a/Marlin/utility.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef __UTILITY_H__ -#define __UTILITY_H__ - -void safe_delay(millis_t ms); - -#endif diff --git a/Marlin/vector_3.cpp b/Marlin/vector_3.cpp deleted file mode 100644 index 1cca0d9..0000000 --- a/Marlin/vector_3.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - 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 -#include "Marlin.h" - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) -#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() { return sqrt((x * x) + (y * y) + (z * z)); } - -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(const char title[]) { - SERIAL_PROTOCOL(title); - SERIAL_PROTOCOLPGM(" x: "); - SERIAL_PROTOCOL_F(x, 6); - SERIAL_PROTOCOLPGM(" y: "); - SERIAL_PROTOCOL_F(y, 6); - SERIAL_PROTOCOLPGM(" z: "); - SERIAL_PROTOCOL_F(z, 6); - SERIAL_EOL; -} - -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(const char title[]) { - SERIAL_PROTOCOLLN(title); - int count = 0; - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 3; j++) { - if (matrix[count] >= 0.0) SERIAL_PROTOCOLCHAR('+'); - SERIAL_PROTOCOL_F(matrix[count], 6); - SERIAL_PROTOCOLCHAR(' '); - count++; - } - SERIAL_EOL; - } -} - -#endif // AUTO_BED_LEVELING_FEATURE - diff --git a/Marlin/vector_3.h b/Marlin/vector_3.h deleted file mode 100644 index e76188b..0000000 --- a/Marlin/vector_3.h +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - 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 - -#if ENABLED(AUTO_BED_LEVELING_FEATURE) -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(const 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(const char title[]); -}; - - -void apply_rotation_xyz(matrix_3x3 rotationMatrix, float& x, float& y, float& z); -#endif // AUTO_BED_LEVELING_FEATURE - -#endif // VECTOR_3_H diff --git a/Marlin/watchdog.cpp b/Marlin/watchdog.cpp deleted file mode 100644 index 4397ab6..0000000 --- a/Marlin/watchdog.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#include "Marlin.h" - -#if ENABLED(USE_WATCHDOG) - -#include "watchdog.h" - -// Initialize watchdog with a 4 sec interrupt time -void watchdog_init() { - #if ENABLED(WATCHDOG_RESET_MANUAL) - // We enable the watchdog timer, but only for the interrupt. - // Take care, as this requires the correct order of operation, with interrupts disabled. See the datasheet of any AVR chip for details. - wdt_reset(); - _WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE); - _WD_CONTROL_REG = _BV(WDIE) | WDTO_4S; - #else - wdt_enable(WDTO_4S); - #endif -} - -//=========================================================================== -//=================================== ISR =================================== -//=========================================================================== - -// Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled. -#if ENABLED(WATCHDOG_RESET_MANUAL) - ISR(WDT_vect) { - SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("Something is wrong, please turn off the printer."); - kill(PSTR("ERR:Please Reset")); //kill blocks //16 characters so it fits on a 16x2 display - while (1); //wait for user or serial reset - } -#endif //WATCHDOG_RESET_MANUAL - -#endif //USE_WATCHDOG diff --git a/Marlin/watchdog.h b/Marlin/watchdog.h deleted file mode 100644 index 2c04b58..0000000 --- a/Marlin/watchdog.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -#ifndef WATCHDOG_H -#define WATCHDOG_H - -#include "Marlin.h" -#include - -// Initialize watchdog with a 4 second interrupt time -void watchdog_init(); - -// Reset watchdog. MUST be called at least every 4 seconds after the -// first watchdog_init or AVR will go into emergency procedures. -inline void watchdog_reset() { wdt_reset(); } - -#endif diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 5bf6530..cb59ce0 --- a/README.md +++ b/README.md @@ -1,11 +1,69 @@ -# Swift Pro Firmware (Base on Marlin https://www.marlinfw.org/) - - - -## Document & Support - -Visit http://www.ufactory.cc/#/en/support/ for more details. - -## License - -Swift Pro Firmware is published under the [GPL license](/LICENSE) \ No newline at end of file +# Swift Pro Firmware V4.10.0 (Base on [Grbl v0.9j](https://github.com/grbl/grbl) ) + +---------- +## Update Summary for v4.10.0 + +* Fix M2210 frequency bug +* Fix G0 Speed bug +* Fix stop and recover bug +* Add P2236 G2207 G2208 interface + +## Caution +#### The current firmware is not perfect and will be updated periodically +#### Not support app control +#### For uArmStudio control + +- input and Grove module in BLOCKLY are not supported. +- 3D Printing is not supported. + +## Communication protocol +#### For serial terminal control + +First, connect to uArm using the serial terminal of your choice.Set the baud rate to 115200 as 8-N-1 (8-bits, no parity, and 1-stop bit.) .Cmd list reference to [protocol documents](doc/). + +* move cmd support **G0,G1,G2004,G2201,G2202,G2204,G2205,G2206,G2207,G2208**. +* setting cmd support **M17,M204,M2019,M2120,M2121,M2122,M2201,M2202,M2203,M2210,M2215,M2220,M2221,M2222,M2231,M2232,M2233,M2400,M2401,M2410,M2411,M2240,M2241**. +not support currently **M2211,M2212,M2213,M2234,M2245**. +* query cmd support +**P2200,P2201,P2202,P2203,P2204,P2205,P2206,P2220,P2221,P2231,P2231,P2232,P2233,P2234,P2236,P2240,P2241,P2242,P2400**. +---------- +## How to upgrade uArm + +### 1ã€Flashing Firmware to uArm +#### To Determine your uArm's COM port: + +* Windows XP: Right click on "My Computer", select "Properties", select "Device Manager". +* Windows 7: Click "Start" -> Right click "Computer" -> Select "Manage" -> Select "Device Manager" from left pane. +* In the tree, expand "Ports (COM & LPT)". +* Your uArm will be the **Arduino Mega 2560 (COMX)**, the “X†represents the COM number, for example COM6. +* If there are multiple USB serial ports, right click each one and check the manufacturer, the Arduino will be "FTDI". +#### To flash hex to Swift Pro: + +* Download the [hex](hex/) +* Download and extract [XLoader](https://raw.githubusercontent.com/uArm-Developer/SwiftProForArduino/Version_V4.0/imagaes/XLoader.zip). +* Open XLoader and select your uArm's COM port from the drop down menu on the lower left. +* Select the appropriate device from the dropdown list titled "Device". +* Check that Xloader set the correct baud rate for the device: 115200 for Mega (ATMEGA2560). +* Now use the browse button on the top right of the form to browse to your hex file. +* Once your hex file is selected, click "Upload" +The upload process generally takes about 10 seconds to finish. Once completed, a message will appear in the bottom left corner of XLoader telling you how many bytes were uploaded. If there was an error, it would show instead of the total bytes uploaded. Steps should be similar and may be done through the command prompt. + +### 2ã€Control your uArm +you have three ways to control your uArm: + +* using the serial terminal [example](example) +* using the [Python library 2.0](https://github.com/uArm-Developer/uArm-Python-SDK/tree/2.0 "Python library 2.0") +* using the [https://github.com/uArm-Developer/uArm-SDK](https://github.com/uArm-Developer/uArm-SDK "C++ library") +* using the uArmStudio + + +## License + +Swift Pro Firmware is published under the [GPL license](/LICENSE) + + + + + + + diff --git a/buildroot/bin/build_marlin b/buildroot/bin/build_marlin deleted file mode 100644 index 12c3bd4..0000000 --- a/buildroot/bin/build_marlin +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -arduino --verify --board arduino:avr:mega:cpu=atmega2560 Marlin/Marlin.ino diff --git a/buildroot/bin/generate_version_header_for_marlin b/buildroot/bin/generate_version_header_for_marlin deleted file mode 100644 index 4310084..0000000 --- a/buildroot/bin/generate_version_header_for_marlin +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# generate_version_header_for_marlin - -DIR="${1}" - -BUILDATE=$(date '+%s') -DISTDATE=$(date '+%Y-%m-%d %H:%M') - -BRANCH=$(git -C "${DIR}" symbolic-ref -q --short HEAD) -VERSION=$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null) - -if [ -z "${BRANCH}" ]; then - BRANCH=$(echo "${TRAVIS_BRANCH}") -fi - -if [ -z "${VERSION}" ]; then - VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null) -fi - -SHORT_BUILD_VERSION=$(echo "${BRANCH}") -DETAILED_BUILD_VERSION=$(echo "${BRANCH}-${VERSION}") - -# Gets some misc options from their defaults -DEFAULT_MACHINE_UUID=$(awk -F'"' \ - '/#define DEFAULT_MACHINE_UUID/{ print $2 }' < "${DIR}/Version.h") -MACHINE_NAME=$(awk -F'"' \ - '/#define MACHINE_NAME/{ print $2 }' < "${DIR}/Version.h") -PROTOCOL_VERSION=$(awk -F'"' \ - '/#define PROTOCOL_VERSION/{ print $2 }' < "${DIR}/Version.h") -SOURCE_CODE_URL=$(awk -F'"' \ - '/#define SOURCE_CODE_URL/{ print $2 }' < "${DIR}/Version.h") -WEBSITE_URL=$(awk -F'"' \ - '/#define WEBSITE_URL/{ print $2 }' < "${DIR}/Version.h") - -cat > "${DIR}/_Version.h" <&2 - echo -e " \e[0;92m-h\e[0m to switch to HTTPS" 1>&2 - echo -e " \e[0;92m-s\e[0m to switch to SSH" 1>&2 - exit 1 - ;; -esac - -REMOTES=$(git remote -v | egrep "\t$MATCH" | gawk '{print $1 " " $2}' | sort -u | sed "s/$FORMULA/") - -if [[ -z $REMOTES ]]; then - echo "Nothing to do." ; exit -fi - -echo "$REMOTES" | xargs -n2 git remote set-url - -echo -n "Remotes set to $TYPE: " -echo "$REMOTES" | gawk '{printf "%s ", $1}' -echo diff --git a/buildroot/share/git/mfinfo b/buildroot/share/git/mfinfo deleted file mode 100644 index 533b30a..0000000 --- a/buildroot/share/git/mfinfo +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# -# mfinfo -# -# Get the following helpful git info about the working directory: -# -# - Remote (upstream) Org name (MarlinFirmware) -# - Remote (origin) Org name (your Github username) -# - Repo Name (Marlin or MarlinDev) -# - Marlin Target branch (RCBugFix or dev) -# - Branch Name (the current branch or the one that was passed) -# - -REPO=$(git remote get-url upstream 2>/dev/null | sed -E 's/.*\/(.*)\.git/\1/') - -if [[ -z $REPO ]]; then - echo "`basename $0`: No 'upstream' remote found." 1>&2 ; exit 1 -fi - -ORG=$(git remote get-url upstream 2>/dev/null | sed -E 's/.*[\/:](.*)\/.*$/\1/') - -if [[ $ORG != MarlinFirmware ]]; then - echo "`basename $0`: Not a Marlin repository." - exit 1 -fi - -case "$REPO" in - Marlin ) TARG=RCBugFix ;; - MarlinDev ) TARG=dev ;; -esac - -FORK=$(git remote get-url origin 2>/dev/null | sed -E 's/.*[\/:](.*)\/.*$/\1/') - -case "$#" in - 0 ) BRANCH=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g') ;; - 1 ) BRANCH=$1 ;; - * ) echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1 ;; -esac - -echo "$ORG $FORK $REPO $TARG $BRANCH" diff --git a/buildroot/share/git/mfinit b/buildroot/share/git/mfinit deleted file mode 100644 index 5e2cbc0..0000000 --- a/buildroot/share/git/mfinit +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# -# mfinit -# -# Create the upstream repository for Marlin -# - -git remote add upstream git@github.com:MarlinFirmware/Marlin.git diff --git a/buildroot/share/git/mfnew b/buildroot/share/git/mfnew deleted file mode 100644 index 0a07513..0000000 --- a/buildroot/share/git/mfnew +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# -# mfnew -# -# Create a new branch based on RCBugFix or dev a given branch name -# - -MFINFO=$(mfinfo) || exit -IFS=' ' read -a INFO <<< "$MFINFO" -TARG=${INFO[3]} - -if [[ ${INFO[4]} == "(no" ]]; then - echo "Branch is unavailable!" - exit 1 -fi - -case "$#" in - 0 ) BRANCH=pr_for_$TARG-$(date +"%G-%d-%m|%H:%M:%S") ;; - 1 ) BRANCH=$1 ;; - * ) echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1 ;; -esac - -git checkout $TARG -b $BRANCH diff --git a/buildroot/share/git/mfpr b/buildroot/share/git/mfpr deleted file mode 100644 index 8eff484..0000000 --- a/buildroot/share/git/mfpr +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# -# mfpr -# -# Make a PR of the current branch against RCBugFix or dev -# - -MFINFO=$(mfinfo "$@") || exit - -IFS=' ' read -a INFO <<< "$MFINFO" - -ORG=${INFO[0]} -FORK=${INFO[1]} -REPO=${INFO[2]} -TARG=${INFO[3]} -BRANCH=${INFO[4]} - -if [[ $BRANCH == "(no" ]]; then - echo "Git is busy with merge, rebase, etc." - exit 1 -fi - -if [[ ! -z "$1" ]]; then { BRANCH=$1 ; git checkout $1 || exit 1; } fi - -if [[ $BRANCH == $TARG ]]; then - echo "Can't make a PR from $BRANCH" ; exit -fi - -if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi - -TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') -URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1" - -if [ -z "$TOOL" ]; then - echo "Can't find a tool to open the URL:" - echo $URL -else - echo "Opening a New PR Form..." - "$TOOL" "$URL" -fi diff --git a/buildroot/share/git/mfprune b/buildroot/share/git/mfprune deleted file mode 100644 index 48fa9fd..0000000 --- a/buildroot/share/git/mfprune +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# mfprune -# -# Prune all your merged branches and any branches whose remotes are gone -# Great way to clean up your branches after messing around a lot -# - -echo "Pruning Merged Branches..." -git branch --merged | egrep -v "^\*|RC|RCBugFix|dev" | xargs -n 1 git branch -d -echo - -echo "Pruning Remotely-deleted Branches..." -git branch -vv | egrep -v "^\*|RC|RCBugFix|dev" | grep ': gone]' | gawk '{print $1}' | xargs -n 1 git branch -D -echo - -echo "You may want to remove these remote tracking references..." -comm -23 \ - <(git branch --all | sed 's/^[\* ] //' | grep origin/ | grep -v "\->" | awk '{ print $1; }' | sed 's/remotes\/origin\///') \ - <(git branch --all | sed 's/^[\* ] //' | grep -v remotes/ | awk '{ print $1; }') \ - | awk '{ print "git branch -d -r origin/" $1; }' -echo diff --git a/buildroot/share/git/mfrb b/buildroot/share/git/mfrb deleted file mode 100644 index c1366f7..0000000 --- a/buildroot/share/git/mfrb +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# -# mfrb -# -# Do "git rebase -i" against the "target" branch (RCBugFix or dev) -# - -MFINFO=$(mfinfo) || exit -IFS=' ' read -a INFO <<< "$MFINFO" - -if [[ ${INFO[4]} == "(no" ]]; then - echo "Branch is unavailable!" - exit 1 -fi - -case "$#" in - 0 ) ;; - * ) echo "Usage: `basename $0`" 1>&2 ; exit 1 ;; -esac - -git rebase -i ${INFO[3]} diff --git a/buildroot/share/git/mfup b/buildroot/share/git/mfup deleted file mode 100644 index ff19e0e..0000000 --- a/buildroot/share/git/mfup +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# -# mfup -# -# Fetch and merge upstream changes, optionally with a branch -# - -MFINFO=$(mfinfo) || exit - -IFS=' ' read -a INFO <<< "$MFINFO" - -ORG=${INFO[0]} -FORK=${INFO[1]} -REPO=${INFO[2]} -TARG=${INFO[3]} -OLDBRANCH=${INFO[4]} - -if [[ $OLDBRANCH == "(no" ]]; then - echo "Branch is unavailable!" - exit 1 -fi - -case "$#" in - 0 ) BRANCH=$OLDBRANCH ;; - 1 ) BRANCH=$1 ;; - * ) echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1 ;; -esac - -set -e - -echo "Fetching upstream ($ORG/$REPO)..." -git fetch upstream - -echo ; echo "Bringing $TARG up to date..." -git checkout -q $TARG || git branch checkout upstream/$TARG -b $TARG && git push --set-upstream origin $TARG -git merge upstream/$TARG -git push origin - -if [[ $BRANCH != $TARG ]]; then - echo ; echo "Rebasing $BRANCH on $TARG..." - if git checkout $BRANCH; then - echo - if git rebase $TARG; then - git push -f ; echo - [[ $BRANCH != $OLDBRANCH ]] && git checkout $OLDBRANCH - else - echo "Looks like merge conflicts. Stopping here." - fi - else - echo "No such branch!" ; echo - git checkout $OLDBRANCH - fi -fi diff --git a/buildroot/share/pixmaps/logo/SwiftPro.png b/buildroot/share/pixmaps/logo/SwiftPro.png deleted file mode 100644 index 19d8483..0000000 Binary files a/buildroot/share/pixmaps/logo/SwiftPro.png and /dev/null differ diff --git a/buildroot/share/pixmaps/logo/marlin-1080.png b/buildroot/share/pixmaps/logo/marlin-1080.png deleted file mode 100644 index b21d0ca..0000000 Binary files a/buildroot/share/pixmaps/logo/marlin-1080.png and /dev/null differ diff --git a/buildroot/share/pixmaps/logo/marlin-250.png b/buildroot/share/pixmaps/logo/marlin-250.png deleted file mode 100644 index 90576d8..0000000 Binary files a/buildroot/share/pixmaps/logo/marlin-250.png and /dev/null differ diff --git a/buildroot/share/pixmaps/logo/marlin-old-250.png b/buildroot/share/pixmaps/logo/marlin-old-250.png deleted file mode 100644 index 64f9902..0000000 Binary files a/buildroot/share/pixmaps/logo/marlin-old-250.png and /dev/null differ diff --git a/buildroot/share/pixmaps/logo/marlin-old-627.png b/buildroot/share/pixmaps/logo/marlin-old-627.png deleted file mode 100644 index 2f48631..0000000 Binary files a/buildroot/share/pixmaps/logo/marlin-old-627.png and /dev/null differ diff --git a/buildroot/share/pixmaps/logo/marlin-old.svg b/buildroot/share/pixmaps/logo/marlin-old.svg deleted file mode 100644 index d621d3a..0000000 --- a/buildroot/share/pixmaps/logo/marlin-old.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - Marlin Firmware - - - - - - image/svg+xml - - Marlin Firmware - - - Ahmet Cem TURAN - - - - - MarlinFirmware - - - - - João Brázio - - - marlin-logo-old - - - - - - - - - - - - - - diff --git a/buildroot/share/pixmaps/logo/marlin.svg b/buildroot/share/pixmaps/logo/marlin.svg deleted file mode 100644 index e608a7e..0000000 --- a/buildroot/share/pixmaps/logo/marlin.svg +++ /dev/null @@ -1,131 +0,0 @@ - - - -Marlin Firmware image/svg+xmlMarlin Firmware Ahmet Cem TURANJoão BrázioMarlinFirmwaremarlin-logo-new \ No newline at end of file diff --git a/buildroot/share/scripts/createSpeedLookupTable.py b/buildroot/share/scripts/createSpeedLookupTable.py deleted file mode 100644 index 13ed92d..0000000 --- a/buildroot/share/scripts/createSpeedLookupTable.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python - -""" Generate the stepper delay lookup table for Marlin firmware. """ - -import argparse - -__author__ = "Ben Gamari " -__copyright__ = "Copyright 2012, Ben Gamari" -__license__ = "GPL" - -parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument('-f', '--cpu-freq', type=int, default=16, help='CPU clockrate in MHz (default=16)') -parser.add_argument('-d', '--divider', type=int, default=8, help='Timer/counter pre-scale divider (default=8)') -args = parser.parse_args() - -cpu_freq = args.cpu_freq * 1000000 -timer_freq = cpu_freq / args.divider - -print "#ifndef SPEED_LOOKUPTABLE_H" -print "#define SPEED_LOOKUPTABLE_H" -print -print '#include "Marlin.h"' -print - -print "const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {" -a = [ timer_freq / ((i*256)+(args.cpu_freq*2)) for i in range(256) ] -b = [ a[i] - a[i+1] for i in range(255) ] -b.append(b[-1]) -for i in range(32): - print " ", - for j in range(8): - print "{%d, %d}," % (a[8*i+j], b[8*i+j]), - print -print "};" -print - -print "const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {" -a = [ timer_freq / ((i*8)+(args.cpu_freq*2)) for i in range(256) ] -b = [ a[i] - a[i+1] for i in range(255) ] -b.append(b[-1]) -for i in range(32): - print " ", - for j in range(8): - print "{%d, %d}," % (a[8*i+j], b[8*i+j]), - print -print "};" -print - -print "#endif" - diff --git a/buildroot/share/scripts/createTemperatureLookupMarlin.py b/buildroot/share/scripts/createTemperatureLookupMarlin.py deleted file mode 100644 index 9859caa..0000000 --- a/buildroot/share/scripts/createTemperatureLookupMarlin.py +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/python -"""Thermistor Value Lookup Table Generator - -Generates lookup to temperature values for use in a microcontroller in C format based on: -http://en.wikipedia.org/wiki/Steinhart-Hart_equation - -The main use is for Arduino programs that read data from the circuit board described here: -http://reprap.org/wiki/Temperature_Sensor_v2.0 - -Usage: python createTemperatureLookup.py [options] - -Options: - -h, --help show this help - --rp=... pull-up resistor - --t1=ttt:rrr low temperature temperature:resistance point (around 25 degC) - --t2=ttt:rrr middle temperature temperature:resistance point (around 150 degC) - --t3=ttt:rrr high temperature temperature:resistance point (around 250 degC) - --num-temps=... the number of temperature points to calculate (default: 36) -""" - -from math import * -import sys -import getopt - -"Constants" -ZERO = 273.15 # zero point of Kelvin scale -VADC = 5 # ADC voltage -VCC = 5 # supply voltage -ARES = pow(2,10) # 10 Bit ADC resolution -VSTEP = VADC / ARES # ADC voltage resolution -TMIN = 0 # lowest temperature in table -TMAX = 350 # highest temperature in table - -class Thermistor: - "Class to do the thermistor maths" - def __init__(self, rp, t1, r1, t2, r2, t3, r3): - l1 = log(r1) - l2 = log(r2) - l3 = log(r3) - y1 = 1.0 / (t1 + ZERO) # adjust scale - y2 = 1.0 / (t2 + ZERO) - y3 = 1.0 / (t3 + ZERO) - x = (y2 - y1) / (l2 - l1) - y = (y3 - y1) / (l3 - l1) - c = (y - x) / ((l3 - l2) * (l1 + l2 + l3)) - b = x - c * (l1**2 + l2**2 + l1*l2) - a = y1 - (b + l1**2 *c)*l1 - - if c < 0: - print "//////////////////////////////////////////////////////////////////////////////////////" - print "// WARNING: negative coefficient 'c'! Something may be wrong with the measurements! //" - print "//////////////////////////////////////////////////////////////////////////////////////" - c = -c - self.c1 = a # Steinhart-Hart coefficients - self.c2 = b - self.c3 = c - self.rp = rp # pull-up resistance - - def resol(self, adc): - "Convert ADC reading into a resolution" - res = self.temp(adc)-self.temp(adc+1) - return res - - def voltage(self, adc): - "Convert ADC reading into a Voltage" - return adc * VSTEP # convert the 10 bit ADC value to a voltage - - def resist(self, adc): - "Convert ADC reading into a resistance in Ohms" - r = self.rp * self.voltage(adc) / (VCC - self.voltage(adc)) # resistance of thermistor - return r - - def temp(self, adc): - "Convert ADC reading into a temperature in Celcius" - l = log(self.resist(adc)) - Tinv = self.c1 + self.c2*l + self.c3* l**3 # inverse temperature - return (1/Tinv) - ZERO # temperature - - def adc(self, temp): - "Convert temperature into a ADC reading" - x = (self.c1 - (1.0 / (temp+ZERO))) / (2*self.c3) - y = sqrt((self.c2 / (3*self.c3))**3 + x**2) - r = exp((y-x)**(1.0/3) - (y+x)**(1.0/3)) - return (r / (self.rp + r)) * ARES - -def main(argv): - "Default values" - t1 = 25 # low temperature in Kelvin (25 degC) - r1 = 100000 # resistance at low temperature (10 kOhm) - t2 = 150 # middle temperature in Kelvin (150 degC) - r2 = 1641.9 # resistance at middle temperature (1.6 KOhm) - t3 = 250 # high temperature in Kelvin (250 degC) - r3 = 226.15 # resistance at high temperature (226.15 Ohm) - rp = 4700; # pull-up resistor (4.7 kOhm) - num_temps = 36; # number of entries for look-up table - - try: - opts, args = getopt.getopt(argv, "h", ["help", "rp=", "t1=", "t2=", "t3=", "num-temps="]) - except getopt.GetoptError as err: - print str(err) - usage() - sys.exit(2) - - for opt, arg in opts: - if opt in ("-h", "--help"): - usage() - sys.exit() - elif opt == "--rp": - rp = int(arg) - elif opt == "--t1": - arg = arg.split(':') - t1 = float(arg[0]) - r1 = float(arg[1]) - elif opt == "--t2": - arg = arg.split(':') - t2 = float(arg[0]) - r2 = float(arg[1]) - elif opt == "--t3": - arg = arg.split(':') - t3 = float(arg[0]) - r3 = float(arg[1]) - elif opt == "--num-temps": - num_temps = int(arg) - - t = Thermistor(rp, t1, r1, t2, r2, t3, r3) - increment = int((ARES-1)/(num_temps-1)); - step = (TMIN-TMAX) / (num_temps-1) - low_bound = t.temp(ARES-1); - up_bound = t.temp(1); - min_temp = int(TMIN if TMIN > low_bound else low_bound) - max_temp = int(TMAX if TMAX < up_bound else up_bound) - temps = range(max_temp, TMIN+step, step); - - print "// Thermistor lookup table for Marlin" - print "// ./createTemperatureLookupMarlin.py --rp=%s --t1=%s:%s --t2=%s:%s --t3=%s:%s --num-temps=%s" % (rp, t1, r1, t2, r2, t3, r3, num_temps) - print "// Steinhart-Hart Coefficients: a=%.15g, b=%.15g, c=%.15g " % (t.c1, t.c2, t.c3) - print "// Theoretical limits of termistor: %.2f to %.2f degC" % (low_bound, up_bound) - print - print "#define NUMTEMPS %s" % (len(temps)) - print "const short temptable[NUMTEMPS][2] PROGMEM = {" - - for temp in temps: - adc = t.adc(temp) - print " { (short) (%7.2f * OVERSAMPLENR ), %4s }%s // v=%.3f\tr=%.3f\tres=%.3f degC/count" % (adc , temp, \ - ',' if temp != temps[-1] else ' ', \ - t.voltage(adc), \ - t.resist( adc), \ - t.resol( adc) \ - ) - print "};" - -def usage(): - print __doc__ - -if __name__ == "__main__": - main(sys.argv[1:]) diff --git a/buildroot/share/scripts/findMissingTranslations.sh b/buildroot/share/scripts/findMissingTranslations.sh deleted file mode 100644 index b31c09d..0000000 --- a/buildroot/share/scripts/findMissingTranslations.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -IGNORE_DEFINES="LANGUAGE_EN_H MAPPER_NON SIMULATE_ROMFONT DISPLAY_CHARSET_ISO10646_1 MSG_H1 MSG_H2 MSG_H3 MSG_H4 MSG_MOVE_E1 MSG_MOVE_E2 MSG_MOVE_E3 MSG_MOVE_E4 MSG_N1 MSG_N2 MSG_N3 MSG_N4 MSG_DIAM_E1 MSG_DIAM_E2 MSG_DIAM_E3 MSG_DIAM_E4 MSG_E1 MSG_E2 MSG_E3 MSG_E4" - -for i in `awk '/#define/{print $2}' language_en.h`; do - for j in `ls language_*.h | grep -v language_en.h`; do - t=$(grep -c "${i}" ${j}) - if [ "$t" -eq 0 ]; then - for k in ${IGNORE_DEFINES}; do - [ "${k}" == "${i}" ] && continue 2; - done - echo "${j},${i}" - fi - done -done diff --git a/buildroot/share/scripts/g29_auto.py b/buildroot/share/scripts/g29_auto.py deleted file mode 100644 index 884e62b..0000000 --- a/buildroot/share/scripts/g29_auto.py +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/python3 - -# This file is for preprocessing gcode and the new G29 Autobedleveling from Marlin -# It will analyse the first 2 Layer and return the maximum size for this part -# After this it will replace with g29_keyword = ';MarlinG29Script' with the new G29 LRFB -# the new file will be created in the same folder. - -# your gcode-file/folder -folder = './' -my_file = 'test.gcode' - -# this is the minimum of G1 instructions which should be between 2 different heights -min_g1 = 3 - -# maximum number of lines to parse, I don't want to parse the complete file -# only the first plane is we are interested in -max_g1 = 100000000 - -# g29 keyword -g29_keyword = 'g29' -g29_keyword = g29_keyword.upper() - -# output filename -output_file = folder + 'g29_' + my_file -# input filename -input_file = folder + my_file - -# minimum scan size -min_size = 40 -probing_points = 3 # points x points - -# other stuff -min_x = 500 -min_y = min_x -max_x = -500 -max_y = max_x -last_z = 0.001 - -layer = 0 -lines_of_g1 = 0 - -gcode = [] - - -# return only g1-lines -def has_g1(line): - return line[:2].upper() == "G1" - - -# find position in g1 (x,y,z) -def find_axis(line, axis): - found = False - number = "" - for char in line: - if found: - if char == ".": - number += char - elif char == "-": - number += char - else: - try: - int(char) - number += char - except ValueError: - break - else: - found = char.upper() == axis.upper() - try: - return float(number) - except ValueError: - return None - - -# save the min or max-values for each axis -def set_mima(line): - global min_x, max_x, min_y, max_y, last_z - - current_x = find_axis(line, 'x') - current_y = find_axis(line, 'y') - - if current_x is not None: - min_x = min(current_x, min_x) - max_x = max(current_x, max_x) - if current_y is not None: - min_y = min(current_y, min_y) - max_y = max(current_y, max_y) - - return min_x, max_x, min_y, max_y - - -# find z in the code and return it -def find_z(gcode, start_at_line=0): - for i in range(start_at_line, len(gcode)): - my_z = find_axis(gcode[i], 'Z') - if my_z is not None: - return my_z, i - - -def z_parse(gcode, start_at_line=0, end_at_line=0): - i = start_at_line - all_z = [] - line_between_z = [] - z_at_line = [] - # last_z = 0 - last_i = -1 - - while len(gcode) > i: - try: - z, i = find_z(gcode, i + 1) - except TypeError: - break - - all_z.append(z) - z_at_line.append(i) - temp_line = i - last_i -1 - line_between_z.append(i - last_i - 1) - # last_z = z - last_i = i - if 0 < end_at_line <= i or temp_line >= min_g1: - # print('break at line {} at heigth {}'.format(i, z)) - break - - line_between_z = line_between_z[1:] - return all_z, line_between_z, z_at_line - - -# get the lines which should be the first layer -def get_lines(gcode, minimum): - i = 0 - all_z, line_between_z, z_at_line = z_parse(gcode, end_at_line=max_g1) - for count in line_between_z: - i += 1 - if count > minimum: - # print('layer: {}:{}'.format(z_at_line[i-1], z_at_line[i])) - return z_at_line[i - 1], z_at_line[i] - - -with open(input_file, 'r') as file: - lines = 0 - for line in file: - lines += 1 - if lines > 1000: - break - if has_g1(line): - gcode.append(line) -file.close() - -start, end = get_lines(gcode, min_g1) -for i in range(start, end): - set_mima(gcode[i]) - -print('x_min:{} x_max:{}\ny_min:{} y_max:{}'.format(min_x, max_x, min_y, max_y)) - -# resize min/max - values for minimum scan -if max_x - min_x < min_size: - offset_x = int((min_size - (max_x - min_x)) / 2 + 0.5) # int round up - # print('min_x! with {}'.format(int(max_x - min_x))) - min_x = int(min_x) - offset_x - max_x = int(max_x) + offset_x -if max_y - min_y < min_size: - offset_y = int((min_size - (max_y - min_y)) / 2 + 0.5) # int round up - # print('min_y! with {}'.format(int(max_y - min_y))) - min_y = int(min_y) - offset_y - max_y = int(max_y) + offset_y - - -new_command = 'G29 L{0} R{1} F{2} B{3} P{4}\n'.format(min_x, - max_x, - min_y, - max_y, - probing_points) - -out_file = open(output_file, 'w') -in_file = open(input_file, 'r') - -for line in in_file: - if line[:len(g29_keyword)].upper() == g29_keyword: - out_file.write(new_command) - print('write G29') - else: - out_file.write(line) - -file.close() -out_file.close() - -print('auto G29 finished') diff --git a/doc/uArm Swift Pro Protocol V4.2.0_cn.pdf b/doc/uArm Swift Pro Protocol V4.2.0_cn.pdf new file mode 100644 index 0000000..79a51b9 Binary files /dev/null and b/doc/uArm Swift Pro Protocol V4.2.0_cn.pdf differ diff --git a/doc/uArm Swift Pro Protocol V4.2.0_en.pdf b/doc/uArm Swift Pro Protocol V4.2.0_en.pdf new file mode 100644 index 0000000..dd1d1bd Binary files /dev/null and b/doc/uArm Swift Pro Protocol V4.2.0_en.pdf differ diff --git a/example/pick_square.txt b/example/pick_square.txt new file mode 100755 index 0000000..59385f7 --- /dev/null +++ b/example/pick_square.txt @@ -0,0 +1,16 @@ + +M2400 S0 +G1 X200 Y0 Z130 F100 +G1 X200 Y0 Z30 F100 +M2231 V1 +G1 X200 Y0 Z130 F100 +G1 X150 Y-150 Z130 F100 +G1 X150 Y-150 Z30 F100 +M2231 V0 +G1 X150 Y-150 Z130 F100 +G1 X150 Y-150 Z30 F100 +M2231 V1 +G1 X150 Y-150 Z130 F100 +G1 X200 Y0 Z130 F100 +G1 X200 Y0 Z30 F100 +M2231 V0 diff --git a/hex/uArm3Plus_V4.5.0_release_20190924.hex b/hex/uArm3Plus_V4.5.0_release_20190924.hex new file mode 100644 index 0000000..9ef0df1 --- /dev/null +++ b/hex/uArm3Plus_V4.5.0_release_20190924.hex @@ -0,0 +1,3953 @@ +:1000000065C5000084C5000082C5000080C50000F1 +:100010007EC500007CC500007AC5000078C50000E0 +:1000200076C500000C94D25A72C500000C94104999 +:100030006EC500006CC500006AC500000C949D559B +:1000400066C500000C94412A62C5000060C500002E +:100050005EC500005CC500005AC500000C94CC29A8 +:1000600056C500000C94A5300C94953150C5000085 +:100070004EC500004CC500004AC5000048C5000040 +:1000800046C5000044C5000042C500000C948755D9 +:100090000C943D300C9467313AC5000038C500001F +:1000A00036C5000034C5000032C5000030C5000070 +:1000B0002EC500000C944C552AC5000028C5000030 +:1000C00026C5000024C500000C9417550C94D52FAC +:1000D0000C9439311CC500000C946D2F0C940B311D +:1000E00016C500006E14D41ED41E7C149114A614E0 +:1000F000BB14D41EC414D41ED714D41EE614F0149A +:100100005015D41ED41ED41E071521153B15A31D52 +:10011000B31DE21DB31DE61DFD1DEC1DF61D211EC8 +:10012000281E331E3E1E5D1E5F1E621E641E1426A8 +:100130002D2646265F2678269B26B426A32DA92D9C +:10014000AC2DAF2DB32DBB2DC32D302E302E302E28 +:10015000CB2DCE2DD72DE02D302E302E302E302E23 +:10016000302E302EE82DF22DFE2D082E0B2E142EC3 +:100170001D2E232E8F549254815485548B54C95470 +:1001800096549A54A054A454A854AE54B254B6549D +:10019000C954BC54C054C454084AD73B3BCE016E2A +:1001A00084BCBFFDC12F3D6C74319ABD56833DDACE +:1001B0003D00C77F11BED9E4BB4C3E916BAAAABEDD +:1001C000000000803F072C7AA5BA6CC590DA3B93FB +:1001D00065FC8BBC53F810FD3C5692834DBD879D4A +:1001E0003AB63DCBC9BF5BBE73DA0FC93F05A84C19 +:1001F000CDB2D44EB93836A9020C50B991868808D0 +:100200003CA6AAAA2ABE000000803F0000407A1047 +:10021000F35A00A0724E18090010A5D4E80000E8B7 +:100220007648170000E40B54020000CA9A3B000015 +:1002300000E1F505000080969800000040420F00A4 +:100240000000A08601000000102700000000E80365 +:10025000000000006400000000000A000000000030 +:100260000100000000002C76D888DC674F0823DFEF +:10027000C1DFAE59E1B1B796E5E3E453C63AE651C2 +:10028000997696E8E6C28426EB898C9B62ED407CE9 +:100290006FFCEFBC9C9F40F2BAA56FA5F490055A85 +:1002A0002AF75C936B6CF9676DC11BFCE0E40D47AA +:1002B000FEF520E6B500D0ED902E030094357705CD +:1002C0000080841E080000204E0A000000C80C3385 +:1002D0003333330F986E12831141EF8D2114893B14 +:1002E000E65516CFFEE6DB18D1844B381BF77C1D94 +:1002F000901DA4BBE424203284725E228100C9F1E7 +:1003000024ECA1E53D276364696E6F7073757858BE +:100310005B00000020002300260029002C002F0095 +:100320003200000100000301060109010D0A003D31 +:1003300000244E005D0D0A005B302E396A2E3230EB +:100340003136303732363A005D0D0A005B544C4F7F +:100350003A005D0D0A002C005B4739323A005D0D12 +:100360000A002C003A003330003238005B47005D51 +:100370000D0A00205300204600205400204D380074 +:10038000204D3900204D3500204D3400204D3300E4 +:10039000204D3200204D3100204D300020473934AF +:1003A00000204739330020473931002047393000D9 +:1003B00020473230002047323100204731390020B9 +:1003C0004731380020473137002047004733382E67 +:1003D000004738300047330047320047310047308C +:1003E000005B00290D0A00206D617820747261762F +:1003F000656C2C206D6D0020616363656C2C206D35 +:100400006D2F7365635E3200206D617820726174B8 +:10041000652C206D6D2F6D696E002C2073746570D6 +:100420002F6D6D007A00790078002028003D0024AF +:10043000002028686F6D696E672070756C6C2D6F79 +:1004400066662C206D6D290D0A002028686F6D6985 +:100450006E67206465626F756E63652C206D7365D1 +:1004600063290D0A2432373D002028686F6D696EBC +:1004700067207365656B2C206D6D2F6D696E290D7E +:100480000A2432363D002028686F6D696E67206649 +:100490006565642C206D6D2F6D696E290D0A2432FF +:1004A000353D00290D0A2432343D002028686F6D47 +:1004B000696E672064697220696E76657274206D5A +:1004C00061736B3A002028686F6D696E67206379ED +:1004D000636C652C20626F6F6C290D0A2432333DEA +:1004E00000202868617264206C696D6974732C2027 +:1004F000626F6F6C290D0A2432323D002028736F21 +:100500006674206C696D6974732C20626F6F6C293E +:100510000D0A2432313D0020287265706F727420FC +:10052000696E636865732C20626F6F6C290D0A24F5 +:1005300032303D00202861726320746F6C657261F7 +:100540006E63652C206D6D290D0A2431333D00202A +:10055000286A756E6374696F6E206465766961746C +:10056000696F6E2C206D6D290D0A2431323D0029F2 +:100570000D0A2431313D0020287374617475732095 +:100580007265706F7274206D61736B3A0020287011 +:10059000726F62652070696E20696E766572742C68 +:1005A00020626F6F6C290D0A2431303D0020286CC9 +:1005B000696D69742070696E7320696E76657274F6 +:1005C0002C20626F6F6C290D0A24363D00202873A1 +:1005D00074657020656E61626C6520696E76657207 +:1005E000742C20626F6F6C290D0A24353D00290D93 +:1005F0000A24343D00202864697220706F727420D0 +:10060000696E76657274206D61736B3A00290D0A0C +:1006100024333D0020287374657020706F7274203D +:10062000696E76657274206D61736B3A0020287371 +:100630007465702069646C652064656C61792C2038 +:100640006D736563290D0A24323D0020287374659B +:10065000702070756C73652C2075736563290D0AA5 +:1006600024313D0024303D0024242028766965771C +:10067000204772626C2073657474696E6773290D0C +:100680000A2423202876696577202320706172610F +:100690006D6574657273290D0A2447202876696593 +:1006A0007720706172736572207374617465290DAF +:1006B0000A2449202876696577206275696C642070 +:1006C000696E666F290D0A244E20287669657720A9 +:1006D0007374617274757020626C6F636B73290D33 +:1006E0000A24783D76616C756520287361766520F3 +:1006F0004772626C2073657474696E67290D0A24F1 +:100700004E783D6C696E6520287361766520737440 +:10071000617274757020626C6F636B290D0A2443DB +:100720002028636865636B2067636F6465206D6F65 +:100730006465290D0A245820286B696C6C20616C53 +:1007400061726D206C6F636B290D0A24482028723A +:10075000756E20686F6D696E67206379636C6529BB +:100760000D0A7E20286379636C652073746172744E +:10077000290D0A2120286665656420686F6C64294C +:100780000D0A3F202863757272656E742073746160 +:10079000747573290D0A6374726C2D782028726544 +:1007A000736574204772626C290D0A0000002100F5 +:1007B000240027002A002D00300033000101000032 +:1007C000040107010A010D0A00496E76616C696433 +:1007D0002067636F64652049443A00556E6465661E +:1007E000696E656420666565642072617465004D9C +:1007F0006F64616C2067726F75702076696F6C61D1 +:1008000074696F6E00486F6D696E67206E6F74203B +:10081000656E61626C656400416C61726D206C6F25 +:10082000636B004E6F742069646C650045455052DF +:100830004F4D2072656164206661696C2E2055738E +:10084000696E672064656661756C74730056616CCF +:100850007565203C2033207573656300536574749F +:10086000696E672064697361626C65640056616CCF +:100870007565203C203000496E76616C6964207398 +:10088000746174656D656E7400426164206E756D8F +:1008900062657220666F726D617400457870656381 +:1008A00074656420636F6D6D616E64206C65747433 +:1008B0006572006572726F723A20006F6B0D0A00EC +:1008C0000D0A00486F6D696E67206661696C0050A3 +:1008D000726F6265206661696C0041626F7274209C +:1008E000647572696E67206379636C6500536F6627 +:1008F00074206C696D69740048617264206C696D64 +:10090000697400414C41524D3A20003E0D0A002CC2 +:100910004C696D3A002C52583A002C4275663A00E8 +:100920002C002C57506F733A002C002C4D506F73D5 +:100930003A003C446F6F72003C436865636B003C57 +:10094000416C61726D003C486F6D65003C486F6C96 +:1009500064003C52756E003C49646C65005D0D0A94 +:1009600000526573746F72696E67206465666175A5 +:100970006C74730050676D20456E64004368656356 +:100980006B20446F6F720044697361626C65640030 +:10099000456E61626C65640043617574696F6E3A9F +:1009A00020556E6C6F636B656400272448277C2795 +:1009B00024582720746F20756E6C6F636B0052652E +:1009C00073657420746F20636F6E74696E75650053 +:1009D0005B005D0D0A003A002C005B5052423A0069 +:1009E00000002200250028002B002E0031003400DA +:1009F00002010000050108010B01050505050705B9 +:100A000008080808020202020A0A0808040404048A +:100A100001010101010101010303030303030303B6 +:100A2000040707070C0C0C0C0C0C0C0C0202020245 +:100A300006060606060606060B0B0B0B0B0B0B0B2E +:100A400001021020200808102040102040800201E0 +:100A500002010804020101020408102040808040C5 +:100A600020100804020180040201804020100804C4 +:100A70000201080402010102040810204080010262 +:100A800004081020408000000A0B02090C0D0E081B +:100A90000703040100000000000000000000000047 +:100AA0000000000000000000000000000000000046 +:100AB0000000121110000000000000000000000003 +:100AC00000000000000000000000000011241FBE14 +:100AD000CFEFD1E2DEBFCDBF00E00CBF14E0A0E05D +:100AE000B2E0EEE4F4EF00E00BBF02C007900D921D +:100AF000AC3AB107D9F725E1ACEAB4E001C01D92E8 +:100B0000AC39B207E1F70E94C15D0C94257A78CA2E +:100B10002F923F924F925F926F927F928F929F920D +:100B2000AF92BF92CF92DF92EF92FF920F931F93FB +:100B3000CF93DF93CDB7DEB7C85CD1090FB6F89479 +:100B4000DEBF0FBECDBFC754DF4F99838883C95B1B +:100B5000D04089E3E4E2F5E1DF011D928A95E9F7EF +:100B60008AE0EDE5F5E1A5E2B5E101900D928A9507 +:100B7000E1F7FE01E756FF4F1082CD54DF4F198297 +:100B80001882C35BD040C155DF4F19821882CF5AFB +:100B9000D040C154DF4F1882CF5BD040C655DF4FE5 +:100BA0001882CA5AD040C255DF4F1882CE5AD04060 +:100BB000E859F109C456DF4FF983E883CC59D04096 +:100BC0009E01235A3F4FC256DF4F39832883CE59A7 +:100BD000D040CE018F5A9F4FC056DF4F99838883F4 +:100BE000C05AD040DE01A959BF4FCE55DF4FB9835F +:100BF000A883C25AD040E059FF4FCC55DF4FF9834C +:100C0000E883C45AD0409C01285F3F4FCD53DF4F4B +:100C100039832883C35CD040C756DF4F8881C959C8 +:100C2000D040C754DF4FE881F981C95BD040E80F5D +:100C3000F11D1081112311F40C94B3159FEB910F4A +:100C40009A3110F00C94C61E8F5FC756DF4F888311 +:100C5000C959D040AE014B565F4FBE0167567F4F1A +:100C6000C754DF4F88819981C95BD0400E94D0551D +:100C7000882311F40C94C81ECB56DF4FC880D9804E +:100C8000EA80FB80C559D040C701B6010E9433738A +:100C90000E94A070CB54DF4F688379838A839B8343 +:100CA000C55BD040CB54DF4F48805980C55BD040F6 +:100CB000B20180E090E00E94CC709B01AC01C701C2 +:100CC000B6010E94526F20E030E048EC52E40E94EE +:100CD00085724B015C0120E030E0A9010E944A725C +:100CE00020E030E040E05FE387FD05C0C501B401CE +:100CF0000E94536F04C0C501B4010E94526F0E944C +:100D00009B701B011D3411F40C942F0F24F4173425 +:100D100061F00C945B14103511F40C94C50F13356D +:100D200011F40C94E7130C945B14C756DF4F8881C1 +:100D3000C959D040C754DF4FA881B981C95BD040A1 +:100D4000A80FB11DCD01BAE94B16B8E05B0609F456 +:100D500016C160F4F4ED4F16F7E05F06D1F029E913 +:100D6000421628E0520609F440C0FAC53DE9431690 +:100D700038E0530609F451C3AEE94A16A8E05A0612 +:100D800009F436C5BCE94B16B8E05B0609F0E8C5C6 +:100D900049C21A821982E1E0F0E0EC0FFD1FFF93D7 +:100DA000EF932FE434E03F932F939F938F930E9410 +:100DB000F9730F900F900F900F900F900F901816DF +:100DC00019060CF03BC589819A8190938B10809312 +:100DD0008A1011E01093920D8091160D811148C573 +:100DE0000E94153E1093160D43C58E010B5E1F4FDA +:100DF0001F930F939E01275D3F4F3F932F937E01DB +:100E0000FDE3EF0EF11CFF92EF92CF55DF4F2881EB +:100E1000C15AD0402F93C056DF4F3881C05AD040BE +:100E20003F9329E132E03F932F939F938F930E944A +:100E3000F9730FB6F894DEBF0FBECDBF04970CF464 +:100E4000FDC4EF961CAE1DAE1EAE1FAEEF97E5962D +:100E50001CAE1DAE1EAE1FAEE597AB961CAE1DAE12 +:100E60001EAE1FAEAB97A1961CAE1DAE1EAE1FAE42 +:100E7000A1978CE0C456DF4FE881F981CC59D0406E +:100E800011928A95E9F7AE0145585F4F60E070E036 +:100E9000CE018F5A9F4F0E94D055882309F4E8C491 +:100EA000AE014F585F4F60E070E0C7010E94D0551F +:100EB000882309F4DDC4AE0149595F4F60E070E05A +:100EC000CE0189960E94D055882309F4D1C4AE0181 +:100ED000435A5F4F60E070E0C8010E94D0558823FC +:100EE00009F4C6C420E030E044EB52E4E5966CAD72 +:100EF0007DAD8EAD9FADE5970E94526F21EE3EE233 +:100F000045E652E40E9433706B017C01E5966CAFBC +:100F10007DAF8EAF9FAFE5970E943070EF968CAC9F +:100F20009DACAEACBFACEF97A50194010E94857259 +:100F300069837A838B839C83C701B6010E94E87220 +:100F40009B01AC01C501B4010E9485726D837E8353 +:100F50008F839887AB968CAD9DADAEADBFADAB9793 +:100F600089879A87AB87BC87A1962CAD3DAD4EADE6 +:100F70005FADA19700E0BE016F5F7F4F37C46596FC +:100F80001CAE1DAE1EAE1FAE659721961CAE1DAEEB +:100F90001EAE1FAE219721E030E02C0F3D1F3F9386 +:100FA0002F938E010B5E1F4F1F930F93C156DF4F80 +:100FB0003881CF59D0403F93C256DF4FA881CE59D8 +:100FC000D040AF9322E432E03F932F939F938F93CF +:100FD0000E94F9730FB6F894DEBF0FBECDBF039722 +:100FE0000CF42CC4AE014F5A5F4F60E070E0C801B2 +:100FF0000E94D055882309F43BC4AE01435C5F4F87 +:1010000060E070E0CE0101960E94D055882309F47B +:101010002FC43E01F9E26F0E711C8CE0D3011D92CA +:101020008A95E9F76091790D70917A0D80917B0D29 +:1010300090917C0D0E94CE7024EE38E34EE553E48F +:101040000E94337020916D0D30916E0D40916F0DA7 +:101050005091700D0E94536FCA55DF4F688379839A +:101060008A839B83C65AD04060917D0D70917E0D1E +:1010700080917F0D9091800D0E94CE7024EE38E318 +:101080004EE553E40E9433702091710D3091720D42 +:101090004091730D5091740D0E94536FC554DF4FF2 +:1010A000688379838A839B83CB5BD0406091810D79 +:1010B0007091820D8091830D9091840D0E94CE706D +:1010C00024EE38E34EE553E40E9433706B017C015B +:1010D00020E030E044EB52E46091750D7091760DA4 +:1010E0008091770D9091780D0E94526F9B01AC0119 +:1010F000C701B6010E94536F7B018C016F968EADC4 +:101100009FAD6F978130910509F450C00CF03FC03E +:10111000892B09F0A0C320E030E044EB52E465964F +:101120006CAD7DAD8EAD9FAD65970E94526F65969B +:101130006CAF7DAF8EAF9FAF6597FE01F1964F010B +:101140009E01235D3F4F5901DE0199966D017B01A0 +:101150008C01C554DF4F288139814A815B81CB5B8B +:10116000D040CA55DF4F688179818A819B81C65AF8 +:10117000D0400E947644A401B501C6010E94684295 +:1011800021962CAD3DAD4EAD5FAD2197E2C38230CF +:10119000910519F1039709F05EC365966CAD7DADBD +:1011A0008EAD9FAD65970E94F03E62C365966CADB3 +:1011B0007DAD8EAD9FAD6597FE01F1964F019E010D +:1011C000235D3F4F59016301C554DF4F28813981A9 +:1011D0004A815B81CB5BD04015C065962CAD3DAD9F +:1011E0004EAD5FAD6597CE01C1964C01DE019D9677 +:1011F0005D016301CA55DF4F688179818A819B81D6 +:10120000C65AD0400E947644A401B501C3010E9491 +:10121000684221962CAD3DAD4EAD5FAD219700E00B +:10122000B30199C38E010B5E1F4F1F930F937E0175 +:10123000B9E2EB0EF11CFF92EF926E01EDE3CE0EE0 +:10124000D11CDF92CF92CF55DF4FF881C15AD040E9 +:10125000FF93C056DF4F2881C05AD0402F932AE514 +:1012600032E03F932F939F938F930E94F9730FB6B1 +:10127000F894DEBF0FBECDBF04970CF4DFC2EF962B +:101280001CAE1DAE1EAE1FAEEF97E5961CAE1DAE9A +:101290001EAE1FAEE597AB961CAE1DAE1EAE1FAECA +:1012A000AB97A1961CAE1DAE1EAE1FAEA197AE01B0 +:1012B00045585F4F60E070E0CE018F5A9F4F0E940B +:1012C000D055882309F4D4C2AE014F585F4F60E077 +:1012D00070E0C6010E94D055882309F4C9C2AE014E +:1012E00049595F4F60E070E0C7010E94D0558823E4 +:1012F00009F4BEC2AE01435A5F4F60E070E0C8011E +:101300000E94D055882309F4B3C26091810D709179 +:10131000820D8091830D9091840D0E94CE70CA55EC +:10132000DF4F688379838A839B83C65AD04060915C +:101330007D0D70917E0D80917F0D9091800D0E94AA +:10134000CE70C554DF4F688379838A839B83CB5BE0 +:10135000D0406091790D70917A0D80917B0D9091C4 +:101360007C0D0E94CE70FE0139964F019E012B5FCD +:101370003F4F5901DE0111966D01CA55DF4FE880DC +:10138000F9800A811B81C65AD040C554DF4F28819D +:1013900039814A815B81CB5BD0400E945A45A401D0 +:1013A000B501C6010E946842EF962CAD3DAD4EAD31 +:1013B0005FADEF9769817A818B819C810E94536F29 +:1013C00069837A838B839C83E5962CAD3DAD4EADCE +:1013D0005FADE5976D817E818F8198850E94536F07 +:1013E0006D837E838F839887AB962CAD3DAD4EADDC +:1013F0005FADAB9769857A858B859C850E94536F1D +:1014000069877A878B879C87A1962CAD3DAD4EADC1 +:101410005FADA19700E0B601E9C1C156DF4FB881C9 +:10142000CF59D040BF93C256DF4FE881CE59D0404C +:10143000EF93CD55DF4FF881C35AD040FF93CE557F +:10144000DF4F2881C25AD0402F93CB55DF4F3881D0 +:10145000C55AD0403F93CC55DF4FA881C45AD040E5 +:10146000AF938E0105581F4F1F930F9329E132E070 +:101470003F932F939F938F930E94F9730FB6F89425 +:10148000DEBF0FBECDBF04970CF4D8C1CF56DF4FDF +:10149000188219821A821B82C159D040C357DF4F6C +:1014A000188219821A821B82CD58D040C757DF4F4D +:1014B000188219821A821B82C958D040CB57DF4F3D +:1014C000188219821A821B82C558D0408CE0C056FF +:1014D000DF4FA881B981C05AD0401D928A95E9F7A3 +:1014E000AE014F565F4F60E070E0C8010E94D055DA +:1014F000882309F4BDC1AE0143575F4F60E070E03F +:10150000CE018F589F4F0E94D055882309F4B0C157 +:10151000AE0147575F4F60E070E0CE0189599F4FA1 +:101520000E94D055882309F4A3C1AE014B575F4FE9 +:1015300060E070E0CE01835A9F4F0E94D05588230F +:1015400009F496C16091810D7091820D8091830D97 +:101550009091840D0E94CE70CA55DF4F68837983C5 +:101560008A839B83C65AD04020E030E044EB52E4AB +:101570006091750D7091760D8091770D9091780D39 +:101580000E94526F6B017C0124EE38E34EE553E478 +:10159000CA55DF4F688179818A819B81C65AD040C4 +:1015A0000E9433709B01AC01C701B6010E94536FCA +:1015B000C554DF4F688379838A839B83CB5BD0409C +:1015C00060917D0D70917E0D80917F0D9091800DC9 +:1015D0000E94CE70CB53DF4F688379838A839B83CD +:1015E000C55CD0406091790D70917A0D80917B0D32 +:1015F00090917C0D0E94CE70CD53DF4F88809980F2 +:10160000C35CD040F1E56F2E712C6C0E7D1EB4E0F2 +:101610006B0E711C5301FE01EF5AFF4F6F01CA554B +:10162000DF4FE880F9800A811B81C65AD040CB5336 +:10163000DF4F288139814A815B81C55CD0400E949F +:101640005A45CD53DF4F48815981C35CD040B30127 +:10165000C6010E94684265966CAD7DAD8EAD9FADB2 +:1016600065976996CCACDDACEEACFFAC69979B019D +:10167000AC010E9485724B015C01A7019601C70174 +:10168000B6010E9485729B01AC01C501B4010E94A4 +:10169000536F0E94F272CF56DF4F288139814A8101 +:1016A0005B81C159D0400E94536F6B017C01CF56C2 +:1016B000DF4F688379838A839B83C159D040C357A6 +:1016C000DF4F288139814A815B81CD58D040C55494 +:1016D000DF4F688179818A819B81CB5BD0400E94FA +:1016E000536F21EE3EE245E652E40E943370CA5544 +:1016F000DF4F688379838A839B83C65AD0400E94D8 +:1017000030709B01AC01C701B6010E9485724B018C +:101710005C0165966CAF7DAF8EAF9FAF6597CA5584 +:10172000DF4F688179818A819B81C65AD0400E94AF +:10173000E8729B01AC01C701B6010E9485726996EF +:101740006CAF7DAF8EAF9FAF6997C757DF4F2881D2 +:1017500039814A815B81C958D0406D966CAD7DADB1 +:101760008EAD9FAD6D970E94536F6D966CAF7DAF40 +:101770008EAF9FAF6D978E01035C1F4F24E045E055 +:10178000C501B4010E94D76C69966CAD7DAD8EAD7C +:101790009FAD69970451110924E045E00E94D76C80 +:1017A0006D966CAD7DAD8EAD9FAD6D9704511109F9 +:1017B00024E045E00E94D76CCF56DF4F68817981E5 +:1017C0008A819B81C159D0400451110924E045E030 +:1017D0000E94D76CCB57DF4F288139814A815B81CA +:1017E000C558D04000E0BE016F5A7F4F81E0B4C0C1 +:1017F00021E030E02C0F3D1F3F932F938E010B5EB5 +:101800001F4F1F930F937E0139E2E30EF11CFF92ED +:10181000EF926E01ADE3CA0ED11CDF92CF9223E8A6 +:1018200032E03F932F939F938F930E94F9730FB6EB +:10183000F894DEBF0FBECDBF049784F41F9281E001 +:101840008F938DE092E09F938F930E94AF330F9020 +:101850000F900F900F9082E390E084C0AE01455846 +:101860005F4F60E070E0C6010E94D055811103C057 +:1018700080E090E077C0AE014F585F4F60E070E0CD +:10188000C7010E94D055882399F3AE0149595F4F93 +:1018900060E070E0C8010E94D055882349F3AE0192 +:1018A000435A5F4F60E070E0CE0101960E94D05530 +:1018B0008823F1F220E030E044EB52E4EF966CAD87 +:1018C0007DAD8EAD9FADEF970E94526F7B018C0175 +:1018D000EF966CAF7DAF8EAF9FAFEF978CE0C056A9 +:1018E000DF4FA881B981C05AD0401D928A95E9F78F +:1018F000AB962CAD3DAD4EAD5FADAB97E5966CAD07 +:101900007DAD8EAD9FADE597CD53DF4F888099803B +:10191000C35CD040E1E56E2E712C6C0E7D1EB4E0F0 +:101920006B0E711C5301FE01EF5AFF4F6F010E94B5 +:101930007644CD53DF4F48815981C35CD040B30119 +:10194000C6010E946842A1962CAD3DAD4EAD5FAD83 +:10195000A19700E0B60180E00E94BA5690E002C074 +:1019600081E090E09C01215031092230310510F0D6 +:101970000C942F1FF8E24F16510409F414C280F59D +:1019800034E14316510498F481E14816510408F0FB +:1019900061C194E04916510409F474C008F4E3C02D +:1019A000BAE04B16510409F45EC00C94D41EECE16D +:1019B0004E16510409F457C038F426E1421651047A +:1019C00008F4A2C10C94D41E3EE14316510409F45C +:1019D0004AC086E24816510409F4C5C00C94D41ECE +:1019E0009DE34916510409F4D3C110F5B5E34B1634 +:1019F000510409F447C060F4FBE24F16510409F4A6 +:101A000095C121E34216510409F490C10C94D41EEF +:101A10003CE34316510410F00C94D41ECB54DF4F1A +:101A20008881C55BD040865380932B15A9E0AAC15D +:101A30008CE54816510460F49AE54916510408F003 +:101A40001FC1A0E54A16510409F49BC00C94D41E92 +:101A5000BCE54B16510439F0EFE54E16510408F47D +:101A60003CC10C94D41E2114310411F00C94E81ED6 +:101A7000C255DF4FF881CE5AD040FF2309F445C04C +:101A80000C94CA1E2CE14216510491F148F484E0F2 +:101A90004816510479F09AE049165104E1F08AC1E0 +:101AA000AEE14A165104D9F1B5E34B16510409F4DD +:101AB00056C080C181E054C0BFE14B16510408F00C +:101AC00042C0EAE04E16510441F4E1E0C255DF4F56 +:101AD000E883CE5AD04082E043C0FCE14F16510467 +:101AE00009F078C1F1E0C255DF4FF883CE5AD040FB +:101AF0002114310441F02AE02216310411F00C9433 +:101B0000D41E84E010C083E00EC0AEE14A1651043A +:101B100099F631E0C255DF4F3883CE5AD0402114B8 +:101B2000310449F485E080932415CA55DF4F1882AB +:101B3000C65AD0405AC18AE02816310411F00C94DC +:101B4000D41E86E0F0CF25E34216510411F00C9428 +:101B5000141F91E0C255DF4F9883CE5AD04087E0E2 +:101B60008093241527C1C255DF4FE881CE5AD0405B +:101B7000E1110C94CA1EF2E0C255DF4FF883CE5A31 +:101B8000D04022E04216510419F158F44114510496 +:101B9000D9F04A94452809F013C181E080932515B6 +:101BA0000FC196E249165104C1F0A0E54A1651044E +:101BB00009F44BC0B3E04B16510409F001C183E0B6 +:101BC0008093251531E09AC010922515E1E0ECC014 +:101BD00082E08093251521E088C08EE1281631042B +:101BE00001F180F4A4E12A16310411F00C94D41E02 +:101BF00084E080932515F1E0CA55DF4FF883C65A7B +:101C0000D040F3C0B8E22B163104A9F0E2E32E165F +:101C1000310411F00C94D41E87E08093251581E0E7 +:101C200039C085E08093251521E0CA55DF4F288310 +:101C3000C65AD040DAC086E08093251531E0CA55F7 +:101C4000DF4F3883C65AD040D0C088E08093251536 +:101C500091E062C0A2E14A16510441F0B3E14B1693 +:101C6000510449F010922915E2E09EC081E0809372 +:101C70002915F2E0A6C082E08093291522E035C044 +:101C800021143104B9F43AE54316510449F4109291 +:101C9000281583E0CA55DF4F8883C65AD040A5C0B7 +:101CA00081E08093281593E0CA55DF4F9883C65A88 +:101CB000D0409BC0AAE02A16310411F00C94D41E27 +:101CC000BAE54B16510411F40C94D41EE4E0CA5545 +:101CD000DF4FE883C65AD04088C0FDE54F16510457 +:101CE00051F481E08093261525E0CA55DF4F288303 +:101CF000C65AD0406BC01092261535E0CA55DF4F4A +:101D00003883C65AD04062C084E14816510451F469 +:101D100081E08093271596E0CA55DF4F9883C65A15 +:101D2000D04054C010922715A6E02CC0C255DF4FFA +:101D3000B881CE5AD040B1110C94CA1EE1E34E16C0 +:101D4000510451F410922A15F8E0CA55DF4FF88378 +:101D5000C65AD04023E044C03AE02316310411F0C3 +:101D60000C94D41E81E080932A1588E0CA55DF4F79 +:101D70008883C65AD04093E0C255DF4F9883CE5A2D +:101D8000D04033C0CA55DF4FA883C65AD0401EC0CA +:101D9000232811F00C94D41EBAE0CA55DF4FB88343 +:101DA000C65AD04022C0E7E0CA55DF4FE883C65A82 +:101DB000D0400CC0CA55DF4F1882C65AD04006C06A +:101DC000F1E0CA55DF4FF883C65AD040232869F0A6 +:101DD0000C94FB1ECA55DF4F1882C65AD04021E032 +:101DE000C255DF4F2883CE5AD040C155DF4FE8811E +:101DF000F981CF5AD040CF01A0E0B0E0CA55DF4F03 +:101E00000880C65AD04004C0B695A7959795879587 +:101E10000A94D2F780FF03C085E10C942F1F81E064 +:101E200090E0A0E0B0E0CA55DF4F0880C65AD0402D +:101E300004C0880F991FAA1FBB1F0A94D2F7C1556F +:101E4000DF4F28813981CF5AD040282B392BC155FB +:101E5000DF4F39832883CF5AD0400C940C06672B70 +:101E600011F00C94FB1EC756DF4F8881C959D04032 +:101E7000C754DF4F68817981C95BD040680F711DFD +:101E8000AE0147565F4FCB54DF4F88819981C55BC8 +:101E9000D0400E94491F9C01215031092230310558 +:101EA00010F00C942F1F36E04316510428F483E001 +:101EB0004816510490F026C098E04916510410F4D9 +:101EC0000C94D41EAAE04A16510408F440C0BEE1A6 +:101ED0004B16510411F00C94D41EE2E04E1651043E +:101EE00061F0FEE14F16510441F0452809F046C06B +:101EF00081E080932C152BE032C082E080932C157A +:101F00003BE036C084E04816510471F095E0491674 +:101F10005104A1F081E080932E15ACE0CA55DF4F4B +:101F2000A883C65AD04022C482E080932E15BCE01C +:101F3000CA55DF4FB883C65AD04018C410922E1528 +:101F4000ECE0CA55DF4FE883C65AD0400FC4F9E031 +:101F50004F16510451F082E080932D152DE0CA55A3 +:101F6000DF4F2883C65AD04001C410922D153DE0A2 +:101F7000CA55DF4F3883C65AD040F8C38BE0CA55E4 +:101F8000DF4F8883C65AD040F1C3672B11F00C9401 +:101F9000FB1EC756DF4F8881C959D040C754DF4F59 +:101FA000E881F981C95BD040E80FF11D27EB4216AB +:101FB00028E0520609F4E7C208F05EC18CE9481631 +:101FC00088E0580609F499C108F076C0A9E94A16D4 +:101FD000A8E05A0609F48BC108F05FC0E8E94E1684 +:101FE000E8E05E0609F0B8C384E16E0199E2C90E2B +:101FF000D11CD601E82F1D92EA95E9F77E01F5E1A3 +:10200000EF0EF11CD701E82F1D92EA95E9F7C456AF +:10201000DF4FA881B981CC59D0401D928A95E9F74C +:1020200080E090E00E940147CB54DF4F68837983C2 +:102030008A839B83C55BD04081E090E00E9401478A +:102040002B013C0182E090E00E9401474B015C01C2 +:10205000860124E045E0CB54DF4F688179818A8195 +:102060009B81C55BD0400E94D76C870124E045E08E +:10207000C301B2010E94D76C0451110924E045E06C +:10208000C501B4010E94D76CFF92EF92DF92CF920C +:102090001F930F938CEA92E03DC3FAE94F16F8E0E4 +:1020A0005F0609F427C12BE9421628E0520609F021 +:1020B00053C389EC92E023C13EE9431638E053064E +:1020C00009F427C108F420C19CEA491698E0590692 +:1020D00009F4B5C1ADEA4A16A8E05A0609F03CC3B6 +:1020E000A1961CAE1DAE1EAE1FAEA19765961CAE8E +:1020F0001DAE1EAE1FAE659721961CAE1DAE1EAE68 +:102100001FAE219784E1DE019996C656DF4FB98351 +:10211000A883CA59D040E82F1D92EA95E9F71E011D +:10212000F5E12F0E311CD101E82F1D92EA95E9F758 +:10213000C456DF4FA881B981CC59D0401D928A95F1 +:10214000E9F780E090E00E940147CB54DF4F6883BD +:1021500079838A839B83C55BD04081E090E00E94B5 +:102160000147C554DF4F688379838A839B83CB5BA8 +:10217000D04082E090E00E94014720E030E044EB54 +:1021800052E40E94526F2B013C01FE01FD964F016B +:102190009E012F5A3F4F5901CE01835A9F4F6C0128 +:1021A00083017201C554DF4F288139814A815B81E7 +:1021B000CB5BD040CB54DF4F688179818A819B8192 +:1021C000C55BD0400E947644A401B501C6010E94BF +:1021D0006842A1966CAD7DAD8EAD9FADA197659621 +:1021E000CCACDDACEEACFFAC65979B01AC010E94C2 +:1021F00085724B015C01A7019601C701B6010E94DF +:1022000085729B01AC01C501B4010E94536F0E940D +:10221000F2728E01075D1F4F24E045E00E94D76CEB +:1022200020E030E044EB52E4C301B2010E94536F5E +:10223000810124E045E00E94D76C21966CAD7DAD14 +:102240008EAD9FAD21970451110924E045E00E9415 +:10225000D76C1F930F933F922F92C556DF4FB881D3 +:10226000CB59D040BF93C656DF4FE881CA59D04002 +:10227000EF938BEE92E04EC2B0EC4B16B8E05B06EB +:1022800009F4ADC1D0F439EB431638E0530609F434 +:1022900091C108F484C19AEB491698E0590609F4F3 +:1022A00091C1ABEB4A16A8E05A0609F055C28091DD +:1022B000020185FB882780F990C1B2EC4B16B8E08B +:1022C0005B0609F4FDC108F4CCC133EC431638E0D9 +:1022D000530609F407C280E6481689E0580609F05B +:1022E0003BC28091600D8F9380915F0D21C28AEB7C +:1022F00092E005C08CE890E102C080ED92E09F93EF +:102300008F9384EC92E017C28AE19DE09F938F93B4 +:1023100093C080818E3409F0C8C18181805384309C +:1023200008F0C3C194E16E013DE3C30ED11CD60198 +:10233000E92F1D92EA95E9F77E01F9E2EF0EF11C13 +:10234000D701E92F1D92EA95E9F75E01F5E1AF0E9D +:10235000B11CD501E92F1D92EA95E9F7C456DF4F6C +:10236000A881B981CC59D0401D929A95E9F7823065 +:10237000E1F0833031F1813061F082E090E00E9441 +:102380000147850124E045E00E94D76CBF92AF92DF +:1023900053C080E090E00E940147860124E045E0C0 +:1023A0000E94D76CDF92CF9247C081E090E00E94FC +:1023B0000147870124E045E00E94D76CFF92EF922D +:1023C0003BC080915F0D9091600D0497029748F497 +:1023D000609186107091871080918810909189107B +:1023E00022C020E030E040E05FE3609100027091A5 +:1023F000010280910202909103020E94526F20E03C +:1024000030E040E05FE30E94857220E030E044E38A +:1024100053E40E9485729B01AC0160E070E084E3AC +:1024200093E40E94526F8E010F5F1F4F24E045E03E +:102430000E94D76C1F930F9387ED92E07CC1A19609 +:102440001CAE1DAE1EAE1FAEA19765961CAE1DAE96 +:102450001EAE1FAE659721961CAE1DAE1EAE1FAE02 +:10246000219784E19E01275D3F4FC656DF4F398398 +:102470002883CA59D040D901E82F1D92EA95E9F77F +:102480001E01F5E12F0E311CD101E82F1D92EA95B6 +:10249000E9F7C456DF4FA881B981CC59D0401D92CD +:1024A0008A95E9F780E090E00E9401472B013C010A +:1024B00081E090E00E940147CB54DF4F688379832D +:1024C0008A839B83C55BD04082E090E00E940147F5 +:1024D00020E030E044EB52E40E94526FFE01FD9692 +:1024E0004F019E012F5A3F4F5901DE01A35ABF4FA2 +:1024F0006D017B018C01CB54DF4F288139814A81EA +:102500005B81C55BD040C301B2010E947644A40147 +:10251000B501C6010E946842A1966CAD7DAD8EAD3D +:102520009FADA1978E01075D1F4F24E045E00E94FB +:10253000D76C65966CAD7DAD8EAD9FAD6597810115 +:1025400024E045E00E94D76C21966CAD7DAD8EAD48 +:102550009FAD21970451110924E045E00E94D76CFA +:102560001F930F933F922F92C556DF4FF881CB599F +:10257000D040FF93C656DF4F2881CA59D0402F93D1 +:102580008DED92E0C7C0A49B11C08FE30E94F85468 +:102590008A30910558F08734910550F005C047996D +:1025A00005C00898009B04C081E017C080E015C0FA +:1025B00082E013C082B386958695869591E089273F +:1025C00081700BC08BE30E94F85421E085369105A1 +:1025D00008F420E01F922F93ACC01F92A9C081E0A5 +:1025E00090E08C0F9D1F9F938F9389EF92E09F93B4 +:1025F0008F93FF93EF930E94F9730F900F900F90BA +:102600000F900F900F90181619060CF041C02981F9 +:102610003A812634310508F048C0F901EA57F54FF0 +:102620008491F901E05CF54F1491F901E650F64F01 +:102630000491002391F081110E947454E02FF0E086 +:10264000EE0FFF1FEE5EFC4FA591B491EC911E239F +:1026500081E090E021F480E002C080E090E09F9370 +:1026600067C0A1E0B0E0AC0FBD1FBF93AF9389EF8F +:1026700092E09F938F93FF93EF930E94F9730F90D3 +:102680000F900F900F900F900F901816190684F06E +:102690001F9281E08F938DE092E09F938F930E9431 +:1026A000AF330F900F900F900F9082E390E056C0E1 +:1026B00089819A8180319105C0F70E94F854CFCF6B +:1026C00080915E0D8F9380915D0D8F9380915C0D55 +:1026D0008F9380915B0D8F9380915A0D8F93809192 +:1026E000590D15C080E090E00E94AF46182F092FC9 +:1026F00081E090E00E94AF46F82EE92E82E090E063 +:102700000E94AF46EF92FF920F931F939F938F9378 +:102710008DEF92E09F938F9387E29DE09F938F933D +:102720000E94CB730FB6F894DEBF0FBECDBF11C0B1 +:102730008F9383EB93E09F938F9387E29DE09F932A +:102740008F930E94CB730F900F900F900F900F906C +:102750000F9080E090E002C081E090E09C01215069 +:1027600031092230310510F00C942F1FC155DF4F75 +:10277000E881F981CF5AD040CF01A0E0B0E0CA553E +:10278000DF4F0880C65AD04004C0B695A7959795EC +:1027900087950A94D2F780FD3FCB81E090E0A0E0DE +:1027A000B0E0CA55DF4F0880C65AD04004C0880F39 +:1027B000991FAA1FBB1F0A94D2F7E82BF92BC1550A +:1027C000DF4FF983E883CF5AD0400C940C06672B77 +:1027D00011F00C94FB1EF8EE4F16F3E05F0641F08B +:1027E0002CE4421624E0520649F50E94905623C07C +:1027F000C756DF4F8881C959D040C754DF4FE881A1 +:10280000F981C95BD040E80FF11D80818635C9F49C +:10281000818180538230A8F49FB7813029F0F894E9 +:102820008091B514886004C0F8948091B5148260DA +:102830008093B5149FBF80E090E005C081E090E0F8 +:1028400002C082E390E09C01215031092230310521 +:1028500010F00C942F1FC155DF4FE881F981CF5A3A +:10286000D040CF01A0E0B0E0CA55DF4F0880C65A83 +:10287000D04004C0B695A795979587950A94D2F74E +:1028800080FDCACA81E090E0A0E0B0E0CA55DF4F09 +:102890000880C65AD04004C0880F991FAA1FBB1FCA +:1028A0000A94D2F7E82BF92BC155DF4FF983E8835F +:1028B000CF5AD04095C0812F110F990BAA0BBB0B9B +:1028C000FC01E654F109E531F10510F00C94D41E39 +:1028D0008827EE58FF4F8F4F0C949873C0922F1596 +:1028E000D0923015E0923115F0923215CA55DF4F73 +:1028F0001882C65AD040DAC0C0923315D09234152F +:10290000E0923515F0923615C154DF4FF881CF5B58 +:10291000D040F160C154DF4FF883CF5BD04021E05D +:102920004FC0C0923715D0923815E0923915F09209 +:102930003A15C154DF4F3881CF5BD0403260C1546B +:10294000DF4F3883CF5BD04082E05BC0C0923B1545 +:10295000D0923C15E0923D15F0923E15C154DF4FE8 +:102960009881CF5BD0409460C154DF4F9883CF5B98 +:10297000D040A3E060C0CB54DF4FB881C55BD040EE +:10298000B0933F15E4E071C0C701B6010E949B708F +:1029900060934015709341158093421590934315B1 +:1029A000F5E0CA55DF4FF883C65AD0407FC0C092C9 +:1029B0004415D0924515E0924615F092471526E051 +:1029C000CA55DF4F2883C65AD04070C0C092481500 +:1029D000D0924915E0924A15F0924B1537E061C04C +:1029E000CB56DF4F88819981AA81BB81C559D040E0 +:1029F00080934C1590934D15A0934E15B0934F15A1 +:102A000088E0CA55DF4F8883C65AD0404FC0C09275 +:102A10005115D0925215E0925315F0925415C655A7 +:102A2000DF4F9881CA5AD0409160C655DF4F9883D6 +:102A3000CA5AD040AAE0CA55DF4FA883C65AD04030 +:102A400035C0C0925515D0925615E0925715F092A8 +:102A50005815C655DF4FB881CA5AD040B260C65526 +:102A6000DF4FB883CA5AD040EBE0CA55DF4FE88346 +:102A7000C65AD0401BC0C0925915D0925A15E09248 +:102A80005B15F0925C15C655DF4FF881CA5AD040ED +:102A9000F460C655DF4FF883CA5AD0402CE090CF7F +:102AA00039E0CA55DF4F3883C65AD040CA55DF4F88 +:102AB0008881C65AD040082FCD54DF4FE881F98174 +:102AC000C35BD040CF01A0E0B0E0CA55DF4F088023 +:102AD000C65AD04004C0B695A795979587950A9495 +:102AE000D2F780FF02C00C94CC1E81E693E0A0E0F8 +:102AF000B0E0CA55DF4F0880C65AD04004C0B69532 +:102B0000A795979587950A94D2F780FF11C020E08A +:102B100030E0A901CB56DF4F688179818A819B81A2 +:102B2000C559D0400E942C7087FF02C00C94CE1E65 +:102B300081E090E0A0E0B0E004C0880F991FAA1FD8 +:102B4000BB1F0A95D2F7CD54DF4F28813981C35B73 +:102B5000D040282B392BCD54DF4F39832883C35BDA +:102B6000D0400C940C06C655DF4F3881CA5AD0406D +:102B7000332369F0C255DF4F8881CE5AD04081118E +:102B800006C092E0C255DF4F9883CE5AD040CD5454 +:102B9000DF4FA881C35BD040A5FF0FC080914015D7 +:102BA00090914115A0914215B091431580389649F6 +:102BB000A849B10514F00C94D01E809126158130DF +:102BC00091F4C255DF4FF881CE5AD040F23009F06F +:102BD00040C0CD54DF4F2881C35BD04020FD02C0F0 +:102BE0000C94DA1E36C080915E15811132C0CD542E +:102BF000DF4F3881C35BD04030FF1BC08091271569 +:102C0000813039F523E333E34BEC51E460912F1528 +:102C10007091301580913115909132150E94857216 +:102C200060932F1570933015809331159093321562 +:102C300010C080916B1590916C15A0916D15B0919D +:102C40006E1580932F1590933015A0933115B09386 +:102C50003215CD54DF4F88819981C35BD04090FD00 +:102C600010C08091671590916815A0916915B09179 +:102C70006A1580934C1590934D15A0934E15B09303 +:102C80004F15809124158130B9F4CD54DF4F9881D0 +:102C9000C35BD04096FD03C08CE10C942F1FCD5434 +:102CA000DF4FA881B981C35BD040AF7BCD54DF4FEC +:102CB000B983A883C35BD040809129158823A1F0F4 +:102CC000813021F1CB54DF4F1882C55BD040F2E058 +:102CD000C754DF4FF883C95BD04021E0CA55DF4FAE +:102CE0002883C65AD04023C0B2E0CB54DF4FB8830C +:102CF000C55BD040E1E0C754DF4FE883C95BD040FB +:102D0000CA55DF4F1882C65AD04011C031E0CB54AB +:102D1000DF4F3883C55BD040C754DF4F1882C95B93 +:102D2000D04082E0CA55DF4F8883C65AD040809198 +:102D30002715813049F0C255DF4F9881CE5AD040D7 +:102D4000933009F043C036C0B4E2EB2EB5E1FB2E60 +:102D500000E010E0C655DF4FA881CA5AD0408A2E45 +:102D6000912CA12CB12CD501C401002E04C0B69524 +:102D7000A795979587950A94D2F780FF12C023E311 +:102D800033E34BEC51E4F70165A576A587A590A93F +:102D90000E948572D7019D966D937D938D939C9330 +:102DA000D0970F5F1F4FB4E0EB0EF11C03301105FD +:102DB000D1F6C1CF80912A15813041F4C655DF4F3D +:102DC000E881CA5AD040E43009F0ECC78CE0E0E872 +:102DD000F5E1DE01119601900D928A95E1F7C1555A +:102DE000DF4F28813981CF5AD04031FD08C0109182 +:102DF00024151230C1F0183009F4EAC058C180918E +:102E00002B15873018F08DE10C942F1F90916315CE +:102E1000891769F3BE016F5F7F4F0E94452E88239B +:102E200009F4D4C7E4CFC655DF4F3881CA5AD04021 +:102E3000311103C08AE10C942F1FCD54DF4F8881DC +:102E40009981C35BD04080759927892B09F424CFE1 +:102E500060914415709145158091461590914715E4 +:102E60000E9433730E94A070673068F680913F150E +:102E7000843151F0823009F097C7CD54DF4F8881FB +:102E8000C35BD04087FD90C7CD54DF4FA881B98187 +:102E9000C35BD040AF7ACD54DF4FB983A883C35B07 +:102EA000D040662321F022242A94260E02C02090CE +:102EB0002B15BE016B5E7F4F822D0E94452E88230D +:102EC00009F484C730903F1580909815909099151B +:102ED000A0909A15B0909B15A4E2CA2EA5E1DA2E17 +:102EE0008E010B5E1F4FEDE5F5E1C155DF4FF98314 +:102EF000E883CF5AD040E12CF12CC655DF4FF88142 +:102F0000CA5AD0404F2E512C612C712CD301C201D2 +:102F10000E2C04C0B695A795979587950A94D2F77D +:102F200080FF3BC024E132122EC0C155DF4FA88183 +:102F3000B981CF5AD0409F962D913D914D915C9192 +:102F4000D29757966D917D918D919C915A970E9441 +:102F5000526FF60125A536A547A550A90E94526FCC +:102F6000D8016D937D938D939C931397B2E0EB12F0 +:102F700014C0A50194010E94526FF801608371830F +:102F8000828393830AC0F60185A596A5A7A5B0A95B +:102F9000F80180839183A283B383FFEFEF1AFF0AC6 +:102FA00024E0C20ED11C0C5F1F4FC155DF4F88813A +:102FB0009981CF5AD0400496C155DF4F99838883B9 +:102FC000CF5AD04093E0E916F10409F09FCF4CC1ED +:102FD000C655DF4FA881CA5AD040AA2309F42ACF88 +:102FE0008090981590909915A0909A15B0909B1587 +:102FF000FDE5CF2EF5E1DF2EFE0131961F0104E243 +:1030000015E1E12CF12C4A2E512C612C712CD301AD +:10301000C2010E2C04C0B695A795979587950A9482 +:10302000D2F780FF29C0D1012D913D914D915C9146 +:10303000F6016789708D818D928D0E94526FD80143 +:103040009D962D913D914D915C91D0970E94526F2C +:10305000F80165A776A787A790ABF2E0EF1216C03C +:10306000A50194010E94526FD8019D966D937D93A6 +:103070008D939C93D0970AC0F60187A590A9A1A92A +:10308000B2A9F80185A796A7A7A7B0ABFFEFEF1AE3 +:10309000FF0A24E0C20ED11C34E0230E311C0C5F69 +:1030A0001F4F83E0E816F10409F0B1CFDCC0C25530 +:1030B000DF4F9881CE5AD040933009F49DC0C65559 +:1030C000DF4FA881CA5AD040AA2309F4C2C0009198 +:1030D0002815409098155090991560909A15709009 +:1030E0009B157DE5A72E75E1B72EE4E2EE2EE5E116 +:1030F000FE2EFE0131964F01C12CD12C8A2F90E07B +:10310000A0E0B0E0C155DF4F88839983AA83BB83D9 +:10311000CF5AD040C155DF4F88819981AA81BB81A8 +:10312000CF5AD0400C2C04C0B695A795979587959B +:103130000A94D2F780FD0BC0F5018789908DA18D8F +:10314000B28DF70185A796A7A7A7B0AB43C01730EC +:1031500009F440C001112BC0D5019F962D913D91DE +:103160004D915C91D297F40160817181828193814C +:103170000E94536FD7019D962D913D914D915C9189 +:10318000D0970E94536FF70165A776A787A790ABEA +:10319000F2E0CF121FC0A30192010E94536FD7012A +:1031A0009D966D937D938D939C93D09713C0F5015D +:1031B0002789308D418D528DD7019D966D917D91DE +:1031C0008D919C91D0970E94536FF70165A776A7C8 +:1031D00087A790ABFFEFCF1ADF0A24E0A20EB11C45 +:1031E00034E0E30EF11C84E0880E911C93E0C916D4 +:1031F000D10409F08FCF29C61530A9F0173071F12D +:10320000133089F5C655DF4FA881CA5AD040A111A5 +:1032100005C0C255DF4F1882CE5AD040BE016B5E4A +:103220007F4F86E010C0C655DF4FB881CA5AD040E4 +:10323000B11105C0C255DF4F1882CE5AD040BE0131 +:103240006B5E7F4F87E00E94452E882309F4BEC540 +:103250000AC0153079F3173009F0F3C580912515B0 +:10326000823008F0A3C5212C30902515E8E03E12ED +:1032700011C0C655DF4FF881CA5AD040FF2309F468 +:1032800005C3C255DF4F2881CE5AD040213009F006 +:103290008FC511C3C255DF4F3881CE5AD04032306E +:1032A00009F0F4C2311009C0C655DF4F8881CA5AEF +:1032B000D040882309F4F1C2FEC220E030E0A90129 +:1032C00060912F15709130158091311590913215C4 +:1032D0000E942C70882309F46DC593E0931538F093 +:1032E000A2E03A1690F4B1E03B1631F0E4C2E7E018 +:1032F000E31508F0BEC2DFC2C655DF4FF881CA5AD7 +:10330000D040FF2309F4C9C2D6C2C655DF4F288179 +:10331000CA5AD040222309F48DCDCA55DF4F988177 +:10332000C65AD040892F90E0C155DF4F99838883DA +:10333000CF5AD040C754DF4FB881C95BD040AB2FC4 +:10334000B0E0CD53DF4FB983A883C35CD04081E0A8 +:1033500090E0A0E0B0E06C017D01CA55DF4F08802D +:10336000C65AD04004C0CC0CDD1CEE1CFF1C0A94D5 +:10337000D2F7C754DF4F0880C95BD04004C0880F24 +:10338000991FAA1FBB1F0A94D2F7C82AD92AEA2A72 +:10339000FB2A822F90E0A0E0B0E08C219D21AE219D +:1033A000BF21892B8A2B8B2B09F406C5C155DF4F12 +:1033B00088819981CF5AD040880F991F880F991F13 +:1033C000FC01EC5DFA4EDC01A35ABA4E57962D91E2 +:1033D0003D914D915C915A9765A576A587A590A9D9 +:1033E0000E94526F4B015C01CD53DF4F8881998160 +:1033F000C35CD040880F991F880F991FFC01EC5DBA +:10340000FA4EDC01A35ABA4E57962D913D914D913B +:103410005C915A9765A576A587A590A90E94526FE1 +:10342000C655DF4F688379838A839B83CA5AD0400D +:10343000CD54DF4F08811981C35BD040007811273C +:10344000CD54DF4FE881C35BD040E7FF15C1CD54B9 +:10345000DF4F28813981C35BD0402F77CD54DF4FB8 +:1034600039832883C35BD0400E947169882311F09F +:1034700081E2F5C4809127158130B1F423E333E371 +:103480004BEC51E4609148157091491580914A15B3 +:1034900090914B150E948572609348157093491561 +:1034A00080934A1590934B154090481550904915BC +:1034B00060904A1570904B15A5019401C501B401A7 +:1034C0000E948572C154DF4F688379838A839B830E +:1034D000CF5BD040C655DF4F288139814A815B815F +:1034E000CA5AD040CA01B9010E948572C554DF4F43 +:1034F000688379838A839B83CB5BD04020E030E074 +:1035000040E850E4C301B2010E948572A301920118 +:103510000E948572C154DF4F288139814A815B81C5 +:10352000CF5BD0400E94526FC554DF4F2881398154 +:103530004A815B81CB5BD0400E94526F6B017C0162 +:1035400020E030E0A9010E942C7087FD37C4C7013C +:10355000B6010E94F2726B017C01C554DF4F2881D5 +:1035600039814A815B81CB5BD040C154DF4F688198 +:1035700079818A819B81CF5BD0400E94536F0E94EA +:10358000F2729B01AC01C701B60190580E943370E2 +:103590006B017C0133E0331204C0F7FAF094F7F8C2 +:1035A000F09420E030E0A901C301B2010E942C7028 +:1035B00087FF0FC0F7FAF094F7F8F094D301C20137 +:1035C000B0588093481590934915A0934A15B0932D +:1035D0004B15C155DF4F08811981CF5AD040000FDC +:1035E000111F000F111F085D1A4EC655DF4F2881AD +:1035F00039814A815B81CA5AD040C701B6010E9415 +:1036000085729B01AC01C501B4010E94526F20E09C +:1036100030E040E05FE30E948572D8011B966D9315 +:103620007D938D939C931E97CD53DF4F0881198115 +:10363000C35CD040000F111F000F111F085D1A4E10 +:10364000A5019401C701B6010E948572C655DF4FDE +:10365000288139814A815B81CA5AD0400E94536FC8 +:1036600020E030E040E05FE30E948572F80163876C +:103670007487858796871FC1C154DF4FF881CF5B60 +:10368000D0404F2E512C612C712CC420D520E62027 +:10369000F720CD28CE28CF2809F492C3CD54DF4F90 +:1036A00028813981C35BD040217FCD54DF4F3983DE +:1036B0002883C35BD04080912715813009F491C0E5 +:1036C000C155DF4FE881F981CF5AD040EE0FFF1F7F +:1036D000EE0FFF1FE85DFA4EC384D484E584F684C0 +:1036E000A7019601C501B4010E94526F2B013C0154 +:1036F000CD53DF4FE881F981C35CD040EE0FFF1F4F +:10370000EE0FFF1FE85DFA4E83859485A585B6858B +:10371000C155DF4F88839983AA83BB83CF5AD0409A +:103720009C01AD01C655DF4F688179818A819B81FB +:10373000CA5AD0400E94526F4B015C01A301920112 +:10374000C301B2010E9485722B013C01A5019401C5 +:10375000C501B4010E9485729B01AC01C301B20195 +:103760000E94536F0E94F2724B015C01A701960107 +:10377000C701B6010E9485726B017C01C155DF4F04 +:10378000288139814A815B81CF5AD040CA01B90171 +:103790000E9485729B01AC01C701B6010E94536F64 +:1037A0000E94F2726B017C01609348157093491579 +:1037B00080934A1590934B159B01AC01C501B40150 +:1037C0000E94526F4B015C01E894B7F82AE037ED94 +:1037D00043EA5BE3C501B4010E944A72181664F122 +:1037E0006AC084E2E82E85E1F82ED301C201002EE2 +:1037F00004C0B695A795979587950A94D2F780FF50 +:1038000012C023E333E34BEC51E4D7011F966D91D3 +:103810007D918D919C9152970E948572F7016787E7 +:10382000708B818B928B0F5F1F4FF4E0EF0EF11CBA +:1038300003301105D1F644CF20E030E040E05FE3F3 +:10384000C501B4010E944A7218160CF411CE2FE67D +:1038500032E143E85AE3C701B6010E9485729B0139 +:10386000AC01C501B4010E944A7218160CF400CED6 +:1038700022C0C655DF4F2881CA5AD040222309F4FE +:10388000D9CA0E9471698111F3CD15C0C255DF4FAD +:103890003881CE5AD04031110EC0CD54DF4F8881CF +:1038A0009981C35BD0408E7D9C7FC255DF4F1882CB +:1038B000CE5AD04008C0CD54DF4F88819981C35B78 +:1038C000D0408E7D907E892B09F07CC2809140157E +:1038D00090914115A0914215B091431580937015B8 +:1038E00090937115A0937215B0937315809126155E +:1038F00080935E1580912F1590913015A091311510 +:10390000B091321580936B1590936C15A0936D1543 +:10391000B0936E15C0904C15D0904D15E0904E159B +:10392000F0904F15A7019601609167157091681589 +:103930008091691590916A150E942C708823F9F086 +:1039400010916615112359F080910715823039F0D6 +:103950000E945469B701A601812F0E94D72C809143 +:103960004C1590914D15A0914E15B0914F15809327 +:10397000671590936815A0936915B0936A158091A7 +:10398000501580936F1510912E1580916615811733 +:10399000B9F080910715823079F0C0906715D0900A +:1039A0006815E0906915F0906A150E945469B70196 +:1039B000A601812F0E94D72C80912E158093661529 +:1039C00010912D1580916515811781F08091071553 +:1039D000823041F00E945469123011F45C9A02C0A6 +:1039E0000E94BF5D80912D158093651580912415EF +:1039F000813089F080912915809361158091271578 +:103A000080935F15C255DF4F8881CE5AD0408330F6 +:103A100009F074C054C080910715823059F380902A +:103A2000441590904515A0904615B090471520E09C +:103A300030E040EA51E4C501B4010E9485720E9461 +:103A400009710E94A0706B017C010E94546920E002 +:103A500030E04AE754E4C501B4010E9485724B018D +:103A60005C0182E38C9DB0018D9D700D112480E07E +:103A700090E00E94CC709B01AC01C501B4010E9492 +:103A8000526F0E9409710E94A070CB010E944F39B1 +:103A900086010115110509F4ADCF0E945A39015074 +:103AA0001109809106158111A5CF9FEFA0E7B2E023 +:103AB0009150A040B040E1F700C00000EACF8091F3 +:103AC0002A1580936215813089F48091591590915F +:103AD0005A15A0915B15B0915C1580939815909341 +:103AE0009915A0939A15B0939B1508C0109298153C +:103AF0001092991510929A1510929B1580912B1582 +:103B000090916315981759F0809363158CE0FE012E +:103B10003196A0E8B5E101900D928A95E1F7809188 +:103B2000281580936015E09124158E2F90E0FC01FC +:103B30003297E830F10508F060C08827E957FF4F59 +:103B40008F4F0C949873BE016B5E7F4F822D0E9445 +:103B50003C2E80916315281250C08CE0FE017596B2 +:103B6000A0E8B5E13EC0C255DF4FE881CE5AD04053 +:103B7000EE2371F020916B1530916C1540916D150D +:103B800050916E1500E061E575E181E00E94BA5642 +:103B900020916B1530916C1540916D1550916E15FB +:103BA00000E0BE016B5E7F4F81E00E94BA56182F85 +:103BB0008CE0FE017596A4E7B5E101900D928A951F +:103BC000E1F71CC064E775E186E003C064E775E1D6 +:103BD00087E00E943C2E11C08CE0E1E5F5E1ACE805 +:103BE000B5E101900D928A95E1F707C08CE0ECE811 +:103BF000F5E1DF011D928A95E9F710E08091251526 +:103C000080935D15883009F470C0C255DF4FB881CC +:103C1000CE5AD040B23009F068C090E088309105AB +:103C200008F05AC0FC0140906B1550906C156090E4 +:103C30006D1570906E158827E157FF4F8F4F0C94CC +:103C4000987300E0A301920161E575E180E007C08F +:103C500000915E15A301920161E575E181E00E948A +:103C6000BA56182F39C06091481570914915809146 +:103C70004A1590914B158824839409C0609148158A +:103C80007091491580914A1590914B15812CCB5418 +:103C9000DF4FA880C55BD040C754DF4FC880C95BE9 +:103CA000D040CA55DF4FE880C65AD04000915E151B +:103CB000A30192010E94456A0FC000E001C001E02B +:103CC00020E004C000E001C001E021E040915E1569 +:103CD000C301B2010E94AF698CE0E1E5F5E1A4E720 +:103CE000B5E101900D928A95E1F780912C158093B2 +:103CF0006415882309F468C00E9454699091641582 +:103D000080910715913069F48230E9F19FB7F894FA +:103D10008091B51488608093B5149FBF0E945A3972 +:103D200032C091E090935D1510926115109260156C +:103D300010925E151092631510926615109265151B +:103D40008230A9F0BE016F5F7F4F80E00E94452E58 +:103D50008823E1F18CE0FE013196A0E8B5E1019005 +:103D60000D928A95E1F70E94D02C0E94BF5D80EDF4 +:103D700099E00E940A3484E799E00E940A348DE5B4 +:103D800099E00E940A34109264151EC081E067C059 +:103D900082E065C088E163C089E161C084E05FC002 +:103DA0008BE15DC085E25BC084E159C08EE157C004 +:103DB0008FE155C086E153C080E251C082E24FC01E +:103DC00083E24DC084E24BC0812F49C087E047C0E9 +:103DD000EEE14E16510411F40C948F0D70F42AE0AC +:103DE0004216510411F40C946B0D3CE1431651043E +:103DF00011F40C94780D87E132C085E34816510424 +:103E000011F40C94AF0D9CE549165104A1F721144F +:103E1000310439F0BAE02B16310431F689E00C9404 +:103E2000930D88E00C94930D3CE54316510411F07A +:103E30000C94EA0EA1E0C255DF4FA883CE5AD040C1 +:103E4000E6CF133009F00FCAE4C9153009F4F7C9F9 +:103E5000173009F403CA133009F005CADFC9C85383 +:103E6000DF4F0FB6F894DEBF0FBECDBFDF91CF910D +:103E70001F910F91FF90EF90DF90CF90BF90AF9088 +:103E80009F908F907F906F905F904F903F902F907A +:103E900008952F923F924F925F926F927F928F92EE +:103EA0009F92AF92BF92CF92DF92EF92FF920F93C9 +:103EB0001F93CF93DF93CDB7DEB7C459D1090FB6A7 +:103EC000F894DEBF0FBECDBFFB01873A28E0920712 +:103ED00009F480C208F046C08B34A8E09A0709F4C0 +:103EE00045C1F0F4833E27E0920709F4FFC060F477 +:103EF0008231910509F4FAC08C3C910509F493C014 +:103F0000419709F075C078C08934A8E09A0709F490 +:103F100012C108F018C18834984009F4C2C068C0C2 +:103F20008D3938E0930709F4E6C178F48A39B8E0AE +:103F30009B0709F488C18B3928E0920709F4BEC1B8 +:103F40008939984009F054C024C1823AA8E09A0700 +:103F500009F404C208F44CC0863A984010F40C945A +:103F6000622946C0803C28E0920709F4A0C508F504 +:103F7000873BA8E09A0709F453C570F48D3A28E00E +:103F8000920709F43AC38E3A38E0930709F443C420 +:103F90008C3A984069F524C2893BB8E09B0709F444 +:103FA00063C508F450C58A3B984011F40C9462290B +:103FB0001FC08A36A9E09A0709F44EC770F480360C +:103FC00029E0920709F402C6813639E0930709F423 +:103FD000ECC6813C984061F495C58C36B9E09B07EE +:103FE00009F4B6C708F485C7843C994009F4F9C7B9 +:103FF00081E090E00C9464298091F41482FF08C061 +:104000008A9A809108018160809308015F9A07C0B5 +:104010008A98809108018E7F809308015F980E94A2 +:10402000943F8FE00CC18E010F5F1F4F1F930F93C2 +:1040300088EC93E09F938F93FF936F930E94F973A3 +:104040000F900F900F900F900F900F901816190669 +:104050000CF09DC71D8A1E8A1F8A188EAE014B5E0A +:104060005F4F60E070E0C8010E94D0558823D1F115 +:104070004D895E896F89788D88E70E943A2D4D8938 +:104080005E896F89788D89E70E943A2D4D895E8916 +:104090006F89788D8AE70E943A2D0E9459320C94DC +:1040A00062298E010F5F1F4F1F930F9383ED93E0E3 +:1040B0009F938F93FF936F930E94F9730F900F90CC +:1040C0000F900F900F900F90181619060CF05FC705 +:1040D000AE014B5E5F4F60E070E0C8010E94D055BA +:1040E000811108C082E390E00C9464290E94D93EBB +:1040F0000C94622920E030E04AE754E46D897E891F +:104100008F89988D0E9485720E949B7016161706E3 +:1041100094F47093180D6093170D11E01093190D1E +:104120008091160D81110C9462290E94153E109306 +:10413000160D0C9462291092190D1092180D109200 +:10414000170D0C9462298081863561F68181805338 +:10415000823040F61092950D813021F01092940D2E +:104160000C9462298093940D0C9462298081863589 +:1041700009F0B8CF81818053823008F0B3CF81300D +:1041800021F010929A0D0C94622980939A0D0C9450 +:10419000622980818E3409F0A5CF918190539430AB +:1041A00008F0A0CF923079F1933009F443C0209108 +:1041B000F4148091910D913099F022FF08C08A9AF1 +:1041C000909108019160909308015F9A07C08A98C6 +:1041D000909108019E7F909308015F9884602FC0A2 +:1041E00022FF08C08A9A909108019160909308017B +:1041F0005F9A07C08A98909108019E7F909308016A +:104200005F9881601CC08091F41482FF08C08A9A74 +:10421000809108018160809308015F9A07C08A98A5 +:10422000809108018E7F809308015F988091910DA5 +:10423000826005C00E94943F8091910D88608093B8 +:10424000910D0C94602980818E3409F04BCF9181BF +:104250009053943008F046CF9230B1F0933041F152 +:104260002091F4148091910D913039F022FF02C019 +:104270005F9801C05F9A8B7F17C022FF02C08A98A7 +:1042800001C08A9A8E7F10C08091F41482FF04C00E +:10429000809108018E7F03C0809108018160809326 +:1042A00008018091910D8D7F8093910D0C9462296E +:1042B0000E94CB3E8091910D877FF6CF80818E3416 +:1042C00009F010CF81818053843008F00BCF90919A +:1042D000910D823051F0833059F0813019F090FF08 +:1042E00098C394C391FD92C394C392FD8FC391C3AD +:1042F00093FF8FC38BC38E010F5F1F4F1F930F93CD +:104300008CED93E09F938F93FF936F930E94F973CB +:104310000F900F900F900F900F900F901816190696 +:104320000CF035C68CE0F801AAE1BDE001900D92D9 +:104330008A95E1F70AE11DE08AEE93E0D8016D91DC +:104340008D017C01BFEFEB1AFB0A0E94185DC701CB +:10435000E6EFEE16E3E0FE0689F7B4C71AA619A643 +:104360001D8A1E8A1F8A188E8E010F5F1F4F8AE0DA +:10437000D8011D928A95E9F7CE0189969F938F9374 +:104380001F930F9387EE93E09F938F93FF936F9309 +:104390000E94F9730FB6F894DEBF0FBECDBF02972F +:1043A0000CF4F5C5AE014B5E5F4F60E070E0C801F4 +:1043B0000E94D055882309F495CE2D893E894F89D6 +:1043C000588D69A57AA5072E000C880B990B0E94C1 +:1043D000303E78C78FEF0E94652E0E948C3D72C7D9 +:1043E0002E0125E6420E511C84E1D201282F1D9298 +:1043F0002A95E9F73E0131E5630E711CD301282FA0 +:104400001D922A95E9F78E01035C1F4FD8011D927A +:104410008A95E9F7C357DF4F188219821A821B82E7 +:10442000CD58D040C757DF4F188219821A821B829D +:10443000C958D040CB57DF4F188219821A821B828D +:10444000C558D0401F930F937F926F925F924F9207 +:1044500083EF93E09F938F93FF936F930E94F97381 +:104460000FB6F894DEBF0FBECDBF03970CF48FC517 +:10447000AE0143575F4F60E070E0C2010E94D0552B +:10448000882309F42FCEAE0147575F4F60E070E0FC +:10449000C3010E94D055882309F424CEAE014B57A6 +:1044A0005F4F60E070E0C8010E94D055882309F496 +:1044B00019CECF57DF4F188219821A821B82C1583A +:1044C000D040C358DF4F188219821A821B82CD5701 +:1044D000D040ED961CAE1DAE1EAE1FAEED9784E132 +:1044E0003E01F9E26F0E711CD301E82F1D92EA958F +:1044F000E9F72E01F5E14F0E511CD201E82F1D9274 +:10450000EA95E9F79E012F5F3F4F1901D9011D92EE +:104510008A95E9F7AE014B575F4FBE0167577F4F52 +:10452000CE0183579F4F0E94BD41CB57DF4FE8809C +:10453000F9800A811B81C558D040C757DF4F2881B9 +:1045400039814A815B81C958D040C357DF4F6881A8 +:1045500079818A819B81CD58D040FE01EF57FF4F72 +:104560004F01DE01A758BF4F5D0134976F010E94D4 +:10457000114320E030E044EB52E4CF57DF4F688135 +:1045800079818A819B81C158D0400E94536FCF5757 +:10459000DF4F688379838A839B83C158D040C35897 +:1045A000DF4F688179818A819B81CD57D04082011C +:1045B00024E045E00E94D76CED966CAD7DAD8EADEC +:1045C0009FADED97810124E045E00E94D76CCF5765 +:1045D000DF4F688179818A819B81C158D0408301F6 +:1045E00024E045E00E94D76C3F922F925F924F9259 +:1045F0007F926F928CEA92E000C12E0135E6430E65 +:10460000511C84E1D201282F1D922A95E9F73E0121 +:1046100031E5630E711CD301282F1D922A95E9F70D +:104620008E01035C1F4FD8011D928A95E9F7C3578D +:10463000DF4F188219821A821B82CD58D040C7578B +:10464000DF4F188219821A821B82C958D040CB577B +:10465000DF4F188219821A821B82C558D0401F93DF +:104660000F937F926F925F924F9282E194E09F93BB +:104670008F93FF936F930E94F9730FB6F894DEBF88 +:104680000FBECDBF03970CF482C4AE0143575F4FFA +:1046900060E070E0C2010E94D055882309F422CD69 +:1046A000AE0147575F4F60E070E0C3010E94D055F4 +:1046B000882309F417CDAE014B575F4F60E070E0DF +:1046C000C8010E94D055882309F40CCDCF57DF4F85 +:1046D000188219821A821B82C158D040C358DF4FFA +:1046E000188219821A821B82CD57D040ED961CAEDB +:1046F0001DAE1EAE1FAEED9784E13E01F9E26F0ED6 +:10470000711CD301E82F1D92EA95E9F72E01F5E11E +:104710004F0E511CD201E82F1D92EA95E9F79E0138 +:104720002F5F3F4F1901D9011D928A95E9F720E0CB +:1047300030E044EB52E4C357DF4F688179818A81CE +:104740009B81CD58D0400E94526F7B018C01C35792 +:10475000DF4F688379838A839B83CD58D040CB57C2 +:10476000DF4F288139814A815B81C558D040C757C6 +:10477000DF4F688179818A819B81C958D040FE01D1 +:10478000E758FF4F4F01DE01A358BF4F5D01389638 +:104790006F010E947644A401B501C6010E946842DF +:1047A000CF57DF4F688179818A819B81C158D04082 +:1047B000830124E045E00E94D76CC358DF4F688135 +:1047C00079818A819B81CD57D040820124E045E0E8 +:1047D0000E94D76CED966CAD7DAD8EAD9FADED9723 +:1047E000810124E045E00E94D76C3F922F925F92B6 +:1047F0004F927F926F928DED92E09F938F9387E21D +:104800009DE09F938F930E94CB730FB6F894DEBF09 +:104810000FBECDBF57C5CF57DF4F188219821A82FE +:104820001B82C158D040C358DF4F188219821A82A8 +:104830001B82CD57D040ED961CAE1DAE1EAE1FAEF6 +:10484000ED9784E12E0139E2430E511CD201282F4D +:104850001D922A95E9F73E0135E1630E711CD301E3 +:10486000282F1D922A95E9F7DE0111967D011D92F0 +:104870008A95E9F78E010B571F4F8FEF90E0D80113 +:104880008D939C931F930F93FF92EF927F926F9261 +:104890005F924F9281E394E09F938F93FF936F9386 +:1048A0000E94F9730FB6F894DEBF0FBECDBF049718 +:1048B0000CF46DC3AE014F575F4F60E070E0C20172 +:1048C0000E94D055882309F40DCCAE0143585F4FA8 +:1048D00060E070E0C3010E94D055882309F402CC47 +:1048E000AE0147585F4F60E070E0C7010E94D055AD +:1048F000882309F4F7CBD8018D919C91009709F496 +:1049000043C0019709F0EECBCF57DF4F4880598065 +:104910006A807B80C158D04020E030E044EB52E414 +:10492000C358DF4F688179818A819B81CD57D04000 +:104930000E94526F21EE3EE245E652E40E9433703F +:104940006B017C010E9430709B01AC01C301B2017C +:104950000E948572CF57DF4F688379838A839B8358 +:10496000C158D040C701B6010E94E8729B01AC015A +:10497000C301B2010E948572C358DF4F68837983F7 +:104980008A839B83CD57D040AE0147585F4FBE010D +:1049900063587F4FCE018F579F4F0E94BD41ED96C8 +:1049A000ECACFDAC0EAD1FADED97C358DF4F2881C9 +:1049B00039814A815B81CD57D040CF57DF4F688125 +:1049C00079818A819B81C158D040FE01FD964F01BB +:1049D000DE01AF5ABF4F5D01B8966F010E941143CF +:1049E0002196ECACFDAC0EAD1FAD219765962CADBC +:1049F0003DAD4EAD5FAD6597A9966CAD7DAD8EAD0D +:104A00009FADA9970E94EB45882319F067ED73E0ED +:104A100002C063EC73E087E29DE00E94C47352C45D +:104A20008081863509F05ECB81818053823008F029 +:104A300059CB813019F00E94873D44C49C9A9D9ABD +:104A4000A49AA5983FC48081863509F04BCB81811B +:104A50008053823008F046CB813019F00E94843DAB +:104A600031C43F9A47982EC48081863509F03ACBED +:104A700081818053823008F035CB813019F00E945B +:104A8000733D20C480910101806280930101809177 +:104A90000101806480930101809102018062809312 +:104AA0000201809102018064809302010BC4CE0157 +:104AB00001969F938F9344969F938F9383E594E001 +:104AC0009F938F93FF936F930E94F9730FB6F8949F +:104AD000DEBF0FBECDBF02970CF459C28D899E89EF +:104AE0008634910508F0FECA29813A8122303105C9 +:104AF00008F0F8CA232B11F061E001C060E00E94C9 +:104B0000CA54E0C3CE0101969F938F9344969F931E +:104B10008F9383E594E09F938F93FF936F930E940D +:104B2000F9730FB6F894DEBF0FBECDBF02970CF439 +:104B30002EC28D899E898634910508F0D3CA2981B9 +:104B40003A812230310508F0CDCAFC01E05CF54F16 +:104B50008650964F232BD1F02491FC018491882319 +:104B600009F4B0C390E0880F991FFC01E455F84F99 +:104B7000A591B491FC01E052F64F859194918FB7C5 +:104B8000F894EC91E22BEC938FBF9CC32491FC0131 +:104B90008491882309F496C390E0880F991FFC0143 +:104BA000E455F84F45915491FC01E052F64FA59120 +:104BB000B4919FB7F894FA01808120958223808375 +:104BC0008C91E22FE823EC939FBF7CC380818335D7 +:104BD00009F088CA8181E0EDE80FE83008F082CA68 +:104BE0008E2F90E0FC013197E730F10530F48827F3 +:104BF000E956FF4F8F4F0C9498730E94CB3E109252 +:104C0000600D10925F0D8AE999E1A5E9B2E4809305 +:104C1000650D9093660DA093670DB093680D8AE9BA +:104C200099E9A2E6B2E4B8C00E94CB3E81E090E0F0 +:104C30009093600D80935F0D86EF98E2ACE4B2E450 +:104C40008093650D9093660DA093670DB093680DEA +:104C50008DEC9CECA0E8B2E49FC00E94CB3E82E0C9 +:104C600090E09093600D80935F0D89E29CEDA4E944 +:104C7000B2E48093650D9093660DA093670DB09399 +:104C8000680D80E090E0A2E6B2E486C00E94CB3ED0 +:104C900083E090E09093600D80935F0D80E090E062 +:104CA000ACE2B2E48093650D9093660DA093670D1E +:104CB000B093680D80E090E0ABE8B2E46DC00E9474 +:104CC000CB3E84E090E09093600D80935F0D80E098 +:104CD00090E0ACE1B2E48093650D9093660DA093F3 +:104CE000670DB093680D80E090E0A9E9B2E418C0C8 +:104CF0000E94CB3E85E090E09093600D80935F0D25 +:104D000080E090E0ACEDB1E48093650D9093660D8A +:104D1000A093670DB093680D80E090E0A7E9B2E43E +:104D20008093610D9093620DA093630DB093640D19 +:104D30000E949E3EDBC00E94CB3E86E090E09093B6 +:104D4000600D80935F0D86E696E6AAE9B2E4809353 +:104D5000650D9093660DA093670DB093680D80E08C +:104D600090E0AAE5B2E418C00E94CB3E87E090E054 +:104D70009093600D80935F0D85E89BEEABECB1E402 +:104D80008093650D9093660DA093670DB093680DA9 +:104D900080E090E0A2E3B2E48093610D9093620D15 +:104DA000A093630DB093640DA1C080E090E00E94D9 +:104DB000AF4690935C0D80935B0D81E090E00E9484 +:104DC000AF4690935E0D80935D0D82E090E00E946F +:104DD000AF4690935A0D8093590D09E51DE084E389 +:104DE00093E0D8016D918D017C01BFEFEB1AFB0AB6 +:104DF0000E94185DC701EAE3EE16E3E0FE0689F7BC +:104E00006BEB82E393E00E94185D0E94854680E090 +:104E100090E00E94014760936D0D70936E0D80933A +:104E20006F0D9093700D81E090E00E9401476093B8 +:104E3000710D7093720D8093730D9093740D82E0D9 +:104E400090E00E9401476093750D7093760D8093FA +:104E5000770D9093780D36C26091121570911315ED +:104E600080911415909115150E94CE702B013C0174 +:104E700060910E1570910F1580911015909111157C +:104E80000E94CE70CF56DF4F688379838A839B83DD +:104E9000C159D04060910A1570910B1580910C1585 +:104EA00090910D150E94CE709E012F5F3F4F4901DA +:104EB000DE0155965D01FE01B9966F018301720115 +:104EC000CF56DF4F288139814A815B81C159D0405B +:104ED0000E945A4589819A81AB81BC818093650D7E +:104EE0009093660DA093670DB093680D0E94D63D18 +:104EF000E9C11D8A1E8A1F8A188E8E010F5F1F4FFF +:104F000084E1D8011D928A95E9F71F930F938AE5F2 +:104F100094E09F938F93FF936F930E94F9730F9088 +:104F20000F900F900F900F900F90181619067CF5A8 +:104F3000AE014B5E5F4F60E070E0C8010E94D0554B +:104F4000882309F4CFC88D899E89AF89B88D24CF75 +:104F50001D8A1E8A1F8A188E8E010F5F1F4F84E1E3 +:104F6000D8011D928A95E9F71F930F9385E694E087 +:104F70009F938F93FF936F930E94F9730F900F90FD +:104F80000F900F900F900F901816190674F01F9243 +:104F900081E08F938DE092E09F938F930E94AF33D7 +:104FA0000F900F900F900F909DC8AE014B5E5F4F1A +:104FB00060E070E0C8010E94D055882309F492C8CF +:104FC0008D899E89AF89B88D8093690D90936A0D04 +:104FD000A0936B0DB0936C0D0E94D63D0E949E3E37 +:104FE00071C1899865E9662E6EE0762E830182E0B4 +:104FF00090E00E94AF46F801819391938F0150E9B0 +:10500000E52EFF24F394889A6AE070E080E090E057 +:105010000E94113988986CE271E080E090E00E9473 +:105020001139F1E0EF1AF10871F788EE93E00E9470 +:105030004F392FE00D351207D1F682E090E00E9443 +:10504000AF4690935E0F80935D0F899A00E21EE455 +:10505000889A6AE070E080E090E00E9411398898B8 +:105060006CE271E080E090E00E941139015011097A +:1050700079F78F984EE0E42EF12C00E911E08E9A3A +:105080006AE070E080E090E00E9411398E986CE256 +:1050900071E080E090E00E9411390150110979F728 +:1050A00031E0E31AF10849F788EE93E00E944F39A6 +:1050B0008F9A35E1232E3EE0332E210100E010E0EF +:1050C00080E090E00E94AF46D2018D939D932D0128 +:1050D00020E9E22EFF24F3948E9A6AE070E080E0EB +:1050E00090E00E9411398E9864EF71E080E090E0CA +:1050F0000E941139B1E0EB1AF10871F70E30110579 +:10510000A9F088EE93E00E944F390F5F1F4F0F33D5 +:105110001105B1F680E090E00E94AF469093940EA6 +:105120008093930E8F9800E51DE223C080910B01C0 +:105130008D7F80930B01E12C92E3F92E80910B017E +:10514000886080930B016AE070E080E090E00E944C +:10515000113980910B01877F80930B016CE271E024 +:1051600080E090E00E941139E1E0EE1AF10831F799 +:10517000C8CF8E9A6AE070E080E090E00E9411391A +:105180008E986CE271E080E090E00E94113901504D +:10519000110979F788EE93E00E944F3980910B0155 +:1051A000826080930B0100E913E380910B0188601A +:1051B00080930B016AE070E080E090E00E9411397A +:1051C00080910B01877F80930B016CE271E080E09E +:1051D00090E00E9411390150110939F788EE93E0EF +:1051E0000E944F3980910B018D7F80930B010BE959 +:1051F0001DE0280181E090E00E94AF46D2018D932E +:105200009D932D0180E9E82EFF24F39480910B01FA +:10521000886080930B016AE070E080E090E00E947B +:10522000113980910B01877F80930B016CE271E053 +:1052300080E090E00E941139B1E0EB1AF10831F7FB +:1052400088EE93E00E944F39E3E14E16EEE05E06F1 +:1052500089F681E090E00E94AF469093140E80930F +:10526000130E81E090E0D3016D913D012C01BFEF61 +:105270004B1A5B0A0E94185DC2018B3C910599F79D +:10528000F10161911F013201FFEF6F1A7F0AC20124 +:105290000E94185D23012BE4621621E0720681F75B +:1052A000D8016D918D017301BFEFEB1AFB0AC301A9 +:1052B0000E94185D3701E5ECEE16E1E0FE0681F78D +:1052C0000E94FF3C80E090E0CC56DF4F0FB6F89490 +:1052D000DEBF0FBECDBFDF91CF911F910F91FF9029 +:1052E000EF90DF90CF90BF90AF909F908F907F9086 +:1052F0006F905F904F903F902F90089569E080E00D +:1053000090E00E94185D4DE450E067EB74E181E0AD +:1053100098E00C943A5DCF92DF92EF92FF920F9358 +:105320001F939091E814092F10E020E030E0809165 +:10533000E914482F50E060E070E0917081706801DE +:105340007901F694E794D794C794C0FC92606A01FF +:105350007B01F694E794D794C794C0FC8260E2E0A6 +:105360003695279517950795EA95D1F700FD946036 +:1053700022E076956795579547952A95D1F740FD98 +:10538000846090939D1080939C101F910F91FF90CB +:10539000EF90DF90CF9008951F920F920FB60F926B +:1053A00011240BB60F922F933F938F939F93EF93FC +:1053B000FF9321B330919D10832F817090E036E0F0 +:1053C000880F991F3A95E1F7922F9F7B892B81BB1C +:1053D000EBE0F1E0908180919D108270880F880F42 +:1053E000977F892B808381B390919D1092FB9927A1 +:1053F00090F98E7F892B81BB15BCFF91EF919F9116 +:105400008F913F912F910F900BBE0F900FBE0F9079 +:105410001F90189580916F008D7F80936F00809111 +:105420008100887F81608093810010929E1080911E +:10543000EA148F3F21F490910515992349F090913A +:105440000715943029F090E00E944F3981E001C0A7 +:1054500080E09091F41492FF02C091E089278823A4 +:1054600041F08A9A809108018160809308015F9AD7 +:1054700008958A98809108018E7F809308015F9833 +:1054800008951F920F920FB60F9211240BB60F9230 +:105490002F933F934F935F936F937F938F939F933C +:1054A000AF93BF93EF93FF9380919E10811139C208 +:1054B0008091AE1080FD8F9A80FF8F9890910B01A4 +:1054C000482F42709D7F942B90930B0141B38470C1 +:1054D00090E095958795942F9D7F892B81BB91B303 +:1054E0008091AD10282F217030E066E0220F331F2D +:1054F0006A95E1F79F7B292B21BB90910B01282F07 +:105500002270220F220F977F922B90930B0121B3D1 +:1055100082FB992790F9822F8E7F892B81BB809106 +:10552000AC1086BD82E085BD81E080939E107894AA +:105530008091C0109091C110892B09F0ACC080916E +:10554000A7139091CC13981709F49BC0E091A7136F +:105550002E2F30E086E0E89FF0011124E855FC4E44 +:10556000F093C110E093C0108381948190938900DF +:1055700080938800808191819093BC108093BB10B0 +:10558000E2818091BD108E1761F1E093BD1081E141 +:10559000E89FF0011124E353FC4EF093BF10E09319 +:1055A000BE1085859685A785B089B695A7959795F0 +:1055B00087958093A7109093A810A093A910B093FB +:1055C000AA108093A3109093A410A093A510B09359 +:1055D000A61080939F109093A010A093A110B09359 +:1055E000A210E091BE10F091BF10908180919C10AC +:1055F00089278093AE1086E0829FD001839FB00DF3 +:105600001124A855BC4E15962C9181819281A381BD +:10561000B481022E04C0B695A795979587950A94F4 +:10562000D2F78093AF109093B010A093B110B093C5 +:10563000B21085819681A781B085022E04C0B695EF +:10564000A795979587950A94D2F78093B310909376 +:10565000B410A093B510B093B61081859285A38540 +:10566000B48504C0B695A795979587952A95D2F7E6 +:105670008093B7109093B810A093B910B093BA105C +:105680000AC0C8DE9FB7F8948091B51484608093F7 +:10569000B5149FBF46C18091B6148130B1F489B171 +:1056A000807190910415891781F01092B6148CE0E6 +:1056B000EAE0F5E1A6E1B5E101900D928A95E1F706 +:1056C0008091B51480648093B5141092AD10409110 +:1056D0009F105091A0106091A1107091A210809124 +:1056E000AF109091B010A091B110B091B210840F92 +:1056F000951FA61FB71F80939F109093A010A09393 +:10570000A110B093A210E091BE10F091BF1045859A +:10571000568567857089481759076A077B0768F5BA +:1057200021E02093AD104585568567857089841BDF +:10573000950BA60BB70B80939F109093A010A0938E +:10574000A110B093A210208180910A1590910B15A1 +:10575000A0910C15B0910D1520FF04C00197A1096F +:10576000B10903C00196A11DB11D80930A15909344 +:105770000B15A0930C15B0930D154091A3105091EB +:10578000A4106091A5107091A6108091B310909113 +:10579000B410A091B510B091B610840F951FA61F3C +:1057A000B71F8093A3109093A410A093A510B0935B +:1057B000A6104585568567857089481759076A0779 +:1057C0007B0778F52091AD1022602093AD104585C0 +:1057D000568567857089841B950BA60BB70B809344 +:1057E000A3109093A410A093A510B093A6102081AD +:1057F00080910E1590910F15A0911015B091111573 +:1058000021FF04C00197A109B10903C00196A11DA0 +:10581000B11D80930E1590930F15A0931015B093A2 +:1058200011154091A7105091A8106091A910709186 +:10583000AA108091B7109091B810A091B910B091B2 +:10584000BA10840F951FA61FB71F8093A7109093BF +:10585000A810A093A910B093AA1045855685678516 +:105860007089481759076A077B0778F52091AD10B2 +:1058700024602093AD104585568567857089841B0B +:10588000950BA60BB70B8093A7109093A810A0932D +:10589000A910B093AA102081809112159091131530 +:1058A000A0911415B091151522FF04C00197A1090C +:1058B000B10903C00196A11DB11D809312159093EB +:1058C0001315A0931415B093151580910715843006 +:1058D00039F49091AD108091231589238093AD10F8 +:1058E0008091BB109091BC1001979093BC10809355 +:1058F000BB10892B69F41092C1101092C0108091D6 +:10590000A7138F5F8093A713863011F41092A7130B +:105910009091AD1080919D1089278093AD101092C9 +:105920009E10FF91EF91BF91AF919F918F917F91C9 +:105930006F915F914F913F912F910F900BBE0F9000 +:105940000FBE0F901F9018958091F41482FF08C02D +:105950008A9A809108018160809308015F9A07C04C +:105960008A98809108018E7F809308015F988091CA +:1059700007158C70A1F080919C108093AE108091DF +:105980009D108093AD108091E714880F845081950D +:105990008093AC1080916F00826080936F000895B7 +:1059A000E0EAF0E080818F7D80835C980895CF925B +:1059B000DF92EF92FF926A017B01811105C0FF9097 +:1059C000EF90DF90CF90ECCF813011F45C9801C064 +:1059D0005C9A83E28093A0008091A100807E8A611E +:1059E0008093A1008FEF9FEF9093A9008093A80070 +:1059F00020E030E0A901C701B6010E942C70181602 +:105A0000F4F620E030E0A901C701B6010E942C7035 +:105A100087FD11C020E030E04AE754E4C701B60139 +:105A20000E944A72181654F4C12CD12C8AE7E82E31 +:105A300084E4F82E03C0C12CD12C76012CEE31E188 +:105A400043E852E4C701B6010E94857220E030E0CD +:105A500040E05FE30E94536F0E9409710E94A070B2 +:105A60007093AB006093AA005C9AFF90EF90DF9078 +:105A7000CF900895CF92DF92EF92FF92CF93DF9372 +:105A8000C82F6A017B0120E030E0A901C701B601FF +:105A90000E942C7087FDE2C0C43608F441C08CE936 +:105AA0008C0F20E0833098F590E0880F991F880FC5 +:105AB000991F223079F0FC01233011F1213019F0C7 +:105AC000E954FB4E02C0ED53FB4EC082D182E2820C +:105AD000F382C1C0EC01C153DB4E20E030E040E76F +:105AE00052E4C701B6010E94857220E030E040E731 +:105AF00052E40E948572688379838A839B83ABC05A +:105B0000E552FB4EF7FAF094F7F8F094DECF2F5FF2 +:105B10008A3008F4A5C0243009F4A2C08A50C2CF4C +:105B2000C701B6010E9433730E94A0708C2F90E0D1 +:105B30008C31910508F094C0FC018827E256FF4F94 +:105B40008F4F0C949873633008F48CC06093E71403 +:105B500082C06093EA147FC06093E81402C060932F +:105B6000E914D9DB78C08091F414662311F08460C5 +:105B70004CC08B7F4AC08091F414662311F080647E +:105B800044C08F7B42C08091F414662311F080687A +:105B90003CC08F773AC06093EB145DC0C092EC14A8 +:105BA000D092ED14E092EE14F092EF1454C0C09233 +:105BB000F014D092F114E092F214F092F3144BC06E +:105BC0008091F414662311F081601FC08E7F1DC088 +:105BD0008091F414662321F084FF46C0806215C0D2 +:105BE0008F7D13C08091F414662311F0886001C08A +:105BF000877F8093F4140E94005D2DC08091F4147F +:105C0000662311F0806101C08F7C8093F41423C05F +:105C10006093F51420C0C092F614D092F714E0926D +:105C2000F814F092F91417C0C092FA14D092FB1431 +:105C3000E092FC14F092FD140EC070E07093FF141B +:105C40006093FE1408C0C0920015D0920115E09236 +:105C50000215F092031552DB80E007C084E005C016 +:105C600083E003C086E001C08AE0DF91CF91FF901E +:105C7000EF90DF90CF9008952DE0829FC001112416 +:105C80004CE050E0965F0C943A5D1F93CF93DF9306 +:105C9000182FEB018DE0189FB0011124765F4CE0C6 +:105CA00050E0CE010E947D5D892B51F48CE0FE0115 +:105CB00011928A95E9F7BE01812FDEDF80E001C0F5 +:105CC00081E0DF91CF911F910895EF92FF920F93A2 +:105CD0001F93CF93DF93CDB7DEB72C970FB6F89411 +:105CE000DEBF0FBECDBF182F80FFC6C08AE08093F5 +:105CF000E7148FEF8093EA141092E81487E0809302 +:105D0000E91483E08093EB148AE097EDA3E2BCE30F +:105D10008093EC149093ED14A093EE14B093EF14D1 +:105D20008FE692E1A3E0BBE38093F0149093F1142B +:105D3000A093F214B093F3141092F51480E090E065 +:105D4000A8ECB1E48093F6149093F714A093F814A0 +:105D5000B093F91480E090E0AAEFB3E48093FA14D2 +:105D60009093FB14A093FC14B093FD148AEF90E081 +:105D70009093FF148093FE1480E090E0A0E8BFE3CE +:105D80008093001590930115A0930215B09303150D +:105D900084E08093F41480E090E0A8ECB5E4809374 +:105DA000B7149093B814A093B914B093BA14809315 +:105DB000BB149093BC14A093BD14B093BE148093F5 +:105DC000BF149093C014A093C114B093C21480E088 +:105DD00090E5A3ECB7E48093C3149093C414A0930C +:105DE000C514B093C6148093C7149093C814A0939D +:105DF000C914B093CA148093CB149093CC14A0937D +:105E0000CD14B093CE1480E090EAACE0B7E4809378 +:105E1000CF149093D014A093D114B093D214809344 +:105E2000D3149093D414A093D514B093D614809324 +:105E3000D7149093D814A093D914B093DA1480E0B7 +:105E400090E4ACE1B6EC8093DB149093DC14A09367 +:105E5000DD14B093DE148093DF149093E014A093CC +:105E6000E114B093E2148093E3149093E414A093AC +:105E7000E514B093E61442DA11FF0FC0CE0101968B +:105E80007C018CE0F70111928A95E9F700E0B701F7 +:105E9000802FF2DE0F5F0830D1F712FF0AC060E0FA +:105EA00080E09BE00E94185D60E081E59BE00E943D +:105EB000185D13FF05C060E08EEA9BE00E94185D4C +:105EC0002C960FB6F894DEBF0FBECDBFDF91CF91F9 +:105ED0001F910F91FF90EF9008951F920F920FB6B0 +:105EE0000F9211240BB60F922F933F934F935F9312 +:105EF0006F937F938F939F93AF93BF93EF93FF9392 +:105F00008091360123E030E03093641020936310D9 +:105F10008F33A9F050F4883109F1813211F59FB720 +:105F2000F8948091B514886015C0803471F08E3774 +:105F3000C1F49FB7F8948091B51482600BC09FB7ED +:105F4000F8948091B514816005C09FB7F894809152 +:105F5000B51480628093B5149FBF14C00E94905600 +:105F600011C0E091E00F91E09E0F903809F490E0AD +:105F70002091DF0F921731F0F0E0E15AF04F80836B +:105F80009093E00FFF91EF91BF91AF919F918F910F +:105F90007F916F915F914F913F912F910F900BBE29 +:105FA0000F900FBE0F901F9018951F920F920FB673 +:105FB0000F9211240BB60F922F933F934F935F9341 +:105FC0006F937F938F939F93AF93BF93EF93FF93C1 +:105FD0008091D60022E030E030936410209363106B +:105FE0008F33A9F050F4883109F1813211F59FB750 +:105FF000F8948091B514886015C0803471F08E37A4 +:10600000C1F49FB7F8948091B51482600BC09FB71C +:10601000F8948091B514816005C09FB7F894809181 +:10602000B51480628093B5149FBF14C00E9490562F +:1060300011C0E091E00F91E09E0F903809F490E0DC +:106040002091DF0F921731F0F0E0E15AF04F80839A +:106050009093E00FFF91EF91BF91AF919F918F913E +:106060007F916F915F914F913F912F910F900BBE58 +:106070000F900FBE0F901F9018951F920F920FB6A2 +:106080000F9211240BB60F922F933F934F935F9370 +:106090006F937F938F939F93AF93BF93EF93FF93F0 +:1060A0008091CE0021E030E03093641020936310A3 +:1060B0008F33A9F050F4883109F1813211F59FB77F +:1060C000F8948091B514886015C0803471F08E37D3 +:1060D000C1F49FB7F8948091B51482600BC09FB74C +:1060E000F8948091B514816005C09FB7F8948091B1 +:1060F000B51480628093B5149FBF14C00E9490565F +:1061000011C0E091E00F91E09E0F903809F490E00B +:106110002091DF0F921731F0F0E0E15AF04F8083C9 +:106120009093E00FFF91EF91BF91AF919F918F916D +:106130007F916F915F914F913F912F910F900BBE87 +:106140000F900FBE0F901F9018951F920F920FB6D1 +:106150000F9211240BB60F922F933F934F935F939F +:106160006F937F938F939F93AF93BF93EF93FF931F +:106170008091C60010926410109263108F33A9F0C2 +:1061800050F4883109F1813211F59FB7F89480916C +:10619000B514886015C0803471F08E37C1F49FB794 +:1061A000F8948091B51482600BC09FB7F8948091E9 +:1061B000B514816005C09FB7F8948091B5148062D2 +:1061C0008093B5149FBF14C00E94905611C0E091F7 +:1061D000E00F91E09E0F903809F490E02091DF0FDE +:1061E000921731F0F0E0E15AF04F80839093E00F86 +:1061F000FF91EF91BF91AF919F918F917F916F919F +:106200005F914F913F912F910F900BBE0F900FBE5A +:106210000F901F9018951F920F920FB60F92112496 +:106220000BB60F928F939F93EF93FF938091621021 +:10623000E82FF0E0EE51F04F9081909336018F5FA0 +:10624000803809F480E0809362109091E10F891307 +:1062500005C0809131018F7D80933101FF91EF91D5 +:106260009F918F910F900BBE0F900FBE0F901F90BC +:1062700018951F920F920FB60F9211240BB60F9222 +:106280008F939F93EF93FF9380916210E82FF0E03C +:10629000EE51F04F90819093D6008F5F803809F4D3 +:1062A00080E0809362109091E10F891305C0809186 +:1062B000D1008F7D8093D100FF91EF919F918F91BD +:1062C0000F900BBE0F900FBE0F901F9018951F924E +:1062D0000F920FB60F9211240BB60F928F939F93CC +:1062E000EF93FF9380916210E82FF0E0EE51F04FB2 +:1062F00090819093CE008F5F803809F480E0809386 +:1063000062109091E10F891305C08091C9008F7DC3 +:106310008093C900FF91EF919F918F910F900BBED9 +:106320000F900FBE0F901F9018951F920F920FB6EF +:106330000F9211240BB60F928F939F93EF93FF93BD +:1063400080916210E82FF0E0EE51F04F9081909331 +:10635000C6008F5F803809F480E0809362109091CE +:10636000E10F891305C08091C1008F7D8093C1002A +:10637000FF91EF919F918F910F900BBE0F900FBEE9 +:106380000F901F901895E091E10F91E09E0F9038CB +:1063900031F490E004C02091B51424FD2FC0209169 +:1063A00062102917C1F3F0E0EE51F04F8083909313 +:1063B000E10F80916310909164108130910569F034 +:1063C00030F08230910579F0039799F0089580912B +:1063D000C10080628093C10008958091C9008062ED +:1063E0008093C90008958091D10080628093D1008C +:1063F0000895809131018062809331010895CF9397 +:10640000C82F83EB98E006D2C830B1F190F4C430C5 +:1064100051F148F4C23001F118F5C13009F040C023 +:106420008BE998E01BC0C63009F118F58CE598E0BF +:1064300015C0C43169F140F4CA3021F100F1CB300C +:1064400079F580E794E02AC0C63129F1F0F0C23333 +:1064500039F58AE794E022C089E898E0DBD125C0CD +:1064600087E798E0FBCF8DE698E0F8CF8DE498E0E1 +:10647000F5CF8CE298E0F2CF83E298E0EFCF88E1AD +:1064800098E0ECCF85E098E0E9CF8FEE97E0E6CF9B +:1064900085E794E003C08BED97E0E0CF09D205C01B +:1064A00089EC97E0B7D18C2FA7D186EC97E0CF91FC +:1064B000B1C11F93CF93DF93CDB7DEB72C970FB643 +:1064C000F894DEBF0FBECDBF80E090E00E94755D06 +:1064D000893009F052C04DE450E061E078E087EB8C +:1064E00094E10E947D5D892B09F447C020E030E0F3 +:1064F00048EC55E46091B7147091B8148091B914C8 +:106500009091BA140E942C70811137C020E030E0C5 +:1065100048EC55E46091BB147091BC148091BD149B +:106520009091BE140E942C70811127C020E030E0B1 +:1065300048EC55E46091BF147091C0148091C1146F +:106540009091C2140E942C70811117C010E0BE01FE +:106550006F5F7F4F812F99DB811102C087E04FDF92 +:106560001F5F1830A1F72C960FB6F894DEBF0FBE50 +:10657000CDBFDF91CF911F9108958FEFA6DBE6CFBE +:106580008F929F92AF92BF92CF92DF92EF92FF9243 +:106590000F931F93CF93DF93CDB7DEB72A970FB634 +:1065A000F894DEBF0FBECDBF6B017C01042F20E04D +:1065B00030E0A9010E942C7087FF06C08DE2E3DE67 +:1065C000F7FAF094F7F8F094102F123060F020E012 +:1065D00030E048EC52E4C701B6010E9485726B01BD +:1065E0007C011250F2CF00FF0AC020E030E040E210 +:1065F00051E4C701B6010E9485726B017C0120E065 +:1066000030E040E05FE3C701B6010E94536F0E9493 +:106610009B70E1E0F0E0EC0FFD1FE00FF11D2EE2BA +:10662000208310E03AE0832E912CA12CB12C61152F +:10663000710581059105A9F0101301C01F5FEE24BB +:10664000E394F12CEC0EFD1EE10EF11CA50194016A +:106650000E947673605DF7016083B901CA011F5F14 +:10666000E6CF80E3101748F4E1E0F0E0EC0FFD1F07 +:10667000E10FF11D80831F5FF5CF10130BC081E088 +:10668000810FE1E0F0E0EC0FFD1FE80FF11D1E5F50 +:1066900080E38083112339F0FE01E10FF11D808139 +:1066A00072DE1150F7CF2A960FB6F894DEBF0FBEF8 +:1066B000CDBFDF91CF911F910F91FF90EF90DF90B1 +:1066C000CF90BF90AF909F908F900895CF92DF9220 +:1066D000EF92FF921F93CF93DF93CDB7DEB7362FA4 +:1066E000142FCDB6DEB64DB75EB7411B51090FB6BC +:1066F000F8945EBF0FBE4DBF4F5F5F4F7A01242FEE +:10670000FA019E2F921B911728F4632F0E94567353 +:106710009193F7CF112349F0F701E10FF11D319764 +:106720008081805D30DE1150F5CF0FB6F894DEBE6B +:106730000FBECDBEDF91CF911F91FF90EF90DF9004 +:10674000CF90089580910815811108C09FB7F894E3 +:106750008091B51482608093B5149FBF08951F93F4 +:10676000CF93DF93CDB7DEB7C058D1090FB6F894F9 +:10677000DEBF0FBECDBFAE0149575F4FFA01619139 +:106780007191AF01CE0101960E941A7410E0E1E010 +:10679000F0E0EC0FFD1FE10FF11D8081882319F05F +:1067A000F2DD1F5FF4CFC058DF4F0FB6F894DEBFA5 +:1067B0000FBECDBFDF91CF911F91089543E0E0CE92 +:1067C0002091F41420FF08C02BE832E441E25DE39D +:1067D0000E94857241E001C040E0D2CE2091F414C5 +:1067E00020FF08C02BE832E441E25DE30E9485729D +:1067F00044E001C043E0C4CE8A3020F0843620F06B +:1068000043E003C041E001C042E06AE05FCF48E0FE +:1068100062E05CCFCF93DF93FC018491EF0121967E +:10682000882319F0B0DDFE01F8CFDF91CF910895F4 +:106830008F929F92AF92BF92EF92FF920F931F930E +:10684000CF938AED99E0E6DF86E1E82E85E1F82E28 +:1068500007EB14E1C0E0F701619171918191919191 +:106860007F01F80181909190A190B1908F010E94D9 +:10687000CE70A50194010E943370B0DFC23019F0D0 +:1068800088ED99E0C7DFCF5FC33029F786ED99E047 +:10689000C1DF80912215B0DF82ED99E0CF911F9189 +:1068A0000F91FF90EF90BF90AF909F908F90B2CFDD +:1068B000CF93DF93EC018991882311F064DDFBCF46 +:1068C000DF91CF910895AAE0B5E1E6E6F0E14D91C0 +:1068D0005D916D917D91419351936193719380E1AD +:1068E000E237F807A1F708958CE1E6E6F0E1DF0171 +:1068F0001D928A95E9F71092A5131092A61381E0D4 +:10690000809365101092C21008952F923F924F927B +:106910005F926F927F928F929F92AF92BF92CF922F +:10692000DF92EF92FF920F931F93CF93DF93C0916B +:10693000A613C11101C0C2E1C150D091C210DC1731 +:1069400009F41DC1EC2EF12C29E2C29F8001112413 +:106950000D531F4EF801A588B688C788D08C61A159 +:1069600072A183A194A19B01AC010E94536FF80115 +:1069700025A136A147A150A50E9485724B018C012B +:106980009B01AC01B501C6010E942C7087FD02C0BD +:106990005401680189E28E9DF0018F9DF00D112454 +:1069A000ED53FF4EC501D601818B928BA38BB48B27 +:1069B000C11101C0C2E1C150DC1761F029E22E9D76 +:1069C000C0012F9D900D11249C012D533F4E790144 +:1069D000D9E233C08091A513D81360C00E943F490B +:1069E0005DC0AC2EB12CDA9DC001DB9D900D112451 +:1069F000FC01ED53FF4E6F01C11101C0C2E1C15056 +:106A00008091A5138C1302C00E943F49DA9D80013A +:106A1000DB9D100D11240D531F4EF80185889688BB +:106A2000A788B08CA50194016189728983899489B2 +:106A30000E942C70811106C076018091C210C8138B +:106A4000D0CF2CC0F80161A172A183A194A19B01B8 +:106A5000AC010E94536FF80125A136A147A150A5B2 +:106A60000E948572F70121893289438954890E94E5 +:106A7000536F2B013C019B01AC01C501B4010E9485 +:106A80004A72F80118162CF4418A528A638A748A71 +:106A9000D3CF818A928AA38AB48ACECFD091C210F2 +:106AA000F9E2DF9F800111240D531F4EC1E0CD0F8D +:106AB000C23109F4C0E02090A61389E2382EC21535 +:106AC00009F45BC0CC2ED12C3C9CC0013D9C900DA8 +:106AD00011249C012D533F4E7901F80141885288C1 +:106AE00063887488F90181889288A388B488A50195 +:106AF0009401C301B2010E942C7087FF24C0F801E9 +:106B000061A172A183A194A19B01AC010E94536F6A +:106B1000F80125A136A147A150A50E948572A301C5 +:106B200092010E94536F2B013C019B01AC01C501F6 +:106B3000B4010E944A72181634F4F701418A528A4D +:106B4000638A748ADC2F3C9CF0013D9CF00D11247B +:106B5000ED53FF4E258936894789508D61897289A9 +:106B6000838994890E942C70811101C0DC2FCF5F32 +:106B7000C23109F4C0E08701A2CFD093C210DF91E7 +:106B8000CF911F910F91FF90EF90DF90CF90BF902A +:106B9000AF909F908F907F906F905F904F903F90BD +:106BA0002F9008952F923F924F925F926F927F9213 +:106BB0008F929F92AF92BF92CF92DF92EF92FF920D +:106BC0000F931F93CF93DF93CDB7DEB7E5970FB643 +:106BD000F894DEBF0FBECDBF4B8F5C8F6D8F072F3C +:106BE0002DAB2091A6132EA3422F50E05BA34AA306 +:106BF00039E2239FF0011124ED53FF4E15861686CE +:106C00001786108A15A216A217A210A6108249E9AB +:106C100056E766E97EE741A352A363A374A31C0170 +:106C200047EB54E158A74FA3CE0101969AAB89AB2D +:106C300026E630E13EA72DA74EA139E2439FC001D1 +:106C400011249C012C533F4E3AA729A7AE01435F64 +:106C50005F4F5DA34CA359A348A386E690E198AB90 +:106C60008FA727EB34E13F8F2E8F10E03F01AF015C +:106C7000435F5F4F5CAB4BAB2F0155E2450E511CA0 +:106C8000F10161917191819191911F01EE8DFF8DC3 +:106C900081909190A190B190FF8FEE8FA50194010A +:106CA0000E9485720E945572E9A9FAA961937193B5 +:106CB00081939193FAABE9ABEFA5F8A9C190D1907C +:106CC000E190F190F8ABEFA76C197D098E099F094F +:106CD0009B01AC0197FF07C022273327A901261B80 +:106CE000370B480B590BE9A5FAA521933193419332 +:106CF0005193FAA7E9A7EBA9FCA9C080D180E28053 +:106D0000F380C216D306E406F50610F469017A0191 +:106D1000EBA9FCA9C082D182E282F3820E94CE70EC +:106D2000A50194010E9433704B015C01E8A1F9A117 +:106D30006193719381939193F9A3E8A320E030E0EC +:106D4000A9010E942C7087FF0DC0112321F0113082 +:106D500021F084E003C081E001C082E0F301908172 +:106D6000892B8083A5019401C501B4010E9485721D +:106D7000F20120813181428153810E94536FF201DF +:106D800060837183828393831F5F133009F078CF10 +:106D90000E94F2724B015C01F20160837183828375 +:106DA0009383CD28CE28CF2809F422C220E030E0FA +:106DB000A9016B8D7C8D8D8D902F0E942C7087FD8D +:106DC00021C0FDA9FF2361F0A50194016B8D7C8D8D +:106DD0008D8D902F0E9485726B8F7C8F8D8F092FE8 +:106DE00020E030E040E85FE36B8D7C8D8D8D902F4F +:106DF0000E942C7087FF0DC01B8E1C8E20E82D8FEB +:106E00000FE307C039E93B8F46E74C8F56E95D8FAA +:106E10000EE7A501940160E070E080E89FE30E9426 +:106E2000337069A77AA78BA79CA7CE0149969A8F42 +:106E3000898FC12CD12C760129E2EAA1FBA12E9FDA +:106E4000C0012F9F900D11249C012C513F4E39A35E +:106E500028A3ECA1FDA180809180A280B38020E0D6 +:106E600030E0A901C501B4010E942C70882309F407 +:106E700072C0A501940169A57AA58BA59CA50E9465 +:106E800085722B013C01ECA1FDA16083718382839B +:106E900093839B01AC0160E070E080E89FE30E9477 +:106EA00033704B015C01E894B7F8EFA1F8A5248595 +:106EB000358546855785C501B4010E9485721B0141 +:106EC0008E8F192F2B8D3C8D4D8D502F0E944A7225 +:106ED00018162CF02B8E3C8EFE8DFD8F012FE8A115 +:106EE000F9A1F081FE8FE8A1F9A111812280338000 +:106EF000EFA1F8A5208D318D428D538DC501B401D0 +:106F00000E9485725B014C019B01AC016E8D712F5B +:106F1000C1010E942C7087FD03C0AE8E1B2D140191 +:106F20008E8D912FD101E8A1F9A180839183A28355 +:106F3000B383EDA5FEA52485358546855785C30118 +:106F4000B2010E9485729B01AC01C701B6010E948B +:106F5000526F6B017C012CA13DA12C5F3F4F3DA3E3 +:106F60002CA34DA55EA54C5F5F4F5EA74DA78FA1DB +:106F700098A5049698A78FA3E98DFA8DE217F307D9 +:106F800009F067CF8091A513FEA1F8130FC089E225 +:106F90002AA13BA1829FF001839FF00D1124ED53A4 +:106FA000FF4E118A128A138A148A14C02FEE3FEF03 +:106FB0004FE75FE3C701B6010E944A7218167CF4DE +:106FC00089E24AA15BA1849FF001859FF00D112405 +:106FD000ED53FF4E118E128E138E148E6AC02FEE5B +:106FE0003FEF4FE75FEBC701B6010E944A721816E8 +:106FF00044F08FEEC82EDD24DA948FE7E82E8FEB75 +:10700000F82EA701960160E070E080E89FE30E94FF +:10701000526F20E030E040E05FE30E9485720E9402 +:10702000F2726B017C0189E22AA13BA1829FF001EF +:10703000839FF00D1124ED53FF4E2091EC143091FD +:10704000ED144091EE145091EF1461A172A183A14F +:1070500094A10E948572A70196010E9485724B013E +:107060005C01A701960160E070E080E89FE30E9468 +:10707000526F9B01AC01C501B4010E9433706B01DA +:107080007C0120E030E0A9010E942C7087FF03C042 +:10709000C12CD12C760189E24AA15BA1849FF00129 +:1070A000859FF00D1124ED53FF4EC18ED28EE38EDD +:1070B000F48E2B8D3C8D4D8D502F6B8D7C8D8D8D59 +:1070C000902F0E9485727B018C0189E22AA13BA14D +:1070D000829FF001839FF00D1124ED53FF4EC701F5 +:1070E000D801858F968FA78FB0A3A18CB28CC38C4B +:1070F000D48C60907E1070907F1080908010909063 +:1071000081109301A401B701C8010E942C7087FD72 +:1071100005C0B62DA72DF82DE92D04C0BE2DAF2D2D +:10712000F02FE12F9501A6016B2F7A2F8F2F9E2F25 +:107130000E944A7218166CF09301A401B701C801AD +:107140000E942C7087FD03C05301640102C05701E7 +:10715000680189E24AA15BA1849FF001859FF00D3F +:107160001124ED53FF4EC501D601858B968BA78B5D +:10717000B08F8CE0FE013D96A2E7B0E101900D9248 +:107180008A95E1F7C701D80180937E1090937F1014 +:10719000A0938010B09381108CE0FE013196A6E69A +:1071A000B0E101900D928A95E1F78091651080938E +:1071B000A6138F5F823109F480E080936510E59615 +:1071C0000FB6F894DEBF0FBECDBFDF91CF911F91F8 +:1071D0000F91FF90EF90DF90CF90BF90AF909F9076 +:1071E0008F907F906F905F904F903F902F908DCBBE +:1071F000E5960FB6F894DEBF0FBECDBFDF91CF91FD +:107200001F910F91FF90EF90DF90CF90BF90AF90C4 +:107210009F908F907F906F905F904F903F902F90B6 +:1072200008956115710581059105C1F16A307105F7 +:107230008105910548F425E02A95F1F70000615099 +:10724000710981099109EDCF6436710581059105B8 +:1072500048F4E5E3EA95F1F700006A507109810905 +:107260009109DFCF683EF3E07F078105910558F46F +:10727000EFE8F1E03197F1F700C0000064567109C2 +:1072800081099109CECFEFE9FFE03197F1F700C016 +:107290000000685E734081099109C3CF089500978B +:1072A00041F0EFE9FFE03197F1F700C000000197EE +:1072B000F6CF0895AF92BF92CF92DF92EF92FF92F6 +:1072C0000F931F93CF93DF93CDB7DEB768970FB6B9 +:1072D000F894DEBF0FBECDBF10910515112309F440 +:1072E00051C081E08093071511FF06C083E099E04B +:1072F00091DA88EF98E01FC012FF06C083E099E0A2 +:1073000089DA8DEE98E017C013FF06C083E099E09C +:1073100081DA8AED98E00FC014FF06C083E099E09F +:1073200079DA8FEC98E007C015FF0CC083E099E094 +:1073300071DA83EC98E06EDA80EC98E06BDA84EF37 +:1073400091E0ADDF10FD08C08FB7F894909105155E +:10735000109205158FBF16C080ED99E05BDA8EEBB9 +:1073600099E058DA8DE599E055DA9FB7F894809165 +:10737000B5148F7E8093B5149FBF8091B51484FFA0 +:10738000FCCFE2CF1091B514112309F4ADC114FF65 +:1073900004C081E080930615B8C110FFDDC08CE009 +:1073A000EAE0F5E1DE011D9601900D928A95E1F784 +:1073B000809107158430E9F040F48130E9F080F0E5 +:1073C000823001F588E399E01CC0803179F018F42F +:1073D000883049F017C0803291F0803421F012C01B +:1073E00087E599E00EC082E599E00BC08CE499E056 +:1073F00008C086E499E005C08FE399E002C082E30B +:1074000099E008DA8091EB14837039F0BE01635F74 +:107410007F4FCE0101960E94D4488091EB1480FDED +:1074200005C08091EB1481FF60C017C08BE299E02A +:10743000F1D9CE0101967C0100E0F70161917191D3 +:10744000819191917F01CAD9023019F089E299E0C6 +:10745000E1D90F5F033089F7E4CF82E299E0DAD90E +:1074600080E8C82E85E1D82ECE0101967C0100E08F +:107470005701F60161917191819191916F01208580 +:107480003185428553850E94536F9B01AC01F70102 +:1074900060817181828193810E94526FF7016083C4 +:1074A000718382839383023079F42091981530910F +:1074B000991540919A1550919B150E94526FF701B2 +:1074C0006083718382839383F4E0EF0EF11CF501F6 +:1074D000608171818281938181D9023019F080E2CB +:1074E00099E098D90F5F033019F68091EB1482FF71 +:1074F0000CC08AE199E08ED98091A6139091A513D2 +:10750000891708F48E5E891B77D98091EB1483FF6D +:107510000CC085E199E07ED99091DF0F8091E00F5A +:10752000891708F48058891B67D98091EB1484FF70 +:1075300008C08FE099E06ED90E94095B43E062E0E9 +:10754000C5D88BE099E066D99FB7F8948091B514BF +:107550008E7F8093B5149FBF812F887609F447C032 +:1075600080910715882351F0982F9C77C1F18830BE +:1075700029F40E943F4981E0809308158091071506 +:10758000811103C092E09093081516FF0AC088305D +:1075900019F480E480930715809108158860809322 +:1075A000081513FF07C08091071585FD03C080E112 +:1075B0008093071515FF13C080ED99E02BD98CE758 +:1075C00099E028D98DE599E025D98091081581FDAC +:1075D000146084608093081580E2809307159FB73C +:1075E000F8948091B51487798093B5149FBF11FFEB +:1075F00057C0812F887609F04BC0809107158823EA +:1076000039F0807509F444C08091081581FF40C0AD +:107610008091081582FF1EC080916615882369F04D +:1076200040916715509168156091691570916A15C0 +:107630000E94D72C80EA9FE032DE80916515882376 +:1076400049F0823011F45C9A02C00E94BF5D88EE5E +:1076500093E025DE8091A5139091A6139817A1F0D1 +:10766000F9E28F9FC00111248D539F4E892B61F049 +:107670008091081583FD08C088E0809307150E945B +:1076800061490E94A42C02C010920715109208159F +:107690009FB7F8948091B5148D7F8093B5149FBFE8 +:1076A00012FF22C080910715807391F08091091517 +:1076B00081110EC08091081582FF04C00E94D02C59 +:1076C0000E94BF5D8091081582608093081504C0F8 +:1076D00010920815109207159FB7F8948091B51471 +:1076E0008B7F8093B5149FBF809107158C7711F025 +:1076F0000E94614980910715803239F48091081504 +:1077000081FF03C080E18093071568960FB6F89457 +:10771000DEBF0FBECDBFDF91CF911F910F91FF90C4 +:10772000EF90DF90CF90BF90AF90089520918A1096 +:1077300030918B1021153105B9F080919A109091FC +:107740009B108217930734F4019690939B108093BB +:107750009A100AC010929B1010929A1010928B10DF +:1077600010928A101092920D2091170D3091180DE1 +:1077700021153105A1F080919810909199108217F0 +:10778000930734F40196909399108093981007C052 +:10779000109299101092981081E08093930D80912F +:1077A000920D81111BC08091190D811117C080911C +:1077B00073008E7F809373001092160D10928B10C1 +:1077C00010928A101092180D1092170D10929B10A3 +:1077D00010929A101092991010929810089580911A +:1077E0009710811107C081E08093971080910B0161 +:1077F000806205C01092971080910B018F7D80935D +:107800000B0180919510909196109C012F5F3F4F36 +:107810003093961020939510209104023091050228 +:107820002817390760F410929610109295108091E5 +:1078300070008E7F8093700081E08093980D089592 +:1078400020915F0D3091600D2430310559F426E60A +:1078500036E646E65FE30E94337020E030E040E821 +:1078600052E40DC02530310539F52CEE31E548E301 +:107870005EE30E94337020E030E040E851E40E9473 +:1078800085720E949B706093821070938310809326 +:107890008410909385108AE69CE39093AF148093B4 +:1078A000AE141092A00085E08093A1008DEF9FEFB1 +:1078B0009093B1148093B0148091B0149091B1144E +:1078C0009093A5008093A4008091720081608093C2 +:1078D000720008958091821090918310A09184107D +:1078E000B0918510181619061A061B06F4F420919B +:1078F0009410222389F0109294100197A109B109E4 +:107900008093821090938310A0938410B09385107D +:1079100080910201806406C081E080939410809180 +:1079200002018F7B8093020108950E94815510927D +:10793000821010928310109284101092851081E0B2 +:107940008093970D0895CF93DF93EB018431D1F0AD +:1079500028F4882361F08C30A8F437C08233E9F032 +:1079600018F4873190F10EC0833311F10BC0888178 +:10797000882329F06FE774E0CE010E94B97361E8B3 +:1079800074E020C08881882329F06FE774E0CE017D +:107990000E94B97364E874E015C08881882329F0D7 +:1079A0006FE774E0CE010E94B97368E874E00AC022 +:1079B0008881882329F06FE774E0CE010E94B973B3 +:1079C0006CE874E0CE010E94B9738091270D882382 +:1079D00079F067E27DE0CE010E94B97382E3E7E2CD +:1079E000FDE0DF011D928A95E9F7DF91CF910895BF +:1079F0006AE773E0CE01DF91CF910C94B9738F9257 +:107A00009F92AF92BF92CF92DF92EF92FF920F932D +:107A10001F93CF93DF9306E015E18EE1F8011192F9 +:107A20008A95E9F70E9463340E94125D80E090E03D +:107A30000E940147CFE5DDE06E877F87888B998BB9 +:107A400081E090E00E9401476A8B7B8B8C8B9D8B41 +:107A500082E090E00E9401476E8B7F8B888F998F28 +:107A6000F801C480D580E680F780CA8EDB8EEC8E6C +:107A7000FD8EC084D184E284F384CE8EDF8EE8A2B2 +:107A8000F9A204851585268537850AA31BA32CA397 +:107A90003DA320E030E044EB52E40E94526F7B01B2 +:107AA0008C012A893B894C895D896E857F8588890F +:107AB0009989EDE88E2EEDE09E2EF9E8AF2EFDE0DF +:107AC000BF2EA5E8CA2EADE0DA2E10D7DF91CF91F8 +:107AD0001F910F91FF90EF90DF90CF90BF90AF90EC +:107AE0009F908F900895E1E0F1E080818062808333 +:107AF000808180648083E2E0F1E080818F7D8083FB +:107B000080818F7B808308953F9A479A08959C9A3D +:107B10009D9AA498A59A08958091040187788093EE +:107B20000401809103018877803451F440E050E0F3 +:107B300060E87FE384E00E943A2D60E974E02AC0A7 +:107B400080910301887791F440E050E060E87FE3A2 +:107B500084E00E943A2D67E974E08CE890E10E948D +:107B6000C47340E050E060EE70E41BC080910301FC +:107B7000887740E050E060E87FE3803231F484E0D1 +:107B80000E943A2D6EE974E005C084E00E943A2D0F +:107B900065EA74E08CE890E10E94C47340E050E034 +:107BA000BA0183E00E943A2D0C9459320F931F932F +:107BB000CF93DF9360915F0D84E893E00E94185D9E +:107BC0006091600D85E893E00E94185DC1E6DDE0FC +:107BD00088E993E069918C010F5F1F4F0E94185D47 +:107BE000C8010C391340B1F7C5E6DDE08EE893E03B +:107BF00069918C010F5F1F4F0E94185DC801023907 +:107C00001340B1F7C9E6DDE082E89CE069918C01A0 +:107C10000F5F1F4F0E94185DC80106381C40B1F766 +:107C2000DF91CF911F910F910895E7E5F4E186E987 +:107C30009BE3918380831092200185E08093210152 +:107C400081EF9FEF938382838281938190932501BB +:107C500080932401E3E7F0E08081816080830895D0 +:107C6000CF92DF92EF92FF920F931F93CF93DF9308 +:107C700069017A011092980DEAE0F1E0208120621A +:107C80002083EBE0F1E020812F7D2083660F771FBA +:107C9000709305026093040200E514E18FEE9BE30C +:107CA000F80191838083C0E7D0E088818E7F88834C +:107CB000E0EBF0E080818C7F8083E1EBF0E080817D +:107CC000877F8083A6EBB0E08C918F7D8C93888139 +:107CD0008D7F888380818460808380818C7F808396 +:107CE00020E034E244EF59E4C701B6010E9433704A +:107CF00020E034E244E75BE40E94857220E030E05B +:107D000040E85CE30E9485720E949B7020E031E0B5 +:107D1000C901861B970BF80193838283828193812B +:107D20008093B200888181608883DF91CF911F9119 +:107D30000F91FF90EF90DF90CF900895CF93C1E027 +:107D4000C093970D80915F0D9091600D04970297FD +:107D500000F51092970D10928610109287101092D5 +:107D6000881010928910809107018F7D8093070100 +:107D700080910801806280930801809102018062F5 +:107D80008093020160E070E084EB93E459DDC093DE +:107D9000960DCF9108951092821010928310109238 +:107DA0008410109285100E9481551092960D0C94AB +:107DB00081558091F41482FF08C08A98809108014F +:107DC0008E7F809308015F9807C08A9A809108018E +:107DD0008160809308015F9ADEDF1092910D089513 +:107DE0008F929F92AF92BF92CF92DF92EF92FF92CB +:107DF0006B017C0120E030E044EB53E40E944A72C6 +:107E000018160CF488C020E030E0A901C701B601C3 +:107E10000E942C7087FD7FC080915F0D9091600D56 +:107E200004970297B8F52091861030918710409101 +:107E3000881050918910C701B6010E94526F4B0102 +:107E40005C0120E030E0A9010E942C70882309F435 +:107E500062C0C0928610D0928710E0928810F09293 +:107E6000891020E030E0A901C501B4010E944A72E6 +:107E7000181624F4809102018F7D03C080910201C5 +:107E8000806280930201C501B4019F77D9DC109212 +:107E9000970D41C020E030E044E353E4C701B60150 +:107EA0000E944A7218161CF4C12CD12C7601A7012D +:107EB000960160E070E084E393E40E94526F20E05A +:107EC00030E044E353E40E9433709B01AC010E9414 +:107ED000536F20E030E040E05FE30E94536F609317 +:107EE000000270930102809302029093030220E04B +:107EF00030E040EA51E40E94337020E030EC4FE77C +:107F000054E40E9485720E94A070CB010E943154FB +:107F100081E08093970DFF90EF90DF90CF90BF901E +:107F2000AF909F908F90089580915F0D9091600D1C +:107F30000497029780F4809101018062809301018F +:107F4000809101018064809301018091020180622F +:107F500080930201089580E18093A1001092A00017 +:107F600082E08093B41480E29EE49093B3148093F3 +:107F7000B2149093A7008093A60082E18093A100A1 +:107F800020E030E040EA51E460910002709101028B +:107F900080910202909103020E94337020E030EC45 +:107FA0004FE754E40E9485720E94A070CB010C94AC +:107FB0003154CF93DF93D82FC8E05E98559AD7FFFE +:107FC00002C05D9A01C05D9865E070E080E090E0DD +:107FD00028D95E9A65E070E080E090E022D95E9852 +:107FE000DD0F65E070E080E090E01BD9C15029F71B +:107FF00062E070E080E090E014D9559A5D9A62E00A +:1080000070E080E090E0DF91CF910BC95E98559AC7 +:108010005D9865E070E080E090E003D95E9A65E0ED +:1080200070E080E090E0FDD8559A5D9A65E070E0E0 +:1080300080E090E0F6C8CF93559A5D9A62E070E0D8 +:1080400080E090E0EED85E9A62E070E080E090E040 +:10805000E8D855988BEF99B1C92FC07295FF05C02C +:108060008150C9F7D3DFC1E006C05E9862E070E0DE +:1080700080E090E0D6D88C2FCF910895559A5D9AE4 +:108080005E9A65E070E080E090E0CBD8559A5D980C +:1080900065E070E080E090E0C4D85E9862E070E057 +:1080A00080E090E0BEC8CF93DF93D82FC8E08091E6 +:1080B00002018F7780930201809101018460809397 +:1080C000010180910201D7FF02C0846001C08B7F53 +:1080D0008093020165E070E080E090E0A2D880919A +:1080E000020180688093020165E070E080E090E02A +:1080F00098D8809102018F7780930201DD0F65E0AF +:1081000070E080E090E08DD8C15089F662E070E0C8 +:1081100080E090E086D88091010184608093010125 +:108120008091020184608093020162E070E080E04F +:1081300090E0DF91CF9175C80F931F93CF93DF939A +:10814000C2E0D1E088818F77888301E011E0F801F7 +:1081500080818460808388818B7F888365E070E084 +:1081600080E090E05ED888818068888365E070E078 +:1081700080E090E056D8F801808184608083888117 +:108180008460888365E070E080E090E0DF91CF91CB +:108190001F910F9146C8CF93809101018460809315 +:1081A00001018091020184608093020162E070E02D +:1081B00080E090E036D880910201806880930201CF +:1081C00062E070E080E090E02CD8809101018B7F2C +:1081D000809301018BEF90910001C92FC47092FF31 +:1081E00005C08150C1F7A8DFC1E00AC0809102013B +:1081F0008F778093020162E070E080E090E011D818 +:108200008C2FCF9108950F931F93CF93DF9301E0AD +:1082100011E0F801808184608083C2E0D1E0888130 +:108220008460888388818068888365E070E080E06E +:1082300090E00E941139F8018081846080838881F8 +:108240008B7F888365E070E080E090E00E941139C8 +:1082500088818F77888362E070E080E090E0DF9132 +:10826000CF911F910F910C941139CF93DF93D82F99 +:10827000C8E04398399AD7FF02C0419A01C041989B +:1082800065E070E080E090E00E941139439A65E07B +:1082900070E080E090E00E9411394398DD0F65E0C6 +:1082A00070E080E090E00E941139C15011F762E067 +:1082B00070E080E090E00E941139399A419A62E0C2 +:1082C00070E080E090E0DF91CF910C9411394398F9 +:1082D000399A419865E070E080E090E00E941139A1 +:1082E000439A65E070E080E090E00E941139399A8D +:1082F000419A65E070E080E090E00C941139CF93F2 +:10830000399A419A62E070E080E090E00E94113971 +:10831000439A62E070E080E090E00E941139399861 +:108320008BEF96B1C92FC27091FF05C08150C9F77C +:10833000CEDFC1E007C0439862E070E080E090E0EB +:108340000E9411398C2FCF910895399A419A439AFE +:1083500065E070E080E090E00E941139399A419820 +:1083600065E070E080E090E00E941139439862E09F +:1083700070E080E090E00C9411394F925F926F9220 +:108380007F92AF92BF92CF92DF92EF92FF920F93C4 +:108390001F93CF93DF935C01EB018A01FC014080C6 +:1083A00051806280738020E030E0A901C301B201F6 +:1083B0000E942C7020E030E0A901811111C0688179 +:1083C00079818A819B810E944A721816E4F02AED15 +:1083D000C22E2FE0D22E29ECE22E2FEBF22E22C05D +:1083E000C301B2010E942C7087FD16C0A301920147 +:1083F000688179818A819B810E9433700E94F16F2C +:108400006B017C010FC09AEDC92E9FE0D92E99EC2B +:10841000E92E9FE3F92E06C0C12CD12C80ECE82E6A +:108420008FE7F82EC701B6010E9430702091610DD0 +:108430003091620D4091630D5091640D0E948572E0 +:108440009B01AC01C301B2010E94526FF501608330 +:10845000718382839383C701B6010E94E8722091E1 +:10846000610D3091620D4091630D5091640D0E9439 +:1084700085729B01AC01688179818A819B810E9410 +:10848000526F688379838A839B832091650D309135 +:10849000660D4091670D5091680DF8016081718102 +:1084A000828193810E94536FF8016083718382837C +:1084B0009383DF91CF911F910F91FF90EF90DF9009 +:1084C000CF90BF90AF907F906F905F904F90089546 +:1084D0004F925F926F927F92AF92BF92CF92DF9254 +:1084E000EF92FF920F931F93CF93DF935C01EB0109 +:1084F0008A01FC01408051806280738020E030E07E +:10850000A901C301B2010E942C7020E030E0A90152 +:10851000811111C0688179818A819B810E944A7290 +:108520001816E4F02AEDC22E2FE0D22E29ECE22E0E +:108530002FEBF22E22C0C301B2010E942C7087FDE6 +:1085400016C0A3019201688179818A819B810E9472 +:1085500033700E94F16F6B017C010FC09AEDC92E40 +:108560009FE0D92E99ECE92E9FE3F92E06C0C12C8D +:10857000D12C80ECE82E8FE7F82EC701B6010E94BF +:1085800030702091610D3091620D4091630D5091DA +:10859000640D0E948572A30192010E94536FF50140 +:1085A0006083718382839383C701B6010E94E8725E +:1085B0002091610D3091620D4091630D5091640DD9 +:1085C0000E9485729B01AC01688179818A819B81BF +:1085D0000E94536F688379838A839B832091650D02 +:1085E0003091660D4091670D5091680DF8016081E2 +:1085F0007181828193810E94526FF801608371833F +:1086000082839383DF91CF911F910F91FF90EF9021 +:10861000DF90CF90BF90AF907F906F905F904F9022 +:1086200008952F923F924F925F926F927F928F9216 +:108630009F92AF92BF92CF92DF92EF92FF920F93F1 +:108640001F93CF93DF93CDB7DEB762970FB6F89441 +:10865000DEBF0FBECDBF6D837E838F839887298752 +:108660003A874B875C87E982FA820B831C83160169 +:10867000BE86AD8684019B01AC010E9485726B01B0 +:108680007C0129853A854B855C85CA01B9010E9428 +:1086900085729B01AC01C701B6010E94536F0E9415 +:1086A000F2722B013C0120E030E04DE353E469819C +:1086B0007A818B819C810E94526F69837A838B833C +:1086C0009C83A3019201C301B2010E9485726B01D8 +:1086D0007C0129813A814B815C81CA01B9010E94E8 +:1086E00085729B01AC01C701B6010E94536F6B01FB +:1086F0007C0120E030E0A9010E94536F4B015C0136 +:108700009B01AC01C301B2010E9485722B013C01A7 +:1087100020E034E244E758E4C701B6010E948572C4 +:108720006F87788B898B9A8BA5019401C501B40161 +:108730000E9485729B01AC016F85788989899A892D +:108740000E94526F0E94F2729B01AC0169817A8192 +:108750008B819C810E9485724B015C01A70196016F +:10876000C701B6010E94536F20E030E04AE753E4AE +:108770000E9485726B017C01A5019401C301B201C5 +:108780000E94526FA70196010E9433700E94446FAD +:1087900021EE3EE245E652E40E948572F1016083DB +:1087A000718382839383A5019401C301B2010E9466 +:1087B000536FA70196010E9433700E94446F21EE0F +:1087C0003EE245E652E40E9485726B017C01ED8534 +:1087D000FE85608371838283938321EE3EE245E6CA +:1087E00052E4F10160817181828193810E94337032 +:1087F0000E94E87220E030E04AE753E40E9485726C +:108800009B01AC0169817A818B819C810E944A72B3 +:10881000181654F4F7FAF094F7F8F094ED85FE8505 +:10882000C082D182E282F38220E030E0A9016D8132 +:108830007E818F8198850E942C7020E030E0A90114 +:10884000811112C069857A858B859C850E944A7248 +:1088500018162CF480E090E0A4EBB2E411C080E0A4 +:1088600090E0A4EBB2EC0CC06D817E818F81988585 +:108870000E942C7087FF0AC080E090E0A0ECBFE768 +:10888000F80180839183A283B38317C02D813E8139 +:108890004F81588569857A858B859C850E943370C8 +:1088A0000E94F16F21EE3EE245E652E40E9485729D +:1088B000F801608371838283938362960FB6F89484 +:1088C000DEBF0FBECDBFDF91CF911F910F91FF9003 +:1088D000EF90DF90CF90BF90AF909F908F907F9060 +:1088E0006F905F904F903F902F9008952F923F92FE +:1088F0004F925F926F927F928F929F92AF92BF92B0 +:10890000CF92DF92EF92FF920F931F93CF93DF935B +:10891000CDB7DEB72E970FB6F894DEBF0FBECDBF32 +:1089200029833A834B835C83ED82FE820F83188711 +:10893000860115019E868D8621EE3EE245E652E4D3 +:108940000E9433702B013C0121EE3EE245E652E4E9 +:1089500069817A818B819C810E9433704B015C011B +:1089600021EE3EE245E652E46D817E818F8198855D +:108970000E9433706B017C01C301B2010E94307010 +:1089800069837A838B839C83C501B4010E94307014 +:108990006D837E838F839887C301B2010E94E87242 +:1089A0002B013C01C501B4010E94E87269877A87F6 +:1089B0008B879C8720E030E04AE753E469817A8125 +:1089C0008B819C810E9485724B015C0120E030E02C +:1089D0004AE753E46D817E818F8198850E9485727C +:1089E0009B01AC01C501B4010E94536F20E030E04F +:1089F000A9010E94536F4B015C01C701B6010E949F +:108A000030709B01AC01C501B4010E948572F80170 +:108A10006083718382839383C701B6010E94E872E9 +:108A20009B01AC01C501B4010E948572F101608314 +:108A300071838283938320E030E04AE753E4C301EB +:108A4000B2010E9485726B017C0120E030E04AE7B0 +:108A500053E469857A858B859C850E9485729B018C +:108A6000AC01C701B6010E94526F20E030E04DE337 +:108A700053E40E94536FED85FE856083718382838A +:108A800093832E960FB6F894DEBF0FBECDBFDF9155 +:108A9000CF911F910F91FF90EF90DF90CF90BF90FB +:108AA000AF909F908F907F906F905F904F903F908E +:108AB0002F9008952F923F924F925F926F927F92E4 +:108AC0008F929F92AF92BF92CF92DF92EF92FF92DE +:108AD0000F931F93CF93DF93CDB7DEB728970FB6D1 +:108AE000F894DEBF0FBECDBF2B013C0129833A8332 +:108AF0004B835C83ED82FE820F83188786018FE5AE +:108B0000282E8DE0382E20E030E044EB52E4F101D5 +:108B100066897789808D918D0E94526F6B017C01EF +:108B200024EE38E34EE553E46D817E818F81988594 +:108B30000E9433709B01AC01C701B6010E94536FC4 +:108B40006D837E838F83988724EE38E34EE553E46C +:108B500069817A818B819C810E943370F101228925 +:108B60003389448955890E94536F69837A838B8343 +:108B70009C8324EE38E34EE553E4C301B2010E9426 +:108B80003370F10126853785408951890E94536FE2 +:108B90006801ED80FE800F81188529813A814B8123 +:108BA0005C81A4DE28960FB6F894DEBF0FBECDBF61 +:108BB000DF91CF911F910F91FF90EF90DF90CF90B9 +:108BC000BF90AF909F908F907F906F905F904F90ED +:108BD0003F902F9008954F925F926F927F928F9265 +:108BE0009F92AF92BF92CF92DF92EF92FF920F933C +:108BF0001F932B013C0149015A01670178019B0138 +:108C0000AC010E943A73811170C0A5019401C501A5 +:108C1000B4010E943A73811168C0A7019601C7018F +:108C2000B6010E943A73811160C02AE939E947E030 +:108C300053E4C301B2010E944A7218160CF455C0E5 +:108C400020E030E0A901C301B2010E942C7087FD31 +:108C50004CC02DEC3CEC4FEE52E4C501B4010E9437 +:108C60004A7218160CF441C020E030E0A901C50199 +:108C7000B4010E942C7087FD38C0A301920160E00E +:108C800070E084E393E40E94526FA50194010E9476 +:108C9000526F4B015C0120E030E047E153E40E9459 +:108CA0004A72181614F120E030E040E251E4C501A8 +:108CB000B4010E942C7087FD18C020E030E040EB2A +:108CC00052E4C701B6010E944A72181674F020E0FF +:108CD00030E040EB52ECC701B6010E942C70881FB7 +:108CE0008827881F91E0892701C080E01F910F919C +:108CF000FF90EF90DF90CF90BF90AF909F908F90BC +:108D00007F906F905F904F900895EF92FF920F9336 +:108D10001F93CF93DF9382E393E00E94755D8B3BBB +:108D200019F080E293E002C084E393E02FE5E22EA5 +:108D30002DE0F22EC9E5DDE08C0109551D40C8018A +:108D40008C0F9D1F0E94755D8993EC16FD06B9F787 +:108D5000DF91CF911F910F91FF90EF900895AF9207 +:108D6000BF92CF92DF92EF92FF920F931F93CF9318 +:108D7000DF93A82E6EE00E94B952C82F6FE08A2DB3 +:108D80000E94B952D0E0DC2FCC27C82B7E016E01A7 +:108D900004E010E06EE08A2D0E94B952B82E6FE018 +:108DA0008A2D0E94B9522B2D30E0322F2227A901A3 +:108DB000482BCA01C816D90608F46C018E159F0508 +:108DC00008F47C01C80FD91F0150110919F7CE0111 +:108DD0008C199D098E199F0963E070E00E946273EF +:108DE000613050E1750708F48B01C801DF91CF9124 +:108DF0001F910F91FF90EF90DF90CF90BF90AF90B9 +:108E000008954F925F926F927F928F929F92AF924E +:108E1000BF92CF92DF92EF92FF920F931F93CF9367 +:108E2000DF938C019CDFEC010130110551F070F0F3 +:108E30000230110509F086C1E5E9FEE080E090E02E +:108E40001BC1EBE9FDE080E090E08EC0E5E1FEE0D3 +:108E500080E090E0A190B1907C012FEFE21AF20A3D +:108E6000008111810A151B0510F40150104F0C17D9 +:108E70001D0718F0CA15DB0530F4C7012FE3E21611 +:108E8000F10441F701C07C01B7016F5F7F4F072EEE +:108E9000000C880B990B0E94CE7026E636E646EE53 +:108EA0005FE30E9485729B01AC0166E676E686EE82 +:108EB00092E40E94526F2B013C01B8016C1B7D0BA8 +:108EC00080E090E00E94CC7020E030E040E859E380 +:108ED0000E94857220E030E044EB53E40E948572EA +:108EE0009B01AC01C301B2010E94536F2B013C01F5 +:108EF000B701FF0C880B990B0E94CE7026E636E670 +:108F000046EE5FE30E9485729B01AC0166E676E661 +:108F100086EE92E40E94526F6B017C01CA19DB0954 +:108F2000BE0180E090E00E94CC7020E030E040E89C +:108F300059E30E94857220E030E044EB53E40E9444 +:108F400085729B01AC01C701B6010E94526F9B0163 +:108F5000AC01C301B2017DC00C171D0798F4C70115 +:108F60002CE3E216F10491F0019111917C012FEFB5 +:108F7000E21AF20AA080B1800A151B0568F70150B9 +:108F8000104FEACFCA15DB0550F37C01B7016F5FC4 +:108F90007F4F072E000C880B990B0E94CE7026E69F +:108FA00036E646EE5FE30E94857226E636E646EE3A +:108FB0005FE30E94526F2B013C01BE016A197B09DD +:108FC00080E090E00E94CC7020E030E040E859E37F +:108FD0000E94857220E030E044EB53E40E948572E9 +:108FE0009B01AC01C301B2010E94526F4B015C01B5 +:108FF000B8016C1B7D0B80E090E00E94CC7020E0FB +:1090000030E040E859E30E94857220E030E044EB14 +:1090100053E40E9485722B013C01B701FF0C880BC1 +:10902000990B0E94CE7026E636E646EE5FE30E947C +:1090300085729B01AC01C301B2010E94536F26E609 +:1090400036E646EE5FE30E94526F9B01AC01C5011C +:10905000B4010E94536F20E030E040E05FE30E94E3 +:1090600085724B015C018DC00C171D0798F4C70178 +:1090700024E6E216F10491F0019111917C012FEFA9 +:10908000E21AF20AA080B1800A151B0568F70150A8 +:10909000104FEACFAC16BD0650F77C01B7016F5FE9 +:1090A0007F4F072E000C880B990B0E94CE7026E68E +:1090B00036E646EE5FE30E9485722B013C01BE015D +:1090C0006A197B0980E090E00E94CC7020E030E0DB +:1090D00040E859E30E94857220E030E044EB53E41D +:1090E0000E9485729B01AC01C301B2010E94526FC4 +:1090F0004B015C01B8016C1B7D0B80E090E00E948D +:10910000CC7020E030E040E859E30E94857220E016 +:1091100030E044EB53E40E9485722B013C01B7011F +:10912000FF0C880B990B0E94CE7026E636E646EEC1 +:109130005FE30E9485729B01AC01C301B2010E94F2 +:10914000536F83CF0130110559F098F002301105AB +:10915000C1F4812C912C94EBA92E92E4B92E11C06C +:1091600029E0822E26EF922E21EBA22E22E4B22EAF +:1091700008C085E2882E89E0982E83E0A82E82E43C +:10918000B82EC501B401DF91CF911F910F91FF90CF +:10919000EF90DF90CF90BF90AF909F908F907F9097 +:1091A0006F905F904F9008958F929F92AF92BF9271 +:1091B000CF92DF92EF92FF920F931F93CF93DF93A3 +:1091C000EB0127EBE22E24E1F22E8C016B018CE007 +:1091D000C80ED11C6991799189919991F70181907B +:1091E0009190A190B1907F010E94CE70A501940151 +:1091F0000E943370F80161937193819391938F0171 +:10920000CC15DD0539F7DF91CF911F910F91FF90BC +:10921000EF90DF90CF90BF90AF909F908F90089588 +:109220001F920F920FB60F9211240BB60F922F932D +:109230003F934F935F936F937F938F939F93AF93DE +:10924000BF93EF93FF9389B18095982F907184FF1E +:1092500003C091110E949056FF91EF91BF91AF9181 +:109260009F918F917F916F915F914F913F912F913E +:109270000F900BBE0F900FBE0F901F901895CF93BD +:10928000DF93C0912314D09124142097B9F081E08A +:109290008093261460913C1470913D1480913E148B +:1092A00090913F149B01AC010E948572698B7A8B6F +:1092B0008B8B9C8B1092241410922314DF91CF91EE +:1092C00008952F923F924F925F926F927F928F926A +:1092D0009F92AF92BF92CF92DF92EF92FF920F9345 +:1092E0001F93CF93DF93CDB7DEB7CD54D1090FB61F +:1092F000F894DEBF0FBECDBF80910715807723960F +:109300008FAF2397882389F020E030E0A901609196 +:109310003C1470913D1480913E1490913F140E9432 +:109320002C70882311F40C943F5220913C142F8B05 +:1093300030913D14388F40913E14498F50913F1425 +:109340005A8F80914C148B8390914D149D83A091E2 +:109350004E14AE83B0914F14BC8300913814109119 +:109360003914E0913A14E987F0913B14FD8720917C +:109370002B1430912C1440912D1450912E142DA3A8 +:109380003EA34FA358A7309127143DAF4091281416 +:109390004EAF509129145FAF80912A1421968FAF60 +:1093A0002197209133143091341440913514509109 +:1093B00036142DAB3EAB4FAB58AF3091CC13229649 +:1093C0003FAF2297409122144BA75091A6132496A9 +:1093D0005FAF24978091A5138B8F9091C210259633 +:1093E0009FAF2597A0912314B0912414BA8BA98B19 +:1093F00020912F1430913014409131145091321437 +:1094000029AF3AAF4BAF5CAF309144143B8B4091E6 +:1094100045144C8B509146145D8B809147148E8B74 +:10942000909140149C8FA0914114AD8FB091421443 +:10943000BE8FE0914314EF8F309048142090491470 +:10944000F0914A14F98320914B142A838091A71339 +:109450005BA5851709F4F4C649895A89452B09F09B +:1094600033C224965FAD24978B8D581709F478C7C3 +:10947000A82EB12CA9E2AA9DC001AB9D900D11248C +:10948000FC01ED53FF4EFA8BE98B80912614882363 +:1094900019F010922614BCC0809125148F5F85307E +:1094A00019F08093251402C010922514E091251420 +:1094B00021E12E9FF0011124E353FC4E89E28A9DA5 +:1094C000A0018B9D500D11244D535F4E7A01DA019E +:1094D0008C91808311964D915D916D917C91149743 +:1094E000DB01CA0123E0880F991FAA1FBB1F2A9521 +:1094F000D1F781839283A383B483D70115964D91CD +:109500005D916D917C911897DB01CA0133E0880F62 +:10951000991FAA1FBB1F3A95D1F785839683A7830E +:10952000B087D70119964D915D916D917C911C97F3 +:10953000DB01CA0143E0880F991FAA1FBB1F4A9590 +:10954000D1F781879287A387B487D7011D966D9144 +:109550007D918D919C9150978B019C0153E0000F60 +:10956000111F221F331F5A95D1F7058716872787AA +:10957000308B0E94CC706DAF7EAF8FAF21969FAFC6 +:109580002197F70125A136A147A150A50E9433706C +:109590006DA37EA38FA398A79B01AC0160E070E050 +:1095A00080EA9FE30E94337069AF7AAF8BAF9CAFC4 +:1095B0002396FFAD2397FF23D1F02B893C894D895A +:1095C0005E896B897C898D899E890E948572D7010D +:1095D00051966D937D938D939C935497BB89BF8BCC +:1095E000EC89E88FFD89F98F2E892A8F0DC0D7016C +:1095F00051966D917D918D919C9154970E94F2723C +:109600006F8B788F898F9A8F1DAA1EAA1FAA18AEFA +:1096100029E22A9DF0012B9DF00D1124ED53FF4E00 +:10962000FE87ED87C1A0D2A0E3A0F4A0A701960118 +:1096300060E070E080E09FE30E94337069877A8782 +:109640008B879C8723963FAD23973323F1F142E02C +:1096500040933714AD85BE8595964D905D906D9085 +:109660007C90989751968D909D90AD90BC9054971A +:10967000A50194010E9485729B01AC01C301B20156 +:109680000E94526F8B0189879D8720E030E0A901FD +:109690000E942C7087FF1BC1A7019601C701B6016C +:1096A0000E94536FA30192010E9485729B01AC013D +:1096B000C501B4010E94526F0E94F2726B8B7C8BC9 +:1096C0008D8B9E8B3F82288615C110923714ED85B5 +:1096D000FE85F5A1FF83AD85BE859696BC91B887C2 +:1096E000ED85FE8507A110A5EB8DEF5FE23109F452 +:1096F000E0E02496FFAD2497EF1789F029E22E9F32 +:10970000F0011124ED53FF4E618972898389948998 +:109710000E94F2726B8B7C8B8D8B9E8B04C01B8A9C +:109720001C8A1D8A1E8A2B893C894D895E896B891A +:109730007C898D899E890E9485722B013C0189E27A +:109740008A9DA0018B9D500D11244D535F4E5AA34D +:1097500049A3DA0151962D913D914D915C91549719 +:109760002D873E874F87588BA30192016D857E859B +:109770008F8598890E94526F29853A854B855C8533 +:109780000E9485722F813885A8010E94536F20E0C6 +:1097900030E040E05FE30E948572362E272E8983F9 +:1097A0009A8320E030E0A9010E944A7218160CF05A +:1097B00095C0232D322D49815A816F817885C8014A +:1097C0000E944A7218160CF071C0E9A1FAA1858CAA +:1097D000968CA78CB0A0A3019201C501B4010E9490 +:1097E000526F29853A854B855C850E9485726B8313 +:1097F0007D838E839C839B01AC01632D722D8981B7 +:109800009A810E944A72181694F5C501B4010E940B +:10981000F2726C8F7D8F8E8F9F8FA50194016D8565 +:109820007E858F8598890E942C70811106C0F1E099 +:10983000F093371409831A835DC02D853E854F85CB +:109840005889C501B4010E94526F29853A854B851C +:109850005C850E9485729B01AC016F817885C8018F +:109860000E94526F6F83788789839A8343C0A701D0 +:109870009601C701B6010E94536F232D322D4981F5 +:109880005A810E948572A30192010E94536F0E9427 +:10989000F2726C8F7D8F8E8F9F8F3F8228863B82E6 +:1098A0002D8229812E833A813C8324C042E040935B +:1098B000371409831A835F895C8F888D8D8F998D0A +:1098C0009E8FAA8DAF8F16C03F82288617C03F8219 +:1098D00028861B8A1C8A1D8A1E8A10C0BB89BC8FE1 +:1098E000EC89ED8FFD89FE8F2E892F8F1F821886C0 +:1098F00019821A8200E010E019861D8622965FAD5B +:109900002297452F50E05AA749A786E0849FF0018F +:10991000859FF00D1124E855FC4E8091251482831B +:10992000A989BA899596BC91B8ABE989FA89F6A15B +:10993000F9ABA989BA899796BC912696BFAF2697AD +:10994000E989FA89F0A52796FFAF279729AD3AADA7 +:109950004BAD5CAD68A979A98B2F9F2F0E94526FE8 +:109960006CA77DA78EA79FA720E030E0A9010E94E9 +:109970002C7087FF04C01CA61DA61EA61FA6209142 +:10998000371428A32B813D814E815C816F817885BE +:1099900089819A810E942C70811105C032E028963D +:1099A0003FAF289704C041E028964FAF289728A8DA +:1099B00059A92E965FAF2E9726968FAD26972D9696 +:1099C0008FAF2D9727963FAC27978EE3C82E83EC59 +:1099D000D82E8EE2E82E89E3F82E412C512C32014C +:1099E000C9A2DAA2EBA2FCA238A1332321F03130C4 +:1099F00009F485C0C5C0A989BA8991962D913D9178 +:109A00004D915C919497C701B6010E9485724B01FC +:109A10005C0120E030E040E05FE30E9485722F8926 +:109A2000388D498D5A8D0E94536FA70196010E946F +:109A300085729B01AC01622D2E967FAD2E972D96DF +:109A40008FAD2D97932D0E94526F262E2E967FAFAD +:109A50002E972D968FAF2D97392E2F8138854981DE +:109A60005A810E942C7087FF3DC02F813885498123 +:109A70005A8168A979A926968FAD269727969FAD1A +:109A800027970E94526F9B01AC010E94536F6B019C +:109A90007C012C8D3D8D4E8D5F8D6F89788D898DEC +:109AA0009A8D0E94536F9B01AC01C701B6010E94C1 +:109AB00033706B017C012896BFAD2897B8A3EC8D5D +:109AC000EF8BFD8DF88F2E8D298F3F8D3A8F2F8054 +:109AD00048852E964FAF2E9759812D965FAF2D97C3 +:109AE0003A80EBC0A50194016F89788D898D9A8D9C +:109AF0000E94536F6F8B788F898F9A8FDEC02C8D69 +:109B00003D8D4E8D5F8DC701B6010E9485729B0110 +:109B1000AC01622D2E967FAD2E972D968FAD2D9791 +:109B2000932D0E94526F4B015C012B813D814E8130 +:109B30005C810E942C7087FFB8C02B813D814E81D3 +:109B40005C81622D2E967FAD2E972D968FAD2D9731 +:109B5000932D0E94526F2C8D3D8D4E8D5F8D0E94F6 +:109B600033706B017C012B808D812E968FAF2E97E9 +:109B70009E812D969FAF2D973C80A2E0A8A39DC00B +:109B8000E989FA8921A132A143A154A1C701B601F3 +:109B90000E9485724B015C012F89388D498D5A8D49 +:109BA0000E942C7087FF52C020E030E040E05FE36D +:109BB000C501B4010E9485729B01AC016F89788D4B +:109BC000898D9A8D0E94526FA70196010E9485721D +:109BD0009B01AC01622D2E967FAD2E972D968FADF9 +:109BE0002D97932D0E94526F29966FAF29972A9631 +:109BF0007FAF2A972B968FAF2B972C969FAF2C97E2 +:109C0000980149855D850E944A721816FCF4A501E9 +:109C100094016F89788D898D9A8D0E94526F6F8B18 +:109C2000788F898F9A8F29962FAC29972A96FFAD26 +:109C30002A972E96FFAF2E972B962FAD2B972D960A +:109C40002FAF2D972C963FAC2C9737C098014985A4 +:109C50005D85622D2E967FAD2E972D968FAD2D971B +:109C6000932D0E94526F9B01AC010E94536F6B01B8 +:109C70007C012B893C894D895E896F89788D898D1E +:109C80009A8D0E94536F9B01AC01C701B6010E94DF +:109C900033706B017C01202E2E961FAF2E973985D5 +:109CA0002D963FAF2D973D8408C0282C2E969FAE51 +:109CB0002E972D96AFAE2D973B2CA7019601C30191 +:109CC000B2010E94536F2B013C0129A13AA14BA183 +:109CD0005CA10E942C7087FF07C0A301920169A1BB +:109CE0007AA18BA19CA120C02CA53DA54EA55FA566 +:109CF000622D2E967FAD2E972D968FAD2D97932D9D +:109D00000E944A72181644F52EE333EC4EE259E3F2 +:109D100069A17AA18BA19CA10E94536F69A37AA328 +:109D20008BA39CA3A30192010E94526F6B017C0143 +:109D3000980149855D85622D2E967FAD2E972D96D3 +:109D40008FAD2D97932D0E944A7218160CF44CCEAD +:109D500048A14093371403C058A1509337142DA144 +:109D60003EA14FA158A5622D2E967FAD2E972D9620 +:109D70008FAD2D97932D0E94857268A379A38CA730 +:109D800098AB0E9419706B017C016DAD7EAD8FADFB +:109D900021969FAD21970E9419704B015C01A7018C +:109DA00096010E94526F0E94A07069AB7AAB8BAB98 +:109DB0009CABA6E089A59AA5A89FF001A99FF00DEC +:109DC0001124E855FC4E29A93AA931832083232B7D +:109DD00009F087C023965FAD2397552309F481C00E +:109DE000C801A985BD858093381490933914A09338 +:109DF0003A14B0933B148B899C89AD89BE898093BA +:109E0000441490934514A0934614B09347148C8D3A +:109E10009D8DAE8DBF8D8093401490934114A0937F +:109E20004214B09343148B819D81AE81BC81809399 +:109E30004C1490934D14A0934E14B0934F148F81F3 +:109E40009885A981BA818093481490934914A0936E +:109E50004A14B0934B1422968FAD22978093CC1363 +:109E6000A989BA89B0932414A093231429AD3AADDB +:109E70004BAD5CAD20932F143093301440933114CC +:109E8000509332143B8D3093A5138DA19EA1AFA1A9 +:109E9000B8A580932B1490932C14A0932D14B093F9 +:109EA0002E149BA59093221410923C1410923D14F2 +:109EB00010923E1410923F141092331410923414E6 +:109EC0001092351410923614C0922714D092281490 +:109ED000E0922914F0922A142DA13EA14FA158A579 +:109EE00065C12DA93EA94FA958ADC301B2010E9479 +:109EF000536F2B013C0128A139A14CA558A9C501DC +:109F0000B4010E94526F9B01AC01C301B2010E94D7 +:109F100033704B015C0128A139A14CA558A9C70198 +:109F2000B6010E94526FA50194010E9485726DAB2B +:109F30007EAB8FAB98AF20EC31EE44E65EE4C5011A +:109F4000B4010E9485720E9419700E94A070603D49 +:109F5000E7E07E078105910560F446E029A53AA572 +:109F6000429FF001439FF00D1124E855FC4E1582ED +:109F700053C0603A5FE075078105910560F426E003 +:109F8000A9A5BAA52A9FF0012B9FF00D1124E85531 +:109F9000FC4E31E011C060344FE17407810591053A +:109FA00068F426E0A9A5BAA52A9FF0012B9FF00D21 +:109FB0001124E855FC4E32E035830CC0A6E049A5DB +:109FC0005AA5A49FF001A59FF00D1124E855FC4E61 +:109FD000B3E0B58346E029A53AA5429FF001439F2F +:109FE000F00D1124E855FC4E2581022E04C09695F3 +:109FF0008795779567950A94D2F7A9A9BAA902C05F +:10A00000AA0FBB1F2A95E2F7B183A08361157105E2 +:10A01000B1E08B07910568F446E029A53AA5429F77 +:10A02000F001439FF00D1124E855FC4E74836383C7 +:10A0300004C08FEF9FEF94838383BBA4B39496E017 +:10A04000B91201C0B12C980149855D85622D2E960B +:10A050007FAD2E972D968FAD2D97932D0E944A722E +:10A060001816CCF4822D2E969FAD2E972D96AFAD5F +:10A070002D97B32DE989FA8985A396A3A7A3B0A745 +:10A08000F8A1FDAF29A12EAF3CA53FAF48A921966D +:10A090004FAF2197CDC020E030E0A901622D2E9670 +:10A0A0007FAD2E972D968FAD2D97932D0E944A72DE +:10A0B00018160CF0A6C0C801A985BD858093381478 +:10A0C00090933914A0933A14B0933B148B899C89D4 +:10A0D000AD89BE898093441490934514A09346148F +:10A0E000B09347148C8D9D8DAE8DBF8D80934014A1 +:10A0F00090934114A0934214B09343148B819D819B +:10A10000AE81BC8180934C1490934D14A0934E1457 +:10A11000B0934F148F819885A981BA818093481498 +:10A1200090934914A0934A14B0934B145BA5509399 +:10A13000CC1389899A89909324148093231429AD90 +:10A140003AAD4BAD5CAD20932F1430933014409357 +:10A150003114509332143B8D3093A5138DA19EA1E1 +:10A16000AFA1B8A580932B1490932C14A0932D1419 +:10A17000B0932E14B092221410923C1410923D14FD +:10A1800010923E1410923F14109233141092341413 +:10A190001092351410923614C0922714D0922814BD +:10A1A000E0922914F0922A149C01AD01C701B60176 +:10A1B0000E943370A989BA8995966D937D938D938A +:10A1C0009C9398975CD8BB8DB093C210C35BDF4F54 +:10A1D0000FB6F894DEBF0FBECDBFDF91CF911F91B8 +:10A1E0000F91FF90EF90DF90CF90BF90AF909F9036 +:10A1F0008F907F906F905F904F903F902F900C9436 +:10A2000085342496EFAD2497FB8DEF1779F08F2FCF +:10A210008F5F823109F480E02B8D25963FAD259725 +:10A22000231303C025968FAF25978B8F1A8A198A1F +:10A230003F8028844BA522964FAF2297BBA606C924 +:10A24000C801A985BD858093381490933914A093D3 +:10A250003A14B0933B148B899C89AD89BE89809355 +:10A26000441490934514A0934614B09347148F89D7 +:10A27000988DA98DBA8D80933C1490933D14A09332 +:10A280003E14B0933F148C8D9D8DAE8DBF8D809309 +:10A29000401490934114A0934214B09343148B81C3 +:10A2A0009D81AE81BC8180934C1490934D14A093FA +:10A2B0004E14B0934F14832D922DA981BA818093AF +:10A2C000481490934914A0934A14B0934B142296C7 +:10A2D0008FAD22978093CC13A989BA89B0932414A7 +:10A2E000A093231429AD3AAD4BAD5CAD20932F1450 +:10A2F0003093301440933114509332143B8D30938B +:10A30000A5138DAD9EADAFAD2196BFAD21978093C6 +:10A31000271490932814A0932914B0932A148DA184 +:10A320009EA1AFA1B8A580932B1490932C14A09359 +:10A330002D14B0932E142DA93EA94FA958AD2093EA +:10A3400033143093341440933514509336143BA592 +:10A350003093221425964FAD25974093C2108FC09D +:10A36000C801A985BD858093381490933914A093B2 +:10A370003A14B0933B148B899C89AD89BE89809334 +:10A38000441490934514A0934614B09347148F89B6 +:10A39000988DA98DBA8D80933C1490933D14A09311 +:10A3A0003E14B0933F148C8D9D8DAE8DBF8D8093E8 +:10A3B000401490934114A0934214B09343148B81A2 +:10A3C0009D81AE81BC8180934C1490934D14A093D9 +:10A3D0004E14B0934F14832D922DA981BA8180938E +:10A3E000481490934914A0934A14B0934B142296A6 +:10A3F0005FAD22975093CC13109224141092231423 +:10A4000089AD9AADABADBCAD80932F149093301451 +:10A41000A0933114B093321424969FAD2497909357 +:10A42000A5138DAD9EADAFAD2196BFAD21978093A5 +:10A43000271490932814A0932914B0932A142DA1C3 +:10A440003EA14FA158A520932B1430932C14409378 +:10A450002D1450932E148DA99EA9AFA9B8AD809349 +:10A46000331490933414A0933514B09336149BA5F1 +:10A47000909322142596AFAD2597A093C210C35B8D +:10A48000DF4F0FB6F894DEBF0FBECDBFDF91CF9187 +:10A490001F910F91FF90EF90DF90CF90BF90AF9002 +:10A4A0009F908F907F906F905F904F903F902F90F4 +:10A4B0000895CF93DF930E940A2A8BE2E5E2F4E14C +:10A4C000DF011D928A95E9F783E2EFE9F0E1DF0110 +:10A4D0001D928A95E9F71092241410922314109279 +:10A4E000A7131092CC1381E08093221410929E1037 +:10A4F0000E948B2981B390919D109170C92FB0E07B +:10A50000DB2F96E0CC0FDD1F9A95E1F78F7BC82BF0 +:10A51000C1BBEBE0F1E0908180919D108270880FCB +:10A52000880F977F892B808381B390919D1092FB38 +:10A53000992790F98E7F892B81BB80919C1080FD9B +:10A540008F9A80FF8F98808190919C1092708D7F60 +:10A55000892B808321B390919C109470892F90E077 +:10A5600095958795922F9D7F892B81BBDF91CF9108 +:10A570000895CF93DF93C62F813009F48EC038F150 +:10A58000823009F069C10E943E408CE60E94D93FAA +:10A590000E941B408C2F0E94D93F0E941B400E94AA +:10A5A0003E408DE60E94D93F0E941B4062E070E071 +:10A5B00080E090E00E941139559A5D9A62E070E067 +:10A5C00080E090E00E941139D8E0C0E002C10E9412 +:10A5D000A5418CE60E9435410E947F418C2F0E944C +:10A5E00035410E947F410E94A5418DE60E94354180 +:10A5F0000E947F4162E070E080E090E00E941139AB +:10A60000399A419A62E070E080E090E00E9411394E +:10A61000D8E0C0E0439865E070E080E090E00E9400 +:10A620001139439ACC0F65E070E080E090E00E9421 +:10A63000113939983199C16065E070E080E090E0AF +:10A640000E941139D15031F74398399A419A62E00A +:10A6500070E080E090E00E941139439A65E070E07C +:10A6600080E090E00E941139439862E070E080E061 +:10A6700090E00E941139399A419A62E070E080E0DE +:10A6800090E00E941139439862E070E080E090E031 +:10A690000E9411390E946741E0C00E9403418CE68C +:10A6A0000E9453400E94CB408C2F0E9453400E9436 +:10A6B000CB400E9403418DE60E9453400E94CB4054 +:10A6C00062E070E080E090E00E9411398091010129 +:10A6D0008460809301018091020184608093020173 +:10A6E00062E070E080E090E00E941139D8E0C0E0C4 +:10A6F000809102018F778093020165E070E080E035 +:10A7000090E00E94113980910201806880930201DB +:10A71000CC0F65E070E080E090E00E9411398091FC +:10A7200001018B7F809301018091000182FDC16056 +:10A7300065E070E080E090E00E941139D150C1F6F0 +:10A74000809102018F7780930201809101018460E2 +:10A75000809301018091020184608093020162E094 +:10A7600070E080E090E00E941139809102018068E1 +:10A770008093020165E070E080E090E00E94113972 +:10A78000809102018F778093020162E070E080E0A7 +:10A7900090E00E9411398091010184608093010151 +:10A7A0008091020184608093020162E070E080E0A9 +:10A7B00090E00E941139809102018F77809302010D +:10A7C00062E070E080E090E00E9411390E949C40BD +:10A7D00044C05E9865E070E080E090E00E9411392E +:10A7E0005E9ACC0F65E070E080E090E00E94113945 +:10A7F00055984D99C16065E070E080E090E00E945E +:10A800001139D15031F75E98559A5D9A62E070E047 +:10A8100080E090E00E9411395E9A65E070E080E08F +:10A8200090E00E9411395E9862E070E080E090E074 +:10A830000E941139559A5D9A62E070E080E090E0E4 +:10A840000E9411395E9862E070E080E090E00E9422 +:10A8500011390E94064001C0C0E08C2FDF91CF91DA +:10A860000895EEEAF4E124813581DC010E94A073B1 +:10A87000A1E0B1E02C9128602C93A0EAB0E02C91EB +:10A8800020682C93DC01CB012AE0B695A79597951B +:10A8900087952A95D1F79093A9008093A800868187 +:10A8A00080618093A1000895CF93DF9321E5829F7B +:10A8B000C0011124EC01D55F40E550E0BE018EE5FA +:10A8C00094E10E947D5D892B59F410925E1440E55D +:10A8D00050E06EE574E1CE010E943A5D80E001C077 +:10A8E00081E0DF91CF91089590E0FC013197E23152 +:10A8F000F10508F04EC08827E654FF4F8F4F0C94A7 +:10A900009873809180008F7703C0809180008F7D45 +:10A9100080938000089580918000877FF9CF84B56F +:10A920008F7702C084B58F7D84BD08958091B0007B +:10A930008F7703C08091B0008F7D8093B000089521 +:10A94000809190008F7707C0809190008F7D03C029 +:10A9500080919000877F8093900008958091A0005F +:10A960008F7707C08091A0008F7D03C08091A000E9 +:10A97000877F8093A0000895809120018F7707C082 +:10A98000809120018F7D03C080912001877F80937B +:10A99000200108951F93CF93DF93282F30E0F90112 +:10A9A000EA57F54F8491F901E05CF54FD491F90134 +:10A9B000E650F64FC491CC23B9F0162F811194DFE5 +:10A9C000EC2FF0E0EE0FFF1FE052F64FA591B4918F +:10A9D0009FB7F894111104C08C91D095D82302C070 +:10A9E000EC91DE2BDC939FBFDF91CF911F910895F7 +:10A9F000863308F0865390917B00282F2870977F2C +:10AA0000922B90937B008770806480937C00809170 +:10AA10007A00806480937A0080917A0086FDFCCF72 +:10AA2000809178002091790090E0922B08951F92F8 +:10AA30000F920FB60F9211240BB60F922F933F93E4 +:10AA40004F935F936F937F938F939F93AF93BF9336 +:10AA5000EF93FF938091591490915A14909325018C +:10AA600080932401E0915714F0915814309709F025 +:10AA70001995FF91EF91BF91AF919F918F917F9128 +:10AA80006F915F914F913F912F910F900BBE0F905F +:10AA90000FBE0F901F9018951F920F920FB60F9236 +:10AAA00011240BB60F922F933F934F935F936F93A5 +:10AAB0007F938F939F93AF93BF93EF93FF93809177 +:10AAC000B0149091B1149093A5008093A400E091EC +:10AAD000AE14F091AF14309709F01995FF91EF91F2 +:10AAE000BF91AF919F918F917F916F915F914F91A6 +:10AAF0003F912F910F900BBE0F900FBE0F901F90A4 +:10AB00001895E2E7F0E080818E7F808308951F92A0 +:10AB10000F920FB60F9211248F939F93809108028A +:10AB20009091090290939500809394009F918F914A +:10AB30000F900FBE0F901F9018951F920F920FB697 +:10AB40000F9211240BB60F922F933F934F935F9365 +:10AB50006F937F938F939F93AF93BF93EF93FF93E5 +:10AB600080915214909153148093B200E09150144C +:10AB7000F0915114309709F01995FF91EF91BF9121 +:10AB8000AF919F918F917F916F915F914F913F9185 +:10AB90002F910F900BBE0F900FBE0F901F90189526 +:10ABA0004F925F926F927F92AF92BF92CF92DF925D +:10ABB000EF92FF920F931F93CF93DF936C01FB01F2 +:10ABC0005A01309729F08081D601A80FB11D01C02C +:10ABD000DC018C91ED018D3229F4229611968C9135 +:10ABE00001E008C08B3211F0219603C02296119625 +:10ABF0008C9100E0512C612C10E020E030E0A901A4 +:10AC00007E0160ED762E780E89E08715D8F063948A +:10AC1000A8E0A61598F051101150A5E0B0E00E94F0 +:10AC2000AF73DC01CB01880F991FAA1FBB1F9C01CA +:10AC3000AD01270D311D411D511D0BC0511009C023 +:10AC40001F5F07C0BEEF7B1208C0511006C055241D +:10AC500053942196D7018C91D3CF662009F450C02C +:10AC60007F01CA01B9010E94CC702B013C0120E098 +:10AC700030E0A9010E942C70882349F11F3F64F441 +:10AC80002AE037ED43E25CE3C301B2010E94857222 +:10AC90002B013C011E5FF2CF1F3F59F42DEC3CEC21 +:10ACA0004CEC5DE3C301B2010E9485722B013C01B3 +:10ACB0000EC0112361F020E030E040E251E4C30116 +:10ACC000B2010E9485722B013C011150F2CF00238A +:10ACD00051F077FA709477F87094F50140825182C0 +:10ACE0006282738206C0D5014D925D926D927C9214 +:10ACF0001397CC19DD09C150F701C08381E001C071 +:10AD000080E0DF91CF911F910F91FF90EF90DF9046 +:10AD1000CF90BF90AF907F906F905F904F900895CD +:10AD20008091B51484FD25C09FB7F8948091B51427 +:10AD300080618093B5149FBF0E94D02C20D7809152 +:10AD40000715982F9C7021F490910815913089F483 +:10AD50009FB7843029F4F89480910515806204C06F +:10AD6000F894809105158860809305159FBF0C9419 +:10AD70000A2A08952F923F924F925F926F927F928C +:10AD80008F929F92AF92BF92CF92DF92EF92FF92FB +:10AD90000F931F93CF93DF93CDB7DEB7C756D1097B +:10ADA0000FB6F894DEBF0FBECDBF66968FAF669725 +:10ADB0001B016B962CAF3DAF4EAF5FAF6B97A89664 +:10ADC0000FAFA8978091F41485FF51C03B0107EBAA +:10ADD00014E17B012CE0E20EF11CDD24D394D301BD +:10ADE0008D909D90AD90BD903D0120E030E0A90197 +:10ADF000C501B4010E944A72181654F0F80124A14A +:10AE000035A146A157A1C501B4010E942C7087FD50 +:10AE1000D092091580910915882319F180910715A1 +:10AE2000883061F07DDF9FB7F894809105158560CB +:10AE3000809305159FBF0E945A3919C09FB7F89497 +:10AE40008091B51488608093B5149FBF0E945A39D1 +:10AE50008091061581110BC0809107158111F6CFE5 +:10AE6000E1CF0C5F1F4FE614F70409F0B8CF8091D3 +:10AE70000715823009F47CC3F10180819181A281A0 +:10AE8000B38165968CAF9DAFAEAFBFAF6597848140 +:10AE90009581A681B78161968CAF9DAFAEAFBFAFF4 +:10AEA000619780859185A285B3852D968CAF9DAFE6 +:10AEB000AEAFBFAF2D97AE01475B5F4FBE01635B87 +:10AEC0007F4FCE018F5A9F4F0E94BD412D96ECAC13 +:10AED000FDAC0EAD1FAD2D9761962CAD3DAD4EADC9 +:10AEE0005FAD619765966CAD7DAD8EAD9FAD65979D +:10AEF000DE0191964D01FE017D965F0118976D016F +:10AF00000E941143E9A0FAA00BA11CA12D8D3E8D3A +:10AF10004F8D58A1698D7A8D8B8D9C8D0E94EB454C +:10AF2000882309F421C36091810D7091820D809175 +:10AF3000830D9091840D0E94CE702B013C01609195 +:10AF40007D0D70917E0D80917F0D9091800D0E94FE +:10AF5000CE706F966CAF7DAF8EAF9FAF6F976091E5 +:10AF6000790D70917A0D80917B0D90917C0D0E94EE +:10AF7000CE70FE01BD964F019E01275D3F4F5901E6 +:10AF8000DE0195966D01830172016F962CAD3DAD8A +:10AF90004EAD5FAD6F970E945A45A401B501C60141 +:10AFA0000E9468420E9459326696BFAD6697BB23E5 +:10AFB00019F0B13041F0DDC0E1E0F0E06796FFAF9D +:10AFC000EEAF6797DAC020E030E048EC52E46B96D1 +:10AFD0006CAD7DAD8EAD9FAD6B970E944A72181619 +:10AFE00054F480E090E0A8ECB2E46B968CAF9DAF97 +:10AFF000AEAFBFAF6B972DA13EA14FA158A5D10118 +:10B000006D917D918D919C910E94526F2B013C011D +:10B0100029A53AA54BA55CA5F101648175818681BE +:10B0200097810E94526F4B015C012DA53EA54FA553 +:10B0300058A9D10118966D917D918D919C911B9786 +:10B040000E94526F6B017C01A3019201C301B20106 +:10B050000E9485722B013C01A5019401C501B40138 +:10B060000E9485729B01AC01C301B2010E94536F23 +:10B070004B015C01A7019601C701B6010E948572D0 +:10B080009B01AC01C501B4010E94536F0E94F27292 +:10B0900020E030E040EF51E40E9485726B962CADC9 +:10B0A0003DAD4EAD5FAD6B970E9433700E94A070B6 +:10B0B00067967FAF6EAF67976A30710530F42AE00C +:10B0C00030E067963FAF2EAF679720E030E040E971 +:10B0D00050E46B966CAD7DAD8EAD9FAD6B970E94CD +:10B0E000857220E030E048EC52E40E94337020E0AA +:10B0F00030E040E05FE30E94536F20E030E040E743 +:10B1000052E40E94857220E030E040E752E40E9461 +:10B1100085726B017C016093CF147093D01480937F +:10B12000D1149093D2146093D3147093D414809359 +:10B13000D5149093D61420E030E442E955E40E94FF +:10B140004A7287FF09C0C092D714D092D814E092F7 +:10B15000D914F092DA1411C080E090E4A2E9B5E4C9 +:10B160008093D7149093D814A093D914B093DA1481 +:10B1700004C067961FAE1EAE67976796AEADBFADB3 +:10B180006797BD0180E090E00E94CC706B017C016C +:10B190002DA13EA14FA158A5F1016081718182814D +:10B1A00093810E94526FA70196010E9433706F969F +:10B1B0006CAF7DAF8EAF9FAF6F9729A53AA54BA51A +:10B1C0005CA5D10114966D917D918D919C911797FD +:10B1D0000E94526FA70196010E943370A3966CAF34 +:10B1E0007DAF8EAF9FAFA3972DA53EA54FA558A9C4 +:10B1F000F10160857185828593850E94526FA70158 +:10B2000096010E943370A7966CAF7DAF8EAF9FAF53 +:10B21000A79722242394312C67962EAD3FAD6797D4 +:10B220002215330508F49EC1B101032C000C880BD4 +:10B23000990B0E94CE706B017C019B01AC016F9653 +:10B240006CAD7DAD8EAD9FAD6F970E9485729B01F9 +:10B25000AC016DA17EA18FA198A50E94536F6D874F +:10B260007E878F87988BA7019601A3966CAD7DADE5 +:10B270008EAD9FADA3970E9485729B01AC0169A51D +:10B280007AA58BA59CA50E94536F698B7A8B8B8BBB +:10B290009C8BA7019601A7966CAD7DAD8EAD9FAD41 +:10B2A000A7970E9485729B01AC016DA57EA58FA515 +:10B2B00098A90E94536F6D8B7E8B8F8B988FAE01F8 +:10B2C0004B5E5F4FBE016F5E7F4FCE010D960E94B9 +:10B2D000BD41ED88FE880F89188D29893A894B89EF +:10B2E0005C896D857E858F859889DE01DD964D01AF +:10B2F000FE01EF5BFF4F5F0118966D010E94114345 +:10B300002196ECACFDAC0EAD1FAD219725962CAD72 +:10B310003DAD4EAD5FAD259729966CAD7DAD8EAD43 +:10B320009FAD29970E94EB45882309F417C16D85CD +:10B330007E858F8598896093850D7093860D8093A7 +:10B34000870D9093880D29893A894B895C892093D0 +:10B35000890D30938A0D40938B0D50938C0DED88A1 +:10B36000FE880F89188DE0928D0DF0928E0D00935E +:10B370008F0D1093900DFE01F1964F01DE01D596D1 +:10B380005D0138966F010E941143C9A8DAA8EBA8A5 +:10B39000FCA88DA89EA8AFA8B8AC20916D0D3091E7 +:10B3A0006E0D40916F0D5091700D69AD7AAD8BAD02 +:10B3B0009CAD0E94526F24EE38E34EE553E40E94A8 +:10B3C00085720E949B70072E000C880B990B0E94BF +:10B3D000CE7069837A838B839C832091710D309129 +:10B3E000720D4091730D5091740DC501B4010E940E +:10B3F000526F24EE38E34EE553E40E9485720E94BA +:10B400009B70072E000C880B990B0E94CE706D83E9 +:10B410007E838F8398872091750D3091760D4091B2 +:10B42000770D5091780DC701B6010E94526F20E050 +:10B4300030E044EB52E40E94536F24EE38E34EE5D3 +:10B4400053E40E9485720E949B70072E000C880BAB +:10B45000990B0E94CE7069877A878B879C870E94A0 +:10B460005A3980910615811181C09091A513809160 +:10B470006510981303C00E94A233F1CF89809A808F +:10B48000AB80BC80C501B4010E949B706093790DB4 +:10B4900070937A0D80937B0D90937C0DCD80DE8030 +:10B4A000EF80F884C701B6010E949B7060937D0D08 +:10B4B00070937E0D80937F0D9093800D49845A8404 +:10B4C0006B847C84C301B2010E949B706093810DE8 +:10B4D0007093820D8093830D9093840D2091B71407 +:10B4E0003091B8144091B9145091BA14C501B40107 +:10B4F0000E94337069837A838B839C832091BB1471 +:10B500003091BC144091BD145091BE14C701B601D6 +:10B510000E9433706D837E838F8398872091BF1440 +:10B520003091C0144091C1145091C214C301B201B2 +:10B530000E94337069877A878B879C87A8962FAD86 +:10B54000A8976B964CAD5DAD6EAD7FAD6B97CE01A0 +:10B5500001960E94D23531E03093950DFFEF2F1AFE +:10B560003F0A5ACE80E004C083E302C082E000C0FC +:10B57000C959DF4F0FB6F894DEBF0FBECDBFDF91C4 +:10B58000CF911F910F91FF90EF90DF90CF90BF90E0 +:10B59000AF909F908F907F906F905F904F903F9073 +:10B5A0002F9008951F920F920FB60F9211240BB691 +:10B5B0000F922F933F934F935F936F937F938F934C +:10B5C0009F93AF93BF93EF93FF93809107158130C3 +:10B5D00069F080910515811109C0A2DB9FB7F8942D +:10B5E000809105158360809305159FBFFF91EF91B2 +:10B5F000BF91AF919F918F917F916F915F914F918B +:10B600003F912F910F900BBE0F900FBE0F901F9088 +:10B61000189589B180719091F41496FD02C090E163 +:10B620008927882319F011F087E0089580E00895B4 +:10B630002F923F924F925F926F927F928F929F9242 +:10B64000AF92BF92CF92DF92EF92FF920F931F9330 +:10B65000CF93DF93CDB7DEB768970FB6F894DEBF10 +:10B660000FBECDBF909106159111A6C1782E27EB84 +:10B6700034E1398B288B5901CE010D964C0100E045 +:10B6800010E0C12CD12C7601A72DB0E0BD8BAC8B86 +:10B69000802F002321F0013021F094E003C091E0DD +:10B6A00001C092E0F40191934F012C893D8902C0C1 +:10B6B000359527958A95E2F720FF1BC020E030E002 +:10B6C00040EC5FEBD50194966D917D918D919C91AD +:10B6D00097970E948572362E472E582E692EA70105 +:10B6E00096010E942C7087FD04C0C32CD42CE52C3D +:10B6F000F62C0F5F1F4FB4E0AB0EB11C03301105E9 +:10B7000039F68090FA149090FB14A090FC14B0903D +:10B71000FD1484E0682E01E06AE075E1CE01019637 +:10B720000E94D4488091F514E82FF0E0FF8BEE8B57 +:10B73000FE01319626E035E13B8B2A8B1901CE01C3 +:10B740000D962C0180E090E0188E10E0B701A60164 +:10B7500070582C893D89082E02C0359527950A948A +:10B76000E2F720FF25C0A88DAF5FA88FD101149606 +:10B770001D921D921D921C9217972E893F89082EAB +:10B7800002C0359527950A94E2F720FF03C00023F5 +:10B7900019F007C0002329F0C082D182E282F3822F +:10B7A00004C04083518362837383D2012C91122B96 +:10B7B0000196BFEF4B1A5B0A349624E0220E311C2F +:10B7C0008330910531F6388D632F70E080E090E092 +:10B7D0000E94CC700E94F2729B01AC01C501B401C1 +:10B7E0000E9485726B017C01109323150E946334C3 +:10B7F00020E0B701A601CE0101960E94D2350E9439 +:10B8000061490E94A42C0023E1F003DFFE013D9674 +:10B8100020E030E090E06191462F412359F0AC01E7 +:10B82000022E02C0559547950A94E2F740FF02C0E8 +:10B83000609516232F5F3F4F2330310561F710933A +:10B8400023150E9461498091B5148473B1F08091F1 +:10B85000B514807321F064DA0E945A39ADC0011129 +:10B86000A6C0D7DE8721B9F79FB7F8948091B514A9 +:10B870008B7F8093B5149FBF04C0812F877009F020 +:10B88000C2CF0E9459520E9474348091FE1490914C +:10B89000FF140E944F3981E00827C9F020E030E012 +:10B8A00040EA50E4609100157091011580910215F5 +:10B8B000909103150E9485726B017C018090F614B3 +:10B8C0009090F714A090F814B090F91410C0C090A4 +:10B8D0000015D0900115E0900215F09003158090AE +:10B8E000FA149090FB14A090FC14B090FD146A948C +:10B8F000611012CFE090F514F12C8090001590901B +:10B900000115A0900215B09003152401350177FAB6 +:10B91000709477F8709400E010E08C899D89002E77 +:10B9200002C0959587950A94E2F780FF2CC0C70165 +:10B93000002E02C0959587950A94E2F7A889B989E7 +:10B9400080FF11C094962D913D914D915C919797F8 +:10B95000C501B4010E94536FE889F98920813181C2 +:10B960004281538106C02D913D914D915C91C3015F +:10B97000B2010E9485720E945572EA89FB89648334 +:10B980007583868397830F5F1F4F2A893B892C5FBE +:10B990003F4F3B8B2A8B888999890496998B888B9A +:10B9A0000330110509F0B9CF0E94633405C08091BE +:10B9B000B51482FF59CF4FCF68960FB6F894DEBF0B +:10B9C0000FBECDBFDF91CF911F910F91FF90EF90F0 +:10B9D000DF90CF90BF90AF909F908F907F906F90AF +:10B9E0005F904F903F902F900895EBE6F0E08081BC +:10B9F0008F7E8083E8E6F0E080818E7F80830895EB +:10BA000054985C9A8091F41483FF0BC080916B0072 +:10BA1000806180936B0080916800816080936800F2 +:10BA20000895E3CF6AE075E184E795E10C94D4488A +:10BA3000F894F999FECF92BD81BD81E08FBB80B5AE +:10BA40008627482F082E000C550B262F30E0242384 +:10BA50003523232B39F06F3F19F060BD84E006C019 +:10BA600084E104C0882321F060BD84E28FBBF99A91 +:10BA7000789408959F92AF92BF92CF92DF92EF9207 +:10BA8000FF920F931F93CF93DF935C018A017B0199 +:10BA9000E40EF51EEB01912C6C01C61AD70ACE01FB +:10BAA0008C0D9D1DCE15DF0581F0911008C0292D4C +:10BAB000990C330B232F221F2227221F01C021E0C4 +:10BAC0006991922E960EB4DFEACF692DC501800FE1 +:10BAD000911FDF91CF911F910F91FF90EF90DF9019 +:10BAE000CF90BF90AF909F90A3CFF999FECF92BD1A +:10BAF00081BD81E08FBB80B508959F92AF92BF92C8 +:10BB0000CF92DF92EF92FF920F931F93CF93DF9329 +:10BB10005B018A017C01E40EF51EEC01912C6B01A6 +:10BB2000C81AD90AC6018C0F9D1FCE15DF0581F0FA +:10BB3000DCDF911008C0292D990C330B232F221F15 +:10BB40002227221F01C021E0982E920E8993EACF6E +:10BB5000C501800F911FC9DF21E030E0981611F078 +:10BB600020E030E0C901DF91CF911F910F91FF904C +:10BB7000EF90DF90CF90BF90AF909F9008955C982A +:10BB80000895CF93DF93CDB7DEB7CC56D1090FB66A +:10BB9000F894DEBF0FBECDBF8091C000826080935D +:10BBA000C0001092C50080E18093C4009091C10054 +:10BBB00090619093C1009091C10098609093C100F2 +:10BBC0009091C10090689093C1009091C8009260DC +:10BBD0009093C8001092CD008093CC009091C90042 +:10BBE00090619093C9009091C90098609093C900AA +:10BBF0009091C90090689093C9009091D000926094 +:10BC00009093D0001092D5008093D4009091D100F1 +:10BC100090619093D1009091D10098609093D10061 +:10BC20009091D10090689093D100909130019260F2 +:10BC3000909330011092350180933401809131014D +:10BC4000806180933101809131018860809331015E +:10BC5000809131018068809331010E945932869A27 +:10BC6000879A829A80910A01886080930A01809164 +:10BC70000A01826080930A018091070181608093AC +:10BC80000701809A819A579A809107018061809379 +:10BC90000701809107018860809307018091070167 +:10BCA000846080930701809108018F7E8093080152 +:10BCB00080910801886080930801809108018B7F42 +:10BCC000809308018091F41482FF08C08A9A8091C1 +:10BCD00008018160809308015F9A07C08A9880916B +:10BCE00008018E7F809308015F98809181008F7E8C +:10BCF0008093810080918100886080938100809191 +:10BD000080008C7F80938000809180008F70809372 +:10BD1000800080916E00887F80936E0014BC15BCFB +:10BD200080916E00816080936E0054985C9A80913F +:10BD30006D00806180936D008091680084608093C5 +:10BD400068008AE090E00E944F390E948C3D399A49 +:10BD50003B9A419A439A809101018460809301014A +:10BD600080910101806880930101809102018460CB +:10BD70008093020180910201806880930201559AAC +:10BD8000569A5D9A5E9A0E94854605E91EE081E01A +:10BD900090E07C012FEFE21AF20AA7DED8018D9322 +:10BDA0008D01C7018B3C9105A1F755E1C52E5EE0E1 +:10BDB000D52E87010F5F1F4FC70197DEF6018193D4 +:10BDC0006F0178010B34F1E01F0799F74BE9E42E7E +:10BDD0004DE0F42E68012FEFC21AD20AC80185DEA9 +:10BDE000D7018D937D018601B5ECCB16B1E0DB0662 +:10BDF00089F720E030E04AE754E464E071E080E055 +:10BE000090E00E94303E84E893E06FDE80935F0D07 +:10BE100085E893E06ADE8093600D01E61DE088E925 +:10BE200093E07C01EFEFEE1AFE0A5FDED8018D93FE +:10BE30008D01C701BCE9EB16B3E0FB0691F705E6FF +:10BE40001DE08EE893E07C01EFEFEE1AFE0A4DDE76 +:10BE5000D8018D938D01C701B2E9EB16B3E0FB0663 +:10BE600091F709E61DE082E89CE07C01EFEFEE1A15 +:10BE7000FE0A3BDED8018D938D01C701B6E8EB16B3 +:10BE8000BCE0FB0691F7C090690DD0906A0DE09080 +:10BE90006B0DF0906C0D20E030E044EB53E4C701F3 +:10BEA000B6010E944A72181644F0A7019601C70114 +:10BEB000B6010E943A73882341F01092690D1092E6 +:10BEC0006A0D10926B0D10926C0D0AE11DE08AEE66 +:10BED00093E07C01EFEFEE1AFE0A07DED8018D93A6 +:10BEE0008D01C701B6EFEB16B3E0FB0691F7609149 +:10BEF000690D70916A0D80916B0D90916C0DFE0132 +:10BF000031967F018F0124E045E00E94D76CFF92BB +:10BF1000EF928BE093E09F938F930E94AF330E9448 +:10BF2000873D0E94843D0E94733D0E94943F0E9481 +:10BF3000FF3C80917A00876880937A009B98A39A4F +:10BF40008FE08093910D0E949E3E8AEB92E09F933A +:10BF50008F938DE193E09F938F930E94AF3389EC91 +:10BF600092E09F938F9380E393E09F938F930E943F +:10BF7000AF3380ED92E09F938F9380E493E09F93A3 +:10BF80008F930E94AF338091600D8F9380915F0DEE +:10BF90008F938FE493E09F938F930E94AF3380E65B +:10BFA00093E00E9458348EE1E6E0F5E1DF011D9256 +:10BFB0008A95E9F781E08093061578949091F414BE +:10BFC0000FB6F894DEBF0FBECDBF94FD809307156A +:10BFD0009E01235C3F4F6F963FAF2EAF6F971E01C0 +:10BFE00035E1230E311CCE018996A1969FAF8EAF0D +:10BFF000A197DE011196A396BFAFAEAFA397809134 +:10C00000E00F8093DF0F8FE3EDE5F5E1DF011D9297 +:10C010008A95E9F760E875E180E00E94452E81117C +:10C0200003C087E00E94FF310C9A549A549A0E94F0 +:10C03000D02C549AA4DDE4DC54985C9A0E947434A9 +:10C040000E9459520E946334EDDC10920615109242 +:10C05000B5141092051510920815109209158091CB +:10C060000715813099F480ED99E00E940A348AEA3C +:10C0700099E00E940A348DE599E00E940A34A49662 +:10C080001FAEA497A5961FAEA5973DC010920715A9 +:10C09000F6CF8091060185FD20C00E948155109247 +:10C0A000960D809102018F7D809302018091690D30 +:10C0B00090916A0DA0916B0DB0916C0DB05880936A +:10C0C000861090938710A0938810B093891060E039 +:10C0D00070E084EB92E40E94F03E80918210909197 +:10C0E0008310A0918410B0918510892B8A2B8B2B03 +:10C0F00051F41092960DE4E6F3E0FF93EF930E9463 +:10C10000AF330F900F908091960D8823E1F0C1CF4F +:10C11000E92FF0E0E15AF04F80819F5F903809F4F9 +:10C1200090E09093DF0F8F3F09F477C58A3091F04C +:10C130008D3081F0A596BFADA597BB2309F439C515 +:10C14000893209F42FC59091DF0F8091E00F981389 +:10C15000DFCF63C50EE514E1A4963FADA497E32FAE +:10C16000F0E0E25AFB4E10820E945A398091061587 +:10C17000811111C58AE0D1011D928A95E9F780915C +:10C180005E14843209F076C481E08DAF80915F1433 +:10C19000833481F034F4882351F0843209F06FC283 +:10C1A00009C0873439F0883509F069C203C088E6D0 +:10C1B00096E054C39091601491114EC4833409F4F5 +:10C1C0002DC21CF4843241F04DC4873409F46AC195 +:10C1D000883509F440C246C480910715887109F07A +:10C1E0003DC484E696E00E940A348091E7140E94E0 +:10C1F000FC338BE496E00E940A348091EA140E949A +:10C20000FC338DE296E00E940A348091E8140E948B +:10C21000FC3384E196E00E940A348091E8140E9485 +:10C2200007348DE096E00E940A348091E9140E9460 +:10C23000FC3385EF95E00E940A348091E9140E9456 +:10C2400007348EEE95E00E940A348091F41482FB4C +:10C25000882780F90E94FC338DEC95E00E940A3417 +:10C260008091F41486FB882780F90E94FC338DEAC4 +:10C2700095E00E940A348091F414881F8827881F53 +:10C280000E94FC338DE895E00E940A348091EB1403 +:10C290000E94FC3387E795E00E940A348091EB14FA +:10C2A0000E9407348FE695E00E940A346091EC14F6 +:10C2B0007091ED148091EE149091EF140E94DE3392 +:10C2C0008FE495E00E940A346091F0147091F114AB +:10C2D0008091F2149091F3140E94DE3384E395E090 +:10C2E0000E940A348091F41481700E94FC3387E12B +:10C2F00095E00E940A348091F41485FB882780F928 +:10C300000E94FC338CEF94E00E940A348091F41474 +:10C3100083FB882780F90E94FC3381EE94E00E9421 +:10C320000A348091F414829581700E94FC3385EC6C +:10C3300094E00E940A348091F5140E94FC338BEA49 +:10C3400094E00E940A348091F5140E94073483EA35 +:10C3500094E00E940A346091F6147091F714809171 +:10C36000F8149091F9140E94DE3386E894E00E945C +:10C370000A346091FA147091FB148091FC1490912E +:10C38000FD140E94DE3389E694E00E940A34809115 +:10C39000FE140E94FC338AE494E00E940A34609107 +:10C3A00000157091011580910215909103150E945E +:10C3B000DE3381E394E00E940A3410E034E6D32EA9 +:10C3C00027EBE22E24E1F22E00E08FE294E00E94BF +:10C3D0000A34802F8D0D0E94FC338DE294E00E9480 +:10C3E0000A34123091F01330E1F0113031F0F701DE +:10C3F00060817181828193811CC0D7011C966D91EF +:10C400007D918D919C911F9714C020E030E041E612 +:10C4100055E4F701608D718D828D938D0E9433708C +:10C4200008C0F70184A195A1A6A1B7A1BC01CD01C7 +:10C4300090580E94DE338AE294E00E940A34013070 +:10C4400029F0023031F088E294E005C086E294E001 +:10C4500002C084E294E00E940A34123051F013309A +:10C4600059F0113019F08AE194E008C088E094E0B6 +:10C4700005C087EF93E002C087EE93E00E940A3484 +:10C4800083EE93E00E940A340F5FF4E0EF0EF11C9C +:10C49000033009F09ACF2AE0D20E1F5F3CE8D31296 +:10C4A0008FCFE0C281EE93E00E940A3480915D1547 +:10C4B000823091F038F4882361F08130A9F48BED5B +:10C4C00093E00CC0833069F0883071F481ED93E023 +:10C4D00005C08EED93E002C088ED93E00E940A341F +:10C4E0000CC085ED93E0FACF8CEC93E00E940A3407 +:10C4F00080915D1582500E94FC3389EC93E00E948C +:10C500000A34809163158A5C0E94FC338091611526 +:10C51000813049F028F0823051F48AEB93E005C075 +:10C5200084EC93E002C08FEB93E00E940A34809188 +:10C530005F15811103C085EB93E002C080EB93E0AF +:10C540000E940A3480916015811103C08BEA93E048 +:10C5500002C086EA93E00E940A3480915E15813021 +:10C5600019F481EA93E002C08CE993E00E940A3456 +:10C5700080916415813049F028F0823051F480E9CF +:10C5800093E005C088E993E002C084E993E00E944B +:10C590000A3480916615813031F040F0823051F4D8 +:10C5A00088E893E005C08CE893E002C084E893E05B +:10C5B0000E940A3480916515882329F0823039F46D +:10C5C0008CE793E002C080E893E00E940A3489E798 +:10C5D00093E00E940A3480916F150E94FC3386E735 +:10C5E00093E00E940A3460916B1570916C158091F4 +:10C5F0006D1590916E150E94E03383E793E00E94E1 +:10C600000A34609167157091681580916915909151 +:10C610006A150E94E0338FE693E020C180910715F0 +:10C62000823049F40E94905680ED99E00E940A34CD +:10C6300087E899E00BC0811111C282E08093071551 +:10C6400080ED99E00E940A3480E999E00E940A3462 +:10C650008DE599E003C180910715813009F002C290 +:10C6600080ED99E00E940A3488E999E00E940A343A +:10C670008DE599E00E940A3410920715F3C190915C +:10C680000715923008F0EAC1893409F4C5C034F4C2 +:10C69000833259F0883409F480C064C18E3409F4BF +:10C6A00036C1823509F4F9C05DC182E08DAF809159 +:10C6B00060148111D1C110E0BE016F5F7F4F812FE7 +:10C6C0000E94452E811104C087E00E94FF31CAC13B +:10C6D0008CE693E00E940A34163029F0173041F4BA +:10C6E00086E693E002C089E693E00E940A3404C023 +:10C6F00086E3810F0E94FC3384E693E00E940A34B3 +:10C70000CE0101967C0100E0D7016D917D918D9164 +:10C710009D917D010E94EE33023019F082E693E094 +:10C7200002C08EE593E00E940A340F5F033061F788 +:10C730001F5F183009F688E593E00E940A349CE8F0 +:10C74000E92E95E1F92E10E0F70161917191819147 +:10C7500091917F010E94EE33123019F086E593E04B +:10C7600002C082E593E00E940A341F5F133061F734 +:10C770008CE493E00E940A346091981570919915A9 +:10C7800080919A1590919B150E94EE3388E493E076 +:10C790000E940A340E94183465C18091F41484FF09 +:10C7A00059C184E08093071520D984E00E94185B6A +:10C7B00083E00E94185B0E945A398091061581110E +:10C7C00002C030D91DD98091061581114BC110923C +:10C7D00007150E940A2A10E0812F0E9454548111EB +:10C7E00002C087E013C080915E14882389F08EE533 +:10C7F00094E10E9458348EE594E10E9488058111ED +:10C8000005C08BEB98E00E940A3402C00E94FF3101 +:10C810001F5F123009F726C182E08DAF809160144E +:10C8200081111FC040E550E06EEA7BE08EE594E1A7 +:10C8300064D9892B49F410925E1440E550E06EE50E +:10C8400074E18EEA9BE016D988E393E00E940A34F3 +:10C850008EE594E10E94583484E393E00E940A3408 +:10C8600001C193E09DAF8D3309F0F6C083E0282F1E +:10C8700030E0F901E25AFB4E9081D901A55ABB4E36 +:10C880009C938F5F90819111F2CF8DAF40E550E086 +:10C890006EE574E18EEA9BE0ABC082E08DAF8091E3 +:10C8A0006014833509F0D8C083E08DAF80916114A6 +:10C8B000843509F0D1C084E08DAF809162148D334E +:10C8C00009F0CAC0809164148111C6C085E08DAFA3 +:10C8D00080916314843239F08A3239F0833209F05E +:10C8E000BBC082E003C081E001C08FEF0E94652ED3 +:10C8F00080ED99E00E940A3481E699E00E940A34B2 +:10C900008DE599E00E940A340E949056ABC082E007 +:10C910008DAF80916014811121C010E0812F0E94A1 +:10C920005454811104C087E00E94FF3113C081E399 +:10C9300093E00E940A34812F0E94FC338FE293E03F +:10C940000E940A348EE594E10E9458348CE293E010 +:10C950000E940A341F5F123009F784C091117EC013 +:10C9600011E001C010E0AE01475D5F4FBE01635CA6 +:10C970007F4F8EE594E10E94D055811102C082E084 +:10C9800076C0EDAD81E08E0F8DAFF0E0E25AFB4E48 +:10C9900090819D3309F060C0112361F1482F50E070 +:10C9A000282F30E0D901A25ABB4E9C91241B350B95 +:10C9B000F901E25AFB4E90838F5F9C919111F0CF69 +:10C9C0008DAF8EE594E10E948805811149C069A56B +:10C9D0007AA58BA59CA50E9433730E94A070F1E5F7 +:10C9E0006F9FC001112440E550E06EE574E1955F52 +:10C9F00041D838C0AE014F5F5F4FBE01635C7F4FCF +:10CA00008EE594E10E94D055882309F4B8CFEDADAE +:10CA1000F0E0E25AFB4E808181111EC089A49AA4E5 +:10CA2000ABA4BCA420E030E04FE753E4C501B4015F +:10CA30000E944A72181684F0C980DA80EB80FC806C +:10CA4000C501B4010E94A070862FB701A6010E9403 +:10CA50003A2D06C085E00BC083E009C088E007C01E +:10CA6000811105C08BEB98E00E940A3494C00E94AB +:10CA7000FF3191C08332D1F43F922F928CE793E043 +:10CA80009F938F931F930F930E94F973F10101906D +:10CA90000020E9F7BF0162197309625A7B4E0F90BB +:10CAA0000F900F900F900F900F900BC0873439F0BC +:10CAB0008D3429F0803519F0833509F06CC06EE5AE +:10CAC00074E1DB018C91803511F0833509F58EEA34 +:10CAD0009CE00E94C4738D89882391F03F922F922D +:10CAE00084E893E09F938F9382EE9CE09F938F93D3 +:10CAF0000E94CB730F900F900F900F900F900F909C +:10CB000082E3EEE5F4E1DF011D928A95E9F743C087 +:10CB10008091AE04843148F088E893E09F938F932E +:10CB20000E94AF330F900F9036C00091AC04B6E670 +:10CB3000B09F80011124C8018B549B4F0E94C47385 +:10CB40008D89882391F03F922F9284E893E09F9300 +:10CB50008F9307511B4F1F930F930E94CB730F901E +:10CB60000F900F900F900F900F9082E3EEE5F4E19D +:10CB7000DF011D928A95E9F78091AC04833120F49E +:10CB80008F5F8093AC0402C01092AC048091AE041D +:10CB90008F5F8093AE04A4961FAEA497A5961FAE98 +:10CBA000A5973BC0B13009F0CECAA5961FAEA59798 +:10CBB000CACA813208F4C7CA8F3209F4C4CA88329B +:10CBC00011F18B3329F1A496EFADA497EF3438F02F +:10CBD0008BE00E94FF31A4961FAEA497B4CAA4961E +:10CBE000FFADA4972F2F30E04F2F4F5F9FE9980F95 +:10CBF000F901E25AFB4E9A3108F480528083A496E0 +:10CC00004FAFA497A0CA21E0A5962FAFA5979BCAC6 +:10CC100032E0A5963FAFA59796CA8091AE0C8823C7 +:10CC200099F08EEA9CE00E9488058093E00C62EE09 +:10CC30007CE00E94A33C81E08093E10C82E3AEEAB9 +:10CC4000BCE01D928A95E9F78091920D81113FC059 +:10CC50008091AE048823D9F18091970D8823B9F192 +:10CC60008091980D882399F10091AD04B6E6B09FAC +:10CC7000800111240B541B4FC8010E948805F80144 +:10CC800082ABF090AD04F6E6FF9D80011124B8015F +:10CC900067517B4F0B541B4FD801D2968C910E9449 +:10CCA000A33C81E0F80183AB82E3D8011D928A9511 +:10CCB000E9F7B2E1BF1520F0F394F092AD0402C0A1 +:10CCC0001092AD048091AE0481508093AE040E9416 +:10CCD000A2330E945A3980910615811190C9809122 +:10CCE000E10C882369F082EE9CE00E94583482E3D4 +:10CCF000E2EEFCE0DF011D928A95E9F71092E10C6B +:10CD000080910715882309F4E6C08091930D88234C +:10CD100009F41AC11092930D6D961CAE1DAE1EAE95 +:10CD20001FAE6D9769961CAE1DAE1EAE1FAE699705 +:10CD300065961CAE1DAE1EAE1FAE659784E16F9664 +:10CD4000EEADFFAD6F97282F11922A95E9F7A196C6 +:10CD5000AEADBFADA197E82F1D92EA95E9F7D101DD +:10CD6000E82F1D92EA95E9F7A396AEADBFADA39764 +:10CD70001D928A95E9F780E090E00E940147A9960C +:10CD80006CAF7DAF8EAF9FAFA99781E090E00E941E +:10CD90000147AD966CAF7DAF8EAF9FAFAD9782E090 +:10CDA00090E00E9401476B017C0120E030E040E010 +:10CDB0005FE3609100027091010280910202909104 +:10CDC00003020E94526F20E030E040E05FE30E94E7 +:10CDD000857220E030E044E353E40E9485729B01B9 +:10CDE000AC0160E070E084E393E40E94526F2B0199 +:10CDF0003C0120E030E044EB52E4C701B6010E9460 +:10CE0000526FFE01EF5AFF4F4F019E012B5A3F4FC9 +:10CE10005901DE01A75ABF4F6D017B018C01AD9610 +:10CE20002CAD3DAD4EAD5FADAD97A9966CAD7DAD72 +:10CE30008EAD9FADA9970E947644A401B501C601AD +:10CE40000E9468426D966CAD7DAD8EAD9FAD6D97C5 +:10CE50008E01035C1F4F24E045E0A9D569966CADB7 +:10CE60007DAD8EAD9FAD69970451110924E045E079 +:10CE70009ED565966CAD7DAD8EAD9FAD65978101FC +:10CE800024E045E094D58E010F5F1F4F24E045E07C +:10CE9000C301B2018CD51F930F933F922F92A1969D +:10CEA000FFADA197FF93A0962FADA0972F936F96FC +:10CEB0003FAD6F973F936E968FAD6E978F938AE9D4 +:10CEC00093E09F938F930E94AF330FB6F894DEBF29 +:10CED0000FBECDBF39C08091970D882309F415CFBF +:10CEE0008091980D882309F410CF04E110E082E3CB +:10CEF000B82EA090AD0CB6E6BA9DC0011124FC017D +:10CF0000EB54FB4F7F0123A9222309F4FECE9C01A1 +:10CF100027513B4F6901C9010E945834D601EB2DBE +:10CF20001D92EA95E9F7D701D3961C92B2E1BA15A2 +:10CF300028F081E08A0D8093AD0C02C01092AD0CF8 +:10CF400001501109B1F6E1CE82B301E083FB8827DD +:10CF500080F980279091B4048917D9F08AE090E095 +:10CF60000E944F3912B313FB112710F9102780913B +:10CF7000B404181771F01F921F938EEA93E09F93E9 +:10CF80008F930E94AF331093B4040F900F900F90C3 +:10CF90000F908091B0049091B104A091B204B0912F +:10CFA000B3048F3F9105A105B10509F060F4019626 +:10CFB000A11DB11D8093B0049093B104A093B2045D +:10CFC000B093B30424C01092B0041092B104109234 +:10CFD000B2041092B3048BE30E94F85411E085363A +:10CFE000910508F410E08091AF04811781F01F9241 +:10CFF0001F9389EB93E09F938F930E94AF3310931D +:10D00000AF041093990D0F900F900F900F90809197 +:10D010000715811112C08091940D882371F08091C1 +:10D02000950D882351F081EC93E09F938F930E949C +:10D03000AF331092950D0F900F9080919A0D882329 +:10D0400009F461C880910715811128C18091910D63 +:10D050008F3009F023C18091990D882309F41EC1F6 +:10D060008091140D9091150D9C012F5F3F4F3093CF +:10D07000150D2093140D45970CF445C821961CAE50 +:10D080001DAE1EAE1FAE219719A61AA61BA61CA682 +:10D090001D8A1E8A1F8A188EE0908D0DF0908E0DCD +:10D0A00000918F0D1091900D2091890D30918A0D76 +:10D0B00040918B0D50918C0D6091850D7091860D76 +:10D0C0008091870D9091880D4101FE01B9965F0115 +:10D0D000DE01DD966D010E94114380E090E00E9428 +:10D0E00001474B015C0181E090E00E9401476B0128 +:10D0F0007C0182E090E00E9401472B013C01A501E8 +:10D10000940121966CAD7DAD8EAD9FAD2197CAD6B1 +:10D110009F7720E030E040E05FE30E944A721816FB +:10D120003CF1A701960169A57AA58BA59CA5BAD665 +:10D130009F7720E030E040E05FE30E944A721816DB +:10D14000BCF0A30192016D897E898F89988DAAD642 +:10D1500020E030E044EB52E4A6D69F7720E030E0B8 +:10D1600040E05FE30E944A72181614F00C9483604A +:10D170008EE1E6E0F5E1DF011D928A95E9F70E9474 +:10D1800063340E94125D80926D0D90926E0DA0929C +:10D190006F0DB092700DC092710DD092720DE09231 +:10D1A000730DF092740D4092750D5092760D609251 +:10D1B000770D7092780D80910A1590910B15A091C2 +:10D1C0000C15B0910D158093790D90937A0DA09365 +:10D1D0007B0DB0937C0D80910E1590910F15A09151 +:10D1E0001015B091111580937D0D90937E0DA09335 +:10D1F0007F0DB093800D8091121590911315A09121 +:10D200001415B09115158093810D9093820DA09304 +:10D21000830DB093840D8CE0A396EEADFFADA39784 +:10D2200011928A95E9F78091850D9091860DA091D4 +:10D23000870DB091880D89839A83AB83BC838091DD +:10D24000890D90918A0DA0918B0DB0918C0D8D83DD +:10D250009E83AF83B88780918D0D90918E0DA091A4 +:10D260008F0DB091900D89879A87AB87BC87AE01EF +:10D27000475F5F4FBE016B5F7F4FCE0101960E94FB +:10D28000684200E020E030E048E452E4BE016F5F15 +:10D290007F4F80E00E94BA560C9483601092150D67 +:10D2A0001092140D0C948360CF930E94A233C9E2B4 +:10D2B0000E945A3980910615811111C08091A513E1 +:10D2C0009091A613981739F0C89FC00111248D536F +:10D2D0009F4E892B69F780910715883049F3CF91CC +:10D2E0000895CF93209151153091521540915315C7 +:10D2F0005091541560917415709175158091761543 +:10D3000090917715A9D6811126C02091551530919D +:10D310005615409157155091581560917815709198 +:10D32000791580917A1590917B1596D6811113C04D +:10D33000C1E02091591530915A1540915B155091DB +:10D340005C1560917C1570917D1580917E15909192 +:10D350007F1582D68111C0E08C2FCF910895CF9296 +:10D36000DF92EF92FF920F93CF93DF9330910715E7 +:10D37000323009F482C0C02FD22F042F6B017C0100 +:10D3800093DF10922215109204158091F41487FDFA +:10D3900003C080E180930415DD2331F090910415E2 +:10D3A00080E189278093041589B1807190910415DB +:10D3B000891751F09FB7F89480910515806180938B +:10D3C00005159FBF0E945A3980910615811155C0DD +:10D3D000A701960161E575E181E00E94BA5681E0FE +:10D3E0008093B6149FB7F8948091B51482608093AF +:10D3F000B5149FBF0E945A398091061581113DC016 +:10D40000809107158111F6CF8091B6148130A9F46F +:10D41000CC2351F08CE0EAE0F5E1A6E1B5E1019022 +:10D420000D928A95E1F70CC09FB7F894809105158D +:10D430008061809305159FBF03C081E08093221512 +:10D440001092B6140E945A3980910615811115C0A8 +:10D450000E9459520E9474340E9463346AE075E15C +:10D4600081E595E10E94D448DF91CF910F91FF9023 +:10D47000EF90DF90CF900C941834DF91CF910F9103 +:10D48000FF90EF90DF90CF9008952F923F924F92B0 +:10D490005F926F927F928F929F92AF92BF92CF9244 +:10D4A000DF92EF92FF920F931F93CF93DF93CDB74D +:10D4B000DEB7E1970FB6F894DEBF0FBECDBF6D8328 +:10D4C0007E838F8398872F87388B498B5A8B0D8B60 +:10D4D000AD868B8A24E0E29E80011124C8018C581D +:10D4E0009A4E9F8B8E8BD801AD5CBA4EB98FA88FA8 +:10D4F0008D909D90AD90BC90FC0120813181428146 +:10D500005381C501B401CFD46A8F7B8F8C8F9D8FDF +:10D51000F4E0CF9E1001112491012C583A4E3F8F18 +:10D520002E8FC1018D5C9A4E99A388A3DC01CD900A +:10D53000DD90ED90FC90F901208131814281538191 +:10D54000C701B601B0D46AA37BA38CA39DA3240119 +:10D55000350177FA709477F87094D701C601B05806 +:10D5600089839A83AB83BC83F801EF5AFA4E2A8DE4 +:10D570003B8D4C8D5D8D608171818281938192D4D0 +:10D580004B015C01F101EF5AFA4E2AA13BA14CA1DB +:10D590005DA1608171818281938184D46B017C0162 +:10D5A000A5019401C301B201B0D769877A878B873F +:10D5B0009C87A701960169817A818B819C81A5D77F +:10D5C0009B01AC0169857A858B859C856CD46987C4 +:10D5D0007A878B879C87A7019601C301B20195D7F3 +:10D5E0006B017C01A501940169817A818B819C8109 +:10D5F0008CD79B01AC01C701B60154D429853A856B +:10D600004B855C85C3D46B017C019B89992389F090 +:10D610002DEB37E346E055EBC701B6013BD787FD5D +:10D620001AC02BED3FE049EC50E4C701B6013AD4F3 +:10D6300010C02DEB37E346E055E3C701B6010CD52A +:10D6400018164CF02BED3FE049EC50E4C701B60151 +:10D650002AD46B017C018090F0149090F114A0907A +:10D66000F214B090F3142D813E814F815885CA0188 +:10D67000B90119D4A501940115D4A501940145D788 +:10D68000B1D74B015C0120E030E040E05FE3C7012F +:10D69000B6013BD72D813E814F81588536D79F7784 +:10D6A000A5019401E0D4B5D54BD57C8B6B8BDB0108 +:10D6B000AB2B09F459C14B01A12CB12CBD89BB2363 +:10D6C00071F0C501B40168D59B01AC016F85788903 +:10D6D00089899A891AD76F87788B898B9A8BC5012C +:10D6E000B4015AD54B015C019B01AC01C701B601E5 +:10D6F000BAD46D837E838F839887FD85E4E0FE9F97 +:10D70000C00111249C012C583A4E3E872D87FC0104 +:10D71000EF5AFA4ED9012D913D914D915C91608166 +:10D72000718182819381BED3A50194019CD46EA79F +:10D730007FA788AB99AB2D813E814F815885CA0167 +:10D74000B901E3D69B01AC0160E070E080E090E4B9 +:10D75000A9D36B017C012BEA3AEA4AE25EE36D81D0 +:10D760007E818F819885D1D64B015C0120E030E02D +:10D7700040E850E4C701B60196D39B01AC01C50156 +:10D78000B401C3D669877A878B879C8720E030E015 +:10D7900040E05FE3C701B601B8D66EA37FA388A7B8 +:10D7A00099A710E022242394312CEB89FC89E215FF +:10D7B000F30509F4D9C01C3008F03AC029813A8138 +:10D7C0004B815C816EA17FA188A599A59ED66B0136 +:10D7D0007C01A301920169857A858B859C8595D60C +:10D7E000A701960160D37B01082FD92EA3019201D6 +:10D7F0006EA17FA188A599A588D64B015C012981DE +:10D800003A814B815C8169857A858B859C857DD643 +:10D810009B01AC01C501B40145D32B013C011F5F45 +:10D82000C701A02FBD2D89839A83AB83BC835BC0C6 +:10D83000B10180E090E0B0D42D813E814F815885C8 +:10D8400064D66B017C010CD469837A838B839C83BF +:10D85000C701B601BDD64B015C01E88DF98DC080D2 +:10D86000D180E280F380F7FAF094F7F8F094A8A161 +:10D87000B9A18D919D910D90BC91A02D8AA79BA7D8 +:10D88000ACA7BDA7A701960169817A818B819C8194 +:10D890003CD62B013C012AA53BA54CA55DA5C501A5 +:10D8A000B40133D69B01AC01C301B201FCD22B0100 +:10D8B0003C01A7019601C501B40127D66B017C018B +:10D8C0002AA53BA54CA55DA569817A818B819C81A8 +:10D8D0001CD69B01AC01C701B601E4D269837A83EF +:10D8E0008B839C8310E0A30192016A8D7B8D8C8DCC +:10D8F0009D8DD9D2EE89FF89608371838283938362 +:10D9000029813A814B815C816AA17BA18CA19DA177 +:10D91000CAD2AE8DBF8D6D937D938D939C931397DB +:10D920002EA53FA548A959A9ED85FE856081718185 +:10D9300082819381B8D2AD85BE856D937D938D93A1 +:10D940009C9313970D892F85388949895A8964E7F3 +:10D9500075E181E00E94BA568091061581110EC0D2 +:10D96000BFEF2B1A3B0A21CF0D892F8538894989B2 +:10D970005A8961E575E181E00E94BA56E1960FB6D9 +:10D98000F894DEBF0FBECDBFDF91CF911F910F91F5 +:10D99000FF90EF90DF90CF90BF90AF909F908F90CF +:10D9A0007F906F905F904F903F902F900895EF92EF +:10D9B0000F931F93CF93DF93E80147FD02C034E03C +:10D9C00001C034E1042E000C550B57FF03C05195E4 +:10D9D00041955109E32E022F242FAE0107D0CE012D +:10D9E000DF91CF911F910F91EF9008958F929F92A9 +:10D9F000AF92BF92CF92DF92EF92FF920F931F935D +:10DA0000CF93DF93CDB7DEB729970FB6F894DEBF7B +:10DA10000FBECDBF6A01122FB02E2BE3201720F0CE +:10DA2000FF24F394F00E02C02CE3F22E0F2D27E01A +:10DA3000AE014F5F5F4F50D1BC014981842F897087 +:10DA4000813031F0E1FC06C0E0FE06C090E205C086 +:10DA50009DE203C09BE201C090E05E2D507143FF48 +:10DA60003CC0911102C083E001C084E0811718F42A +:10DA7000212F281B01C020E051110BC0F601822F7D +:10DA800030E2882319F031938150FBCFC20ED11CB4 +:10DA900020E0992329F0D6019C93F60131966F017D +:10DAA000C6010396E2FE0AC03EE4D6013C9341E47F +:10DAB00011964C93119712963C9306C03EE6F601E0 +:10DAC000308341E641833283FC01322F40E233232D +:10DAD00009F442C041933150FACF42FF44C0911142 +:10DAE00002C083E001C084E0811718F4212F281BB5 +:10DAF00001C020E051110BC0F601822F30E28823D3 +:10DB000019F031938150FBCFC20ED11C20E0992334 +:10DB100029F0D6019C93F60131966F01C601039658 +:10DB2000E2FE0BC039E4D6013C933EE411963C93EF +:10DB3000119736E412963C9307C039E6F60130831C +:10DB40003EE6318336E63283FC01322F40E2332356 +:10DB500019F041933150FBCFFC01E20FF11D10820F +:10DB60008EEF9FEFA6C021E030E0911102C020E0CF +:10DB700030E0161617061CF4FB01319602C0E1E0F6 +:10DB8000F0E02E0F3F1FBB2021F0EB2DF0E031968F +:10DB900002C0E0E0F0E02E0F3F1FE12FF0E02E1773 +:10DBA0003F071CF4121B212F01C020E08E2D88712D +:10DBB00059F4F601822F30E2882319F03193815015 +:10DBC000FBCFC20ED11C20E0992329F0D6019C93F3 +:10DBD000F60131966F0151110BC0F601822F90E3CF +:10DBE000882319F091938150FBCFC20ED11C20E005 +:10DBF0000F2D060F9A81342F307144FF03C09133EB +:10DC000009F40150101624F4093018F008E001C09E +:10DC100001E0AB0177FF02C040E050E0FB01E41BF4 +:10DC2000F50BA1E0B0E0AC0FBD1FEA0FFB1F8EE2C9 +:10DC3000A82E4B01801A91080B2D10E0119501952B +:10DC400011094F3FBFEF5B0721F4D601AC9211964B +:10DC50006D01641775072CF08416950614F4818104 +:10DC600001C080E3415051093196D60111967D01E2 +:10DC70004017510724F0D6018C936701E2CF641757 +:10DC8000750739F4963320F4953319F4311101C036 +:10DC900081E3F6018083F701822F90E2882319F057 +:10DCA00091938150FBCFF701E20FF11D108280E0CC +:10DCB00090E029960FB6F894DEBF0FBECDBFDF917E +:10DCC000CF911F910F91FF90EF90DF90CF90BF9079 +:10DCD000AF909F908F900895283008F027E0332769 +:10DCE000DA01990F311D87FD91600096610571057C +:10DCF00039F432602E5F3D9330E32A95E1F70895C1 +:10DD00009F3F30F080387105610509F03C5F3C5F52 +:10DD10003D93913008F08068911DDF93CF931F935E +:10DD20000F93FF92EF92192F987F9695E92F969572 +:10DD30009695E90FFF27EA59FD4F99273327EE24DF +:10DD4000FF24A701E70105900894079428F4360FF3 +:10DD5000E71EF81E491F511D660F771F881F991F68 +:10DD60000694A1F70590079428F4E70EF81E491FC2 +:10DD7000561FC11D770F881F991F661F0694A1F7B4 +:10DD80000590079428F4F80E491F561FC71FD11D90 +:10DD9000880F991F661F771F0694A1F705900794B7 +:10DDA00020F4490F561FC71FD81F990F661F771FF2 +:10DDB000881F0694A9F784911095177041F0D695A5 +:10DDC000C79557954795F794E7941A95C1F7ECE0F6 +:10DDD000F2E06894159015913591659195910590B3 +:10DDE0007FE27395E118F10A430B560BC90BD0097A +:10DDF000C0F7E10CF11E431F561FC91FD01D7EF452 +:10DE0000703311F48A95E6CFE894015030F0080F92 +:10DE10000AF40027021708F4202F2395022F7A33E3 +:10DE200028F079E37D932A95E9F710C07D932A9530 +:10DE300089F6069497956795379517951794E11885 +:10DE4000F10A430B560BC90BD00998F023957E912C +:10DE500073957A3308F070E37C932013B8F77E91C2 +:10DE600070617D9330F0839571E37D9370E32A9523 +:10DE7000E1F71124EF90FF900F911F91CF91DF9167 +:10DE8000992787FD909508959F939F77D5D10F90FF +:10DE900000203AF49058A2EA2AED3FE049E450E429 +:10DEA00013D096C25058BB27AA270ED091C25AD27F +:10DEB00030F05FD220F031F49F3F11F41EF42AC2FB +:10DEC0000EF4E095E7FBF7C1E92FA4D280F3BA176F +:10DED000620773078407950718F071F49EF5D3C2A3 +:10DEE0000EF4E0950B2EBA2FA02D0B01B901900175 +:10DEF0000C01CA01A0011124FF27591B99F0593FB9 +:10DF000050F4503E68F11A16F040A22F232F342F00 +:10DF10004427585FF3CF469537952795A795F0404E +:10DF20005395C9F77EF41F16BA0B620B730B840B63 +:10DF3000BAF09150A1F0FF0FBB1F661F771F881F1B +:10DF4000C2F70EC0BA0F621F731F841F48F4879573 +:10DF500077956795B795F7959E3F08F0B3CF939562 +:10DF6000880F08F09927EE0F979587950895FAD1B5 +:10DF700058F080E891E009F49EEFFBD128F040E8EA +:10DF800051E059F45EEF09C0C5C17DC2E92FE078C8 +:10DF900041D268F3092E052AC1F32617370748072F +:10DFA000590738F00E2E07F8E02569F0E025E06407 +:10DFB0000AC0EF6307F8009407FADB01B9019D017D +:10DFC000DC01CA01AD01EF935DD002D20AD05F91AE +:10DFD000552331F02BED3FE049E450FD49EC63CF90 +:10DFE0000895DF93DD27B92FBF7740E85FE316166A +:10DFF000170648075B0710F4D92F50D29F938F93D1 +:10E000007F936F932DD3E8E9F1E087D1E1D12F9190 +:10E010003F914F915F9185D2DD2349F09058A2EA5C +:10E020002AED3FE049EC5FE3D0785D274DDFDF91DB +:10E03000CFC112D280F09F3740F491110EF424C268 +:10E0400060E070E080E89FE3089526F01B16611DF4 +:10E05000711D811D36C150C10AD108F481E00895B7 +:10E0600090D1E395C6C10CD0B3C183D140F07AD131 +:10E0700030F021F45F3F19F01EC1511105C24AC1B1 +:10E08000C9D198F39923C9F35523B1F3951B550BC7 +:10E09000BB27AA2762177307840738F09F5F5F4F7B +:10E0A000220F331F441FAA1FA9F333D00E2E3AF0BC +:10E0B000E0E830D091505040E695001CCAF729D0D6 +:10E0C000FE2F27D0660F771F881FBB1F2617370725 +:10E0D0004807AB07B0E809F0BB0B802DBF01FF2755 +:10E0E00093585F4F2AF09E3F510568F0E4C0CCC1C1 +:10E0F0005F3FECF3983EDCF3869577956795B7958F +:10E10000F7959F5FC9F7880F911D9695879597F9A9 +:10E110000895E1E0660F771F881FBB1F6217730722 +:10E120008407BA0720F0621B730B840BBA0BEE1F37 +:10E1300088F7E095089504D06894B111A5C10895B9 +:10E1400071D188F09F5790F0B92F9927B751A0F05F +:10E15000D1F0660F771F881F991F1AF0BA95C9F77B +:10E1600012C0B13081F08FD1B1E008958CC1672F1A +:10E17000782F8827B85F39F0B93FCCF3869577952B +:10E180006795B395D9F73EF4909580957095619514 +:10E190007F4F8F4F9F4F0895E89409C097FB3EF43F +:10E1A00090958095709561957F4F8F4F9F4F9923E4 +:10E1B000A9F0F92F96E9BB279395F6958795779562 +:10E1C0006795B795F111F8CFFAF4BB0F11F460FF22 +:10E1D0001BC06F5F7F4F8F4F9F4F16C0882311F07A +:10E1E00096E911C0772321F09EE8872F762F05C08E +:10E1F000662371F096E8862F70E060E02AF09A9529 +:10E20000660F771F881FDAF7880F9695879597F91D +:10E21000089522D180F09F3740F491110EF034C15F +:10E2200060E070E080E89FEB089526F41B16611D06 +:10E23000711D811D46C060C0DF93CF931F930F9364 +:10E240008B01EC01E5ECF1E068D0C2D09801AE01A1 +:10E250008B01EC0160E070E080E89FE323DEC2D137 +:10E260009801AE010F911F91CF91DF915AC1990F83 +:10E270000008550FAA0BE0E8FEEF16161706E80790 +:10E28000F907C0F012161306E407F50798F0621BB1 +:10E29000730B840B950B39F40A2661F0232B242B86 +:10E2A000252B21F408950A2609F4A140A6958FEFA5 +:10E2B000811D811D089597F99F6780E870E060E0F7 +:10E2C0000895882371F4772321F09850872B762FB7 +:10E2D00007C0662311F499270DC09051862B70E07A +:10E2E00060E02AF09A95660F771F881FDAF7880F8B +:10E2F0009695879597F908959F3F31F0915020F4B6 +:10E30000879577956795B795880F911D9695879511 +:10E3100097F908959FEF80EC0895DF93CF931F93B3 +:10E320000F93FF92EF92DF927B018C01689405C0FE +:10E33000DA2EEF01F6D0FE01E894A59125913591F2 +:10E3400045915591AEF3EF01BFDDFE019701A801A4 +:10E35000DA9479F7DF90EF90FF900F911F91CF91B2 +:10E36000DF91089500240A94161617061806090668 +:10E37000089500240A94121613061406050608953B +:10E38000C9CF50D0E8F3E894E0E0BB279F57F0F006 +:10E390002AED3FE049EC06C0EE0FBB0F661F771F6A +:10E3A000881F28F0B23A62077307840728F0B25A30 +:10E3B000620B730B840BE3959A9572F7803830F4F7 +:10E3C0009A95BB0F661F771F881FD2F7904896CF8C +:10E3D000092E0394000C11F4882352F0BB0F40F473 +:10E3E000BF2B11F460FF04C06F5F7F4F8F4F9F4FB3 +:10E3F0000895EF93E0FF06C0A2EA2AED3FE049EC62 +:10E400005FEB62DDE5DF0F90039401FC9058EDEEC9 +:10E41000F1E03BC157FD9058440F551F59F05F3F45 +:10E4200071F04795880F97FB991F61F09F3F79F036 +:10E4300087950895121613061406551FF2CF4695B8 +:10E44000F1DF08C0161617061806991FF1CF86953A +:10E450007105610508940895E5DFA0F0BEE7B917DE +:10E4600088F4BB279F3860F41616B11D672F782FEC +:10E470008827985FF7CF869577956795B11D939517 +:10E480009639C8F30895E894BB2766277727CB0110 +:10E4900097F90895ECDE08F48FEF08959B01AC0125 +:10E4A00060E070E080E89FE3DECDBCDF58F19E576E +:10E4B00058F19851A0F0E9F0983020F5092E9927ED +:10E4C000660F771F881F991F0A94D1F712C0062E76 +:10E4D000672F782F8827985F11F4000C07C0993FA9 +:10E4E000B4F38695779567959395D9F7611D711D5E +:10E4F000811D3EF490958095709561957F4F8F4F6B +:10E500009F4F08956894C0CFBECF0BD061CF2ADF54 +:10E5100028F02FDF18F0952309F0CDCEFBCE112483 +:10E52000B3CF78DFA0F3959FD1F3950F50E0551F3F +:10E53000629FF001729FBB27F00DB11D639FAA2758 +:10E54000F00DB11DAA1F649F6627B00DA11D661FA7 +:10E55000829F2227B00DA11D621F739FB00DA11DC8 +:10E56000621F839FA00D611D221F749F3327A00D82 +:10E57000611D231F849F600D211D822F762F6A2F1E +:10E5800011249F5750408AF0E1F088234AF0EE0FA3 +:10E59000FF1FBB1F661F771F881F91505040A9F7B0 +:10E5A0009E3F510570F087CE6FCF5F3FECF3983EF2 +:10E5B000DCF3869577956795B795F795E7959F5F17 +:10E5C000C1F7FE2B880F911D9695879597F90895B1 +:10E5D0009F93D7DE0F9007FCEE5F0BCF11F40EF484 +:10E5E00099CE8ACE1FDFD0F39923D9F3CEF39F576C +:10E5F000550B87FF43D00024A0E640EA90018058E5 +:10E600005695979528F4805C660F771F881F20F039 +:10E6100026173707480730F4621B730B840B202939 +:10E6200031294A2BA69517940794202531254A278E +:10E6300058F7660F771F881F20F0261737074807FF +:10E6400030F4620B730B840B200D311D411DA0951E +:10E6500081F7B901842F9158880F96958795089571 +:10E660009B01AC0152CFF8DE20F09F3708F40CCFAD +:10E6700028CE42CEFCDD880B990B08959150504076 +:10E68000660F771F881FD2F708959F938F937F930C +:10E690006F93FF93EF939B01AC0137DFEF91FF91F5 +:10E6A0003CDE2F913F914F915F912FCF991B79E0E5 +:10E6B00004C0991F961708F0961B881F7A95C9F712 +:10E6C00080950895AA1BBB1B51E107C0AA1FBB1F61 +:10E6D000A617B70710F0A61BB70B881F991F5A95EE +:10E6E000A9F780959095BC01CD010895A1E21A2E5D +:10E6F000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1FE6 +:10E70000A217B307E407F50720F0A21BB30BE40B35 +:10E71000F50B661F771F881F991F1A9469F760957C +:10E720007095809590959B01AC01BD01CF01089536 +:10E73000EE0FFF1F881F8BBF0790F691E02D1994F5 +:10E74000A29FB001B39FC001A39F700D811D112432 +:10E75000911DB29F700D811D1124911D0895F0DF50 +:10E76000A59F900DB49F900DA49F800D911D112425 +:10E770000895FB01DC010D900020E9F7119701904D +:10E780000D920020E1F70895FB01DC0101900D924C +:10E790000020E1F708950F931F93CF93DF93CDB738 +:10E7A000DEB72E970FB6F894DEBF0FBECDBF0E8931 +:10E7B0001F8986E08C831A8309838FEF9FE79E83EE +:10E7C0008D83AE01465E5F4F688D798DCE010196D7 +:10E7D00059D0EF81F885E00FF11F10822E960FB609 +:10E7E000F894DEBF0FBECDBFDF91CF911F910F9187 +:10E7F0000895CF93DF93CDB7DEB72E970FB6F89479 +:10E80000DEBF0FBECDBF85E08C838C899D899A8346 +:10E810008983AE01485E5F4F6E897F89CE01019684 +:10E82000E0D32E960FB6F894DEBF0FBECDBFDF91BA +:10E83000CF9108950F931F93CF93DF93CDB7DEB79A +:10E840002E970FB6F894DEBF0FBECDBF8C0186E0C9 +:10E850008C831A8309838FEF9FE79E838D83CE017C +:10E86000019610D0EF81F885E00FF11F10822E96EF +:10E870000FB6F894DEBF0FBECDBFDF91CF911F91D1 +:10E880000F9108952F923F924F925F926F927F92D5 +:10E890008F929F92AF92BF92CF92DF92EF92FF92B0 +:10E8A0000F931F93CF93DF93CDB7DEB72B970FB6A0 +:10E8B000F894DEBF0FBECDBF6C017B018A01FC0165 +:10E8C00017821682838181FFBFC1CE0101963C0170 +:10E8D000F6019381F70193FD859193FF81917F016B +:10E8E000882309F4ADC1853239F493FD859193FFF6 +:10E8F00081917F01853221F4B60190E0F0D4E8CF18 +:10E90000912C212C312CFFE1F315D8F08B3279F0CA +:10E9100038F4803279F08332A1F4232D20611DC0B8 +:10E920008D3261F0803369F4232D216016C0832D70 +:10E930008260382EE32DE4603E2E2AC0F32DF8606D +:10E940001DC037FC2DC020ED280F2A3040F08E323C +:10E95000B9F436FC75C1232D2064322E19C036FE61 +:10E9600006C08AE0989E200D1124922E11C0EAE084 +:10E970002E9E200D1124222EF32DF0623F2E08C072 +:10E980008C3621F4832D8068382E02C0883641F4FD +:10E99000F70193FD859193FF81917F018111B3CFA1 +:10E9A000982F9F7D9554933028F40C5F1F4F9FE361 +:10E9B00099830DC0833631F0833771F0833509F0C8 +:10E9C00055C020C0F801808189830E5F1F4F8824C5 +:10E9D0008394912C530112C02801F2E04F0E511C78 +:10E9E000F801A080B18036FE03C0692D70E002C03E +:10E9F0006FEF7FEFC5012AD44C018201F32DFF7721 +:10EA00003F2E15C0280122E0420E511CF801A080C3 +:10EA1000B18036FE03C0692D70E002C06FEF7FEF5A +:10EA2000C50109D44C01F32DF0683F2E820133FC5F +:10EA300019C0822D90E088169906A0F4B60180E2F4 +:10EA400090E04DD42A94F5CFF50137FC859137FE3F +:10EA500081915F01B60190E042D421102A9421E017 +:10EA6000821A91088114910479F7E1C0843611F07B +:10EA7000893639F5F80137FE07C0608171818281DE +:10EA800093810C5F1F4F08C060817181072E000CBD +:10EA9000880B990B0E5F1F4FF32DFF763F2E97FFCC +:10EAA00009C090958095709561957F4F8F4F9F4FCE +:10EAB000F0683F2E2AE030E0A30166D4882E861845 +:10EAC00044C0853731F4232D2F7EB22E2AE030E06A +:10EAD00025C0932D997FB92E8F36C1F018F4883553 +:10EAE00079F0AEC0803719F0883721F0A9C0E92F3E +:10EAF000E061BE2EB4FE0DC0FB2DF460BF2E09C038 +:10EB000034FE0AC0292F2660B22E06C028E030E06D +:10EB100005C020E130E002C020E132E0F801B7FE9C +:10EB200007C060817181828193810C5F1F4F06C095 +:10EB30006081718180E090E00E5F1F4FA30124D4BB +:10EB4000882E8618FB2DFF773F2E36FE0DC0232D15 +:10EB50002E7FA22E891458F434FE0BC032FC09C05B +:10EB6000832D8E7EA82E05C0B82CA32C03C0B82CF4 +:10EB700001C0B92CA4FE0FC0FE01E80DF11D80817B +:10EB8000803321F49A2D997EA92E09C0A2FE06C0D9 +:10EB9000B394B39404C08A2D867809F0B394A3FC8F +:10EBA00010C0A0FE06C0B21480F4280C922C9B1852 +:10EBB0000DC0B21458F4B60180E290E090D3B39443 +:10EBC000F8CFB21418F42B1802C0982C212CA4FEF4 +:10EBD0000FC0B60180E390E082D3A2FE16C0A1FC74 +:10EBE00003C088E790E002C088E590E0B6010CC061 +:10EBF0008A2D867851F0A1FE02C08BE201C080E22E +:10EC0000A7FC8DE2B60190E06AD3891430F4B60116 +:10EC100080E390E064D39A94F8CF8A94F301E80DEE +:10EC2000F11D8081B60190E05AD38110F6CF2220E9 +:10EC300009F44ECEB60180E290E051D32A94F7CF8A +:10EC4000F6018681978102C08FEF9FEF2B960FB65A +:10EC5000F894DEBF0FBECDBFDF91CF911F910F9112 +:10EC6000FF90EF90DF90CF90BF90AF909F908F90EC +:10EC70007F906F905F904F903F902F90089520FD70 +:10EC800009C0FC0123FD05C022FF02C0738362831B +:10EC900051834083089544FD17C046FD17C0AB0162 +:10ECA000BC01DA01FB01AA0FBB1FEE1FFF1F10946E +:10ECB000D1F74A0F5B1F6E1F7F1FCB01BA01660F92 +:10ECC000771F881F991F09C033E001C034E0660F29 +:10ECD000771F881F991F3150D1F7620F711D811D59 +:10ECE000911D08950F931F93CF93DF938C01C8015B +:10ECF000B8D2EC0197FD06C08BD2892BC1F7B801C1 +:10ED0000CE0129D3CE01DF91CF911F910F910895AC +:10ED10008F929F92AF92BF92EF92FF920F931F93A9 +:10ED2000CF93DF938C01D62F7A01B22E9AD29C0119 +:10ED300033272B32310531F02D32310559F48B2D2B +:10ED40008068B82ED15011F480E061C0C80189D22A +:10ED500097FDFACFCB2DCD7F2B2D2073F9F4803387 +:10ED6000E9F4AA24AA94AD0E09F43EC0C80179D2F0 +:10ED700097FD3AC09C012F7D33272835310541F49A +:10ED8000C264D25089F1C8016CD297FF07C02CC071 +:10ED9000B6FE02C0C26001C0C261DA2D812C912C86 +:10EDA000540120ED280F283078F0C4FF03C0B801CB +:10EDB000D2D217C02A3040F0C6FFF9CF2F7D3FEEE8 +:10EDC000320F3630A0F727504C2FC501B40163DF56 +:10EDD0004B015C01C260D15051F0C80142D297FF93 +:10EDE000E0CFC1FD04C0B0CF812C912C5401C7FFEE +:10EDF00008C0B094A09490948094811C911CA11C94 +:10EE0000B11C2C2FB501A401C70139DF81E0DF91CE +:10EE1000CF911F910F91FF90EF90BF90AF909F9077 +:10EE20008F9008955F926F927F928F929F92AF9290 +:10EE3000BF92CF92DF92EF92FF920F931F93CF93E7 +:10EE4000DF93CDB7DEB7A0970FB6F894DEBF0FBE45 +:10EE5000CDBF5C01962E7A01F9018E010F5F1F4F25 +:10EE6000680180E2D8011D928A95E9F7D5011396D1 +:10EE70008C9080E090E0612C712C30E061E070E0DB +:10EE800083FC259183FE21918F01522E211103C015 +:10EE900080E090E090C02E3511F4009751F1432F9F +:10EEA00050E0481759073CF42D3559F12D3219F42B +:10EEB000772009F103C0772009F468C0452D4695F5 +:10EEC00046954695D601A40FB11D452D47708B017F +:10EED00002C0000F111F4A95E2F7A8015C91452B73 +:10EEE0004C93651459F0561410F45394E7CF5A9488 +:10EEF000E5CF31E004C07724739401C0712C0196F2 +:10EF0000BFCF772019F08E8180628E83311103C0CC +:10EF10008824839417C0F6019E012F5D3F4F8081A6 +:10EF2000809581932E173F07D1F7F2CFE114F104BA +:10EF300029F0D7018C93F70131967F019A94812CA7 +:10EF40009920E9F0C5018DD197FD17C0FC01FF277D +:10EF500023E0F595E7952A95E1F7EC0DFD1D20815D +:10EF600030E0AC014770552702C0359527954A958A +:10EF7000E2F720FDDBCFB501EED1811089CFE1149E +:10EF8000F10411F0D7011C92C80115C0422F46951B +:10EF900046954695D601A40FB11D422F47708B01AF +:10EFA00002C0000F111F4A95E2F7A8015C91452BA2 +:10EFB0004C93622EA4CFA0960FB6F894DEBF0FBE7E +:10EFC000CDBFDF91CF911F910F91FF90EF90DF9018 +:10EFD000CF90BF90AF909F908F907F906F905F90F9 +:10EFE00008955F926F927F928F929F92AF92BF929D +:10EFF000CF92DF92EF92FF920F931F93CF93DF9305 +:10F000006C01EB015A01FC0117821682512CF601AA +:10F01000E380FE01E3FC8591E3FE8191182FEF016F +:10F02000882309F4E0C090E0F3D0892B19F0C601E1 +:10F0300059DEEDCF153241F4FE01E3FC1591E3FEFC +:10F040001191EF01153271F4C6010BD197FDC9C0C2 +:10F05000412F50E09C01332724173507C1F2B60138 +:10F060007AD1C1C01A3239F4E3FC1591E3FE119153 +:10F07000EF0101E001C000E0F12C20ED210F2A306A +:10F0800078F402606F2D70E080E090E040E203DEF3 +:10F09000F62EFE01E3FC1591E3FE1191EF01EDCF99 +:10F0A00001FF03C0F11003C09EC0FF24FA9418367C +:10F0B00019F01C3651F010C0FE01E3FC1591E3FE7F +:10F0C0001191EF01183641F408600460FE01E3FC81 +:10F0D0001591E3FE1191EF01112309F484C0612F12 +:10F0E00070E086E093E09CD0892B09F47CC000FDA1 +:10F0F00007C0F50180809180C50102965C0102C0C5 +:10F10000812C912C1E3649F4F6014681578160E02E +:10F1100070E0202FC401B3DD7ACF1336A1F401FDD6 +:10F1200002C0FF24F394C6019CD097FD5AC08114FD +:10F13000910429F0F4018083C40101964C01FA94F2 +:10F14000F110F1CF4AC01B3551F49E01A4016F2D7F +:10F15000C60168DEEC01892B09F03FC039C0C60149 +:10F16000C1DD97FD3EC01F3649F128F4143621F168 +:10F17000193639F125C0133771F01537E9F020C081 +:10F180008114910429F0F4016082C40101964C01BC +:10F19000FA94FF2059F0C60164D03C0197FD06C0E7 +:10F1A00037D0892B69F3B601C301D5D081149104FE +:10F1B000A1F0F401108211C0006203C0006101C01F +:10F1C0000064202FA4016F2DC601A2DD811105C0AE +:10F1D000F6018381807329F406C000FD18CF539493 +:10F1E00016CF552019F0852D90E002C08FEF9FEFCC +:10F1F000DF91CF911F910F91FF90EF90DF90CF9013 +:10F20000BF90AF909F908F907F906F905F90089588 +:10F21000911118C1803219F089508550D0F70895A6 +:10F22000FC010590061621F00020D9F7C0010895D1 +:10F230003197CF010895FC01059061507040011095 +:10F24000D8F7809590958E0F9F1F0895FC0161500F +:10F25000704001900110D8F7809590958E0F9F1FF8 +:10F260000895CF93DF93EC012B8120FF33C026FF5D +:10F270000AC02F7B2B838E819F8101969F838E8373 +:10F280008A8190E029C022FF0FC0E881F981808146 +:10F29000082E000C990B009719F420622B831AC0DA +:10F2A0003196F983E8830EC0EA85FB85199597FFAF +:10F2B00009C02B81019611F080E201C080E1822B10 +:10F2C0008B8308C02E813F812F5F3F4F3F832E836A +:10F2D000992702C08FEF9FEFDF91CF9108950F9391 +:10F2E0001F93CF93DF93FB01238121FD03C08FEF99 +:10F2F0009FEF2CC022FF16C04681578124813581A3 +:10F300004217530744F4A081B1819D012F5F3F4F05 +:10F31000318320838C93268137812F5F3F4F378342 +:10F32000268314C08B01EC01FB010084F185E02DE4 +:10F330001995892BE1F6D80116968D919C91179716 +:10F34000019617969C938E931697CE01DF91CF91DD +:10F350001F910F910895FB01238120FF12C026FD0C +:10F3600010C08F3F3FEF930761F082832F7D2064B1 +:10F3700023832681378121503109378326839927BA +:10F3800008958FEF9FEF0895FA01AA27283051F1D1 +:10F39000203181F1E8946F936E7F6E5F7F4F8F4FC6 +:10F3A0009F4FAF4FB1E03ED0B4E03CD0670F781F25 +:10F3B000891F9A1FA11D680F791F8A1F911DA11D0A +:10F3C0006A0F711D811D911DA11D20D009F4689443 +:10F3D0003F912AE0269F11243019305D3193DEF6EB +:10F3E000CF010895462F4770405D4193B3E00FD0A1 +:10F3F000C9F7F6CF462F4F70405D4A3318F0495D8C +:10F4000031FD4052419302D0A9F7EACFB4E0A6956E +:10F410009795879577956795BA95C9F70097610590 +:10F42000710508959B01AC010A2E069457954795E6 +:10F4300037952795BA95C9F7620F731F841F951FDB +:0EF44000A01D0895992788270895F894FFCFFE +:10F44E00AE47C13F08020000000000000073736366 +:10F45E00616E662025640D0A0053255B302D392D13 +:10F46E002B2E5D52255B302D392D2B2E5D48255BC5 +:10F47E00302D392D2B2E5D46255B302D392D2B2E23 +:10F48E005D004E256456255B302D392D2B2E5D46A5 +:10F49E00255B302D392D2B2E5D0058255B302D39F7 +:10F4AE002D2B2E5D59255B302D392D2B2E5D5A259A +:10F4BE005B302D392D2B2E5D46255B302D392D2BB6 +:10F4CE002E5D0042255B302D392D2B2E5D4C255B9C +:10F4DE00302D392D2B2E5D52255B302D392D2B2EB7 +:10F4EE005D46255B302D392D2B2E5D002042257378 +:10F4FE00204C2573205225730A007541726D3350CE +:10F50E006C7573002025730A0056342E352E30008C +:10F51E0056342E302E3400205625730A00205825DE +:10F52E007320592573205A25730A00205325732002 +:10F53E00522573204825730A004E2564002042256B +:10F54E0064204C2564205225640A00616E676C6548 +:10F55E00206F66667365743A25730D0A00646576CE +:10F56E00696365206E616D65203A2025730D0A0072 +:10F57E00736F667420766572203A2025730D0A002B +:10F58E0061706920766572203A2025730D0A007726 +:10F59E006F726B206D6F6465203A2025640D0A0032 +:10F5AE0040310A0065666665637420636865636B47 +:10F5BE002074696D656F7574210D0A0023255B300B +:10F5CE002D395D0024257300453233206275666641 +:10F5DE0065722066756C6C0D0A00403320582573D9 +:10F5EE0020592573205A2573205225730A00403660 +:10F5FE00204E30205625640A004035205625640AD8 +:10F60E000040392056300A0041255B302D392D2B14 +:10F61E002E5D00562573002056310A0056554225A0 +:10F62E005B302D392E5D0046255B302D392E5D5415 +:10F63E0025640058255B302D392D2B2E5D59255B09 +:10F64E00302D392D2B2E5D5A255B302D392D2B2E3D +:10F65E005D0042255B302D392D2B2E5D4C255B3008 +:10F66E002D392D2B2E5D52255B302D392D2B2E5DF8 +:10F67E000058255B302D392D2B2E5D59255B302DF5 +:10F68E00392D2B2E5D5A255B302D392D2B2E5D50AD +:10F69E002564004E25645625640053255B302D39B4 +:10F6AE002D2B2E5D0056255B302D392D2B2E5D001A +:10F6BE004532330A004532300A004532310A002005 +:10F6CE00006F6B004532300045323100453232005A +:10F6DE0056332E332E310056332E332E3000563302 +:0CF6EE002E332E320056302E302E30000D +:00000001FF diff --git a/hex/uArmPro_V4.10.0_release_20220610.hex b/hex/uArmPro_V4.10.0_release_20220610.hex new file mode 100644 index 0000000..5159050 --- /dev/null +++ b/hex/uArmPro_V4.10.0_release_20220610.hex @@ -0,0 +1,5311 @@ +:100000000C94EA050C940B060C940B060C940B064E +:100010000C940B060C940B060C940B060C940B061C +:100020000C940B060C942D860C940B060C94867E77 +:100030000C940B060C940B060C940B060C94537E3C +:100040000C940B060C94EB7E0C940B060C940B0694 +:100050000C940B060C940B060C940B060C94AF7EC0 +:100060000C940B060C94D6840C94FF850C940B0610 +:100070000C940B060C940B060C940B060C940B06BC +:100080000C940B060C940B060C940B060C943D7E02 +:100090000C946D840C94D1850C940B060C940B0677 +:1000A0000C940B060C940B060C943E810C940B06DE +:1000B0000C940B060C94087E0C940B060C940B0607 +:1000C0000C940B060C940B060C94D37D0C940484B6 +:1000D0000C94A3850C940B060C949B830C9475854F +:1000E0000C940B06036EDB363D9A9999993DABAAA9 +:1000F000AA2A3E000000803F084AD73B3BCE016E53 +:1001000084BCBFFDC12F3D6C74319ABD56833DDA6E +:100110003D00C77F11BED9E4BB4C3E916BAAAABE7D +:10012000000000803F072C7AA5BA6CC590DA3B939B +:1001300065FC8BBC53F810FD3C5692834DBD879DEA +:100140003AB63DCBC9BF5BBE73DA0FC93F05A84CB9 +:10015000CDB2D44EB93836A9020C50B99186880870 +:100160003CA6AAAA2ABE000000803F000C943C7561 +:100170000C9475060C94413A0C9487060C94FC235D +:100180000C94B47C0C94FD220C94297D0C949B3A25 +:100190000C94966C0C94E9220C947F060C94BC7C15 +:1001A0000C94F0230C9419240C94EA230C94B43A84 +:1001B0000C94073A0C94C5220C9418230C942B75BC +:1001C0000C948D060C94FF230C945A3A0C945E0602 +:1001D0000C94EF7C0C94DF220C94AE7C0C94910672 +:1001E0000C94283A0C9409230C94C2220C94150701 +:1001F0000C94DC730C94C8730C949D220C94ED3A0F +:100200000C9456060C9405240C945A060C94520631 +:100210000C94247D0C943C7C0C94F77C0C94E87436 +:100220000C940D240C94BA220C9423230C94610694 +:100230000C94E2730C9412230C9483060C94A82261 +:100240000C94DF730C94E5730C94ED230C94507CA8 +:100250000C94F3230C9410240C9400750C94B2228B +:100260000C9479060C941C240C94DB090C94002348 +:100270000C94823A0C9402240C94F5220C944D7543 +:100280000C94117D0C94AA7C0C94C0730C941B7D6F +:100290000C9471060C9416240C940A240C94E123FB +:1002A0000C94F9230C9457740C94D4740C94267DFC +:1002B0000C94A5220C94EF740C9496220C94CE22EC +:1002C0000C94A87C0C940F3B0C94A37C0C94177595 +:1002D0000C9439740C94F0390C94F6230C94670642 +:1002E0000C94A0220C94AC740C948C060C94D72221 +:1002F0000C940D750C9413240C94143B0C94E8731B +:100300000C946B060C94C0740C94063B0C944C0635 +:100310000C94130800407A10F35A00A0724E18098A +:100320000010A5D4E80000E87648170000E40B545C +:10033000020000CA9A3B000000E1F505000080962B +:100340009800000040420F000000A086010000005D +:10035000102700000000E803000000006400000017 +:1003600000000A00000000000100000000002C76E0 +:10037000D888DC674F0823DFC1DFAE59E1B1B796FB +:10038000E5E3E453C63AE651997696E8E6C2842658 +:10039000EB898C9B62ED407C6FFCEFBC9C9F40F234 +:1003A000BAA56FA5F490055A2AF75C936B6CF967B0 +:1003B0006DC11BFCE0E40D47FEF520E6B500D0ED75 +:1003C000902E0300943577050080841E08000020DD +:1003D0004E0A000000C80C333333330F986E12837B +:1003E0001141EF8D2114893BE65516CFFEE6DB184F +:1003F000D1844B381BF77C1D901DA4BBE424203214 +:1004000084725E228100C9F124ECA1E53D2763647A +:10041000696E6F70737578585B00000020002300D0 +:10042000260029002C002F003200000100000301EB +:10043000060109010D0A003D00244E005D0D0A0071 +:100440005B302E396A2E32303136303732363A0050 +:100450005D0D0A005B544C4F3A005D0D0A002C0004 +:100460005B4739323A005D0D0A002C003A00333008 +:10047000003238005B47005D0D0A00205300204623 +:1004800000205400204D3800204D3900204D35000B +:10049000204D3400204D3300204D3200204D3100DE +:1004A000204D3000204739340020473933002047A1 +:1004B00039310020473930002047323000204732A0 +:1004C000310020473139002047313800204731378B +:1004D000002047004733382E0047383000473300AC +:1004E0004732004731004730005B00290D0A0020E9 +:1004F0006D61782074726176656C2C206D6D0020C2 +:10050000616363656C2C206D6D2F7365635E3200D3 +:10051000206D617820726174652C206D6D2F6D697E +:100520006E002C20737465702F6D6D007A00790059 +:1005300078002028003D0024002028686F6D696E37 +:10054000672070756C6C2D6F66662C206D6D290DA3 +:100550000A002028686F6D696E67206465626F7598 +:100560006E63652C206D736563290D0A2432373D57 +:10057000002028686F6D696E67207365656B2C209D +:100580006D6D2F6D696E290D0A2432363D002028CD +:10059000686F6D696E6720666565642C206D6D2FD0 +:1005A0006D696E290D0A2432353D00290D0A243269 +:1005B000343D002028686F6D696E67206469722081 +:1005C000696E76657274206D61736B3A00202868DD +:1005D0006F6D696E67206379636C652C20626F6F45 +:1005E0006C290D0A2432333D002028686172642092 +:1005F0006C696D6974732C20626F6F6C290D0A240D +:1006000032323D002028736F6674206C696D697406 +:10061000732C20626F6F6C290D0A2432313D00204B +:10062000287265706F727420696E636865732C2020 +:10063000626F6F6C290D0A2432303D0020286172F0 +:100640006320746F6C6572616E63652C206D6D291B +:100650000D0A2431333D0020286A756E6374696F7A +:100660006E20646576696174696F6E2C206D6D29EA +:100670000D0A2431323D00290D0A2431313D00207C +:1006800028737461747573207265706F7274206D55 +:1006900061736B3A00202870726F62652070696E1A +:1006A00020696E766572742C20626F6F6C290D0A5A +:1006B0002431303D0020286C696D69742070696EAA +:1006C0007320696E766572742C20626F6F6C290DD1 +:1006D0000A24363D0020287374657020656E6162BF +:1006E0006C6520696E766572742C20626F6F6C2960 +:1006F0000D0A24353D00290D0A24343D00202864CC +:10070000697220706F727420696E76657274206DE4 +:1007100061736B3A00290D0A24333D00202873745D +:10072000657020706F727420696E76657274206DCA +:1007300061736B3A002028737465702069646C657E +:100740002064656C61792C206D736563290D0A2422 +:10075000323D002028737465702070756C73652CB1 +:100760002075736563290D0A24313D0024303D0056 +:100770002424202876696577204772626C2073658F +:100780007474696E6773290D0A24232028766965BD +:1007900077202320706172616D6574657273290D15 +:1007A0000A24472028766965772070617273657224 +:1007B000207374617465290D0A24492028766965BF +:1007C00077206275696C6420696E666F290D0A2452 +:1007D0004E20287669657720737461727475702075 +:1007E000626C6F636B73290D0A24783D76616C75BA +:1007F00065202873617665204772626C207365748A +:1008000074696E67290D0A244E783D6C696E652007 +:100810002873617665207374617274757020626CE0 +:100820006F636B290D0A24432028636865636B207E +:1008300067636F6465206D6F6465290D0A24582015 +:10084000286B696C6C20616C61726D206C6F636BDE +:10085000290D0A2448202872756E20686F6D696E14 +:1008600067206379636C65290D0A7E2028637963AC +:100870006C65207374617274290D0A2120286665E5 +:10088000656420686F6C64290D0A3F2028637572C7 +:1008900072656E7420737461747573290D0A6374C4 +:1008A000726C2D7820287265736574204772626CB3 +:1008B000290D0A000D0A00486F6D696E6720666198 +:1008C000696C0050726F6265206661696C004162FC +:1008D0006F727420647572696E67206379636C65EA +:1008E00000536F6674206C696D69740048617264AE +:1008F000206C696D697400414C41524D3A20003EB4 +:100900000D0A002C4C696D3A002C52583A002C42CA +:1009100075663A002C002C57506F733A002C002C4F +:100920004D506F733A003C446F6F72003C436865F2 +:10093000636B003C416C61726D003C486F6D6500FB +:100940003C486F6C64003C52756E003C49646C65B9 +:10095000005D0D0A00526573746F72696E672064E2 +:10096000656661756C74730050676D20456E640038 +:10097000436865636B20446F6F7200446973616202 +:100980006C656400456E61626C65640043617574FA +:10099000696F6E3A20556E6C6F636B656400272437 +:1009A00048277C2724582720746F20756E6C6F634E +:1009B0006B00526573657420746F20636F6E746989 +:1009C0006E7565005B005D0D0A003A002C005B50FF +:1009D00052423A000D0A00496E76616C69642067E4 +:1009E000636F64652049443A00556E646566696EBC +:1009F000656420666565642072617465004D6F648E +:100A0000616C2067726F75702076696F6C617469B4 +:100A10006F6E00486F6D696E67206E6F7420656E33 +:100A200061626C656400416C61726D206C6F636B18 +:100A3000004E6F742069646C6500454550524F4DFF +:100A40002072656164206661696C2E205573696E41 +:100A5000672064656661756C74730056616C7565BA +:100A6000203C203320757365630053657474696E90 +:100A7000672064697361626C65640056616C7565BA +:100A8000203C203000496E76616C6964207374618B +:100A900074656D656E7400426164206E756D62658B +:100AA0007220666F726D617400457870656374655D +:100AB0006420636F6D6D616E64206C657474657223 +:100AC000006572726F723A20006F6B0D0A000000B1 +:100AD0000A0B02090C0D0E080703040100000000B8 +:100AE0000000000000000000000000000000000006 +:100AF00000000000000000000000121110000000C3 +:100B000000000000000000000000000000000000E5 +:100B10000000000000002200250028002B002E000D +:100B20003100340002010000050108010B01000042 +:100B30002100240027002A002D003000330001018D +:100B40000000040107010A0105050505070508085D +:100B50000808020202020A0A080804040404010147 +:100B6000010101010101030303030303030304075C +:100B700007070C0C0C0C0C0C0C0C020202020606F3 +:100B80000606060606060B0B0B0B0B0B0B0B0102E6 +:100B9000102020080810204010204080020102018F +:100BA0000804020101020408102040808040201047 +:100BB00008040201800402018040201008040201A0 +:100BC0000804020101020408102040800102040808 +:100BD0001020408011241FBECFEFD1E2DEBFCDBF79 +:100BE00000E00CBF15E0A0E0B2E0E0EAF8E401E0CC +:100BF0000BBF02C007900D92A232B107D9F726E1D0 +:100C0000A2E2B5E001C01D92A934B207E1F70E944B +:100C1000008A0C944EA40C940000E7E5F5E1A48151 +:100C2000B5819C010E94D29DA1E0B1E02C91286089 +:100C30002C93A0EAB0E02C9120682C932AE09695A2 +:100C40008795779567952A95D1F77093A90060935A +:100C5000A800868180618093A1000895815082312F +:100C600008F05AC0E82FF0E08827E65CF94F8F4F74 +:100C70000C94CA9D5A065E064C06520656068C0611 +:100C8000610667066B067106750679067F068306A0 +:100C90008C0687068D069106809180008F77809361 +:100CA00080000895809180008F7DF9CF8091800031 +:100CB000877FF5CF84B58F7784BD089584B58F7D08 +:100CC000FBCF8091B0008F778093B0000895809122 +:100CD000B0008F7DF9CF809190008F778093900046 +:100CE0000895809190008F7DF9CF80919000877F4B +:100CF000F5CF8091A0008F778093A0000895809118 +:100D0000A0008F7DF9CF8091A000877FF5CF8091E3 +:100D100020018F77809320010895809120018F7D9D +:100D2000F9CF80912001877FF5CF1F93CF93DF9379 +:100D3000282F30E0F901E253F54F8491F901E25791 +:100D4000F44FD491F901E85BF44FC491CC23A9F09E +:100D5000162F81110E942E06EC2FF0E0EE0FFF1FE0 +:100D6000EC5EF44FA591B4918FB7F894EC9111110A +:100D700008C0D095DE23DC938FBFDF91CF911F9108 +:100D80000895DE2BF8CF863308F0865320917B0040 +:100D9000982F9870277F922B90937B0087708064A8 +:100DA00080937C0080917A00806480937A008091A7 +:100DB0007A0086FDFCCF80917800909179000895AB +:100DC000E2E7F0E080818E7F80830895E1E0F1E04A +:100DD000808180628083808180648083E2E0F1E0B2 +:100DE00080818F7D808380818F7B808308953F9A6F +:100DF000479A0895E4EAF2E185E197E091838083E0 +:100E00001092200185E08093210181EF9FEF938371 +:100E10008283828193819093250180932401E3E76B +:100E2000F0E080818160808308952091FB123091F1 +:100E3000FC122115310561F080919312909194126A +:100E400082179307C4F5019690939412809393129E +:100E500020910A1530910B152115310561F0809113 +:100E60009112909192128217930784F501969093B4 +:100E700092128093911280914B1581111BC0809129 +:100E80000915811117C0809173008E7F80937300C4 +:100E9000109208151092FC121092FB1210920B1572 +:100EA00010920A15109294121092931210929212AC +:100EB000109291120895109294121092931210921F +:100EC000FC121092FB1210924B15C2CF109292128C +:100ED0001092911281E080934C15CDCF8F929F920A +:100EE000AF92BF92CF92DF92EF92FF9269017A01A7 +:100EF0001092521520910A01206220930A0120913C +:100F00000B012F7D20930B01660F771F881F991F00 +:100F10000E949F9AA70196010E94839C20E030E0E6 +:100F20004AE754E40E94F79920E030E040E85FE3AC +:100F30000E94DC980E94709A6093040270930502EC +:100F4000809306029093070283E198E090939E12AB +:100F500080939D12809170008E7F809370008091AD +:100F6000B0008C7F8093B0008091B100877F809328 +:100F7000B1008091B6008F7D8093B60080917000A3 +:100F80008D7F8093700020E030E04AEF53E4C7018A +:100F9000B6010E94ED9987FF35C08091B10087604E +:100FA0008093B100812C912CA12C95E4B92EA7013E +:100FB000960160E074E284E79BE40E94F799A50142 +:100FC00094010E94F7990E94699A20E031E0C901DA +:100FD000861B970B9093A01280939F1280919F1273 +:100FE0009091A0128093B2008091700081608093F4 +:100FF0007000FF90EF90DF90CF90BF90AF909F90E8 +:101000008F9008958091B10085608093B1008091A8 +:10101000B1008D7F8093B100812C912C80E8A82EA7 +:1010200083E4B82EC4CF8091901281113CC081E03E +:101030008093901280910B01806280930B018091CC +:101040008C1290918D12A0918E12B0918F12AC01E2 +:10105000BD014F5F5F4F6F4F7F4F40938C12509396 +:101060008D1260938E1270938F12409104025091F2 +:1010700005026091060270910702481759076A0736 +:101080007B0780F410928C1210928D1210928E12A7 +:1010900010928F12809170008E7F8093700081E09B +:1010A0008093521508951092901280910B018F7DBC +:1010B000C4CF109284121092851210928612109250 +:1010C00087120E94E006109250150C94E006809161 +:1010D0009D1582FF0CC08A98809108018E7F8093B5 +:1010E00008015F980E94590810924A1508958A9A3B +:1010F000809108018160809308015F9AF3CF80910D +:101100000C1590910D150497029780F480910101C0 +:1011100080628093010180910101806480930101CC +:1011200080910201806280930201089580E18093A2 +:10113000A1001092A00082E080935D1580E29EE401 +:1011400090935C1580935B159093A7008093A60005 +:1011500082E18093A10020E030E040EA51E4609118 +:1011600000027091010280910202909103020E949C +:10117000F79920E030EC4FE754E40E94839C0E94F2 +:10118000709ACB010C940D0620910C1530910D1521 +:1011900024303105A9F526E636E646E65FE30E94EF +:1011A000F79920E030E040E852E40E94839C0E94DE +:1011B000699A60938412709385128093861290933B +:1011C00087128BED99E090935815809357151092E4 +:1011D000A00085E08093A1008DEF9FEF90935A15BA +:1011E000809359158091591590915A159093A500A7 +:1011F0008093A400809172008160809372000895B2 +:101200002530310579F726E636E646EE5FE3C7CFAF +:10121000CF93C1E0C093511580910C1590910D159D +:101220000497029708F510925115109288121092A7 +:10123000891210928A1210928B12809107018F7D71 +:10124000809307018091080180628093080180915A +:10125000020180628093020160E070E084EB93E41D +:101260000E94C408C0935015CF9108958F929F9209 +:10127000AF92BF92CF92DF92EF92FF926B017C010F +:1012800020E030E044EB53E40E94439C18160CF439 +:1012900043C020E030E0A901C701B6010E94ED99EA +:1012A00087FD3AC080910C1590910D150497029717 +:1012B00008F03FC0209188123091891240918A1223 +:1012C00050918B12C701B6010E94DC984B015C0162 +:1012D00020E030E0A9010E94ED998823E9F0C09256 +:1012E0008812D0928912E0928A12F0928B1220E03A +:1012F00030E0A901C501B4010E94439C1816ACF46A +:10130000809102018F7D80930201C501B4019F7716 +:101310000E94C40810925115FF90EF90DF90CF907B +:10132000BF90AF909F908F9008958091020180624E +:10133000EACF20E030E044E353E4C701B6010E9465 +:10134000439C18161CF4C12CD12C7601A7019601E0 +:1013500060E070E084E393E40E94DC9820E030E0F9 +:1013600044E353E40E94F7999B01AC010E94DD988D +:1013700020E030E040E05FE30E94DD9860930002EF +:1013800070930102809302029093030220E030E008 +:1013900040EA51E40E94F79920E030EC4FE754E432 +:1013A0000E94839C0E94709ACB010E940D0681E0EE +:1013B00080935115B1CF8091841290918512A091A4 +:1013C0008612B0918712181619061A061B06F4F435 +:1013D00020918312222399F0109283120197A10980 +:1013E000B1098093841290938512A0938612B093D2 +:1013F000871280910201806480930201089581E048 +:1014000080938312809102018F7BF6CF0E94E006C9 +:1014100010928412109285121092861210928712E6 +:1014200081E0809351150895000000000895CF9346 +:10143000DF93D82FC8E0D7FF0DC02F9ADD0F0E9491 +:10144000140A2E9A0E94140A2E98C150A1F7DF9117 +:10145000CF9108952F98F2CF2E980E94140A2F98BA +:101460000E94140A2E9A0E94140A2F9A0C94140AAD +:10147000CF93C4B127982F9A0E94140A2E9A0E94E3 +:10148000140A1F9B07C02E980E942C0AC4B981E041 +:10149000CF9108952E98C4B980E0FACF2E9A0E9479 +:1014A000140A2F9A0E94140A2F980E94140A2E9848 +:1014B0000C94140AEF92FF920F931F93CF93DF9334 +:1014C0007C01D62F142F052FC22F269A279A2E9AE9 +:1014D0002F9A0E944E0A8D2F0E94170A0E94380AE6 +:1014E000882349F0C1E08C2FDF91CF911F910F919C +:1014F000FF90EF900895802F0E94170A0E94380AEB +:101500008111F0CF812F0E94170A0E94380A8111A1 +:10151000E9CF0E944E0A81E08D0F0E94170A0E94B7 +:10152000380A87018111DECFC11103C00E942C0A45 +:10153000DACFE4B02798D0E088E0F82E2E9A0E9407 +:10154000140ADD0F1F99D1600E94140A2E980E9480 +:10155000140AFA94F110F2CFE4B8F801D1938F0194 +:10156000C15021F3D4B1279A2F980E94140A2E9AC1 +:101570000E94140A2E980E94140AD4B92F9A0E942D +:10158000140AD2CF4F925F926F927F928F929F9266 +:10159000AF92BF92CF92DF92EF92FF920F931F9381 +:1015A0002B013C0149015A016701AC019B010E94DA +:1015B0004D9D811180C0A5019401C501B4010E9417 +:1015C0004D9D811178C0A8019601C801B6010E9405 +:1015D0004D9D811170C02AE939E947E053E4C30108 +:1015E000B2010E94439C18160CF465C020E030E064 +:1015F00040E850ECC301B2010E94ED9987FD5BC049 +:101600002DEC3CEC4FEE52E4C501B4010E94439C2A +:1016100018160CF450C020E030E040E850ECC50152 +:10162000B4010E94ED9987FD46C0A301920160E0DC +:1016300070E084E393E40E94DC98A50194010E9489 +:10164000DC984B015C0120E030E047E153E40E946C +:10165000439C181684F120E030E040E251E4C501DB +:10166000B4010E94ED9987FD26C020E030E044EBF4 +:1016700052E4C801B6010E94439C1816E4F020E031 +:1016800030E044EB52ECC801B6010E94ED99881F8E +:101690008827881F91E089271F910F91FF90EF9075 +:1016A000DF90CF90BF90AF909F908F907F906F9082 +:1016B0005F904F90089580E0EFCF8F929F92AF920E +:1016C000BF92CF92DF92EF92FF920F931F93CF932F +:1016D000DF93EB0120E6E22E25E1F22E8C016B0177 +:1016E0008CE0C80ED11C6991799189919991F7018B +:1016F00081909190A190B1907F010E94A19AA50143 +:1017000094010E94F799F8016193719381939193E9 +:101710008F01CC15DD0539F7DF91CF911F910F9126 +:10172000FF90EF90DF90CF90BF90AF909F908F9001 +:101730000895CF93DF93C0915612D09157122097FE +:10174000B9F081E08093591260916F12709170121C +:1017500080917112909172129B01AC010E94839C46 +:10176000698B7A8B8B8B9C8B10925712109256122E +:10177000DF91CF910895CF92DF92EF92FF920F9376 +:101780001F9390919115092F10E030E020E0809197 +:101790009215482F50E070E060E091708170680110 +:1017A0007901F694E794D794C794C0FC92606A01DB +:1017B0007B01F694E794D794C794C0FC8260E2E082 +:1017C0003695279517950795EA95D1F700FD946012 +:1017D00022E076956795579547952A95D1F740FD74 +:1017E00084609093D00E8093CF0E1F910F91FF9045 +:1017F000EF90DF90CF90089580919D1582FF21C0DA +:101800008A9A809108018160809308015F9A809193 +:10181000B0158C70A9F08091CF0E8093E10E80916D +:10182000D00E8093E00E809190158250990B880F16 +:1018300081958093DF0E80916F00826080936F00AE +:1018400008958A98809108018E7F809308015F989F +:10185000DECFE0EAF0E080818F7D80835C980895A0 +:10186000E091A80D91E09E0F903809F490E020914E +:10187000290E2917A1F0F0E0E755F24F80839093ED +:10188000A80D8091AC0E9091AD0E8130910591F034 +:1018900058F082309105A1F00397C1F0089520918E +:1018A0005E1524FFE4CF08958091C100806280938B +:1018B000C10008958091C90080628093C900089595 +:1018C0008091D10080628093D10008958091310190 +:1018D000806280933101E7CF8091B115811108C0FA +:1018E0009FB7F89480915E15826080935E159FBFCC +:1018F00008958F929F92AF92BF92CF92DF92EF9214 +:10190000FF920F931F93CF93DF9300D000D000D0AE +:101910001F92CDB7DEB76B017C01142F20E030E0C1 +:10192000A9010E94ED9987FF07C08DE20E94300C4B +:10193000F7FAF094F7F8F094012F023008F054C051 +:1019400010FF0AC020E030E040E251E4C701B601D8 +:101950000E94839C6B017C0120E030E040E05FE36B +:10196000C701B6010E94DD980E94699A9E012F5F0F +:101970003F4F7901F901E10FF11D2EE2208300E0D4 +:101980002AE0822E912CA12CB12C611571058105C4 +:101990009105B1F5F701E00FF11D80E3011708F49F +:1019A00040C0011308C0E1E0E00FEE0DFF2DF11D76 +:1019B0000E5F80E380830E0D1F2D111DE016F106D2 +:1019C00099F52A960FB6F894DEBF0FBECDBFDF9112 +:1019D000CF911F910F91FF90EF90DF90CF90BF902C +:1019E000AF909F908F90089520E030E048EC52E453 +:1019F000C701B6010E94839C6B017C0102509DCF00 +:101A0000011301C00F5F6701C00ED11CA501940135 +:101A10000E94899D605DF6016083B901CA010F5F74 +:101A2000B4CF0F5F8193BACFF80182918F010E94EA +:101A3000300CC4CF43E00C94790C20919D1540E00C +:101A400020FF07C02BE832E441E25DE30E94839C63 +:101A500041E00C94790C20919D1543E020FF07C0D4 +:101A60002BE832E441E25DE30E94839C44E00C9465 +:101A7000790C8F929F92AF92BF92CF92DF92EF92AA +:101A8000FF920F931F93CF93DF9300D000D000D02D +:101A90001F92CDB7DEB76115710581059105A9F4D7 +:101AA00080E32A960FB6F894DEBF0FBECDBFDF915C +:101AB000CF911F910F91FF90EF90DF90CF90BF904B +:101AC000AF909F908F900C94300C00E09E012F5FA0 +:101AD0003F4F79012AE0822E912CA12CB12C670175 +:101AE000C00ED11CA50194010E94899DF60160835E +:101AF000B901CA010F5F611571058105910579F77B +:101B00000E0D1F2D111DE016F10699F42A960FB641 +:101B1000F894DEBF0FBECDBFDF91CF911F910F9123 +:101B2000FF90EF90DF90CF90BF90AF909F908F90FD +:101B30000895F80182918F01805D0E94300CE3CFFF +:101B4000CF92DF92EF92FF9297FF0CC06B017C0166 +:101B50008DE20E94300C66277727CB016C197D0936 +:101B60008E099F09FF90EF90DF90CF900C94390D74 +:101B7000CF93DF93EC01FE0184912196811103C084 +:101B8000DF91CF9108950E94300CF5CFCF93DF9372 +:101B9000EC018991811103C0DF91CF9108950E94DA +:101BA000300CF7CFECE8FDE0AFEAB5E114964D91CB +:101BB0005D916D917C91179740835183628373830C +:101BC00018964D915D916D917C911B97448355833F +:101BD000668377831C968D919D910D90BC91A02D6D +:101BE00080879187A287B38708952F923F924F9263 +:101BF0005F926F927F928F929F92AF92BF92CF929D +:101C0000DF92EF92FF920F931F93CF93DF9300D059 +:101C10001F92CDB7DEB70091D911002309F486C019 +:101C200009833981315039831091F50E131709F466 +:101C300066C0C32ED12CE9E23E9FC00111249C0155 +:101C40002A50314F7901F901758886889788A08CD0 +:101C500061A172A183A194A19B01AC010E94DD98B6 +:101C6000F70125A136A147A150A50E94839CB62E5D +:101C7000E72EF82E9B83262F372F482F592F672DBD +:101C8000782D892D9A2D0E94ED9987FF03C0B72CDE +:101C90007401AB8289E28C9DF0018D9DF00D1124C1 +:101CA000EA50F14F8B2D9E2DAF2DBB81818B928BF6 +:101CB000A38BB48BF9818F2FF11101C082E1FF2436 +:101CC000FA94F80E3090D8111F1133C0131102C0CE +:101CD0000E94990BE9E21E9FC00111248A50914F86 +:101CE0009A83898333243394310EF2E13F1201C089 +:101CF000312C89E2282E031185C01093F50E0F9028 +:101D00000F900F900F90DF91CF911F910F91FF9047 +:101D1000EF90DF90CF90BF90AF909F908F907F908B +:101D20006F905F904F903F902F90089522E129830C +:101D300078CF298189E2289F900111242A50314FC0 +:101D40003C832B8329E2E22E8F2C912CFE9CC00138 +:101D50001124FC01EA50F14FFA83E983F11002C02B +:101D600092E1F92EFA94F31002C00E94990BE89CBC +:101D7000C001E99C900D11249C012A50314F69014A +:101D8000F901458856886788708CA30192016189A2 +:101D90007289838994890E94ED99882339F1F6012B +:101DA00061A172A183A194A19B01AC010E94DD9865 +:101DB000F60125A136A147A150A50E94839CEB8185 +:101DC000FC8121893289438954890E94DD984B0125 +:101DD0005C01AC019B01C301B2010E94439CF6016E +:101DE00018165CF4818A928AA38AB48A29813A817E +:101DF0003C832B831F11A8CF6DCF418A528A638AFF +:101E0000748AF4CFC32CD12C329CC00111249C01C4 +:101E10002A50314F7901E981FA81418852886388DB +:101E20007488F90181889288A388B488A5019401F7 +:101E3000C301B2010E94ED9987FF26C0E981FA81B2 +:101E400061A172A183A194A19B01AC010E94DD98C4 +:101E5000E981FA8125A136A147A150A50E94839C62 +:101E6000A30192010E94DD982B013C01AC019B0172 +:101E7000C501B4010E94439C181634F4F701418A4D +:101E8000528A638A748A132D2C9CF0012D9CF00DCC +:101E90001124EA50F14F258936894789508D61898F +:101EA0007289838994890E94ED99811101C0132D53 +:101EB0003394F2E13F1201C0312CFA82E9821BCF48 +:101EC0004F925F926F927F92AF92BF92CF92DF92CA +:101ED000EF92FF920F931F93CF93DF936C01FB015F +:101EE0005A01DC01309721F0A081A80FB92FB11D54 +:101EF0008C91ED018D3249F5229611968C9101E07D +:101F0000512C612C10E020E030E0A9017E0190ED21 +:101F1000792E780E89E0871528F16394A8E0A6153C +:101F2000E8F051101150A5E0B0E00E94E19D9B0146 +:101F3000AC01220F331F441F551F270D311D411DBA +:101F4000511D2196D7018C91E1CF8B3219F021964A +:101F500000E0D6CF229611968C91FACF5110F1CF96 +:101F60001F5FEFCFBEEF7B1205C0511003C0552499 +:101F70005394E7CF662009F17F01CA01B9010E949D +:101F80009F9A2B013C0120E030E0A9010E94ED99CD +:101F900081112EC0002309F448C077FA709477F8B5 +:101FA0007094F5014082518262827382CC19DD09FE +:101FB000C150F701C08366246394862DDF91CF91D1 +:101FC0001F910F91FF90EF90DF90CF90BF90AF9057 +:101FD0007F906F905F904F9008952AE037ED43E235 +:101FE0005CE3C301B2010E94839C2B013C011E5F94 +:101FF0001F3F9CF31F3F59F42DEC3CEC4CEC5DE390 +:10200000C301B2010E94839C2B013C01C3CF112369 +:1020100009F220E030E040E251E4C301B2010E9445 +:10202000839C2B013C011150F2CFD5014D925D9262 +:102030006D927C921397BACF89B190919D1596FFBE +:1020400004C0807109F087E008958095FACFEBE62F +:10205000F0E080818F7E8083E8E6F0E080818E7FF3 +:102060008083089554985C9A80919D1583FF0BC0DE +:1020700080916B00806180936B008091680081602B +:102080008093680008950C94271063EB75E181E25A +:1020900096E10C945D0BF894F999FECF92BD81BD49 +:1020A00081E08FBB20B5862F8227082E000C990B6C +:1020B00050E086239523892B49F084E16F3F11F08E +:1020C00060BD84E08FBBF99A789408952617E1F3F8 +:1020D00060BD84E2F7CFCF93DF93CCE0D5E16A8196 +:1020E0008CEA93E00E944B106B818DEA93E00E9492 +:1020F0004B106C818EEA93E00E944B106D818FEA49 +:1021000093E00E944B106E8182EA93E00E944B1094 +:102110006F8183EA93E00E944B10688584EA93E024 +:102120000E944B10698585EA93E0DF91CF910C9472 +:102130004B10CF93DF93CCE0D5E1688184E893E046 +:102140000E944B106A8188E993E00E944B106B81DA +:1021500089E993E00E944B106C818AE993E00E9428 +:102160004B106D818BE993E00E944B106E818EE8DD +:1021700093E00E944B106F818FE893E00E944B1018 +:10218000688580E993E00E944B10698581E993E0BE +:102190000E944B106A8582E89CE00E944B106B8580 +:1021A00083E89CE00E944B106C8584E89CE00E94D0 +:1021B0004B106D8585E89CE0DF91CF910C944B101E +:1021C0009F92AF92BF92CF92DF92EF92FF920F93C6 +:1021D0001F93CF93DF935C018A017B01E40EF51E10 +:1021E000EB01912C6C01C61AD70ACE018C0D9D1DF6 +:1021F00021E0911007C0292D990C330B232F221FAA +:102200002227221F6991962E920E0E944B10CE1506 +:10221000DF0559F7692DC501800F911FDF91CF911F +:102220001F910F91FF90EF90DF90CF90BF90AF90F4 +:102230009F900C944B1069E090E080E00E944B105E +:102240004DE450E060E675E181E098E00C94E01028 +:102250002DE0829FC00111244CE050E0965F0C9469 +:10226000E010F999FECF92BD81BD81E08FBB80B5B2 +:102270000895EF92FF920F931F93CF93DF9382E322 +:1022800093E00E94311100E213E08B3B11F404E370 +:1022900013E087ECE82E84E1F82EC1ECD4E1015C78 +:1022A0001441C8018C0F9D1F0E9431118993EC16B7 +:1022B000FD06B9F7DF91CF911F910F91FF90EF903D +:1022C00008959F92AF92BF92CF92DF92EF92FF92CA +:1022D0000F931F93CF93DF935B018A017C01E40E80 +:1022E000F51EEC01912C6B01C81AD90AC6018C0F9E +:1022F0009D1F0E94311121E0911007C0292D990CDA +:10230000330B232F221F2227221F982E920E8993F0 +:10231000CE15DF0559F7C501800F911F0E943111BD +:1023200021E030E0891511F030E020E0C901DF91B3 +:10233000CF911F910F91FF90EF90DF90CF90BF90C2 +:10234000AF909F900895CF93DF9391E5899FE0012F +:102350001124D55F40E550E0BE018BEA92E10E9476 +:102360006111892B69F41092AB1240E550E06BEAE1 +:1023700072E1CE010E94E01080E0DF91CF910895DC +:1023800081E0FBCF5C98089580915E1584FD32C09A +:102390009FB7F89480915E15806180935E159FBF12 +:1023A0000E94290C0E94C2118091B015982F9C7038 +:1023B00021F49091B1159130E9F49FB78430D9F4AC +:1023C000F8948091AE1580628093AE159FBF809186 +:1023D0006F008D7F80936F0080918100887F816086 +:1023E000809381001092D10E809193158F3F11F44C +:1023F0008091AE150895F8948091AE158860E4CF71 +:10240000CF92DF92EF92FF926A017B01811106C0A9 +:10241000FF90EF90DF90CF900C94290C813009F061 +:102420004EC05C9883E28093A0008091A100807EE2 +:102430008A618093A1008FEF9FEF9093A900809312 +:10244000A80020E030E0A901C701B6010E94ED9983 +:102450001816F4F620E030E0A901C701B6010E9489 +:10246000ED9987FD2EC020E030E04AE754E4C70133 +:10247000B6010E94439C181634F4C12CD12C8AE773 +:10248000E82E84E4F82E2CEE31E143E852E4C70153 +:10249000B6010E94839C20E030E040E05FE30E94B0 +:1024A000DD980E94DC9A0E94709A7093AB00609352 +:1024B000AA005C9AFF90EF90DF90CF9008955C9A0D +:1024C000B1CFC12CD12C7601DECF2F923F924F920B +:1024D0005F926F927F928F929F92AF92BF92CF92B4 +:1024E000DF92EF92FF920F931F93CF93DF93CDB7BD +:1024F000DEB72E970FB6F894DEBF0FBECDBF29838F +:102500003A834B835C83ED82FE820F8318878601BA +:1025100015019E868D8621EE3EE245E652E40E943C +:10252000F7992B013C0121EE3EE245E652E4698138 +:102530007A818B819C810E94F7994B015C0121EE8D +:102540003EE245E652E46D817E818F8198850E944E +:10255000F7996B017C01C301B2010E94F299698372 +:102560007A838B839C83C501B4010E94F2996D83A9 +:102570007E838F839887C301B2010E94F09C2B0158 +:102580003C01C501B4010E94F09C69877A878B8762 +:102590009C872CEE31E14EE053E469817A818B8196 +:1025A0009C810E94839C4B015C012CE53FEC4EE139 +:1025B00053E46D817E818F8198850E94839C9B016D +:1025C000AC01C501B4010E94DD9823E333E343E588 +:1025D00051E40E94DD984B015C01C701B6010E94E5 +:1025E000F2999B01AC01C501B4010E94839CF801E2 +:1025F0006083718382839383C701B6010E94F09C3C +:102600009B01AC01C501B4010E94839CF101608370 +:102610007183828393832CEE31E14EE053E4C30156 +:10262000B2010E94839C6B017C012CE53FEC4EE1E2 +:1026300053E469857A858B859C850E94839C9B01E8 +:10264000AC01C701B6010E94DC982DEC3CEC46EDD4 +:1026500052E40E94DD98ED85FE856083718382835C +:1026600093832E960FB6F894DEBF0FBECDBFDF91D9 +:10267000CF911F910F91FF90EF90DF90CF90BF907F +:10268000AF909F908F907F906F905F904F903F9012 +:102690002F9008952F923F924F925F926F927F9268 +:1026A0008F929F92AF92BF92CF92DF92EF92FF9262 +:1026B0000F931F93CF93DF9300D000D01F921F92F0 +:1026C000CDB7DEB72B013C0129833A834B835C8372 +:1026D000ED82FE820F83188786018CE0282E85E12B +:1026E000382E20E030E044EB52E4F101668977892E +:1026F000808D918D0E94DC986B017C0120E030E0A0 +:1027000040EA52E46D817E818F8198850E94F7991D +:102710009B01AC01C701B6010E94DD986D837E83E9 +:102720008F83988720E030E040EA52E469817A8123 +:102730008B819C810E94F799F10122893389448918 +:1027400055890E94DD9869837A838B839C8320E07E +:1027500030E040EA52E4C301B2010E94F799F1016E +:1027600026853785408951890E94DD986801ED8072 +:10277000FE800F81188529813A814B815C810E94FE +:10278000651228960FB6F894DEBF0FBECDBFDF915D +:10279000CF911F910F91FF90EF90DF90CF90BF905E +:1027A000AF909F908F907F906F905F904F903F90F1 +:1027B0002F900895CF93DF93EB018731D0F48531CB +:1027C00020F48C30E0F4813098F18091D614882385 +:1027D00009F45AC066ED74E1CE010E94EC9DE6ED6D +:1027E000F4E182E3DF011D928A95E9F7DF91CF9151 +:1027F000089598818333A1F168F4823339F1888197 +:10280000882329F063E172E0CE010E94EC9D68E12B +:1028100072E018C0843371F1853389F7992329F068 +:1028200063E172E0CE010E94EC9D68E272E00AC0B2 +:102830008881882329F063E172E0CE010E94EC9D3B +:1028400065E172E0CE010E94EC9DBFCF992329F093 +:1028500063E172E0CE010E94EC9D6CE172E0F2CF88 +:10286000992329F063E172E0CE010E94EC9D60E2C1 +:1028700072E0E8CF992329F063E172E0CE010E9473 +:10288000EC9D64E272E0DECF6BED74E0CE01DF918F +:10289000CF910C94EC9D1F93CF93DF93182FEB01F6 +:1028A0008DE0189FB0011124765F4CE050E0CE011E +:1028B0000E946111892B71F48CE0FE0111928A95BE +:1028C000E9F7BE01812F0E94281180E0DF91CF91AE +:1028D0001F91089581E0FACFEF92FF920F931F931B +:1028E000CF93DF93CDB7DEB72C970FB6F894DEBF4A +:1028F0000FBECDBF182F80FFC7C08AE08093901510 +:102900008FEF809393151092911587E08093921525 +:1029100083E0809394158AE097EDA3E2BCE3809373 +:10292000951590939615A0939715B09398158FE6EB +:1029300092E1A3E0BBE38093991590939A15A0933D +:102940009B15B0939C1510929E1580E090E0A8EC2A +:10295000B1E480939F159093A015A093A115B09317 +:10296000A21580E090E0AAEFB3E48093A3159093C2 +:10297000A415A093A515B093A6158AEF90E09093A7 +:10298000A8158093A71580E090E0A0E8BFE38093AE +:10299000A9159093AA15A093AB15B093AC1584E03C +:1029A00080939D1580E090E0A8ECB5E480936015DD +:1029B00090936115A0936215B0936315809364158D +:1029C00090936515A0936615B0936715809368156D +:1029D00090936915A0936A15B0936B1580E090E50C +:1029E000A3ECB7E480936C1590936D15A0936E15CE +:1029F000B0936F158093701590937115A093721515 +:102A0000B09373158093741590937515A0937615F4 +:102A1000B093771580E090EAACE0B7E48093781546 +:102A200090937915A0937A15B0937B1580937C15BC +:102A300090937D15A0937E15B0937F15809380159C +:102A400090938115A0938215B093831580E090E454 +:102A5000ACE1B6EC8093841590938515A093861510 +:102A6000B09387158093881590938915A0938A1544 +:102A7000B0938B1580938C1590938D15A0938E1524 +:102A8000B0938F150E941B1111FF10C0CE0101964B +:102A90007C018CE0F70111928A95E9F700E0B7011B +:102AA000802F0E9428110F5F0830C9F712FF0AC05B +:102AB00060E080E09BE00E944B1060E081E59BE0DD +:102AC0000E944B1013FF05C060E08EEA9BE00E945D +:102AD0004B102C960FB6F894DEBF0FBECDBFDF9122 +:102AE000CF911F910F91FF90EF900895ECE8FDE0DA +:102AF0008CE1DF011D928A95E9F71092D8111092AE +:102B0000D91181E080938B0D1092F50E08954F92AC +:102B10005F926F927F92AF92BF92CF92DF92EF92CD +:102B2000FF920F931F93CF93DF935C01EB018A0118 +:102B3000FC01408051806280738020E030E0A90178 +:102B4000C301B2010E94ED9920E030E0A90181119A +:102B500019C0688179818A819B810E94439C2AEDFA +:102B6000C22E2FE0D22E29ECE22E2FEBF22E1816D9 +:102B7000DCF49AEDC92E9FE0D92E99ECE92E9FE363 +:102B8000F92E12C0C301B2010E94ED9987FD62C007 +:102B9000A3019201688179818A819B810E94F799C2 +:102BA0000E94A7996B017C01C701B6010E94F299AE +:102BB00020910E1530910F1540911015509111155F +:102BC0000E94839C9B01AC01C301B2010E94DC986E +:102BD000F5016083718382839383C701B6010E94EC +:102BE000F09C20910E1530910F15409110155091C9 +:102BF00011150E94839C9B01AC01688179818A81B7 +:102C00009B810E94DC98688379838A839B832091CF +:102C10001215309113154091141550911515F801A6 +:102C200060817181828193810E94DD98F8016083C7 +:102C3000718382839383DF91CF911F910F91FF90D6 +:102C4000EF90DF90CF90BF90AF907F906F905F90AC +:102C50004F900895C12CD12C80ECE82E8FE7F82EF0 +:102C6000A3CF4F925F926F927F92AF92BF92CF921B +:102C7000DF92EF92FF920F931F93CF93DF935C014C +:102C8000EB018A01FC01408051806280738020E06A +:102C900030E0A901C301B2010E94ED9920E030E0CB +:102CA000A901811119C0688179818A819B810E9463 +:102CB000439C2AEDC22E2FE0D22E29ECE22E2FEBE0 +:102CC000F22E1816DCF49AEDC92E9FE0D92E99EC5D +:102CD000E92E9FE3F92E12C0C301B2010E94ED99C3 +:102CE00087FD60C0A3019201688179818A819B81FF +:102CF0000E94F7990E94A7996B017C01C701B60158 +:102D00000E94F29920910E1530910F1540911015E7 +:102D1000509111150E94839CA30192010E94DD989D +:102D2000F5016083718382839383C701B6010E949A +:102D3000F09C20910E1530910F1540911015509177 +:102D400011150E94839C9B01AC01688179818A8165 +:102D50009B810E94DD98688379838A839B8320917D +:102D60001215309113154091141550911515F80155 +:102D700060817181828193810E94DC98F801608377 +:102D8000718382839383DF91CF911F910F91FF9085 +:102D9000EF90DF90CF90BF90AF907F906F905F905B +:102DA0004F900895C12CD12C80ECE82E8FE7F82E9F +:102DB000A5CF2F923F924F925F926F927F928F9208 +:102DC0009F92AF92BF92CF92DF92EF92FF920F93BA +:102DD0001F93CF93DF93CDB7DEB766970FB6F89406 +:102DE000DEBF0FBECDBF6D837E838F83988729871B +:102DF0003A874B875C87270138018601BA8AA98AFE +:102E000014019B01AC010E94839C6B017C0129850C +:102E10003A854B855C85CA01B9010E94839C9B0160 +:102E2000AC01C701B6010E94DD980E94FE9C23E31D +:102E300033E343E551E40E94DC9869837A838B8312 +:102E40009C832DEC3CEC46ED52E4C301B2010E94A0 +:102E5000DC982B013C0129813A814B815C81CA01BC +:102E6000B9010E94839C6B017C01A3019201C30103 +:102E7000B2010E94839C9B01AC01C701B6010E9474 +:102E8000DD986B017C0124ED35E64DE955E40E94A7 +:102E9000DC984B015C0126EC3FEA4DE957E4C701A1 +:102EA000B6010E94839C6D877E878F87988BA501D2 +:102EB0009401C501B4010E94839C9B01AC016D8506 +:102EC0007E858F8598890E94DC980E94FE9C6B8B82 +:102ED0007C8B8D8B9E8BA7019601C701B6010E944A +:102EE000DD986D877E878F87988BA5019401698116 +:102EF0007A818B819C810E94839C4B015C01A301A0 +:102F000092016B897C898D899E890E94839C9B019B +:102F1000AC01C501B4010E94DC984B015C012CEEB0 +:102F200031E14EE053E46D857E858F8598890E945E +:102F3000839C9B01AC01C501B4010E94F7990E94DA +:102F4000CB9821EE3EE245E652E40E94839CF801D4 +:102F5000608371838283938324ED35E64DE955E4E4 +:102F6000C701B6010E94DD984B015C012BE339E0FB +:102F700045EC57E4C701B6010E94839C6B017C01BC +:102F8000A5019401C501B4010E94839C9B01AC0181 +:102F9000C701B6010E94DC980E94FE9C6B017C0177 +:102FA000A501940169817A818B819C810E94839C17 +:102FB0004B015C01A3019201C701B6010E94839CF1 +:102FC0009B01AC01C501B4010E94DD986B017C013D +:102FD0002CE53FEC4EE153E46D857E858F85988925 +:102FE0000E94839C9B01AC01C701B6010E94F79926 +:102FF0000E94CB9821EE3EE245E652E40E94839C7B +:103000006B017C01E989FA89C082D182E282F38274 +:1030100021EE3EE245E652E4F80160817181828151 +:1030200093810E94F7990E94F09C2CEE31E14EE0D2 +:1030300053E40E94839CA30192010E94ED9987FFB3 +:103040000AC0F7FAF094F7F8F094E989FA89C08297 +:10305000D182E282F38221EE3EE245E652E4E98942 +:10306000FA8960817181828193810E94F7990E941F +:10307000F09C2CE53FEC4EE153E40E94839C9B01C5 +:10308000AC01C301B2019F770E94439C18169CF4C7 +:1030900020E030E0A901C301B2010E94ED9987FF51 +:1030A0000AC0F80180819181A281B381B0588083E8 +:1030B0009183A283B38320E030E0A9016D817E81FA +:1030C0008F8198850E94ED9920E030E0A90181115F +:1030D0002FC069857A858B859C850E94439C181634 +:1030E00014F580E090E0A4EBB2E4F10180839183D9 +:1030F000A283B38366960FB6F894DEBF0FBECDBF32 +:10310000DF91CF911F910F91FF90EF90DF90CF90C3 +:10311000BF90AF909F908F907F906F905F904F90F7 +:103120003F902F90089580E090E0A4EBB2ECDDCFCB +:103130006D817E818F8198850E94ED9987FF05C002 +:1031400080E090E0A0ECBFE7D0CF2D813E814F81A1 +:10315000588569857A858B859C850E94F7990E94A0 +:10316000A79921EE3EE245E652E40E94839CF101DC +:103170006083718382839383BDCF2F923F924F925E +:103180005F926F927F928F929F92AF92BF92CF92F7 +:10319000DF92EF92FF920F931F93CF93DF93CDB700 +:1031A000DEB72C970FB6F894DEBF0FBECDBF260159 +:1031B00035011401FE0139964F0134975F013497B0 +:1031C0006F010E94D916C984DA84EB84FC848D8057 +:1031D0009E80AF80B8840CE015E1F8012685378524 +:1031E0004089518969817A818B819C810E94DC9818 +:1031F00020E030E040EA52E40E94839C0E94699AF9 +:10320000072E000C880B990B0E94A19AF201608393 +:10321000718382839383F801228933894489558994 +:10322000C501B4010E94DC9820E030E040EA52E49D +:103230000E94839C0E94699A072E000C880B990BB0 +:103240000E94A19AF3016083718382839383F801C2 +:1032500026893789408D518DC701B6010E94DC98BF +:1032600020E030E044EB52E40E94DD9820E030E0C2 +:1032700040EA52E40E94839C0E94699A072E000C47 +:10328000880B990B0E94A19AF1016083718382835C +:1032900093832C960FB6F894DEBF0FBECDBFDF919F +:1032A000CF911F910F91FF90EF90DF90CF90BF9043 +:1032B000AF909F908F907F906F905F904F903F90D6 +:1032C0002F9008952F923F924F925F926F927F922C +:1032D0008F929F92AF92BF92CF92DF92EF92FF9226 +:1032E0000F931F93CF93DF93CDB7DEB7CC54D109A3 +:1032F0000FB6F894DEBF0FBECDBF8091B0158077BA +:103300008FAF20916F122F8730917012388B4091C0 +:103310007112498B509172125A8B81110C94FE21BB +:103320008091D91121968FAF2197A0915612B0911B +:103330005712BA83A983B0915912B98FE0915812EC +:10334000EEA3209162123091631240916412509169 +:1033500065122AAB3BAB4CAB5DAB30917B123B872C +:1033600040917C124C8720907D1230907E125091BB +:1033700073125A8F809174128B8F909175129C8F5B +:10338000A0917612AD8FB0917712BC8BE09178123C +:10339000ED8BF0917912FE8B20917A122F8B309168 +:1033A0007F123E8F409180124F8F5091811258A30F +:1033B0008091821289A390916A129B8BA0916B12CB +:1033C000AB83B0916C12BF83E0916D12ED87F091E9 +:1033D0006E12FE8720915E1230915F124091601252 +:1033E000509161122FA338A749A75AA730915A12BA +:1033F0003AAF40915B124BAF50915C125CAF809141 +:103400005D128DAF20916612309167124091681263 +:10341000509169122EAB3FAB48AF59AF30910012BB +:103420003EAF4091DB1149AB5091D811588F80913C +:10343000F50E22968FAF22978091DA1159A9851344 +:1034400095C08A8D9B8DAC8DBD8D809373129093AA +:103450007412A0937512B09376128E8D9F8DA8A1D1 +:10346000B9A180937F1290938012A0938112B093A0 +:1034700082128B819F81AD85BE8580936B12909364 +:103480006C12A0936D12B0936E128C899D89AE89D7 +:10349000BF898093771290937812A0937912B0939A +:1034A0007A128F859889A989BA8980936F1290932F +:1034B0007012A0937112B09372128B8980936A126A +:1034C0008B859C85D10180937B1290937C12A09375 +:1034D0007D12B0937E129EAD90930012AEA1A09388 +:1034E0005812E981FA81F0935712E09356122AA9F3 +:1034F0003BA94CA95DA920936212309363124093BB +:10350000641250936512388D3093D8118AAD9BADFB +:10351000ACADBDAD80935A1290935B12A0935C1238 +:10352000B0935D128FA198A5A9A5BAA580935E124C +:1035300090935F12A0936012B09361122EA93FA9DD +:1035400048AD59AD209366123093671240936812CC +:1035500050936912398D3093591249A94093DB1168 +:1035600022965FAD22975093F50E9FC0A981BA8134 +:10357000AB2B09F0AAC22196BFAD2197E88DBE13EF +:10358000AEC08A8D9B8DAC8DBD8D80937312909350 +:103590007412A0937512B09376128E8D9F8DA8A190 +:1035A000B9A180937F1290938012A0938112B0935F +:1035B00082128B819F81AD85BE8580936B12909323 +:1035C0006C12A0936D12B0936E128C899D89AE8996 +:1035D000BF898093771290937812A0937912B09359 +:1035E0007A128F859889A989BA8980936F129093EE +:1035F0007012A0937112B0937212FB89F0936A1249 +:103600008B859C85D10180937B1290937C12A09333 +:103610007D12B0937E122EAD209300123EA1309306 +:10362000581210925712109256128AA99BA9ACA94F +:10363000BDA98093621290936312A0936412B09319 +:10364000651221969FAD21979093D8118AAD9BADBD +:10365000ACADBDAD80935A1290935B12A0935C12F7 +:10366000B0935D122FA138A549A55AA520935E12EB +:1036700030935F1240936012509361128EA99FA9FC +:10368000A8ADB9AD8093661290936712A0936812AB +:10369000B0936912998D90935912A9A9A093DB1147 +:1036A0002296BFAD2297B093F50EC45BDF4F0FB6E5 +:1036B000F894DEBF0FBECDBFDF91CF911F910F9168 +:1036C000FF90EF90DF90CF90BF90AF909F908F9042 +:1036D0007F906F905F904F903F902F900895E88D6E +:1036E0008E2F90E0F9E2EF9F90011124A9014A503A +:1036F000514F5A834983598D5111A6C0AEA1AF5F76 +:10370000AEA3A53009F41EA2B1E12EA1B29FF00133 +:103710001124EF5FFD4EA9E2A89FA001A99F500DC3 +:1037200011244A50514F7A01DA018C91808311960D +:103730004D915D916D917C911497DB01CA0123E05D +:10374000880F991FAA1FBB1F2A95D1F781839283E7 +:10375000A383B483D70115964D915D916D917C91B2 +:103760001897DB01CA0133E0880F991FAA1FBB1FFE +:103770003A95D1F785839683A783B087D7011996A9 +:103780004D915D916D917C911C97DB01CA0143E0E5 +:10379000880F991FAA1FBB1F4A95D1F7818792876F +:1037A000A387B487D7011D966D917D918D919C91D2 +:1037B00050978B019C0153E0000F111F221F331FF4 +:1037C0005A95D1F7058716872787308B0E949F9AD5 +:1037D0006AAF7BAF8CAF9DAFF70125A136A147A1A2 +:1037E00050A50E94F7996FA378A789A79AA79B0174 +:1037F000AC0160E070E080EA9FE30E94F7996AAB59 +:103800007BAB8CAB9DABFFADFF2309F481C02C8952 +:103810003D894E895F896C897D898E899F890E9447 +:10382000839CD70151966D937D938D939C93549770 +:10383000BC89BF87ED89E88BFE89F98B2F892A8B9C +:103840001EAA1FAA18AE19AEE981FA8141A052A0A2 +:1038500063A074A0A301920160E070E080E09FE3A8 +:103860000E94F7996B837C838D839E83A981BA81A3 +:1038700095961C9195979696BC91B98FE981FA819E +:10388000F7A1FB8BA981BA8198960C9198975196D4 +:10389000CD90DD90ED90FC905497BFADBB2309F423 +:1038A00045C0A70196010E94839C9B01AC01612F3A +:1038B000798D8B89902F0E94DC986B837F838D8715 +:1038C0009E8720E030E0A9010E94ED9987FFF6C0B5 +:1038D000A3019201C301B2010E94DD98212F398D0D +:1038E0004B89502F0E94839C9B01AC01C701B601FC +:1038F0000E94DC980E94FE9C6C8B7D8B8E8B9F8B34 +:10390000198EE2E0EB8B1B821F821D861E86DDC0B6 +:10391000D70151966D917D918D919C9154970E9404 +:10392000FE9C6F87788B898B9A8B8ACFE88DEF5FAF +:10393000E23109F4E0E02196FFAD2197FE1709F48A +:103940009AC029E22E9FF0011124EA50F14F6189BB +:103950007289838994890E94FE9C6C8B7D8B8E8BEF +:103960009F8B2C893D894E895F896C897D898E89E1 +:103970009F890E94839C6F83788789879A879B01A0 +:10398000AC01C701B6010E94DC982B813C814D81BE +:103990005E810E94839C212F398D4B89502F0E947C +:1039A000DD9820E030E040E05FE30E94839C6B877D +:1039B0007C871C0120E030E0A9010E94439C18167E +:1039C0000CF050C1212F398D4B89502F6B857C8590 +:1039D000C1010E94ED9987FF53C1A981BA815D960B +:1039E0008D909D90AD90BC9090972F8138854985A2 +:1039F0005A85C501B4010E94DC982B813C814D8120 +:103A00005E810E94839C6E8F7F8F88A399A39B0108 +:103A1000AC016B857C85C1010E94439C181684F51E +:103A2000C501B4010E94FE9C6A8F7B8F8C8F9D8F95 +:103A3000A7019601C501B4010E94ED99882309F4FC +:103A400030C1A7019601C501B4010E94DC982B8109 +:103A50003C814D815E810E94839C9B01AC01612F62 +:103A6000798D8B89902F0E94DC986B877C871C0155 +:103A7000198E1B8A48CF1C8A1D8A1E8A1F8A71CF05 +:103A8000A3019201C301B2010E94DD982B853C8500 +:103A9000A1010E94839C2F81388549855A850E9407 +:103AA000DD980E94FE9C6A8F7B8F8C8F9D8FBB85DB +:103AB000BE8FEC85EF8F28A239A2DACF198EF2E003 +:103AC000FB8B1C8A1D8A1E8A1F8A5EAD452F50E023 +:103AD00058AB4FA786E0849FF001859FF00D11241D +:103AE000E452FE4E9EA19283A981BA819596BC9123 +:103AF0002796BFAF2797E981FA81F6A12896FFAFF5 +:103B00002897A981BA819796BC912996BFAF29972A +:103B1000E981FA81F0A52A96FFAF2A972AA93BA945 +:103B20004CA95DA927966FAD279728967FAD28975A +:103B30008B2F9F2F0E94DC9826966CAF7DAF8EAFA7 +:103B40009FAF269720E030E0A9010E94ED9987FF02 +:103B500006C026961CAE1DAE1EAE1FAE26972B8548 +:103B60003C85A1016E8D7F8D88A199A10E94ED9960 +:103B70008111A0C022E02B962FAF2B9727964FAD37 +:103B800027974AA328965FAD28975BA329968FAD08 +:103B900029978CA32A969FAD2A979DA38EE3C82EC2 +:103BA00083ECD82E8EE2E82E89E3F82E412C512C9E +:103BB0003201A70196012BA73CA74DA75EA75B8901 +:103BC000552309F487C0513009F41AC2A981BA817A +:103BD00091962D913D914D915C919497C701B601BD +:103BE0000E94839C4B015C012F85388949895A8941 +:103BF0000E94ED9987FF45C220E030E040E05FE39E +:103C0000C501B4010E94839C9B01AC016F8578893A +:103C100089899A890E94DC98A70196010E94839C59 +:103C20009B01AC016AA17BA18CA19DA10E94DC98A3 +:103C30008B012D968FAF2D972C969FAF2C979B01C4 +:103C4000AC016B817F818D859E850E94ED9987FFF8 +:103C500018C2A50194016F85788989899A890E9483 +:103C6000DC98C9C12C892A8F3D893B8F4E894C8FA6 +:103C70005F895D8F198E1B861C86212C312CF9CE15 +:103C80001B87898D8C872B88302E9F859A8FA889DA +:103C9000AB8FB989BC8FEA89ED8F198EF2E0FB8B6F +:103CA00032CE1B87298D2C872B88302E198E31E040 +:103CB0003B8B29CE31E02B963FAF2B975FCF0AA3EA +:103CC0001BA32D963FAD2D973CA32C964FAD2C9763 +:103CD0004DA375CFA981BA8191962D913D914D91BA +:103CE0005C919497C701B6010E94839C4B015C01D3 +:103CF00020E030E040E05FE30E94839C2F8538891C +:103D000049895A890E94DD98A70196010E94839CE7 +:103D10009B01AC016AA17BA18CA19DA10E94DC98B2 +:103D20008B012D968FAF2D972C969FAF2C972B85BF +:103D30003C85A1010E94ED9987FF55C12B853C85EB +:103D4000A10127966FAD279728967FAD28972996D2 +:103D50008FAD29972A969FAD2A970E94DC989B01E8 +:103D6000AC010E94DD986B017C012A8D3B8D4C8D4E +:103D70005D8D6F85788989899A890E94DD989B017C +:103D8000AC01C701B6010E94F7996B017C012B962B +:103D9000BFAD2B97BB8BEA8DEF87FB8DF88B2C8DFE +:103DA000298B3D8D3A8B0B851C852D962FAE2D973B +:103DB0002C963FAE2C97A7019601C301B2010E9439 +:103DC000DD982B013C012BA53CA54DA55EA50E94CD +:103DD000ED9987FF83C1A30192016BA57CA58DA5F9 +:103DE0009EA50E94DC986B017C0198012D964FAD39 +:103DF0002D972C965FAD2C976B817F818D859E854D +:103E00000E94ED9987FD5BCF2FA138A549A55AA542 +:103E1000B8012D968FAD2D972C969FAD2C970E94B3 +:103E2000839C6AA37BA38CA39DA30E94D6996B015C +:103E30007C016AAD7BAD8CAD9DAD0E94D6994B01E6 +:103E40005C01A70196010E94DC980E94709A6BA702 +:103E50007CA78DA79EA746E02FA538A9429FF00119 +:103E6000439FF00D1124E452FE4E8BA59CA5918337 +:103E70008083892B09F055C1BFADBB2309F451C123 +:103E80008A8D9B8DAC8DBD8D80937312909374122F +:103E9000A0937512B09376128E8D9F8DA8A1B9A1B3 +:103EA00080937F1290938012A0938112B09382121C +:103EB0008B819F81AD85BE8580936B1290936C1230 +:103EC000A0936D12B0936E128C899D89AE89BF89C3 +:103ED0008093771290937812A0937912B0937A120C +:103EE000EB89E0936A128B859C85D10180937B12CC +:103EF00090937C12A0937D12B0937E12FEADF0934E +:103F000000122EA12093581249815A8150935712C2 +:103F1000409356128AA99BA9ACA9BDA980936212AD +:103F200090936312A0936412B0936512988D90934E +:103F3000D8112FA138A549A55AA520935E12309318 +:103F40005F124093601250936112398D3093591271 +:103F500049A94093DB1110926F12109270121092C7 +:103F600071121092721210926612109267121092D1 +:103F7000681210926912C0925A12D0925B12E092AB +:103F80005C12F0925D122FA138A549A55AA5C70170 +:103F9000B6010E94F799A981BA8195966D937D9398 +:103FA0008D939C9398970E94990BB88DB093F50EC2 +:103FB000C45BDF4F0FB6F894DEBF0FBECDBFDF91FD +:103FC000CF911F910F91FF90EF90DF90CF90BF9016 +:103FD000AF909F908F907F906F905F904F903F90A9 +:103FE0002F900C94F50DA50194016F85788989892E +:103FF0009A890E94DD986F87788B898B9A8BDBCEAC +:104000002A8D3B8D4C8D5D8DC701B6010E94839C2E +:104010009B01AC016AA17BA18CA19DA10E94DC98AF +:104020008B012D968FAF2D972C969FAF2C979B01D0 +:10403000AC016E8D7F8D88A199A10E94439C1816BA +:104040000CF0B9CE2E8D3F8D48A159A16AA17BA15C +:104050008CA19DA10E94DC982A8D3B8D4C8D5D8D9D +:104060000E94F7996B017C010E8D1F8D48A12D9642 +:104070004FAF2D9759A12C965FAF2C9782E08B8B79 +:104080009ACE2B813F814D855E856AA17BA18CA153 +:104090009DA10E94DC989B01AC010E94DD986B0100 +:1040A0007C012C893D894E895F896F857889898952 +:1040B0009A890E94DD989B01AC01C701B6010E945C +:1040C000F7996B017C010B811F81BD852D96BFAFD8 +:1040D0002D97EE852C96EFAF2C976DCE26962CADB6 +:1040E0003DAD4EAD5FAD2697B8012D968FAD2D97A6 +:1040F0002C969FAD2C970E94439C18160CF084CEF2 +:104100002EE333EC4EE259E36BA57CA58DA59EA56D +:104110000E94DD986BA77CA78DA79EA7A3019201A3 +:1041200060CE2EA93FA948AD59ADC301B2010E948E +:10413000DD982B013C012AA13BA14CA15DA1C50149 +:10414000B4010E94DC989B01AC01C301B2010E9442 +:10415000F7994B015C012AA13BA14CA15DA1C701CC +:10416000B6010E94DC98A50194010E94839C6EAB6D +:104170007FAB88AF99AF20EC31EE44E65EE4C50139 +:10418000B4010E94839C0E94D6990E94709A603D5F +:10419000E7E07E078105910508F045C046E02FA5C0 +:1041A00038A9429FF001439FF00D1124E452FE4EC6 +:1041B000158246E02FA538A9429FF001439FF00DDC +:1041C0001124E452FE4E74836383B9A8B39496E03D +:1041D000B91201C0B12C98012D964FAD2D972C9698 +:1041E0005FAD2C976B817F818D859E850E94ED99B7 +:1041F00087FF72C0C8012D96AFAD2D972C96BFAD2D +:104200002C97E981FA8185A396A3A7A3B0A7FAA169 +:10421000FAAF2BA12BAF3CA13CAF4DA14DAF49A9AB +:104220004EAFB9AA09C9603A5FE0750781059105EB +:10423000A0F526E0AFA5B8A92A9FF0012B9FF00DAD +:104240001124E452FE4E31E0358346E02FA538A913 +:10425000429FF001439FF00D1124E452FE4E258150 +:10426000022E04C096958795779567950A94D2F7A4 +:10427000ABA5BCA502C0AA0FBB1F2A95E2F7B1836C +:10428000A08361157105B1E08B07910508F491CF0A +:104290008FEF9FEF9483838398CF60344FE174074F +:1042A0008105910560F426E0AFA5B8A92A9FF00129 +:1042B0002B9FF00D1124E452FE4E32E0C5CFA6E054 +:1042C0004FA558A9A49FF001A59FF00D1124E45219 +:1042D000FE4EB3E0B583B9CF20E030E0A901B801CC +:1042E0002D968FAD2D972C969FAD2C970E94439CB9 +:1042F00018160CF06BC08A8D9B8DAC8DBD8D809394 +:10430000731290937412A0937512B09376128E8DDF +:104310009F8DA8A1B9A180937F1290938012A09342 +:104320008112B09382128B819F81AD85BE8580936F +:104330006B1290936C12A0936D12B0936E128C89D5 +:104340009D89AE89BF898093771290937812A0934C +:104350007912B0937A125B8950936A128B859C858F +:10436000D10180937B1290937C12A0937D12B09325 +:104370007E1289A9809300129EA190935812A98160 +:10438000BA81B0935712A09356122AA93BA94CA9FF +:104390005DA920936212309363124093641250938C +:1043A0006512388D3093D8118FA198A5A9A5BAA50B +:1043B00080935E1290935F12A0936012B09361128B +:1043C000998D90935912B092DB11C5CD2196EFAD26 +:1043D0002197F88DEF1779F08F2F8F5F823109F4D5 +:1043E00080E0288D22963FAD2297231303C02296AA +:1043F0008FAF2297888F1A82198211CF20E030E088 +:10440000A9016F85788989899A890E94ED9981111E +:104410000C9490194AC9CF92DF92EF92FF92CF93FA +:10442000DF93C82F6A017B0120E030E0A901CB01B6 +:10443000B6010E94ED9987FD04C1C43608F449C055 +:10444000C45680E0C330E0F5EC2FF0E0EE0FFF1F24 +:10445000EE0FFF1F8230B9F0833059F1813081F0C7 +:10446000E05AFA4EC082D182E282F3820E941B118E +:1044700080E0DF91CF91FF90EF90DF90CF90089593 +:10448000E459FA4EEFCFEF01C858DA4E20E030E0A1 +:1044900040E752E4C701B6010E94839C20E030E06F +:1044A00040E752E40E94839C688379838A839B83DC +:1044B000DDCFEC57FA4EF7FAF094F7F8F094D2CF3C +:1044C0008F5FCA3008F4BFC0843009F4BCC0CA5042 +:1044D000B9CFC701B6010E94429D0E94709ACC31AB +:1044E00008F0B1C0EC2FF0E08827E658FD4D8F4F63 +:1044F0000C94CA9D96229D22A022A522A822B22217 +:10450000BA22232323232323C222C522CE22D72249 +:10451000232323232323232323232323DF22E922EB +:10452000F522FD22002309231223182386E063309D +:1045300008F49FCF6093901599CF6093931596CF11 +:10454000609391150E94BB0B91CF60939215FACFA7 +:1045500080919D15662321F0846080939D1586CF00 +:104560008B7FFBCF80919D15662311F08064F5CF82 +:104570008F7BF3CF80919D15662311F08068EDCF7E +:104580008F77EBCF6093941571CFC0929515D09231 +:104590009615E0929715F092981568CFC0929915EC +:1045A000D0929A15E0929B15F0929C155FCF809166 +:1045B0009D15662311F08160D0CF8E7FCECF809184 +:1045C0009D15662321F084FF40C08062C6CF8F7D99 +:1045D000C4CF80919D15662331F0886080939D152E +:1045E0000E94321043CF877FF9CF80919D156623BB +:1045F00011F08061B2CF8F7CB0CF60939E1536CF23 +:10460000C0929F15D092A015E092A115F092A2152C +:104610002DCFC092A315D092A415E092A515F092CB +:10462000A61524CF70E07093A8156093A7151ECF30 +:10463000C092A915D092AA15E092AB15F092AC15D4 +:1046400015CF84E016CF83E014CF8AE012CF1F93FA +:10465000CF93DF93CDB7DEB7C058D1090FB6F8942A +:10466000DEBF0FBECDBFAE0149575F4FFA0161916A +:104670007191AF01CE0101960E94509E10E0E1E0E1 +:10468000F0E0EC0FFD1FE10FF11D808181110BC0E7 +:10469000C058DF4F0FB6F894DEBF0FBECDBFDF911D +:1046A000CF911F9108950E94300C1F5FE8CFCF92E9 +:1046B000DF92EF92FF921F93CF93DF93CDB7DEB7D8 +:1046C000362F142FCDB6DEB64DB75EB7411B51095C +:1046D0000FB6F8945EBF0FBE4DBF4F5F5F4F7A01BC +:1046E000242FFA01632F0E94699D91939E2F921BA4 +:1046F0009117C0F3F701E10FF11D31978081805DC3 +:104700000E94300C1150B1F70FB6F894DEBE0FBE08 +:10471000CDBEDF91CF911F91FF90EF90DF90CF90B2 +:10472000089541E08A3020F043E0843608F442E006 +:104730006AE00C945723CF93C82F81EC9AE00E9433 +:10474000B80DEFEFEC0FE43308F076C0F0E0882707 +:10475000E355FC4D8F4F0C94CA9DE123EA23ED23D2 +:10476000F023F323F623F923FC23FF23022405245B +:104770001C241C241C241C241C241C241C241C2439 +:104780000D240A2410241C241C241C241C241C2456 +:104790001C241C241C241C241C241C241C241C2419 +:1047A0001C241C241C241C241C241C241C241C2409 +:1047B0001C241C241C241C241C241C241324162408 +:1047C000192489EA9AE00E94B80D84ED99E0CF910E +:1047D0000C94B80D87E99AE0F6CF85E89AE0F3CF1C +:1047E0008BE79AE0F0CF8AE69AE0EDCF8BE59AE08E +:1047F000EACF8AE39AE0E7CF81E39AE0E4CF86E26A +:104800009AE0E1CF83E19AE0DECF8CE292E00E9471 +:10481000C60DDBCF8DEF99E0D6CF81E392E0F7CFE5 +:1048200089EE99E0D0CF86E392E0F1CF8BE392E07E +:10483000EECF80E492E0EBCF87ED99E00E94B80DD7 +:104840008C2F0E949123C1CF1F93CF93DF93CDB7BD +:10485000DEB72C970FB6F894DEBF0FBECDBF90E049 +:1048600080E00E9431118930E1F08FEF0E946C14DA +:1048700010E0BE016F5F7F4F812F0E944B148111AA +:1048800003C087E00E949B231F5F183091F72C968E +:104890000FB6F894DEBF0FBECDBFDF91CF911F9151 +:1048A00008954DE450E061E078E080E695E10E94F3 +:1048B0006111892BD1F220E030E048EC55E46091A1 +:1048C00060157091611580916215909163150E9439 +:1048D000ED998111CACF20E030E048EC55E46091B9 +:1048E00064157091651580916615909167150E9409 +:1048F000ED998111BACF20E030E048EC55E46091A9 +:1049000068157091691580916A1590916B150E94D8 +:10491000ED99882309F4ACCFA8CF80910401837866 +:1049200080930401809103018C77803489F440E006 +:1049300050E060E87FE384E00E940B2265E472E0CF +:1049400085E992E10E94F79D40E050E0BA0115C070 +:10495000809103018C77B1F440E050E060E87FE3A0 +:1049600084E00E940B226CE472E085E992E10E94EF +:10497000F79D40E050E060EE70E483E00E940B227F +:104980000C942424809103018C77803251F440E010 +:1049900050E060E87FE384E00E940B2263E572E070 +:1049A000CFCF809103018C77803161F48091030136 +:1049B00040E050E060E87FE384E00E940B226AE57B +:1049C00072E0BECF40E050E060E87FE384E00E9408 +:1049D0000B2261E672E0B4CF8F929F92AF92BF92AA +:1049E000EF92FF920F931F93CF938EEC99E00E946A +:1049F000B80D8FEBE82E85E1F82E00E615E1C0E05A +:104A0000F70161917191819191917F01F8018190FC +:104A10009190A190B1908F010E94A19AA50194015B +:104A20000E94F7990E942B0DC23021F08CEC99E086 +:104A30000E94B80DCF5FC33019F78AEC99E00E944D +:104A4000B80D8091CB150E94912386EC99E0CF910F +:104A50001F910F91FF90EF90BF90AF909F908F901C +:104A60000C94B80D48E062E00C9457232F923F92CB +:104A70004F925F926F927F928F929F92AF92BF926E +:104A8000CF92DF92EF92FF920F931F93CF93DF931A +:104A9000CDB7DEB7E3970FB6F894DEBF0FBECDBF3C +:104AA000498F5A8F6B8F072F2BAB2091D9112CA7D1 +:104AB000422F50E059A348A3E9E22E9F9001112410 +:104AC000F901EA50F14F158616861786108A15A24D +:104AD00016A217A210A6108249E956E766E97EE7FA +:104AE00041A352A363A374A31C0140E655E15DA357 +:104AF0004CA3CE0101969F8F8E8F4CE85DE05EA7A0 +:104B00004DA7C9018950914F9BA78AA79E01235F9A +:104B10003F4F3BA32AA338AB2FA75FA34EA380E64A +:104B200095E19D8F8C8F10E03F013D96FAABE9AB8C +:104B30002301F5E24F0E511CF101619171918191B8 +:104B400091911F01EC8DFD8D81909190A190B1907C +:104B5000FD8FEC8FA50194010E94839C0E94509CC4 +:104B6000EE8DFF8D6193719381939193FF8FEE8F03 +:104B7000EEA1FFA1C190D190E190F190FFA3EEA32F +:104B80006C197D098E099F099B01AC0197FF07C035 +:104B900022273327A901261B370B480B590BEAA5FF +:104BA000FBA52193319341935193FBA7EAA7E9A970 +:104BB000FAA9C080D180E280F380C216D306E40651 +:104BC000F50610F469017A01E9A9FAA9C082D18237 +:104BD000E282F3820E94A19AA50194010E94F799B2 +:104BE0004B015C01EFA5F8A981929192A192B1923B +:104BF000F8ABEFA720E030E0A9010E94ED9987FF14 +:104C00000BC091E0112321F094E0113009F492E0FF +:104C1000F3018081892B8083A5019401C501B40132 +:104C20000E94839CF20120813181428153810E9444 +:104C3000DD98F20160837183828393831F5F133059 +:104C400009F07ACF0E94FE9C4B015C01F201808248 +:104C50009182A282B382CD28CE28CF2809F414C233 +:104C600020E030E0A901698D7A8D8B8D902F0E9414 +:104C7000ED9987FD81C1FBA9FF2361F0A501940196 +:104C8000698D7A8D8B8D902F0E94839C698F7A8F8E +:104C90008B8F092F20E030E0A901698D7A8D8B8DF3 +:104CA000902F0E94ED9987FF04C0198E1A8E1B8EDB +:104CB00000E0A501940160E070E080E89FE30E94BD +:104CC000F7996EA37FA388A799A78AA19BA10C96A9 +:104CD0009BA78AA7C12CD12C760129E2E8A1F9A1D2 +:104CE0002E9FC0012F9F900D11249C01295E304FF3 +:104CF0003F8F2E8FEAA1FBA181909190A190B1905E +:104D0000FBA3EAA320E030E0A901C501B4010E94A1 +:104D1000ED99882309F473C02EA13FA148A559A598 +:104D2000C501B4010E94839C2B013C01EAA1FBA1B7 +:104D300034974082518262827382AC019B0160E0B1 +:104D400070E080E89FE30E94F7994B015C01E894D2 +:104D5000B7F8ECA1FDA12485358546855785C501A9 +:104D6000B4010E94839C1B018C8F192F298D3A8DD1 +:104D70004B8D502F0E94439C18162CF0298E3A8E92 +:104D8000FC8DFB8F012FEE8DFF8D20803180F28115 +:104D9000FC8FEE8DFF8D1381ECA1FDA1208D318D57 +:104DA000428D538DC501B4010E94839C4B015C016F +:104DB0009B01AC01B1018C8D912F0E94ED9987FD73 +:104DC00003C01401AC8E1B2DC101AC8DB12FEE8D33 +:104DD000FF8D80839183A283B383EDA5FEA52485F7 +:104DE000358546855785C301B2010E94839C9B018E +:104DF000AC01C701B6010E94DC986B017C012DA5B6 +:104E00003EA52C5F3F4F3EA72DA74CA15DA14C5F57 +:104E10005F4F5DA34CA38AA59BA5EAA1FBA18E17BA +:104E20009F0709F067CF8091D811FCA5F813ACC09B +:104E300089E228A139A1829FF001839FF00D1124FE +:104E4000EA50F14F118A128A138A148A118E128E37 +:104E5000138E148E298D3A8D4B8D502F698D7A8D3E +:104E60008B8D902F0E94839C7B018C0189E228A16D +:104E700039A1829FF001839FF00D1124EA50F14F78 +:104E8000C701D801858F968FA78FB0A3A18CB28C54 +:104E9000C38C848C6090A40D7090A50D9090A60D8D +:104EA000D090A70D9301492D5D2DB701C8010E9437 +:104EB000ED9987FF03C03701902ED12E9301492D24 +:104EC0005D2DB5018C2D982D0E94ED9987FD03C0B5 +:104ED0005301C92C8D2C89E248A159A1849FF0016E +:104EE000859FF00D1124EA50F14FC501AC2DB82D6E +:104EF000858B968BA78BB08F8CE0FE013D96A8E941 +:104F0000BDE001900D928A95E1F7C701D801809329 +:104F1000A40D9093A50DA093A60DB093A70D8CE0C2 +:104F2000FE013196ACE8BDE001900D928A95E1F763 +:104F300080918B0D8093D9118F5F823109F480E0CD +:104F400080938B0DE3960FB6F894DEBF0FBECDBFF6 +:104F5000DF91CF911F910F91FF90EF90DF90CF9055 +:104F6000BF90AF909F908F907F906F905F904F9089 +:104F70003F902F900C94F50D29E9298F36E73A8F51 +:104F800046E94B8F0EE795CE2FEE3FEF4FE75FE3FD +:104F9000C701B6010E94439C18165CF489E248A13F +:104FA00059A1849FF001859FF00D1124EA50F14F23 +:104FB0004DCF2FEE3FEF4FE75FEBC701B6010E94E9 +:104FC000439C181644F08FEEC82EDD24DA948FE748 +:104FD000E82E8FEBF82EA701960160E070E080E8E4 +:104FE0009FE30E94DC9820E030E040E05FE30E9415 +:104FF000839C0E94FE9C6B017C0189E228A139A15F +:10500000829FF001839FF00D1124EA50F14F20910F +:10501000951530919615409197155091981561A16D +:1050200072A183A194A10E94839CA70196010E9472 +:10503000839C4B015C01A701960160E070E080E871 +:105040009FE30E94DC989B01AC01C501B4010E9462 +:10505000F7996B017C0120E030E0A9010E94ED99F5 +:1050600087FF03C0C12CD12C760189E248A159A148 +:10507000849FF001859FF00D1124EA50F14FC18EFD +:10508000D28EE38EF48EE6CEE3960FB6F894DEBFB2 +:105090000FBECDBFDF91CF911F910F91FF90EF9089 +:1050A000DF90CF90BF90AF909F908F907F906F9048 +:1050B0005F904F903F902F9008956A307105810561 +:1050C000910570F425E02A95F1F70000615071090F +:1050D00081099109611571058105910571F708959F +:1050E000643671058105910548F4E5E3EA95F1F729 +:1050F00000006A50710981099109ECCFEFE8F1E0F5 +:105100003197F1F700C000006456710981099109D7 +:10511000E1CFCF93DF93D82FC8E05E98559AD7FFA1 +:1051200028C05D9A65E070E080E090E00E945D2814 +:105130005E9A65E070E080E090E00E945D285E98F5 +:10514000DD0F65E070E080E090E00E945D28C150D6 +:1051500021F762E070E080E090E00E945D28559ABF +:105160005D9A62E070E080E090E0DF91CF910C9476 +:105170005D285D98D7CF5E98559A5D9865E070E0A0 +:1051800080E090E00E945D285E9A65E070E080E03B +:1051900090E00E945D28559A5D9A65E070E080E09D +:1051A00090E00C945D28559A5D9A62E070E080E092 +:1051B00090E00E945D285E9A62E070E080E090E0FE +:1051C0000E945D2855988BEF4D9909C05E9862E06A +:1051D00070E080E090E00E945D2880E008958150BA +:1051E00099F70E94BB2881E00895559A5D9A5E9ACE +:1051F00065E070E080E090E00E945D28559A5D983F +:1052000065E070E080E090E00E945D285E9862E0DA +:1052100070E080E090E00C945D28CF93DF93D82F6E +:10522000C8E0809102018F77809302018091010193 +:1052300084608093010180910201D7FF3AC08460AD +:105240008093020165E070E080E090E00E945D28BC +:105250008091020180688093020165E070E080E047 +:1052600090E00E945D28809102018F778093020177 +:10527000DD0F65E070E080E090E00E945D28C150A5 +:1052800081F662E070E080E090E00E945D2880910D +:105290000101846080930101809102018460809308 +:1052A000020162E070E080E090E0DF91CF910C9429 +:1052B0005D288B7FC5CF0F931F93CF93DF93C2E001 +:1052C000D1E088818F77888301E011E0F801808147 +:1052D0008460808388818B7F888365E070E080E0D4 +:1052E00090E00E945D2888818068888365E070E096 +:1052F00080E090E00E945D28F801808184608083D6 +:1053000088818460888365E070E080E090E0DF91D0 +:10531000CF911F910F910C945D28809101018460C1 +:10532000809301018091020184608093020162E018 +:1053300070E080E090E00E945D288091020180682A +:105340008093020162E070E080E090E00E945D28BE +:10535000809101018B7F809301018BEF909100017F +:1053600092FD0DC0809102018F778093020162E06F +:1053700070E080E090E00E945D2880E00895815018 +:1053800069F70E945B2981E008950F931F93CF93E3 +:10539000DF9301E011E0F801808184608083C2E046 +:1053A000D1E088818460888388818068888365E013 +:1053B00070E080E090E00E945D28F80180818460C8 +:1053C000808388818B7F888365E070E080E090E057 +:1053D0000E945D2888818F77888362E070E080E09A +:1053E00090E0DF91CF911F910F910C945D28CF93A6 +:1053F000DF93D82FC8E04398399AD7FF28C0419A45 +:1054000065E070E080E090E00E945D28439A65E0EE +:1054100070E080E090E00E945D284398DD0F65E039 +:1054200070E080E090E00E945D28C15021F762E0CA +:1054300070E080E090E00E945D28399A419A62E035 +:1054400070E080E090E0DF91CF910C945D2841986E +:10545000D7CF4398399A419865E070E080E090E0BA +:105460000E945D28439A65E070E080E090E00E9431 +:105470005D28399A419A65E070E080E090E00C94F4 +:105480005D28399A419A62E070E080E090E00E94E5 +:105490005D28439A62E070E080E090E00E945D2821 +:1054A00039988BEF319909C0439862E070E080E051 +:1054B00090E00E945D2880E00895815099F70E9455 +:1054C000292A81E00895399A419A439A65E070E06B +:1054D00080E090E00E945D28399A419865E070E094 +:1054E00080E090E00E945D28439862E070E080E0F8 +:1054F00090E00C945D28CF93DF93C82FD62F813096 +:1055000009F46EC028F0823009F406C1C0E064C01E +:105510000E94632A8CE60E94F7290E94412A8D2F5F +:105520000E94F7290E94412A0E94632A8DE60E9468 +:10553000F7290E94412A62E070E080E090E00E943A +:105540005D28399A419A62E070E080E090E00E9424 +:105550005D28D8E0439865E070E080E090E00E942C +:105560005D28439ACC0F65E070E080E090E00E94F7 +:105570005D2839983199C16065E070E080E090E085 +:105580000E945D28D15031F74398399A419A62E0E0 +:1055900070E080E090E00E945D28439A65E070E052 +:1055A00080E090E00E945D28439862E070E080E037 +:1055B00090E00E945D28399A419A62E070E080E0B4 +:1055C00090E00E945D28439862E070E080E090E007 +:1055D0000E945D280E94292A8C2FDF91CF91089587 +:1055E0000E94C5298CE60E940D290E948D298D2FCD +:1055F0000E940D290E948D290E94C5298DE60E94D6 +:105600000D290E948D2962E070E080E090E00E9408 +:105610005D288091010184608093010180910201E5 +:1056200084608093020162E070E080E090E00E947C +:105630005D28D8E0C0E0809102018F77809302015D +:1056400065E070E080E090E00E945D2880910201BA +:10565000806880930201CC0F65E070E080E090E00C +:105660000E945D28809101018B7F809301018091D0 +:10567000000182FDC16065E070E080E090E00E9482 +:105680005D28D150C1F6809102018F77809302018D +:105690008091010184608093010180910201846006 +:1056A0008093020162E070E080E090E00E945D285B +:1056B0008091020180688093020165E070E080E0E3 +:1056C00090E00E945D28809102018F778093020113 +:1056D00062E070E080E090E00E945D28809101012E +:1056E00084608093010180910201846080930201B3 +:1056F00062E070E080E090E00E945D28809102010D +:105700008F778093020162E070E080E090E00E9479 +:105710005D280E945B2960CF0E94F5288CE60E94DC +:1057200089280E94D3288D2F0E9489280E94D3287F +:105730000E94F5288DE60E9489280E94D32862E005 +:1057400070E080E090E00E945D28559A5D9A62E0EA +:1057500070E080E090E00E945D28D8E0C0E05E98B4 +:1057600065E070E080E090E00E945D285E9ACC0FDA +:1057700065E070E080E090E00E945D2855984D99CA +:10578000C16065E070E080E090E00E945D28D1504B +:1057900031F75E98559A5D9A62E070E080E090E0A3 +:1057A0000E945D285E9A65E070E080E090E00E94D3 +:1057B0005D285E9862E070E080E090E00E945D28E5 +:1057C000559A5D9A62E070E080E090E00E945D286A +:1057D0005E9862E070E080E090E00E945D280E94A8 +:1057E000BB28FACEAF92BF92CF92DF92EF92FF9298 +:1057F0000F931F93CF93DF93E82E6EE00E947B2AD6 +:10580000082F6FE08E2D0E947B2A102F082FE801B1 +:10581000680184E0A82EB12C6EE08E2D0E947B2AB8 +:10582000F82E6FE08E2D0E947B2A9F2D08171907F6 +:1058300008F48C018C159D0508F46C01C80FD91F64 +:1058400021E0A21AB10841F7CE01801B910B8C19FF +:105850009D0963E070E00E94759DCB01613070414D +:1058600010F090E080E0DF91CF911F910F91FF90B9 +:10587000EF90DF90CF90BF90AF900895CF92DF92DE +:10588000EF92FF920F931F937C010E94F22B8C01E9 +:1058900030E020E041E0E416F10409F44FC082E07A +:1058A000E816F10409F47AC08091C3149091C414ED +:1058B000B0E0A0E06C017D01C01AD10AE20AF30A4F +:1058C00041E0C41648E0D406E104F10464F19051CB +:1058D000A109B109BC01CD01601B710B820B930BB7 +:1058E00045E2C42E49E0D42E43E0E42E42E4F42EF7 +:1058F0000E94A19A20E030E044EB53E40E94839C94 +:1059000020E030E040E859E30E94839C9B01AC0119 +:10591000C701B6010E94DC981F910F91FF90EF9094 +:10592000DF90CF900895C11448EFD4064FEFE406FE +:10593000F40684F6905FAF4FBF4FCCCF8091C51473 +:105940009091C614B0E0A0E06C017D01C01AD10AAC +:10595000E20AF30A41E0C41648E0D406E104F10487 +:1059600094F09051A109B109BC01CD01601B710BEC +:10597000820B930B39E0C32E36EFD32E31EBE32E9F +:1059800032E4F32EB5CFC11448EFD4064FEFE4064E +:10599000F40654F7905FAF4FBF4FE6CF8091C1142C +:1059A0009091C214B0E0A0E06C017D01C01AD10A50 +:1059B000E20AF30A41E0C41648E0D406E104F10427 +:1059C00084F09051A109B109BC01CD01601B710B9C +:1059D000820B930BC12CD12C24EBE22E22E4F22E6D +:1059E00087CFC11448EFD4064FEFE406F40664F7FE +:1059F000905FAF4FBF4FE8CF8F929F92AF92BF9211 +:105A0000CF92DF92EF92FF920F931F93CF93DF938A +:105A10000FEA15E182E2F80111928A95E9F70E94F6 +:105A2000D20D0E94451090E080E00E943E2CCCE018 +:105A3000D5E16E877F87888B998B81E090E00E940B +:105A40003E2C6A8B7B8B8C8B9D8B82E090E00E943E +:105A50003E2C6E8B7F8B888F998FF801C480D58008 +:105A6000E680F780CEA2DFA2E8A6F9A6C084D184A2 +:105A7000E284F384CAA6DBA6ECA6FDA60485158500 +:105A8000268537850EA71FA728AB39AB20E030E06D +:105A900044EB52E40E94DC987B018C012A893B890B +:105AA0004C895D896E857F8588899989E6E48E2E8B +:105AB000E5E19E2EF2E4AF2EF5E1BF2EAEE3CA2E55 +:105AC000A5E1DA2E0E946512DF91CF911F910F910F +:105AD000FF90EF90DF90CF90BF90AF909F908F900E +:105AE0000895019708F40895EFE9FFE03197F1F781 +:105AF00000C00000F6CFBF92CF92DF92EF92FF92EC +:105B00000F931F93CF93DF9300D01F92CDB7DEB7D3 +:105B10006C01B62EEFEFE60F00E0E43020F4F0E089 +:105B2000E15FFD4F00813C2D3F7710E081E890E080 +:105B3000801B910B381719060CF44CC040E8E42E7A +:105B4000E31AF12C9701A60160EA70E0CE010196FC +:105B50000E945A0A85E090E00E94712D98012E194A +:105B60003F09A6014E0D5F1D60EA70E081E090E004 +:105B70008C0F9D1F8E0D9F1D0E945A0A82E0B81641 +:105B800081F184E0B816E9F181E0B8123FC01981D3 +:105B9000612F70E090E080E00E949F9A103261F4E3 +:105BA00088E692E09F938F930E9427230F900F9097 +:105BB00060E070E080E092E40F900F900F900F9003 +:105BC000DF91CF911F910F91FF90EF90DF90CF90D9 +:105BD000BF9008959801A60160EA70E0CE01019699 +:105BE000CBCF6981862F90E0982F88276A81680F34 +:105BF000792F711D072E000C880B990B0E94A19A1A +:105C0000DBCF69817A818B819C81D6CF60E070E0A7 +:105C1000CB01D2CF8091C7149091C81401970297FD +:105C2000E8F49C9A9D9A839A8B98A498809103019A +:105C30008C778031A1F48091C7149091C81401979A +:105C400071F4A598A49A82E390E00E94712DA49823 +:105C500083E090E09093C8148093C7140895A59AA8 +:105C6000F7CFEF92FF920F931F93CF93DF93F82E0E +:105C7000D92FE62E142F052FC22F269A279A2E9A57 +:105C80002F9A0E944E0A8E2D0E94170A0E94380AEF +:105C9000882349F0C1E08C2FDF91CF911F910F91A4 +:105CA000FF90EF900895802F0E94170A0E94380AF3 +:105CB0008111F0CF812F0E94170A0E94380A0F2D00 +:105CC0001D2F8111E7CFC11103C00E942C0AE3CF21 +:105CD000F80181918F010E94170AC1500E94380A71 +:105CE000882319F00E942C0AD5CF85E090E00E940D +:105CF000712DE9CFAF92BF92CF92DF92EF92FF92D8 +:105D00000F931F93CF93DF9300D01F92CDB7DEB7D1 +:105D10007B01813009F44FC0823011F452EAA52E84 +:105D200081508230C8F5C901B801423009F446C03B +:105D3000443009F44AC010E000E0413029F40E94E8 +:105D4000709A698301E010E02E2D2F77B12C81E845 +:105D500090E0801B910B28171906F4F180E8C82EFB +:105D6000C21AD12C9601A701B501CE0101960E945D +:105D7000312E85E090E00E94712D98012C193D098B +:105D8000A6014E0D5F1DB50181E090E08C0F9D1FB7 +:105D90008C0D9D1D0E94312E0F900F900F900F9033 +:105DA000DF91CF911F910F91FF90EF90DF90CF90F7 +:105DB000BF90AF90089590EAA92EB2CF0E94699A41 +:105DC00079836A8302E010E0BFCF69837A838B8393 +:105DD0009C8304E010E0B8CF9801A701B501CE0183 +:105DE0000196D8CF2F923F924F925F926F927F92FF +:105DF0008F929F92AF92BF92CF92DF92EF92FF92DB +:105E00000F931F93CF93DF93CDB7DEB7C459D1095A +:105E10000FB6F894DEBF0FBECDBF853A28E09207DB +:105E200009F41BC1FB01863A38E0930708F0C7C0AC +:105E30008B34A8E09A0709F4D3C398F5833E27E092 +:105E4000920709F4F5C2F8F48231910509F4F0C221 +:105E50008C3C910509F4F1C2419701F580919D15A3 +:105E600082FFDEC28A9A80910801816080930801D6 +:105E70005F9A0E947F088FE080934A150E94FC2C55 +:105E800090E080E0ECC08934A8E09A0709F486C36A +:105E900008F08DC38834984009F420C381E090E075 +:105EA000DEC08B3938E0930709F461C4E8F489391E +:105EB000B8E09B0709F4B2C308F00FC48C349840D3 +:105EC00069F78081863511F00C94D53C818180532F +:105ED000823010F00C94D93C813009F49AC31092AE +:105EE000561590E080E0BBC0823AA8E09A0709F41A +:105EF0008BC450F58D39984089F68E010F5F1F4F86 +:105F00001F930F938DE892E09F938F93FF936F936E +:105F10000E942E9E0F900F900F900F900F900F9059 +:105F2000181619060CF452C41F9281E08F9388E76B +:105F300092E09F938F930E9427230F900F900F90D2 +:105F40000F9082E390E08BC0833A38E0930709F426 +:105F5000AAC4843A984009F0A1CF8E010F5F1F4F69 +:105F60001F930F93CE01CD969F938F9344979F934A +:105F70008F937E0121E5E20EF11CFF92EF9284EBFC +:105F800092E09F938F93FF936F930E942E9E0FB684 +:105F9000F894DEBF0FBECDBF04970CF037C51F923B +:105FA00081E08F9388E792E09F938F930E9427234D +:105FB0000F900F900F900F9082E390E050C0803CC4 +:105FC000B8E09B0711F40C94303908F062C08E3AA7 +:105FD00038E0930709F4AEC798F48C3AB8E09B0711 +:105FE00009F458C508F084C6873A984009F056CF9E +:105FF0008FEF0E946C140E948D2490E080E02FC0EF +:10600000883BA8E09A0711F40C94F038E0F4873B41 +:10601000984009F043CF8081863511F00C94F53C0F +:1060200081818053833010F00C94F93C813011F45D +:106030000C94C038823011F40C94D8380E940A2E87 +:1060400090E080E00CC0893B38E0930711F40C9499 +:1060500007398A3B984009F021CF90E080E0CC5688 +:10606000DF4F0FB6F894DEBF0FBECDBFDF91CF91EB +:106070001F910F91FF90EF90DF90CF90BF90AF9066 +:106080009F908F907F906F905F904F903F902F9058 +:1060900008958A36B9E09B0711F40C94873BC0F54C +:1060A000803639E0930711F40C94CE398136A9E09B +:1060B0009A0711F40C942D3B813C984009F0EECEE8 +:1060C000CE0101969F938F9344969F938F9382E482 +:1060D00093E09F938F93FF936F930E942E9E0FB632 +:1060E000F894DEBF0FBECDBF029714F00C94753943 +:1060F0001F9281E08F9388E792E09F938F930E9495 +:1061000027230F900F900F900F9082E390E0A7CF7E +:106110008C3629E0920711F40C94213C10F40C9475 +:10612000CF3B8D36A9E09A0711F40C94733C843C64 +:10613000994009F0B3CE8998E7EF2E2EE3E13E2E89 +:10614000810182E090E00E94F22BF801819391930B +:106150008F0170E9E72EFF24F394889A6AE070E0DB +:1061600080E090E00E945D2888986CE271E080E019 +:1061700090E00E945D28F1E0EF1AF10871F788EED7 +:1061800093E00E94712D24E10F3B1207D1F682E0CB +:1061900090E00E94F22B9093C0148093BF14899AD0 +:1061A00000E21EE4889A6AE070E080E090E00E94DD +:1061B0005D2888986CE271E080E090E00E945D28A4 +:1061C0000150110979F78F986EE0E62EF12C00E965 +:1061D00011E08E9A6AE070E080E090E00E945D2815 +:1061E0008E986CE271E080E090E00E945D280150A2 +:1061F000110979F731E0E31AF10849F788EE93E0E5 +:106200000E94712D8F9A57E7452E53E1552E62015A +:1062100010E000E090E080E00E94F22BD6018D9328 +:106220009D936D0140E9E42EFF24F3948E9A6AE079 +:1062300070E080E090E00E945D288E9864EF71E04D +:1062400080E090E00E945D28B1E0EB1AF10871F760 +:106250000E30110511F580910B018D7F80930B019C +:10626000E12C32E3F32E80910B01886080930B01C7 +:106270006AE070E080E090E00E945D2880910B0170 +:10628000877F80930B016CE271E080E090E00E94D8 +:106290005D28E1E0EE1AF10831F788EE93E00E9404 +:1062A000712D0F5F1F4F0F33110509F0B3CF90E031 +:1062B00080E00E94F22B9093F6138093F5138F9851 +:1062C00000E51DE28E9A6AE070E080E090E00E94B6 +:1062D0005D288E986CE271E080E090E00E945D287D +:1062E0000150110979F788EE93E00E94712D809199 +:1062F0000B01826080930B0100E913E380910B0195 +:10630000886080930B016AE070E080E090E00E947A +:106310005D2880910B01877F80930B016CE271E017 +:1063200080E090E00E945D280150110939F788EE65 +:1063300093E00E94712D80910B018D7F80930B0162 +:106340009DEFC92E92E1D92E25E7E22E23E1F22E10 +:10635000860181E090E00E94F22BD8018D939D93FD +:106360008D0180E9682E7724739480910B018860F9 +:1063700080930B016AE070E080E090E00E945D286D +:1063800080910B01877F80930B016CE271E080E0CC +:1063900090E00E945D28B1E06B1A710831F788EE39 +:1063A00093E00E94712DE016F10699F681E090E0ED +:1063B0000E94F22B909376138093751381E090E006 +:1063C000F10161911F017C01FFEFEF1AFF0A0E94AA +:1063D0004B10C7018B3C910599F7D2016D912D01AE +:1063E00087010F5F1F4FC7010E944B1078010B34CC +:1063F000B1E01B0791F7F60161916F017801FFEFA2 +:10640000EF1AFF0AC8010E944B10870125ECE21623 +:1064100021E0F20681F70E94FC2C90E080E01FCE84 +:106420008A98809108018E7F809308015F9821CD22 +:106430000E94670890E080E012CE8E010F5F1F4F30 +:106440001F930F938DE692E09F938F93FF936F932B +:106450000E942E9E0F900F900F900F900F900F9014 +:106460001816190684F01F9281E08F9388E792E056 +:106470009F938F930E9427230F900F900F900F9060 +:1064800082E390E0ECCD1D8A1E8A1F8A188EAE0131 +:106490004B5E5F4F70E060E0C8010E94600F882390 +:1064A000D1F04D895E896F89788D88E70E940B2233 +:1064B0004D895E896F89788D89E70E940B224D890D +:1064C0005E896F89788D8AE70E940B220E942424BE +:1064D00090E080E0C4CD82E390E0C1CD8E010F5FFB +:1064E0001F4F1F930F9384E892E09F938F93FF9326 +:1064F0006F930E942E9E0F900F900F900F900F9011 +:106500000F901816190684F01F9281E08F9388E788 +:1065100092E09F938F930E9427230F900F900F90EC +:106520000F9082E390E09BCDAE014B5E5F4F70E039 +:1065300060E0C8010E94600F882369F120E030E02C +:106540004AE754E46D897E898F89988D0E94839CE7 +:106550000E94699A161617064CF0109209151092AF +:106560000B1510920A1590E080E079CD70930B1511 +:1065700060930A1511E01093091580910815811197 +:1065800007C00E94FA061093081590E080E067CDDE +:1065900090E080E064CD82E390E061CD1092091537 +:1065A00010920B1510920A1590E080E058CD808172 +:1065B000863511F00C94C53C81818053823010F0F7 +:1065C0000C94C93C10924E15813029F010924D1553 +:1065D00090E080E044CD80934D1590E080E03FCD89 +:1065E0008081863511F00C94CD3C818180538230BE +:1065F00010F00C94D13C813029F01092541590E0A9 +:1066000080E02DCD809354150E94FC2C90E080E01A +:1066100026CD8093561590E080E021CD80818E3488 +:1066200011F00C94DD3C91819053943010F00C9457 +:10663000E13C9230A9F1933009F449C020919D15B5 +:1066400080914A159130C9F022FF0FC08A9A90912B +:1066500008019160909308015F9A846080934A15C5 +:106660000E94FC2C90E080E0FACC8A98909108017E +:106670009E7F909308015F98F0CF22FF09C08A9A0D +:10668000909108019160909308015F9A8160E6CF34 +:106690008A98909108019E7F909308015F98F6CFA9 +:1066A00080919D1582FF0BC08A9A809108018160BC +:1066B000809308015F9A80914A158260CFCF8A98B3 +:1066C000809108018E7F809308015F98F4CF0E942B +:1066D0007F0880914A158860C1CF80818E3411F087 +:1066E0000C94E53C91819053943010F00C94E93C6B +:1066F0009230F1F0933089F120919D1580914A15E7 +:10670000913059F022FF07C05F988B7F80934A1524 +:1067100090E080E0A4CC5F9AF8CF22FF07C08A986F +:106720008E7F80934A1590E080E099CC8A9AF8CFCA +:1067300080919D1582FF0DC0809108018E7F80930E +:10674000080180914A158D7F80934A1590E080E082 +:1067500086CC809108018160F2CF0E945908809117 +:106760004A15877F80934A1590E080E078CC80813D +:106770008E3411F00C94ED3C81818053843010F004 +:106780000C94F13C90914A158230D1F08330D9F0CD +:10679000813059F090FF0BC068E872E086ED94E11B +:1067A0000E94F79D90E080E05ACC91FDF5CF67E61E +:1067B00074E086ED94E10E94F79D90E080E04FCC7C +:1067C00092FDEACFF4CF93FFF2CFE6CF8CE0F80151 +:1067D000A9ECB4E101900D928A95E1F709EC14E17E +:1067E0008AEE93E0F80161918F017C01FFEFEF1ACF +:1067F000FF0A0E944B10C70126EFE21623E0F206C3 +:1068000089F790E080E02BCC1AA619A61D8A1E8A73 +:106810001F8A188E8E010F5F1F4F8AE0D8011D92CC +:106820008A95E9F7CE0189969F938F931F930F93D3 +:1068300088E992E09F938F93FF936F930E942E9E1F +:106840000FB6F894DEBF0FBECDBF029784F41F923F +:1068500081E08F9388E792E09F938F930E94272394 +:106860000F900F900F900F9082E390E0F8CBAE0165 +:106870004B5E5F4F70E060E0C8010E94600F8823AC +:1068800079F02D893E894F89588D69A57AA5072E03 +:10689000000C880B990B0E946E0790E080E0DFCB24 +:1068A00082E390E0DCCB9E012F5F3F4F790184E1D2 +:1068B000D9011D928A95E9F7CE0189969F938F930E +:1068C00044979F938F9388969F938F9384EA92E047 +:1068D0009F938F93FF936F930E942E9E0FB6F89411 +:1068E000DEBF0FBECDBF039784F41F9281E08F936C +:1068F00088E792E09F938F930E9427230F900F9039 +:106900000F900F9082E390E0AACB8DAD813009F01B +:106910007AC08D899E89853FFFEF9F0708F073C07D +:1069200029A5223069F1243009F44DC0213009F045 +:1069300067C061E00E947B2D2B013C01870120E0B4 +:1069400045E00E945C96C301B2010E94699A862FBD +:10695000062E000C990B9F936F9384E195E09F9313 +:106960008F9386ED94E19F938F930E94FE9D0F90ED +:106970000F900F900F900F900F9090E080E06FCBF2 +:1069800062E00E947B2D2B013C01870120E045E065 +:106990000E945C96C301B2010E94699A7F936F9333 +:1069A00084E195E09F938F9386ED94E19F938F937D +:1069B0000E94FE9D0F900F900F900F900F900F90E0 +:1069C00090E080E04CCB64E00E947B2D870124E0C6 +:1069D00045E00E945C96FF92EF928EEA92E09F93D0 +:1069E0008F9386ED94E19F938F930E94FE9D0F906D +:1069F0000F900F900F900F900F9090E080E02FCBB2 +:106A000082E390E02CCB82E390E029CBF7018081F8 +:106A10008130E9F589A59AA5853F9F4FC0F5AE0164 +:106A20004B5E5F4F70E060E0C8010E94600F8823FA +:106A300071F18DAD823071F08430F1F0813021F54B +:106A40000D891E892F89388D69A57AA541E0D70166 +:106A50008C9109C00D891E892F89388D69A57AA569 +:106A600042E0F70180810E947A2E83E090E00E944C +:106A7000712D90E080E0F3CA0D891E892F89388D31 +:106A800069A57AA544E0E3CF82E390E0E8CA82E317 +:106A900090E0E5CA6E01B5E6CB0ED11C84E1D601CB +:106AA000282F1D922A95E9F77E0131E5E30EF11CAE +:106AB000D701282F1D922A95E9F78E01035C1F4FFD +:106AC000D8011D928A95E9F7C357DF4F18821982C2 +:106AD0001A821B82CD58D040C757DF4F18821982C7 +:106AE0001A821B82C958D040CB57DF4F18821982B7 +:106AF0001A821B82C558D0401F930F93FF92EF92CA +:106B0000DF92CF9286EC92E09F938F93FF936F93E7 +:106B10000E942E9E0FB6F894DEBF0FBECDBF039726 +:106B200084F41F9281E08F9388E792E09F938F9384 +:106B30000E9427230F900F900F900F9082E390E018 +:106B40008ECAAE0143575F4F70E060E0C6010E94FD +:106B5000600F882309F4C9C0AE0147575F4F70E04A +:106B600060E0C7010E94600F882309F4BEC0AE0137 +:106B70004B575F4F70E060E0C8010E94600F8823B0 +:106B800009F4B3C0CF57DF4F188219821A821B82D3 +:106B9000C158D040C358DF4F188219821A821B8215 +:106BA000CD57D040ED961CAE1DAE1EAE1FAEED977C +:106BB00084E13E01F9E26F0E711CD301E82F1D92B2 +:106BC000EA95E9F72E01F5E14F0E511CD201E82FAD +:106BD0001D92EA95E9F79E012F5F3F4F1901D901F8 +:106BE0001D928A95E9F7AE014B575F4FBE0167577B +:106BF0007F4FCE0183579F4F0E948715CB57DF4FA2 +:106C0000E880F9800A811B81C558D040C757DF4F03 +:106C1000288139814A815B81C958D040C357DF4FF1 +:106C2000688179818A819B81CD58D040FE01EF57E0 +:106C3000FF4F4F01DE01A758BF4F5D0134976F0131 +:106C40000E94D91620E030E044EB52E4CF57DF4FEA +:106C5000688179818A819B81C158D0400E94DD98EA +:106C6000CF57DF4F688379838A839B83C158D04095 +:106C7000C358DF4F688179818A819B81CD57D0408D +:106C8000820124E045E00E945C96ED966CAD7DADFE +:106C90008EAD9FADED97810124E045E00E945C96AA +:106CA000CF57DF4F688179818A819B81C158D0405D +:106CB000830124E045E00E945C963F922F925F9210 +:106CC0004F927F926F9285EE92E09F938F9386ED25 +:106CD00094E19F938F930E94FE9D0FB6F894DEBFC0 +:106CE0000FBECDBF90E080E0BAC982E390E0B7C9A3 +:106CF0006E0135E6C30ED11C84E1D601282F1D920A +:106D00002A95E9F77E0131E5E30EF11CD701282F22 +:106D10001D922A95E9F78E01035C1F4FD8011D9241 +:106D20008A95E9F7C357DF4F188219821A821B82AE +:106D3000CD58D040C757DF4F188219821A821B8264 +:106D4000C958D040CB57DF4F188219821A821B8254 +:106D5000C558D0401F930F93FF92EF92DF92CF92CE +:106D600083EF92E09F938F93FF936F930E942E9EE9 +:106D70000FB6F894DEBF0FBECDBF039784F41F9209 +:106D800081E08F9388E792E09F938F930E9427235F +:106D90000F900F900F900F9082E390E060C9AE01CA +:106DA00043575F4F70E060E0C6010E94600F882388 +:106DB00009F4BDC0AE0147575F4F70E060E0C70106 +:106DC0000E94600F882309F4B2C0AE014B575F4F99 +:106DD00070E060E0C8010E94600F882309F4A7C03A +:106DE000CF57DF4F188219821A821B82C158D040B8 +:106DF000C358DF4F188219821A821B82CD57D040A8 +:106E0000ED961CAE1DAE1EAE1FAEED9784E13E01A9 +:106E1000F9E26F0E711CD301E82F1D92EA95E9F794 +:106E20002E01F5E14F0E511CD201E82F1D92EA957B +:106E3000E9F79E012F5F3F4F1901D9011D928A95F5 +:106E4000E9F720E030E044EB52E4C357DF4F6881BC +:106E500079818A819B81CD58D0400E94DC987B014A +:106E60008C01C357DF4FE882F9820A831B83CD5818 +:106E7000D040CB57DF4F288139814A815B81C5588B +:106E8000D040C757DF4F688179818A819B81C9587B +:106E9000D040FE01E758FF4F4F01DE01A358BF4F1E +:106EA0005D0138966F010E946512A401B501C6010B +:106EB0000E943116CF57DF4F688179818A819B818B +:106EC000C158D040830124E045E00E945C96C3583D +:106ED000DF4F688179818A819B81CD57D0408201C3 +:106EE00024E045E00E945C96ED966CAD7DAD8EADE4 +:106EF0009FADED97810124E045E00E945C963F92B2 +:106F00002F925F924F927F926F9282E193E09F93D4 +:106F10008F9386ED94E19F938F930E94FE9D0FB611 +:106F2000F894DEBF0FBECDBF90E080E098C882E34A +:106F300090E095C8CF57DF4F188219821A821B82C2 +:106F4000C158D040C358DF4F188219821A821B8261 +:106F5000CD57D040ED961CAE1DAE1EAE1FAEED97C8 +:106F600084E16E0139E2C30ED11CD601282F1D9297 +:106F70002A95E9F77E0135E1E30EF11CD701282FB0 +:106F80001D922A95E9F7DE0111963D011D928A9521 +:106F9000E9F78E010B571F4F8FEF90E0D8018D93CB +:106FA0009C931F930F937F926F92FF92EF92DF92C9 +:106FB000CF9280E293E09F938F93FF936F930E9411 +:106FC0002E9E0FB6F894DEBF0FBECDBF049784F49B +:106FD0001F9281E08F9388E792E09F938F930E94A6 +:106FE00027230F900F900F900F9082E390E037C807 +:106FF000AE014F575F4F70E060E0C6010E94600F26 +:10700000882309F4B9C0AE0143585F4F70E060E0D7 +:10701000C7010E94600F882309F4AEC0AE01475833 +:107020005F4F70E060E0C3010E94600F882309F4A5 +:10703000A3C0D8018D919C91009709F443C001979A +:1070400009F096C0CF57DF4FC880D980EA80FB8017 +:10705000C158D04020E030E044EB52E4C358DF4F49 +:10706000688179818A819B81CD57D0400E94DC98CC +:1070700021EE3EE245E652E40E94F7992B013C01E5 +:107080000E94F2999B01AC01C701B6010E94839C4A +:10709000CF57DF4F688379838A839B83C158D04061 +:1070A000C301B2010E94F09C9B01AC01C701B60173 +:1070B0000E94839CC358DF4F688379838A839B83B4 +:1070C000CD57D040AE0147585F4FBE0163587F4F48 +:1070D000CE018F579F4F0E948715ED96ECACFDAC0B +:1070E0000EAD1FADED97C358DF4F288139814A811E +:1070F0005B81CD57D040CF57DF4F688179818A813E +:107100009B81C158D040FE01FD964F01DE01AF5A70 +:10711000BF4F5D01B8966F010E94D9162196ECAC65 +:10712000FDAC0EAD1FAD219765962CAD3DAD4EADBE +:107130005FAD6597A9966CAD7DAD8EAD9FADA997FE +:107140000E94C20A882351F068E872E086ED94E15B +:107150000E94F79D90E080E00C942F3067E674E089 +:1071600086ED94E10E94F79D90E080E00C942F3032 +:1071700082E390E00C942F3082E390E00C942F3067 +:107180009C9A9D9A839A809103018C77803169F44F +:10719000A498A59A8B9A81E090E09093C81480936C +:1071A000C71490E080E00C942F30A598A49AF2CFF9 +:1071B0009C9A9D9A839A809103018C77803169F41F +:1071C000A598A49A8B9882E090E09093C81480933D +:1071D000C71490E080E00C942F30A498A59AF2CFC9 +:1071E0008081863509F009C481818053823008F09E +:1071F00008C4813031F00E94F70690E080E00C94E2 +:107200002F303F9A479890E080E00C942F30808197 +:10721000863509F0FAC381818053823008F0F9C3C2 +:10722000813031F00E94E60690E080E00C942F302F +:10723000809101018062809301018091010180644D +:10724000809301018091020180628093020180910C +:10725000020180648093020190E080E00C942F3062 +:10726000CE0101969F938F9344969F938F9382E4D0 +:1072700093E09F938F93FF936F930E942E9E0FB680 +:10728000F894DEBF0FBECDBF02978CF41F9281E051 +:107290008F9388E792E09F938F930E9427230F900C +:1072A0000F900F900F9082E390E00C942F308D8917 +:1072B0009E8986349105A8F429813A8122303105CE +:1072C00080F4232B39F061E00E94950690E080E085 +:1072D0000C942F3060E00E94950690E080E00C94C2 +:1072E0002F3082E390E00C942F308D899E89863474 +:1072F000910508F04FC029813A812230310508F00C +:1073000049C0FC01E257F44F885B944F232B01F1F5 +:107310002491FC018491811104C090E080E00C94E0 +:107320002F3090E0880F991FFC01E25DF44FA5918A +:10733000B491FC01EC5EF44F859194918FB7F89471 +:10734000EC91E22BEC938FBF90E080E00C942F3017 +:107350002491FC018491882301F390E0880F991F08 +:10736000FC01E25DF44F45915491FC01EC5EF44F59 +:10737000A591B4919FB7F894FA018081209582235A +:1073800080838C91E22FE823EC939FBF90E080E014 +:107390000C942F3082E390E00C942F308081833561 +:1073A00009F03BC3E18182E390E0E03314F40C94F4 +:1073B0002F30E053EC3008F09FC0F0E08827EC510C +:1073C000F64C8F4F0C94CA9DF039073A283A413A4F +:1073D0005A3A823A9B3AB43AED3A063B0F3B143B99 +:1073E0000E94590810920D1510920C158AE999E126 +:1073F000A5E9B2E48093121590931315A093141588 +:10740000B09315158AE999E9A2E6B2E418C00E9482 +:10741000590881E090E090930D1580930C1586EF4C +:1074200098E2ACE4B2E48093121590931315A09304 +:107430001415B09315158DEC9CECA0E8B2E4809384 +:107440000E1590930F15A0931015B093111554C0FD +:107450000E94590882E090E090930D1580930C15DE +:1074600089E29CEDA4E9B2E4809312159093131580 +:10747000A0931415B093151580E090E0A2E6B2E455 +:10748000DECF0E94590883E090E090930D15809321 +:107490000C1580E090E0ACE2B2E48093121590937A +:1074A0001315A0931415B093151580E090E0ABE888 +:1074B000B2E4C5CF0E94590884E090E090930D1586 +:1074C00080930C1580E090E0ACE1B2E4809312155B +:1074D00090931315A0931415B093151580E090E0C8 +:1074E000A9E9B2E480930E1590930F15A09310159F +:1074F000B09311150E9408090E94991090E080E055 +:107500000C942F300E94590885E090E090930D155F +:1075100080930C158DEC9CECA2E9B2E480931215DB +:1075200090931315A0931415B093151580E090E077 +:10753000A8E9B2E4D7CF0E94590886E090E0909382 +:107540000D1580930C1586E696E6AAE9B2E48093C1 +:10755000121590931315A0931415B093151580E090 +:1075600090E0AAE5B2E46BCF0E94590887E090E072 +:1075700090930D1580930C158CEA93E00E943111C5 +:1075800080930E158DEA93E00E94311180930F15C0 +:107590008EEA93E00E943111809310158FEA93E0F8 +:1075A0000E9431118093111582EA93E00E943111FB +:1075B0008093121583EA93E00E9431118093131592 +:1075C00084EA93E00E9431118093141585EA93E0D8 +:1075D0000E943111809315158FCF0E94590888E0C1 +:1075E00090E090930D1580930C1510921215109247 +:1075F0001315109214151092151510920E15109265 +:107600000F15109210151092111576CF0E9459087F +:1076100089E090E090930D1580930C15E7CE0E94C1 +:1076200059088AE090E0F6CF0E9459088BE090E07C +:1076300090930D1580930C1585E89BEEABECB1E4AF +:107640008093121590931315A0931415B0931515EC +:1076500080E090E0A2E3B2E4F2CE90E080E00E940D +:10766000F22B9093C4148093C31481E090E00E94A5 +:10767000F22B9093C6148093C51482E090E00E9490 +:10768000F22B9093C2148093C11401EC14E184E3B3 +:1076900093E0D8016D918D017C01BFEFEB1AFB0ADD +:1076A0000E944B10C701EAE3EE16E3E0FE0689F7FD +:1076B0006BEB82E393E00E944B100E94391190E043 +:1076C00080E00E943E2C60931A1570931B158093E6 +:1076D0001C1590931D1581E090E00E943E2C609354 +:1076E0001E1570931F15809320159093211582E02D +:1076F00090E00E943E2C6093221570932315809396 +:1077000024159093251590E080E00C942F3090E0A4 +:1077100080E00E943E2C2B013C0181E090E00E9421 +:107720003E2CCF56DF4F688379838A839B83C15970 +:10773000D04082E090E00E943E2C20E030E044EB1C +:1077400052E40E94DC989E012F5F3F4F4901DE0109 +:1077500055965D01FE01B9966F017B018C01CF56F4 +:10776000DF4F288139814A815B81C159D040C301F3 +:10777000B2010E94651289819A81AB81BC8180939C +:10778000121590931315A0931415B09315150E941C +:1077900099100E946B1090E080E00C942F301D8AAD +:1077A0001E8A1F8A188E8E010F5F1F4F84E1D80139 +:1077B0001D928A95E9F71F930F9389E493E09F93B5 +:1077C0008F93FF936F930E942E9E0F900F900F90B8 +:1077D0000F900F900F90181619068CF01F9281E0F1 +:1077E0008F9388E792E09F938F930E9427230F90B7 +:1077F0000F900F900F9082E390E00C942F30AE0129 +:107800004B5E5F4F70E060E0C8010E94600F88230C +:10781000A1F08D899E89AF89B88D80930E159093C4 +:107820000F15A0931015B09311150E9499100E9486 +:107830006B1090E080E00C942F3082E390E00C9489 +:107840002F301D8A1E8A1F8A188E8E010F5F1F4FD0 +:1078500084E1D8011D928A95E9F71F930F9384E57F +:1078600093E09F938F93FF936F930E942E9E0F90B0 +:107870000F900F900F900F900F90181619068CF024 +:107880001F9281E08F9388E792E09F938F930E94ED +:1078900027230F900F900F900F9082E390E00C94AD +:1078A0002F30AE014B5E5F4F70E060E0C8010E9478 +:1078B000600F8823A1F08D899E89AF89B88D809350 +:1078C000161590931715A0931815B09319150E94CB +:1078D00099100E94080990E080E00C942F3082E318 +:1078E00090E00C942F301D8A1E8A1F8A188E8E01FC +:1078F0000F5F1F4F84E1D8011D928A95E9F71F930E +:107900000F938FE593E09F938F93FF936F930E9464 +:107910002E9E0F900F900F900F900F900F901816B3 +:1079200019068CF01F9281E08F9388E792E09F9375 +:107930008F930E9427230F900F900F900F9082E358 +:1079400090E00C942F30AE014B5E5F4F70E060E032 +:10795000C8010E94600F8823A1F08D899E89AF899C +:10796000B88D8093121590931315A0931415B093AE +:1079700015150E9499100E946B1090E080E00C9405 +:107980002F3082E390E00C942F3082E390E00C944F +:107990002F3082E390E00C942F3082E390E00C943F +:1079A0002F3082E390E00C942F3082E390E00C942F +:1079B0002F3082E390E00C942F3082E390E00C941F +:1079C0002F3082E390E00C942F3082E390E00C940F +:1079D0002F3082E390E00C942F3082E390E00C94FF +:1079E0002F3082E390E00C942F3082E390E00C94EF +:1079F0002F3082E390E00C942F3082E390E00C94DF +:107A00002F3082E390E00C942F3082E390E00C94CE +:107A10002F3082E390E00C942F3082E390E00C94BE +:107A20002F3080916F008D7F80936F008091810057 +:107A3000887F8160809381001092D10E8091931590 +:107A40008F3F21F49091AE159923C1F09091B0151C +:107A50009430A1F090E00E94712D81E090919D15ED +:107A600092FF02C091E08927882351F08A9A809181 +:107A700008018160809308015F9A089580E0EECF4D +:107A80008A98809108018E7F809308015F980895FD +:107A90000E94113DE8E5F2E18BE2DF011D928A953B +:107AA000E9F7E2EDFEE083E2DF011D928A95E9F756 +:107AB00010925712109256121092DA111092001270 +:107AC00081E08093DB111092D10E0E94BB0B21B399 +:107AD0009091D00EB0E49B9FC001112480742F7B45 +:107AE000822B81BBEBE0F1E020819091D00E34E05D +:107AF000939FC00111248870277F822B808381B3DC +:107B00009091D00E92FB992790F98E7F892B81BBA3 +:107B10008091CF0E80FD8F9A80FF8F989081809109 +:107B2000CF0E82709D7F892B808391B38091CF0E81 +:107B3000869582709D7F892B81BB0895CF92DF92BD +:107B4000EF92FF920F931F93CF93DF93CDB7DEB7E2 +:107B500068970FB6F894DEBF0FBECDBF1091AE157B +:107B60001123B1F181E08093B01511FF4AC087EF76 +:107B700098E00E94B80D8CEE98E00E94B80D84EB5E +:107B800098E00E94B80D84EF91E00E94712D10FFE3 +:107B900018C084EC99E00E94B80D82EB99E00E9435 +:107BA000B80D81E599E00E94B80D9FB7F8948091D7 +:107BB0005E158F7E80935E159FBF80915E1584FF5A +:107BC000FCCF8FB7F8949091AE151092AE158FBF81 +:107BD00010915E15112309F4C0C114FF36C081E075 +:107BE0008093AF1568960FB6F894DEBF0FBECDBF79 +:107BF000DF91CF911F910F91FF90EF90DF90CF9089 +:107C0000089512FF07C087EF98E00E94B80D81EE3B +:107C100098E0B3CF13FF07C087EF98E00E94B80D3C +:107C20008EEC98E0AACF14FF07C087EF98E00E947F +:107C3000B80D83EC98E0A1CF15FFA9CF87EF98E0AE +:107C40000E94B80D87EB98E098CF10FFCAC08CE077 +:107C5000E3EBF5E1DE011D9601900D928A95E1F7C7 +:107C60008091B015843009F4A1C108F089C1813038 +:107C700009F49FC108F492C1823009F49DC180913A +:107C80009415837039F0BE01635F7F4FCE0101967A +:107C90000E945D0B8091941580FF19C08FE199E0DF +:107CA0000E94B80DCE0101967C0100E0F7016191C0 +:107CB0007191819191917F010E942B0D023021F0F1 +:107CC0008DE199E00E94B80D0F5F033079F7809144 +:107CD000941581FF48C086E199E00E94B80DCE015D +:107CE00001967C018DE2C82E86E1D82E00E0F601D7 +:107CF00061917191819191916F01208531854285CA +:107D000053850E94DD989B01AC01F7016081718170 +:107D1000828193810E94DC98F70161937193819332 +:107D200091937F01023071F42091451630914616EF +:107D300040914716509148160E94DC9869877A87CF +:107D40008B879C87F7013497608171818281938151 +:107D50000E942B0D023021F084E199E00E94B80DC1 +:107D60000F5F033021F68091941582FF0EC08EE0E4 +:107D700099E00E94B80D8091D9119091D81189177E +:107D800008F420C1891B0E9491238091941583FFE0 +:107D90000EC089E099E00E94B80D9091AA0E8091E2 +:107DA000AB0E891708F410C1891B0E9491238091A2 +:107DB000941584FF0AC083E099E00E94B80D0E94E8 +:107DC0001C1043E062E00E9457238FEF98E00E946E +:107DD000B80D9FB7F89480915E158E7F80935E15E5 +:107DE0009FBF812F887609F44AC08091B0158823FF +:107DF00051F0982F9C77D9F1883029F40E94990B83 +:107E000081E08093B1158091B015811103C092E09B +:107E10009093B11516FF0AC0883019F480E480935E +:107E2000B0158091B11588608093B11513FF07C01C +:107E30008091B01585FD03C080E18093B01515FFDA +:107E400016C084EC99E00E94B80D80E799E00E948A +:107E5000B80D81E599E00E94B80D8091B11581FDC2 +:107E6000146084608093B11580E28093B0159FB751 +:107E7000F89480915E15877980935E159FBF11FFFE +:107E80004CC0812F887609F040C08091B0158823BE +:107E900031F08075D1F18091B11581FF36C08091AC +:107EA000B11582FF1EC080911316882371F0409196 +:107EB00014165091151660911616709117160E949F +:107EC000001280EA9FE00E94712D80911216882393 +:107ED00041F0823009F07AC05C9A88EE93E00E940B +:107EE000712D9091D9118091D811981709F471C012 +:107EF0008091B11583FD6DC088E08093B0150E941C +:107F000062190E94FC0B1092B1159FB7F8948091F2 +:107F10005E158D7F80935E159FBF12FF1EC08091FE +:107F2000B015807309F458C08091B215811154C006 +:107F30008091B11582FF04C00E94290C0E94C211D9 +:107F40008091B11582608093B1159FB7F8948091AC +:107F50005E158B7F80935E159FBF8091B0158C77E7 +:107F600011F00E9462198091B015803209F03ACE6A +:107F70008091B11581FF36CE80E18093B01532CE6D +:107F8000803189F030F4883009F079CE86E499E0C8 +:107F900007C08032A1F08034C9F371CE8BE499E040 +:107FA0000E94B80D6CCE80E499E0FACF8AE399E0A4 +:107FB000F7CF83E399E0F4CF8CE299E0F1CF86E24A +:107FC00099E0EECF8E5EDECE8058EECE0E94C211DA +:107FD00084CF1092B01597CF1092B1151092B015B2 +:107FE000B4CF0E946C0C0E949E3D8091AF15811110 +:107FF0000AC09091D9118091D8119813F4CF809133 +:10800000B015883081F308952F923F924F925F927E +:108010006F927F928F929F92AF92BF92CF92DF9298 +:10802000EF92FF920F931F93CF93DF93CDB7DEB7FD +:10803000CB55D1090FB6F894DEBF0FBECDBF2A963F +:108040008FAF2A971B012F962CAF3DAF4EAF5FAF7E +:108050002F976C960FAF6C9780919D1585FF4DC043 +:108060001091B2153B0190E6492E95E1592E7B0106 +:108070002CE0E20EF11CD3018D909D90AD90BD904F +:108080003D0120E030E0A901C501B4010E94439CFC +:1080900018160CF409C2F20124A135A146A157A17A +:1080A000C501B4010E94ED9987FDFEC1112309F4B9 +:1080B000FDC11093B2158091B015883091F49FB72F +:1080C000F89480915E15886080935E159FBF0E9432 +:1080D0009E3D8091AF15811110C08091B015811126 +:1080E000F6CF0E94C4119FB7F8948091AE158560B9 +:1080F0008093AE159FBF0E949E3D8091B015823047 +:1081000009F43EC3F10180819181A281B381299656 +:108110008CAF9DAFAEAFBFAF299784819581A6810B +:10812000B78125968CAF9DAFAEAFBFAF2597808549 +:108130009185A285B38521968CAF9DAFAEAFBFAFC1 +:10814000219780914A158770873009F015C3AE01D9 +:10815000435C5F4FBE016F5B7F4FCE018B5B9F4FD8 +:108160000E9487152196ECACFDAC0EAD1FAD21979A +:1081700025962CAD3DAD4EAD5FAD259729966CADE6 +:108180007DAD8EAD9FAD2997DE0191964D01FE012B +:108190007D965F0118976D010E94D916E9A0FAA09B +:1081A0000BA11CA12D8D3E8D4F8D58A1698D7A8D0F +:1081B0008B8D9C8D0E94C20A882309F4DFC220E0C7 +:1081C00030E0A9012F966CAD7DAD8EAD9FAD2F97A0 +:1081D0000E94ED99882309F465C160913A15709168 +:1081E0003B1580913C1590913D150E94A19A2B0161 +:1081F0003C0160913615709137158091381590913A +:1082000039150E94A19A63966CAF7DAF8EAF9FAF78 +:108210006397609132157091331580913415909168 +:1082200035150E94A19AFE01BD964F019E01275D62 +:108230003F4F5901DE0195966D01830172016396EE +:108240002CAD3DAD4EAD5FAD63970E944A13A401C6 +:10825000B501C6010E9431160E9424242A96BFADA2 +:108260002A97B13009F039C120E030E048EC52E4FF +:108270002F966CAD7DAD8EAD9FAD2F970E94439C28 +:10828000181654F480E090E0A8ECB2E42F968CAF7E +:108290009DAFAEAFBFAF2F972DA13EA14FA158A567 +:1082A000D1016D917D918D919C910E94DC982B0163 +:1082B0003C0129A53AA54BA55CA5F1016481758116 +:1082C000868197810E94DC984B015C012DA53EA51B +:1082D0004FA558A9D10118966D917D918D919C91D2 +:1082E0001B970E94DC986B017C01A3019201C301E2 +:1082F000B2010E94839C2B013C01A5019401C501A0 +:10830000B4010E94839C9B01AC01C301B2010E9495 +:10831000DD984B015C01A7019601C701B6010E94DF +:10832000839C9B01AC01C501B4010E94DD980E94B1 +:10833000FE9C20E030E040EF51E40E94839C2F96A9 +:108340002CAD3DAD4EAD5FAD2F970E94F7990E94C9 +:10835000709A2B967FAF6EAF2B976A30710530F411 +:108360002AE030E02B963FAF2EAF2B9720E030E095 +:1083700040E950E42F966CAD7DAD8EAD9FAD2F974B +:108380000E94839C20E030E048EC52E40E94F79980 +:1083900020E030E040E05FE30E94DD9820E030E044 +:1083A00040E752E40E94839C20E030E040E752E442 +:1083B0000E94839C6B017C01C0927815D092791544 +:1083C000E0927A15F0927B15C0927C15D0927D15C3 +:1083D000E0927E15F0927F1520E030E442E955E40A +:1083E0000E94439C87FF6CC0C0928015D09281157B +:1083F000E0928215F09283152B96AEADBFAD2B9710 +:10840000BD0190E080E00E949F9A6B017C012DA14C +:108410003EA14FA158A5F1016081718182819381B4 +:108420000E94DC98A70196010E94F79963966CAFB1 +:108430007DAF8EAF9FAF639729A53AA54BA55CA5ED +:10844000D10114966D917D918D919C9117970E9409 +:10845000DC98A70196010E94F79967966CAF7DAFF3 +:108460008EAF9FAF67972DA53EA54FA558A9F101E7 +:1084700060857185828593850E94DC98A7019601AD +:108480000E94F7996B966CAF7DAF8EAF9FAF6B97E5 +:1084900022242394312C2B968EAD9FAD2B978215E1 +:1084A000930510F580E0D1C011E003CEF4E04F0E4B +:1084B000511CE614F70409F0DECD1092B2151DCE62 +:1084C00080E090E4A2E9B5E4809380159093811553 +:1084D000A0938215B09383158FCF81E090E02B9607 +:1084E0009FAF8EAF2B9788CFB101032C000C880B68 +:1084F000990B0E94A19A6B017C01AC019B016396D0 +:108500006CAD7DAD8EAD9FAD63970E94839C9B014A +:10851000AC016DA17EA18FA198A50E94DD986D8709 +:108520007E878F87988BA701960167966CAD7DAD8E +:108530008EAD9FAD67970E94839C9B01AC0169A59E +:108540007AA58BA59CA50E94DD98698B7A8B8B8B75 +:108550009C8BA70196016B966CAD7DAD8EAD9FADEA +:108560006B970E94839C9B01AC016DA57EA58FA596 +:1085700098A90E94DD986D8B7E8B8F8B988FAE01B2 +:108580004B5E5F4FBE016F5E7F4FCE010D960E9426 +:108590008715ED88FE880F89188D29893A894B89BE +:1085A0005C896D857E858F859889DE01D1964D0128 +:1085B000FE01F5965F0118966D010E94D916E9A893 +:1085C000FAA80BA91CA92DA93EA94FA958AD69ADC0 +:1085D0007AAD8BAD9CAD0E94C20A882309F4C8C055 +:1085E0006D857E858F85988960933E1570933F15C4 +:1085F000809340159093411529893A894B895C896C +:1086000020934215309343154093441550934515DC +:10861000ED88FE880F89188DE0924615F092471577 +:108620000093481510934915FE0139964F01DE015C +:1086300015965D0138976F010E94BD180E949E3DFE +:108640008091AF158823D9F082E0C55ADF4F0FB66D +:10865000F894DEBF0FBECDBFDF91CF911F910F9178 +:10866000FF90EF90DF90CF90BF90AF909F908F9052 +:108670007F906F905F904F903F902F9008959091D2 +:10868000D81180918B0D981303C00E946C0CD6CF2B +:1086900089809A80AB80BC80C501B4010E94699A30 +:1086A000609332157093331580933415909335157C +:1086B000CD80DE80EF80F884C701B6010E94699A00 +:1086C000609336157093371580933815909339154C +:1086D00049845A846B847C84C301B2010E94699AE4 +:1086E00060933A1570933B1580933C1590933D151C +:1086F000209160153091611540916215509163157C +:10870000C501B4010E94F79969837A838B839C83A6 +:10871000209164153091651540916615509167154B +:10872000C701B6010E94F7996D837E838F83988776 +:10873000209168153091691540916A1550916B151B +:10874000C301B2010E94F79969877A878B879C875A +:108750006C962FAD6C972F964CAD5DAD6EAD7FAD29 +:108760002F97CE0101960E943625F1E0F0934E1529 +:108770002FEF221A320A8FCE85E367CF83E365CFCE +:1087800064CF2F923F924F925F926F927F928F921F +:108790009F92AF92BF92CF92DF92EF92FF920F9390 +:1087A0001F93CF93DF93CDB7DEB7C65DD1090FB668 +:1087B000F894DEBF0FBECDBF8D3928E0920709F4D3 +:1087C0000BC508F0FCC08939A8E09A0709F400C37A +:1087D00038F4843D974009F4C1C281E090E0B9C308 +:1087E0008A39F8E09F0709F4CEC38C399840A9F77D +:1087F0008E010B5E1F4F1F930F937E01B9E2EB0EAC +:10880000F11CFF92EF926E01EDE3CE0ED11CDF92D0 +:10881000CF925E01F1E5AF0EB11CBF92AF928BEA31 +:1088200093E09F938F937F936F930E942E9E0FB63A +:10883000F894DEBF0FBECDBF04970CF4A6C2EF962E +:108840001CAE1DAE1EAE1FAEEF97E5961CAE1DAE64 +:108850001EAE1FAEE597AB961CAE1DAE1EAE1FAE94 +:10886000AB97A1961CAE1DAE1EAE1FAEA197AE017A +:1088700045585F4F70E060E0C5010E94600F88239B +:1088800009F49EC2AE014F585F4F70E060E0C60130 +:108890000E94600F882309F493C2AE0149595F4FCB +:1088A00070E060E0C7010E94600F882309F488C26D +:1088B000AE01435A5F4F70E060E0C8010E94600F54 +:1088C000882309F47DC260913A1570913B1580911F +:1088D0003C1590913D150E94A19A2B013C0160919D +:1088E00036157091371580913815909139150E9481 +:1088F000A19AC956DF4F688379838A839B83C759BE +:10890000D04060913215709133158091341590915B +:1089100035150E94A19ADE0119964D01FE0135968A +:108920005F019E012F5F3F4F690183017201C956AC +:10893000DF4F288139814A815B81C759D0400E942D +:108940004A13A401B501C6010E943116EF962CAD61 +:108950003DAD4EAD5FADEF9769817A818B819C8192 +:108960000E94DD9869837A838B839C83E5962CAD86 +:108970003DAD4EAD5FADE5976D817E818F81988570 +:108980000E94DD986D837E838F839887AB962CAD94 +:108990003DAD4EAD5FADAB9769857A858B859C8586 +:1089A0000E94DD9869877A878B879C87A1962CAD7A +:1089B0003DAD4EAD5FADA19700E0B601C6C28F39A7 +:1089C00038E0930709F454C608F4BBC5803AB8E010 +:1089D0009B0711F40C94C165813A984009F0FDCED3 +:1089E00065961CAE1DAE1EAE1FAE659721961CAEE1 +:1089F0001DAE1EAE1FAE219719A61AA61BA61CA659 +:108A00008E010F5F1F4F1F930F9381E094E09F93A0 +:108A10008F937F936F930E942E9E0F900F900F90D5 +:108A20000F900F900F90181619060CF0AEC1AE0102 +:108A3000435A5F4F70E060E0C8010E94600F90E011 +:108A4000882309F4BEC180E00E943E2C2B013C012A +:108A500081E090E00E943E2CC956DF4F6883798305 +:108A60008A839B83C759D04082E090E00E943E2CCD +:108A70006B017C0120E030E044E353E40E94439C1E +:108A8000181614F00C948D68A701960160E070E050 +:108A900082E393E40E94DC9820E030E040EA52E474 +:108AA0000E94839C209168153091691540916A1548 +:108AB00050916B150E94F7996D8F7E8F8F8F98A3C1 +:108AC000C12CD12C82E3E82E83E4F82E809060152F +:108AD00090906115A0906215B09063152AE939E96C +:108AE00047E053E4C301B2010E94439C181614F0FE +:108AF0000C94CF68A30192016AE979E985E093E4D7 +:108B00000E94DC9820E030E040EA52E40E94839C1E +:108B1000A50194010E94F7996D8B7E8B8F8B988FA6 +:108B20001AE9412E19E9512E15E0612E13E4712E38 +:108B30008090641590906515A0906615B0906715AB +:108B40002DEC3CEC4FEE52E4C956DF4F6881798141 +:108B50008A819B81C759D0400E94439C181614F00B +:108B60000C940A69C956DF4F288139814A815B819B +:108B7000C759D0406DEC7CEC8BEE92E40E94DC98FF +:108B800020E030E040EA52E40E94839CA501940179 +:108B90000E94F799698F7A8F8B8F9C8F8DEC9CEC5C +:108BA000ABEEB2E4C956DF4F88839983AA83BB83B7 +:108BB000C759D04020E030E044EB52E4C701B60191 +:108BC0000E94DC98C556DF4F688379838A839B8334 +:108BD000CB59D040DE0199964D01FE01FD965F0113 +:108BE0009E012F5A3F4F69017B018C01C956DF4F0F +:108BF000288139814A815B81C759D040C301B201C4 +:108C00000E946512A401B501C6010E943116659645 +:108C10006CAD7DAD8EAD9FAD659760933E15709345 +:108C20003F15809340159093411521962CAD3DAD95 +:108C30004EAD5FAD2197209342153093431540937D +:108C4000441550934515E9A4FAA40BA51CA5E09280 +:108C50004615F09247150093481510934915EAE31D +:108C60008E2EE5E19E2EF6E3AF2EF5E1BF2EA2E3B8 +:108C7000CA2EA5E1DA2E0E94BD1840921A15509214 +:108C80001B1560921C1570921D15C956DF4F888107 +:108C90009981AA81BB81C759D04080931E159093BA +:108CA0001F15A0932015B093211520E030E044EB70 +:108CB00052E4C556DF4F688179818A819B81CB5907 +:108CC000D0400E94DD986093221570932315809305 +:108CD000241590932515A1964CAD5DAD6EAD7FAD7D +:108CE000A19720E0CE0145960E94362581E0809331 +:108CF0004E1580934F150E94FC2C8091B3159091D6 +:108D0000B415A091B515B091B61580933215909316 +:108D10003315A0933415B09335158091B715909104 +:108D2000B815A091B915B091BA15809336159093E6 +:108D30003715A0933815B09339158091BB159091D4 +:108D4000BC15A091BD15B091BE1580933A159093B6 +:108D50003B15A0933C15B0933D1532C01A82198281 +:108D6000CE0101969F938F938EE393E09F938F9311 +:108D70007F936F930E942E9E0F900F900F900F90F5 +:108D80000F900F901816190674F01F9281E08F93C0 +:108D900088E792E09F938F930E9427230F900F9074 +:108DA0000F900F90ABC189819A819093FC128093B0 +:108DB000FB1211E010934B1580910815882319F0D0 +:108DC00090E080E0C6C00E94FA0610930815F8CF24 +:108DD0008E010B5E1F4F1F930F937E01F9E2EF0E82 +:108DE000F11CFF92EF926E012DE3C20ED11CDF92B7 +:108DF000CF925E0131E5A30EB11CBF92AF928AE61D +:108E000093E09F938F937F936F930E942E9E0FB654 +:108E1000F894DEBF0FBECDBF04970CF4B6CFEF962B +:108E20001CAE1DAE1EAE1FAEEF97E5961CAE1DAE7E +:108E30001EAE1FAEE597AB961CAE1DAE1EAE1FAEAE +:108E4000AB97A1961CAE1DAE1EAE1FAEA197FE0144 +:108E500031964F018CE0DF011D928A95E9F7AE0152 +:108E600045585F4F70E060E0C5010E94600F8823A5 +:108E700009F4A6CFAE014F585F4F70E060E0C60125 +:108E80000E94600F882309F49BCFAE0149595F4FC0 +:108E900070E060E0C7010E94600F882309F490CF62 +:108EA000AE01435A5F4F70E060E0C8010E94600F5E +:108EB000882309F485CF20E030E044EB52E4E596C6 +:108EC0006CAD7DAD8EAD9FADE5970E94DC9821EE37 +:108ED0003EE245E652E40E94F7996B017C01E5967B +:108EE000CCAEDDAEEEAEFFAEE5970E94F299EF9606 +:108EF0004CAC5DAC6EAC7FACEF97A30192010E94CD +:108F0000839C69837A838B839C83C701B6010E940B +:108F1000F09C9B01AC01C301B2010E94839C6D8354 +:108F20007E838F839887AB968CAD9DADAEADBFAD84 +:108F3000AB9789879A87AB87BC87A1962CAD3DAD4F +:108F40004EAD5FADA19700E0B40181E00E94044006 +:108F500090E0CA52DF4F0FB6F894DEBF0FBECDBF10 +:108F6000DF91CF911F910F91FF90EF90DF90CF9005 +:108F7000BF90AF909F908F907F906F905F904F9039 +:108F80003F902F90089565961CAE1DAE1EAE1FAE8D +:108F9000659721961CAE1DAE1EAE1FAE21978E01A9 +:108FA0000F5F1F4F1F930F937E01B5E1EB0EF11C76 +:108FB000FF92EF925E01EDE5AE0EB11CBF92AF9253 +:108FC00083E993E09F938F937F936F930E942E9EEC +:108FD0000FB6F894DEBF0FBECDBF03970CF4D5CE0D +:108FE000AE014F5A5F4F70E060E0C7010E94600F12 +:108FF000882309F4E5CEAE01435C5F4F70E060E08A +:10900000C8010E94600F882309F4DACE1E0139E2FC +:10901000230E311C8CE0D1011D928A95E9F76091F5 +:1090200032157091331580913415909135150E9449 +:10903000A19A20E030E040EA52E40E94F7992091A2 +:109040001A1530911B1540911C1550911D150E9449 +:10905000DD982B013C016091361570913715809198 +:109060003815909139150E94A19A20E030E040EA2D +:1090700052E40E94F79920911E1530911F154091DE +:109080002015509121150E94DD98C956DF4F688345 +:1090900079838A839B83C759D04060913A15709138 +:1090A0003B1580913C1590913D150E94A19A20E0BE +:1090B00030E040EA52E40E94F7996B017C0120E025 +:1090C00030E044EB52E460912215709123158091B9 +:1090D0002415909125150E94DC989B01AC01C701D5 +:1090E000B6010E94DD987B018C01F50180819181A0 +:1090F00081309105E1F12CF4892B91F082E390E02D +:1091000028CF8230910509F459C00397B9F76596C5 +:109110006CAD7DAD8EAD9FAD65970E94360950CE8A +:1091200020E030E044EB52E465966CAD7DAD8EAD51 +:109130009FAD65970E94DC9865966CAF7DAF8EAF52 +:109140009FAF65979E012F5C3F4F4901DE019D96C1 +:109150005D0161017B018C01C956DF4F2881398196 +:109160004A815B81C759D040C301B20116C06596E0 +:109170006CAD7DAD8EAD9FAD6597FE01F1964F0153 +:109180009E01235D3F4F59016101C956DF4F288180 +:1091900039814A815B81C759D0400E946512A40180 +:1091A000B501C1010E94311621962CAD3DAD4EADE9 +:1091B0005FAD219700E0B10180E0C8CE65962CAD8F +:1091C0003DAD4EAD5FAD6597CE01C1964C01DE0160 +:1091D0009D965D016101C8CF8E01035A1F4F1F93F9 +:1091E0000F937E0137E6E30EF11CFF92EF926E01C2 +:1091F00081E7C80ED11CDF92CF925E019BE7A90EDA +:10920000B11CBF92AF928AE693E09F938F937F93B6 +:109210006F930E942E9E0FB6F894DEBF0FBECDBF97 +:1092200004970CF4B2CDCF56DF4F188219821A8200 +:109230001B82C159D040C357DF4F188219821A824E +:109240001B82CD58D040C757DF4F188219821A822F +:109250001B82C958D040CB57DF4F188219821A821F +:109260001B82C558D0401E01B1E52B0E311C8CE08D +:10927000F10111928A95E9F7AE014F565F4F70E008 +:1092800060E0C5010E94600F882309F499CDAE010A +:1092900043575F4F70E060E0C6010E94600F882373 +:1092A00009F48ECDAE0147575F4F70E060E0C70113 +:1092B0000E94600F882309F483CDAE014B575F4FA6 +:1092C00070E060E0C8010E94600F882309F478CD47 +:1092D00060913A1570913B1580913C1590913D1528 +:1092E0000E94A19AC956DF4F688379838A839B8342 +:1092F000C759D04020E030E044EB52E460912215A1 +:109300007091231580912415909125150E94DC9869 +:109310006B017C0120E030E040EA52E4C956DF4FA7 +:10932000688179818A819B81C759D0400E94F799D1 +:109330009B01AC01C701B6010E94DD98C556DF4F05 +:10934000688379838A839B83CB59D0402101F8E0DD +:109350004F0E511C310124E0620E711C60913615D4 +:109360007091371580913815909139150E94A19A06 +:10937000C156DF4F688379838A839B83CF59D0405E +:109380006091321570913315809134159091351597 +:109390000E94A19A420153016101C956DF4FE88042 +:1093A000F9800A811B81C759D040C156DF4F2881FF +:1093B00039814A815B81CF59D0400E944A13A20172 +:1093C000B301C1010E943116D1016D917D918D9142 +:1093D0009C9113971496CD90DD90ED90FC9017978B +:1093E0009B01AC010E94839C4B015C01A70196018B +:1093F000C701B6010E94839C9B01AC01C501B40169 +:109400000E94DD980E94FE9CCF56DF4F2881398153 +:109410004A815B81C159D0400E94DD986B017C017B +:10942000CF56DF4FC882D982EA82FB82C159D04031 +:10943000C357DF4F288139814A815B81CD58D040A5 +:10944000C556DF4F688179818A819B81CB59D04095 +:109450000E94DD9821EE3EE245E652E40E94F79933 +:109460002B013C010E94F2999B01AC01C701B6019E +:109470000E94839C4B015C01F10180829182A28257 +:10948000B382C301B2010E94F09C9B01AC01C701F1 +:10949000B6010E94839CD10114966D937D938D93A8 +:1094A0009C931797C757DF4F288139814A815B8189 +:1094B000C958D04018966D917D918D919C911B97C4 +:1094C0000E94DD98F10160877187828793878E0102 +:1094D000035C1F4F24E045E0C501B4010E945C9687 +:1094E000D10114966D917D918D919C9117970451A6 +:1094F000110924E045E00E945C96F10160857185C8 +:10950000828593850451110924E045E00E945C9610 +:10951000CF56DF4F688179818A819B81C159D040C4 +:109520000451110924E045E00E945C96CB57DF4FBF +:10953000288139814A815B81C558D04000E0B10162 +:1095400004CD9E012F5F3F4F59013F932F938E0112 +:109550000B5E1F4F1F930F937E0139E2E30EF11C48 +:10956000FF92EF926E018DE3C80ED11CDF92CF9275 +:1095700084ED93E09F938F937F936F930E942E9E31 +:109580000FB6F894DEBF0FBECDBF04970CF4FDCB31 +:10959000AE0145585F4F70E060E0C6010E94600F69 +:1095A000882309F40DCCAE014F585F4F70E060E0A6 +:1095B000C7010E94600F882309F402CCAE0149590B +:1095C0005F4F70E060E0C8010E94600F882309F4DB +:1095D000F7CBAE01435A5F4F70E060E0C5010E94D7 +:1095E000600F882309F4ECCB20E030E044EB52E438 +:1095F000EF966CAD7DAD8EAD9FADEF970E94DC9880 +:109600007B018C01EF96ECAEFDAE0EAF1FAFEF9776 +:109610003E01B1E56B0E711C8CE0F30111928A954D +:10962000E9F72301F8E04F0E511C130124E0220E4C +:10963000311CAB962CAD3DAD4EAD5FADAB97E59615 +:109640006CAD7DAD8EAD9FADE597420151016301DB +:109650000E946512A201B101C3010E943116A196B8 +:109660002CAD3DAD4EAD5FADA19700E0B301A4CDF3 +:10967000C757DF4F188219821A821B82C958D040FF +:10968000CB57DF4F188219821A821B82C558D040EF +:10969000EF961CAE1DAE1EAE1FAEEF9784E1FE012D +:1096A000B996DF01282F1D922A95E9F77497DF01FB +:1096B000282F1D922A95E9F77497DF011D928A954C +:1096C000E9F7E5961CAE1DAE1EAE1FAEE597AB9654 +:1096D0001CAE1DAE1EAE1FAEAB97A1961CAE1DAE4E +:1096E0001EAE1FAEA1978E01035C1F4F1F930F93F9 +:1096F0001E01B1E92B0E311C3F922F928DEF93E0AA +:109700009F938F937F936F930E942E9E0FB6F89432 +:10971000DEBF0FBECDBF02970CF437CBAE0143576F +:109720005F4F70E060E0C8010E94600F90E0882306 +:1097300009F447CB80E00E943E2CCD54DF4F688374 +:1097400079838A839B83C35BD04081E090E00E9451 +:109750003E2CC954DF4F688379838A839B83C75B20 +:10976000D04082E090E00E943E2C20E030E044EBCC +:1097700052E40E94DC98C155DF4F688379838A8365 +:109780009B83CF5AD0409E0125583F4F4901CE01BF +:109790008B579F4F5C01DE01A757BF4F6D01C1552D +:1097A000DF4FE880F9800A811B81CF5AD040C9542D +:1097B000DF4F288139814A815B81C75BD040CD541E +:1097C000DF4F688179818A819B81C35BD0400E9491 +:1097D0006512A401B501C6010E94311661E5462E4D +:1097E000512C4C0E5D1EB8E04B0E511C71E5672EDE +:1097F000712C6C0E7D1EE4E06E0E711C60913A15AA +:1098000070913B1580913C1590913D150E94A19A55 +:10981000C956DF4F688379838A839B83C759D040B9 +:1098200060913615709137158091381590913915E2 +:109830000E94A19AC556DF4F688379838A839B83F0 +:10984000CB59D04060913215709133158091341509 +:10985000909135150E94A19A420153019E012F5A01 +:109860003F4F6901C956DF4FE880F9800A811B81AB +:10987000C759D040C556DF4F288139814A815B8165 +:10988000CB59D0400E944A13A201B301C6010E94E5 +:109890003116C357DF4FC880D980EA80FB80CD588E +:1098A000D04020E030E0A901C701B6010E94ED9947 +:1098B00087FF13C0D1018D919C91119703968D93D1 +:1098C0009C93F7FAF094F7F8F094C357DF4FC882EF +:1098D000D982EA82FB82CD58D040CF56DF4F8881B3 +:1098E0009981C159D0408230910511F40C940D60DA +:1098F000A4F4009709F49EC4019711F40C94C45881 +:10990000C357DF4F288139814A815B81CD58D040D0 +:1099100000E0BE016F5A7F4F18CB8430910511F4DF +:109920000C94925C0CF4EFC7059751F7C155DF4FCB +:1099300088819981AA81BB81CF5AD040A1968CAFF2 +:109940009DAFAEAFBFAFA197C757DF4F8881998159 +:10995000AA81BB81C958D040C953DF4F88839983FE +:10996000AA83BB83C75CD040EC969FADEC97C156F1 +:10997000DF4F9883CF59D040ED96AFADED97C955E5 +:10998000DF4FA883C75AD040EE96BFADEE97CD55B6 +:10999000DF4FB883C35AD040EF96EFADEF97C55570 +:1099A000DF4FE883CB5AD040CB57DF4F8881998176 +:1099B000AA81BB81C558D040C553DF4F88839983A6 +:1099C000AA83BB83CB5CD04021EE3EE245E652E465 +:1099D000CD54DF4F688179818A819B81C35BD04000 +:1099E0000E94F799C554DF4F688379838A839B83EC +:1099F000CB5BD04021EE3EE245E652E4C954DF4F56 +:109A0000688179818A819B81C75BD0400E94F799E8 +:109A1000C154DF4F688379838A839B83CF5BD040B7 +:109A2000C554DF4F688179818A819B81CB5BD040AF +:109A30000E94F2996B017C01C154DF4F68817981EA +:109A40008A819B81CF5BD0400E94F2994B015C01DF +:109A50002CEE31E14EE053E4C701B6010E94839C35 +:109A60006B017C012CE53FEC4EE153E4C501B401F0 +:109A70000E94839C9B01AC01C701B6010E94DD9846 +:109A80002B013C01C554DF4F688179818A819B811C +:109A9000CB5BD0400E94F09CC153DF4F6883798339 +:109AA0008A839B83CF5CD040C154DF4F688179812A +:109AB0008A819B81CF5BD0400E94F09CCD52DF4FCA +:109AC000688379838A839B83C35DD0402CEE31E128 +:109AD0004EE053E4C153DF4F688179818A819B81D5 +:109AE000CF5CD0400E94839C6B017C012CE53FEC55 +:109AF0004EE153E4CD52DF4F688179818A819B81A9 +:109B0000C35DD0400E94839C9B01AC01C701B6019C +:109B10000E94DC98CD53DF4F688379838A839B83CF +:109B2000C35CD04080E192EBA3E0B0E4AB968CAF95 +:109B30009DAFAEAFBFAFAB9724EB3FE944E952E432 +:109B4000C301B2010E94DD982CEE31E14EE053E4F6 +:109B50000E94F7990E94CB98E5966CAF7DAF8EAFCF +:109B60009FAFE5970E94F09C2CEE31E14EE053E46C +:109B70000E94839C20ED39E54CE053E40E94DC9880 +:109B80009B01AC01CD53DF4F688179818A819B8134 +:109B9000C35CD0400E94DC989B01AC01C156DF4FF2 +:109BA0006881CF59D040C955DF4F7881C75AD0401E +:109BB000CD55DF4F8881C35AD040C555DF4F9881BE +:109BC000CB5AD0400E94DC98C956DF4F6883C759F2 +:109BD000D040C556DF4F7883CB59D0401C01CB0114 +:109BE000D101EF968CAF9DAFAEAFBFAFEF97AE0197 +:109BF00045585F4FBE016B577F4FCE0187579F4F30 +:109C00000E948715EF96ECACFDAC0EAD1FADEF9743 +:109C1000CB57DF4F288139814A815B81C558D040BD +:109C2000C757DF4F688179818A819B81C958D040AD +:109C3000DE01A35ABF4F4D01FE01E959FF4F5F01FD +:109C400054966D010E94D916A196ECACFDAC0EADF8 +:109C50001FADA197AB962CAD3DAD4EAD5FADAB97B3 +:109C6000E5966CAD7DAD8EAD9FADE5970E94C20AC5 +:109C700081110C941665C155DF4F88819981AA81A5 +:109C8000BB81CF5AD040A1968CAF9DAFAEAFBFAFD6 +:109C9000A197C953DF4F88819981AA81BB81C75C95 +:109CA000D040C757DF4F88839983AA83BB83C958A5 +:109CB000D040C553DF4F88819981AA81BB81CB5C9D +:109CC000D040CB57DF4F88839983AA83BB83C55885 +:109CD000D0408FE497E7A6E5BDEBE5968CAF9DAF4E +:109CE000AEAFBFAFE59724E130EE4DE053E4C301E2 +:109CF000B2010E94DC982CE53FEC4EE153E40E9457 +:109D0000F7990E94CB98AB966CAF7DAF8EAF9FAFAB +:109D1000AB970E94F09C2CE53FEC4EE153E40E948F +:109D2000839C9B01AC016CE87EEE8DEE90EC0E9472 +:109D3000DC989B01AC01CD53DF4F688179818A812A +:109D40009B81C35CD0400E94DC989B01AC01C15652 +:109D5000DF4F6881CF59D040C955DF4F7881C75A4E +:109D6000D040CD55DF4F8881C35AD040C555DF4F15 +:109D70009881CB5AD0400E94DC98C956DF4F688347 +:109D8000C759D040C556DF4F7883CB59D0401C010E +:109D9000CB01D101EF968CAF9DAFAEAFBFAFEF97C8 +:109DA000AE0145585F4FBE016B577F4FCE018757BD +:109DB0009F4F0E948715EF96ECACFDAC0EAD1FAD2A +:109DC000EF97CB57DF4F288139814A815B81C55896 +:109DD000D040C757DF4F688179818A819B81C958FC +:109DE000D0400E94D916A196ECACFDAC0EAD1FADD3 +:109DF000A197AB962CAD3DAD4EAD5FADAB97E59663 +:109E00006CAD7DAD8EAD9FADE5970E94C20A81110C +:109E10000C941665C155DF4F88819981AA81BB8159 +:109E2000CF5AD040A1968CAF9DAFAEAFBFAFA19738 +:109E3000C953DF4F88819981AA81BB81C75CD0401B +:109E4000C757DF4F88839983AA83BB83C958D04003 +:109E5000C553DF4F88819981AA81BB81CB5CD040FB +:109E6000CB57DF4F88839983AA83BB83C558D040E3 +:109E7000C554DF4F88819981AA81BB81CB5BD040DB +:109E8000E5968CAF9DAFAEAFBFAFE597C154DF4F46 +:109E900088819981AA81BB81CF5BD040AB968CAF82 +:109EA0009DAFAEAFBFAFAB97A3019201C301B201AB +:109EB0000E94839C2B013C01AC019B016CE978EE74 +:109EC0008FE494E40E94DC986B017C0120E030E098 +:109ED000A9010E94439C181624F0F7FAF094F7F8B1 +:109EE000F094C701B6010E94FE9C9B01AC01CD53CA +:109EF000DF4F688179818A819B81C35CD0400E9459 +:109F0000DC989B01AC01C156DF4F6881CF59D0402E +:109F1000C955DF4F7881C75AD040CD55DF4F888172 +:109F2000C35AD040C555DF4F9881CB5AD0400E94CC +:109F3000DC98C956DF4F6883C759D040C556DF4FFC +:109F40007883CB59D0401C01CB01D101EF968CAF67 +:109F50009DAFAEAFBFAFEF97AE0145585F4FBE01AB +:109F60006B577F4FCE0187579F4F0E948715EF9603 +:109F7000ECACFDAC0EAD1FADEF97CB57DF4F28819A +:109F800039814A815B81C558D040C757DF4F68810E +:109F900079818A819B81C958D040DE01A35ABF4F85 +:109FA0004D01FE01E959FF4F5F0154966D010E947A +:109FB000D916A196ECACFDAC0EAD1FADA197AB963A +:109FC0002CAD3DAD4EAD5FADAB97E5966CAD7DADC7 +:109FD0008EAD9FADE5970E94C20A81110C94166563 +:109FE000CD54DF4F288139814A815B81C35BD040EA +:109FF00060E070E084E393E40E94DC98C954DF4F92 +:10A00000288139814A815B81C75BD0400E94DC98FE +:10A0100020E030E045E153E40E94439C181614F020 +:10A020000C948763C155DF4F88819981AA81BB81D8 +:10A03000CF5AD040A1968CAF9DAFAEAFBFAFA19726 +:10A04000C953DF4F88819981AA81BB81C75CD04009 +:10A05000C757DF4F88839983AA83BB83C958D040F1 +:10A06000C553DF4F88819981AA81BB81CB5CD040E9 +:10A07000CB57DF4F88839983AA83BB83C558D040D1 +:10A08000C554DF4F88819981AA81BB81CB5BD040C9 +:10A09000E5968CAF9DAFAEAFBFAFE597C154DF4F34 +:10A0A00088819981AA81BB81CF5BD040AB968CAF70 +:10A0B0009DAFAEAFBFAFAB972CEE31E14EE053E4B6 +:10A0C000CD52DF4F688179818A819B81C35DD04009 +:10A0D0000E94839C6B017C012CE53FEC4EE153E434 +:10A0E000C153DF4F688179818A819B81CF5CD040E9 +:10A0F0000E94839C9B01AC01C701B6010E94DC98C1 +:10A100009B01AC01CD53DF4F688179818A819B81AE +:10A11000C35CD0400E94DC982B013C01AC019B0148 +:10A12000C156DF4F6881CF59D040C955DF4F788184 +:10A13000C75AD040CD55DF4F8881C35AD040C5554E +:10A14000DF4F9881CB5AD0400E94DC98C956DF4F30 +:10A150006883C759D040C556DF4F7883CB59D0406C +:10A160001C01CB01D101EF968CAF9DAFAEAFBFAF5D +:10A17000EF97AE0145585F4FBE016B577F4FCE0141 +:10A1800087579F4F0E948715EF96ECACFDAC0EAD44 +:10A190001FADEF97CB57DF4F288139814A815B8113 +:10A1A000C558D040C757DF4F688179818A819B812C +:10A1B000C958D040D40154966D010E94D916A19679 +:10A1C000ECACFDAC0EAD1FADA197AB962CAD3DAD8B +:10A1D0004EAD5FADAB97E5966CAD7DAD8EAD9FADF1 +:10A1E000E5970E94C20A882359F020E030E0A901D7 +:10A1F000C301B2010E94439C181614F40C94166516 +:10A2000020E030E040EA51E4C156DF4F6881CF5989 +:10A21000D040C955DF4F7881C75AD040CD55DF4F68 +:10A220008881C35AD040C555DF4F9881CB5AD04062 +:10A230000C947D65C757DF4F88819981AA81BB81C6 +:10A24000C958D040C156DF4F88839983AA83BB8306 +:10A25000CF59D040EF968CAD9DADAEADBFADEF9771 +:10A26000C955DF4F88839983AA83BB83C75AD040DF +:10A27000CB57DF4F88819981AA81BB81C558D040D7 +:10A28000C956DF4F88839983AA83BB83C759D040BF +:10A2900021EE3EE245E652E4C954DF4F6881798100 +:10A2A0008A819B81C75BD0400E94F7996B017C013A +:10A2B000AB96CCAEDDAEEEAEFFAEAB9721EE3EE29E +:10A2C00045E652E4CD54DF4F688179818A819B81D4 +:10A2D000C35BD0400E94F7990E94F09C4B015C0147 +:10A2E000C701B6010E94F09C6B017C012CEE31E1AC +:10A2F0004EE053E4C501B4010E94839C4B015C0114 +:10A300002CE53FEC4EE153E4C701B6010E94839C6B +:10A310009B01AC01C501B4010E94DC98C556DF4F1A +:10A32000688379838A839B83CB59D04083E692E804 +:10A33000AAE8BEE3E5968CAF9DAFAEAFBFAFE597A1 +:10A34000C556DF4F288139814A815B81CB59D04086 +:10A35000CA01B9010E94839C9B01AC016BED7CE6B4 +:10A3600082E997E40E94DC980E94FE9C6B017C01CC +:10A3700023E333E343E551E460910E1570910F152B +:10A3800080911015909111150E94DD98A7019601FA +:10A390000E94DD986B017C01AC019B01C956DF4F27 +:10A3A000688179818A819B81C759D0400E94F79941 +:10A3B0000E9449992B013C01A1964CAE5DAE6EAE58 +:10A3C0007FAEA1970E94F2999B01AC01C701B60133 +:10A3D0000E94839CCD55DF4F688379838A839B835A +:10A3E000C35AD040C757DF4F688379838A839B83E2 +:10A3F000C958D040AE0145585F4FBE016B577F4FE3 +:10A40000CE0187579F4F0E948715EF96ECACFDACAD +:10A410000EAD1FADEF97CB57DF4F288139814A81B1 +:10A420005B81C558D040C757DF4F688179818A81E9 +:10A430009B81C958D040DE01A35ABF4F4D01FE0198 +:10A44000E959FF4F5F0154966D010E94D916A196FC +:10A45000ECACFDAC0EAD1FADA197AB962CAD3DADF8 +:10A460004EAD5FADAB97E5966CAD7DAD8EAD9FAD5E +:10A47000E5970E94C20A811118C2C956DF4F888130 +:10A480009981AA81BB81C759D040CB57DF4F8883C0 +:10A490009983AA83BB83C558D040C955DF4F8881B3 +:10A4A0009981AA81BB81C75AD040EF968CAF9DAFEE +:10A4B000AEAFBFAFEF978FE497E7A6E5BDEBAB96E6 +:10A4C0008CAF9DAFAEAFBFAFAB972BEC3BEF44E093 +:10A4D00051E4C556DF4F688179818A819B81CB59D0 +:10A4E000D0400E94DC982CEE31E14EE053E40E9413 +:10A4F000F7990E94499921EE3EE245E652E40E9416 +:10A50000839C21EE3EE245E652E40E94F799E596EF +:10A510006CAF7DAF8EAF9FAFE5970E94F2992CEEA6 +:10A5200031E14EE053E40E94839C24EA37E94EE196 +:10A5300053E40E94DD986B017C0123E333E343E5A0 +:10A5400051E460910E1570910F1580911015909146 +:10A5500011150E94DD98A70196010E94DD986B01FC +:10A560007C01AC019B01C956DF4F688179818A81EA +:10A570009B81C759D0400E94F7990E9449992B01AD +:10A580003C01A1964CAE5DAE6EAE7FAEA1970E942F +:10A59000F2999B01AC01C701B6010E94839CCD5585 +:10A5A000DF4F688379838A839B83C35AD040C75720 +:10A5B000DF4F688379838A839B83C958D040AE017B +:10A5C00045585F4FBE016B577F4FCE0187579F4F56 +:10A5D0000E948715EF96ECACFDAC0EAD1FADEF976A +:10A5E000CB57DF4F288139814A815B81C558D040E4 +:10A5F000C757DF4F688179818A819B81C958D040D4 +:10A60000D40154966D010E94D916A196ECACFDAC14 +:10A610000EAD1FADA197AB962CAD3DAD4EAD5FAD70 +:10A62000AB97E5966CAD7DAD8EAD9FADE5970E9485 +:10A63000C20A81113AC1C956DF4F88819981AA8126 +:10A64000BB81C759D040CB57DF4F88839983AA83FA +:10A65000BB83C558D040C955DF4F88819981AA81F5 +:10A66000BB81C75AD040EF968CAF9DAFAEAFBFAFA6 +:10A67000EF978FE497E7A6E5BDEBE5968CAF9DAF2E +:10A68000AEAFBFAFE597C556DF4F288139814A810C +:10A690005B81CB59D0406CE87EEE8DEE90EC0E9451 +:10A6A000DC982CE53FEC4EE153E40E94F7990E94C0 +:10A6B000499921EE3EE245E652E40E94839C21EE58 +:10A6C0003EE245E652E40E94F799AB966CAF7DAF4F +:10A6D0008EAF9FAFAB970E94F2992CE53FEC4EE115 +:10A6E00053E40E94839C24E130EE4DE053E40E9449 +:10A6F000DD986B017C0123E333E343E551E4609192 +:10A700000E1570910F1580911015909111150E94E2 +:10A71000DD98A70196010E94DD986B017C01AC01D8 +:10A720009B01C956DF4F688179818A819B81C75916 +:10A73000D0400E94F7990E9449992B013C01A196B3 +:10A740004CAE5DAE6EAE7FAEA1970E94F2999B01BA +:10A75000AC01C701B6010E94839CC956DF4F6883D4 +:10A7600079838A839B83C759D040C757DF4F68835B +:10A7700079838A839B83C958D040AE0145585F4F87 +:10A78000BE016B577F4FCE0187579F4F0E948715A1 +:10A79000EF96ECACFDAC0EAD1FADEF97CB57DF4F96 +:10A7A000288139814A815B81C558D040C757DF4F26 +:10A7B000688179818A819B81C958D040D40154969F +:10A7C0006D010E94D916A196ECACFDAC0EAD1FAD8B +:10A7D000A197AB962CAD3DAD4EAD5FADAB97E59679 +:10A7E0006CAD7DAD8EAD9FADE5970E94C20A88230A +:10A7F000B1F0A1964CAE5DAE6EAE7FAEA197C956DC +:10A80000DF4F88819981AA81BB81C759D040C75742 +:10A81000DF4F88839983AA83BB83C958D040C75729 +:10A82000DF4FC880D980EA80FB80C958D040A7019B +:10A830009601C156DF4F688179818A819B81CF590A +:10A84000D0400E94ED9987FF59C0C156DF4F288143 +:10A8500039814A815B81CF59D040C701B6010E943E +:10A86000DC984B015C0120E030E0A9010E94439C90 +:10A87000181654F523E333E343E35FE3C501B40162 +:10A880000E94439C181654F120E030E040EA51E465 +:10A89000C701B6010E94DD98C757DF4F68837983EF +:10A8A0008A839B83C958D04019C0A1964CAE5DAE37 +:10A8B0006EAE7FAEA197CD55DF4F88819981AA8179 +:10A8C000BB81C35AD040A3CF23E333E343E35FEB21 +:10A8D000C501B4010E94ED9987FFD6CFC757DF4F5E +:10A8E00088819981AA81BB81C958D04065968CAF77 +:10A8F0009DAFAEAFBFAF65970C94804C20E030E0C9 +:10A9000048E452E4C5CFC757DF4F88819981AA81B7 +:10A91000BB81C958D040C955DF4F88839983AA832A +:10A92000BB83C75AD040EF968CAD9DADAEADBFADE9 +:10A93000EF97C156DF4F88839983AA83BB83CF5992 +:10A94000D040CB57DF4F88819981AA81BB81C55800 +:10A95000D040C956DF4F88839983AA83BB83C759E8 +:10A96000D04021EE3EE245E652E4C954DF4F688113 +:10A9700079818A819B81C75BD0400E94F7996B01E6 +:10A980007C01AB96CCAEDDAEEEAEFFAEAB9721EE6A +:10A990003EE245E652E4CD54DF4F688179818A81F9 +:10A9A0009B81C35BD0400E94F7990E94F09C4B01B1 +:10A9B0005C01C701B6010E94F09C6B017C012CEE8A +:10A9C00031E14EE053E4C501B4010E94839C4B0188 +:10A9D0005C012CE53FEC4EE153E4C701B6010E9457 +:10A9E000839C9B01AC01C501B4010E94DC98C55653 +:10A9F000DF4F688379838A839B83CB59D0408AE574 +:10AA000096ECACEBBFE3E5968CAF9DAFAEAFBFAFBE +:10AA1000E597C556DF4F288139814A815B81CB5943 +:10AA2000D040CA01B9010E94839C9B01AC016FED2B +:10AA30007AE689E394E40E94DC980E94FE9C6B0114 +:10AA40007C0123E333E343E551E460910E157091FB +:10AA50000F1580911015909111150E94DD98A70196 +:10AA600096010E94DD986B017C01AC019B01C956E7 +:10AA7000DF4F688179818A819B81C759D0400E94CC +:10AA8000F7990E9449992B013C01A1964CAE5DAE0D +:10AA90006EAE7FAEA1970E94F2999B01AC01C701F7 +:10AAA000B6010E94839CCD55DF4F688379838A83EA +:10AAB0009B83C35AD040C757DF4F688379838A830B +:10AAC0009B83C958D040AE0145585F4FBE016B57BC +:10AAD0007F4FCE0187579F4F0E948715EF96ECACB2 +:10AAE000FDAC0EAD1FADEF97CB57DF4F28813981FD +:10AAF0004A815B81C558D040C757DF4F6881798153 +:10AB00008A819B81C958D040DE01A35ABF4F4D01B5 +:10AB1000FE01E959FF4F5F0154966D010E94D9165D +:10AB2000A196ECACFDAC0EAD1FADA197AB962CADD4 +:10AB30003DAD4EAD5FADAB97E5966CAD7DAD8EADE9 +:10AB40009FADE5970E94C20A811104C3C956DF4F29 +:10AB500088819981AA81BB81C759D040CB57DF4FEB +:10AB600088839983AA83BB83C558D040C156DF4FE1 +:10AB700088819981AA81BB81CF59D040EF968CAF53 +:10AB80009DAFAEAFBFAFEF9785E090EDA4E0B0E42E +:10AB9000AB968CAF9DAFAEAFBFAFAB9723E538E0C0 +:10ABA0004BE053E4C556DF4F688179818A819B81F0 +:10ABB000CB59D0400E94DD982CEE31E14EE053E4B9 +:10ABC0000E94F7990E94499921EE3EE245E652E43F +:10ABD0000E94839C21EE3EE245E652E40E94F799F2 +:10ABE000E5966CAF7DAF8EAF9FAFE5970E94F2996F +:10ABF0002CEE31E14EE053E40E94839C2AE030E8E1 +:10AC000049E952E40E94DC986B017C0123E333E3C1 +:10AC100043E551E460910E1570910F158091101568 +:10AC2000909111150E94DD98A70196010E94DD9870 +:10AC30006B017C01AC019B01C956DF4F68817981B2 +:10AC40008A819B81C759D0400E94F7990E944999F7 +:10AC50002B013C01A1964CAE5DAE6EAE7FAEA197CE +:10AC60000E94F2999B01AC01C701B6010E94839C2E +:10AC7000CD55DF4F688379838A839B83C35AD04045 +:10AC8000C757DF4F688379838A839B83C958D04035 +:10AC9000AE0145585F4FBE016B577F4FCE018757BE +:10ACA0009F4F0E948715EF96ECACFDAC0EAD1FAD2B +:10ACB000EF97CB57DF4F288139814A815B81C55897 +:10ACC000D040C757DF4F688179818A819B81C958FD +:10ACD000D040D40154966D010E94D916A196ECACD7 +:10ACE000FDAC0EAD1FADA197AB962CAD3DAD4EADFD +:10ACF0005FADAB97E5966CAD7DAD8EAD9FADE59745 +:10AD00000E94C20A811126C2C956DF4F88819981EB +:10AD1000AA81BB81C759D040CB57DF4F8883998325 +:10AD2000AA83BB83C558D040C156DF4F8881998123 +:10AD3000AA81BB81CF59D040EF968CAF9DAFAEAF0B +:10AD4000BFAFEF9783E899E5A6E1B0E4E5968CAF55 +:10AD50009DAFAEAFBFAFE597C556DF4F28813981B4 +:10AD60004A815B81CB59D04068EA70E58AEC92E475 +:10AD70000E94DC982CE53FEC4EE153E40E94F799E9 +:10AD80000E94499921EE3EE245E652E40E94839CEE +:10AD900021EE3EE245E652E40E94F799AB966CAF95 +:10ADA0007DAF8EAF9FAFAB970E94F2992CE53FEC41 +:10ADB0004EE153E40E94839C24E832E847EC52E4DD +:10ADC0000E94DC986B017C0123E333E343E551E40B +:10ADD00060910E1570910F158091101590911115BD +:10ADE0000E94DD98A70196010E94DD986B017C010D +:10ADF000AC019B01C956DF4F688179818A819B81B3 +:10AE0000C759D0400E94F7990E9449992B013C01F3 +:10AE1000A1964CAE5DAE6EAE7FAEA1970E94F29948 +:10AE20009B01AC01C701B6010E94839CCD55DF4F49 +:10AE3000688379838A839B83C35AD040C757DF4F87 +:10AE4000688379838A839B83C958D040AE01455873 +:10AE50005F4FBE016B577F4FCE0187579F4F0E94B8 +:10AE60008715EF96ECACFDAC0EAD1FADEF97CB5751 +:10AE7000DF4F288139814A815B81C558D040C7574F +:10AE8000DF4F688179818A819B81C958D040D40184 +:10AE900054966D010E94D916A196ECACFDAC0EAD96 +:10AEA0001FADA197AB962CAD3DAD4EAD5FADAB9751 +:10AEB000E5966CAD7DAD8EAD9FADE5970E94C20A63 +:10AEC000811148C1C956DF4F88819981AA81BB8110 +:10AED000C759D040CB57DF4F88839983AA83BB8360 +:10AEE000C558D040C156DF4F88819981AA81BB8166 +:10AEF000CF59D040EF968CAF9DAFAEAFBFAFEF97BD +:10AF000023E333E343E551E460910E1570910F158F +:10AF100080911015909111150E94DD986B017C01B4 +:10AF200085E39AEFAEE8BDEBE5968CAF9DAFAEAF93 +:10AF3000BFAFE5972CE53FEC4EE153E4C556DF4F3C +:10AF4000688179818A819B81CB59D0400E94F79991 +:10AF50000E94499921EE3EE245E652E40E94839C1C +:10AF600020E030E044E353E40E94DD980E94699AB7 +:10AF7000072E000C880B990B0E94A19A21EE3EE24D +:10AF800045E652E40E94F799AB966CAF7DAF8EAF69 +:10AF90009FAFAB970E94F2992CE53FEC4EE153E452 +:10AFA0000E94839C24E539EB4DE053E40E94DD9838 +:10AFB0009B01AC01C701B6010E94DD986B017C01C9 +:10AFC000AC019B01C956DF4F688179818A819B81E1 +:10AFD000C759D0400E94F7990E9449992B013C0122 +:10AFE000A1964CAE5DAE6EAE7FAEA1970E94F29977 +:10AFF0009B01AC01C701B6010E94839C20E030E0B8 +:10B0000040E050E40E94DD98C956DF4F68837983A1 +:10B010008A839B83C759D040C757DF4F68837983A2 +:10B020008A839B83C958D040AE0145585F4FBE010B +:10B030006B577F4FCE0187579F4F0E948715EF9622 +:10B04000ECACFDAC0EAD1FADEF97CB57DF4F2881B9 +:10B0500039814A815B81C558D040C757DF4F68812D +:10B0600079818A819B81C958D040D40154966D0161 +:10B070000E94D916A196ECACFDAC0EAD1FADA19708 +:10B08000AB962CAD3DAD4EAD5FADAB97E5966CADDF +:10B090007DAD8EAD9FADE5970E94C20A81114BC078 +:10B0A00080E090E0A0E4B0E4C757DF4F8883998345 +:10B0B000AA83BB83C958D040C757DF4FC880D98007 +:10B0C000EA80FB80C958D040A7019601C955DF4FDF +:10B0D000688179818A819B81C75AD0400E94439CB4 +:10B0E000181604F5C955DF4F288139814A815B81E3 +:10B0F000C75AD040C701B6010E94DC984B015C01E1 +:10B1000020E030E0A9010E94439C181694F523E347 +:10B1100033E343E35FE3C501B4010E94439C181687 +:10B120000CF4DCCB20E030E040EA51E4C701B6018A +:10B130000E94DC98B1CBA1964CAE5DAE6EAE7FAEF8 +:10B14000A197C956DF4F88819981AA81BB81C759D0 +:10B15000D040AACFA1964CAE5DAE6EAE7FAEA197A9 +:10B16000CD55DF4F88819981AA81BB81C35AD040D8 +:10B170009BCF23E333E343E35FEBC501B4010E94BC +:10B18000ED9987FDABCBCECFC757DF4F8881998133 +:10B19000AA81BB81C958D040C956DF4F88839983A3 +:10B1A000AA83BB83C759D040EF968CAD9DADAEADA1 +:10B1B000BFADEF97C955DF4F88839983AA83BB83BF +:10B1C000C75AD040CB57DF4F88819981AA81BB8174 +:10B1D000C558D040C556DF4F88839983AA83BB8367 +:10B1E000CB59D04021EE3EE245E652E4C954DF4F50 +:10B1F000688179818A819B81C75BD0400E94F799E1 +:10B200006B017C01AB96CCAEDDAEEEAEFFAEAB9784 +:10B2100021EE3EE245E652E4CD54DF4F688179816C +:10B220008A819B81C35BD0400E94F7990E94F09C69 +:10B230004B015C01C701B6010E94F09C6B017C01CF +:10B240002CEE31E14EE053E4C501B4010E94839C31 +:10B250004B015C012CE53FEC4EE153E4C701B60124 +:10B260000E94839C9B01AC01C501B4010E94DC9843 +:10B27000C156DF4F688379838A839B83CF59D0403F +:10B2800083E692E8AAE8BEE3E5968CAF9DAFAEAF49 +:10B29000BFAFE597C156DF4F288139814A815B8175 +:10B2A000CF59D040CA01B9010E94839C9B01AC01D7 +:10B2B0006BED7CE682E997E40E94DC980E94FE9C9C +:10B2C0006B017C0123E333E343E551E460910E1508 +:10B2D00070910F1580911015909111150E94DD98B5 +:10B2E000A70196010E94DD986B017C01AC019B01D6 +:10B2F000C956DF4F688179818A819B81C759D040C7 +:10B300000E94F7990E94CB982B013C01A1964CAE6C +:10B310005DAE6EAE7FAEA1970E94F09C9B01AC012A +:10B32000C701B6010E94839CCD55DF4F68837983A6 +:10B330008A839B83C35AD040CB57DF4F688379837E +:10B340008A839B83C558D040AE0145585F4FBE01EC +:10B350006B577F4FCE0187579F4F0E948715EF96FF +:10B36000ECACFDAC0EAD1FADEF97CB57DF4F288196 +:10B3700039814A815B81C558D040C757DF4F68810A +:10B3800079818A819B81C958D040DE01A35ABF4F81 +:10B390004D01FE01E959FF4F5F0154966D010E9476 +:10B3A000D916A196ECACFDAC0EAD1FADA197AB9636 +:10B3B0002CAD3DAD4EAD5FADAB97E5966CAD7DADC3 +:10B3C0008EAD9FADE5970E94C20A811182C2C95617 +:10B3D000DF4F88819981AA81BB81C759D040C75767 +:10B3E000DF4F88839983AA83BB83C958D040C9554E +:10B3F000DF4F88819981AA81BB81C75AD040EF96DF +:10B400008CAF9DAFAEAFBFAFEF978FE497E7A6E5E8 +:10B41000BDEBAB968CAF9DAFAEAFBFAFAB972BEC98 +:10B420003BEF44E051E4C156DF4F688179818A8166 +:10B430009B81CF59D0400E94DC982CEE31E14EE048 +:10B4400053E40E94F7990E94499921EE3EE245E6B5 +:10B4500052E40E94839C21EE3EE245E652E40E94C3 +:10B46000F799E5966CAF7DAF8EAF9FAFE5970E94E1 +:10B47000F2992CEE31E14EE053E40E94839C24EAE1 +:10B4800037E94EE153E40E94DD986B017C0123E330 +:10B4900033E343E551E460910E1570910F158091EF +:10B4A0001015909111150E94DD98A70196010E9438 +:10B4B000DD986B017C01AC019B01C956DF4F6881AF +:10B4C00079818A819B81C759D0400E94F7990E9457 +:10B4D000CB982B013C01A1964CAE5DAE6EAE7FAE1B +:10B4E000A1970E94F09C9B01AC01C701B6010E948C +:10B4F000839CCD55DF4F688379838A839B83C35AAE +:10B50000D040CB57DF4F688379838A839B83C558AC +:10B51000D040AE0145585F4FBE016B577F4FCE0103 +:10B5200087579F4F0E948715EF96ECACFDAC0EAD90 +:10B530001FADEF97CB57DF4F288139814A815B815F +:10B54000C558D040C757DF4F688179818A819B8178 +:10B55000C958D040D40154966D010E94D916C757DE +:10B56000DF4F688179818A819B81C958D0408E01E3 +:10B57000075D1F4F24E045E00E945C96CB57DF4FEC +:10B58000688179818A819B81C558D0400451110915 +:10B5900024E045E00E945C96EF966CAD7DAD8EADEB +:10B5A0009FADEF970451110924E045E00E945C969D +:10B5B000AB968CAC9DACAEACBFACAB9720E030E0B2 +:10B5C000A901C501B4010E94439C181624F0B7FAE2 +:10B5D000B094B7F8B094AB968CAE9DAEAEAEBFAEA5 +:10B5E000AB97A196ECACFDAC0EAD1FADA197E59667 +:10B5F0006CAD7DAD8EAD9FADE597A50194010E9428 +:10B60000C20A811166C1C956DF4F88819981AA811A +:10B61000BB81C759D040C757DF4F88839983AA831E +:10B62000BB83C958D040C955DF4F88819981AA8111 +:10B63000BB81C75AD040EF968CAF9DAFAEAFBFAFC6 +:10B64000EF9789E396E4A1EFBEE3E5968CAF9DAF5B +:10B65000AEAFBFAFE597C156DF4F288139814A8130 +:10B660005B81CF59D04062E37FEF80E892E40E9493 +:10B67000DC982CE53FEC4EE153E40E94F7990E94E0 +:10B68000499921EE3EE245E652E40E94839C21EE78 +:10B690003EE245E652E40E94F799AB966CAF7DAF6F +:10B6A0008EAF9FAFAB970E94F2992CE53FEC4EE135 +:10B6B00053E40E94839C2DEA3BE24DEF52E40E944A +:10B6C000DD986B017C0123E333E343E551E46091B2 +:10B6D0000E1570910F1580911015909111150E9403 +:10B6E000DD98A70196010E94DD986B017C01AC01F9 +:10B6F0009B01C956DF4F688179818A819B81C75937 +:10B70000D0400E94F7990E94CB982B013C01A19652 +:10B710004CAE5DAE6EAE7FAEA1970E94F09C9B01D9 +:10B72000AC01C701B6010E94839CC956DF4F6883F4 +:10B7300079838A839B83C759D040CB57DF4F688377 +:10B7400079838A839B83C558D040AE0145585F4FAB +:10B75000BE016B577F4FCE0187579F4F0E948715C1 +:10B76000EF96ECACFDAC0EAD1FADEF97CB57DF4FB6 +:10B77000288139814A815B81C558D040C757DF4F46 +:10B78000688179818A819B81C958D040DE01A35AA2 +:10B79000BF4F4D01FE01E959FF4F5F0154966D0106 +:10B7A0000E94D916A196ECACFDAC0EAD1FADA197D1 +:10B7B000AB962CAD3DAD4EAD5FADAB97E5966CADA8 +:10B7C0007DAD8EAD9FADE5970E94C20A811172C01A +:10B7D00020E030E0A901C556DF4F688179818A8178 +:10B7E0009B81CB59D0400E94439C18160CF058C046 +:10B7F000C556DF4F88819981AA81BB81CB59D04042 +:10B80000CB57DF4F88839983AA83BB83C558D04029 +:10B81000CB57DF4FC880D980EA80FB80C558D04025 +:10B82000A7019601C556DF4F688179818A819B8186 +:10B83000CB59D0400E94ED9987FF21C0C556DF4FFC +:10B84000288139814A815B81CB59D040C701B6013B +:10B850000E94DC984B015C0120E030E0A9010E94CD +:10B86000439C18160CF044C023E333E343E35FE347 +:10B87000C501B4010E94439C18160CF443C020E09B +:10B8800030E040EA51E4C701B6010E94DD98CB5791 +:10B89000DF4F688379838A839B83C558D04032C049 +:10B8A000C556DF4F88819981AA81BB81CB59D04091 +:10B8B000B058A6CFA1964CAE5DAE6EAE7FAEA1974E +:10B8C000C956DF4F88819981AA81BB81C759D04071 +:10B8D00097CFA1964CAE5DAE6EAE7FAEA197CD5523 +:10B8E000DF4F88819981AA81BB81C35AD04088CF1C +:10B8F00023E333E343E35FEBC501B4010E94ED9919 +:10B9000087FFBDCFCB57DF4F88819981AA81BB814B +:10B91000C558D04069968CAF9DAFAEAFBFAF6997A9 +:10B920000C94804CC757DF4F88819981AA81BB81D5 +:10B93000C958D040C956DF4F88839983AA83BB83F7 +:10B94000C759D040EF968CAD9DADAEADBFADEF9772 +:10B95000C955DF4F88839983AA83BB83C75AD040D8 +:10B96000CB57DF4F88819981AA81BB81C558D040D0 +:10B97000C556DF4F88839983AA83BB83CB59D040B8 +:10B9800021EE3EE245E652E4C954DF4F68817981F9 +:10B990008A819B81C75BD0400E94F7996B017C0133 +:10B9A000AB96CCAEDDAEEEAEFFAEAB9721EE3EE297 +:10B9B00045E652E4CD54DF4F688179818A819B81CD +:10B9C000C35BD0400E94F7990E94F09C4B015C0140 +:10B9D000C701B6010E94F09C6B017C012CEE31E1A5 +:10B9E0004EE053E4C501B4010E94839C4B015C010D +:10B9F0002CE53FEC4EE153E4C701B6010E94839C65 +:10BA00009B01AC01C501B4010E94DC98C156DF4F17 +:10BA1000688379838A839B83CF59D04083E692E8F9 +:10BA2000AAE8BEE3E5968CAF9DAFAEAFBFAFE5979A +:10BA3000C156DF4F288139814A815B81CF59D0407F +:10BA4000CA01B9010E94839C9B01AC016BED7CE6AD +:10BA500082E997E40E94DC980E94FE9C6B017C01C5 +:10BA600023E333E343E551E460910E1570910F1524 +:10BA700080911015909111150E94DD98A7019601F3 +:10BA80000E94DD986B017C01AC019B01C956DF4F20 +:10BA9000688179818A819B81C759D0400E94F7993A +:10BAA0000E94CB982B013C01A1964CAE5DAE6EAED0 +:10BAB0007FAEA1970E94F09C9B01AC01C701B6012B +:10BAC0000E94839CCD55DF4F688379838A839B8353 +:10BAD000C35AD040CB57DF4F688379838A839B83D7 +:10BAE000C558D040AE0145585F4FBE016B577F4FE0 +:10BAF000CE0187579F4F0E948715EF96ECACFDACA7 +:10BB00000EAD1FADEF97CB57DF4F288139814A81AA +:10BB10005B81C558D040C757DF4F688179818A81E2 +:10BB20009B81C958D040DE01A35ABF4F4D01FE0191 +:10BB3000E959FF4F5F0154966D010E94D916A196F5 +:10BB4000ECACFDAC0EAD1FADA197AB962CAD3DADF1 +:10BB50004EAD5FADAB97E5966CAD7DAD8EAD9FAD57 +:10BB6000E5970E94C20A811136C2C956DF4F88810B +:10BB70009981AA81BB81C759D040C757DF4F8883BD +:10BB80009983AA83BB83C958D040C955DF4F8881A8 +:10BB90009981AA81BB81C75AD040EF968CAF9DAFE7 +:10BBA000AEAFBFAFEF978FE497E7A6E5BDEBAB96DF +:10BBB0008CAF9DAFAEAFBFAFAB972BEC3BEF44E08C +:10BBC00051E4C156DF4F688179818A819B81CF59C9 +:10BBD000D0400E94DC982CEE31E14EE053E40E940C +:10BBE000F7990E94499921EE3EE245E652E40E940F +:10BBF000839C21EE3EE245E652E40E94F799E596E9 +:10BC00006CAF7DAF8EAF9FAFE5970E94F2992CEE9F +:10BC100031E14EE053E40E94839C24EA37E94EE18F +:10BC200053E40E94DD986B017C0123E333E343E599 +:10BC300051E460910E1570910F158091101590913F +:10BC400011150E94DD98A70196010E94DD986B01F5 +:10BC50007C01AC019B01C956DF4F688179818A81E3 +:10BC60009B81C759D0400E94F7990E94CB982B0125 +:10BC70003C01A1964CAE5DAE6EAE7FAEA1970E9428 +:10BC8000F09C9B01AC01C701B6010E94839CCD557D +:10BC9000DF4F688379838A839B83C35AD040CB5715 +:10BCA000DF4F688379838A839B83C558D040AE0178 +:10BCB00045585F4FBE016B577F4FCE0187579F4F4F +:10BCC0000E948715EF96ECACFDAC0EAD1FADEF9763 +:10BCD000CB57DF4F288139814A815B81C558D040DD +:10BCE000C757DF4F688179818A819B81C958D040CD +:10BCF000D40154966D010E94D916A196ECACFDAC0E +:10BD00000EAD1FADA197AB962CAD3DAD4EAD5FAD69 +:10BD1000AB97E5966CAD7DAD8EAD9FADE5970E947E +:10BD2000C20A811158C1C956DF4F88819981AA8101 +:10BD3000BB81C759D040C757DF4F88839983AA83F7 +:10BD4000BB83C958D040C955DF4F88819981AA81EA +:10BD5000BB81C75AD040EF968CAF9DAFAEAFBFAF9F +:10BD6000EF978FE497E7A6E5BDEBE5968CAF9DAF27 +:10BD7000AEAFBFAFE597C156DF4F288139814A8109 +:10BD80005B81CF59D0406CE87EEE8DEE90EC0E9446 +:10BD9000DC982CE53FEC4EE153E40E94F7990E94B9 +:10BDA000499921EE3EE245E652E40E94839C21EE51 +:10BDB0003EE245E652E40E94F799AB966CAF7DAF48 +:10BDC0008EAF9FAFAB970E94F2992CE53FEC4EE10E +:10BDD00053E40E94839C24E130EE4DE053E40E9442 +:10BDE000DD986B017C0123E333E343E551E460918B +:10BDF0000E1570910F1580911015909111150E94DC +:10BE0000DD98A70196010E94DD986B017C01AC01D1 +:10BE10009B01C956DF4F688179818A819B81C7590F +:10BE2000D0400E94F7990E94CB982B013C01A1962B +:10BE30004CAE5DAE6EAE7FAEA1970E94F09C9B01B2 +:10BE4000AC01C701B6010E94839CC956DF4F6883CD +:10BE500079838A839B83C759D040CB57DF4F688350 +:10BE600079838A839B83C558D040AE0145585F4F84 +:10BE7000BE016B577F4FCE0187579F4F0E9487159A +:10BE8000EF96ECACFDAC0EAD1FADEF97CB57DF4F8F +:10BE9000288139814A815B81C558D040C757DF4F1F +:10BEA000688179818A819B81C958D040D401549698 +:10BEB0006D010E94D916A196ECACFDAC0EAD1FAD84 +:10BEC000A197AB962CAD3DAD4EAD5FADAB97E59672 +:10BED0006CAD7DAD8EAD9FADE5970E94C20A81111C +:10BEE0006BC020E030E0A901C556DF4F6881798141 +:10BEF0008A819B81CB59D0400E94ED9987FF52C027 +:10BF0000C556DF4F88819981AA81BB81CB59D0402A +:10BF1000CB57DF4F88839983AA83BB83C558D04012 +:10BF2000CB57DF4FC880D980EA80FB80C558D0400E +:10BF3000F7FAF094F7F8F094A7019601C556DF4F91 +:10BF4000688179818A819B81CB59D0400E94439C32 +:10BF50001816FCF4C556DF4F288139814A815B8170 +:10BF6000CB59D040C701B6010E94DC984B015C015F +:10BF700020E030E0A9010E94439C1816DCF523E381 +:10BF800033E343E35FE3C501B4010E94439C181609 +:10BF9000DCF120E030E040EA51E4C701B6010E9444 +:10BFA000DC9875CCC556DF4F88819981AA81BB8109 +:10BFB000CB59D040B058ACCFA1964CAE5DAE6EAE72 +:10BFC0007FAEA197C956DF4F88819981AA81BB8135 +:10BFD000C759D0409DCFA1964CAE5DAE6EAE7FAE40 +:10BFE000A197CD55DF4F88819981AA81BB81C35A22 +:10BFF000D0408ECF23E333E343E35FEBC501B401CD +:10C000000E94ED9987FFC5CFCB57DF4FC882D982F9 +:10C01000EA82FB82C558D04075CCC155DF4F88817C +:10C020009981AA81BB81CF5AD040A1968CAF9DAF98 +:10C03000AEAFBFAFA197C757DF4F88819981AA8163 +:10C04000BB81C958D040C554DF4F88839983AA83E8 +:10C05000BB83CB5BD040EC963FACEC97ED962FAC1E +:10C06000ED97EE969FADEE97C956DF4F9883C7596F +:10C07000D040EF96AFADEF97C556DF4FA883CB59B1 +:10C08000D040CB57DF4F88819981AA81BB81C558A9 +:10C09000D040C154DF4F88839983AA83BB83CF5B91 +:10C0A000D04021EE3EE245E652E4CD54DF4F6881B8 +:10C0B00079818A819B81C35BD0400E94F799CD55DD +:10C0C000DF4F688379838A839B83C35AD04021EEF4 +:10C0D0003EE245E652E4C954DF4F688179818A81A6 +:10C0E0009B81C75BD0400E94F799C555DF4F68839D +:10C0F00079838A839B83CB5AD040CD55DF4F6881AB +:10C1000079818A819B81C35AD0400E94F09C6B0147 +:10C110007C01C555DF4F688179818A819B81CB5A2B +:10C12000D0400E94F09C4B015C012CEE31E14EE0CE +:10C1300053E4C701B6010E94839C6B017C012CE58E +:10C140003FEC4EE153E4C501B4010E94839C9B0186 +:10C15000AC01C701B6010E94DC98C955DF4F688366 +:10C1600079838A839B83C75AD040CD55DF4F68813E +:10C1700079818A819B81C35AD0400E94F2996B01D8 +:10C180007C01C555DF4F688179818A819B81CB5ABB +:10C19000D0400E94F2994B015C012CEE31E14EE05F +:10C1A00053E4C701B6010E94839C6B017C012CE51E +:10C1B0003FEC4EE153E4C501B4010E94839C9B0116 +:10C1C000AC01C701B6010E94DD98C156DF4F6883FC +:10C1D00079838A839B83CF59D04083E899E5A6E190 +:10C1E000B0E4E5968CAF9DAFAEAFBFAFE59724E866 +:10C1F00032E847EC52E4C156DF4F688179818A8189 +:10C200009B81CF59D0400E94DD982CE53FEC4EE158 +:10C2100053E40E94F7990E94CB98AB966CAF7DAF28 +:10C220008EAF9FAFAB970E94F09C2CE53FEC4EE1A8 +:10C2300053E40E94839C9B01AC0168EA70E58AECA0 +:10C2400092E40E94DC989B01AC01C955DF4F6881E4 +:10C2500079818A819B81C75AD0400E94DC989B01DA +:10C26000AC01632D722DC956DF4F8881C759D0406C +:10C27000C556DF4F9881CB59D0400E94DC982B01E6 +:10C280003C01CB01D301EF968CAF9DAFAEAFBFAFFA +:10C29000EF97AE0145585F4FBE016B577F4FCE0100 +:10C2A00087579F4F0E948715EF96ECACFDAC0EAD03 +:10C2B0001FADEF97CB57DF4F288139814A815B81D2 +:10C2C000C558D040C757DF4F688179818A819B81EB +:10C2D000C958D040DE01A35ABF4F4D01FE01E959B4 +:10C2E000FF4F5F0154966D010E94D916A196ECACE8 +:10C2F000FDAC0EAD1FADA197AB962CAD3DAD4EADD7 +:10C300005FADAB97E5966CAD7DAD8EAD9FADE5971E +:10C310000E94C20A81119AC1C155DF4F888199815B +:10C32000AA81BB81CF5AD040A1968CAF9DAFAEAF52 +:10C33000BFAFA197C554DF4F88819981AA81BB8186 +:10C34000CB5BD040C757DF4F88839983AA83BB83D9 +:10C35000C958D040C154DF4F88819981AA81BB81DF +:10C36000CF5BD040CB57DF4F88839983AA83BB83B1 +:10C37000C558D0408FE497E7A6E5BDEBAB968CAFF0 +:10C380009DAFAEAFBFAFAB9724EA37E94EE153E4C0 +:10C39000C156DF4F688179818A819B81CF59D04016 +:10C3A0000E94DC982CEE31E14EE053E40E94F799B4 +:10C3B0000E94CB98E5966CAF7DAF8EAF9FAFE597AF +:10C3C0000E94F09C2CEE31E14EE053E40E94839CED +:10C3D0002BEC3BEF44E051E40E94DD989B01AC0163 +:10C3E000C955DF4F688179818A819B81C75AD040C6 +:10C3F0000E94DC989B01AC01632D722DC956DF4F62 +:10C400008881C759D040C556DF4F9881CB59D0405D +:10C410000E94DC982B013C01CB01D301EF968CAF3D +:10C420009DAFAEAFBFAFEF97AE0145585F4FBE01B6 +:10C430006B577F4FCE0187579F4F0E948715EF960E +:10C44000ECACFDAC0EAD1FADEF97CB57DF4F2881A5 +:10C4500039814A815B81C558D040C757DF4F688119 +:10C4600079818A819B81C958D0400E94D916A196B2 +:10C47000ECACFDAC0EAD1FADA197AB962CAD3DADB8 +:10C480004EAD5FADAB97E5966CAD7DAD8EAD9FAD1E +:10C49000E5970E94C20A8111D9C0C155DF4F88813A +:10C4A0009981AA81BB81CF5AD040A1968CAF9DAF14 +:10C4B000AEAFBFAFA197C554DF4F88819981AA81E4 +:10C4C000BB81CB5BD040C757DF4F88839983AA835A +:10C4D000BB83C958D040C154DF4F88819981AA815C +:10C4E000BB81CF5BD040CB57DF4F88839983AA8332 +:10C4F000BB83C558D040CD55DF4F88819981AA8133 +:10C50000BB81C35AD040E5968CAF9DAFAEAFBFAFF5 +:10C51000E597C555DF4F88819981AA81BB81CB5AA8 +:10C52000D040AB968CAF9DAFAEAFBFAFAB97C1560F +:10C53000DF4F288139814A815B81CF59D040CA01C0 +:10C54000B9010E94839C9B01AC016EE378EF84EA01 +:10C5500097E40E94DC986B017C0120E030E0A901A7 +:10C560000E94439C181624F0F7FAF094F7F8F09420 +:10C57000C701B6010E94FE9C9B01AC01C955DF4F6B +:10C58000688179818A819B81C75AD0400E94DC985A +:10C590009B01AC01632D722DC956DF4F8881C759AD +:10C5A000D040C556DF4F9881CB59D0400E94DC98CF +:10C5B0002B013C01CB01D301EF968CAF9DAFAEAF09 +:10C5C000BFAFEF97AE0145585F4FBE016B577F4F2E +:10C5D000CE0187579F4F0E948715EF96ECACFDACBC +:10C5E0000EAD1FADEF97CB57DF4F288139814A81C0 +:10C5F0005B81C558D040C757DF4F688179818A81F8 +:10C600009B81C958D040DE01A35ABF4F4D01FE01A6 +:10C61000E959FF4F5F0154966D010E94D916A1960A +:10C62000ECACFDAC0EAD1FADA197AB962CAD3DAD06 +:10C630004EAD5FADAB97E5966CAD7DAD8EAD9FAD6C +:10C64000E5970E94C20A882309F454C09201A3010D +:10C65000632D722DC956DF4F8881C759D040C5560A +:10C66000DF4F9881CB59D0400E94ED9987FF23C0BE +:10C670009201A301632D722DC956DF4F8881C759DE +:10C68000D040C556DF4F9881CB59D0400E94DC98EE +:10C690006B017C0120E030E0A9010E94439C181648 +:10C6A000ACF423E333E343E35FE3C701B6010E9445 +:10C6B000439C1816ACF020E030E040EA51E4B201AF +:10C6C000C3010E94DD982B013C010AC023E333E340 +:10C6D00043E35FEBC701B6010E94ED9987FFEBCF03 +:10C6E000C201D3016D968CAF9DAFAEAFBFAF6D975A +:10C6F0000C94804C432C522CC956DF4F6880C7598C +:10C70000D040C556DF4F7880CB59D040D4CFC155EB +:10C71000DF4F88819981AA81BB81CF5AD040A196F1 +:10C720008CAF9DAFAEAFBFAFA197C953DF4F88812C +:10C730009981AA81BB81C75CD040C757DF4F8883EE +:10C740009983AA83BB83C958D040C553DF4F8881E2 +:10C750009981AA81BB81CB5CD040CB57DF4F8883C6 +:10C760009983AA83BB83C558D040C554DF4F8881C5 +:10C770009981AA81BB81CB5BD040E5968CAF9DAF00 +:10C78000AEAFBFAFE597C154DF4F88819981AA81D1 +:10C79000BB81CF5BD040AB968CAF9DAFAEAFBFAF90 +:10C7A000AB97A30192016EE378EF84EA97E40E94CD +:10C7B000DC986B017C0120E030E0A9010E94439CE1 +:10C7C000181624F0F7FAF094F7F8F094C701B601C0 +:10C7D0000E94FE9C2B013C01AC019B01CD53DF4F1D +:10C7E000688179818A819B81C35CD0400E94DC98FA +:10C7F000C956DF4F688379838A839B83C759D040AA +:10C800009B01AC01C156DF4F6881CF59D040C9555B +:10C81000DF4F7881C75AD040CD55DF4F8881C35A4A +:10C82000D040C555DF4F9881CB5AD0400E94DC984C +:10C83000EF966CAF7DAF8EAF9FAFEF97AE014558CF +:10C840005F4FBE016B577F4FCE0187579F4F0E94AE +:10C850008715EF96ECACFDAC0EAD1FADEF97CB5747 +:10C86000DF4F288139814A815B81C558D040C75745 +:10C87000DF4F688179818A819B81C958D040DE0170 +:10C88000A35ABF4F4D01FE01E959FF4F5F01549676 +:10C890006D010E94D91621EE3EE245E652E4E5968E +:10C8A0006CAD7DAD8EAD9FADE5970E94F7994B01C4 +:10C8B0005C01E5968CAE9DAEAEAEBFAEE59721EEC7 +:10C8C0003EE245E652E4AB966CAD7DAD8EAD9FADDC +:10C8D000AB970E94F799C155DF4F688379838A83AC +:10C8E0009B83CF5AD040AB966CAF7DAF8EAF9FAFDE +:10C8F000AB97C956DF4F288139814A815B81C7597F +:10C90000D040C301B2010E94DD98C956DF4F688351 +:10C9100079838A839B83C759D040C155DF4F688193 +:10C9200079818A819B81CF5AD0400E94F09C2B0153 +:10C930003C01C501B4010E94F09C6B017C012CEE0E +:10C9400031E14EE053E4C301B2010E94839C2B010C +:10C950003C012CE53FEC4EE153E4C701B6010E94D7 +:10C96000839C9B01AC01C301B2010E94DC989B0136 +:10C97000AC01C956DF4F688179818A819B81C75993 +:10C98000D0400E94DC982B013C01AC019B01C156B8 +:10C99000DF4F6881CF59D040C955DF4F7881C75AE2 +:10C9A000D040CD55DF4F8881C35AD040C555DF4FA9 +:10C9B0009881CB5AD0400E94DC98C956DF4F6883DB +:10C9C000C759D040C556DF4F7883CB59D0401C01A2 +:10C9D000A196ECACFDAC0EAD1FADA197C155DF4FDC +:10C9E000288139814A815B81CF5AD040C501B40189 +:10C9F0000E94C20A8823D1F0A3019201C956DF4FD9 +:10CA00006881C759D040C556DF4F7881CB59D04097 +:10CA1000C1010E94DC98C956DF4F6883C759D040D6 +:10CA2000C556DF4F7883CB59D0401C01C956DF4F24 +:10CA30002881C759D040C556DF4F3881CB59D040E7 +:10CA4000A101C156DF4F6881CF59D040C955DF4F92 +:10CA50007881C75AD040CD55DF4F8881C35AD04026 +:10CA6000C555DF4F9881CB5AD0400E94439C181681 +:10CA70000CF067C0C956DF4F2881C759D040C55652 +:10CA8000DF4F3881CB59D040A101C156DF4F6881BB +:10CA9000CF59D040C955DF4F7881C75AD040CD55C6 +:10CAA000DF4F8881C35AD040C555DF4F9881CB5A9C +:10CAB000D0400E94DC986B017C0120E030E0A901AD +:10CAC0000E94439C18163CF523E333E343E35FE302 +:10CAD000C701B6010E94439C18163CF120E030E0EB +:10CAE00040EA51E4C956DF4F6881C759D040C55666 +:10CAF000DF4F7881CB59D040C1010E94DC98C956E4 +:10CB0000DF4F6883C759D040C556DF4F7883CB5974 +:10CB1000D0401C010AC023E333E343E35FEBC701CA +:10CB2000B6010E94ED9987FFD9CFC956DF4F8881A2 +:10CB3000C759D040C556DF4F9881CB59D040D1015D +:10CB4000D1CDC956DF4FB881C759D040C156DF4F4C +:10CB5000B883CF59D040C556DF4FE881CB59D0407C +:10CB6000C955DF4FE883C75AD040CD55DF4F2882E3 +:10CB7000C35AD040C555DF4F3882CB5AD0400C94B1 +:10CB800000518E010F5F1F4F1F930F93CE01CD9663 +:10CB90009F938F938DEF93E09F938F937F936F93EA +:10CBA0000E942E9E0FB6F894DEBF0FBECDBF029737 +:10CBB00014F40C94C546AE01475D5F4F70E060E031 +:10CBC000C8010E94600F90E0882311F40C94E146A4 +:10CBD00080E00E943E2C762E272EC956DF4F888398 +:10CBE000C759D040C556DF4F9883CB59D04081E01C +:10CBF00090E00E943E2C362E472E582E692E82E061 +:10CC000090E00E943E2C20E030E044EB52E40E9491 +:10CC1000DC98C156DF4F688379838A839B83CF5921 +:10CC2000D040C9A4DAA4EBA4FCA420E030E0A90120 +:10CC3000C701B6010E94ED9987FF0DC08DAD9EAD75 +:10CC400003969EAF8DAFF7FAF094F7F8F094C9A66B +:10CC5000DAA6EBA6FCA620E030E0A90169A57AA53A +:10CC60008BA59CA50E94ED99882371F08DAD9EAD9A +:10CC70008230910509F4E6C10CF044C0009709F434 +:10CC800095C0019709F404C19E012B5E3F4FCB561E +:10CC9000DF4F39832883C559D0408CE0D9011D92DC +:10CCA0008A95E9F7FE017D964F012C5F3F4F5901B0 +:10CCB000CE0145966C01C156DF4FE880F9800A81AC +:10CCC0001B81CF59D040232D342D452D562D672D56 +:10CCD000722DC956DF4F8881C759D040C556DF4FE6 +:10CCE0009881CB59D0400E946512A401B501C601BC +:10CCF0000E94311629A53AA54BA55CA500E0B60116 +:10CD00000C94DC488430910509F433C10CF48BC0D9 +:10CD1000059709F0B9CF272D322DC956DF4F48812D +:10CD2000C759D040C556DF4F5881CB59D04060E03D +:10CD300070E088EE91E40E94DC982DEC3CEC4CEC29 +:10CD40005EE30E94DD98F62E072F182FE92E20E0D3 +:10CD500030E040E450EC0E94ED9987FF05C0F12CD3 +:10CD600000E010E430ECE32E232D342D452D562D1C +:10CD70006F2D702F812F9E2D0E94DC984B015C013E +:10CD800020E030E0A9010E94439C18160CF0BAC1C3 +:10CD900023E333E343E35FE3C501B4010E94ED996C +:10CDA00087FD9BC13F2C28016E2C6ECFC156DF4FF3 +:10CDB000288139814A815B81CF59D04060E070E0A1 +:10CDC00084EB92E40E94DC986B017C0120E030E06F +:10CDD000A9010E94439C18167CF423E333E343E348 +:10CDE0005FE3C701B6010E94ED9987FF0FC080E0A5 +:10CDF00090E0A8E4B3E40EC023E333E343E35FEB46 +:10CE0000C701B6010E94439C18168CF380E090E0A5 +:10CE1000A4EBB2E4C156DF4F88839983AA83BB8316 +:10CE2000CF59D04031CFC156DF4F288139814A8157 +:10CE30005B81CF59D04060E070E084EB92EC0E94BF +:10CE4000DC986B017C0120E030E0A9010E94439C4A +:10CE500018167CF423E333E343E35FE3C701B60131 +:10CE60000E94ED9987FF0FC080E090E0A8E4B3EC4A +:10CE7000D1CF23E333E343E35FEBC701B6010E9465 +:10CE8000439C18168CF380E090E0A4EBB2ECC2CF88 +:10CE9000232D342D452D562D60E070E08AE293E479 +:10CEA0000E94DC986B017C012AE939E946E053E4F1 +:10CEB0000E94439C181644F45AE9C52E59E9D52E10 +:10CEC00056E0E52E53E4F52EC701B6010E94699A9B +:10CED000072E000C880B990B0E94A19AB62E072FE3 +:10CEE000182FA92E272D322DC956DF4F4881C7593B +:10CEF000D040C556DF4F5881CB59D0400E94DC98B6 +:10CF00006B017C0120E030E0A9010E94439C1816CF +:10CF1000CCF423E333E343E35FE3C701B6010E94AC +:10CF2000ED9987FF19C0712C212C98E4C956DF4F69 +:10CF30009883C759D040A3E4C556DF4FA883CB5987 +:10CF4000D040A2CE23E333E343E35FEBC701B60156 +:10CF50000E94439C18163CF37B2C202EC956DF4FB1 +:10CF60001883C759D040C556DF4FA882CB59D0404F +:10CF70008BCE232D342D452D562D60E070E088EEAC +:10CF800091E40E94DC982DEC3CEC4CEC5EE30E94BA +:10CF9000DD987B01182F092F20E030E040E450ECB1 +:10CFA0000E94ED9987FF04C0E12CF12C10E400EC05 +:10CFB000272D322DC956DF4F4881C759D040C5565D +:10CFC000DF4F5881CB59D040B701812F902F0E945D +:10CFD000DC984B015C0120E030E0A9010E94439CF9 +:10CFE0001816CCF423E333E343E35FE3C501B40154 +:10CFF0000E94ED9987FF19C0712C212CB8E4C95605 +:10D00000DF4FB883C759D040E3E4C556DF4FE8830C +:10D01000CB59D04039CE23E333E343E35FEBC50183 +:10D02000B4010E94439C18163CF37E2C2F2CC95649 +:10D03000DF4F1883C759D040C556DF4F0883CB59FF +:10D04000D04022CE272D322DC956DF4F4881C759F7 +:10D05000D040C556DF4F5881CB59D04060E070E0DA +:10D060008AE293E40E94DC986B017C012DEC3CEC9D +:10D070004DEE52E40E94439C181644F44DECC42E2D +:10D080004CECD42E4DEEE42E42E4F42EC701B60152 +:10D090000E94699A072E000C880B990B0E94A19A96 +:10D0A000B62E072F182FA92E232D342D452D562DA2 +:10D0B0000E94DC986B017C0120E030E0A9010E9415 +:10D0C000439C18168CF423E333E343E35FE3C70187 +:10D0D000B6010E94ED9987FF11C0312C412C98E4D4 +:10D0E000592E23E4622ED0CD23E333E343E35FEBF9 +:10D0F000C701B6010E94439C18167CF33B2C280103 +:10D100006A2CC2CD23E333E343E35FEBC501B401F3 +:10D110000E94439C18160CF345CE809068159090A1 +:10D120006915A0906A15B0906B1520E030E0A90158 +:10D13000C701B6010E94ED9987FF1DC0A7019601A6 +:10D1400060E070E080E090E40E94DC9820E030E055 +:10D1500040EA52E40E94839CA50194010E94F79941 +:10D160006D8F7E8F8F8F98A3C12CD12CE12C00E482 +:10D17000F02E0C94664560913A1570913B158091A4 +:10D180003C1590913D150E94A19AA50194010E9421 +:10D19000F7996D8F7E8F8F8F98A30C94664520E052 +:10D1A00030E040E850ECC301B2010E94ED9987FFE6 +:10D1B0001DC0A301920160E070E080E090EC0E944D +:10D1C000DC9820E030E040EA52E40E94839CA50114 +:10D1D00094010E94F7996D8B7E8B8F8B988F412CD9 +:10D1E000512C612CB0EC7B2E0C949845609132153B +:10D1F0007091331580913415909135150E94A19A44 +:10D20000A50194010E94F7996D8B7E8B8F8B988F6F +:10D210000C94984520E030E040E850ECC956DF4FD0 +:10D22000688179818A819B81C759D0400E94ED999C +:10D2300087FF22C0C956DF4F288139814A815B812F +:10D24000C759D04060E070E080E090EC0E94DC982C +:10D2500020E030E040EA52E40E94839CA501940162 +:10D260000E94F799698F7A8F8B8F9C8F80E090E076 +:10D27000A0E0B0EC0C94D245609136157091371552 +:10D2800080913815909139150E94A19AA5019401B9 +:10D290000E94F799698F7A8F8B8F9C8F0C94DA4557 +:10D2A0002F923F924F925F926F927F928F929F92B6 +:10D2B000AF92BF92CF92DF92EF92FF920F931F93A4 +:10D2C000CF93DF93CDB7DEB767970FB6F894DEBF85 +:10D2D0000FBECDBF9091AF159111F5C0782E20E60D +:10D2E00035E1398B288B5901CE010D964C0110E0A8 +:10D2F00000E0C12CD12C7601A72DB0E0BB8BAA8B0E +:10D30000802F91E0002321F094E0013009F492E0B5 +:10D31000F40191934F012A893B8902C035952795E5 +:10D320008A95E2F720FF1BC020E030E040EC5FEB85 +:10D33000D50194966D917D918D919C9197970E94C6 +:10D34000839C362E472E582E692EA70196010E94E7 +:10D35000ED9987FD04C0C32CD42CE52CF62C0F5F6F +:10D360001F4FB4E0AB0EB11C0330110549F680909D +:10D37000A3159090A415A090A515B090A61584E0D3 +:10D38000682E01E04424439463EB75E1CE010196DD +:10D390000E945D0B80919E15E82FF0E0FF8BEE8BD5 +:10D3A000FE0131962FEA35E13D8B2C8B1901512C72 +:10D3B00010E030E020E0B701A60170588A899B890F +:10D3C000022E02C0959587950A94E2F780FF27C048 +:10D3D0005394D10114961D921D921D921C92179781 +:10D3E0008E899F89022E02C0959587950A94E2F74F +:10D3F00080FF07C0002339F0408351836283738329 +:10D4000006C00023C9F3C082D182E282F382ADE07C +:10D41000B0E0AC0FBD1FA20FB31F8C91182B2F5F74 +:10D420003F4F3496B4E02B0E311C2330310531F6DA +:10D43000652D70E090E080E00E949F9A0E94FE9C23 +:10D44000A50194010E94839C6B017C011093CC1573 +:10D450000E94D20D20E0B701A601CE0101960E94E4 +:10D4600036250E9462190E94FC0B0023E9F00E94FD +:10D470001C10FE013D9630E020E090E06191462FC7 +:10D48000412359F0AC01022E02C0559547950A94EC +:10D49000E2F740FF02C0609516232F5F3F4F233015 +:10D4A000310561F71093CC150E94621980915E15C9 +:10D4B000847309F4ACC080915E158073E9F00E941A +:10D4C000C4110E949E3D67960FB6F894DEBF0FBE52 +:10D4D000CDBFDF91CF911F910F91FF90EF90DF9023 +:10D4E000CF90BF90AF909F908F907F906F905F9004 +:10D4F0004F903F902F9008950111A4C00E941C10DE +:10D500008721E9F69FB7F89480915E158B7F809311 +:10D510005E159FBF0E94483D0E9476158091A71519 +:10D520009091A8150E94712D042509F475C020E082 +:10D5300030E040EA50E46091A9157091AA158091FD +:10D54000AB159091AC150E94839C6B017C0180907F +:10D550009F159090A015A090A115B090A2156A9467 +:10D56000611012CF20909E15312CC090A915D0903B +:10D57000AA15E090AB15F090AC152601370177FAAB +:10D58000709477F8709410E000E08A899B89002EEF +:10D5900002C0959587950A94E2F780FF25C0E88937 +:10D5A000F98980809180A280B380C101002E02C0E1 +:10D5B000959587950A94E2F780FF3FC024A135A195 +:10D5C00046A157A1C701B6010E94DD98A5019401AB +:10D5D0000E94839C0E94509CAC89BD8914966D93D7 +:10D5E0007D938D939C9317970F5F1F4FEC89FD8957 +:10D5F0003496FD8BEC8B288939892C5F3F4F398B12 +:10D60000288B0330110509F60E94D20D5CCF812FC3 +:10D61000877009F02ACF7ECFC090A915D090AA15A7 +:10D62000E090AB15F090AC158090A3159090A415E8 +:10D63000A090A515B090A61592CFA5019401C301A5 +:10D64000B201C6CF80915E1582FF5CCF38CF2F929A +:10D650003F924F925F926F927F928F929F92AF9282 +:10D66000BF92CF92DF92EF92FF920F931F93CF93CF +:10D67000DF93CDB7DEB7C358D1090FB6F894DEBF3C +:10D680000FBECDBFE8969FAF8EAFE897E1EDF5E115 +:10D6900089E3DF011D928A95E9F78AE0EAE0F6E185 +:10D6A000A2EDB5E101900D928A95E1F7FE01E35AF2 +:10D6B000FF4F1082E2961FAE1EAEE297AE961FAEEF +:10D6C0001EAEAE97E9961FAEE997A9961FAEA99731 +:10D6D000A8961FAEA89796ED292E94E1392EEC5509 +:10D6E000F109A096FFAFEEAFA0979E01235C3F4FDC +:10D6F000A2963FAF2EAFA297CE018996A4969FAF78 +:10D700008EAFA497DE015596A696BFAFAEAFA69793 +:10D710006E968FAD6E97E896EEADFFADE897E80F89 +:10D72000F11D3081E3963FAFE397311138C0A996E0 +:10D730008FADA997882349F0A8969FADA89791111E +:10D7400004C0A2E0A896AFAFA897E196BFADE1975D +:10D75000B5FF0FC08091ED159091EE15A091EF15DA +:10D76000B091F0151BE180389649A849B1050CF03D +:10D77000B0C18091D315813011F00C944F75A896EB +:10D78000FFADA897F23011F00C947275E1962FADB1 +:10D79000E19720FF02C00C94727516E19AC1E396DE +:10D7A0009FADE39791549A3110F00C945F7D8F5F99 +:10D7B0006E968FAF6E97AE01475A5F4FBE01635AA8 +:10D7C0007F4FE8968EAD9FADE8970E94600F88234B +:10D7D00011F40C94627D6D968CAC9DACAEACBFAC7C +:10D7E0006D97C501B4010E94429D0E94709A2B0161 +:10D7F0008B0190E080E00E949F9A9B01AC01C501E3 +:10D80000B4010E94DC9820E030E048EC52E40E9431 +:10D81000839C6B017C0120E030E0A9010E94439CC5 +:10D8200020E030E040E05FE387FD37C0C701B6018C +:10D830000E94DD980E94699A7B01E396BFADE39751 +:10D84000BD3409F46FC20CF02DC0B73409F443C0E5 +:10D85000E396EFADE397E654E53108F067C00E2E8E +:10D86000000CFF0B8827E85CF3498F4F0C94CA9D8E +:10D870005774966C966CAC74C074D474E874966CDF +:10D88000EF74966C0075966C0D7539744D75966CC9 +:10D89000966C966C17752B753C75C701B6010E9486 +:10D8A000DC98C8CFE396EFADE397E03509F4D3C237 +:10D8B000E33509F0CDCF672B09F068C1083EF3E0EE +:10D8C0001F0709F488C70C34144011F40C945174E8 +:10D8D00081E090E0A0C76E966FAD6E97E8962EAD92 +:10D8E0003FADE897260F311DB901C2010E94C14327 +:10D8F0009C01215031092230310510F0182FE9C068 +:10D900000832110509F4EBC108F046C004311105D5 +:10D9100078F40131110508F084C10430110509F4CF +:10D920009BC0F0F00A30110509F488C014E1D1C0A1 +:10D930000C31110509F482C060F406311105B0F70D +:10D940000431110509F0B1C181E08093D41586E05E +:10D9500079C10E31110509F471C00632110531F794 +:10D96000A8968FADA897811175C00230110509F4F2 +:10D9700013C108F0E0C00115110509F4FAC0013027 +:10D98000110509F405C1B1E0A796BFAFA797E2E082 +:10D99000A896EFAFA897F7C00D33110509F497C10A +:10D9A00050F50533110509F457C0D8F40B321105B1 +:10D9B00021F00133110509F0B9CFA896AFADA897B2 +:10D9C000A11148C00133110509F073C11092D71598 +:10D9D000B8E0A796BFAFA797E3E0A896EFAFA897E8 +:10D9E00064C00C33110508F0A1CF8AEC840D80933C +:10D9F000D81589E027C10C35110580F40A351105C9 +:10DA000008F02CC10035110509F090CF88E0809313 +:10DA1000D21521E0A7962FAFA797B5C00C351105F9 +:10DA200069F00F35110508F081CF0D35110509F0AA +:10DA300038C181E08093D31525E0ECCFE114F104E7 +:10DA400011F00C94AF7DA8963FADA897332311F445 +:10DA50000C94717D18E13DC00C31110511F40C944A +:10DA6000857D50F40430110581F00A301105A9F0CC +:10DA7000A7961FAEA79787C00E31110509F448C0BD +:10DA800005331105A9F787E001C081E08093D11526 +:10DA9000EFCF81E0A8968FAFA89782E0F7CF83E021 +:10DAA0008093D115A7961FAEA797AE962EAD3FAD2A +:10DAB000AE97C901B0E0A0E0A7960FACA79704C04D +:10DAC000B695A795979587950A94D2F780FF11C1CF +:10DAD00015E1812FCD57DF4F0FB6F894DEBF0FBE93 +:10DAE000CDBFDF91CF911F910F91FF90EF90DF900D +:10DAF000CF90BF90AF909F908F907F906F905F90EE +:10DB00004F903F902F900895B1E0A896BFAFA8978F +:10DB1000E114F10439F0EAE0EE16F10409F006CF61 +:10DB200086E0BECF85E0BCCFF1E0A896FFAFA89716 +:10DB3000AACF88E0B5CF03301105D1F10632110527 +:10DB400009F021CF9EE1E916F10409F452C0E0F595 +:10DB5000B4E1EB16F10409F0E9CE84E08093D2152C +:10DB600021E0A7962FAFA79732E0A8963FAFA897DE +:10DB70009CCF1092D21591E0A7969FAFA797A2E0F5 +:10DB8000A896AFAFA897EF2809F48FCF17E1A1CFE0 +:10DB900081E08093D215F7CE82E08093D215F1E038 +:10DBA000A796FFAFA79722E0A8962FAFA897EBCF35 +:10DBB00083E08093D21531E0A7963FAFA79782E02C +:10DBC000A8968FAFA897DFCFE8E2EE16F104E9F050 +:10DBD000F2E3EF16F10409F0A9CE87E08093D215A5 +:10DBE000E1E0A796EFAFA797F2E0A896FFAFA8975E +:10DBF0005CCF85E08093D21581E0A7968FAFA79781 +:10DC000092E0A8969FAFA89750CF86E08093D21558 +:10DC1000A1E0A796AFAFA797B2E0A896BFAFA8972D +:10DC200044CF0231110551F00331110579F0109202 +:10DC3000D61532E0A7963FAFA797A5CF81E0809396 +:10DC4000D61582E0A7968FAFA7979DCF82E08093ED +:10DC5000D61592E0A7969FAFA79795CFE114F10450 +:10DC600091F40A35110539F41092D515A3E0A79661 +:10DC7000AFAFA7971ACF81E08093D515B3E0A796F1 +:10DC8000BFAFA79712CFEAE0EE16F10409F04ECE2F +:10DC90000A35110509F44ACEF4E0A796FFAFA7971D +:10DCA00004CF1092D31535E0C5CF1092D41596E06D +:10DCB000D1CFFAE0EF16F10409F038CE81E080937D +:10DCC000D71528E0A7962FAFA79733E04ECFEF28C0 +:10DCD00009F02CCE9AE0A7969FAFA797E6CEA7E0D3 +:10DCE000A796AFAFA7974FCFA7961FAEA797F1E024 +:10DCF0007CCF81E090E0A0E0B0E0A7960FACA797C2 +:10DD000004C0880F991FAA1FBB1F0A94D2F7AE96B2 +:10DD1000EEADFFADAE97E82BF92BAE96FFAFEEAFB1 +:10DD2000AE97F6CC672B09F031CF6E966FAD6E973C +:10DD3000E8962EAD3FADE897260F311DB901C2011F +:10DD40000E94F22E9C01215031092230310508F049 +:10DD5000D5CD0630110598F403301105E0F00430FC +:10DD6000110509F452C00530110509F456C081E0CF +:10DD70008093DB159CE0A7969FAFA7971CC0083047 +:10DD8000110508F4D3CD0A30110508F44DC00E3149 +:10DD9000110509F0CBCD0230110579F10E311105D5 +:10DDA00061F1012B09F052C081E08093D9153BE06D +:10DDB000A7963FAFA797AE96EEADFFADAE97CF015A +:10DDC000B0E0A0E0A7960FACA79704C0B695A795C2 +:10DDD000979587950A94D2F780FD7ACE81E090E0FE +:10DDE000A0E0B0E0A7960FACA79704C0880F991FDA +:10DDF000AA1FBB1F0A94D2F78ECF82E08093D91559 +:10DE00008BE0A7968FAFA797D6CF82E08093DB15E4 +:10DE1000ACE0A796AFAFA797CECF1092DB15BCE0D2 +:10DE2000A796BFAFA797C7CF0930110541F082E091 +:10DE30008093DA15EDE0A796EFAFA797BCCF1092CD +:10DE4000DA15FDE0A796FFAFA797B5CF2BE0A79611 +:10DE50002FAFA797B0CF672B09F098CE6E96EFAD96 +:10DE60006E97E8962EAD3FADE8972E0F311DF90164 +:10DE7000083B38E0130709F48AC308F0A1C00C3945 +:10DE800098E0190709F476C188F50939B8E01B074D +:10DE900009F46AC138F40839184009F402C181E074 +:10DEA00090E01CC00A3928E0120709F460C18AE139 +:10DEB00094E00B39184099F79F938F9385E194E094 +:10DEC0009F938F933F922F920E94FE9D0F900F90F1 +:10DED0000F900F900F900F9090E080E09C012150E8 +:10DEE00031092230310508F466CF08CD0C3A88E0BC +:10DEF000180709F4AAC108F050C00D39A8E01A07A4 +:10DF000009F43BC10E39184051F680818E3409F076 +:10DF100092C081818053843008F08DC094E1A29634 +:10DF2000EEADFFADA297292F11922A95E9F7A4969D +:10DF3000AEADBFADA497E92F1D92EA95E9F7A6967D +:10DF4000AEADBFADA697E92F1D92EA95E9F7A09671 +:10DF5000AEADBFADA0971D929A95E9F7823009F456 +:10DF600025C1833009F435C1813009F40BC182E049 +:10DF700090E00E943E2C8E010B5E1F4F24E045E096 +:10DF80000E945C96A696BFADA697BF93A596EFADEF +:10DF9000A597EF938EEA92E093CF0D3AE8E01E0743 +:10DFA00009F4EDC1073B184009F079CFA499ABC241 +:10DFB00080E01F928F93A4E1B5E0BF93AF9382CF2F +:10DFC000003C28E0120709F420C3C0F50A3B88E0B2 +:10DFD000180709F4F5C208F4EBC20B3BA8E01A07D6 +:10DFE00009F4F9C20C3B184009F059CF21E030E0A8 +:10DFF0002C0F3D1F3F932F938CE494E09F938F93BE +:10E00000FF93EF930E942E9E0F900F900F900F9012 +:10E010000F900F90181619060CF4E3C21F9281E0BE +:10E020008F9388E792E09F938F930E9427230F900E +:10E030000F900F900F9082E390E050CF033C28E0C8 +:10E04000120709F445C3F0F4013C88E0180709F40D +:10E050001EC3023C184009F022CF8091C6148F9352 +:10E060008091C5148F938091C4148F938091C314B1 +:10E070008F938091C2148F938091C1148F9380E508 +:10E0800094E066C0043CA8E01A0709F437C30036E0 +:10E09000194009F004CF80910D158F9380910C15D4 +:10E0A000ADC284E1A496EEADFFADA497282F1192E6 +:10E0B0002A95E9F7A696AEADBFADA697E82F1D92BB +:10E0C000EA95E9F7A096AEADBFADA0971D928A95EF +:10E0D000E9F790E080E00E943E2C2B013C0181E0BA +:10E0E00090E00E943E2C4B015C0182E090E00E9497 +:10E0F0003E2C6B017C018E01075D1F4F24E045E043 +:10E10000C301B2010E945C960451110924E045E06C +:10E11000C501B4010E945C960451110924E045E058 +:10E12000C701B6010E945C96A696BFADA697BF93A5 +:10E13000A596EFADA597EF93A496FFADA497FF9397 +:10E14000A3962FADA3972F931F930F9385EE92E085 +:10E150009F938F933F922F920E94FE9D0FB6F8944B +:10E16000DEBF0FBECDBFB8CE8CE094E0A5CE85E972 +:10E1700092E1A2CE82E294E09FCE89EC94E19F935B +:10E180008F9308CF90E080E00E943E2C8E01035CCC +:10E190001F4F24E045E00E945C96A296FFADA29737 +:10E1A000FF93A1962FADA1972F93F4CE81E090E03D +:10E1B0000E943E2C8E01075D1F4F24E045E00E9427 +:10E1C0005C96A4963FADA4973F93A3968FADA3977B +:10E1D000D7CF80910C1590910D150497029790F46C +:10E1E000609188127091891280918A1290918B129D +:10E1F0008E010F5F1F4F24E045E00E945C961F9345 +:10E200000F93C8CE20E030E040E05FE36091000271 +:10E210007091010280910202909103020E94DC98A9 +:10E2200020E030E040E05FE30E94839C20E030E0AB +:10E2300044E353E40E94839C9B01AC0160E070E0E6 +:10E2400084E393E40E94DC98D3CF69961CAE1DAEA4 +:10E250001EAE1FAE699765961CAE1DAE1EAE1FAEFC +:10E26000659721961CAE1DAE1EAE1FAE219784E1B0 +:10E27000A496EEADFFADA497282F11922A95E9F749 +:10E28000A696AEADBFADA697E82F1D92EA95E9F729 +:10E29000A096AEADBFADA0971D928A95E9F790E02C +:10E2A00080E00E943E2C2B013C0181E090E00E9426 +:10E2B0003E2CE6966CAF7DAF8EAF9FAFE69782E0C7 +:10E2C00090E00E943E2C20E030E044EB52E40E94BB +:10E2D000DC98FE01FD964F019E012F5A3F4F5901D8 +:10E2E000DE01AB5ABF4F6D017B018C01E6962CAD70 +:10E2F0003DAD4EAD5FADE697C301B2010E94651220 +:10E30000A401B501C6010E94311669966CAD7DADC0 +:10E310008EAD9FAD69978E01075D1F4F24E045E0EC +:10E320000E945C9665966CAD7DAD8EAD9FAD659798 +:10E330000451110924E045E00E945C9621966CADE1 +:10E340007DAD8EAD9FAD21970451110924E045E0CC +:10E350000E945C961F930F93A696FFADA697FF931E +:10E36000A5962FADA5972F93A4963FADA4973F9365 +:10E37000A3968FADA3978F9382E193E0E9CE699640 +:10E380001CAE1DAE1EAE1FAE699765961CAE1DAECF +:10E390001EAE1FAE659721961CAE1DAE1EAE1FAE03 +:10E3A000219784E1A496EEADFFADA497282F11929A +:10E3B0002A95E9F7A696AEADBFADA697E82F1D92B8 +:10E3C000EA95E9F7A096AEADBFADA0971D928A95EC +:10E3D000E9F790E080E00E943E2CE6966CAF7DAFBE +:10E3E0008EAF9FAFE69781E090E00E943E2CC4582C +:10E3F000DF4F688379838A839B83CC57D04082E048 +:10E4000090E00E943E2C20E030E044EB52E40E9479 +:10E41000DC982B013C01FE01FD964F019E012F5A15 +:10E420003F4F5901CE018B5A9F4F6C0183017201FE +:10E43000C458DF4F288139814A815B81CC57D04055 +:10E44000E6966CAD7DAD8EAD9FADE6970E946512F0 +:10E45000A401B501C6010E94311669966CAD7DAD6F +:10E460008EAD9FAD69976596CCACDDACEEACFFACE4 +:10E4700065979B01AC010E94839C4B015C01A70145 +:10E480009601C701B6010E94839C9B01AC01C501A6 +:10E49000B4010E94DD980E94FE9C8E01075D1F4F13 +:10E4A00024E045E00E945C9620E030E044EB52E43A +:10E4B000C301B2010E94DD980451110924E045E036 +:10E4C0000E945C9621966CAD7DAD8EAD9FAD21977F +:10E4D0000451110924E045E00E945C961F930F93BC +:10E4E000A696BFADA697BF93A596EFADA597EF9360 +:10E4F000A496FFADA497FF93A3962FADA3972F9358 +:10E5000089E294E025CE8FE30E94C3068C0110922D +:10E510007A0081E480937C0080917B008860809306 +:10E520007B0087ED80937A0080917A0084FF2AC077 +:10E5300080917A00806180937A0087E394E09F93D2 +:10E540008F930E942723B80190E080E00E94A00DE5 +:10E550008EE394E09F938F930E942723B70190E06E +:10E5600080E00E94A00D0F900F900F900F900A3046 +:10E57000110508F41DCD82E00734110508F419CD0A +:10E5800081E017CDE0907800F0907900CDCF4799E9 +:10E590000BC00898009B0AC081E01F928F9324E172 +:10E5A00035E03F932F938ECC80E0F7CF82E0F5CF1C +:10E5B00082B386958695869591E089278170F9CCFE +:10E5C0008BE30E94C30621E08536910508F420E024 +:10E5D0001F922F93E4CF8091020185FB882780F959 +:10E5E000E8CC89819A818230910508F024CD882376 +:10E5F00039F08CB186FB882780F91F928F93BCC0BD +:10E600008CB1881F8827881FF8CF21E030E02C0FBD +:10E610003D1F3F932F938CE494E09F938F93FF9340 +:10E62000EF930E942E9E0F900F900F900F900F90DF +:10E630000F90181619060CF0F1CC29813A81263476 +:10E64000310508F0F8CCF901E253F54F8491F90156 +:10E65000E257F44F1491F901E85BF44F0491002361 +:10E6600099F081110E942E06E02FF0E0EE0FFF1FBF +:10E67000E65EFB4FA591B491EC911E2381E090E002 +:10E6800009F480E09F93BACF80E090E0FBCF21E0D7 +:10E6900030E02C0F3D1F3F932F938CE494E09F9329 +:10E6A0008F93FF93EF930E942E9E0F900F900F90E9 +:10E6B0000F900F900F90181619060CF0AFCC8981AF +:10E6C0009A818031910508F0B6CC0E94C306DACF5A +:10E6D00090E080E00E94F22B182F092F81E090E05B +:10E6E0000E94F22BF82EE92E82E090E00E94F22B9D +:10E6F000EF92FF920F931F939F93C0CC6BE080E04B +:10E700000E947B2A182F6BE081E00E947B2A1871FF +:10E71000E1E0F0E0183111F0F0E0E0E0EE0FFF1F73 +:10E72000EE0FFF1F887121E030E0883111F030E0FA +:10E7300020E0220F331F1E2F122B6BE082E00E947D +:10E740007B2A8871E1E0883109F0E0E0E12BE150BB +:10E75000E73080F40E2E000CFF0B8827ED54FC48A8 +:10E760008F4F0C94CA9DC073C873DC73DF73E27360 +:10E77000E573E8731F921F9284E195E09F93A1CB0C +:10E780001F9281E08F93E4E1F5E0FF93EF9307C0E0 +:10E790001F9282E08F9384E195E09F938F933F9245 +:10E7A0002F920E94FE9D0F900F900F900F900F9050 +:10E7B0000F9084E390E092CB1F9283E0E3CF1F920F +:10E7C00084E0E8CF1F9285E0DDCF1F9286E0E2CFA4 +:10E7D0001F9287E0D7CF6E96EFAD6E97E8968EAD1D +:10E7E0009FADE8978E0F911DFC018081863509F061 +:10E7F0005BC081818053823008F056C09FB7813062 +:10E8000009F44AC0F89480915E15886080935E1583 +:10E810009FBF90E080E09C012150310922303105FA +:10E8200008F06CC8AE96EEADFFADAE97CF01B0E08C +:10E83000A0E0A7960FACA79704C0B695A7959795AB +:10E8400087950A94D2F780FD43C981E090E0A0E06B +:10E85000B0E0A7960FACA79704C0880F991FAA1F16 +:10E86000BB1F0A94D2F7E82BF92BAE96FFAFEEAFA1 +:10E87000AE976D968CAD9DADAEADBFAD6D978093EF +:10E88000F9159093FA15A093FB15B093FC1538E099 +:10E89000A7963FAFA79716C0F89480915E15826047 +:10E8A000B5CF0E94C411B5CF82E390E0B4CF80927F +:10E8B000DC159092DD15A092DE15B092DF15A796BB +:10E8C0001FAEA797A7963FADA797032FE296EEAD91 +:10E8D000FFADE297CF01B0E0A0E0032E04C0B695F3 +:10E8E000A795979587950A94D2F780FF02C00C945C +:10E8F000657D81E693E0A0E0B0E004C0B695A79501 +:10E90000979587953A95D2F780FF0FC020E030E0C9 +:10E91000A9016D966CAD7DAD8EAD9FAD6D970E94DA +:10E92000ED9987FF02C00C94687D81E090E0A0E043 +:10E93000B0E004C0880F991FAA1FBB1F0A95D2F729 +:10E94000E2962EAD3FADE297282B392BE2963FAFF2 +:10E950002EAFE2970C94886B8092E0159092E115AF +:10E96000A092E215B092E315E996FFADE997F16048 +:10E97000E996FFAFE99721E0A7962FAFA797A2CF1F +:10E980008092E4159092E515A092E615B092E715F5 +:10E99000E9963FADE9973260E9963FAFE99782E0AB +:10E9A000A7968FAFA7978ECF8092E8159092E91522 +:10E9B000A092EA15B092EB15E9969FADE9979460A5 +:10E9C000E9969FAFE997A3E0A796AFAFA7977ACF55 +:10E9D0004092EC15B4E0A796BFAFA79773CFC501DF +:10E9E000B4010E94699A6093ED157093EE158093BF +:10E9F000EF159093F015E5E0A796EFAFA79762CFDC +:10EA00008092F1159092F215A092F315B092F41540 +:10EA1000F6E0A796FFAFA79755CF8092F515909295 +:10EA2000F615A092F715B092F81527E0A5CF8092C1 +:10EA3000FE159092FF15A0920016B0920116A996AD +:10EA40008FADA9978160A9968FAFA9979AE0A796F5 +:10EA50009FAFA79737CF8092021690920316A0928D +:10EA60000416B0920516A996AFADA997A260A99613 +:10EA7000AFAFA997BBE0AFCF809206169092071672 +:10EA8000A0920816B0920916A996EFADA997E46076 +:10EA9000A996EFAFA997FCE0BCCF29E06DCF80919C +:10EAA0000B1681111FC0E1963FADE19730FF3CC0CE +:10EAB0008091D4158130B1F423E333E34BEC51E47E +:10EAC0006091DC157091DD158091DE159091DF1558 +:10EAD0000E94839C6093DC157093DD158093DE1596 +:10EAE0009093DF15E2968EAD9FADE29790FD10C03A +:10EAF0008091141690911516A0911616B0911716C4 +:10EB00008093F9159093FA15A093FB15B093FC151B +:10EB10008091D115813011F5E1969FADE19796FD79 +:10EB200014C01CE10C94696D80911816909119160F +:10EB3000A0911A16B0911B168093DC159093DD15E9 +:10EB4000A093DE15B093DF15CDCFE296AEADBFAD8D +:10EB5000E297AF7BE296BFAFAEAFE2978091D6155A +:10EB6000882379F0813009F4C7C0E7961FAEE79794 +:10EB7000F2E0E396FFAFE39721E0A7962FAFA797C8 +:10EB80000BC0B2E0E796BFAFE797E1E0E396EFAFE7 +:10EB9000E397A7961FAEA7978091D415813099F57A +:10EBA000B1EDEB2EB5E1FB2E10E000E0A9969FAD94 +:10EBB000A997892E912CB12CA12CD501C401002E2E +:10EBC00004C0B695A795979587950A94D2F780FFCC +:10EBD00012C023E333E34BEC51E4D7019D966D91D2 +:10EBE0007D918D919C91D0970E94839CF70165A7A0 +:10EBF00076A787A790AB0F5F1F4FF4E0EF0EF11CD5 +:10EC000003301105D1F6A8962FADA897233061F4F3 +:10EC10008091D715813041F4A9963FADA99715E2AF +:10EC2000343011F00C94696D8CE0EDE2F6E1DE0118 +:10EC3000119601900D928A95E1F7AE968EAD9FAD3B +:10EC4000AE9791FD65C01091D115123009F476C0D0 +:10EC5000183009F43AC1A8968FADA897833009F40B +:10EC6000D6C1A9969FADA997992309F492C700919F +:10EC7000D5154090451650904616609047167090F6 +:10EC800048167AE0272E76E1372EE1EDCE2EE5E12B +:10EC9000DE2EF12CE12C892E912CB12CA12CD5014A +:10ECA000C4010E2C04C0B695A795979587950A9434 +:10ECB000D2F780FD79C1F1018789908DA18DB28D48 +:10ECC000F60185A796A7A7A7B0ABBFEFEB1AFB0A83 +:10ECD000E4E02E0E311CF4E0CF0ED11C23E0E2164E +:10ECE000F104E9F6153009F4AAC1173009F4B4C1EA +:10ECF000133009F04CC19AC131E0E7963FAFE79776 +:10ED0000E3961FAEE39782E0A7968FAFA79744CF15 +:10ED10008091D815873018F01DE10C94696D9091A1 +:10ED20001016891709F48FCFBE016F5F7F4F0E94C5 +:10ED30004B14811188CF17E00C94696DA9969FAD93 +:10ED4000A997911103C01AE10C94696DE2968EADFA +:10ED50009FADE29780759927892B09F4E2CE6091E7 +:10ED6000F1157091F2158091F3159091F4150E94B0 +:10ED7000429D0E94709A673078F68091EC1584313C +:10ED800059F0823011F00C94966CE196AFADE1979A +:10ED9000A7FF02C00C94966C22242A94260E6111BF +:10EDA00002C02090D8156E01B5E1CB0ED11CB60182 +:10EDB000822D0E944B14882309F4BDCF3090EC15AE +:10EDC0008091451690914616A0914716B09148162D +:10EDD000E0968CAF9DAFAEAFBFAFE09710E000E024 +:10EDE000F12CE12CA9969FADA997492E512C712C9D +:10EDF000612CD301C2010E2C04C0B695A79597953E +:10EE000087950A94D2F780FF31C0F801EF52FA4E8D +:10EE100085A496A4A7A4B0A8A4E13A124EC0F80114 +:10EE2000E65FF94E27A530A941A952A96789708DDF +:10EE3000818D928D0E94DC98A50194010E94DC983E +:10EE4000F601E00FF11F6083718382839383B2E048 +:10EE5000EB120CC0E0962CAD3DAD4EAD5FADE09732 +:10EE60000E94DC986D8F7E8F8F8F98A3EFEFEE1A44 +:10EE7000FE0A0C5F1F4FF3E0EF16F10409F0B9CF63 +:10EE8000E2962EAD3FADE2972F7AE2963FAF2EAFDE +:10EE9000E2971091D215183009F0E6C0A9969FADFF +:10EEA000A997992309F481C4A896AFADA897A1307A +:10EEB00009F4E7C01FE10C94696DF601E00FF11F42 +:10EEC00080829182A282B382D1CFA9963FADA997C9 +:10EED000332309F438CF8090451690904616A090C1 +:10EEE0004716B0904816FAE0CF2EF6E1DF2ECE019D +:10EEF00001961C01A1EDEA2EA5E1FA2E10E000E03A +:10EF0000432E512C712C612CD301C201002E04C060 +:10EF1000B695A795979587950A94D2F780FF39C043 +:10EF2000D1012D913D914D915C91F6016789708DD4 +:10EF3000818D928D0E94DC98D7019D962D913D91F7 +:10EF40004D915C91D0970E94DC98F70165A776A758 +:10EF500087A790AB023061F4A50194010E94DC9870 +:10EF600060930616709307168093081690930916FF +:10EF70000F5F1F4FF4E0CF0ED11C24E0220E311C96 +:10EF800034E0E30EF11C0330110509F0BDCF212C54 +:10EF900080CFF60187A590A9A1A9B2A9F70185A7FD +:10EFA00096A7A7A7B0ABE4CF173009F48ECE011116 +:10EFB00018C0F2E0EF1289CEA3019201609106160B +:10EFC0007091071680910816909109160E94DD989D +:10EFD000609306167093071680930816909309168F +:10EFE00074CED10157962D913D914D915C915A97D8 +:10EFF000F60165A576A587A590A90E94DD98D601A2 +:10F000009D966D937D938D939C93D0975ECE153096 +:10F01000B1F0173009F1133009F0B9CFA9963FAD1F +:10F02000A997311103C0A8961FAEA897BE016B5EC9 +:10F030007F4F86E00E944B148111A9CF7CCEA99608 +:10F040008FADA997811103C0A8961FAEA897BE01E6 +:10F050006B5E7F4F87E0EECF8091D2151EE182304C +:10F0600008F495CF0C94696DA896BFADA897B230FF +:10F0700009F09BC311110CC0A996EFADA997EE231F +:10F0800029F1E2968EAD9FADE2978E7D907E27C0EE +:10F0900020E030E0A9016091DC157091DD158091D0 +:10F0A000DE159091DF150E94ED99882311F40C94E0 +:10F0B000CD6B143008F0F9C0123008F005C11130E2 +:10F0C00001F7A996FFADA997F111DBCFE2968EADBE +:10F0D0009FADE2978E7D9C7FA8961FAEA89714E205 +:10F0E000892B11F00C94696D8091ED159091EE15BE +:10F0F000A091EF15B091F01580931D1690931E16F8 +:10F10000A0931F16B09320168091D31580930B16F1 +:10F110008091DC159091DD15A091DE15B091DF1581 +:10F120008093181690931916A0931A16B0931B1675 +:10F13000C090F915D090FA15E090FB15F090FC15F1 +:10F14000A7019601609114167091151680911616FC +:10F15000909117160E94ED998823F9F010911316DB +:10F16000112359F08091B015823039F00E94F13F9F +:10F17000B701A601812F0E9400128091F91590918C +:10F18000FA15A091FB15B091FC158093141690937D +:10F190001516A0931616B09317168091FD1580933F +:10F1A0001C161091DB15809113168117B9F0809110 +:10F1B000B015823079F0C0901416D0901516E090FA +:10F1C0001616F09017160E94F13FB701A601812F85 +:10F1D0000E9400128091DB15809313161091DA15AE +:10F1E00080911216811771F08091B015823031F044 +:10F1F0000E94F13F123009F0DFC25C9A8091DA156B +:10F20000809312168091D115813009F4D8C2809173 +:10F21000D61580930E168091D41580930C16A8965F +:10F22000BFADA897B330B9F48091D71580930F166E +:10F23000813009F018C38091061690910716A091AD +:10F240000816B09109168093451690934616A09320 +:10F250004716B09348168091D815909110169817BC +:10F2600059F0809310168CE0FE013196ADE2B6E1C4 +:10F2700001900D928A95E1F78091D51580930D1636 +:10F28000E091D115E250E83008F062C3F0E0882741 +:10F29000E35BF6488F4F0C94CA9D3C7C507CA37C6A +:10F2A000507CAA7CA87CAE7CB47C183008F0E9CEF7 +:10F2B000A9969FADA997992309F445CD0E9465862B +:10F2C000882309F4DECE91C0A9962FADA9972223F9 +:10F2D00009F439CDA7969FADA797892F90E0AE96F8 +:10F2E0009FAF8EAFAE97E396BFADE397AB2FB0E085 +:10F2F000EE96BFAFAEAFEE9781E090E0A0E0B0E059 +:10F300006C017D01A7960FACA79704C0CC0CDD1C47 +:10F31000EE1CFF1C0A94D2F7E3960FACE39704C0EF +:10F32000880F991FAA1FBB1F0A94D2F7C82AD92A8F +:10F33000EA2AFB2A822F90E0B0E0A0E08C219D21F8 +:10F34000AE21BF21892B8A2B8B2B09F4C4C3AE9627 +:10F350008EAD9FADAE97880F991F880F991FFC0146 +:10F36000EF52FA4E865F994EDC0157962D913D91F2 +:10F370004D915C915A9765A576A587A590A90E94A5 +:10F38000DC984B015C01EE968EAD9FADEE97880F39 +:10F39000991F880F991FFC01EF52FA4E865F994E14 +:10F3A000DC0157962D913D914D915C915A9765A541 +:10F3B00076A587A590A90E94DC98AC966CAF7DAF2E +:10F3C0008EAF9FAFAC97E196BFADE197B7FF01C19C +:10F3D000E296EEADFFADE297EF77E296FFAFEEAFCC +:10F3E000E2970E946586882319F011E20C94696DFA +:10F3F0006091F5157091F6158091F7159091F815BB +:10F400002091D415213071F423E333E34BEC51E424 +:10F410000E94839C6093F5157093F6158093F71501 +:10F420009093F8154090F5155090F6156090F715EB +:10F430007090F815A5019401C501B4010E94839C48 +:10F44000EC966CAF7DAF8EAF9FAFEC97AC962CADCA +:10F450003DAD4EAD5FADAC97CA01B9010E94839C32 +:10F46000C058DF4F688379838A839B83C058D0401C +:10F4700020E030E040E850E4C301B2010E94839CE8 +:10F48000A30192010E94839CEC962CAD3DAD4EAD44 +:10F490005FADEC970E94DC98C058DF4F288139811E +:10F4A0004A815B81C058D0400E94DC986B017C018E +:10F4B00020E030E0A9010E94ED9987FD0FC3C7014C +:10F4C000B6010E94FE9C6B017C01C058DF4F288171 +:10F4D00039814A815B81C058D040EC966CAD7DADDE +:10F4E0008EAD9FADEC970E94DD980E94FE9C9B0123 +:10F4F000AC01C701B60190580E94F7996B017C01DD +:10F50000133021F4F7FAF094F7F8F09420E030E0AB +:10F51000A901C301B2010E94ED9987FF0FC0F7FA5C +:10F52000F094F7F8F094D301C201B0588093F51528 +:10F530009093F615A093F715B093F815AE960EAD0F +:10F540001FADAE97000F111F000F111F0B521A4E67 +:10F55000AC962CAD3DAD4EAD5FADAC97C701B601DD +:10F560000E94839C9B01AC01C501B4010E94DC9800 +:10F5700020E030E040E05FE30E94839CD8011B96CE +:10F580006D937D938D939C931E97EE960EAD1FAD5C +:10F59000EE97000F111F000F111F0B521A4EA501FD +:10F5A0009401C701B6010E94839CAC962CAD3DAD81 +:10F5B0004EAD5FADAC970E94DD9820E030E040E0BA +:10F5C0005FE30E94839CF801638774878587968731 +:10F5D00058CDE996FFADE9974F2E512C712C612C37 +:10F5E000CF22D520E620F72013E2CD28CE28CF2841 +:10F5F00011F40C94696DE2962EAD3FADE297217F38 +:10F60000E2963FAF2EAFE2978091D415813061F53D +:10F6100021EDE22E25E1F22E10E000E0D301C2013F +:10F62000002E04C0B695A795979587950A94D2F7B2 +:10F6300080FF12C023E333E34BEC51E4D7011F9664 +:10F640006D917D918D919C9152970E94839CF701C1 +:10F650006787708B818B928B0F5F1F4FF4E0EF0EEB +:10F66000F11C03301105D1F6AE96EEADFFADAE97AD +:10F67000EE0FFF1FEE0FFF1FEB52FA4EC384D48430 +:10F68000E584F684A7019601C501B4010E94DC98C7 +:10F690002B013C01EE96EEADFFADEE97EE0FFF1F96 +:10F6A000EE0FFF1FEB52FA4E83859485A585B68534 +:10F6B000E0968CAF9DAFAEAFBFAFE0979C01AD01C0 +:10F6C000AC966CAD7DAD8EAD9FADAC970E94DC98D5 +:10F6D0004B015C01A3019201C301B2010E94839C12 +:10F6E0002B013C01A5019401C501B4010E94839C3A +:10F6F0009B01AC01C301B2010E94DD980E94FE9CF7 +:10F700004B015C01A7019601C701B6010E94839CD1 +:10F710006B017C01E0962CAD3DAD4EAD5FADE09749 +:10F72000CA01B9010E94839C9B01AC01C701B601CB +:10F730000E94DD980E94FE9C6B017C01C092F51531 +:10F74000D092F615E092F715F092F815AC019B01F6 +:10F75000C501B4010E94DC984B015C01E894B7F844 +:10F760002AE037ED43EA5BE3C501B4010E94439C04 +:10F7700018160CF086CC20E030E040E05FE3C501D5 +:10F78000B4010E94439C18160CF42FCE2FE632E1F0 +:10F7900043E85AE3C701B6010E94839CA501940186 +:10F7A0000E94ED9987FF6DCC20CEA896AFADA897AB +:10F7B000AA2309F48BCC65CC0E94C2111FCD809185 +:10F7C000B015823009F423CDC090F115D090F21518 +:10F7D000E090F315F090F41520E030E040EA51E4B9 +:10F7E000C701B6010E94839C0E94DC9A0E94709A15 +:10F7F0004B018B010E94F13F20E030E04AE754E4E6 +:10F80000C701B6010E94839C6B017C0182E3889D45 +:10F81000B001899D700D112490E080E00E949F9AB4 +:10F820009B01AC01C701B6010E94DC980E94DC9AE2 +:10F830000E94709ACB010E94712D0115110509F4E7 +:10F84000E6CC0E949E3D015011098091AF158111B7 +:10F85000DECCEFEFF0E722E0E150F0402040E1F7AE +:10F8600000C00000EACF1092451610924616109282 +:10F87000471610924816EFCCBE016B5E7F4F822D6B +:10F880000E94281180911016821162C08CE0FE0146 +:10F890007596ADE2B6E101900D928A95E1F758C0F8 +:10F8A000A8963FADA897332371F020911816309198 +:10F8B000191640911A1650911B1600E06EEF75E173 +:10F8C00081E00E9404402091181630911916409151 +:10F8D0001A1650911B1600E0BE016B5E7F4F81E04F +:10F8E0000E940440182F8CE0FE017596A1E2B6E15B +:10F8F00001900D928A95E1F7E091D215E0930A16F6 +:10F90000E83009F44BC0A896BFADA897B23009F013 +:10F9100045C0E83008F039C0F0E04090181650902B +:10F92000191660901A1670901B168827E556F34832 +:10F930008F4F0C94CA9DBC7CEF7CF77C117D1B7DA6 +:10F94000247D267D297D61E276E186E00E942811F2 +:10F9500010E0D2CF61E276E187E0F8CF8CE0EEEF05 +:10F96000F5E1A9E3B6E197CFE9E3F6E18CE0DF0149 +:10F970001D928A95E9F7ECCF00E0A30192016EEFAA +:10F9800075E180E00E940440182F8CE0EEEFF5E175 +:10F99000A1E2B6E101900D928A95E1F78091D91527 +:10F9A00080931116882311F40C94696D0E94F13F25 +:10F9B000909111168091B015913009F04CC08230B1 +:10F9C00051F09FB7F89480915E15886080935E1522 +:10F9D0009FBF0E949E3D109211160C94696D00917C +:10F9E0000B16A30192016EEF75E181E0CBCF609120 +:10F9F000F5157091F6158091F7159091F8158824FA +:10FA00008394E796AFACE797E396CFACE397A796DE +:10FA1000EFACA79700910B16A30192010E943D87BE +:10FA2000B4CF6091F5157091F6158091F71590910E +:10FA3000F815812CE6CF00E020E040910B16C301C1 +:10FA4000B2010E94A686A1CF01E0F6CF00E021E03E +:10FA5000F4CF01E0FCCF91E090930A1610920E16BD +:10FA600010920D1610920B1610921016109213167B +:10FA7000109212168230B1F0BE016F5F7F4F80E0AE +:10FA80000E944B14882309F456C98CE0FE0131967C +:10FA9000ADE2B6E101900D928A95E1F70E94290C42 +:10FAA0000E94C21184EC99E00E94B80D88E699E0AA +:10FAB0000E94B80D81E599E00E94B80D8CCF11E04D +:10FAC0000C94696D12E00C94696D19E10C94696DE8 +:10FAD00014E00C94696D10E20C94696D12E20C94C0 +:10FAE000696D0E31110511F40C94846DE0F40A3047 +:10FAF000110511F40C94496D0C31110511F00C94A1 +:10FB0000746E91E0A8969FAFA897E114F10411F4E8 +:10FB10000C944F6DAAE0EA16F10411F00C94966C67 +:10FB200084E00C94506D0533110511F40C94946D20 +:10FB30000C35110511F00C94746E21E0A8962FAFCE +:10FB4000A897E114F10411F40C94996D3AE0E316CE +:10FB5000F10411F00C94966C89E00C94506D0E3108 +:10FB6000110511F40C94886D50F40A30110511F44C +:10FB70000C944D6D0C31110541F20C94C66D05339A +:10FB8000110511F40C94436D0C351105D1F20C9450 +:10FB9000C66D153009F458CA173009F45DCA133020 +:10FBA00009F0F5C940CA1F920F920FB60F921124A7 +:10FBB0000BB60F922F933F934F935F936F937F9367 +:10FBC0008F939F93AF93BF93EF93FF938091A61270 +:10FBD0009091A7129093250180932401E091A412A3 +:10FBE000F091A512309709F01995FF91EF91BF910F +:10FBF000AF919F918F917F916F915F914F913F91C5 +:10FC00002F910F900BBE0F900FBE0F901F90189565 +:10FC10001F920F920FB60F9211240BB60F922F93D3 +:10FC20003F934F935F936F937F938F939F93AF9384 +:10FC3000BF93EF93FF938091591590915A1590932C +:10FC4000A5008093A400E0915715F09158153097C6 +:10FC500009F01995FF91EF91BF91AF919F918F910D +:10FC60007F916F915F914F913F912F910F900BBEBC +:10FC70000F900FBE0F901F9018951F920F920FB606 +:10FC80000F9211248F939F9380910A0290910B02FF +:10FC900090939500809394009F918F910F900FBE49 +:10FCA0000F901F9018951F920F920FB60F9211246C +:10FCB0000BB60F922F933F934F935F936F937F9366 +:10FCC0008F939F93AF93BF93EF93FF9380919F1276 +:10FCD0009091A0128093B200E0919D12F0919E123B +:10FCE000309709F01995FF91EF91BF91AF919F91D6 +:10FCF0008F917F916F915F914F913F912F910F90D5 +:10FD00000BBE0F900FBE0F901F9018951F920F9271 +:10FD10000FB60F9211240BB60F922F933F934F9370 +:10FD20005F936F937F938F939F93AF93BF93EF9363 +:10FD3000FF934C9B0E94C411FF91EF91BF91AF9133 +:10FD40009F918F917F916F915F914F913F912F91F3 +:10FD50000F900BBE0F900FBE0F901F9018951F9223 +:10FD60000F920FB60F9211240BB60F922F933F9361 +:10FD70008F939F93EF93FF9321B39091D00E30E434 +:10FD8000939FC001112480742F7B822B81BBEBE0F9 +:10FD9000F1E020819091D00E34E0939FC0011124B6 +:10FDA0008870277F822B808381B39091D00E92FB45 +:10FDB000992790F98E7F892B81BB15BCFF91EF911C +:10FDC0009F918F913F912F910F900BBE0F900FBE7F +:10FDD0000F901F9018951F920F920FB60F9211243B +:10FDE0000BB60F920F931F932F933F934F935F93F5 +:10FDF0006F937F938F939F93AF93BF93EF93FF93F3 +:10FE00008091D10E811119C22091E10E822F90E0D4 +:10FE100020FD8F9A20FF8F9830910B0122703D7F3B +:10FE2000232B20930B0121B39595879582702D7F0D +:10FE3000822B81BB41B38091E00E90E09C0166E093 +:10FE4000220F331F6A95E1F720744F7B242B21BBCF +:10FE500040910B019C01220F331F220F331F28708A +:10FE6000477F242B20930B0191B382FB882780F9D5 +:10FE70009E7F892B81BB8091DF0E86BD82E085BD90 +:10FE800081E08093D10E78948091F30E9091F40EDE +:10FE9000892B09F0A1C08091DA1190910012981776 +:10FEA00009F4C1C1E091DA112E2F30E086E0E89F1D +:10FEB000F0011124E452FE4EF093F40EE093F30EA1 +:10FEC00083819481909389008093880080819181BF +:10FED0009093EF0E8093EE0EE2818091F00E8E17DC +:10FEE00061F1E093F00E81E1E89FF0011124EF5FF2 +:10FEF000FD4EF093F20EE093F10E85859685A78571 +:10FF0000B089B695A795979587958093DA0E9093CB +:10FF1000DB0EA093DC0EB093DD0E8093D60E909393 +:10FF2000D70EA093D80EB093D90E8093D20E909393 +:10FF3000D30EA093D40EB093D50EE091F10EF091B4 +:10FF4000F20E80819091CF0E89278093E10E86E09A +:10FF5000829FD001839FB00D1124A452BE4E1596EE +:10FF60002C9181819281A381B481022E04C0B69527 +:10FF7000A795979587950A94D2F78093E20E909370 +:10FF8000E30EA093E40EB093E50E85819681A781E0 +:10FF9000B085022E04C0B695A795979587950A94CB +:10FFA000D2F78093E60E9093E70EA093E80EB093FD +:10FFB000E90E81859285A385B48504C0B695A79581 +:10FFC000979587952A95D2F78093EA0E9093EB0E3A +:10FFD000A093EC0EB093ED0E80915F158130B1F4DB +:10FFE00089B180719091AD15891781F010925F15DC +:10FFF0008CE0E3EBF5E1AFEBB5E101900D928A9572 +:020000021000EC +:10000000E1F780915E15806480935E151092E00E9A +:100010008091D20E9091D30EA091D40EB091D50EB6 +:100020004091E20E5091E30E6091E40E7091E50E66 +:10003000840F951FA61FB71F8093D20E9093D30EE7 +:10004000A093D40EB093D50EE091F10EF091F20E84 +:100050004585568567857089481759076A077B0764 +:1000600028F521E02093E00E841B950BA60BB70B1F +:100070008093D20E9093D30EA093D40EB093D50E4E +:100080008091B3159091B415A091B515B091B615A6 +:10009000208120FFE7C00197A109B1098093B31522 +:1000A0009093B415A093B515B093B6158091D60E64 +:1000B0009091D70EA091D80EB091D90E0091E60E76 +:1000C0001091E70E2091E80E3091E90E800F911FFC +:1000D000A21FB31F8093D60E9093D70EA093D80E75 +:1000E000B093D90E481759076A077B0738F5209156 +:1000F000E00E22602093E00E841B950BA60BB70B3D +:100100008093D60E9093D70EA093D80EB093D90EAD +:100110008091B7159091B815A091B915B091BA1505 +:10012000208121FFA3C00197A109B1098093B715D0 +:100130009093B815A093B915B093BA158091DA0EC3 +:100140009091DB0EA091DC0EB091DD0E0091EA0ED5 +:100150001091EB0E2091EC0E3091ED0E800F911F5F +:10016000A21FB31F8093DA0E9093DB0EA093DC0ED8 +:10017000B093DD0E481759076A077B0738F52091C1 +:10018000E00E24602093E00E841B950BA60BB70BAA +:100190008093DA0E9093DB0EA093DC0EB093DD0E0D +:1001A0008091BB159091BC15A091BD15B091BE1565 +:1001B000208122FF5FC00197A109B1098093BB157F +:1001C0009093BC15A093BD15B093BE158091B0154A +:1001D000843039F48091CC159091E00E892380937E +:1001E000E00E8091EE0E9091EF0E01979093EF0E3E +:1001F0008093EE0E892B69F41092F40E1092F30E98 +:100200008091DA118F5F8093DA11863011F41092A9 +:10021000DA118091E00E9091D00E89278093E00E44 +:100220001092D10E0AC00E94113D9FB7F8948091A0 +:100230005E15846080935E159FBFFF91EF91BF9123 +:10024000AF919F918F917F916F915F914F913F916E +:100250002F911F910F910F900BBE0F900FBE0F901B +:100260001F9018950196A11DB11D18CF0196A11DD3 +:10027000B11D5CCF0196A11DB11DA0CF1F920F92A1 +:100280000FB60F9211240BB60F92CF92DF92EF921E +:10029000FF922F933F934F935F936F937F938F932F +:1002A0009F93AF93BF93EF93FF938091B00E909184 +:1002B000B10E0097D1F0019709F491C1FF91EF9130 +:1002C000BF91AF919F918F917F916F915F914F916E +:1002D0003F912F91FF90EF90DF90CF900F900BBE4A +:1002E0000F900FBE0F901F9018958091B20E9091B5 +:1002F000B30EA091B40EB091B50EAC01BD0141504A +:100300005109610971094093B20E5093B30E609385 +:10031000B40E7093B50E892B8A2B8B2B19F180911B +:100320000201806480930201809102018F7B80939F +:1003300002018091AE0E9091AF0E8130910509F4CB +:10034000CEC000F1029709F4EDC08091BE0E9091ED +:10035000BF0EA091C00EB091C10E9093A9008093E2 +:10036000A800ACCFE091CB0EF091CC0E309709F005 +:100370001995809172008D7F8093720081E0809347 +:10038000CA0ED7CFC090B20ED090B30EE090B40E8C +:10039000F090B50E6091B60E7091B70E8091B80EC8 +:1003A0009091B90E22E030E040E050E00E94AB9D19 +:1003B000C216D306E406F5060CF4ADC08091C60E55 +:1003C0009091C70EA091C80EB091C90E0196A11DC3 +:1003D000B11D8093C60E9093C70EA093C80EB09324 +:1003E000C90EC090BE0ED090BF0EE090C00EF0902F +:1003F000C10E6091BE0E7091BF0E8091C00E9091A3 +:10040000C10E2091C60E3091C70E4091C80E50917A +:10041000C90E660F771F881F991FF2E0220F331F46 +:10042000441F551FFA95D1F72F5F3F4F4F4F5F4F36 +:100430000E94AB9DC21AD30AE40AF50AC092BE0E0E +:10044000D092BF0EE092C00EF092C10E4091BE0E4F +:100450005091BF0E6091C00E7091C10E8091C20E7E +:100460009091C30EA091C40EB091C50E48175907C4 +:100470006A077B070CF069CF8091B20E9091B30EA2 +:10048000A091B40EB091B50E4091B60E5091B70E3A +:100490006091B80E7091B90E880F991FAA1FBB1FEB +:1004A000841B950BA60BB70B8093BA0E9093BB0ED3 +:1004B000A093BC0EB093BD0E8091C20E9091C30E5E +:1004C000A091C40EB091C50E8093BE0E9093BF0E46 +:1004D000A093C00EB093C10E81E090E01EC0809149 +:1004E000BA0E9091BB0EA091BC0EB091BD0EAC01A6 +:1004F000BD0141505109610971094093BA0E5093F1 +:10050000BB0E6093BC0E7093BD0E181619061A062A +:100510001B060CF41ACF82E090E09093AF0E80930C +:10052000AE0E13CF8091B20E9091B30EA091B40E87 +:10053000B091B50E892B8A2B8B2B09F406CF8091B5 +:10054000C60E9091C70EA091C80EB091C90E01972A +:10055000A109B1098093C60E9093C70EA093C80E4F +:10056000B093C90E6091BE0E7091BF0E8091C00E07 +:100570009091C10E2091C60E3091C70E4091C80EC9 +:100580005091C90EC090C60ED090C70EE090C80E14 +:10059000F090C90EE2E0220F331F441F551FEA9569 +:1005A000D1F72F5F3F4F4F4F5F4F0E94599DF2E0B1 +:1005B000CC0CDD1CEE1CFF1CFA95D1F7A7019601AF +:1005C00021503109410951090E94AB9D2093BE0E73 +:1005D0003093BF0E4093C00E5093C10EB6CE8091A3 +:1005E0000201806480930201809102018F7B8093DD +:1005F00002018091AE0E9091AF0E009781F10297AB +:1006000009F0A3CE8091C60E9091C70EA091C80E9E +:10061000B091C90EAC01BD01415051096109710988 +:100620004093C60E5093C70E6093C80E7093C90EC8 +:10063000892B8A2B8B2B09F095CF809172008D7FAF +:1006400080937200E091CD0EF091CE0E309709F4B8 +:100650007CCE19951092CE0E1092CD0E76CE409192 +:10066000BE0E5091BF0E6091C00E7091C10E809170 +:10067000C20E9091C30EA091C40EB091C50E841706 +:100680009507A607B7070CF049C08091C60E909158 +:10069000C70EA091C80EB091C90E0196A11DB11D43 +:1006A0008093C60E9093C70EA093C80EB093C90E48 +:1006B000C090BE0ED090BF0EE090C00EF090C10E64 +:1006C0006091BE0E7091BF0E8091C00E9091C10ED0 +:1006D0002091C60E3091C70E4091C80E5091C90EA0 +:1006E000660F771F881F991FB2E0220F331F441F28 +:1006F000551FBA95D1F72F5F3F4F4F4F5F4F0E9465 +:10070000AB9DC21AD30AE40AF50AC092BE0ED0927B +:10071000BF0EE092C00EF092C10E17CEE091CD0E4A +:10072000F091CE0E309709F4D7CE19951092CE0ED7 +:100730001092CD0ED1CE1F920F920FB60F921124B0 +:100740000BB60F922F933F934F935F936F937F93CB +:100750008F939F93AF93BF93EF93FF938091360155 +:1007600023E030E03093AD0E2093AC0E8F3311F1C7 +:10077000B8F4883109F445C08132B9F1E091AB0E8B +:1007800091E09E0F903809F490E02091AA0E29176D +:10079000C9F0F0E0E65DF14F80839093AB0E12C09C +:1007A000803449F18E3751F79FB7F89480915E15E8 +:1007B000826005C09FB7F89480915E158160809338 +:1007C0005E159FBFFF91EF91BF91AF919F918F9168 +:1007D0007F916F915F914F913F912F910F900BBE41 +:1007E0000F900FBE0F901F9018959FB7F8948091AF +:1007F0005E158860E4CF9FB7F89480915E158062A3 +:10080000DECF0E94C411DECF1F920F920FB60F925F +:1008100011240BB60F922F933F934F935F936F93D7 +:100820007F938F939F93AF93BF93EF93FF938091A9 +:10083000D60022E030E03093AD0E2093AC0E8F3323 +:1008400011F1B8F4883109F445C08132B9F1E09171 +:10085000AB0E91E09E0F903809F490E02091AA0E23 +:100860002917C9F0F0E0E65DF14F80839093AB0E5D +:1008700012C0803449F18E3751F79FB7F8948091B8 +:100880005E15826005C09FB7F89480915E15816007 +:1008900080935E159FBFFF91EF91BF91AF919F91A4 +:1008A0008F917F916F915F914F913F912F910F9019 +:1008B0000BBE0F900FBE0F901F9018959FB7F89426 +:1008C00080915E158860E4CF9FB7F89480915E15A3 +:1008D0008062DECF0E94C411DECF1F920F920FB64E +:1008E0000F9211240BB60F922F933F934F935F9368 +:1008F0006F937F938F939F93AF93BF93EF93FF93E8 +:100900008091CE0021E030E03093AD0E2093AC0E0C +:100910008F3311F1B8F4883109F445C08132B9F14F +:10092000E091AB0E91E09E0F903809F490E0209199 +:10093000AA0E2917C9F0F0E0E65DF14F808390938D +:10094000AB0E12C0803449F18E3751F79FB7F8943F +:1009500080915E15826005C09FB7F89480915E1506 +:10096000816080935E159FBFFF91EF91BF91AF9122 +:100970009F918F917F916F915F914F913F912F91B7 +:100980000F900BBE0F900FBE0F901F9018959FB742 +:10099000F89480915E158860E4CF9FB7F8948091B9 +:1009A0005E158062DECF0E94C411DECF1F920F92CF +:1009B0000FB60F9211240BB60F922F933F934F93C4 +:1009C0005F936F937F938F939F93AF93BF93CF93D7 +:1009D000EF93FF938091C6001092AD0E1092AC0E73 +:1009E0008F3309F441C0C0F4883109F457C0813213 +:1009F00009F443C0E091AB0E91E09E0F903809F4EA +:100A000090E02091AA0E2917D9F0F0E0E65DF14FB1 +:100A100080839093AB0E14C08034D1F18E3751F7A0 +:100A20009FB7F89480915E15826080935E159FBF9A +:100A30008EE594E09F938F930E9427230F900F9051 +:100A4000FF91EF91CF91BF91AF919F918F917F9146 +:100A50006F915F914F913F912F910F900BBE0F902F +:100A60000FBE0F901F9018959FB7F89480915E1558 +:100A7000816080935E159FBFE3CF9FB7F89480910C +:100A80005E15886080935E159FBF82E694E0D2CFAA +:100A90009FB7F89480915E158062EBCF0E94C411DD +:100AA0000E947615C1E0C093D0158091541588231B +:100AB00089F0C093CF15109254150E94FC2C10920F +:100AC000CE151092CD15C09354151092AE151092FC +:100AD000B015B6CF0E94FC2C8EE594E09F938F93C7 +:100AE0000E9427230F900F90F0CF1F920F920FB606 +:100AF0000F9211240BB60F928F939F93EF93FF9356 +:100B00008091290EE82FF0E0E755F24F9081909305 +:100B100036018F5F803809F480E08093290E909130 +:100B2000A80D981305C0809131018F7D809331010C +:100B3000FF91EF919F918F910F900BBE0F900FBE81 +:100B40000F901F9018951F920F920FB60F921124BD +:100B50000BB60F928F939F93EF93FF938091290E83 +:100B6000E82FF0E0E755F24F90819093D6008F5F29 +:100B7000803809F480E08093290E9091A80D981395 +:100B800005C08091D1008F7D8093D100FF91EF91BE +:100B90009F918F910F900BBE0F900FBE0F901F90E3 +:100BA00018951F920F920FB60F9211240BB60F9249 +:100BB0008F939F93EF93FF938091290EE82FF0E09E +:100BC000E755F24F90819093CE008F5F803809F403 +:100BD00080E08093290E9091A80D981305C0809114 +:100BE000C9008F7D8093C900FF91EF919F918F91F4 +:100BF0000F900BBE0F900FBE0F901F9018951F9275 +:100C00000F920FB60F9211240BB60F928F939F93F2 +:100C1000EF93FF938091290EE82FF0E0E755F24F14 +:100C200090819093C6008F5F803809F480E08093B4 +:100C3000290E9091A80D981305C08091C1008F7D59 +:100C40008093C100FF91EF919F918F910F900BBE08 +:100C50000F900FBE0F901F9018951F920F920FB616 +:100C60000F9211240BB60F922F933F934F935F93E4 +:100C70006F937F938F939F93AF93BF93EF93FF9364 +:100C80008091B015813071F08091AE1581110AC04C +:100C90000E94C4119FB7F8948091AE158360809331 +:100CA000AE159FBFFF91EF91BF91AF919F918F9133 +:100CB0007F916F915F914F913F912F910F900BBE5C +:100CC0000F900FBE0F901F901895CF932091FE1597 +:100CD0003091FF1540910016509101166091211638 +:100CE0007091221680912316909124160E94ED99FE +:100CF000811128C0209102163091031640910416EC +:100D00005091051660912516709126168091271630 +:100D1000909128160E94ED99811114C0C1E0209194 +:100D200006163091071640910816509109166091E9 +:100D3000291670912A1680912B1690912C160E94DC +:100D4000ED998111C0E08C2FCF910895CF92DF9261 +:100D5000EF92FF920F93CF93DF933091B015323023 +:100D600009F483C0C02FD22F042F6B017C010E9495 +:100D7000F13F1092CB151092AD1580919D1587FD16 +:100D800003C080E18093AD15DD2331F08091AD1576 +:100D900090E189278093AD1589B180719091AD154F +:100DA000891751F09FB7F8948091AE1580618093B8 +:100DB000AE159FBF0E949E3D8091AF15811155C019 +:100DC000A70196016EEF75E181E00E94044081E089 +:100DD00080935F159FB7F89480915E158260809331 +:100DE0005E159FBF0E949E3D8091AF1581113DC051 +:100DF0008091B0158111F6CF80915F15813089F512 +:100E0000CC2331F18CE0E3EBF5E1AFEBB5E1019000 +:100E10000D928A95E1F710925F150E949E3D809198 +:100E2000AF15811122C00E94483D0E9476150E9494 +:100E3000D20D63EB75E18EEF95E10E945D0BDF91C2 +:100E4000CF910F91FF90EF90DF90CF900C94EC2416 +:100E50009FB7F8948091AE1580618093AE159FBFC7 +:100E6000DACF81E08093CB15D6CFDF91CF910F9170 +:100E7000FF90EF90DF90CF9008952F923F924F9286 +:100E80005F926F927F928F929F92AF92BF92CF921A +:100E9000DF92EF92FF920F931F93CF93DF93CDB723 +:100EA000DEB7E1970FB6F894DEBF0FBECDBF6D83FE +:100EB0007E838F8398872F87388B498B5A8B0D8B36 +:100EC000AD868B8A24E0E29E80011124C8018F5DEB +:100ED000994E9F8B8E8BD801A052BA4EB98FA88F96 +:100EE0004D905D906D907C90FC012081318142811C +:100EF0005381C301B2010E94DD986A8F7B8F8C8F72 +:100F00009D8FF4E0CF9E1001112491012F5D394E89 +:100F10003F8F2E8FC10180529A4E99A388A3DC0186 +:100F2000CD90DD90ED90FC90F901208131814281DE +:100F30005381C701B6010E94DD986AA37BA38CA3ED +:100F40009DA377FA709477F87094D701C601B058D2 +:100F500089839A83AB83BC83F801E250FA4E2A8DD1 +:100F60003B8D4C8D5D8D60817181828193810E946A +:100F7000DC984B015C01F101E250FA4E2AA13BA141 +:100F80004CA15DA160817181828193810E94DC9876 +:100F90006B017C01A5019401C301B2010E94839CF5 +:100FA00069877A878B879C87A701960169817A81F7 +:100FB0008B819C810E94839C9B01AC0169857A8511 +:100FC0008B859C850E94DD9869877A878B879C87B3 +:100FD000A7019601C301B2010E94839C6B017C01B1 +:100FE000A501940169817A818B819C810E94839CF7 +:100FF0009B01AC01C701B6010E94DC9829853A85A6 +:101000004B855C850E9477996B017C019B899923B4 +:1010100009F4F4C02DEB37E346E055EBC701B60108 +:101020000E94439C87FD0AC02BED3FE049EC50E451 +:10103000C701B6010E94DC986B017C018090991574 +:1010400090909A15A0909B15B0909C152D813E8193 +:101050004F815885CA01B9010E94DD98A50194010C +:101060000E94DC98A50194010E94839C0E94FE9C32 +:101070004B015C0120E030E040E05FE3C701B601D6 +:101080000E94839C2D813E814F8158850E94839CC4 +:101090009F77A50194010E94F7990E94DC9A0E9413 +:1010A000709A7C8B6B8BDB01AB2B09F484C090E0D6 +:1010B00080E00E949F9A4B015C01BD89BB2361F0D7 +:1010C000AC019B016F85788989899A890E94839CEC +:1010D0006F87788B898B9A8BA5019401C701B60124 +:1010E0000E94F7996D837E838F839887FD85E4E066 +:1010F000FE9FC00111249C012F5D394E3E872D8734 +:1011000082509A4ED9012D913D914D915C91FC01F7 +:1011100060817181828193810E94DC98A501940194 +:101120000E94F7996EA77FA788AB99AB2D813E816E +:101130004F815885CA01B9010E94839C9B01AC0173 +:1011400060E070E080E090E40E94DC986B017C013C +:101150002BEA3AEA4AE25EE36D817E818F819885CF +:101160000E94839C4B015C0120E030E040E850E4A9 +:10117000C701B6010E94DD989B01AC01C501B40115 +:101180000E94839C69877A878B879C8720E030E068 +:1011900040E05FE3C701B6010E94839C6EA37FA37A +:1011A00088A799A710E022242394312CEB89FC898D +:1011B000E215F305B9F50D892F85388949895A89D2 +:1011C0006EEF75E181E00E940440E1960FB6F8945D +:1011D000DEBF0FBECDBFDF91CF911F910F91FF906A +:1011E000EF90DF90CF90BF90AF909F908F907F90C7 +:1011F0006F905F904F903F902F9008952DEB37E3C5 +:1012000046E055E3C701B6010E94ED9918160CF4AB +:1012100015CF2BED3FE049EC50E4C701B6010E9429 +:10122000DD980ACF1C3008F085C0A30192016985C2 +:101230007A858B859C850E94839C6B017C0129812A +:101240003A814B815C816EA17FA188A599A50E94FE +:10125000839C9B01AC01C701B6010E94DD987B0114 +:10126000082FD92EA30192016EA17FA188A599A56F +:101270000E94839C4B015C0129813A814B815C81F6 +:1012800069857A858B859C850E94839C9B01AC0136 +:10129000C501B4010E94DC982B013C011F5FC7010E +:1012A000A02FBD2D89839A83AB83BC83A3019201B8 +:1012B0006A8D7B8D8C8D9D8D0E94DD98EE89FF89D6 +:1012C000608371838283938329813A814B815C811E +:1012D0006AA17BA18CA19DA10E94DD98AE8DBF8DDE +:1012E0006D937D938D939C9313972EA53FA548A94D +:1012F00059A9ED85FE8560817181828193810E946B +:10130000DD98AD85BE856D937D938D939C931397EA +:101310000D892F85388949895A8961E276E181E012 +:101320000E9404408091AF1581114FCFBFEF2B1A5F +:101330003B0A3CCFB10190E080E00E949F9A2D8152 +:101340003E814F8158850E94839C6B017C010E94E5 +:10135000F29969837A838B839C83C701B6010E94CB +:10136000F09C4B015C01A88DB98DCD90DD90ED9086 +:10137000FC90F7FAF094F7F8F094A8A1B9A18D9138 +:101380009D910D90BC91A02D8AA79BA7ACA7BDA74E +:10139000A701960169817A818B819C810E94839C3F +:1013A0002B013C012AA53BA54CA55DA5C501B401B7 +:1013B0000E94839C9B01AC01C301B2010E94DD9895 +:1013C0002B013C01A7019601C501B4010E94839C39 +:1013D0006B017C012AA53BA54CA55DA569817A819D +:1013E0008B819C810E94839C9B01AC01C701B6014B +:1013F0000E94DC9869837A838B839C8310E056CFAC +:10140000CF93DF93CDB7DEB7CC56D1090FB6F894A2 +:10141000DEBF0FBECDBF8091C00082608093C00050 +:101420001092C50080E18093C4009091C10090614A +:101430009093C1009091C10098609093C1009091E9 +:10144000C10090689093C1009091C8009260909301 +:10145000C8001092CD008093CC009091C90090619B +:101460009093C9009091C90098609093C9009091A1 +:10147000C90090689093C9009091D00092609093B9 +:10148000D0001092D5008093D4009091D10090614B +:101490009093D1009091D10098609093D100909159 +:1014A000D10090689093D100909130019260909318 +:1014B00030011092350180933401809131018061B7 +:1014C0008093310180913101886080933101809156 +:1014D00031018068809331010E942424869A879A82 +:1014E000829A80910A01886080930A0180910A01A2 +:1014F000826080930A0180910701816080930701D7 +:10150000809A819A579A80910701806180930701A0 +:1015100080910701886080930701809107018460B2 +:101520008093070180910801806180930801809178 +:101530000801877F8093080180910801846080936F +:10154000080180919D1582FF46C28A9A8091080108 +:101550008160809308015F9A809181008F7E8093E3 +:10156000810080918100886080938100809180005B +:101570008C7F80938000809180008F7080938000AA +:1015800080916E00887F80936E0014BC15BC8091A2 +:101590006E00816080936E0054985C9A80916D001B +:1015A000806180936D008091680084608093680002 +:1015B0008AE090E00E94712D0E948D24399A3B9A16 +:1015C000419A439A80910101846080930101809146 +:1015D0000101806880930101809102018460809301 +:1015E000020180910201806880930201559A569A07 +:1015F0005D9A5E9A0E94391107EF13E181E090E055 +:101600007C012FEFE21AF20A0E943111D8018D936A +:101610008D01C7018B3C910599F7E7E7CE2EE3E1F9 +:10162000DE2E87010F5F1F4FC7010E943111F601A7 +:1016300081936F0178010B34F1E01F0791F77DEF83 +:10164000E72E72E1F72E68012FEFC21AD20AC80105 +:101650000E943111D7018D937D018601B5ECCB1627 +:10166000B1E0DB0681F78EB1806C8EB98DB18F73DE +:101670008DB920E030E04AE754E464E071E080E0B6 +:1016800090E00E946E0784E893E00E9431118093FD +:101690000C1588E993E00E94311180930E1589E9B9 +:1016A00093E00E94311180930F158AE993E00E9424 +:1016B0003111809310158BE993E00E9431118093D2 +:1016C00011158EE893E00E943111809312158FE876 +:1016D00093E00E9431118093131580E993E00E94FA +:1016E00031118093141581E993E00E9431118093A8 +:1016F000151582E89CE00E9431118093161583E84D +:101700009CE00E9431118093171584E89CE00E94B0 +:1017100031118093181585E89CE00E943111809367 +:101720001915C0901615D0901715E0901815F09067 +:10173000191520E030E044EB53E4C701B6010E94E4 +:10174000439C181644F0A7019601C701B6010E94F8 +:101750004D9D882341F01092161510921715109286 +:1017600018151092191509EC14E18AEE93E07C012A +:10177000EFEFEE1AFE0A0E943111D8018D938D0110 +:10178000C701B6EFEB16B3E0FB0689F760911615BB +:10179000709117158091181590911915FE013196C9 +:1017A0007F018F0124E045E00E945C96FF92EF925A +:1017B0008CE694E09F938F930E9427230E940A2E29 +:1017C0000E94F7060E94E6060E947F080E94FC2CF9 +:1017D0001092551580917A00876880937A009B98C3 +:1017E000A39A8FE080934A150E9408098CE094E048 +:1017F0009F938F938EE794E09F938F930E9427236C +:101800008AE194E09F938F9381E994E09F938F9373 +:101810000E94272382E294E09F938F9381EA94E0D1 +:101820009F938F930E94272380910D158F93809112 +:101830000C158F9380EB94E09F938F930E94272346 +:1018400081EC94E00E94C60DEFEAF5E182E2DF014F +:101850001D928A95E9F781E08093AF157894909175 +:101860009D150FB6F894DEBF0FBECDBF94FD8093DB +:10187000B0159E01235C3F4F6F963FAF2EAF6F9721 +:101880001E0135E1230E311CCE018996A1969FAF32 +:101890008EAFA1978091AB0E8093AA0EEAE0F6E19D +:1018A0008FE3DF011D928A95E9F76DE276E180E032 +:1018B0000E944B14811103C087E00E949B230C9A65 +:1018C000549A549A0E94290C549A0E94C2110E9460 +:1018D000321054985C9A0E9476150E94483D0E94EE +:1018E000D20D0E9445101092AF1510925E15109205 +:1018F000AE151092B1151092B2151092D0158091BC +:101900005515882351F08EE594E09F938F930E94A4 +:101910002723109255150F900F908091B0158130AC +:1019200009F061C084EC99E00E94B80D8EE999E05D +:101930000E94B80D81E599E00E94B80DA4961FAEF3 +:10194000A497A5961FAEA597FE013196A396FFAF6B +:10195000EEAFA39780915015882311F40C946C95E9 +:101960008091060185FD20C00E94E006109250156E +:10197000809102018F7D80930201809116159091D4 +:101980001715A0911815B0911915B05880938812A9 +:1019900090938912A0938A12B0938B1260E070E04A +:1019A00084EB92E40E943609809184129091851212 +:1019B000A0918612B0918712892B8A2B8B2B51F61E +:1019C0001092501585EC94E09F938F930E942723EB +:1019D0000F900F90BFCF8A98809108018E7F8093DF +:1019E00008015F98B9CD1092B015A8CF873411F4D3 +:1019F0000C94B595883511F40C94B5959091B0156B +:101A0000923008F0A0C3893409F4D5C60CF0E9C5BA +:101A1000833209F414C6883409F48AC6AE01475DDE +:101A20005F4FBE01635C7F4F8BEA92E10E94600FC3 +:101A3000811143C782E088C380E797E00E94B80D18 +:101A400008C0833409F4B0C50CF05FC3843209F4D4 +:101A500076C389EC9AE00E94B80DA4961FAEA497B5 +:101A6000A5961FAEA5978091250D882399F085E254 +:101A70009DE00E94276B8093570D69E57DE00E94F1 +:101A8000DA1381E08093580D82E3A5E2BDE01D9258 +:101A90008A95E9F780914B1581114AC08091240500 +:101AA000882309F445C080915115882309F440C06A +:101AB000809152158823E1F10091230526E6F22E4C +:101AC0000F9D80011124045D1A4FC8010E94276BED +:101AD000F80182AB8091D01581110FC08091230550 +:101AE0008F9DC0011124BC01605A7A4F845D9A4FCA +:101AF000DC01D2968C910E94DA1380912305B6E620 +:101B00008B9FF0011124E45DFA4F91E093AB92E3D7 +:101B1000DF011D929A95E9F7833110F00C94F3954B +:101B20008F5F809323058091240581508093240545 +:101B30008091C7149091C8148330910511F40C94CE +:101B4000FB9510F40C94F795049711F40C942596DA +:101B50000E946C0C0E949E3D8091AF1581119ACE1F +:101B60008091580D882369F089E59DE00E94C60D9B +:101B7000E9E5FDE082E3DF011D928A95E9F7109225 +:101B8000580D8091B015811137C08091511588236F +:101B900099F180915215882379F184E1A82EB12C16 +:101BA00006E692E3992E1091240D019FC0011124A5 +:101BB000FC01E45DFA4F7F0183A98823E9F0109FBF +:101BC000C00111249C01205A3A4F6901C9010E94A9 +:101BD000C60DD601E92D1D92EA95E9F7D701D396F6 +:101BE0001C92133110F00C942D961F5F1093240D4E +:101BF000B1E0AB1AB108B9F680914C15882309F40D +:101C0000E4C010924C156D961CAE1DAE1EAE1FAEFC +:101C10006D9769961CAE1DAE1EAE1FAE6997659698 +:101C20001CAE1DAE1EAE1FAE659784E16F96EEAD85 +:101C3000FFAD6F97282F11922A95E9F7A196AEADC7 +:101C4000BFADA197E82F1D92EA95E9F7D101E82FE2 +:101C50001D92EA95E9F7A396AEADBFADA3971D928D +:101C60008A95E9F790E080E00E943E2CA9966CAF3F +:101C70007DAF8EAF9FAFA99781E090E00E943E2C90 +:101C8000AD966CAF7DAF8EAF9FAFAD9782E090E029 +:101C90000E943E2C6B017C0120E030E040E05FE3DD +:101CA0006091000270910102809102029091030202 +:101CB0000E94DC9820E030E040E05FE30E94839CDB +:101CC00020E030E044E353E40E94839C9B01AC019C +:101CD00060E070E084E393E40E94DC982B013C0117 +:101CE00020E030E044EB52E4C701B6010E94DC98EA +:101CF000FE01EF5AFF4F4F019E012B5A3F4F5901F2 +:101D0000DE01A75ABF4F6D017B018C01AD962CAD52 +:101D10003DAD4EAD5FADAD97A9966CAD7DAD8EADD1 +:101D20009FADA9970E946512A401B501C6010E944A +:101D300031166D966CAD7DAD8EAD9FAD6D978E01FC +:101D4000035C1F4F24E045E00E945C9669966CADF1 +:101D50007DAD8EAD9FAD69970451110924E045E03A +:101D60000E945C9665966CAD7DAD8EAD9FAD65971E +:101D7000810124E045E00E945C968E010F5F1F4FB9 +:101D800024E045E0C301B2010E945C961F930F93CB +:101D90003F922F92A196FFADA197FF93A0962FADF2 +:101DA000A0972F936F963FAD6F973F936E968FAD31 +:101DB0006E978F938BEF94E09F938F930E942723CE +:101DC0000FB6F894DEBF0FBECDBF82B301E083FB38 +:101DD000882780F9802790912B059817D9F08AE001 +:101DE00090E00E94712D12B313FB112710F91027F8 +:101DF00080912B05811771F01F921F938FE095E062 +:101E00009F938F930E94272310932B050F900F9081 +:101E10000F900F908091270590912805A09129059A +:101E2000B0912A058F3F9105A105B10511F008F089 +:101E300018C70196A11DB11D809327059093280511 +:101E4000A0932905B0932A058091B015811112C085 +:101E500080914D15882371F080914E15882351F0A3 +:101E600085E694E09F938F930E94272310924E154E +:101E70000F900F9080915415882309F432C18091FE +:101E8000B015811114C780914A158F3009F00FC722 +:101E900080915315882309F40AC78091CD1590913C +:101EA000CE159C012F5F3F4F3093CE152093CD155B +:101EB00045970CF416C121961CAE1DAE1EAE1FAE8A +:101EC000219719A61AA61BA61CA61D8A1E8A1F8A60 +:101ED000188EE0904615F090471500914815109126 +:101EE0004915209142153091431540914415509168 +:101EF000451560913E1570913F1580914015909168 +:101F000041154101FE01B9965F01DE01DD966D01CB +:101F10000E94D91690E080E00E943E2C4B015C01AB +:101F200081E090E00E943E2C6B017C0182E090E019 +:101F30000E943E2C2B013C01A501940121966CAD21 +:101F40007DAD8EAD9FAD21970E94DC989F7720E0FC +:101F500030E040E05FE30E94439C18164CF1A7017B +:101F6000960169A57AA58BA59CA50E94DC989F7710 +:101F700020E030E040E05FE30E94439C1816C4F08C +:101F8000A30192016D897E898F89988D0E94DC98CA +:101F900020E030E044EB52E40E94DD989F7720E09F +:101FA00030E040E05FE30E94439C18160CF099C0BB +:101FB00082E2EFEAF5E111928A95E9F70E94D20DEB +:101FC0000E94451080921A1590921B15A0921C1524 +:101FD000B0921D15C0921E15D0921F15E0922015CB +:101FE000F0922115409222155092231560922415EB +:101FF0007092251580915615882351F020E030E02D +:102000004AE754E464E071E080E090E00E946E07EB +:102010008091B3159091B415A091B515B091B615F6 +:102020008093321590933315A0933415B0933515E2 +:102030008091B7159091B815A091B915B091BA15C6 +:102040008093361590933715A0933815B0933915B2 +:102050008091BB159091BC15A091BD15B091BE1596 +:1020600080933A1590933B15A0933C15B0933D1582 +:1020700080913E1590913F15A0914015B09141156A +:1020800089839A83AB83BC838091421590914315D9 +:10209000A0914415B09145158D839E83AF83B88779 +:1020A0008091461590914715A0914815B09149151A +:1020B00089879A87AB87BC87AE01475F5F4FBE01B8 +:1020C0006B5F7F4FCE0101960E94311600E020E049 +:1020D00030E048E452E4BE016F5F7F4F80E00E9431 +:1020E000044080914F15882341F08091B0158111F3 +:1020F00004C00E94FC2C10924F158091D0158823AB +:1021000009F428CC1092D01525CC873409F47DC170 +:10211000883509F09ECC8091B015813009F099CCBA +:1021200084EC99E00E94B80D8CE899E00E94B80D0B +:1021300081E599E00E94B80D1092B0158ACC80918B +:10214000B015887121F088E00E949B2386CC8CE634 +:1021500097E00E94B80D809190150E94912383E52D +:1021600097E00E94B80D809193150E94912385E31A +:1021700097E00E94B80D809191150E9491238CE107 +:1021800097E00E94B80D809191150E94322585E15B +:1021900097E00E94B80D809192150E9491238DEFD7 +:1021A00096E00E94B80D809192150E94322586EF2C +:1021B00096E00E94B80D80919D1582FB882780F9DA +:1021C0000E94912385ED96E00E94B80D80919D15A7 +:1021D00086FB882780F90E94912385EB96E00E9478 +:1021E000B80D80919D15881F8827881F0E94912314 +:1021F00085E996E00E94B80D809194150E94912384 +:102200008FE796E00E94B80D809194150E943225C8 +:1022100087E796E00E94B80D60919515709196152C +:1022200080919715909198150E941A0D87E596E078 +:102230000E94B80D6091991570919A1580919B1527 +:1022400090919C150E941A0D8CE396E00E94B80DA7 +:1022500080919D1581700E9491238FE196E00E94EC +:10226000B80D80919D1585FB882780F90E949123E8 +:1022700084E096E00E94B80D80919D1583FB88272D +:1022800080F90E94912389EE95E00E94B80D80911B +:102290009D15829581700E9491238DEC95E00E949E +:1022A000B80D80919E150E94912383EB95E00E94CA +:1022B000B80D80919E150E9432258BEA95E00E9410 +:1022C000B80D60919F157091A0158091A115909106 +:1022D000A2150E941A0D8EE895E00E94B80D60913B +:1022E000A3157091A4158091A5159091A6150E9433 +:1022F0001A0D81E795E00E94B80D8091A7150E9404 +:10230000912382E595E00E94B80D6091A915709126 +:10231000AA158091AB159091AC150E941A0D89E316 +:1023200095E00E94B80D10E054E6D52E40E6E42E6C +:1023300045E1F42E00E087E395E00E94B80D802F80 +:102340008D0D0E94912385E395E00E94B80D123017 +:1023500009F446C0133009F44FC01130C9F1F70138 +:1023600060817181828193810E941A0D82E395E0E0 +:102370000E94B80D8EE295E0013031F080E395E0E7 +:10238000023011F48CE295E00E94B80D8FEF94E0DA +:10239000123051F08FEE94E0133031F082E295E08C +:1023A000113011F480E195E00E94B80D8BEE94E0BD +:1023B0000E94B80D0F5FB4E0EB0EF11C033009F082 +:1023C000BACFEAE0DE0E1F5FFCE8DF12AFCF41CBF1 +:1023D000D7011C966D917D918D919C911F97C4CFD3 +:1023E00020E030E041E655E4F701608D718D828D8B +:1023F000938D0E94F799B8CFD70194966D917D91F6 +:102400008D919C9197979058AFCF89EE94E00E9460 +:10241000B80D80910A16823009F48EC078F48823B2 +:10242000A9F0813009F485C084ED94E00E94B80DD4 +:1024300080910A1682500E9491230CC0833009F4C7 +:102440007EC0883089F789ED94E002C086EE94E082 +:102450000E94B80D81ED94E00E94B80D8091101695 +:102460008A5C0E94912380910E16813009F46FC01E +:1024700008F468C0823009F46DC080910C16811197 +:102480006CC08DEB94E00E94B80D80910D16811107 +:1024900067C083EB94E00E94B80D80910B168130E9 +:1024A00009F061C089EA94E00E94B80D809111168C +:1024B000813009F460C008F459C0823009F45EC06C +:1024C00080911316813009F45CC008F462C0823038 +:1024D00009F45CC080911216882309F45DC0823033 +:1024E00009F45FC081E894E00E94B80D80911C1649 +:1024F0000E9491238EE794E00E94B80D6091181617 +:102500007091191680911A1690911B160E941D0D3C +:102510008BE794E00E94B80D609114167091151627 +:1025200080911616909117160E941D0D87E794E072 +:1025300085CA83EE94E08CCF80EE94E089CF8DED58 +:1025400094E086CF8CEC94E00E94B80D96CF87EC97 +:1025500094E0FACF82EC94E0F7CF88EB94E093CF4D +:102560008EEA94E098CF84EA94E09ECF80EA94E0EB +:102570000E94B80DA5CF8CE994E0FACF88E994E0E9 +:10258000F7CF84E994E00E94B80DA4CF80E994E0ED +:10259000FACF8CE894E0F7CF88E894E00E94B80D79 +:1025A000A1CF84E894E0FACF8091B015823069F42D +:1025B0000E94C41184EC99E00E94B80D8BE799E069 +:1025C0000E94B80D81E599E039CA8111BCCD82E045 +:1025D0008093B01584EC99E00E94B80D84E899E0EE +:1025E000EFCF8E3409F43EC1823509F017CA82E07C +:1025F0008DAF8091AD12833509F0BDC283E08DAF00 +:102600008091AE12843509F0B6C284E08DAF80911E +:10261000AF128D3309F0AFC28091B1128111ABC2FC +:1026200085E08DAF8091B012843209F407C18A32FF +:1026300009F416C1833209F09EC282E000C182E033 +:102640008DAF8091AD12811196C200E0BE016F5F27 +:102650007F4F802F0E944B14811104C087E00E949D +:102660009B23F7C984E794E00E94B80D063041F03F +:10267000073009F45AC086E3800F0E94912304C0FA +:1026800081E794E00E94B80D8CE694E00E94B80DBA +:102690009E012F5F3F4F6901F12CD6016D917D9115 +:1026A0008D919D916D010E942B0DB2E08AE694E020 +:1026B000FB1202C086E694E00E94B80DF394E3E0BA +:1026C000FE12EBCF0F5F083009F680E694E00E941F +:1026D000B80D39E3E32E36E1F32ED7016D917D91EC +:1026E0008D919D917D010E942B0D8EE594E012301D +:1026F00011F48AE594E00E94B80D1F5F133069F76A +:1027000084E594E00E94B80D6091451670914616DC +:1027100080914716909148160E942B0D80E594E019 +:102720000E94B80D0E94EC2494C98EE694E0AACFD2 +:1027300080919D1584FD02C085E006CD84E08093E4 +:10274000B0150E94271084E00E94506983E00E9427 +:1027500050690E949E3D8091AF15811104C00E9476 +:1027600045100E9432101091AF15111172C91092CC +:10277000B0150E94113D812F0E94A311811104C048 +:1027800087E00E949B2312C08091AB12882371F0D6 +:102790008BEA92E10E94C60D8BEA92E10E94276BC0 +:1027A0008111EFCF89EC9AE00E94B80D113009F445 +:1027B00050C911E0E0CF82E08DAF8091AD12811160 +:1027C0001FC040E550E06EEA7BE08BEA92E10E9498 +:1027D0006111892B51F41092AB1240E550E06BEA85 +:1027E00072E18EEA9BE00E94E01080E494E00E9497 +:1027F000B80D8BEA92E10E94C60D8CE394E01EC9ED +:1028000093E09DAF8D3309F0B6C183E0282F30E00F +:10281000F901E555FD4E908128553D4ED9019C9317 +:102820008F5F90819111F2CF8DAF40E550E06BEA60 +:1028300072E18EEA9BE00E94E0100BC981E00E94E9 +:102840006C1484EC99E00E94B80D85E599E00E9433 +:10285000B80D81E599E00E94B80D0E94C411F9C835 +:102860008FEFEDCF82E08DAF8091AD12811121C04D +:10287000812F0E94A311811108C087E00E949B2331 +:10288000113009F4E6C811E0F3CF89E394E00E9427 +:10289000B80D812F0E94912387E394E00E94B80D28 +:1028A0008BEA92E10E94C60D84E394E00E94B80D89 +:1028B000E7CF911148CC11E0B1C8EDAD81E08E0FAA +:1028C0008DAFF0E0E555FD4E90819D3309F053C189 +:1028D000112359F1482F50E0282F30E0D901A55598 +:1028E000BD4E9C91241B350BF901E555FD4E90839F +:1028F0008F5F9C919111F0CF8DAF8BEA92E10E9496 +:10290000276B811121CC69A57AA58BA59CA50E9476 +:10291000429D0E94709AB1E56B9FC001112440E571 +:1029200050E06BEA72E1955F86CFAE014F5F5F4F7B +:10293000BE01635C7F4F8BEA92E10E94600F8823A7 +:1029400009F478C8EDADF0E0E555FD4E80818111C8 +:1029500012C189A49AA4ABA4BCA420E030E04FE744 +:1029600053E4C501B4010E94439C18160CF403C142 +:10297000C980DA80EB80FC80C501B4010E94709AA6 +:10298000862FB701A6010E940B228111DDCB61C801 +:10299000833209F040C03F922F928DED94E09F93D7 +:1029A0008F93FF92EF920E942E9EF10101900020E2 +:1029B000E9F7BF016219730965557D4E0F900F90BD +:1029C0000F900F900F900F90DB018C91803511F0DC +:1029D000833569F585E29DE00E94F79D8D89882306 +:1029E00091F03F922F9285EE94E09F938F9389E52B +:1029F0009DE09F938F930E94FE9D0F900F900F90EC +:102A00000F900F900F90EBEAF2E182E3DF011D924D +:102A10008A95E9F722C8873439F08D3429F080355A +:102A200019F0833509F019C86BEA72E1CDCF8091B6 +:102A30002405843150F089EE94E09F938F930E9497 +:102A400027230F900F900C942D8D00912205B6E650 +:102A50000B9F80011124C801845D9A4F0E94F79D4D +:102A60008D89882391F03F922F9285EE94E09F9379 +:102A70008F93005A1A4F1F930F930E94FE9D0F9041 +:102A80000F900F900F900F900F90EBEAF2E182E31E +:102A9000DF011D928A95E9F780912205833150F478 +:102AA0008F5F80932205809124058F5F809324059A +:102AB0000C942D8D10922205F6CFA596BFADA5974B +:102AC000BB2309F45AC0893239F4B13009F47DC00E +:102AD000E2E0A596EFAFA5979091AA0E8091AB0E7C +:102AE000981711F40C94338DE92FF0E0E65DF14F67 +:102AF00080819F5F903809F490E09093AA0E8F3FF9 +:102B000011F40C94338D8A3011F08D30B1F66BEAEC +:102B1000E62E62E1F62EA4962FADA497E22FF0E008 +:102B2000E555FD4E10820E949E3D1091AF1511118A +:102B30000C942D8D8AE0D1011D928A95E9F7809140 +:102B4000AB12843209F024CF81E08DAF8091AC12BA +:102B5000833459F014F00C94F68C882311F40C94FF +:102B60001C8D843211F00C94FE8C9091AD1299233F +:102B700011F40C94218D83E0E7CA813208F4ACCFC4 +:102B80008F3209F4A9CF883221F18B3339F1A49621 +:102B9000FFADA497FF3438F08BE00E949B23A496EE +:102BA0001FAEA49799CFA4962FADA497E22FF0E083 +:102BB000E555FD4E2F5FA4962FAFA4979FE9980F80 +:102BC0009A3108F48052808387CFA5961FAEA597CF +:102BD00083CF31E0A5963FAFA5977ECF82E0A59643 +:102BE0008FAFA59779CF109223050C94938D1092F7 +:102BF00025050C94A88D809125058F5F8093250570 +:102C000080910301887769F0109225059C9A9D9A1E +:102C1000839AA4988B981092C8141092C7140C949D +:102C2000A88DA59A82E390E00E94712D80912505E0 +:102C30008A3018F010922505EECF84E090E0909352 +:102C4000C8148093C7140C94A88DA59882E390E0D3 +:102C50000E94712D83E090E0F2CF1092240D0C942D +:102C6000F88D1092270510922805109229051092D0 +:102C70002A058BE30E94C30611E08536910508F40E +:102C800010E080912605811709F4DEC81F921F937A +:102C9000EAE1F5E0FF93EF930E94272310932605C6 +:102CA000109353150F900F900F900F90CDC8109266 +:102CB000CE151092CD1515CAEF920F931F93CF9397 +:102CC000DF93E80134E047FD34E1042E000C550B9E +:102CD00057FF03C0519541955109E32E022F242F30 +:102CE000AE010E947A96CE01DF91CF911F910F9194 +:102CF000EF9008958F929F92AF92BF92CF92DF9202 +:102D0000EF92FF920F931F93CF93DF9300D000D0E9 +:102D100000D0CDB7DEB76A01F22EB02E102FFBE344 +:102D2000AF2EA01608F41BE31F5F012F27E0AE01B2 +:102D30004F5F5F4F0E94F397BC018981982F997074 +:102D4000913009F44EC09BE2E1FC04C09E2D9170CD +:102D5000E0FC49C05E2D5071E82FE87083FF55C03C +:102D600084E0911101C083E0EF2DE81B8F1508F07E +:102D7000E0E0D6018E2F20E25523C9F1992329F0F6 +:102D8000D6019C93C60101966C0196012D5F3F4FC1 +:102D9000E2FE33C08EE4D6018C9391E411969C93AD +:102DA000119712968C93D9018E2F90E281112AC02F +:102DB000E20FF32FF11D10828EEF9FEF29960FB6D1 +:102DC000F894DEBF0FBECDBFDF91CF911F910F9161 +:102DD000FF90EF90DF90CF90BF90AF909F908F903B +:102DE00008959DE2B7CF90E2B5CF2D938150811128 +:102DF000FCCFCE0ED11CE0E0C1CF8EE6D6018C9385 +:102E000091E6CCCF9D938150D1CF482F447082FF63 +:102E10003DC084E0911101C083E08F1510F4EF2DC7 +:102E2000E81BD6018E2F20E2552309F1992329F0C2 +:102E3000D6019C93C60101966C0196012D5F3F4F10 +:102E4000E2FE1BC089E4D6018C938EE411968C932C +:102E5000119786E412968C93D9018E2F90E28823E5 +:102E600009F4A6CF9D938150FACF2D938150811103 +:102E7000FCCFCE0ED11CE0E0D9CF89E6D6018C93F1 +:102E80008EE611968C93119786E6E4CF9B0177FF2F +:102E900002C030E020E0A1E0B0E0911102C0B0E05B +:102EA000A0E0F9013196AE0FBF1F8B2C912CBB20F7 +:102EB00009F461C05401EFEFAE1ABE0AAA0DBB1DA2 +:102EC000FA161B0619F014F04F2D4A1B511188C039 +:102ED000E3FC59C07601A42FB0E2A1114FC0C40E8B +:102EE000D11C992309F45BC040E0D6011196F6018C +:102EF00090836D01552309F448C0012F060F9A8174 +:102F0000582F507184FF03C0913309F401501016FB +:102F10000CF047C0093008F008E0EEE2FE2E5B013D +:102F2000A01AB10885019194819491082F3F32072E +:102F300029F4D601FC92F60131966F0162177307EE +:102F400094F1021713077CF5DB01A21BB30BAA2433 +:102F5000A394B12CAC0EBD1EAA0DBB1D11968C9175 +:102F600021503109D601119628153905F4F0F601E2 +:102F700080836D01DBCFB12CA12CA0CFF701B193E1 +:102F80007F01A150AACF9111B0CFD601942F50E369 +:102F900002C05D9391509111FCCFC40ED11C40E052 +:102FA000ACCF01E0BACF80E3DBCF6217730731F417 +:102FB000963388F4953311F4552369F0F601808334 +:102FC000FD01842F90E2811108C0A40FB11D1C9255 +:102FD00090E080E0F3CE81E3F1CF91938150F3CF85 +:102FE000911183CF8ACF283008F027E03327DA0108 +:102FF000990F311D87FD916000966105710539F4C7 +:1030000032602E5F3D9330E32A95E1F708959F3FAC +:1030100030F080387105610509F03C5F3C5F3D93FD +:10302000913008F08068911DDF93CF931F930F9329 +:10303000FF92EF92192F987F9695E92F9695969586 +:10304000E90FFF27E259FC4F99273327EE24FF248D +:10305000A701E70105900894079428F4360FE71EAE +:10306000F81E491F511D660F771F881F991F069470 +:10307000A1F70590079428F4E70EF81E491F561F84 +:10308000C11D770F881F991F661F0694A1F7059031 +:10309000079428F4F80E491F561FC71FD11D880F2B +:1030A000991F661F771F0694A1F70590079420F4D7 +:1030B000490F561FC71FD81F990F661F771F881FFC +:1030C0000694A9F784911095177041F0D695C7958D +:1030D00057954795F794E7941A95C1F7E4E1F3E023 +:1030E00068941590159135916591959105907FE2C1 +:1030F0007395E118F10A430B560BC90BD009C0F7C1 +:10310000E10CF11E431F561FC91FD01D7EF4703302 +:1031100011F48A95E6CFE894015030F0080F0AF4D4 +:103120000027021708F4202F2395022F7A3328F066 +:1031300079E37D932A95E9F710C07D932A9589F666 +:10314000069497956795379517951794E118F10AA6 +:10315000430B560BC90BD00998F023957E917395BC +:103160007A3308F070E37C932013B8F77E91706196 +:103170007D9330F0839571E37D9370E32A95E1F7B9 +:103180001124EF90FF900F911F91CF91DF9199271C +:1031900087FD909508959F939F770E94F39A0F90D3 +:1031A000002042F49058A2EA2AED3FE049E450E4BE +:1031B0000E94F4980C94DD9B5058BB27AA270E94CC +:1031C000F4980C94DD9B0E94A49B38F00E94AB9B6A +:1031D00020F039F49F3F19F426F40C94669B0EF40A +:1031E000E095E7FB0C94379BE92F0E94029C58F373 +:1031F000BA17620773078407950720F079F4A6F5DC +:103200000C943C9C0EF4E0950B2EBA2FA02D0B01D4 +:10321000B90190010C01CA01A0011124FF27591B1B +:1032200099F0593F50F4503E68F11A16F040A22F21 +:10323000232F342F4427585FF3CF46953795279592 +:10324000A795F0405395C9F77EF41F16BA0B620B91 +:10325000730B840BBAF09150A1F0FF0FBB1F661FD8 +:10326000771F881FC2F70EC0BA0F621F731F841F1B +:1032700048F4879577956795B795F7959E3F08F041 +:10328000B0CF9395880F08F09927EE0F9795879503 +:1032900008959F939F77EEE389379E0728F4E4EE25 +:1032A000F0E00E94909B0CC00E94F39A9058A2EA12 +:1032B0002AED3FE049EC5FE30E94F4980E94DD9B19 +:1032C0000F9007FC905808950E94A49B60F080E83E +:1032D00091E009F49EEF0E94AB9B28F040E851E09A +:1032E00071F45EEF0CC00C94669B0C943C9CE92F2F +:1032F000E0780E94029C40F3092E052AB1F32617BC +:1033000037074807590738F00E2E07F8E02569F00F +:10331000E025E0640AC0EF6307F8009407FADB01D8 +:10332000B9019D01DC01CA01AD01EF930E940E9A23 +:103330000E94DD9B0E94A7995F91552339F02BEDE8 +:103340003FE049E450FD49EC0C94DD980895DF938B +:10335000DD27B92FBF7740E85FE316161706480749 +:103360005B0718F4D92F0E94489C9F938F937F93FB +:103370006F930E943E9DE8EFF0E00E94699B0E94DF +:10338000DD9B2F913F914F915F910E94969CDD2391 +:1033900051F09058A2EA2AED3FE049EC5FE3D07883 +:1033A0005D270E94F498DF910C94DD9B0E94249C81 +:1033B00090F09F3748F4911116F40C943D9C60E016 +:1033C00070E080E89FE3089526F01B16611D711DD3 +:1033D000811D0C943D9B0C94589B0E94139B08F4F8 +:1033E00081E008950E94B49BE3950C94EE9B0E94AB +:1033F0000B9A0C94DD9B0E94AB9B58F00E94A49BFF +:1034000040F029F45F3F29F00C94379B51110C9444 +:103410003D9C0C94669B0E94029C68F39923B1F337 +:10342000552391F3951B550BBB27AA2762177307EA +:10343000840738F09F5F5F4F220F331F441FAA1F7E +:10344000A9F335D00E2E3AF0E0E832D0915050403A +:10345000E695001CCAF72BD0FE2F29D0660F771FE8 +:10346000881FBB1F261737074807AB07B0E809F0CE +:10347000BB0B802DBF01FF2793585F4F3AF09E3F53 +:10348000510578F00C94379B0C943D9C5F3FE4F31E +:10349000983ED4F3869577956795B795F7959F5F96 +:1034A000C9F7880F911D9695879597F90895E1E0E2 +:1034B000660F771F881FBB1F621773078407BA0741 +:1034C00020F0621B730B840BBA0BEE1F88F7E0959C +:1034D00008950E94709A6894B1110C943D9C0895CF +:1034E0000E940A9C88F09F5798F0B92F9927B751EE +:1034F000B0F0E1F0660F771F881F991F1AF0BA9598 +:10350000C9F714C0B13091F00E943C9CB1E008951D +:103510000C943C9C672F782F8827B85F39F0B93F0F +:10352000CCF3869577956795B395D9F73EF490954A +:103530008095709561957F4F8F4F9F4F0895E894C8 +:1035400009C097FB3EF490958095709561957F4FEB +:103550008F4F9F4F9923A9F0F92F96E9BB27939599 +:10356000F695879577956795B795F111F8CFFAF4A9 +:10357000BB0F11F460FF1BC06F5F7F4F8F4F9F4FDA +:1035800016C0882311F096E911C0772321F09EE838 +:10359000872F762F05C0662371F096E8862F70E09E +:1035A00060E02AF09A95660F771F881FDAF7880F78 +:1035B0009695879597F908950E94249C90F09F37DF +:1035C00048F4911116F00C943D9C60E070E080E8A6 +:1035D0009FEB089526F41B16611D711D811D0C942F +:1035E0003D9B0C94589BDF93CF931F930F938B01BC +:1035F000EC01E5E2F1E00E94699B0E94DD9B9801ED +:10360000AE018B01EC0160E070E080E89FE30E9476 +:10361000DC980E94FE9C9801AE010F911F91CF9102 +:10362000DF910C94969C990F0008550FAA0BE0E8C7 +:10363000FEEF16161706E807F907C0F01216130674 +:10364000E407F50798F0621B730B840B950B39F4B4 +:103650000A2661F0232B242B252B21F408950A261A +:1036600009F4A140A6958FEF811D811D089597F95A +:103670009F6780E870E060E00895882371F4772305 +:1036800021F09850872B762F07C0662311F49927D5 +:103690000DC09051862B70E060E02AF09A95660F7D +:1036A000771F881FDAF7880F9695879597F9089501 +:1036B0009F3F31F0915020F4879577956795B795A6 +:1036C000880F911D9695879597F908959FEF80EC47 +:1036D0000895DF93CF931F930F93FF92EF92DF92A2 +:1036E0007B018C01689406C0DA2EEF010E94969C43 +:1036F000FE01E894A5912591359145915591A6F348 +:10370000EF010E94F498FE019701A801DA9469F78D +:10371000DF90EF90FF900F911F91CF91DF9108956F +:103720009F938F937F936F93FF93EF939B01AC01D4 +:103730000E94839CEF91FF910E94699B2F913F9182 +:103740004F915F910C94839C00240A9416161706DF +:1037500018060906089500240A9412161306140682 +:10376000050608950C94669B0E940A9CD8F3E89481 +:10377000E0E0BB279F57F0F02AED3FE049EC06C0A0 +:10378000EE0FBB0F661F771F881F28F0B23A620743 +:103790007307840728F0B25A620B730B840BE3950E +:1037A0009A9572F7803830F49A95BB0F661F771F91 +:1037B000881FD2F790480C945A9B092E0394000C52 +:1037C00011F4882352F0BB0F40F4BF2B11F460FFBB +:1037D00004C06F5F7F4F8F4F9F4F0895EF93E0FFBF +:1037E00007C0A2EA2AED3FE049EC5FEB0E94F498A3 +:1037F0000E94DD9B0F90039401FC9058EDE4F1E0F2 +:103800000C94909B57FD9058440F551F59F05F3F03 +:1038100071F04795880F97FB991F61F09F3F79F0F2 +:1038200087950895121613061406551FF2CF469574 +:10383000F1DF08C0161617061806991FF1CF8695F6 +:1038400071056105089408950E940A9CA0F0BEE7E6 +:10385000B91788F4BB279F3860F41616B11D672F7F +:10386000782F8827985FF7CF869577956795B11D54 +:1038700093959639C8F30895E894BB276627772770 +:10388000CB0197F908950E94139B08F48FEF0895D8 +:103890009B01AC0160E070E080E89FE30C94F79935 +:1038A0000E940A9C58F19E5760F19851A0F0E9F0EF +:1038B000983020F5092E9927660F771F881F991FCA +:1038C0000A94D1F712C0062E672F782F8827985FA9 +:1038D00011F4000C07C0993FB4F38695779567956E +:1038E0009395D9F7611D711D811D3EF490958095CA +:1038F000709561957F4F8F4F9F4F089568940C94FA +:103900003D9C0C943C9C0E94969C0C94DD9B0E94D8 +:10391000A49B38F00E94AB9B20F0952311F00C94EF +:10392000379B0C94669B11240C943D9C0E94029C36 +:1039300070F3959FC1F3950F50E0551F629FF00102 +:10394000729FBB27F00DB11D639FAA27F00DB11D1B +:10395000AA1F649F6627B00DA11D661F829F2227A4 +:10396000B00DA11D621F739FB00DA11D621F839F2B +:10397000A00D611D221F749F3327A00D611D231F01 +:10398000849F600D211D822F762F6A2F11249F574F +:1039900050409AF0F1F088234AF0EE0FFF1FBB1F52 +:1039A000661F771F881F91505040A9F79E3F510511 +:1039B00080F00C94379B0C943D9C5F3FE4F3983E61 +:1039C000D4F3869577956795B795F795E7959F5FBB +:1039D000C1F7FE2B880F911D9695879597F908954D +:1039E0009F930E94B49B0F9007FCEE5F0C94EE9B9C +:1039F00019F416F40C94669B0C94589B0E940A9C34 +:103A0000B8F39923C9F3B6F39F57550B87FF0E946C +:103A1000529D0024A0E640EA900180585695979563 +:103A200028F4805C660F771F881F20F02617370761 +:103A3000480730F4621B730B840B202931294A2B71 +:103A4000A69517940794202531254A2758F7660F25 +:103A5000771F881F20F026173707480730F4620BBE +:103A6000730B840B200D311D411DA09581F7B90109 +:103A7000842F9158880F9695879508959B01AC01E6 +:103A80000C94839C0E94249C30F09F3710F40C947B +:103A90003D9C0C943D9B0C94589B0E94139B880B5F +:103AA000990B089591505040660F771F881FD2F7E9 +:103AB0000895DB018F939F930E94E19DBF91AF9189 +:103AC000A29F800D911DA39F900DB29F900D112478 +:103AD0000895991B79E004C0991F961708F0961B6A +:103AE000881F7A95C9F780950895AA1BBB1B51E1E1 +:103AF00007C0AA1FBB1FA617B70710F0A61BB70B5E +:103B0000881F991F5A95A9F780959095BC01CD0102 +:103B10000895A1E21A2EAA1BBB1BFD010DC0AA1F0E +:103B2000BB1FEE1FFF1FA217B307E407F50720F026 +:103B3000A21BB30BE40BF50B661F771F881F991FA1 +:103B40001A9469F760957095809590959B01AC01EA +:103B5000BD01CF010895052E97FB1EF400940E942D +:103B6000C29D57FD07D00E94899D07FC03D04EF4EB +:103B70000C94C29D50954095309521953F4F4F4FE5 +:103B80005F4F089590958095709561957F4F8F4F09 +:103B90009F4F0895EE0FFF1F881F8BBF0790F69170 +:103BA000E02D1994A29FB001B39FC001A39F700D97 +:103BB000811D1124911DB29F700D811D1124911D35 +:103BC00008950E94D29DA59F900DB49F900DA49F33 +:103BD000800D911D11240895FB01DC010D90002042 +:103BE000E9F7119701900D920020E1F70895FB018C +:103BF000DC0101900D920020E1F708950F931F93CF +:103C0000CF93DF93CDB7DEB72E970FB6F894DEBF14 +:103C10000FBECDBF0E891F8986E08C831A8309836E +:103C20008FEF9FE79E838D83AE01465E5F4F688D69 +:103C3000798DCE0101960E947A9E2F813885020FE0 +:103C4000131FF80110822E960FB6F894DEBF0FBE38 +:103C5000CDBFDF91CF911F910F910895CF93DF9347 +:103C6000CDB7DEB72E970FB6F894DEBF0FBECDBF2F +:103C700085E08C838C899D899A838983AE01485E17 +:103C80005F4F6E897F89CE0101960E9426A22E96F3 +:103C90000FB6F894DEBF0FBECDBFDF91CF91089570 +:103CA0000F931F93CF93DF93CDB7DEB72E970FB649 +:103CB000F894DEBF0FBECDBF8C0186E08C831A83E3 +:103CC00009838FEF9FE79E838D83CE0101960E942B +:103CD0007A9E2F813885020F131FF80110822E96CD +:103CE0000FB6F894DEBF0FBECDBFDF91CF911F910D +:103CF0000F9108952F923F924F925F926F927F9211 +:103D00008F929F92AF92BF92CF92DF92EF92FF92EB +:103D10000F931F93CF93DF9300D000D000D01F925A +:103D20001F92CDB7DEB77C013B018A01FC011782EF +:103D30001682838181FFDDC1CE0101965C01F7010E +:103D40009381F30193FD859193FF81913F01882336 +:103D500009F453C1853239F493FD859193FF819124 +:103D60003F01853229F4B70190E00E94A5A3E7CF77 +:103D7000912C212C312CFFE1F31538F08B3211F10D +:103D800090F4803209F1833229F137FC3CC020EDF8 +:103D9000280F2A3050F536FE20C08AE0989E200D6C +:103DA0001124922E06C08D3291F0803371F7689401 +:103DB00030F8F30193FD859193FF81913F018111CB +:103DC000DACF21C0689431F8689432F8F2CF689461 +:103DD00033F8EFCF689434F8ECCFEAE02E9E200D54 +:103DE0001124222E689435F8E4CF8E3229F436FC63 +:103DF00004C1689436F8DDCF8C3619F4689437F82E +:103E0000D8CF8836B1F2982F9F7D95549330E0F04B +:103E10008336A1F18337C1F1833509F063C02801EE +:103E2000F2E04F0E511CF801C080D180692D70E086 +:103E300036FC02C06FEF7FEFC6010E9453A34C0116 +:103E4000689437F882010AC00C5F1F4FFFE3F983C3 +:103E500088248394912C6501E89437F833FE2DC0B3 +:103E6000522C8114910471F5552009F468CFB701E3 +:103E700080E290E00E94A5A35A94F6CFF8018081D9 +:103E800089830E5F1F4FE4CF2801F2E04F0E511CD3 +:103E9000F801C080D180692D70E036FC02C06FEF60 +:103EA0007FEFC6010E945EA34C018201D5CFB7010E +:103EB00080E290E00E94A5A32A942814190409F036 +:103EC000B0F7CECFF60137FC859137FE81916F01B7 +:103ED000B70190E00E94A5A351105A94F1E08F1A07 +:103EE0009108BFCF843619F0893609F077C0F80100 +:103EF00037FE6BC060817181828193810C5F1F4F9F +:103F0000F32DFF763F2E97FF09C090958095709511 +:103F100061957F4F8F4F9F4F689437F82AE030E0CC +:103F2000A5010E94EDA3C82ECA188C2C432C36FE86 +:103F30000CC0E89440F8C91440F434FE05C032FCCB +:103F400003C0F32DFE7E4F2E892C44FEAAC0FE0135 +:103F5000EC0DF11D8081803309F09CC0242D297E59 +:103F6000422E842D8870582E43FCAAC040FEA4C067 +:103F70009C2C821418F42C0C922C981844FEA6C089 +:103F8000B70180E390E00E94A5A342FE09C088E744 +:103F900090E041FE02C088E590E0B7010E94A5A331 +:103FA000C91408F49FC0CA94D12C9FEFC91AD90A2A +:103FB000CA0CDB1CF60182916F01B70190E00E94F0 +:103FC000A5A3AC14BD04B1F74FCF60817181072E5A +:103FD000000C880B990B0E5F1F4F92CFD32CE894E7 +:103FE000D4F82AE030E08537E1F1232D297FD22E65 +:103FF0008F36A9F1F0F4883551F1F7018681978168 +:104000002B960FB6F894DEBF0FBECDBFDF91CF91D8 +:104010001F910F91FF90EF90DF90CF90BF90AF90E6 +:104020009F908F907F906F905F904F903F902F90D8 +:104030000895803749F0883701F7D4FE02C06894AC +:10404000D2F820E130E00DC06894D4F8F6CF34FE09 +:1040500003C0822F8660D82E20E132E002C028E023 +:1040600030E0F801D7FE0FC06081718182819381B9 +:104070000C5F1F4FA5010E94EDA3C82ECA183D2C4E +:10408000E89437F852CF6081718190E080E00E5F54 +:104090001F4FF0CF42FC02C0839463CF839483947C +:1040A00060CF842D867809F45CCFF6CFB70180E22B +:1040B00090E00E94A5A383948214C0F3512C5ECF9C +:1040C000522C5818821408F459CFF8CF842D8678D2 +:1040D00009F466CF8BE241FE80E247FC8DE2B70136 +:1040E00090E05CCFB70180E390E00E94A5A39A9492 +:1040F00057CF8FEF9FEF84CF20FD09C0FC0123FD38 +:1041000005C022FF02C073836283518340830895F8 +:1041100044FD17C046FD1DC0DB01FC01AA0FBB1FFB +:10412000EE1FFF1F1094D1F76A0F7B1F8E1F9F1F7A +:10413000660F771F881F991F620F711D811D911DCA +:10414000089533E0660F771F881F991F3150D1F70C +:10415000F3CF34E0F7CF0F931F93CF93DF938C010E +:10416000C8010E9469A3EC0197FD08C00E943FA30B +:10417000892BB1F7B801CE010E94D5A3CE01DF9102 +:10418000CF911F910F9108958F929F92AF92BF92FE +:10419000EF92FF920F931F93CF93DF938C01D62F53 +:1041A0007A01B22E0E9469A39C0133272B3231057C +:1041B00029F02D323105A9F46894B7F8D15061F493 +:1041C00080E0DF91CF911F910F91FF90EF90BF9012 +:1041D000AF909F908F900895C8010E9469A397FDAA +:1041E000EFCFCB2DCD7F2B2D2073F9F48033E9F465 +:1041F000AA24AA94AD0E89F0C8010E9469A397FD74 +:104200000CC0282F2F7D283561F4C264D25029F0CC +:10421000C8010E9469A397FF08C0812C912C54010A +:104220001BC0B6FE2BC0C260DA2D812C912C54012C +:1042300020ED280F283028F1C4FD09C02A3008F1EC +:10424000C6FF05C02F7D3FEE320F3630C8F0B801F3 +:104250000E94D5A3C1FFB4CFC7FF08C0B094A094FB +:1042600090948094811C911CA11CB11C2C2FB50131 +:10427000A401C7010E947CA081E0A3CFC261D4CF7A +:1042800027504C2FC501B4010E9488A04B015C014E +:10429000C260D15009F3C8010E9469A397FFC8CF3B +:1042A000D9CF7F928F929F92AF92BF92CF92DF929F +:1042B000EF92FF920F931F93CF93DF93CDB7DEB7AB +:1042C000A0970FB6F894DEBF0FBECDBF5C01962E4F +:1042D0007A01CE0101966C0180E2F60111928A9575 +:1042E000E9F7F501B381890130E020E0712C812CE0 +:1042F000A0E041E050E0F801B3FD8591B3FF81916A +:10430000982F8F01811117C010E000E0C801A0961E +:104310000FB6F894DEBF0FBECDBFDF91CF911F91D6 +:104320000F91FF90EF90DF90CF90BF90AF909F9054 +:104330008F907F9008958E3519F42115310541F144 +:10434000A21713064CF48D3549F18D3229F48110F2 +:1043500006C0882483941DC0882009F464C0E92F16 +:10436000E695E695E695EC0DFD2DF11D892F8770FC +:10437000BA0101C0660F8A95EAF78081682B6083D5 +:10438000791651F0971510F49F5FE9CF9150E7CF60 +:10439000A1E02F5F3F4FAFCF812CFBCF882019F0DA +:1043A0008E8180628E83AA2359F0F6019E012F5DD3 +:1043B0003F4F8081809580833196E217F307C9F7DC +:1043C00088248394C5010E9469A397FD16C0E82F35 +:1043D000E695E695E695EC0DFD2DF11D208130E08A +:1043E000AC014770552702C0359527954A95E2F7ED +:1043F00020FD06C0B5010E94D5A3882069F084CFB6 +:10440000E114F10429F0F7018083C70101967C01D2 +:104410009A94812C9110D6CFE114F10409F476CF4F +:10442000F701108273CFE82FE695E695E695EC0D3F +:10443000FD2DF11D982F9770BA0101C0660F9A9556 +:10444000EAF79081692B6083782EA3CF5F926F92F9 +:104450007F928F929F92AF92BF92CF92DF92EF9214 +:10446000FF920F931F93CF93DF936C01EB015A01DF +:10447000FC0117821682512CF601E380FE01E3FC59 +:104480008591E3FE8191182FEF018823E9F090E0F8 +:104490000E943FA3892B21F0C6010E94ABA0ECCF64 +:1044A000153241F4FE01E3FC1591E3FE1191EF0199 +:1044B000153269F4C6010E9469A397FD8EC01817D2 +:1044C000D9F2B6010E94D5A3852D90E08AC000E004 +:1044D0001A3231F4E3FC1591E3FE1191EF0101E092 +:1044E000F12C20ED210F2A3048F101FF37C0FF20C9 +:1044F00059F31836B1F11C3609F43DC0112321F3EC +:10450000612F70E08EE094E00E9448A3892BE1F2D5 +:10451000912C812C00FD06C0F50180809180C501A1 +:1045200002965C011E3679F5F6014681578170E0EE +:1045300060E0202FC4010E947CA09ECF02606F2DFE +:1045400070E090E080E040E20E9488A0F62EFE013C +:10455000E3FC1591E3FE1191EF01C3CFFF24FA9420 +:10456000C8CFFE01E3FC1591E3FE1191EF0118366F +:1045700009F0C4CF08600460FE01E3FC1591E3FE7E +:104580001191EF01BBCF1336C1F401FD02C0FF242E +:10459000F394C6010E9469A397FD1FC08114910482 +:1045A00029F0F4018083C40101964C01FA94F110C2 +:1045B000F0CF00FD61CF53945FCF1B3511F59E0105 +:1045C000A4016F2DC6010E9451A1EC01892B89F72E +:1045D000F6018381807309F477CF8FEF9FEF51103D +:1045E00073CFDF91CF911F910F91FF90EF90DF90EC +:1045F000CF90BF90AF909F908F907F906F905F9083 +:104600000895C6010E94ABA097FDE7CF1F36A9F120 +:1046100030F4143641F0193639F0006405C0133710 +:10462000B9F01537D1F70062202FA4016F2DC60114 +:104630000E94C4A08111BDCFCBCF8114910429F079 +:10464000F4016082C40101964C01FA94FF2071F0DC +:10465000C6010E9469A33C0197FD08C00E943FA3C8 +:10466000892B59F3B601C3010E94D5A3811491048B +:1046700009F49FCFF40110829CCF0061D5CF911136 +:104680000C944BA4803219F089508550C8F70895D6 +:10469000FC010590061621F00020D9F7C00108950D +:1046A0003197CF010895FC010590615070400110D1 +:1046B000D8F7809590958E0F9F1F0895FC0161504B +:1046C000704001900110D8F7809590958E0F9F1F34 +:1046D0000895CF93DF93EC012B8120FF1AC026FFB2 +:1046E0000CC02F7B2B838E819F8101969F838E83AD +:1046F0008A8190E0DF91CF91089522FF18C0E88170 +:10470000F9818081082E000C990B009729F4206212 +:104710002B838FEF9FEFEECF3196F983E8832E81C5 +:104720003F812F5F3F4F3F832E839927E3CFEA8559 +:10473000FB85199597FFF3CF2B81019621F080E23D +:10474000822B8B83E6CF80E1FBCF0F931F93CF9318 +:10475000DF93182F092FEB018B8181FD09C01FEF1B +:104760000FEF812F902FDF91CF911F910F9108951F +:1047700082FF14C02E813F818C819D8128173907CB +:104780003CF4E881F981CF010196998388831083F5 +:104790008E819F8101969F838E83E3CFE885F98583 +:1047A000812F1995892BA1F3DACFFB01238120FFFB +:1047B00011C026FD0FC08F3F980771F082832F7DB7 +:1047C0002064238326813781215031093783268352 +:1047D000992708958FEF9FEF0895FA01AA272830AF +:1047E00051F1203181F1E8946F936E7F6E5F7F4FBE +:1047F0008F4F9F4FAF4FB1E03ED0B4E03CD0670F3A +:10480000781F891F9A1FA11D680F791F8A1F911D8C +:10481000A11D6A0F711D811D911DA11D20D009F4DC +:1048200068943F912AE0269F11243019305D31931E +:10483000DEF6CF010895462F4770405D4193B3E007 +:104840000FD0C9F7F6CF462F4F70405D4A3318F0AE +:10485000495D31FD4052419302D0A9F7EACFB4E05F +:10486000A6959795879577956795BA95C9F7009717 +:104870006105710508959B01AC010A2E06945795B8 +:10488000479537952795BA95C9F7620F731F841F0F +:10489000951FA01D0895992788270895F894FFCFA4 +:1048A000AE47C13F08020000000000000000000108 +:1048B00002000420006F6B004532300045323100A9 +:1048C0004532320045323600453237004532330A30 +:1048D000004532300A004532310A004532360A00BE +:1048E0004532370A0056332E332E310056332E33DD +:1048F0002E300056332E332E320056332E332E33C5 +:104900000056302E302E30007965730A0041255B49 +:10491000302D392D2B2E5D00737363616E6620255B +:10492000640D0A00562573002056310A0056554280 +:10493000255B302D462E5D0046255B302D392E5DE2 +:10494000542564004E256441256454256400205696 +:1049500025730A004E256441256454256456255B61 +:10496000302D392E5D0058255B302D392D2B2E5DD5 +:1049700059255B302D392D2B2E5D5A255B302D3975 +:104980002D2B2E5D0020422573204C2573205225AF +:10499000730A0042255B302D392D2B2E5D4C255B93 +:1049A000302D392D2B2E5D52255B302D392D2B2EA0 +:1049B0005D002058257320592573205A25730A005D +:1049C00058255B302D392D2B2E5D59255B302D3927 +:1049D0002D2B2E5D5A255B302D392D2B2E5D50252C +:1049E00064004E25645625640053255B302D392D17 +:1049F0002B2E5D0056255B302D392D2B2E5D00486A +:104A0000255B302D392D2B2E5D0053255B302D3944 +:104A10002D2B2E5D52255B302D392D2B2E5D4825FB +:104A20005B302D392D2B2E5D46255B302D392D2BFE +:104A30002E5D004E256456255B302D392D2B2E5DC5 +:104A400046255B302D392D2B2E5D0058255B302DF2 +:104A5000392D2B2E5D59255B302D392D2B2E5D5A8E +:104A6000255B302D392D2B2E5D46255B302D392DC4 +:104A70002B2E5D0042255B302D392D2B2E5D4C25D4 +:104A80005B302D392D2B2E5D52255B302D392D2B92 +:104A90002E5D46255B302D392D2B2E5D004E256475 +:104AA0002046255B302D392D2B2E5D00537769660E +:104AB0007450726F002025730A0056342E31302E48 +:104AC000300056342E302E350020532573205225C9 +:104AD00073204825730A0076616C75653A002020C2 +:104AE0002020202076616C7565323A004E256400E6 +:104AF00020422564204C2564205225640A006F6BF7 +:104B00000A006F6B2040392056300A00616E676CD6 +:104B100065206F66667365743A25730D0A006465D7 +:104B200076696365206E616D65203A2025730D0AF4 +:104B300000736F667420766572203A2025730D0A23 +:104B40000061706920766572203A2025730D0A0095 +:104B5000776F726B206D6F6465203A2025640D0AB3 +:104B60000040310A006566666563742063686563AA +:104B70006B2074696D656F7574210D0A0023255BC8 +:104B8000302D395D0024257300453233206275666F +:104B90006665722066756C6C0D0A004033205825DE +:104BA0007320592573205A2573205225730A00401B +:104BB00036204E30205625640A00403520562564A4 +:024BC0000A00E9 +:00000001FF diff --git a/imagaes/1.png b/imagaes/1.png new file mode 100755 index 0000000..ebf99da Binary files /dev/null and b/imagaes/1.png differ diff --git a/imagaes/2.png b/imagaes/2.png new file mode 100755 index 0000000..aa4a64b Binary files /dev/null and b/imagaes/2.png differ diff --git a/imagaes/3.png b/imagaes/3.png new file mode 100755 index 0000000..940cb44 Binary files /dev/null and b/imagaes/3.png differ diff --git a/imagaes/4.png b/imagaes/4.png new file mode 100755 index 0000000..886f98d Binary files /dev/null and b/imagaes/4.png differ diff --git a/imagaes/5.png b/imagaes/5.png new file mode 100755 index 0000000..bbfcbec Binary files /dev/null and b/imagaes/5.png differ diff --git a/imagaes/6.png b/imagaes/6.png new file mode 100755 index 0000000..29f608a Binary files /dev/null and b/imagaes/6.png differ diff --git a/imagaes/7.png b/imagaes/7.png new file mode 100755 index 0000000..b61b211 Binary files /dev/null and b/imagaes/7.png differ diff --git a/imagaes/8.png b/imagaes/8.png new file mode 100755 index 0000000..f04328f Binary files /dev/null and b/imagaes/8.png differ diff --git a/imagaes/XLoader.zip b/imagaes/XLoader.zip new file mode 100755 index 0000000..9985409 Binary files /dev/null and b/imagaes/XLoader.zip differ diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..4b62f4e --- /dev/null +++ b/src/README.md @@ -0,0 +1,39 @@ +# uArmMini_develop + +#### ä»‹ç» +{**以下是 Gitee å¹³å°è¯´æ˜Žï¼Œæ‚¨å¯ä»¥æ›¿æ¢æ­¤ç®€ä»‹** +Gitee 是 OSCHINA 推出的基于 Git çš„ä»£ç æ‰˜ç®¡å¹³å°ï¼ˆåŒæ—¶æ”¯æŒ SVN)。专为开å‘者æä¾›ç¨³å®šã€é«˜æ•ˆã€å®‰å…¨çš„云端软件开å‘åä½œå¹³å° +无论是个人ã€å›¢é˜Ÿã€æˆ–是ä¼ä¸šï¼Œéƒ½èƒ½å¤Ÿç”¨ Gitee å®žçŽ°ä»£ç æ‰˜ç®¡ã€é¡¹ç›®ç®¡ç†ã€å作开å‘。ä¼ä¸šé¡¹ç›®è¯·çœ‹ [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### å‚与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. æäº¤ä»£ç  +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md æ¥æ”¯æŒä¸åŒçš„语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方åšå®¢ [blog.gitee.com](https://blog.gitee.com) +3. ä½ å¯ä»¥ [https://gitee.com/explore](https://gitee.com/explore) è¿™ä¸ªåœ°å€æ¥äº†è§£ Gitee 上的优秀开æºé¡¹ç›® +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开æºé¡¹ç›®ï¼Œæ˜¯ç»¼åˆè¯„定出的优秀开æºé¡¹ç›® +5. Gitee 官方æä¾›çš„使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee å°é¢äººç‰©æ˜¯ä¸€æ¡£ç”¨æ¥å±•示 Gitee 会员风采的æ ç›® [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/src/config.h b/src/config.h new file mode 100755 index 0000000..83032e7 --- /dev/null +++ b/src/config.h @@ -0,0 +1,414 @@ +/* + config.h - compile time configuration + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +// This file contains compile-time configurations for Grbl's internal system. For the most part, +// users will not need to directly modify these, but they are here for specific needs, i.e. +// performance tuning or adjusting to non-typical machines. + +// IMPORTANT: Any changes here requires a full re-compiling of the source code to propagate them. + +#ifndef config_h +#define config_h +#include "grbl.h" // For Arduino IDE compatibility. + + +// Default settings. Used when resetting EEPROM. Change to desired name in defaults.h +#define DEFAULTS_GENERIC + +// Serial baud rate +#define BAUD_RATE 115200 + +// Default cpu mappings. Grbl officially supports the Arduino Uno only. Other processor types +// may exist from user-supplied templates or directly user-defined in cpu_map.h +//#define CPU_MAP_ATMEGA328P // Arduino Uno CPU +#define CPU_MAP_ATMEGA2560 + +// Define realtime command special characters. These characters are 'picked-off' directly from the +// serial read data stream and are not passed to the grbl line execution parser. Select characters +// that do not and must not exist in the streamed g-code program. ASCII control characters may be +// used, if they are available per user setup. Also, extended ASCII codes (>127), which are never in +// g-code programs, maybe selected for interface programs. +// NOTE: If changed, manually update help message in report.c. +#define CMD_STATUS_REPORT '?' +#define CMD_FEED_HOLD '!' +#define CMD_CYCLE_START '~' +#define CMD_RESET 0x18 // ctrl-x. +#define CMD_SAFETY_DOOR '@' + +// If homing is enabled, homing init lock sets Grbl into an alarm state upon power up. This forces +// the user to perform the homing cycle (or override the locks) before doing anything else. This is +// mainly a safety feature to remind the user to home, since position is unknown to Grbl. +#define HOMING_INIT_LOCK // Comment to disable + +// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode +// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short +// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed +// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If +// an axis is omitted from the defines, it will not home, nor will the system update its position. +// Meaning that this allows for users with non-standard cartesian machines, such as a lathe (x then z, +// with no y), to configure the homing cycle behavior to their needs. +// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same +// cycle, but this requires some pin settings changes in cpu_map.h file. For example, the default homing +// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles. +// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins +// may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all three axes +// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits +// will not be affected by pin sharing. +// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y. +#define HOMING_CYCLE_0 (1< 3us, and, when added with the +// user-supplied step pulse time, the total time must not exceed 127us. Reported successful +// values for certain setups have ranged from 5 to 20us. +// #define STEP_PULSE_DELAY 10 // Step pulse delay in microseconds. Default disabled. + +// The number of linear motions in the planner buffer to be planned at any give time. The vast +// majority of RAM that Grbl uses is based on this buffer size. Only increase if there is extra +// available RAM, like when re-compiling for a Mega or Sanguino. Or decrease if the Arduino +// begins to crash due to the lack of available RAM or if the CPU is having trouble keeping +// up with planning new incoming motions as they are executed. +// #define BLOCK_BUFFER_SIZE 18 // Uncomment to override default in planner.h. + +// Governs the size of the intermediary step segment buffer between the step execution algorithm +// and the planner blocks. Each segment is set of steps executed at a constant velocity over a +// fixed time defined by ACCELERATION_TICKS_PER_SECOND. They are computed such that the planner +// block velocity profile is traced exactly. The size of this buffer governs how much step +// execution lead time there is for other Grbl processes have to compute and do their thing +// before having to come back and refill this buffer, currently at ~50msec of step moves. +// #define SEGMENT_BUFFER_SIZE 6 // Uncomment to override default in stepper.h. + +// Line buffer size from the serial input stream to be executed. Also, governs the size of +// each of the startup blocks, as they are each stored as a string of this size. Make sure +// to account for the available EEPROM at the defined memory address in settings.h and for +// the number of desired startup blocks. +// NOTE: 80 characters is not a problem except for extreme cases, but the line buffer size +// can be too small and g-code blocks can get truncated. Officially, the g-code standards +// support up to 256 characters. In future versions, this default will be increased, when +// we know how much extra memory space we can re-invest into this. +// #define LINE_BUFFER_SIZE 80 // Uncomment to override default in protocol.h + +// Serial send and receive buffer size. The receive buffer is often used as another streaming +// buffer to store incoming blocks to be processed by Grbl when its ready. Most streaming +// interfaces will character count and track each block send to each block response. So, +// increase the receive buffer if a deeper receive buffer is needed for streaming and avaiable +// memory allows. The send buffer primarily handles messages in Grbl. Only increase if large +// messages are sent and Grbl begins to stall, waiting to send the rest of the message. +// NOTE: Buffer size values must be greater than zero and less than 256. +// #define RX_BUFFER_SIZE 128 // Uncomment to override defaults in serial.h +// #define TX_BUFFER_SIZE 64 + +// Toggles XON/XOFF software flow control for serial communications. Not officially supported +// due to problems involving the Atmega8U2 USB-to-serial chips on current Arduinos. The firmware +// on these chips do not support XON/XOFF flow control characters and the intermediate buffer +// in the chips cause latency and overflow problems with standard terminal programs. However, +// using specifically-programmed UI's to manage this latency problem has been confirmed to work. +// As well as, older FTDI FT232RL-based Arduinos(Duemilanove) are known to work with standard +// terminal programs since their firmware correctly manage these XON/XOFF characters. In any +// case, please report any successes to grbl administrators! +// #define ENABLE_XONXOFF // Default disabled. Uncomment to enable. + +// A simple software debouncing feature for hard limit switches. When enabled, the interrupt +// monitoring the hard limit switch pins will enable the Arduino's watchdog timer to re-check +// the limit pin state after a delay of about 32msec. This can help with CNC machines with +// problematic false triggering of their hard limit switches, but it WILL NOT fix issues with +// electrical interference on the signal cables from external sources. It's recommended to first +// use shielded signal cables with their shielding connected to ground (old USB/computer cables +// work well and are cheap to find) and wire in a low-pass circuit into each limit pin. +// #define ENABLE_SOFTWARE_DEBOUNCE // Default disabled. Uncomment to enable. + +// Force Grbl to check the state of the hard limit switches when the processor detects a pin +// change inside the hard limit ISR routine. By default, Grbl will trigger the hard limits +// alarm upon any pin change, since bouncing switches can cause a state check like this to +// misread the pin. When hard limits are triggered, they should be 100% reliable, which is the +// reason that this option is disabled by default. Only if your system/electronics can guarantee +// that the switches don't bounce, we recommend enabling this option. This will help prevent +// triggering a hard limit when the machine disengages from the switch. +// NOTE: This option has no effect if SOFTWARE_DEBOUNCE is enabled. +// #define HARD_LIMIT_FORCE_STATE_CHECK // Default disabled. Uncomment to enable. + + +// --------------------------------------------------------------------------------------- +// COMPILE-TIME ERROR CHECKING OF DEFINE VALUES: + +#ifndef HOMING_CYCLE_0 + #error "Required HOMING_CYCLE_0 not defined." +#endif + +#if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN) && !defined(VARIABLE_SPINDLE) + #error "USE_SPINDLE_DIR_AS_ENABLE_PIN may only be used with VARIABLE_SPINDLE enabled" +#endif + +#if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN) && !defined(CPU_MAP_ATMEGA328P) + #error "USE_SPINDLE_DIR_AS_ENABLE_PIN may only be used with a 328p processor" +#endif + +// --------------------------------------------------------------------------------------- + + +#endif diff --git a/src/coolant_control.c b/src/coolant_control.c new file mode 100755 index 0000000..4429dd4 --- /dev/null +++ b/src/coolant_control.c @@ -0,0 +1,64 @@ +/* + coolant_control.c - coolant control methods + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +void coolant_init() +{ + COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT); + #ifdef ENABLE_M7 + COOLANT_MIST_DDR |= (1 << COOLANT_MIST_BIT); + #endif + coolant_stop(); +} + + +void coolant_stop() +{ + COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT); + #ifdef ENABLE_M7 + COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT); + #endif +} + + +void coolant_set_state(uint8_t mode) +{ + if (mode == COOLANT_FLOOD_ENABLE) { + COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT); + + #ifdef ENABLE_M7 + } else if (mode == COOLANT_MIST_ENABLE) { + COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT); + #endif + + } else { + coolant_stop(); + } +} + + +void coolant_run(uint8_t mode) +{ + if (sys.state == STATE_CHECK_MODE) { return; } + protocol_buffer_synchronize(); // Ensure coolant turns on when specified in program. + coolant_set_state(mode); +} diff --git a/src/coolant_control.h b/src/coolant_control.h new file mode 100755 index 0000000..7694a78 --- /dev/null +++ b/src/coolant_control.h @@ -0,0 +1,30 @@ +/* + coolant_control.h - spindle control methods + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef coolant_control_h +#define coolant_control_h + + +void coolant_init(); +void coolant_stop(); +void coolant_set_state(uint8_t mode); +void coolant_run(uint8_t mode); + +#endif \ No newline at end of file diff --git a/src/cpu_map.h b/src/cpu_map.h new file mode 100755 index 0000000..1804d25 --- /dev/null +++ b/src/cpu_map.h @@ -0,0 +1,48 @@ +/* + cpu_map.h - CPU and pin mapping configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* The cpu_map.h files serve as a central pin mapping selection file for different processor + types, i.e. AVR 328p or AVR Mega 2560. Each processor has its own pin mapping file. + (i.e. cpu_map_atmega328p.h) Grbl officially supports the Arduino Uno, but the + other supplied pin mappings are supplied by users, so your results may vary. */ + +// NOTE: With new processors, only add the define name and filename to use. + +#ifndef cpu_map_h +#define cpu_map_h + + +#ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl. + #include "cpu_map/cpu_map_atmega328p.h" +#endif + +#ifdef CPU_MAP_ATMEGA2560 // (Arduino Mega 2560) Working @EliteEng + #include "cpu_map/cpu_map_atmega2560.h" +#endif + +/* +#ifdef CPU_MAP_CUSTOM_PROC + // For a custom pin map or different processor, copy and edit one of the available cpu + // map files and modify it to your needs. Make sure the defined name is also changed in + // the config.h file. +#endif +*/ + +#endif diff --git a/src/cpu_map/cpu_map_atmega2560.h b/src/cpu_map/cpu_map_atmega2560.h new file mode 100755 index 0000000..042d2c8 --- /dev/null +++ b/src/cpu_map/cpu_map_atmega2560.h @@ -0,0 +1,217 @@ +/* + cpu_map_atmega2560.h - CPU and pin mapping configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* This cpu_map file serves as a central pin mapping settings file for AVR Mega 2560 */ + + +#ifdef GRBL_PLATFORM +#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM +#endif + + +#define GRBL_PLATFORM "Atmega2560" + +// Serial port pins +#define SERIAL_RX USART0_RX_vect +#define SERIAL_UDRE USART0_UDRE_vect + +// Increase Buffers to make use of extra SRAM +//#define RX_BUFFER_SIZE 256 +//#define TX_BUFFER_SIZE 128 +//#define BLOCK_BUFFER_SIZE 36 +//#define LINE_BUFFER_SIZE 100 + +/* +// Define step pulse output pins. NOTE: All step bit pins must be on the same port. +#define STEP_DDR DDRA +#define STEP_PORT PORTA +#define STEP_PIN PINA +#define X_STEP_BIT 2 // MEGA2560 Digital Pin 24 +#define Y_STEP_BIT 3 // MEGA2560 Digital Pin 25 +#define Z_STEP_BIT 4 // MEGA2560 Digital Pin 26 +#define STEP_MASK ((1< grbl x axis +#define ARML_STEP_DDR DDRF +#define ARML_STEP_PORT PORTF +#define ARML_STEP_PIN 6 //PF6 +#define ARML_STEP_MASK (1< grbl y axis +#define ARMR_STEP_DDR DDRL +#define ARMR_STEP_PORT PORTL +#define ARMR_STEP_PIN 3 // PL3 +#define ARMR_STEP_MASK (1< grbl z axis +#define BASE_STEP_DDR DDRF +#define BASE_STEP_PORT PORTF +#define BASE_STEP_PIN 0 // PF0 +#define BASE_STEP_MASK (1<. +*/ + +/* Grbl officially supports the Arduino Uno, but the other supplied pin mappings are + supplied by users, so your results may vary. This cpu_map file serves as a central + pin mapping settings file for AVR 328p used on the Arduino Uno. */ + +#ifdef GRBL_PLATFORM +#error "cpu_map already defined: GRBL_PLATFORM=" GRBL_PLATFORM +#endif + + +#define GRBL_PLATFORM "Atmega328p" + +// Define serial port pins and interrupt vectors. +#define SERIAL_RX USART_RX_vect +#define SERIAL_UDRE USART_UDRE_vect + +// Define step pulse output pins. NOTE: All step bit pins must be on the same port. +#define STEP_DDR DDRD +#define STEP_PORT PORTD +#define X_STEP_BIT 2 // Uno Digital Pin 2 +#define Y_STEP_BIT 3 // Uno Digital Pin 3 +#define Z_STEP_BIT 4 // Uno Digital Pin 4 +#define STEP_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings selector for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + files listed here are supplied by users, so your results may vary. However, this should + give you a good starting point as you get to know your machine and tweak the settings for + your nefarious needs. + Ensure one and only one of these DEFAULTS_XXX values is defined in config.h */ + +#ifndef defaults_h + +// Only define the DEFAULT_XXX with where to find the corresponding default_XXX.h file. +// Don't #define defaults_h here, let the selected file do it. Prevents including more than one. + +#ifdef DEFAULTS_GENERIC + // Grbl generic default settings. Should work across different machines. + #include "defaults/defaults_generic.h" +#endif + +#ifdef DEFAULTS_SHERLINE_5400 + // Description: Sherline 5400 mill with three NEMA 23 Keling KL23H256-21-8B 185 oz-in stepper motors, + // driven by three Pololu A4988 stepper drivers with a 30V, 6A power supply at 1.5A per winding. + #include "defaults/defaults_sherline.h" +#endif + +#ifdef DEFAULTS_SHAPEOKO + // Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos + // grblShield with a 24V, 4.2A power supply. + #include "defaults/defaults_shapeoko.h" +#endif + +#ifdef DEFAULTS_SHAPEOKO_2 + // Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos + // grblShield at 28V. + #include "defaults/defaults_shapeoko2.h" +#endif + +#ifdef DEFAULTS_SHAPEOKO_3 + // Description: Shapeoko CNC mill with three NEMA 23 stepper motors, driven by CarbideMotion + #include "defaults/defaults_shapeoko3.h" +#endif + +#ifdef DEFAULTS_X_CARVE_500MM + // Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos + // grblShield at 24V. + #include "defaults/defaults_x_carve_500mm.h" +#endif + +#ifdef DEFAULTS_X_CARVE_1000MM + // Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos + // grblShield at 24V. + #include "defaults/defaults_x_carve_1000mm.h" +#endif + +#ifdef DEFAULTS_ZEN_TOOLWORKS_7x7 + // Description: Zen Toolworks 7x7 mill with three Shinano SST43D2121 65oz-in NEMA 17 stepper motors. + // Leadscrew is different from some ZTW kits, where most are 1.25mm/rev rather than 8.0mm/rev here. + // Driven by 30V, 6A power supply and TI DRV8811 stepper motor drivers. + #include "defaults/defaults_zen_toolworks_7x7.h" +#endif + +#ifdef DEFAULTS_OXCNC + // Grbl settings for OpenBuilds OX CNC Machine + // http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/ + #include "defaults/defaults_oxcnc.h" +#endif + +#ifdef DEFAULTS_SIMULATOR + // Settings only for Grbl Simulator (www.github.com/grbl/grbl-sim) + #include "defaults/defaults_simulator.h" +#endif + +#endif diff --git a/src/defaults/defaults_generic.h b/src/defaults/defaults_generic.h new file mode 100755 index 0000000..6967975 --- /dev/null +++ b/src/defaults/defaults_generic.h @@ -0,0 +1,62 @@ +/* + defaults_generic.h - defaults settings configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Grbl generic default settings. Should work across different machines. + #define DEFAULT_X_STEPS_PER_MM 6400.0 + #define DEFAULT_Y_STEPS_PER_MM 6400.0 + #define DEFAULT_Z_STEPS_PER_MM 6400.0 + #define DEFAULT_X_MAX_RATE 100000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 100000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 100000.0 // mm/min + #define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 10000.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 10000.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 10000.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK 7 // 00000111 zyz + #define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled) + #define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION)) + #define DEFAULT_JUNCTION_DEVIATION 0.01 // mm + #define DEFAULT_ARC_TOLERANCE 0.002 // mm + #define DEFAULT_REPORT_INCHES 0 // false + #define DEFAULT_INVERT_ST_ENABLE 1 // false + #define DEFAULT_INVERT_LIMIT_PINS 0 // false + #define DEFAULT_SOFT_LIMIT_ENABLE 0 // false + #define DEFAULT_HARD_LIMIT_ENABLE 0 // false + #define DEFAULT_HOMING_ENABLE 0 // false + #define DEFAULT_HOMING_DIR_MASK 0 // move positive dir + #define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min + #define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min + #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k) + #define DEFAULT_HOMING_PULLOFF 1.0 // mm + +#endif diff --git a/src/defaults/defaults_oxcnc.h b/src/defaults/defaults_oxcnc.h new file mode 100755 index 0000000..1c89ab8 --- /dev/null +++ b/src/defaults/defaults_oxcnc.h @@ -0,0 +1,63 @@ +/* + defaults_oxcnc.h - defaults settings configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Grbl settings for OpenBuilds OX CNC Machine + // http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/ + #define DEFAULT_X_STEPS_PER_MM 26.670 + #define DEFAULT_Y_STEPS_PER_MM 26.670 + #define DEFAULT_Z_STEPS_PER_MM 50 + #define DEFAULT_X_MAX_RATE 500.0 // mm/min + #define DEFAULT_Y_MAX_RATE 500.0 // mm/min + #define DEFAULT_Z_MAX_RATE 500.0 // mm/min + #define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 500.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 750.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 80.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK 0 + #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled) + #define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION)) + #define DEFAULT_JUNCTION_DEVIATION 0.02 // mm + #define DEFAULT_ARC_TOLERANCE 0.002 // mm + #define DEFAULT_REPORT_INCHES 0 // false + #define DEFAULT_INVERT_ST_ENABLE 0 // false + #define DEFAULT_INVERT_LIMIT_PINS 0 // false + #define DEFAULT_SOFT_LIMIT_ENABLE 0 // false + #define DEFAULT_HARD_LIMIT_ENABLE 0 // false + #define DEFAULT_HOMING_ENABLE 0 // false + #define DEFAULT_HOMING_DIR_MASK 0 // move positive dir + #define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min + #define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min + #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k) + #define DEFAULT_HOMING_PULLOFF 1.0 // mm + +#endif diff --git a/src/defaults/defaults_shapeoko.h b/src/defaults/defaults_shapeoko.h new file mode 100755 index 0000000..46346ea --- /dev/null +++ b/src/defaults/defaults_shapeoko.h @@ -0,0 +1,70 @@ +/* + defaults_shapeoko.h - defaults settings configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + + // Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos + // grblShield with a 24V, 4.2A power supply. + #define MICROSTEPS_XY 8 + #define STEP_REVS_XY 400 + #define MM_PER_REV_XY (0.08*18*MM_PER_INCH) // 0.08 in belt pitch, 18 pulley teeth + #define MICROSTEPS_Z 2 + #define STEP_REVS_Z 400 + #define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew + #define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z) + #define DEFAULT_X_MAX_RATE 1000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 1000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 1000.0 // mm/min + #define DEFAULT_X_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (15.0*60*60) // 15*60*60 mm/min^2 = 15 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 200.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 200.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 200.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: Shapeoko CNC mill with three NEMA 17 stepper motors, driven by Synthetos + // grblShield at 28V. + #define MICROSTEPS_XY 8 + #define STEP_REVS_XY 200 + #define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth + #define MICROSTEPS_Z 2 + #define STEP_REVS_Z 200 + #define MM_PER_REV_Z 1.250 // 1.25 mm/rev leadscrew + #define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z) + #define DEFAULT_X_MAX_RATE 5000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 5000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 500.0 // mm/min + #define DEFAULT_X_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 290.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 290.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 100.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: Shapeoko CNC mill with three NEMA 23 stepper motors, driven by CarbideMotion + #define MICROSTEPS_XY 8 + #define STEP_REVS_XY 200 + #define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth + #define MICROSTEPS_Z 8 + #define STEP_REVS_Z 200 + #define MM_PER_REV_Z (2.0*20) // 2mm belt pitch, 20 pulley teeth + #define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z) + #define DEFAULT_X_MAX_RATE 5000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 5000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 5000.0 // mm/min + #define DEFAULT_X_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (400.0*60*60) // 400*60*60 mm/min^2 = 400 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 425.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 465.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 80.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: Sherline 5400 mill with three NEMA 23 Keling KL23H256-21-8B 185 oz-in stepper motors, + // driven by three Pololu A4988 stepper drivers with a 30V, 6A power supply at 1.5A per winding. + #define MICROSTEPS 2 + #define STEPS_PER_REV 200.0 + #define MM_PER_REV (0.050*MM_PER_INCH) // 0.050 inch/rev leadscrew + #define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_X_MAX_RATE 635.0 // mm/min (25 ipm) + #define DEFAULT_Y_MAX_RATE 635.0 // mm/min + #define DEFAULT_Z_MAX_RATE 635.0 // mm/min + #define DEFAULT_X_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (50.0*60*60) // 50*60*60 mm/min^2 = 50 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 225.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 125.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 170.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Settings only for Grbl Simulator (www.github.com/grbl/grbl-sim) + // Grbl generic default settings. Should work across different machines. + #define DEFAULT_X_STEPS_PER_MM 1000.0 + #define DEFAULT_Y_STEPS_PER_MM 1000.0 + #define DEFAULT_Z_STEPS_PER_MM 1000.0 + #define DEFAULT_X_MAX_RATE 1000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 1000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 1000.0 // mm/min + #define DEFAULT_X_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (100.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 1000.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 1000.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 1000.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK 0 + #define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled) + #define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION)) + #define DEFAULT_JUNCTION_DEVIATION 0.01 // mm + #define DEFAULT_ARC_TOLERANCE 0.002 // mm + #define DEFAULT_REPORT_INCHES 0 // false + #define DEFAULT_INVERT_ST_ENABLE 0 // false + #define DEFAULT_INVERT_LIMIT_PINS 0 // false + #define DEFAULT_SOFT_LIMIT_ENABLE 0 // false + #define DEFAULT_HARD_LIMIT_ENABLE 0 // false + #define DEFAULT_HOMING_ENABLE 0 // false + #define DEFAULT_HOMING_DIR_MASK 0 // move positive dir + #define DEFAULT_HOMING_FEED_RATE 25.0 // mm/min + #define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min + #define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k) + #define DEFAULT_HOMING_PULLOFF 1.0 // mm + +#endif diff --git a/src/defaults/defaults_x_carve_1000mm.h b/src/defaults/defaults_x_carve_1000mm.h new file mode 100755 index 0000000..f88e5ad --- /dev/null +++ b/src/defaults/defaults_x_carve_1000mm.h @@ -0,0 +1,70 @@ +/* + defaults_x_carve_1000mm.h - defaults settings configuration file + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos + // grblShield at 24V. + #define MICROSTEPS_XY 8 + #define STEP_REVS_XY 200 + #define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth + #define MICROSTEPS_Z 2 + #define STEP_REVS_Z 200 + #define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew + #define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z) + #define DEFAULT_X_MAX_RATE 8000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 8000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 500.0 // mm/min + #define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 740.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 790.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 100.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: X-Carve 3D Carver CNC mill with three 200 step/rev motors driven by Synthetos + // grblShield at 24V. + #define MICROSTEPS_XY 8 + #define STEP_REVS_XY 200 + #define MM_PER_REV_XY (2.0*20) // 2mm belt pitch, 20 pulley teeth + #define MICROSTEPS_Z 2 + #define STEP_REVS_Z 200 + #define MM_PER_REV_Z 2.117 // ACME 3/8-12 Leadscrew + #define DEFAULT_X_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Y_STEPS_PER_MM (MICROSTEPS_XY*STEP_REVS_XY/MM_PER_REV_XY) + #define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z) + #define DEFAULT_X_MAX_RATE 8000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 8000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 500.0 // mm/min + #define DEFAULT_X_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (500.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 290.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 290.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 100.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1<. +*/ + +/* The defaults.h file serves as a central default settings file for different machine + types, from DIY CNC mills to CNC conversions of off-the-shelf machines. The settings + here are supplied by users, so your results may vary. However, this should give you + a good starting point as you get to know your machine and tweak the settings for your + nefarious needs. */ + +#ifndef defaults_h +#define defaults_h + + // Description: Zen Toolworks 7x7 mill with three Shinano SST43D2121 65oz-in NEMA 17 stepper motors. + // Leadscrew is different from some ZTW kits, where most are 1.25mm/rev rather than 8.0mm/rev here. + // Driven by 30V, 6A power supply and TI DRV8811 stepper motor drivers. + #define MICROSTEPS 8 + #define STEPS_PER_REV 200.0 + #define MM_PER_REV 8.0 // 8 mm/rev leadscrew + #define DEFAULT_X_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_Y_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_Z_STEPS_PER_MM (STEPS_PER_REV*MICROSTEPS/MM_PER_REV) + #define DEFAULT_X_MAX_RATE 6000.0 // mm/min + #define DEFAULT_Y_MAX_RATE 6000.0 // mm/min + #define DEFAULT_Z_MAX_RATE 6000.0 // mm/min + #define DEFAULT_X_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2 + #define DEFAULT_Y_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2 + #define DEFAULT_Z_ACCELERATION (600.0*60*60) // 600*60*60 mm/min^2 = 600 mm/sec^2 + #define DEFAULT_X_MAX_TRAVEL 190.0 // mm + #define DEFAULT_Y_MAX_TRAVEL 180.0 // mm + #define DEFAULT_Z_MAX_TRAVEL 150.0 // mm + #define DEFAULT_STEP_PULSE_MICROSECONDS 10 + #define DEFAULT_STEPPING_INVERT_MASK 0 + #define DEFAULT_DIRECTION_INVERT_MASK ((1< +#include + +/* These EEPROM bits have different names on different devices. */ +#ifndef EEPE + #define EEPE EEWE //!< EEPROM program/write enable. + #define EEMPE EEMWE //!< EEPROM master program/write enable. +#endif + +/* These two are unfortunately not defined in the device include files. */ +#define EEPM1 5 //!< EEPROM Programming Mode Bit 1. +#define EEPM0 4 //!< EEPROM Programming Mode Bit 0. + +/* Define to reduce code size. */ +#define EEPROM_IGNORE_SELFPROG //!< Remove SPM flag polling. + +/*! \brief Read byte from EEPROM. + * + * This function reads one byte from a given EEPROM address. + * + * \note The CPU is halted for 4 clock cycles during EEPROM read. + * + * \param addr EEPROM address to read from. + * \return The byte read from the EEPROM address. + */ +unsigned char eeprom_get_char( unsigned int addr ) +{ + do {} while( EECR & (1< 0; size--) { + checksum = (checksum << 1) || (checksum >> 7); + checksum += *source; + eeprom_put_char(destination++, *(source++)); + } + eeprom_put_char(destination, checksum); +} + +int memcpy_from_eeprom_with_checksum(char *destination, unsigned int source, unsigned int size) { + unsigned char data, checksum = 0; + for(; size > 0; size--) { + data = eeprom_get_char(source++); + checksum = (checksum << 1) || (checksum >> 7); + checksum += data; + *(destination++) = data; + } + return(checksum == eeprom_get_char(source)); +} + +// end of file diff --git a/src/eeprom.h b/src/eeprom.h new file mode 100755 index 0000000..c9718a2 --- /dev/null +++ b/src/eeprom.h @@ -0,0 +1,29 @@ +/* + eeprom.h - EEPROM methods + Part of Grbl + + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef eeprom_h +#define eeprom_h + +unsigned char eeprom_get_char(unsigned int addr); +void eeprom_put_char(unsigned int addr, unsigned char new_value); +void memcpy_to_eeprom_with_checksum(unsigned int destination, char *source, unsigned int size); +int memcpy_from_eeprom_with_checksum(char *destination, unsigned int source, unsigned int size); + +#endif diff --git a/src/examples/grblUpload/license.txt b/src/examples/grblUpload/license.txt new file mode 100755 index 0000000..1abcdb9 --- /dev/null +++ b/src/examples/grblUpload/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Sungeun K. Jeon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/src/gcode.c b/src/gcode.c new file mode 100755 index 0000000..787afff --- /dev/null +++ b/src/gcode.c @@ -0,0 +1,1125 @@ +/* + gcode.c - rs274/ngc parser. + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_protocol.h" + +// NOTE: Max line number is defined by the g-code standard to be 99999. It seems to be an +// arbitrary value, and some GUIs may require more. So we increased it based on a max safe +// value when converting a float (7.2 digit precision)s to an integer. +#define MAX_LINE_NUMBER 9999999 + +#define AXIS_COMMAND_NONE 0 +#define AXIS_COMMAND_NON_MODAL 1 +#define AXIS_COMMAND_MOTION_MODE 2 +#define AXIS_COMMAND_TOOL_LENGTH_OFFSET 3 // *Undefined but required + +// Declare gc extern struct +parser_state_t gc_state; +parser_block_t gc_block; + +#define FAIL(status) return(status); + + +void gc_init() +{ + memset(&gc_state, 0, sizeof(parser_state_t)); + + // Load default G54 coordinate system. + if (!(settings_read_coord_data(gc_state.modal.coord_select,gc_state.coord_system))) { + report_status_message(STATUS_SETTING_READ_FAIL); + } +} + + +// Sets g-code parser position in mm. Input in steps. Called by the system abort and hard +// limit pull-off routines. +void gc_sync_position() +{ + system_convert_array_steps_to_mpos(gc_state.position,sys.position); +} + + +static uint8_t gc_check_same_position(float *pos_a, float *pos_b) +{ + uint8_t idx; + for (idx=0; idx 'Z')) { FAIL(STATUS_EXPECTED_COMMAND_LETTER); } // [Expected word letter] + char_counter++; + if (!read_float(line, &char_counter, &value)) { FAIL(STATUS_BAD_NUMBER_FORMAT); } // [Expected word value] + // Convert values to smaller uint8 significand and mantissa values for parsing this word. + // NOTE: Mantissa is multiplied by 100 to catch non-integer command values. This is more + // accurate than the NIST gcode requirement of x10 when used for commands, but not quite + // accurate enough for value words that require integers to within 0.0001. This should be + // a good enough comprimise and catch most all non-integer errors. To make it compliant, + // we would simply need to change the mantissa to int16, but this add compiled flash space. + // Maybe update this later. + int_value = trunc(value); + mantissa = round(100*(value - int_value)); // Compute mantissa for Gxx.x commands. + // NOTE: Rounding must be used to catch small floating point errors. + + // Check if the g-code word is supported or errors due to modal group violations or has + // been repeated in the g-code block. If ok, update the command or record its value. + switch(letter) { + + /* 'G' and 'M' Command Words: Parse commands and check for modal group violations. + NOTE: Modal group numbers are defined in Table 4 of NIST RS274-NGC v3, pg.20 */ + + case 'G': + // Determine 'G' command and its modal group + rtn = uarm_execute_g_cmd( int_value, line+char_counter, &char_counter ); + if( (rtn != UARM_CMD_NOTFIND) && (rtn != UARM_SYS_ABORT) ){ return rtn; } + + + switch(int_value) { + case 10: case 28: case 30: case 92: + // Check for G10/28/30/92 being called with G0/1/2/3/38 on same block. + // * G43.1 is also an axis command but is not explicitly defined this way. + if (mantissa == 0) { // Ignore G28.1, G30.1, and G92.1 + if (axis_command) { FAIL(STATUS_GCODE_AXIS_COMMAND_CONFLICT); } // [Axis word/command conflict] + axis_command = AXIS_COMMAND_NON_MODAL; + } + // No break. Continues to next line. + case 4: case 53: + word_bit = MODAL_GROUP_G0; + switch(int_value) { + case 4: gc_block.non_modal_command = NON_MODAL_DWELL; break; // G4 + case 10: gc_block.non_modal_command = NON_MODAL_SET_COORDINATE_DATA; break; // G10 + case 28: + switch(mantissa) { + case 0: gc_block.non_modal_command = NON_MODAL_GO_HOME_0; break; // G28 + case 10: gc_block.non_modal_command = NON_MODAL_SET_HOME_0; break; // G28.1 + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported G28.x command] + } + mantissa = 0; // Set to zero to indicate valid non-integer G command. + break; + case 30: + switch(mantissa) { + case 0: gc_block.non_modal_command = NON_MODAL_GO_HOME_1; break; // G30 + case 10: gc_block.non_modal_command = NON_MODAL_SET_HOME_1; break; // G30.1 + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported G30.x command] + } + mantissa = 0; // Set to zero to indicate valid non-integer G command. + break; + case 53: gc_block.non_modal_command = NON_MODAL_ABSOLUTE_OVERRIDE; break; // G53 + case 92: + switch(mantissa) { + case 0: gc_block.non_modal_command = NON_MODAL_SET_COORDINATE_OFFSET; break; // G92 + case 10: gc_block.non_modal_command = NON_MODAL_RESET_COORDINATE_OFFSET; break; // G92.1 + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported G92.x command] + } + mantissa = 0; // Set to zero to indicate valid non-integer G command. + break; + } + break; + case 0: case 1: case 2: case 3: case 38: + // Check for G0/1/2/3/38 being called with G10/28/30/92 on same block. + // * G43.1 is also an axis command but is not explicitly defined this way. + if (axis_command) { FAIL(STATUS_GCODE_AXIS_COMMAND_CONFLICT); } // [Axis word/command conflict] + axis_command = AXIS_COMMAND_MOTION_MODE; + // No break. Continues to next line. + case 80: + word_bit = MODAL_GROUP_G1; + switch(int_value) { + case 0: gc_block.modal.motion = MOTION_MODE_SEEK; break; // G0 + case 1: gc_block.modal.motion = MOTION_MODE_LINEAR; break; // G1 + case 2: gc_block.modal.motion = MOTION_MODE_CW_ARC; break; // G2 + case 3: gc_block.modal.motion = MOTION_MODE_CCW_ARC; break; // G3 + case 38: + switch(mantissa) { + case 20: gc_block.modal.motion = MOTION_MODE_PROBE_TOWARD; break; // G38.2 + case 30: gc_block.modal.motion = MOTION_MODE_PROBE_TOWARD_NO_ERROR; break; // G38.3 + case 40: gc_block.modal.motion = MOTION_MODE_PROBE_AWAY; break; // G38.4 + case 50: gc_block.modal.motion = MOTION_MODE_PROBE_AWAY_NO_ERROR; break; // G38.5 + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported G38.x command] + } + mantissa = 0; // Set to zero to indicate valid non-integer G command. + break; + case 80: gc_block.modal.motion = MOTION_MODE_NONE; break; // G80 + } + break; + case 17: case 18: case 19: + word_bit = MODAL_GROUP_G2; + switch(int_value) { + case 17: gc_block.modal.plane_select = PLANE_SELECT_XY; break; + case 18: gc_block.modal.plane_select = PLANE_SELECT_ZX; break; + case 19: gc_block.modal.plane_select = PLANE_SELECT_YZ; break; + } + break; + case 90: case 91: + if (mantissa == 0) { + word_bit = MODAL_GROUP_G3; + if (int_value == 90) { gc_block.modal.distance = DISTANCE_MODE_ABSOLUTE; } // G90 + else { gc_block.modal.distance = DISTANCE_MODE_INCREMENTAL; } // G91 + } else { + word_bit = MODAL_GROUP_G4; + if ((mantissa != 10) || (int_value == 90)) { FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); } // [G90.1 not supported] + mantissa = 0; // Set to zero to indicate valid non-integer G command. + // Otherwise, arc IJK incremental mode is default. G91.1 does nothing. + } + break; + case 93: case 94: + word_bit = MODAL_GROUP_G5; + if (int_value == 93) { gc_block.modal.feed_rate = FEED_RATE_MODE_INVERSE_TIME; } // G93 + else { gc_block.modal.feed_rate = FEED_RATE_MODE_UNITS_PER_MIN; } // G94 + break; + case 20: case 21: + word_bit = MODAL_GROUP_G6; + if (int_value == 20) { gc_block.modal.units = UNITS_MODE_INCHES; } // G20 + else { gc_block.modal.units = UNITS_MODE_MM; } // G21 + break; + case 40: + word_bit = MODAL_GROUP_G7; + // NOTE: Not required since cutter radius compensation is always disabled. Only here + // to support G40 commands that often appear in g-code program headers to setup defaults. + // gc_block.modal.cutter_comp = CUTTER_COMP_DISABLE; // G40 + break; + case 43: case 49: + word_bit = MODAL_GROUP_G8; + // NOTE: The NIST g-code standard vaguely states that when a tool length offset is changed, + // there cannot be any axis motion or coordinate offsets updated. Meaning G43, G43.1, and G49 + // all are explicit axis commands, regardless if they require axis words or not. + if (axis_command) { FAIL(STATUS_GCODE_AXIS_COMMAND_CONFLICT); } // [Axis word/command conflict] } + axis_command = AXIS_COMMAND_TOOL_LENGTH_OFFSET; + if (int_value == 49) { // G49 + gc_block.modal.tool_length = TOOL_LENGTH_OFFSET_CANCEL; + } else if (mantissa == 10) { // G43.1 + gc_block.modal.tool_length = TOOL_LENGTH_OFFSET_ENABLE_DYNAMIC; + } else { FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); } // [Unsupported G43.x command] + mantissa = 0; // Set to zero to indicate valid non-integer G command. + break; + case 54: case 55: case 56: case 57: case 58: case 59: + // NOTE: G59.x are not supported. (But their int_values would be 60, 61, and 62.) + word_bit = MODAL_GROUP_G12; + gc_block.modal.coord_select = int_value-54; // Shift to array indexing. + break; + case 61: + word_bit = MODAL_GROUP_G13; + if (mantissa != 0) { FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); } // [G61.1 not supported] + // gc_block.modal.control = CONTROL_MODE_EXACT_PATH; // G61 + break; + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported G command] + } + if (mantissa > 0) { FAIL(STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER); } // [Unsupported or invalid Gxx.x command] + // Check for more than one command per modal group violations in the current block + // NOTE: Variable 'word_bit' is always assigned, if the command is valid. + if ( bit_istrue(command_words,bit(word_bit)) ) { FAIL(STATUS_GCODE_MODAL_GROUP_VIOLATION); } + command_words |= bit(word_bit); + break; + + case 'M': + + // Determine 'M' command and its modal group + if (mantissa > 0) { FAIL(STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER); } // [No Mxx.x commands] + + rtn = uarm_execute_m_cmd( int_value, line+char_counter, &char_counter ); + if( (rtn != UARM_CMD_NOTFIND) && (rtn != UARM_SYS_ABORT) ){ return rtn; } + + switch(int_value) { + case 0: case 1: case 2: case 30: + word_bit = MODAL_GROUP_M4; + switch(int_value) { + case 0: gc_block.modal.program_flow = PROGRAM_FLOW_PAUSED; break; // Program pause + case 1: break; // Optional stop not supported. Ignore. + case 2: case 30: gc_block.modal.program_flow = PROGRAM_FLOW_COMPLETED; break; // Program end and reset + } + break; + #ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN + case 4: + #endif + case 3: case 5: + word_bit = MODAL_GROUP_M7; + switch(int_value) { + case 3: gc_block.modal.spindle = SPINDLE_ENABLE_CW; break; + #ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN + case 4: gc_block.modal.spindle = SPINDLE_ENABLE_CCW; break; + #endif + case 5: gc_block.modal.spindle = SPINDLE_DISABLE; break; + } + break; + #ifdef ENABLE_M7 + case 7: + #endif + case 8: case 9: + word_bit = MODAL_GROUP_M8; + switch(int_value) { + #ifdef ENABLE_M7 + case 7: gc_block.modal.coolant = COOLANT_MIST_ENABLE; break; + #endif + case 8: gc_block.modal.coolant = COOLANT_FLOOD_ENABLE; break; + case 9: gc_block.modal.coolant = COOLANT_DISABLE; break; + } + break; + default: FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); // [Unsupported M command] + } + + // Check for more than one command per modal group violations in the current block + // NOTE: Variable 'word_bit' is always assigned, if the command is valid. + if ( bit_istrue(command_words,bit(word_bit)) ) { FAIL(STATUS_GCODE_MODAL_GROUP_VIOLATION); } + command_words |= bit(word_bit); + break; + case 'P': + if (mantissa > 0) { FAIL(STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER); } // [No Mxx.x commands] + rtn = uarm_execute_p_cmd( int_value, line+char_counter, &char_counter ); + if( (rtn != UARM_CMD_NOTFIND) && (rtn != UARM_SYS_ABORT) ){ return rtn; } + + if ( bit_istrue(command_words,bit(word_bit)) ) { FAIL(STATUS_GCODE_MODAL_GROUP_VIOLATION); } + command_words |= bit(word_bit); + break; + case 'S': + if (mantissa > 0) { FAIL(STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER); } // [No Mxx.x commands] + rtn = uarm_execute_s_cmd( int_value, line+char_counter, &char_counter ); + if( (rtn != UARM_CMD_NOTFIND) && (rtn != UARM_SYS_ABORT) ){ return rtn; } + + if ( bit_istrue(command_words,bit(word_bit)) ) { FAIL(STATUS_GCODE_MODAL_GROUP_VIOLATION); } + command_words |= bit(word_bit); + // NOTE: All remaining letters assign values. + default: + + /* Non-Command Words: This initial parsing phase only checks for repeats of the remaining + legal g-code words and stores their value. Error-checking is performed later since some + words (I,J,K,L,P,R) have multiple connotations and/or depend on the issued commands. */ + switch(letter){ + // case 'A': // Not supported + // case 'B': // Not supported + // case 'C': // Not supported + // case 'D': // Not supported + case 'F': word_bit = WORD_F; gc_block.values.f = value; break; + // case 'H': // Not supported + case 'I': word_bit = WORD_I; gc_block.values.ijk[X_AXIS] = value; ijk_words |= (1< MAX_LINE_NUMBER) { FAIL(STATUS_GCODE_INVALID_LINE_NUMBER); } // [Exceeds max line number] + } + // bit_false(value_words,bit(WORD_N)); // NOTE: Single-meaning value word. Set at end of error-checking. + + // Track for unused words at the end of error-checking. + // NOTE: Single-meaning value words are removed all at once at the end of error-checking, because + // they are always used when present. This was done to save a few bytes of flash. For clarity, the + // single-meaning value words may be removed as they are used. Also, axis words are treated in the + // same way. If there is an explicit/implicit axis command, XYZ words are always used and are + // are removed at the end of error-checking. + + // [1. Comments ]: MSG's NOT SUPPORTED. Comment handling performed by protocol. + + // [2. Set feed rate mode ]: G93 F word missing with G1,G2/3 active, implicitly or explicitly. Feed rate + // is not defined after switching to G94 from G93. + if (gc_block.modal.feed_rate == FEED_RATE_MODE_INVERSE_TIME) { // = G93 + // NOTE: G38 can also operate in inverse time, but is undefined as an error. Missing F word check added here. + if (axis_command == AXIS_COMMAND_MOTION_MODE) { + if ((gc_block.modal.motion != MOTION_MODE_NONE) || (gc_block.modal.motion != MOTION_MODE_SEEK)) { + if (bit_isfalse(value_words,bit(WORD_F))) { FAIL(STATUS_GCODE_UNDEFINED_FEED_RATE); } // [F word missing] + } + } + // NOTE: It seems redundant to check for an F word to be passed after switching from G94 to G93. We would + // accomplish the exact same thing if the feed rate value is always reset to zero and undefined after each + // inverse time block, since the commands that use this value already perform undefined checks. This would + // also allow other commands, following this switch, to execute and not error out needlessly. This code is + // combined with the above feed rate mode and the below set feed rate error-checking. + + // [3. Set feed rate ]: F is negative (done.) + // - In inverse time mode: Always implicitly zero the feed rate value before and after block completion. + // NOTE: If in G93 mode or switched into it from G94, just keep F value as initialized zero or passed F word + // value in the block. If no F word is passed with a motion command that requires a feed rate, this will error + // out in the motion modes error-checking. However, if no F word is passed with NO motion command that requires + // a feed rate, we simply move on and the state feed rate value gets updated to zero and remains undefined. + } else { // = G94 + // - In units per mm mode: If F word passed, ensure value is in mm/min, otherwise push last state value. + if (gc_state.modal.feed_rate == FEED_RATE_MODE_UNITS_PER_MIN) { // Last state is also G94 + if (bit_istrue(value_words,bit(WORD_F))) { + if (gc_block.modal.units == UNITS_MODE_INCHES) { gc_block.values.f *= MM_PER_INCH; } + } else { + gc_block.values.f = gc_state.feed_rate; // Push last state feed rate + } + } // Else, switching to G94 from G93, so don't push last state feed rate. Its undefined or the passed F word value. + } + // bit_false(value_words,bit(WORD_F)); // NOTE: Single-meaning value word. Set at end of error-checking. + + // [4. Set spindle speed ]: S is negative (done.) + if (bit_isfalse(value_words,bit(WORD_S))) { gc_block.values.s = gc_state.spindle_speed; } + // bit_false(value_words,bit(WORD_S)); // NOTE: Single-meaning value word. Set at end of error-checking. + + // [5. Select tool ]: NOT SUPPORTED. Only tracks value. T is negative (done.) Not an integer. Greater than max tool value. + // bit_false(value_words,bit(WORD_T)); // NOTE: Single-meaning value word. Set at end of error-checking. + + // [6. Change tool ]: N/A + // [7. Spindle control ]: N/A + // [8. Coolant control ]: N/A + // [9. Enable/disable feed rate or spindle overrides ]: NOT SUPPORTED. + + // [10. Dwell ]: P value missing. P is negative (done.) NOTE: See below. + if (gc_block.non_modal_command == NON_MODAL_DWELL) { + if (bit_isfalse(value_words,bit(WORD_P))) { FAIL(STATUS_GCODE_VALUE_WORD_MISSING); } // [P word missing] + bit_false(value_words,bit(WORD_P)); + } + + // [11. Set active plane ]: N/A + switch (gc_block.modal.plane_select) { + case PLANE_SELECT_XY: + axis_0 = X_AXIS; + axis_1 = Y_AXIS; + axis_linear = Z_AXIS; + break; + case PLANE_SELECT_ZX: + axis_0 = Z_AXIS; + axis_1 = X_AXIS; + axis_linear = Y_AXIS; + break; + default: // case PLANE_SELECT_YZ: + axis_0 = Y_AXIS; + axis_1 = Z_AXIS; + axis_linear = X_AXIS; + } + + // [12. Set length units ]: N/A + // Pre-convert XYZ coordinate values to millimeters, if applicable. + uint8_t idx; + if (gc_block.modal.units == UNITS_MODE_INCHES) { + for (idx=0; idx N_COORDINATE_SYSTEM) { FAIL(STATUS_GCODE_UNSUPPORTED_COORD_SYS); } // [Greater than N sys] + if (gc_state.modal.coord_select != gc_block.modal.coord_select) { + if (!(settings_read_coord_data(gc_block.modal.coord_select,coordinate_data))) { FAIL(STATUS_SETTING_READ_FAIL); } + } + } + + // [16. Set path control mode ]: N/A. Only G61. G61.1 and G64 NOT SUPPORTED. + // [17. Set distance mode ]: N/A. Only G91.1. G90.1 NOT SUPPORTED. + // [18. Set retract mode ]: NOT SUPPORTED. + + // [19. Remaining non-modal actions ]: Check go to predefined position, set G10, or set axis offsets. + // NOTE: We need to separate the non-modal commands that are axis word-using (G10/G28/G30/G92), as these + // commands all treat axis words differently. G10 as absolute offsets or computes current position as + // the axis value, G92 similarly to G10 L20, and G28/30 as an intermediate target position that observes + // all the current coordinate system and G92 offsets. + switch (gc_block.non_modal_command) { + case NON_MODAL_SET_COORDINATE_DATA: + // [G10 Errors]: L missing and is not 2 or 20. P word missing. (Negative P value done.) + // [G10 L2 Errors]: R word NOT SUPPORTED. P value not 0 to nCoordSys(max 9). Axis words missing. + // [G10 L20 Errors]: P must be 0 to nCoordSys(max 9). Axis words missing. + if (!axis_words) { FAIL(STATUS_GCODE_NO_AXIS_WORDS) }; // [No axis words] + if (bit_isfalse(value_words,((1< N_COORDINATE_SYSTEM) { FAIL(STATUS_GCODE_UNSUPPORTED_COORD_SYS); } // [Greater than N sys] + if (gc_block.values.l != 20) { + if (gc_block.values.l == 2) { + if (bit_istrue(value_words,bit(WORD_R))) { FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); } // [G10 L2 R not supported] + } else { FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND); } // [Unsupported L] + } + bit_false(value_words,(bit(WORD_L)|bit(WORD_P))); + + // Determine coordinate system to change and try to load from EEPROM. + if (coord_select > 0) { coord_select--; } // Adjust P1-P6 index to EEPROM coordinate data indexing. + else { coord_select = gc_block.modal.coord_select; } // Index P0 as the active coordinate system + if (!settings_read_coord_data(coord_select,parameter_data)) { FAIL(STATUS_SETTING_READ_FAIL); } // [EEPROM read fail] + + // Pre-calculate the coordinate data changes. NOTE: Uses parameter_data since coordinate_data may be in use by G54-59. + for (idx=0; idx C -----------------+--------------- T <- [x,y] + | <------ d/2 ---->| + + C - Current position + T - Target position + O - center of circle that pass through both C and T + d - distance from C to T + r - designated radius + h - distance from center of CT to O + + Expanding the equations: + + d -> sqrt(x^2 + y^2) + h -> sqrt(4 * r^2 - x^2 - y^2)/2 + i -> (x - (y * sqrt(4 * r^2 - x^2 - y^2)) / sqrt(x^2 + y^2)) / 2 + j -> (y + (x * sqrt(4 * r^2 - x^2 - y^2)) / sqrt(x^2 + y^2)) / 2 + + Which can be written: + + i -> (x - (y * sqrt(4 * r^2 - x^2 - y^2))/sqrt(x^2 + y^2))/2 + j -> (y + (x * sqrt(4 * r^2 - x^2 - y^2))/sqrt(x^2 + y^2))/2 + + Which we for size and speed reasons optimize to: + + h_x2_div_d = sqrt(4 * r^2 - x^2 - y^2)/sqrt(x^2 + y^2) + i = (x - (y * h_x2_div_d))/2 + j = (y + (x * h_x2_div_d))/2 + */ + + // First, use h_x2_div_d to compute 4*h^2 to check if it is negative or r is smaller + // than d. If so, the sqrt of a negative number is complex and error out. + float h_x2_div_d = 4.0 * gc_block.values.r*gc_block.values.r - x*x - y*y; + + if (h_x2_div_d < 0) { FAIL(STATUS_GCODE_ARC_RADIUS_ERROR); } // [Arc radius error] + + // Finish computing h_x2_div_d. + h_x2_div_d = -sqrt(h_x2_div_d)/hypot_f(x,y); // == -(h * 2 / d) + // Invert the sign of h_x2_div_d if the circle is counter clockwise (see sketch below) + if (gc_block.modal.motion == MOTION_MODE_CCW_ARC) { h_x2_div_d = -h_x2_div_d; } + + /* The counter clockwise circle lies to the left of the target direction. When offset is positive, + the left hand circle will be generated - when it is negative the right hand circle is generated. + + T <-- Target position + + ^ + Clockwise circles with this center | Clockwise circles with this center will have + will have > 180 deg of angular travel | < 180 deg of angular travel, which is a good thing! + \ | / + center of arc when h_x2_div_d is positive -> x <----- | -----> x <- center of arc when h_x2_div_d is negative + | + | + + C <-- Current position + */ + // Negative R is g-code-alese for "I want a circle with more than 180 degrees of travel" (go figure!), + // even though it is advised against ever generating such circles in a single line of g-code. By + // inverting the sign of h_x2_div_d the center of the circles is placed on the opposite side of the line of + // travel and thus we get the unadvisably long arcs as prescribed. + if (gc_block.values.r < 0) { + h_x2_div_d = -h_x2_div_d; + gc_block.values.r = -gc_block.values.r; // Finished with r. Set to positive for mc_arc + } + // Complete the operation by calculating the actual center of the arc + gc_block.values.ijk[axis_0] = 0.5*(x-(y*h_x2_div_d)); + gc_block.values.ijk[axis_1] = 0.5*(y+(x*h_x2_div_d)); + + } else { // Arc Center Format Offset Mode + if (!(ijk_words & (bit(axis_0)|bit(axis_1)))) { FAIL(STATUS_GCODE_NO_OFFSETS_IN_PLANE); } // [No offsets in plane] + bit_false(value_words,(bit(WORD_I)|bit(WORD_J)|bit(WORD_K))); + + // Convert IJK values to proper units. + if (gc_block.modal.units == UNITS_MODE_INCHES) { + for (idx=0; idx 0.005) { + if (delta_r > 0.5) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Arc definition error] > 0.5mm + if (delta_r > (0.001*gc_block.values.r)) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Arc definition error] > 0.005mm AND 0.1% radius + } + } + break; + case MOTION_MODE_PROBE_TOWARD: case MOTION_MODE_PROBE_TOWARD_NO_ERROR: + case MOTION_MODE_PROBE_AWAY: case MOTION_MODE_PROBE_AWAY_NO_ERROR: + // [G38 Errors]: Target is same current. No axis words. Cutter compensation is enabled. Feed rate + // is undefined. Probe is triggered. NOTE: Probe check moved to probe cycle. Instead of returning + // an error, it issues an alarm to prevent further motion to the probe. It's also done there to + // allow the planner buffer to empty and move off the probe trigger before another probing cycle. + if (!axis_words) { FAIL(STATUS_GCODE_NO_AXIS_WORDS); } // [No axis words] + if (gc_check_same_position(gc_state.position, gc_block.values.xyz)) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Invalid target] + break; + } + } + } + + // [21. Program flow ]: No error checks required. + + // [0. Non-specific error-checks]: Complete unused value words check, i.e. IJK used when in arc + // radius mode, or axis words that aren't used in the block. + bit_false(value_words,(bit(WORD_N)|bit(WORD_F)|bit(WORD_S)|bit(WORD_T))); // Remove single-meaning value words. + if (axis_command) { bit_false(value_words,(bit(WORD_X)|bit(WORD_Y)|bit(WORD_Z))); } // Remove axis words. + if (value_words) { FAIL(STATUS_GCODE_UNUSED_WORDS); } // [Unused words] + + + /* ------------------------------------------------------------------------------------- + STEP 4: EXECUTE!! + Assumes that all error-checking has been completed and no failure modes exist. We just + need to update the state and execute the block according to the order-of-execution. + */ + + // [0. Non-specific/common error-checks and miscellaneous setup]: + gc_state.line_number = gc_block.values.n; + + // [1. Comments feedback ]: NOT SUPPORTED + + // [2. Set feed rate mode ]: + gc_state.modal.feed_rate = gc_block.modal.feed_rate; + + // [3. Set feed rate ]: + gc_state.feed_rate = gc_block.values.f; // Always copy this value. See feed rate error-checking. + + // [4. Set spindle speed ]: + if (gc_state.spindle_speed != gc_block.values.s) { + // Update running spindle only if not in check mode and not already enabled. + if (gc_state.modal.spindle != SPINDLE_DISABLE) { spindle_run(gc_state.modal.spindle, gc_block.values.s); } + gc_state.spindle_speed = gc_block.values.s; + } + + // [5. Select tool ]: NOT SUPPORTED. Only tracks tool value. + gc_state.tool = gc_block.values.t; + + // [6. Change tool ]: NOT SUPPORTED + + // [7. Spindle control ]: + if (gc_state.modal.spindle != gc_block.modal.spindle) { + // Update spindle control and apply spindle speed when enabling it in this block. + spindle_run(gc_block.modal.spindle, gc_state.spindle_speed); + gc_state.modal.spindle = gc_block.modal.spindle; + } + + // [8. Coolant control ]: + if (gc_state.modal.coolant != gc_block.modal.coolant) { + coolant_run(gc_block.modal.coolant); + gc_state.modal.coolant = gc_block.modal.coolant; + } + + // [9. Enable/disable feed rate or spindle overrides ]: NOT SUPPORTED + + // [10. Dwell ]: + if (gc_block.non_modal_command == NON_MODAL_DWELL) { mc_dwell(gc_block.values.p); } + + // [11. Set active plane ]: + gc_state.modal.plane_select = gc_block.modal.plane_select; + + // [12. Set length units ]: + gc_state.modal.units = gc_block.modal.units; + + // [13. Cutter radius compensation ]: G41/42 NOT SUPPORTED + // gc_state.modal.cutter_comp = gc_block.modal.cutter_comp; // NOTE: Not needed since always disabled. + + // [14. Cutter length compensation ]: G43.1 and G49 supported. G43 NOT SUPPORTED. + // NOTE: If G43 were supported, its operation wouldn't be any different from G43.1 in terms + // of execution. The error-checking step would simply load the offset value into the correct + // axis of the block XYZ value array. + if (axis_command == AXIS_COMMAND_TOOL_LENGTH_OFFSET ) { // Indicates a change. + gc_state.modal.tool_length = gc_block.modal.tool_length; + if (gc_state.modal.tool_length == TOOL_LENGTH_OFFSET_ENABLE_DYNAMIC) { // G43.1 + gc_state.tool_length_offset = gc_block.values.xyz[TOOL_LENGTH_OFFSET_AXIS]; + } else { // G49 + gc_state.tool_length_offset = 0.0; + } + } + + // [15. Coordinate system selection ]: + if (gc_state.modal.coord_select != gc_block.modal.coord_select) { + gc_state.modal.coord_select = gc_block.modal.coord_select; + memcpy(gc_state.coord_system,coordinate_data,sizeof(coordinate_data)); + } + + // [16. Set path control mode ]: G61.1/G64 NOT SUPPORTED + // gc_state.modal.control = gc_block.modal.control; // NOTE: Always default. + + // [17. Set distance mode ]: + gc_state.modal.distance = gc_block.modal.distance; + + // [18. Set retract mode ]: NOT SUPPORTED + + // [19. Go to predefined position, Set G10, or Set axis offsets ]: + + uint8_t rtn_res = (uint8_t)STATUS_OK; + switch(gc_block.non_modal_command) { + case NON_MODAL_SET_COORDINATE_DATA: + settings_write_coord_data(coord_select,parameter_data); + // Update system coordinate system if currently active. + if (gc_state.modal.coord_select == coord_select) { memcpy(gc_state.coord_system,parameter_data,sizeof(parameter_data)); } + break; + case NON_MODAL_GO_HOME_0: case NON_MODAL_GO_HOME_1: + // Move to intermediate position before going home. Obeys current coordinate system and offsets + // and absolute and incremental modes. + if (axis_command) { + #ifdef USE_LINE_NUMBERS + rtn_res = (uint8_t)mc_line(MOTION_MODE_LINEAR, gc_block.values.xyz, gc_state.feed_rate, false, gc_state.line_number); + #else + rtn_res= (uint8_t)mc_line(MOTION_MODE_LINEAR, gc_block.values.xyz, gc_state.feed_rate, false); + #endif + } + #ifdef USE_LINE_NUMBERS + rtn_res = (uint8_t)mc_line(MOTION_MODE_LINEAR, parameter_data, gc_state.feed_rate, false, gc_state.line_number); + #else + rtn_res = (uint8_t)mc_line(MOTION_MODE_LINEAR, parameter_data, gc_state.feed_rate, false); + #endif + memcpy(gc_state.position, parameter_data, sizeof(parameter_data)); + break; + case NON_MODAL_SET_HOME_0: + settings_write_coord_data(SETTING_INDEX_G28,gc_state.position); + break; + case NON_MODAL_SET_HOME_1: + settings_write_coord_data(SETTING_INDEX_G30,gc_state.position); + break; + case NON_MODAL_SET_COORDINATE_OFFSET: + memcpy(gc_state.coord_offset,gc_block.values.xyz,sizeof(gc_block.values.xyz)); + break; + case NON_MODAL_RESET_COORDINATE_OFFSET: + clear_vector(gc_state.coord_offset); // Disable G92 offsets by zeroing offset vector. + break; + } + + + // [20. Motion modes ]: + // NOTE: Commands G10,G28,G30,G92 lock out and prevent axis words from use in motion modes. + // Enter motion modes only if there are axis words or a motion mode command word in the block. + gc_state.modal.motion = gc_block.modal.motion; + if (gc_state.modal.motion != MOTION_MODE_NONE) { + if (axis_command == AXIS_COMMAND_MOTION_MODE) { + switch (gc_state.modal.motion) { + case MOTION_MODE_SEEK:; + #ifdef USE_LINE_NUMBERS + rtn_res = (uint8_t)mc_line(MOTION_MODE_SEEK, gc_block.values.xyz, gc_state.feed_rate, false, gc_state.line_number); + #else + rtn_res = (uint8_t)mc_line(MOTION_MODE_SEEK, gc_block.values.xyz, gc_state.feed_rate, false); + #endif + break; + case MOTION_MODE_LINEAR: + #ifdef USE_LINE_NUMBERS + rtn_res = (uint8_t)mc_line(MOTION_MODE_LINEAR, gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, gc_state.line_number); + #else + rtn_res = (uint8_t)mc_line(MOTION_MODE_LINEAR,gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate); + #endif + break; + case MOTION_MODE_CW_ARC: + #ifdef USE_LINE_NUMBERS + mc_arc(gc_state.position, gc_block.values.xyz, gc_block.values.ijk, gc_block.values.r, + gc_state.feed_rate, gc_state.modal.feed_rate, axis_0, axis_1, axis_linear, true, gc_state.line_number); + #else + mc_arc(gc_state.position, gc_block.values.xyz, gc_block.values.ijk, gc_block.values.r, + gc_state.feed_rate, gc_state.modal.feed_rate, axis_0, axis_1, axis_linear, true); + #endif + break; + case MOTION_MODE_CCW_ARC: + #ifdef USE_LINE_NUMBERS + mc_arc(gc_state.position, gc_block.values.xyz, gc_block.values.ijk, gc_block.values.r, + gc_state.feed_rate, gc_state.modal.feed_rate, axis_0, axis_1, axis_linear, false, gc_state.line_number); + #else + mc_arc(gc_state.position, gc_block.values.xyz, gc_block.values.ijk, gc_block.values.r, + gc_state.feed_rate, gc_state.modal.feed_rate, axis_0, axis_1, axis_linear, false); + #endif + break; + case MOTION_MODE_PROBE_TOWARD: + // NOTE: gc_block.values.xyz is returned from mc_probe_cycle with the updated position value. So + // upon a successful probing cycle, the machine position and the returned value should be the same. + #ifdef USE_LINE_NUMBERS + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, false, false, gc_state.line_number); + #else + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, false, false); + #endif + break; + case MOTION_MODE_PROBE_TOWARD_NO_ERROR: + #ifdef USE_LINE_NUMBERS + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, false, true, gc_state.line_number); + #else + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, false, true); + #endif + break; + case MOTION_MODE_PROBE_AWAY: + #ifdef USE_LINE_NUMBERS + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, true, false, gc_state.line_number); + #else + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, true, false); + #endif + break; + case MOTION_MODE_PROBE_AWAY_NO_ERROR: + #ifdef USE_LINE_NUMBERS + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, true, true, gc_state.line_number); + #else + mc_probe_cycle(gc_block.values.xyz, gc_state.feed_rate, gc_state.modal.feed_rate, true, true); + #endif + } + + // As far as the parser is concerned, the position is now == target. In reality the + // motion control system might still be processing the action and the real tool position + // in any intermediate location. + memcpy(gc_state.position, gc_block.values.xyz, sizeof(gc_block.values.xyz)); // gc_state.position[] = gc_block.values.xyz[] + } + } + + // [21. Program flow ]: + // M0,M1,M2,M30: Perform non-running program flow actions. During a program pause, the buffer may + // refill and can only be resumed by the cycle start run-time command. + gc_state.modal.program_flow = gc_block.modal.program_flow; + if (gc_state.modal.program_flow) { + protocol_buffer_synchronize(); // Sync and finish all remaining buffered motions before moving on. + if (gc_state.modal.program_flow == PROGRAM_FLOW_PAUSED) { + if (sys.state != STATE_CHECK_MODE) { + bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); // Use feed hold for program pause. + protocol_execute_realtime(); // Execute suspend. + } + } else { // == PROGRAM_FLOW_COMPLETED + // Upon program complete, only a subset of g-codes reset to certain defaults, according to + // LinuxCNC's program end descriptions and testing. Only modal groups [G-code 1,2,3,5,7,12] + // and [M-code 7,8,9] reset to [G1,G17,G90,G94,G40,G54,M5,M9,M48]. The remaining modal groups + // [G-code 4,6,8,10,13,14,15] and [M-code 4,5,6] and the modal words [F,S,T,H] do not reset. + gc_state.modal.motion = MOTION_MODE_LINEAR; + gc_state.modal.plane_select = PLANE_SELECT_XY; + gc_state.modal.distance = DISTANCE_MODE_ABSOLUTE; + gc_state.modal.feed_rate = FEED_RATE_MODE_UNITS_PER_MIN; + // gc_state.modal.cutter_comp = CUTTER_COMP_DISABLE; // Not supported. + gc_state.modal.coord_select = 0; // G54 + gc_state.modal.spindle = SPINDLE_DISABLE; + gc_state.modal.coolant = COOLANT_DISABLE; + // gc_state.modal.override = OVERRIDE_DISABLE; // Not supported. + + // Execute coordinate change and spindle/coolant stop. + if (sys.state != STATE_CHECK_MODE) { + if (!(settings_read_coord_data(gc_state.modal.coord_select,coordinate_data))) { FAIL(STATUS_SETTING_READ_FAIL); } + memcpy(gc_state.coord_system,coordinate_data,sizeof(coordinate_data)); + spindle_stop(); + coolant_stop(); + } + + report_feedback_message(MESSAGE_PROGRAM_END); + } + gc_state.modal.program_flow = PROGRAM_FLOW_RUNNING; // Reset program flow. + } + + // TODO: % to denote start of program. + return (rtn_res); +} + + +/* + Not supported: + + - Canned cycles + - Tool radius compensation + - A,B,C-axes + - Evaluation of expressions + - Variables + - Override control (TBD) + - Tool changes + - Switches + + (*) Indicates optional parameter, enabled through config.h and re-compile + group 0 = {G92.2, G92.3} (Non modal: Cancel and re-enable G92 offsets) + group 1 = {G81 - G89} (Motion modes: Canned cycles) + group 4 = {M1} (Optional stop, ignored) + group 6 = {M6} (Tool change) + group 7 = {G41, G42} cutter radius compensation (G40 is supported) + group 8 = {G43} tool length offset (G43.1/G49 are supported) + group 8 = {*M7} enable mist coolant (* Compile-option) + group 9 = {M48, M49} enable/disable feed and speed override switches + group 10 = {G98, G99} return mode canned cycles + group 13 = {G61.1, G64} path control mode (G61 is supported) +*/ diff --git a/src/gcode.h b/src/gcode.h new file mode 100755 index 0000000..9a289af --- /dev/null +++ b/src/gcode.h @@ -0,0 +1,212 @@ +/* + gcode.h - rs274/ngc parser. + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef gcode_h +#define gcode_h + + +// Define modal group internal numbers for checking multiple command violations and tracking the +// type of command that is called in the block. A modal group is a group of g-code commands that are +// mutually exclusive, or cannot exist on the same line, because they each toggle a state or execute +// a unique motion. These are defined in the NIST RS274-NGC v3 g-code standard, available online, +// and are similar/identical to other g-code interpreters by manufacturers (Haas,Fanuc,Mazak,etc). +// NOTE: Modal group define values must be sequential and starting from zero. +#define MODAL_GROUP_G0 0 // [G4,G10,G28,G28.1,G30,G30.1,G53,G92,G92.1] Non-modal +#define MODAL_GROUP_G1 1 // [G0,G1,G2,G3,G38.2,G38.3,G38.4,G38.5,G80] Motion +#define MODAL_GROUP_G2 2 // [G17,G18,G19] Plane selection +#define MODAL_GROUP_G3 3 // [G90,G91] Distance mode +#define MODAL_GROUP_G4 4 // [G91.1] Arc IJK distance mode +#define MODAL_GROUP_G5 5 // [G93,G94] Feed rate mode +#define MODAL_GROUP_G6 6 // [G20,G21] Units +#define MODAL_GROUP_G7 7 // [G40] Cutter radius compensation mode. G41/42 NOT SUPPORTED. +#define MODAL_GROUP_G8 8 // [G43.1,G49] Tool length offset +#define MODAL_GROUP_G12 9 // [G54,G55,G56,G57,G58,G59] Coordinate system selection +#define MODAL_GROUP_G13 10 // [G61] Control mode + +#define MODAL_GROUP_M4 11 // [M0,M1,M2,M30] Stopping +#define MODAL_GROUP_M7 12 // [M3,M4,M5] Spindle turning +#define MODAL_GROUP_M8 13 // [M7,M8,M9] Coolant control + +// #define OTHER_INPUT_F 14 +// #define OTHER_INPUT_S 15 +// #define OTHER_INPUT_T 16 + +// Define command actions for within execution-type modal groups (motion, stopping, non-modal). Used +// internally by the parser to know which command to execute. + +// Modal Group G0: Non-modal actions +#define NON_MODAL_NO_ACTION 0 // (Default: Must be zero) +#define NON_MODAL_DWELL 1 // G4 +#define NON_MODAL_SET_COORDINATE_DATA 2 // G10 +#define NON_MODAL_GO_HOME_0 3 // G28 +#define NON_MODAL_SET_HOME_0 4 // G28.1 +#define NON_MODAL_GO_HOME_1 5 // G30 +#define NON_MODAL_SET_HOME_1 6 // G30.1 +#define NON_MODAL_ABSOLUTE_OVERRIDE 7 // G53 +#define NON_MODAL_SET_COORDINATE_OFFSET 8 // G92 +#define NON_MODAL_RESET_COORDINATE_OFFSET 9 //G92.1 + +// Modal Group G1: Motion modes +#define MOTION_MODE_SEEK 0 // G0 (Default: Must be zero) +#define MOTION_MODE_LINEAR 1 // G1 +#define MOTION_MODE_CW_ARC 2 // G2 +#define MOTION_MODE_CCW_ARC 3 // G3 +#define MOTION_MODE_PROBE_TOWARD 4 // G38.2 NOTE: G38.2, G38.3, G38.4, G38.5 must be sequential. See report_gcode_modes(). +#define MOTION_MODE_PROBE_TOWARD_NO_ERROR 5 // G38.3 +#define MOTION_MODE_PROBE_AWAY 6 // G38.4 +#define MOTION_MODE_PROBE_AWAY_NO_ERROR 7 // G38.5 +#define MOTION_MODE_NONE 8 // G80 + +// Modal Group G2: Plane select +#define PLANE_SELECT_XY 0 // G17 (Default: Must be zero) +#define PLANE_SELECT_ZX 1 // G18 +#define PLANE_SELECT_YZ 2 // G19 + +// Modal Group G3: Distance mode +#define DISTANCE_MODE_ABSOLUTE 0 // G90 (Default: Must be zero) +#define DISTANCE_MODE_INCREMENTAL 1 // G91 + +// Modal Group G4: Arc IJK distance mode +#define DISTANCE_ARC_MODE_INCREMENTAL 0 // G91.1 (Default: Must be zero) + +// Modal Group M4: Program flow +#define PROGRAM_FLOW_RUNNING 0 // (Default: Must be zero) +#define PROGRAM_FLOW_PAUSED 1 // M0, M1 +#define PROGRAM_FLOW_COMPLETED 2 // M2, M30 + +// Modal Group G5: Feed rate mode +#define FEED_RATE_MODE_UNITS_PER_MIN 0 // G94 (Default: Must be zero) +#define FEED_RATE_MODE_INVERSE_TIME 1 // G93 + +// Modal Group G6: Units mode +#define UNITS_MODE_MM 0 // G21 (Default: Must be zero) +#define UNITS_MODE_INCHES 1 // G20 + +// Modal Group G7: Cutter radius compensation mode +#define CUTTER_COMP_DISABLE 0 // G40 (Default: Must be zero) + +// Modal Group G13: Control mode +#define CONTROL_MODE_EXACT_PATH 0 // G61 (Default: Must be zero) + +// Modal Group M7: Spindle control +#define SPINDLE_DISABLE 0 // M5 (Default: Must be zero) +#define SPINDLE_ENABLE_CW 1 // M3 +#define SPINDLE_ENABLE_CCW 2 // M4 + +// Modal Group M8: Coolant control +#define COOLANT_DISABLE 0 // M9 (Default: Must be zero) +#define COOLANT_MIST_ENABLE 1 // M7 +#define COOLANT_FLOOD_ENABLE 2 // M8 + +// Modal Group G8: Tool length offset +#define TOOL_LENGTH_OFFSET_CANCEL 0 // G49 (Default: Must be zero) +#define TOOL_LENGTH_OFFSET_ENABLE_DYNAMIC 1 // G43.1 + +// Modal Group G12: Active work coordinate system +// N/A: Stores coordinate system value (54-59) to change to. + + +// Define parameter word mapping. +#define WORD_F 0 +#define WORD_I 1 +#define WORD_J 2 +#define WORD_K 3 +#define WORD_L 4 +#define WORD_N 5 +#define WORD_P 6 +#define WORD_R 7 +#define WORD_S 8 +#define WORD_T 9 +#define WORD_X 10 +#define WORD_Y 11 +#define WORD_Z 12 + + +// NOTE: When this struct is zeroed, the above defines set the defaults for the system. +typedef struct { + uint8_t motion; // {G0,G1,G2,G3,G38.2,G80} + uint8_t feed_rate; // {G93,G94} + uint8_t units; // {G20,G21} + uint8_t distance; // {G90,G91} + // uint8_t distance_arc; // {G91.1} NOTE: Don't track. Only default supported. + uint8_t plane_select; // {G17,G18,G19} + // uint8_t cutter_comp; // {G40} NOTE: Don't track. Only default supported. + uint8_t tool_length; // {G43.1,G49} + uint8_t coord_select; // {G54,G55,G56,G57,G58,G59} + // uint8_t control; // {G61} NOTE: Don't track. Only default supported. + uint8_t program_flow; // {M0,M1,M2,M30} + uint8_t coolant; // {M7,M8,M9} + uint8_t spindle; // {M3,M4,M5} +} gc_modal_t; + +typedef struct { + float f; // Feed + float ijk[3]; // I,J,K Axis arc offsets + uint8_t l; // G10 or canned cycles parameters + int32_t n; // Line number + float p; // G10 or dwell parameters + // float q; // G82 peck drilling + float r; // Arc radius + float s; // Spindle speed + uint8_t t; // Tool selection + float xyz[3]; // X,Y,Z Translational axes +} gc_values_t; + + +typedef struct { + gc_modal_t modal; + + float spindle_speed; // RPM + float feed_rate; // Millimeters/min + uint8_t tool; // Tracks tool number. NOT USED. + int32_t line_number; // Last line number sent + + float position[N_AXIS]; // Where the interpreter considers the tool to be at this point in the code + + float coord_system[N_AXIS]; // Current work coordinate system (G54+). Stores offset from absolute machine + // position in mm. Loaded from EEPROM when called. + float coord_offset[N_AXIS]; // Retains the G92 coordinate offset (work coordinates) relative to + // machine zero in mm. Non-persistent. Cleared upon reset and boot. + float tool_length_offset; // Tracks tool length offset value when enabled. +} parser_state_t; +extern parser_state_t gc_state; + +typedef struct { +// uint16_t command_words; // NOTE: If this bitflag variable fills, G and M words can be separated. +// uint16_t value_words; + + uint8_t non_modal_command; + gc_modal_t modal; + gc_values_t values; + +} parser_block_t; +extern parser_block_t gc_block; + +// Initialize the parser +void gc_init(); + +// Execute one block of rs275/ngc/g-code +uint8_t gc_execute_line(char *line); + +// Set g-code parser position. Input in steps. +void gc_sync_position(); + +#endif diff --git a/src/grbl.h b/src/grbl.h new file mode 100755 index 0000000..300f172 --- /dev/null +++ b/src/grbl.h @@ -0,0 +1,62 @@ +/* + grbl.h - main Grbl include file + Part of Grbl + + Copyright (c) 2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef grbl_h +#define grbl_h + +// Grbl versioning system +#define GRBL_VERSION "0.9j" +#define GRBL_VERSION_BUILD "20160726" + +// Define standard libraries used by Grbl. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Define the Grbl system include files. NOTE: Do not alter organization. +#include "config.h" +#include "nuts_bolts.h" +#include "settings.h" +#include "system.h" +#include "defaults.h" +#include "cpu_map.h" +#include "coolant_control.h" +#include "eeprom.h" +#include "gcode.h" +#include "limits.h" +#include "motion_control.h" +#include "planner.h" +#include "print.h" +#include "probe.h" +#include "protocol.h" +#include "report.h" +#include "serial.h" +#include "spindle_control.h" +#include "stepper.h" + +#endif diff --git a/src/grblUpload/grblUpload.ino b/src/grblUpload/grblUpload.ino new file mode 100755 index 0000000..8ac87a7 --- /dev/null +++ b/src/grblUpload/grblUpload.ino @@ -0,0 +1,29 @@ +/*********************************************************************** +This sketch compiles and uploads Grbl to your 328p-based Arduino! + +To use: +- First make sure you have imported Grbl source code into your Arduino + IDE. There are details on our Github website on how to do this. + +- Select your Arduino Board and Serial Port in the Tools drop-down menu. + NOTE: Grbl only officially supports 328p-based Arduinos, like the Uno. + Using other boards will likely not work! + +- Then just click 'Upload'. That's it! + +For advanced users: + If you'd like to see what else Grbl can do, there are some additional + options for customization and features you can enable or disable. + Navigate your file system to where the Arduino IDE has stored the Grbl + source code files, open the 'config.h' file in your favorite text + editor. Inside are dozens of feature descriptions and #defines. Simply + comment or uncomment the #defines or alter their assigned values, save + your changes, and then click 'Upload' here. + +Copyright (c) 2015 Sungeun K. Jeon +Released under the MIT-license. See license.txt for details. +***********************************************************************/ + +#include "grbl.h" + +// Do not alter this file! \ No newline at end of file diff --git a/src/limits.c b/src/limits.c new file mode 100755 index 0000000..7c3680a --- /dev/null +++ b/src/limits.c @@ -0,0 +1,370 @@ +/* + limits.c - code pertaining to limit-switches and performing the homing cycle + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +// Homing axis search distance multiplier. Computed by this value times the cycle travel. +#ifndef HOMING_AXIS_SEARCH_SCALAR + #define HOMING_AXIS_SEARCH_SCALAR 1.5 // Must be > 1 to ensure limit switch will be engaged. +#endif +#ifndef HOMING_AXIS_LOCATE_SCALAR + #define HOMING_AXIS_LOCATE_SCALAR 5.0 // Must be > 1 to ensure limit switch is cleared. +#endif + +void limits_init() +{ + LIMIT_DDR &= ~(LIMIT_MASK); // Set as input pins + + #ifdef DISABLE_LIMIT_PIN_PULL_UP + LIMIT_PORT &= ~(LIMIT_MASK); // Normal low operation. Requires external pull-down. + #else + LIMIT_PORT |= (LIMIT_MASK); // Enable internal pull-up resistors. Normal high operation. + #endif + + if (bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)) { + LIMIT_PCMSK |= LIMIT_MASK; // Enable specific pins of the Pin Change Interrupt + PCICR |= (1 << LIMIT_INT); // Enable Pin Change Interrupt + } else { + limits_disable(); + } + + #ifdef ENABLE_SOFTWARE_DEBOUNCE + MCUSR &= ~(1< 0); + + // The active cycle axes should now be homed and machine limits have been located. By + // default, Grbl defines machine space as all negative, as do most CNCs. Since limit switches + // can be on either side of an axes, check and set axes machine zero appropriately. Also, + // set up pull-off maneuver from axes limit switches that have been homed. This provides + // some initial clearance off the switches and should also help prevent them from falsely + // triggering when hard limits are enabled or when more than one axes shares a limit pin. + int32_t set_axis_position; + // Set machine positions for homed limit switches. Don't update non-homed axes. + for (idx=0; idx -settings.max_travel[idx]) { sys.soft_limit = true; } + } else { + if (target[idx] > 0 || target[idx] < settings.max_travel[idx]) { sys.soft_limit = true; } + } + #else + // NOTE: max_travel is stored as negative + if (target[idx] > 0 || target[idx] < settings.max_travel[idx]) { sys.soft_limit = true; } + #endif + + if (sys.soft_limit) { + // Force feed hold if cycle is active. All buffered blocks are guaranteed to be within + // workspace volume so just come to a controlled stop so position is not lost. When complete + // enter alarm mode. + if (sys.state == STATE_CYCLE) { + bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); + do { + protocol_execute_realtime(); + if (sys.abort) { return; } + } while ( sys.state != STATE_IDLE ); + } + + mc_reset(); // Issue system reset and ensure spindle and coolant are shutdown. + bit_true_atomic(sys_rt_exec_alarm, (EXEC_ALARM_SOFT_LIMIT|EXEC_CRITICAL_EVENT)); // Indicate soft limit critical event + protocol_execute_realtime(); // Execute to enter critical event loop and system abort + return; + } + } +} diff --git a/src/limits.h b/src/limits.h new file mode 100755 index 0000000..74512ce --- /dev/null +++ b/src/limits.h @@ -0,0 +1,41 @@ +/* + limits.h - code pertaining to limit-switches and performing the homing cycle + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef limits_h +#define limits_h + + +// Initialize the limits module +void limits_init(); + +// Disables hard limits. +void limits_disable(); + +// Returns limit state as a bit-wise uint8 variable. +uint8_t limits_get_state(); + +// Perform one portion of the homing cycle based on the input settings. +void limits_go_home(uint8_t cycle_mask); + +// Check for soft limit violations +void limits_soft_check(float *target); + +#endif \ No newline at end of file diff --git a/src/main.c b/src/main.c new file mode 100755 index 0000000..6dc9cc1 --- /dev/null +++ b/src/main.c @@ -0,0 +1,102 @@ +/* + main.c - An embedded CNC Controller with rs274/ngc (g-code) support + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +// Declare system global variable structure +system_t sys; + +#include "uarm_swift.h" + + +int main(void) +{ + // Initialize system upon power-up. + serial_init(); // Setup serial baud rate and interrupts + settings_init(); // Load Grbl settings from EEPROM + stepper_init(); // Configure stepper pins and interrupt timers + system_init(); // Configure pinout pins and pin-change interrupt + + uarm_swift_init(); + + memset(&sys, 0, sizeof(system_t)); // Clear all system variables + sys.abort = true; // Set abort to complete initialization + sei(); // Enable interrupts + + // Check for power-up and set system alarm if homing is enabled to force homing cycle + // by setting Grbl's alarm state. Alarm locks out all g-code commands, including the + // startup scripts, but allows access to settings and internal commands. Only a homing + // cycle '$H' or kill alarm locks '$X' will disable the alarm. + // NOTE: The startup script will run after successful completion of the homing cycle, but + // not after disabling the alarm locks. Prevents motion startup blocks from crashing into + // things uncontrollably. Very bad. + #ifdef HOMING_INIT_LOCK + if (bit_istrue(settings.flags,BITFLAG_HOMING_ENABLE)) { sys.state = STATE_ALARM; } + #endif + + // Force Grbl into an ALARM state upon a power-cycle or hard reset. + #ifdef FORCE_INITIALIZATION_ALARM + sys.state = STATE_ALARM; + #endif + + // Grbl initialization loop upon power-up or a system abort. For the latter, all processes + // will return to this loop to be cleanly re-initialized. + for(;;) { + + // TODO: Separate configure task that require interrupts to be disabled, especially upon + // a system abort and ensuring any active interrupts are cleanly reset. + + // Reset Grbl primary systems. + serial_reset_read_buffer(); // Clear serial read buffer + gc_init(); // Set g-code parser to default state + spindle_init(); + coolant_init(); + limits_init(); + probe_init(); + plan_reset(); // Clear block buffer and planner variables + st_reset(); // Clear stepper subsystem variables. + + // Sync cleared gcode and planner positions to current system position. + plan_sync_position(); + gc_sync_position(); + + // Reset system variables. + sys.abort = false; + sys_rt_exec_state = 0; + sys_rt_exec_alarm = 0; + sys.suspend = false; + sys.soft_limit = false; + sys.print_reset_flag = false; + if(uarm.reset_flag) + { + DB_PRINT_STR("ok\n"); + uarm.reset_flag=false; + } + // Start Grbl main loop. Processes program inputs and executes them. + protocol_main_loop(); + + } + return 0; /* Never reached */ +} + + + diff --git a/src/motion_control.c b/src/motion_control.c new file mode 100755 index 0000000..ed2f485 --- /dev/null +++ b/src/motion_control.c @@ -0,0 +1,473 @@ +/* + motion_control.c - high level interface for issuing motion commands + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + Copyright (c) 2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_protocol.h" +#include "uarm_swift.h" +#include "uarm_coord_convert.h" + +// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second +// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in +// (1 minute)/feed_rate time. +// NOTE: This is the primary gateway to the grbl planner. All line motions, including arc line +// segments, must pass through this routine before being passed to the planner. The seperation of +// mc_line and plan_buffer_line is done primarily to place non-planner-type functions from being +// in the planner and to let backlash compensation or canned cycle integration simple and direct. +#ifdef USE_LINE_NUMBERS + uint8_t mc_line(uint8_t mode, float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number) +#else + uint8_t mc_line(uint8_t mode, float *target, float feed_rate, uint8_t invert_feed_rate) +#endif +{ + + // If enabled, check for soft limit violations. Placed here all line motions are picked up + // from everywhere in Grbl. + if (bit_istrue(settings.flags,BITFLAG_SOFT_LIMIT_ENABLE)) { limits_soft_check(target); } + // If in check gcode mode, prevent motion by blocking planner. Soft limits still work. + if (sys.state == STATE_CHECK_MODE) { return; } + + // NOTE: Backlash compensation may be installed here. It will need direction info to track when + // to insert a backlash line motion(s) before the intended line motion and will require its own + // plan_check_full_buffer() and check for system abort loop. Also for position reporting + // backlash steps will need to be also tracked, which will need to be kept at a system level. + // There are likely some other things that will need to be tracked as well. However, we feel + // that backlash compensation should NOT be handled by Grbl itself, because there are a myriad + // of ways to implement it and can be effective or ineffective for different CNC machines. This + // would be better handled by the interface as a post-processor task, where the original g-code + // is translated and inserts backlash motions that best suits the machine. + // NOTE: Perhaps as a middle-ground, all that needs to be sent is a flag or special command that + // indicates to Grbl what is a backlash compensation motion, so that Grbl executes the move but + // doesn't update the machine position values. Since the position values used by the g-code + // parser and planner are separate from the system machine positions, this is doable. + + // If the buffer is full: good! That means we are well ahead of the robot. + // Remain in this loop until there is room in the buffer. + unsigned int divide_numbers = 0; + float current_coord[3]; + float final_angle[3]; + + float x= target[X_AXIS], y= target[Y_AXIS], z = target[Z_AXIS]; + if ((uarm.motor_state_bits&0x07)!=0x07) return UARM_ENABLE_ERROR; + coord_effect2arm( &x, &y, &z ); // calculate the arm current coord + coord_to_angle( x, y, z, + &final_angle[X_AXIS], &final_angle[Y_AXIS], &final_angle[Z_AXIS] ); // calculate final angle + +// char l_str[20], r_str[20], b_str[20]; +// dtostrf( final_angle[X_AXIS], 5, 4, l_str ); +// dtostrf( final_angle[Y_AXIS], 5, 4, r_str ); +// dtostrf( final_angle[Z_AXIS], 5, 4, b_str ); + +// DB_PRINT_STR( "final_angle: B%s L%s R%s\r\n", b_str, l_str, r_str ); +// final_angle[X_AXIS] += 0.15; +// final_angle[Y_AXIS] -= 0.15; + + if( is_angle_legal( final_angle[X_AXIS], final_angle[Y_AXIS], final_angle[Z_AXIS] ) == false ){ // check the angle + return UARM_COORD_ERROR; + } + +// angle_to_coord( final_angle[X_AXIS], final_angle[Y_AXIS], final_angle[Z_AXIS], &x, &y, &z ); +// coord_arm2effect( &x, &y, &z ); + +// target[X_AXIS] = x; +// target[Y_AXIS] = y; +// target[Z_AXIS] = z; + if(feed_rate!=0) + { + step_to_coord( uarm.target_step[X_AXIS], uarm.target_step[Y_AXIS], uarm.target_step[Z_AXIS], + ¤t_coord[X_AXIS], ¤t_coord[Y_AXIS], ¤t_coord[Z_AXIS]); // calculate the arm current coord + coord_arm2effect( ¤t_coord[X_AXIS], ¤t_coord[Y_AXIS], ¤t_coord[Z_AXIS] ); // calculate the effect current coord + settings_init(); + switch( mode ){ + case MOTION_MODE_SEEK: // 100 ){ feed_rate = 100; } + divide_numbers = sqrt((target[X_AXIS] - current_coord[X_AXIS])*(target[X_AXIS] - current_coord[X_AXIS]) + // unit is mm + (target[Y_AXIS] - current_coord[Y_AXIS])*(target[Y_AXIS] - current_coord[Y_AXIS]) + + (target[Z_AXIS] - current_coord[Z_AXIS])*(target[Z_AXIS] - current_coord[Z_AXIS])) * 30 / feed_rate; + + if( divide_numbers < 10 ){ divide_numbers = 10; } + + float accel = 0.5 + feed_rate * 4.5 / 100.0; + settings.acceleration[X_AXIS] = accel * 60 * 60; + settings.acceleration[Y_AXIS] = accel * 60 * 60; + settings.acceleration[Z_AXIS] = accel * 60 * 60; + if( settings.acceleration[Z_AXIS] >= 1.3*60*60 ){ + settings.acceleration[Z_AXIS] = 1.3 * 60 * 60; + } + + break; + } + +// DB_PRINT_STR( "divide num : %d\r\n", divide_numbers ); + + float delta_coord[3]; + delta_coord[X_AXIS] = (target[X_AXIS] - current_coord[X_AXIS]) / divide_numbers; // calculate delta coord + delta_coord[Y_AXIS] = (target[Y_AXIS] - current_coord[Y_AXIS]) / divide_numbers; + delta_coord[Z_AXIS] = (target[Z_AXIS] - current_coord[Z_AXIS]) / divide_numbers; + + float final_coord[3]; + float final_step[3]; + float angle_x, angle_y, angle_z; + for( int i = 1; i <= divide_numbers; i++ ){ + + final_coord[X_AXIS] = current_coord[X_AXIS] + delta_coord[X_AXIS] * i; // = -ARC_ANGULAR_TRAVEL_EPSILON) { angular_travel -= 2*M_PI; } + } else { + if (angular_travel <= ARC_ANGULAR_TRAVEL_EPSILON) { angular_travel += 2*M_PI; } + } + + // NOTE: Segment end points are on the arc, which can lead to the arc diameter being smaller by up to + // (2x) settings.arc_tolerance. For 99% of users, this is just fine. If a different arc segment fit + // is desired, i.e. least-squares, midpoint on arc, just change the mm_per_arc_segment calculation. + // For the intended uses of Grbl, this value shouldn't exceed 2000 for the strictest of cases. + uint16_t segments = floor(fabs(0.5*angular_travel*radius)/ + sqrt(settings.arc_tolerance*(2*radius - settings.arc_tolerance)) ); + + if (segments) { + // Multiply inverse feed_rate to compensate for the fact that this movement is approximated + // by a number of discrete segments. The inverse feed_rate should be correct for the sum of + // all segments. + if (invert_feed_rate) { feed_rate *= segments; } + + float theta_per_segment = angular_travel/segments; + float linear_per_segment = (target[axis_linear] - position[axis_linear])/segments; + + /* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, + and phi is the angle of rotation. Solution approach by Jens Geisler. + r_T = [cos(phi) -sin(phi); + sin(phi) cos(phi] * r ; + + For arc generation, the center of the circle is the axis of rotation and the radius vector is + defined from the circle center to the initial position. Each line segment is formed by successive + vector rotations. Single precision values can accumulate error greater than tool precision in rare + cases. So, exact arc path correction is implemented. This approach avoids the problem of too many very + expensive trig operations [sin(),cos(),tan()] which can take 100-200 usec each to compute. + + Small angle approximation may be used to reduce computation overhead further. A third-order approximation + (second order sin() has too much error) holds for most, if not, all CNC applications. Note that this + approximation will begin to accumulate a numerical drift error when theta_per_segment is greater than + ~0.25 rad(14 deg) AND the approximation is successively used without correction several dozen times. This + scenario is extremely unlikely, since segment lengths and theta_per_segment are automatically generated + and scaled by the arc tolerance setting. Only a very large arc tolerance setting, unrealistic for CNC + applications, would cause this numerical drift error. However, it is best to set N_ARC_CORRECTION from a + low of ~4 to a high of ~20 or so to avoid trig operations while keeping arc generation accurate. + + This approximation also allows mc_arc to immediately insert a line segment into the planner + without the initial overhead of computing cos() or sin(). By the time the arc needs to be applied + a correction, the planner should have caught up to the lag caused by the initial mc_arc overhead. + This is important when there are successive arc motions. + */ + // Computes: cos_T = 1 - theta_per_segment^2/2, sin_T = theta_per_segment - theta_per_segment^3/6) in ~52usec + float cos_T = 2.0 - theta_per_segment*theta_per_segment; + float sin_T = theta_per_segment*0.16666667*(cos_T + 4.0); + cos_T *= 0.5; + + float sin_Ti; + float cos_Ti; + float r_axisi; + uint16_t i; + uint8_t count = 0; + + for (i = 1; i 0) { + // NOTE: Check and execute realtime commands during dwell every <= DWELL_TIME_STEP milliseconds. + protocol_execute_realtime(); + if (sys.abort) { return; } + _delay_ms(DWELL_TIME_STEP); // Delay DWELL_TIME_STEP increment + } +} + + +// Perform homing cycle to locate and set machine zero. Only '$H' executes this command. +// NOTE: There should be no motions in the buffer and Grbl must be in an idle state before +// executing the homing cycle. This prevents incorrect buffered plans after homing. +void mc_homing_cycle() +{ + // Check and abort homing cycle, if hard limits are already enabled. Helps prevent problems + // with machines with limits wired on both ends of travel to one limit pin. + // TODO: Move the pin-specific LIMIT_PIN call to limits.c as a function. + #ifdef LIMITS_TWO_SWITCHES_ON_AXES + if (limits_get_state()) { + mc_reset(); // Issue system reset and ensure spindle and coolant are shutdown. + bit_true_atomic(sys_rt_exec_alarm, (EXEC_ALARM_HARD_LIMIT|EXEC_CRITICAL_EVENT)); + return; + } + #endif + + limits_disable(); // Disable hard limits pin change register for cycle duration + + // ------------------------------------------------------------------------------------- + // Perform homing routine. NOTE: Special motion case. Only system reset works. + + // Search to engage all axes limit switches at faster homing seek rate. + limits_go_home(HOMING_CYCLE_0); // Homing cycle 0 + #ifdef HOMING_CYCLE_1 + limits_go_home(HOMING_CYCLE_1); // Homing cycle 1 + #endif + #ifdef HOMING_CYCLE_2 + limits_go_home(HOMING_CYCLE_2); // Homing cycle 2 + #endif + + protocol_execute_realtime(); // Check for reset and set system abort. + if (sys.abort) { return; } // Did not complete. Alarm state set by mc_alarm. + + // Homing cycle complete! Setup system for normal operation. + // ------------------------------------------------------------------------------------- + + // Gcode parser position was circumvented by the limits_go_home() routine, so sync position now. + gc_sync_position(); + + // If hard limits feature enabled, re-enable hard limits pin change register after homing cycle. + limits_init(); +} + + +// Perform tool length probe cycle. Requires probe switch. +// NOTE: Upon probe failure, the program will be stopped and placed into ALARM state. +#ifdef USE_LINE_NUMBERS + void mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate, uint8_t is_probe_away, + uint8_t is_no_error, int32_t line_number) +#else + void mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate, uint8_t is_probe_away, + uint8_t is_no_error) +#endif +{ + // TODO: Need to update this cycle so it obeys a non-auto cycle start. + if (sys.state == STATE_CHECK_MODE) { return; } + + // Finish all queued commands and empty planner buffer before starting probe cycle. + protocol_buffer_synchronize(); + + // Initialize probing control variables + sys.probe_succeeded = false; // Re-initialize probe history before beginning cycle. + probe_configure_invert_mask(is_probe_away); + + // After syncing, check if probe is already triggered. If so, halt and issue alarm. + // NOTE: This probe initialization error applies to all probing cycles. + if ( probe_get_state() ) { // Check probe pin state. + bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_PROBE_FAIL); + protocol_execute_realtime(); + } + if (sys.abort) { return; } // Return if system reset has been issued. + + // Setup and queue probing motion. Auto cycle-start should not start the cycle. + #ifdef USE_LINE_NUMBERS + mc_line(1, target, feed_rate, invert_feed_rate, line_number); + #else + mc_line(1, target, feed_rate, invert_feed_rate); + #endif + + // Activate the probing state monitor in the stepper module. + sys_probe_state = PROBE_ACTIVE; + + // Perform probing cycle. Wait here until probe is triggered or motion completes. + bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); + do { + protocol_execute_realtime(); + if (sys.abort) { return; } // Check for system abort + } while (sys.state != STATE_IDLE); + + // Probing cycle complete! + + // Set state variables and error out, if the probe failed and cycle with error is enabled. + if (sys_probe_state == PROBE_ACTIVE) { + if (is_no_error) { memcpy(sys.probe_position, sys.position, sizeof(float)*N_AXIS); } + else { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_PROBE_FAIL); } + } else { + sys.probe_succeeded = true; // Indicate to system the probing cycle completed successfully. + } + sys_probe_state = PROBE_OFF; // Ensure probe state monitor is disabled. + protocol_execute_realtime(); // Check and execute run-time commands + if (sys.abort) { return; } // Check for system abort + + // Reset the stepper and planner buffers to remove the remainder of the probe motion. + st_reset(); // Reest step segment buffer. + plan_reset(); // Reset planner buffer. Zero planner positions. Ensure probing motion is cleared. + plan_sync_position(); // Sync planner position to current machine position. + + // TODO: Update the g-code parser code to not require this target calculation but uses a gc_sync_position() call. + // NOTE: The target[] variable updated here will be sent back and synced with the g-code parser. + system_convert_array_steps_to_mpos(target, sys.position); + + #ifdef MESSAGE_PROBE_COORDINATES + // All done! Output the probe position as message. + report_probe_parameters(); + #endif +} + + +// Method to ready the system to reset by setting the realtime reset command and killing any +// active processes in the system. This also checks if a system reset is issued while Grbl +// is in a motion state. If so, kills the steppers and sets the system alarm to flag position +// lost, since there was an abrupt uncontrolled deceleration. Called at an interrupt level by +// realtime abort command and hard limits. So, keep to a minimum. +void mc_reset() +{ + // Only this function can set the system reset. Helps prevent multiple kill calls. + if (bit_isfalse(sys_rt_exec_state, EXEC_RESET)) { + bit_true_atomic(sys_rt_exec_state, EXEC_RESET); + + // Kill spindle and coolant. + spindle_stop(); + coolant_stop(); + + // Kill steppers only if in any motion state, i.e. cycle, actively holding, or homing. + // NOTE: If steppers are kept enabled via the step idle delay setting, this also keeps + // the steppers enabled by avoiding the go_idle call altogether, unless the motion state is + // violated, by which, all bets are off. + if ((sys.state & (STATE_CYCLE | STATE_HOMING)) || (sys.suspend == SUSPEND_ENABLE_HOLD)) { + if (sys.state == STATE_HOMING) { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_HOMING_FAIL); } + else { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE); } + st_go_idle_2(); // Force kill steppers. Position has likely been lost. + } + } +} + diff --git a/src/motion_control.h b/src/motion_control.h new file mode 100755 index 0000000..2bb3ae5 --- /dev/null +++ b/src/motion_control.h @@ -0,0 +1,66 @@ +/* + motion_control.h - high level interface for issuing motion commands + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef motion_control_h +#define motion_control_h + + +#define HOMING_CYCLE_LINE_NUMBER -1 + +// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second +// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in +// (1 minute)/feed_rate time. +#ifdef USE_LINE_NUMBERS +uint8_t mc_line(uint8_t mode,float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number); +#else +uint8_t mc_line(uint8_t mode,float *target, float feed_rate, uint8_t invert_feed_rate); +#endif + +// Execute an arc in offset mode format. position == current xyz, target == target xyz, +// offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is +// the direction of helical travel, radius == circle radius, is_clockwise_arc boolean. Used +// for vector transformation direction. +#ifdef USE_LINE_NUMBERS +void mc_arc(float *position, float *target, float *offset, float radius, float feed_rate, + uint8_t invert_feed_rate, uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc, int32_t line_number); +#else +void mc_arc(float *position, float *target, float *offset, float radius, float feed_rate, + uint8_t invert_feed_rate, uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc); +#endif + +// Dwell for a specific number of seconds +void mc_dwell(float seconds); + +// Perform homing cycle to locate machine zero. Requires limit switches. +void mc_homing_cycle(); + +// Perform tool length probe cycle. Requires probe switch. +#ifdef USE_LINE_NUMBERS +void mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate, uint8_t is_probe_away, + uint8_t is_no_error, int32_t line_number); +#else +void mc_probe_cycle(float *target, float feed_rate, uint8_t invert_feed_rate, uint8_t is_probe_away, + uint8_t is_no_error); +#endif + +// Performs system reset. If in motion state, kills all motion and sets system alarm. +void mc_reset(); +#endif diff --git a/src/nuts_bolts.c b/src/nuts_bolts.c new file mode 100755 index 0000000..328af84 --- /dev/null +++ b/src/nuts_bolts.c @@ -0,0 +1,148 @@ +/* + nuts_bolts.c - Shared functions + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +#define MAX_INT_DIGITS 8 // Maximum number of digits in int32 (and float) + + +// Extracts a floating point value from a string. The following code is based loosely on +// the avr-libc strtod() function by Michael Stumpf and Dmitry Xmelkov and many freely +// available conversion method examples, but has been highly optimized for Grbl. For known +// CNC applications, the typical decimal value is expected to be in the range of E0 to E-4. +// Scientific notation is officially not supported by g-code, and the 'E' character may +// be a g-code word on some CNC systems. So, 'E' notation will not be recognized. +// NOTE: Thanks to Radu-Eosif Mihailescu for identifying the issues with using strtod(). +uint8_t read_float(char *line, uint8_t *char_counter, float *float_ptr) +{ + char *ptr; + if( char_counter == NULL ){ + ptr = line; + }else{ + ptr = line + *char_counter; + } + unsigned char c; + + // Grab first character and increment pointer. No spaces assumed in line. + c = *ptr++; + + // Capture initial positive/minus character + bool isnegative = false; + if (c == '-') { + isnegative = true; + c = *ptr++; + } else if (c == '+') { + c = *ptr++; + } + + // Extract number into fast integer. Track decimal in terms of exponent value. + uint32_t intval = 0; + int8_t exp = 0; + uint8_t ndigit = 0; + bool isdecimal = false; + while(1) { + c -= '0'; + if (c <= 9) { + ndigit++; + if (ndigit <= MAX_INT_DIGITS) { + if (isdecimal) { exp--; } + intval = (((intval << 2) + intval) << 1) + c; // intval*10 + c + } else { + if (!(isdecimal)) { exp++; } // Drop overflow digits + } + } else if (c == (('.'-'0') & 0xff) && !(isdecimal)) { + isdecimal = true; + } else { + break; + } + c = *ptr++; + } + + // Return if no digits have been read. + if (!ndigit) { return(false); }; + + // Convert integer into floating point. + float fval; + fval = (float)intval; + + // Apply decimal. Should perform no more than two floating point multiplications for the + // expected range of E0 to E-4. + if (fval != 0) { + while (exp <= -2) { + fval *= 0.01; + exp += 2; + } + if (exp < 0) { + fval *= 0.1; + } else if (exp > 0) { + do { + fval *= 10.0; + } while (--exp > 0); + } + } + + // Assign floating point value with correct sign. + if (isnegative) { + *float_ptr = -fval; + } else { + *float_ptr = fval; + } + + *char_counter = ptr - line - 1; // Set char_counter to next statement + + return(true); +} + + +// Delays variable defined milliseconds. Compiler compatibility fix for _delay_ms(), +// which only accepts constants in future compiler releases. +void delay_ms(uint16_t ms) +{ + while ( ms-- ) { _delay_ms(1); } +} + + +// Delays variable defined microseconds. Compiler compatibility fix for _delay_us(), +// which only accepts constants in future compiler releases. Written to perform more +// efficiently with larger delays, as the counter adds parasitic time in each iteration. +void delay_us(uint32_t us) +{ + while (us) { + if (us < 10) { + _delay_us(1); + us--; + } else if (us < 100) { + _delay_us(10); + us -= 10; + } else if (us < 1000) { + _delay_us(100); + us -= 100; + } else { + _delay_ms(1); + us -= 1000; + } + } +} + + +// Simple hypotenuse computation function. +float hypot_f(float x, float y) { return(sqrt(x*x + y*y)); } diff --git a/src/nuts_bolts.h b/src/nuts_bolts.h new file mode 100755 index 0000000..882d337 --- /dev/null +++ b/src/nuts_bolts.h @@ -0,0 +1,78 @@ +/* + nuts_bolts.h - Header file for shared definitions, variables, and functions + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef nuts_bolts_h +#define nuts_bolts_h + +#define false 0 +#define true 1 + +// Axis array index values. Must start with 0 and be continuous. +#define N_AXIS 3 // Number of axes +#define X_AXIS 0 // Axis indexing value. +#define Y_AXIS 1 +#define Z_AXIS 2 +// #define A_AXIS 3 + +// CoreXY motor assignments. DO NOT ALTER. +// NOTE: If the A and B motor axis bindings are changed, this effects the CoreXY equations. +#ifdef COREXY + #define A_MOTOR X_AXIS // Must be X_AXIS + #define B_MOTOR Y_AXIS // Must be Y_AXIS +#endif + +// Conversions +#define MM_PER_INCH (25.40) +#define INCH_PER_MM (0.0393701) +#define TICKS_PER_MICROSECOND (F_CPU/1000000) + +// Useful macros +#define clear_vector(a) memset(a, 0, sizeof(a)) +#define clear_vector_float(a) memset(a, 0.0, sizeof(float)*N_AXIS) +// #define clear_vector_long(a) memset(a, 0.0, sizeof(long)*N_AXIS) +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) + +// Bit field and masking macros +#define bit(n) (1 << n) +#define bit_true_atomic(x,mask) {uint8_t sreg = SREG; cli(); (x) |= (mask); SREG = sreg; } +#define bit_false_atomic(x,mask) {uint8_t sreg = SREG; cli(); (x) &= ~(mask); SREG = sreg; } +#define bit_toggle_atomic(x,mask) {uint8_t sreg = SREG; cli(); (x) ^= (mask); SREG = sreg; } +#define bit_true(x,mask) (x) |= (mask) +#define bit_false(x,mask) (x) &= ~(mask) +#define bit_istrue(x,mask) ((x & mask) != 0) +#define bit_isfalse(x,mask) ((x & mask) == 0) + +// Read a floating point value from a string. Line points to the input buffer, char_counter +// is the indexer pointing to the current character of the line, while float_ptr is +// a pointer to the result variable. Returns true when it succeeds +uint8_t read_float(char *line, uint8_t *char_counter, float *float_ptr); + +// Delays variable-defined milliseconds. Compiler compatibility fix for _delay_ms(). +void delay_ms(uint16_t ms); + +// Delays variable-defined microseconds. Compiler compatibility fix for _delay_us(). +void delay_us(uint32_t us); + +// Computes hypotenuse, avoiding avr-gcc's bloated version and the extra error checking. +float hypot_f(float x, float y); + +#endif diff --git a/src/planner.c b/src/planner.c new file mode 100755 index 0000000..5b54410 --- /dev/null +++ b/src/planner.c @@ -0,0 +1,457 @@ +/* + planner.c - buffers movement commands and manages the acceleration profile plan + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + Copyright (c) 2011 Jens Geisler + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + +#define SOME_LARGE_VALUE 1.0E+38 // Used by rapids and acceleration maximization calculations. Just needs + // to be larger than any feasible (mm/min)^2 or mm/sec^2 value. + +static plan_block_t block_buffer[BLOCK_BUFFER_SIZE]; // A ring buffer for motion instructions +static uint8_t block_buffer_tail; // Index of the block to process now +static uint8_t block_buffer_head; // Index of the next block to be pushed +static uint8_t next_buffer_head; // Index of the next buffer head +static uint8_t block_buffer_planned; // Index of the optimally planned block + +// Define planner variables +typedef struct { + int32_t position[N_AXIS]; // The planner position of the tool in absolute steps. Kept separate + // from g-code position for movements requiring multiple line motions, + // i.e. arcs, canned cycles, and backlash compensation. + float previous_unit_vec[N_AXIS]; // Unit vector of previous path line segment + float previous_nominal_speed_sqr; // Nominal speed of previous path line segment +} planner_t; +static planner_t pl; + + +// Returns the index of the next block in the ring buffer. Also called by stepper segment buffer. +uint8_t plan_next_block_index(uint8_t block_index) +{ + block_index++; + if (block_index == BLOCK_BUFFER_SIZE) { block_index = 0; } + return(block_index); +} + + +// Returns the index of the previous block in the ring buffer +static uint8_t plan_prev_block_index(uint8_t block_index) +{ + if (block_index == 0) { block_index = BLOCK_BUFFER_SIZE; } + block_index--; + return(block_index); +} + + +/* PLANNER SPEED DEFINITION + +--------+ <- current->nominal_speed + / \ + current->entry_speed -> + \ + | + <- next->entry_speed (aka exit speed) + +-------------+ + time --> + + Recalculates the motion plan according to the following basic guidelines: + + 1. Go over every feasible block sequentially in reverse order and calculate the junction speeds + (i.e. current->entry_speed) such that: + a. No junction speed exceeds the pre-computed maximum junction speed limit or nominal speeds of + neighboring blocks. + b. A block entry speed cannot exceed one reverse-computed from its exit speed (next->entry_speed) + with a maximum allowable deceleration over the block travel distance. + c. The last (or newest appended) block is planned from a complete stop (an exit speed of zero). + 2. Go over every block in chronological (forward) order and dial down junction speed values if + a. The exit speed exceeds the one forward-computed from its entry speed with the maximum allowable + acceleration over the block travel distance. + + When these stages are complete, the planner will have maximized the velocity profiles throughout the all + of the planner blocks, where every block is operating at its maximum allowable acceleration limits. In + other words, for all of the blocks in the planner, the plan is optimal and no further speed improvements + are possible. If a new block is added to the buffer, the plan is recomputed according to the said + guidelines for a new optimal plan. + + To increase computational efficiency of these guidelines, a set of planner block pointers have been + created to indicate stop-compute points for when the planner guidelines cannot logically make any further + changes or improvements to the plan when in normal operation and new blocks are streamed and added to the + planner buffer. For example, if a subset of sequential blocks in the planner have been planned and are + bracketed by junction velocities at their maximums (or by the first planner block as well), no new block + added to the planner buffer will alter the velocity profiles within them. So we no longer have to compute + them. Or, if a set of sequential blocks from the first block in the planner (or a optimal stop-compute + point) are all accelerating, they are all optimal and can not be altered by a new block added to the + planner buffer, as this will only further increase the plan speed to chronological blocks until a maximum + junction velocity is reached. However, if the operational conditions of the plan changes from infrequently + used feed holds or feedrate overrides, the stop-compute pointers will be reset and the entire plan is + recomputed as stated in the general guidelines. + + Planner buffer index mapping: + - block_buffer_tail: Points to the beginning of the planner buffer. First to be executed or being executed. + - block_buffer_head: Points to the buffer block after the last block in the buffer. Used to indicate whether + the buffer is full or empty. As described for standard ring buffers, this block is always empty. + - next_buffer_head: Points to next planner buffer block after the buffer head block. When equal to the + buffer tail, this indicates the buffer is full. + - block_buffer_planned: Points to the first buffer block after the last optimally planned block for normal + streaming operating conditions. Use for planning optimizations by avoiding recomputing parts of the + planner buffer that don't change with the addition of a new block, as describe above. In addition, + this block can never be less than block_buffer_tail and will always be pushed forward and maintain + this requirement when encountered by the plan_discard_current_block() routine during a cycle. + + NOTE: Since the planner only computes on what's in the planner buffer, some motions with lots of short + line segments, like G2/3 arcs or complex curves, may seem to move slow. This is because there simply isn't + enough combined distance traveled in the entire buffer to accelerate up to the nominal speed and then + decelerate to a complete stop at the end of the buffer, as stated by the guidelines. If this happens and + becomes an annoyance, there are a few simple solutions: (1) Maximize the machine acceleration. The planner + will be able to compute higher velocity profiles within the same combined distance. (2) Maximize line + motion(s) distance per block to a desired tolerance. The more combined distance the planner has to use, + the faster it can go. (3) Maximize the planner buffer size. This also will increase the combined distance + for the planner to compute over. It also increases the number of computations the planner has to perform + to compute an optimal plan, so select carefully. The Arduino 328p memory is already maxed out, but future + ARM versions should have enough memory and speed for look-ahead blocks numbering up to a hundred or more. + +*/ +static void planner_recalculate() +{ + // Initialize block index to the last block in the planner buffer. + uint8_t block_index = plan_prev_block_index(block_buffer_head); + + // Bail. Can't do anything with one only one plan-able block. + if (block_index == block_buffer_planned) { return; } + + // Reverse Pass: Coarsely maximize all possible deceleration curves back-planning from the last + // block in buffer. Cease planning when the last optimal planned or tail pointer is reached. + // NOTE: Forward pass will later refine and correct the reverse pass to create an optimal plan. + float entry_speed_sqr; + plan_block_t *next; + plan_block_t *current = &block_buffer[block_index]; + + // Calculate maximum entry speed for last block in buffer, where the exit speed is always zero. + current->entry_speed_sqr = min( current->max_entry_speed_sqr, 2*current->acceleration*current->millimeters); + + block_index = plan_prev_block_index(block_index); + if (block_index == block_buffer_planned) { // Only two plannable blocks in buffer. Reverse pass complete. + // Check if the first block is the tail. If so, notify stepper to update its current parameters. + if (block_index == block_buffer_tail) { st_update_plan_block_parameters(); } + } else { // Three or more plan-able blocks + while (block_index != block_buffer_planned) { + next = current; + current = &block_buffer[block_index]; + block_index = plan_prev_block_index(block_index); + + // Check if next block is the tail block(=planned block). If so, update current stepper parameters. + if (block_index == block_buffer_tail) { st_update_plan_block_parameters(); } + + // Compute maximum entry speed decelerating over the current block from its exit speed. + if (current->entry_speed_sqr != current->max_entry_speed_sqr) { + entry_speed_sqr = next->entry_speed_sqr + 2*current->acceleration*current->millimeters; + if (entry_speed_sqr < current->max_entry_speed_sqr) { + current->entry_speed_sqr = entry_speed_sqr; + } else { + current->entry_speed_sqr = current->max_entry_speed_sqr; + } + } + } + } + + // Forward Pass: Forward plan the acceleration curve from the planned pointer onward. + // Also scans for optimal plan breakpoints and appropriately updates the planned pointer. + next = &block_buffer[block_buffer_planned]; // Begin at buffer planned pointer + block_index = plan_next_block_index(block_buffer_planned); + while (block_index != block_buffer_head) { + current = next; + next = &block_buffer[block_index]; + + // Any acceleration detected in the forward pass automatically moves the optimal planned + // pointer forward, since everything before this is all optimal. In other words, nothing + // can improve the plan from the buffer tail to the planned pointer by logic. + if (current->entry_speed_sqr < next->entry_speed_sqr) { + entry_speed_sqr = current->entry_speed_sqr + 2*current->acceleration*current->millimeters; + // If true, current block is full-acceleration and we can move the planned pointer forward. + if (entry_speed_sqr < next->entry_speed_sqr) { + next->entry_speed_sqr = entry_speed_sqr; // Always <= max_entry_speed_sqr. Backward pass sets this. + block_buffer_planned = block_index; // Set optimal plan pointer. + } + } + + // Any block set at its maximum entry speed also creates an optimal plan up to this + // point in the buffer. When the plan is bracketed by either the beginning of the + // buffer and a maximum entry speed or two maximum entry speeds, every block in between + // cannot logically be further improved. Hence, we don't have to recompute them anymore. + if (next->entry_speed_sqr == next->max_entry_speed_sqr) { block_buffer_planned = block_index; } + block_index = plan_next_block_index( block_index ); + } +} + + +void plan_reset() +{ + memset(&pl, 0, sizeof(planner_t)); // Clear planner struct + block_buffer_tail = 0; + block_buffer_head = 0; // Empty = tail + next_buffer_head = 1; // plan_next_block_index(block_buffer_head) + block_buffer_planned = 0; // = block_buffer_tail; +} + + +void plan_discard_current_block() +{ + if (block_buffer_head != block_buffer_tail) { // Discard non-empty buffer. + uint8_t block_index = plan_next_block_index( block_buffer_tail ); + // Push block_buffer_planned pointer, if encountered. + if (block_buffer_tail == block_buffer_planned) { block_buffer_planned = block_index; } + block_buffer_tail = block_index; + } +} + + +plan_block_t *plan_get_current_block() +{ + if (block_buffer_head == block_buffer_tail) { return(NULL); } // Buffer empty + return(&block_buffer[block_buffer_tail]); +} + + +float plan_get_exec_block_exit_speed() +{ + uint8_t block_index = plan_next_block_index(block_buffer_tail); + if (block_index == block_buffer_head) { return( 0.0 ); } + return( sqrt( block_buffer[block_index].entry_speed_sqr ) ); +} + + +// Returns the availability status of the block ring buffer. True, if full. +uint8_t plan_check_full_buffer() +{ + if (block_buffer_tail == next_buffer_head) { return(true); } + return(false); +} + + +/* Add a new linear movement to the buffer. target[N_AXIS] is the signed, absolute target position + in millimeters. Feed rate specifies the speed of the motion. If feed rate is inverted, the feed + rate is taken to mean "frequency" and would complete the operation in 1/feed_rate minutes. + All position data passed to the planner must be in terms of machine position to keep the planner + independent of any coordinate system changes and offsets, which are handled by the g-code parser. + NOTE: Assumes buffer is available. Buffer checks are handled at a higher level by motion_control. + In other words, the buffer head is never equal to the buffer tail. Also the feed rate input value + is used in three ways: as a normal feed rate if invert_feed_rate is false, as inverse time if + invert_feed_rate is true, or as seek/rapids rate if the feed_rate value is negative (and + invert_feed_rate always false). */ +#ifdef USE_LINE_NUMBERS + void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number) +#else + void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate) +#endif +{ + // Prepare and initialize new block + plan_block_t *block = &block_buffer[block_buffer_head]; + block->step_event_count = 0; + block->millimeters = 0; + block->direction_bits = 0; + block->acceleration = SOME_LARGE_VALUE; // Scaled down to maximum acceleration later + #ifdef USE_LINE_NUMBERS + block->line_number = line_number; + #endif + + // Compute and store initial move distance data. + // TODO: After this for-loop, we don't touch the stepper algorithm data. Might be a good idea + // to try to keep these types of things completely separate from the planner for portability. + int32_t target_steps[N_AXIS]; + float unit_vec[N_AXIS], delta_mm; + uint8_t idx; + #ifdef COREXY + target_steps[A_MOTOR] = lround(target[A_MOTOR]*settings.steps_per_mm[A_MOTOR]); + target_steps[B_MOTOR] = lround(target[B_MOTOR]*settings.steps_per_mm[B_MOTOR]); + block->steps[A_MOTOR] = labs((target_steps[X_AXIS]-pl.position[X_AXIS]) + (target_steps[Y_AXIS]-pl.position[Y_AXIS])); + block->steps[B_MOTOR] = labs((target_steps[X_AXIS]-pl.position[X_AXIS]) - (target_steps[Y_AXIS]-pl.position[Y_AXIS])); + #endif + + for (idx=0; idxsteps[idx] = labs(target_steps[idx]-pl.position[idx]); + } + block->step_event_count = max(block->step_event_count, block->steps[idx]); + if (idx == A_MOTOR) { + delta_mm = (target_steps[X_AXIS]-pl.position[X_AXIS] + target_steps[Y_AXIS]-pl.position[Y_AXIS])/settings.steps_per_mm[idx]; + } else if (idx == B_MOTOR) { + delta_mm = (target_steps[X_AXIS]-pl.position[X_AXIS] - target_steps[Y_AXIS]+pl.position[Y_AXIS])/settings.steps_per_mm[idx]; + } else { + delta_mm = (target_steps[idx] - pl.position[idx])/settings.steps_per_mm[idx]; + } + #else + target_steps[idx] = lround(target[idx]*settings.steps_per_mm[idx]); + block->steps[idx] = labs(target_steps[idx]-pl.position[idx]); + block->step_event_count = max(block->step_event_count, block->steps[idx]); + delta_mm = (target_steps[idx] - pl.position[idx])/settings.steps_per_mm[idx]; + #endif + unit_vec[idx] = delta_mm; // Store unit vector numerator. Denominator computed later. + + // Set direction bits. Bit enabled always means direction is negative. + if (delta_mm < 0 ) { block->direction_bits |= get_direction_pin_mask(idx); } + + // Incrementally compute total move distance by Euclidean norm. First add square of each term. + block->millimeters += delta_mm*delta_mm; + } + block->millimeters = sqrt(block->millimeters); // Complete millimeters calculation with sqrt() + + // Bail if this is a zero-length block. Highly unlikely to occur. + if (block->step_event_count == 0) { return; } + + // Adjust feed_rate value to mm/min depending on type of rate input (normal, inverse time, or rapids) + // TODO: Need to distinguish a rapids vs feed move for overrides. Some flag of some sort. + if (feed_rate < 0) { feed_rate = SOME_LARGE_VALUE; } // Scaled down to absolute max/rapids rate later + else if (invert_feed_rate) { feed_rate *= block->millimeters; } + if (feed_rate < MINIMUM_FEED_RATE) { feed_rate = MINIMUM_FEED_RATE; } // Prevents step generation round-off condition. + + // Calculate the unit vector of the line move and the block maximum feed rate and acceleration scaled + // down such that no individual axes maximum values are exceeded with respect to the line direction. + // NOTE: This calculation assumes all axes are orthogonal (Cartesian) and works with ABC-axes, + // if they are also orthogonal/independent. Operates on the absolute value of the unit vector. + float inverse_unit_vec_value; + float inverse_millimeters = 1.0/block->millimeters; // Inverse millimeters to remove multiple float divides + float junction_cos_theta = 0; + for (idx=0; idxacceleration = min(block->acceleration,settings.acceleration[idx]*inverse_unit_vec_value); + + // Incrementally compute cosine of angle between previous and current path. Cos(theta) of the junction + // between the current move and the previous move is simply the dot product of the two unit vectors, + // where prev_unit_vec is negative. Used later to compute maximum junction speed. + junction_cos_theta -= pl.previous_unit_vec[idx] * unit_vec[idx]; + } + } + + // TODO: Need to check this method handling zero junction speeds when starting from rest. + if (block_buffer_head == block_buffer_tail) { + + // Initialize block entry speed as zero. Assume it will be starting from rest. Planner will correct this later. + block->entry_speed_sqr = 0.0; + block->max_junction_speed_sqr = 0.0; // Starting from rest. Enforce start from zero velocity. + + } else { + /* + Compute maximum allowable entry speed at junction by centripetal acceleration approximation. + Let a circle be tangent to both previous and current path line segments, where the junction + deviation is defined as the distance from the junction to the closest edge of the circle, + colinear with the circle center. The circular segment joining the two paths represents the + path of centripetal acceleration. Solve for max velocity based on max acceleration about the + radius of the circle, defined indirectly by junction deviation. This may be also viewed as + path width or max_jerk in the previous Grbl version. This approach does not actually deviate + from path, but used as a robust way to compute cornering speeds, as it takes into account the + nonlinearities of both the junction angle and junction velocity. + + NOTE: If the junction deviation value is finite, Grbl executes the motions in an exact path + mode (G61). If the junction deviation value is zero, Grbl will execute the motion in an exact + stop mode (G61.1) manner. In the future, if continuous mode (G64) is desired, the math here + is exactly the same. Instead of motioning all the way to junction point, the machine will + just follow the arc circle defined here. The Arduino doesn't have the CPU cycles to perform + a continuous mode path, but ARM-based microcontrollers most certainly do. + + NOTE: The max junction speed is a fixed value, since machine acceleration limits cannot be + changed dynamically during operation nor can the line move geometry. This must be kept in + memory in the event of a feedrate override changing the nominal speeds of blocks, which can + change the overall maximum entry speed conditions of all blocks. + */ + // NOTE: Computed without any expensive trig, sin() or acos(), by trig half angle identity of cos(theta). + if (junction_cos_theta > 0.999999) { + // For a 0 degree acute junction, just set minimum junction speed. + block->max_junction_speed_sqr = MINIMUM_JUNCTION_SPEED*MINIMUM_JUNCTION_SPEED; + } else { + junction_cos_theta = max(junction_cos_theta,-0.999999); // Check for numerical round-off to avoid divide by zero. + float sin_theta_d2 = sqrt(0.5*(1.0-junction_cos_theta)); // Trig half angle identity. Always positive. + + // TODO: Technically, the acceleration used in calculation needs to be limited by the minimum of the + // two junctions. However, this shouldn't be a significant problem except in extreme circumstances. + block->max_junction_speed_sqr = max( MINIMUM_JUNCTION_SPEED*MINIMUM_JUNCTION_SPEED, + (block->acceleration * settings.junction_deviation * sin_theta_d2)/(1.0-sin_theta_d2) ); + + } + } + + // Store block nominal speed + block->nominal_speed_sqr = feed_rate*feed_rate; // (mm/min). Always > 0 + + // Compute the junction maximum entry based on the minimum of the junction speed and neighboring nominal speeds. + block->max_entry_speed_sqr = min(block->max_junction_speed_sqr, + min(block->nominal_speed_sqr,pl.previous_nominal_speed_sqr)); + + // Update previous path unit_vector and nominal speed (squared) + memcpy(pl.previous_unit_vec, unit_vec, sizeof(unit_vec)); // pl.previous_unit_vec[] = unit_vec[] + pl.previous_nominal_speed_sqr = block->nominal_speed_sqr; + + // Update planner position + memcpy(pl.position, target_steps, sizeof(target_steps)); // pl.position[] = target_steps[] + + // New block is all set. Update buffer head and next buffer head indices. + block_buffer_head = next_buffer_head; + next_buffer_head = plan_next_block_index(block_buffer_head); + + // Finish up by recalculating the plan with the new block. + planner_recalculate(); +} + + +// Reset the planner position vectors. Called by the system abort/initialization routine. +void plan_sync_position() +{ + // TODO: For motor configurations not in the same coordinate frame as the machine position, + // this function needs to be updated to accomodate the difference. + uint8_t idx; + for (idx=0; idx= block_buffer_tail) { return(block_buffer_head-block_buffer_tail); } + return(BLOCK_BUFFER_SIZE - (block_buffer_tail-block_buffer_head)); +} + + +// Re-initialize buffer plan with a partially completed block, assumed to exist at the buffer tail. +// Called after a steppers have come to a complete stop for a feed hold and the cycle is stopped. +void plan_cycle_reinitialize() +{ + // Re-plan from a complete stop. Reset planner entry speeds and buffer planned pointer. + st_update_plan_block_parameters(); + block_buffer_planned = block_buffer_tail; + planner_recalculate(); +} diff --git a/src/planner.h b/src/planner.h new file mode 100755 index 0000000..02258dd --- /dev/null +++ b/src/planner.h @@ -0,0 +1,97 @@ +/* + planner.h - buffers movement commands and manages the acceleration profile plan + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef planner_h +#define planner_h + + +// The number of linear motions that can be in the plan at any give time +#ifndef BLOCK_BUFFER_SIZE + #ifdef USE_LINE_NUMBERS + #define BLOCK_BUFFER_SIZE 16 + #else + #define BLOCK_BUFFER_SIZE 18 + #endif +#endif + +// This struct stores a linear movement of a g-code block motion with its critical "nominal" values +// are as specified in the source g-code. +typedef struct { + // Fields used by the bresenham algorithm for tracing the line + // NOTE: Used by stepper algorithm to execute the block correctly. Do not alter these values. + uint8_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) + uint32_t steps[N_AXIS]; // Step count along each axis + uint32_t step_event_count; // The maximum step axis count and number of steps required to complete this block. + + // Fields used by the motion planner to manage acceleration + float entry_speed_sqr; // The current planned entry speed at block junction in (mm/min)^2 + float max_entry_speed_sqr; // Maximum allowable entry speed based on the minimum of junction limit and + // neighboring nominal speeds with overrides in (mm/min)^2 + float max_junction_speed_sqr; // Junction entry speed limit based on direction vectors in (mm/min)^2 + float nominal_speed_sqr; // Axis-limit adjusted nominal speed for this block in (mm/min)^2 + float acceleration; // Axis-limit adjusted line acceleration in (mm/min^2) + float millimeters; // The remaining distance for this block to be executed in (mm) + // uint8_t max_override; // Maximum override value based on axis speed limits + + #ifdef USE_LINE_NUMBERS + int32_t line_number; + #endif +} plan_block_t; + + +// Initialize and reset the motion plan subsystem +void plan_reset(); + +// Add a new linear movement to the buffer. target[N_AXIS] is the signed, absolute target position +// in millimeters. Feed rate specifies the speed of the motion. If feed rate is inverted, the feed +// rate is taken to mean "frequency" and would complete the operation in 1/feed_rate minutes. +#ifdef USE_LINE_NUMBERS + void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate, int32_t line_number); +#else + void plan_buffer_line(float *target, float feed_rate, uint8_t invert_feed_rate); +#endif + +// Called when the current block is no longer needed. Discards the block and makes the memory +// availible for new blocks. +void plan_discard_current_block(); + +// Gets the current block. Returns NULL if buffer empty +plan_block_t *plan_get_current_block(); + +// Called periodically by step segment buffer. Mostly used internally by planner. +uint8_t plan_next_block_index(uint8_t block_index); + +// Called by step segment buffer when computing executing block velocity profile. +float plan_get_exec_block_exit_speed(); + +// Reset the planner position vector (in steps) +void plan_sync_position(); + +// Reinitialize plan with a partially completed block +void plan_cycle_reinitialize(); + +// Returns the number of active blocks are in the planner buffer. +uint8_t plan_get_block_buffer_count(); + +// Returns the status of the block ring buffer. True, if buffer is full. +uint8_t plan_check_full_buffer(); + +#endif diff --git a/src/print.c b/src/print.c new file mode 100755 index 0000000..6598d48 --- /dev/null +++ b/src/print.c @@ -0,0 +1,219 @@ +/* + print.c - Functions for formatting output strings + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include + + +void printString(const char *s) +{ + while (*s) + serial_write(*s++); +} + + +// Print a string stored in PGM-memory +void printPgmString(const char *s) +{ + char c; + while ((c = pgm_read_byte_near(s++))) + serial_write(c); +} + + +// void printIntegerInBase(unsigned long n, unsigned long base) +// { +// unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars. +// unsigned long i = 0; +// +// if (n == 0) { +// serial_write('0'); +// return; +// } +// +// while (n > 0) { +// buf[i++] = n % base; +// n /= base; +// } +// +// for (; i > 0; i--) +// serial_write(buf[i - 1] < 10 ? +// '0' + buf[i - 1] : +// 'A' + buf[i - 1] - 10); +// } + + +// Prints an uint8 variable with base and number of desired digits. +void print_unsigned_int8(uint8_t n, uint8_t base, uint8_t digits) +{ + unsigned char buf[digits]; + uint8_t i = 0; + + for (; i < digits; i++) { + buf[i] = n % base ; + n /= base; + } + + for (; i > 0; i--) + serial_write('0' + buf[i - 1]); +} + + +// Prints an uint8 variable in base 2. +void print_uint8_base2(uint8_t n) { + print_unsigned_int8(n,2,8); +} + + +// Prints an uint8 variable in base 10. +void print_uint8_base10(uint8_t n) +{ + uint8_t digits; + if (n < 10) { digits = 1; } + else if (n < 100) { digits = 2; } + else { digits = 3; } + print_unsigned_int8(n,10,digits); +} + + +void print_uint32_base10(uint32_t n) +{ + if (n == 0) { + serial_write('0'); + return; + } + + unsigned char buf[10]; + uint8_t i = 0; + + while (n > 0) { + buf[i++] = n % 10; + n /= 10; + } + + for (; i > 0; i--) + serial_write('0' + buf[i-1]); +} + + +void printInteger(long n) +{ + if (n < 0) { + serial_write('-'); + print_uint32_base10(-n); + } else { + print_uint32_base10(n); + } +} + + +// Convert float to string by immediately converting to a long integer, which contains +// more digits than a float. Number of decimal places, which are tracked by a counter, +// may be set by the user. The integer is then efficiently converted to a string. +// NOTE: AVR '%' and '/' integer operations are very efficient. Bitshifting speed-up +// techniques are actually just slightly slower. Found this out the hard way. +void printFloat(float n, uint8_t decimal_places) +{ + if (n < 0) { + serial_write('-'); + n = -n; + } + + uint8_t decimals = decimal_places; + while (decimals >= 2) { // Quickly convert values expected to be E0 to E-4. + n *= 100; + decimals -= 2; + } + if (decimals) { n *= 10; } + n += 0.5; // Add rounding factor. Ensures carryover through entire value. + + // Generate digits backwards and store in string. + unsigned char buf[10]; + uint8_t i = 0; + uint32_t a = (long)n; + buf[decimal_places] = '.'; // Place decimal point, even if decimal places are zero. + while(a > 0) { + if (i == decimal_places) { i++; } // Skip decimal point location + buf[i++] = (a % 10) + '0'; // Get digit + a /= 10; + } + while (i < decimal_places) { + buf[i++] = '0'; // Fill in zeros to decimal point for (n < 1) + } + if (i == decimal_places) { // Fill in leading zero, if needed. + i++; + buf[i++] = '0'; + } + + // Print the generated string. + for (; i > 0; i--) + serial_write(buf[i-1]); +} + + +// Floating value printing handlers for special variables types used in Grbl and are defined +// in the config.h. +// - CoordValue: Handles all position or coordinate values in inches or mm reporting. +// - RateValue: Handles feed rate and current velocity in inches or mm reporting. +// - SettingValue: Handles all floating point settings values (always in mm.) +void printFloat_CoordValue(float n) { + if (bit_istrue(settings.flags,BITFLAG_REPORT_INCHES)) { + printFloat(n*INCH_PER_MM,N_DECIMAL_COORDVALUE_INCH); + } else { + printFloat(n,N_DECIMAL_COORDVALUE_MM); + } +} + +void printFloat_RateValue(float n) { + if (bit_istrue(settings.flags,BITFLAG_REPORT_INCHES)) { + printFloat(n*INCH_PER_MM,N_DECIMAL_RATEVALUE_INCH); + } else { + printFloat(n,N_DECIMAL_RATEVALUE_MM); + } +} + +void printFloat_SettingValue(float n) { printFloat(n,N_DECIMAL_SETTINGVALUE); } + + +// Debug tool to print free memory in bytes at the called point. +// NOTE: Keep commented unless using. Part of this function always gets compiled in. +// void printFreeMemory() +// { +// extern int __heap_start, *__brkval; +// uint16_t free; // Up to 64k values. +// free = (int) &free - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); +// printInteger((int32_t)free); +// printString(" "); +// } + +void uart_printf(char *str,...){ + char buf[128]; + unsigned char i = 0; + va_list ptr; + va_start(ptr,str); + vsprintf(buf,str,ptr); + while(buf[i]) + { + serial_write(buf[i]); + i++; + } +} + diff --git a/src/print.h b/src/print.h new file mode 100755 index 0000000..5639e70 --- /dev/null +++ b/src/print.h @@ -0,0 +1,60 @@ +/* + print.h - Functions for formatting output strings + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef print_h +#define print_h + + +void printString(const char *s); + +void printPgmString(const char *s); + +void printInteger(long n); + +void print_uint32_base10(uint32_t n); + +// Prints uint8 variable with base and number of desired digits. +void print_unsigned_int8(uint8_t n, uint8_t base, uint8_t digits); + +// Prints an uint8 variable in base 2. +void print_uint8_base2(uint8_t n); + +// Prints an uint8 variable in base 10. +void print_uint8_base10(uint8_t n); + +void printFloat(float n, uint8_t decimal_places); + +// Floating value printing handlers for special variables types used in Grbl. +// - CoordValue: Handles all position or coordinate values in inches or mm reporting. +// - RateValue: Handles feed rate and current velocity in inches or mm reporting. +// - SettingValue: Handles all floating point settings values (always in mm.) +void printFloat_CoordValue(float n); + +void printFloat_RateValue(float n); + +void printFloat_SettingValue(float n); + +// Debug tool to print free memory in bytes at the called point. Not used otherwise. +void printFreeMemory(); + +void uart_printf(char *str,...); + +#endif \ No newline at end of file diff --git a/src/probe.c b/src/probe.c new file mode 100755 index 0000000..37816bf --- /dev/null +++ b/src/probe.c @@ -0,0 +1,68 @@ +/* + probe.c - code pertaining to probing methods + Part of Grbl + + Copyright (c) 2014-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +// Inverts the probe pin state depending on user settings and probing cycle mode. +uint8_t probe_invert_mask; + + +// Probe pin initialization routine. +void probe_init() +{ + PROBE_DDR &= ~(PROBE_MASK); // Configure as input pins + #ifdef DISABLE_PROBE_PIN_PULL_UP + PROBE_PORT &= ~(PROBE_MASK); // Normal low operation. Requires external pull-down. + #else + PROBE_PORT |= PROBE_MASK; // Enable internal pull-up resistors. Normal high operation. + #endif + // probe_configure_invert_mask(false); // Initialize invert mask. Not required. Updated when in-use. +} + + +// Called by probe_init() and the mc_probe() routines. Sets up the probe pin invert mask to +// appropriately set the pin logic according to setting for normal-high/normal-low operation +// and the probing cycle modes for toward-workpiece/away-from-workpiece. +void probe_configure_invert_mask(uint8_t is_probe_away) +{ + probe_invert_mask = 0; // Initialize as zero. + if (bit_isfalse(settings.flags,BITFLAG_INVERT_PROBE_PIN)) { probe_invert_mask ^= PROBE_MASK; } + if (is_probe_away) { probe_invert_mask ^= PROBE_MASK; } +} + + +// Returns the probe pin state. Triggered = true. Called by gcode parser and probe state monitor. +uint8_t probe_get_state() { return((PROBE_PIN & PROBE_MASK) ^ probe_invert_mask); } + + +// Monitors probe pin state and records the system position when detected. Called by the +// stepper ISR per ISR tick. +// NOTE: This function must be extremely efficient as to not bog down the stepper ISR. +void probe_state_monitor() +{ + if (sys_probe_state == PROBE_ACTIVE) { + if (probe_get_state()) { + sys_probe_state = PROBE_OFF; + memcpy(sys.probe_position, sys.position, sizeof(sys.position)); + bit_true(sys_rt_exec_state, EXEC_MOTION_CANCEL); + } + } +} diff --git a/src/probe.h b/src/probe.h new file mode 100755 index 0000000..81bd486 --- /dev/null +++ b/src/probe.h @@ -0,0 +1,43 @@ +/* + probe.h - code pertaining to probing methods + Part of Grbl + + Copyright (c) 2014-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef probe_h +#define probe_h + +// Values that define the probing state machine. +#define PROBE_OFF 0 // Probing disabled or not in use. (Must be zero.) +#define PROBE_ACTIVE 1 // Actively watching the input pin. + +// Probe pin initialization routine. +void probe_init(); + +// Called by probe_init() and the mc_probe() routines. Sets up the probe pin invert mask to +// appropriately set the pin logic according to setting for normal-high/normal-low operation +// and the probing cycle modes for toward-workpiece/away-from-workpiece. +void probe_configure_invert_mask(uint8_t is_probe_away); + +// Returns probe pin state. Triggered = true. Called by gcode parser and probe state monitor. +uint8_t probe_get_state(); + +// Monitors probe pin state and records the system position when detected. Called by the +// stepper ISR per ISR tick. +void probe_state_monitor(); + +#endif diff --git a/src/protocol.c b/src/protocol.c new file mode 100755 index 0000000..03343f1 --- /dev/null +++ b/src/protocol.c @@ -0,0 +1,419 @@ +/* + protocol.c - controls Grbl execution protocol and procedures + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_swift.h" +#include "uarm_protocol.h" + +// Define different comment types for pre-parsing. +#define COMMENT_NONE 0 +#define COMMENT_TYPE_PARENTHESES 1 +#define COMMENT_TYPE_SEMICOLON 2 + +static char line[LINE_BUFFER_SIZE]; + +// Directs and executes one line of formatted input from protocol_process. While mostly +// incoming streaming g-code blocks, this also directs and executes Grbl internal commands, +// such as settings, initiating the homing cycle, and toggling switch states. +static void protocol_execute_line(char *line) +{ + protocol_execute_realtime(); // Runtime command check point. + if (sys.abort) { return; } // Bail to calling function upon system abort + + #ifdef REPORT_ECHO_LINE_RECEIVED + report_echo_line_received(line); + #endif + if (line[0] == '$') { + // Grbl '$' system command + report_status_message(system_execute_line(line)); + } else if (sys.state == STATE_ALARM) { + // Everything else is gcode. Block if in alarm mode. + report_status_message(STATUS_ALARM_LOCK); + } else { + // Parse and execute g-code block! + report_status_message(gc_execute_line(line)); + } +} + +/* + GRBL PRIMARY LOOP: +*/ +void protocol_main_loop() +{ + // ------------------------------------------------------------ + // Complete initialization procedures upon a power-up or reset. + // ------------------------------------------------------------ + + // Print welcome message +// report_init_message(); + + // Check for and report alarm state after a reset, error, or an initial power up. + if (sys.state == STATE_ALARM) { + report_feedback_message(MESSAGE_ALARM_LOCK); + } else { + // All systems go! But first check for safety door. + if (system_check_safety_door_ajar()) { + bit_true(sys_rt_exec_state, EXEC_SAFETY_DOOR); + protocol_execute_realtime(); // Enter safety door mode. Should return as IDLE state. + } else { + sys.state = STATE_IDLE; // Set system to ready. Clear all state flags. + } +// system_execute_startup(line); // Execute startup script. + } + + // --------------------------------------------------------------------------------- + // Primary loop! Upon a system abort, this exits back to main() to reset the system. + // --------------------------------------------------------------------------------- + + uint8_t comment = COMMENT_NONE; + uint8_t char_counter = 0; + uint8_t c; + uint8_t line_remain = 0; + uint8_t line_num = 0; + uint8_t line_execute_p = 0; + + for (;;) { + + // Process one line of incoming serial data, as the data becomes available. Performs an + // initial filtering by removing spaces and comments and capitalizing all letters. + + // NOTE: While comment, spaces, and block delete(if supported) handling should technically + // be done in the g-code parser, doing it here helps compress the incoming data into Grbl's + // line buffer, which is limited in size. The g-code standard actually states a line can't + // exceed 256 characters, but the Arduino Uno does not have the memory space for this. + // With a better processor, it would be very easy to pull this initial parsing out as a + // seperate task to be shared by the g-code parser and Grbl's system commands. + if( uarm.effect_origin_check ){ + end_effector_check_limit(); + }else{ + while((c = serial_read()) != SERIAL_NO_DATA) { + if ((c == '\n') || (c == '\r')) { // End of line reached + line[char_counter] = 0; // Set string termination character. + receive_cmd_line(line); + comment = COMMENT_NONE; + char_counter = 0; + break; + } else { + if (comment != COMMENT_NONE) { + // Throw away all comment characters + if (c == ')') { + // End of comment. Resume line. But, not if semicolon type comment. + if (comment == COMMENT_TYPE_PARENTHESES) { comment = COMMENT_NONE; } + } + } else { + if (c <= ' ') { + // Throw away whitepace and control characters + } else if (c == '/') { + // Block delete NOT SUPPORTED. Ignore character. + // NOTE: If supported, would simply need to check the system if block delete is enabled. + } else if (c == '(') { + // Enable comments flag and ignore all characters until ')' or EOL. + // NOTE: This doesn't follow the NIST definition exactly, but is good enough for now. + // In the future, we could simply remove the items within the comments, but retain the + // comment control characters, so that the g-code parser can error-check it. + comment = COMMENT_TYPE_PARENTHESES; + } else if (c == ';') { + // NOTE: ';' comment to EOL is a LinuxCNC definition. Not NIST. + comment = COMMENT_TYPE_SEMICOLON; + + // TODO: Install '%' feature + // } else if (c == '%') { + // Program start-end percent sign NOT SUPPORTED. + // NOTE: This maybe installed to tell Grbl when a program is running vs manual input, + // where, during a program, the system auto-cycle start will continue to execute + // everything until the next '%' sign. This will help fix resuming issues with certain + // functions that empty the planner buffer to execute its task on-time. + + } else if (char_counter >= (LINE_BUFFER_SIZE-1)) { + // Detect line buffer overflow. Report error and reset line buffer. + report_status_message(STATUS_OVERFLOW); + comment = COMMENT_NONE; + char_counter = 0; + } else if (c >= 'a' && c <= 'z') { // Upcase lowercase + line[char_counter++] = c-'a'+'A'; + } else { + line[char_counter++] = c; + } + } + } + } + //if( position_origin_flag && end_angle_origin_flag ){ + parse_cmd_line(); + //} + + // If there are no more characters in the serial read buffer to be processed and executed, + // this indicates that g-code streaming has either filled the planner buffer or has + // completed. In either case, auto-cycle start, if enabled, any queued moves. + uarm_swift_tick_run(); + protocol_auto_cycle_start(); + protocol_execute_realtime(); // Runtime command check point. + if (sys.abort) { return; } // Bail to main() program loop to reset system. + + report_parse_result(); + if( uarm.motor_position_check ){ + check_motor_positon(); + } + if ((uarm.restart_flag==true)&&(sys.state == STATE_IDLE)) + { + update_motor_position(); + uarm.restart_flag=false; + } + if(sys.print_reset_flag==true) + sys.print_reset_flag = false; + + } + + } + + return; /* Never reached */ +} + + +// Executes run-time commands, when required. This is called from various check points in the main +// program, primarily where there may be a while loop waiting for a buffer to clear space or any +// point where the execution time from the last check point may be more than a fraction of a second. +// This is a way to execute realtime commands asynchronously (aka multitasking) with grbl's g-code +// parsing and planning functions. This function also serves as an interface for the interrupts to +// set the system realtime flags, where only the main program handles them, removing the need to +// define more computationally-expensive volatile variables. This also provides a controlled way to +// execute certain tasks without having two or more instances of the same task, such as the planner +// recalculating the buffer upon a feedhold or override. +// NOTE: The sys_rt_exec_state variable flags are set by any process, step or serial interrupts, pinouts, +// limit switches, or the main program. +void protocol_execute_realtime() +{ + uint8_t rt_exec; // Temp variable to avoid calling volatile multiple times. + +// do { // If system is suspended, suspend loop restarts here. + + // Check and execute alarms. + rt_exec = sys_rt_exec_alarm; // Copy volatile sys_rt_exec_alarm. + if (rt_exec) { // Enter only if any bit flag is true + // System alarm. Everything has shutdown by something that has gone severely wrong. Report + // the source of the error to the user. If critical, Grbl disables by entering an infinite + // loop until system reset/abort. + sys.state = STATE_ALARM; // Set system alarm state + if (rt_exec & EXEC_ALARM_HARD_LIMIT) { + report_alarm_message(ALARM_HARD_LIMIT_ERROR); + } else if (rt_exec & EXEC_ALARM_SOFT_LIMIT) { + report_alarm_message(ALARM_SOFT_LIMIT_ERROR); + } else if (rt_exec & EXEC_ALARM_ABORT_CYCLE) { + report_alarm_message(ALARM_ABORT_CYCLE); + } else if (rt_exec & EXEC_ALARM_PROBE_FAIL) { + report_alarm_message(ALARM_PROBE_FAIL); + } else if (rt_exec & EXEC_ALARM_HOMING_FAIL) { + report_alarm_message(ALARM_HOMING_FAIL); + } + // Halt everything upon a critical event flag. Currently hard and soft limits flag this. + if (rt_exec & EXEC_CRITICAL_EVENT) { + report_feedback_message(MESSAGE_CRITICAL_EVENT); + bit_false_atomic(sys_rt_exec_state,EXEC_RESET); // Disable any existing reset + do { + // Nothing. Block EVERYTHING until user issues reset or power cycles. Hard limits + // typically occur while unattended or not paying attention. Gives the user time + // to do what is needed before resetting, like killing the incoming stream. The + // same could be said about soft limits. While the position is not lost, the incoming + // stream could be still engaged and cause a serious crash if it continues afterwards. + + // TODO: Allow status reports during a critical alarm. Still need to think about implications of this. +// if (sys_rt_exec_state & EXEC_STATUS_REPORT) { +// report_realtime_status(); +// bit_false_atomic(sys_rt_exec_state,EXEC_STATUS_REPORT); +// } + } while (bit_isfalse(sys_rt_exec_state,EXEC_RESET)); + } + bit_false_atomic(sys_rt_exec_alarm,0xFF); // Clear all alarm flags + } + + // Check amd execute realtime commands + rt_exec = sys_rt_exec_state; // Copy volatile sys_rt_exec_state. + if (rt_exec) { // Enter only if any bit flag is true + + // Execute system abort. + if (rt_exec & EXEC_RESET) { + sys.abort = true; // Only place this is set true. + return; // Nothing else to do but exit. + } + + // Execute and serial print status + if (rt_exec & EXEC_STATUS_REPORT) { + report_realtime_status(); + bit_false_atomic(sys_rt_exec_state,EXEC_STATUS_REPORT); + } + + // Execute hold states. + // NOTE: The math involved to calculate the hold should be low enough for most, if not all, + // operational scenarios. Once hold is initiated, the system enters a suspend state to block + // all main program processes until either reset or resumed. + if (rt_exec & (EXEC_MOTION_CANCEL | EXEC_FEED_HOLD | EXEC_SAFETY_DOOR)) { + + // TODO: CHECK MODE? How to handle this? Likely nothing, since it only works when IDLE and then resets Grbl. + + // State check for allowable states for hold methods. + if ((sys.state == STATE_IDLE) || (sys.state & (STATE_CYCLE | STATE_HOMING | STATE_MOTION_CANCEL | STATE_HOLD | STATE_SAFETY_DOOR))) { + + // If in CYCLE state, all hold states immediately initiate a motion HOLD. + if (sys.state == STATE_CYCLE) { + st_update_plan_block_parameters(); // Notify stepper module to recompute for hold deceleration. + sys.suspend = SUSPEND_ENABLE_HOLD; // Initiate holding cycle with flag. + } + // If IDLE, Grbl is not in motion. Simply indicate suspend ready state. + if (sys.state == STATE_IDLE) { sys.suspend = SUSPEND_ENABLE_READY; } + + // Execute and flag a motion cancel with deceleration and return to idle. Used primarily by probing cycle + // to halt and cancel the remainder of the motion. + if (rt_exec & EXEC_MOTION_CANCEL) { + // MOTION_CANCEL only occurs during a CYCLE, but a HOLD and SAFETY_DOOR may been initiated beforehand + // to hold the CYCLE. If so, only flag that motion cancel is complete. + if (sys.state == STATE_CYCLE) { sys.state = STATE_MOTION_CANCEL; } + sys.suspend |= SUSPEND_MOTION_CANCEL; // Indicate motion cancel when resuming. Special motion complete. + } + + // Execute a feed hold with deceleration, only during cycle. + if (rt_exec & EXEC_FEED_HOLD) { + // Block SAFETY_DOOR state from prematurely changing back to HOLD. + if (bit_isfalse(sys.state,STATE_SAFETY_DOOR)) { sys.state = STATE_HOLD; } + } + + // Execute a safety door stop with a feed hold, only during a cycle, and disable spindle/coolant. + // NOTE: Safety door differs from feed holds by stopping everything no matter state, disables powered + // devices (spindle/coolant), and blocks resuming until switch is re-engaged. The power-down is + // executed here, if IDLE, or when the CYCLE completes via the EXEC_CYCLE_STOP flag. + if (rt_exec & EXEC_SAFETY_DOOR) { + report_feedback_message(MESSAGE_SAFETY_DOOR_AJAR); + // If already in active, ready-to-resume HOLD, set CYCLE_STOP flag to force de-energize. + // NOTE: Only temporarily sets the 'rt_exec' variable, not the volatile 'rt_exec_state' variable. + if (sys.suspend & SUSPEND_ENABLE_READY) { bit_true(rt_exec,EXEC_CYCLE_STOP); } + sys.suspend |= SUSPEND_ENERGIZE; + sys.state = STATE_SAFETY_DOOR; + } + + } + bit_false_atomic(sys_rt_exec_state,(EXEC_MOTION_CANCEL | EXEC_FEED_HOLD | EXEC_SAFETY_DOOR)); + } + + // Execute a cycle start by starting the stepper interrupt to begin executing the blocks in queue. + if (rt_exec & EXEC_CYCLE_START) { + // Block if called at same time as the hold commands: feed hold, motion cancel, and safety door. + // Ensures auto-cycle-start doesn't resume a hold without an explicit user-input. + if (!(rt_exec & (EXEC_FEED_HOLD | EXEC_MOTION_CANCEL | EXEC_SAFETY_DOOR))) { + // Cycle start only when IDLE or when a hold is complete and ready to resume. + // NOTE: SAFETY_DOOR is implicitly blocked. It reverts to HOLD when the door is closed. + if ((sys.state == STATE_IDLE) || ((sys.state & (STATE_HOLD | STATE_MOTION_CANCEL)) && (sys.suspend & SUSPEND_ENABLE_READY))) { + // Re-energize powered components, if disabled by SAFETY_DOOR. + if (sys.suspend & SUSPEND_ENERGIZE) { + // Delayed Tasks: Restart spindle and coolant, delay to power-up, then resume cycle. + if (gc_state.modal.spindle != SPINDLE_DISABLE) { + spindle_set_state(gc_state.modal.spindle, gc_state.spindle_speed); + delay_ms(SAFETY_DOOR_SPINDLE_DELAY); // TODO: Blocking function call. Need a non-blocking one eventually. + } + if (gc_state.modal.coolant != COOLANT_DISABLE) { + coolant_set_state(gc_state.modal.coolant); + delay_ms(SAFETY_DOOR_COOLANT_DELAY); // TODO: Blocking function call. Need a non-blocking one eventually. + } + // TODO: Install return to pre-park position. + } + // Start cycle only if queued motions exist in planner buffer and the motion is not canceled. + if (plan_get_current_block() && bit_isfalse(sys.suspend,SUSPEND_MOTION_CANCEL)) { + sys.state = STATE_CYCLE; + st_prep_buffer(); // Initialize step segment buffer before beginning cycle. + st_wake_up(); + } else { // Otherwise, do nothing. Set and resume IDLE state. + sys.state = STATE_IDLE; + } + sys.suspend = SUSPEND_DISABLE; // Break suspend state. + } + } + bit_false_atomic(sys_rt_exec_state,EXEC_CYCLE_START); + } + + // Reinitializes the cycle plan and stepper system after a feed hold for a resume. Called by + // realtime command execution in the main program, ensuring that the planner re-plans safely. + // NOTE: Bresenham algorithm variables are still maintained through both the planner and stepper + // cycle reinitializations. The stepper path should continue exactly as if nothing has happened. + // NOTE: EXEC_CYCLE_STOP is set by the stepper subsystem when a cycle or feed hold completes. + if (rt_exec & EXEC_CYCLE_STOP) { + if (sys.state & (STATE_HOLD | STATE_SAFETY_DOOR) && !(sys.soft_limit)) { + // Hold complete. Set to indicate ready to resume. Remain in HOLD or DOOR states until user + // has issued a resume command or reset. + if (sys.suspend & SUSPEND_ENERGIZE) { // De-energize system if safety door has been opened. + spindle_stop(); + coolant_stop(); + } + bit_true(sys.suspend,SUSPEND_ENABLE_READY); + } else { // Motion is complete. Includes CYCLE, HOMING, and MOTION_CANCEL states. + sys.suspend = SUSPEND_DISABLE; + sys.state = STATE_IDLE; + } + bit_false_atomic(sys_rt_exec_state,EXEC_CYCLE_STOP); + } + + } + + // Overrides flag byte (sys.override) and execution should be installed here, since they + // are realtime and require a direct and controlled interface to the main stepper program. + + // Reload step segment buffer + if (sys.state & (STATE_CYCLE | STATE_HOLD | STATE_MOTION_CANCEL | STATE_SAFETY_DOOR | STATE_HOMING)) { st_prep_buffer(); } + + // If safety door was opened, actively check when safety door is closed and ready to resume. + // NOTE: This unlocks the SAFETY_DOOR state to a HOLD state, such that CYCLE_START can activate a resume. + if (sys.state == STATE_SAFETY_DOOR) { + if (bit_istrue(sys.suspend,SUSPEND_ENABLE_READY)) { + if (!(system_check_safety_door_ajar())) { + sys.state = STATE_HOLD; // Update to HOLD state to indicate door is closed and ready to resume. + } + } + } + +// } while(sys.suspend); // Check for system suspend state before exiting. + +} + + +// Block until all buffered steps are executed or in a cycle state. Works with feed hold +// during a synchronize call, if it should happen. Also, waits for clean cycle end. +void protocol_buffer_synchronize() +{ + // If system is queued, ensure cycle resumes if the auto start flag is present. + protocol_auto_cycle_start(); + do { + protocol_execute_realtime(); // Check and execute run-time commands + if (sys.abort) { return; } // Check for system abort + } while (plan_get_current_block() || (sys.state == STATE_CYCLE)); +} + + +// Auto-cycle start has two purposes: 1. Resumes a plan_synchronize() call from a function that +// requires the planner buffer to empty (spindle enable, dwell, etc.) 2. As a user setting that +// automatically begins the cycle when a user enters a valid motion command manually. This is +// intended as a beginners feature to help new users to understand g-code. It can be disabled +// as a beginner tool, but (1.) still operates. If disabled, the operation of cycle start is +// manually issuing a cycle start command whenever the user is ready and there is a valid motion +// command in the planner queue. +// NOTE: This function is called from the main loop, buffer sync, and mc_line() only and executes +// when one of these conditions exist respectively: There are no more blocks sent (i.e. streaming +// is finished, single commands), a command that needs to wait for the motions in the buffer to +// execute calls a buffer sync, or the planner buffer is full and ready to go. +void protocol_auto_cycle_start() { + if( sys.suspend ){ return; } + bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); +} diff --git a/src/protocol.h b/src/protocol.h new file mode 100755 index 0000000..2461a65 --- /dev/null +++ b/src/protocol.h @@ -0,0 +1,58 @@ +/* + protocol.h - controls Grbl execution protocol and procedures + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef protocol_h +#define protocol_h + +// Line buffer size from the serial input stream to be executed. +// NOTE: Not a problem except for extreme cases, but the line buffer size can be too small +// and g-code blocks can get truncated. Officially, the g-code standards support up to 256 +// characters. In future versions, this will be increased, when we know how much extra +// memory space we can invest into here or we re-write the g-code parser not to have this +// buffer. +#ifndef LINE_BUFFER_SIZE + #define LINE_MAX_SIZE 20 + #define LINE_BUFFER_SIZE 80 +#endif + +// Starts Grbl main loop. It handles all incoming characters from the serial port and executes +// them as they complete. It is also responsible for finishing the initialization procedures. +void protocol_main_loop(); + +// Checks and executes a realtime command at various stop points in main program +void protocol_execute_realtime(); + +// Notify the stepper subsystem to start executing the g-code program in buffer. +// void protocol_cycle_start(); + +// Reinitializes the buffer after a feed hold for a resume. +// void protocol_cycle_reinitialize(); + +// Initiates a feed hold of the running program +// void protocol_feed_hold(); + +// Executes the auto cycle feature, if enabled. +void protocol_auto_cycle_start(); + +// Block until all buffered steps are executed +void protocol_buffer_synchronize(); + +#endif diff --git a/src/report.c b/src/report.c new file mode 100755 index 0000000..2a9eedc --- /dev/null +++ b/src/report.c @@ -0,0 +1,530 @@ +/* + report.c - reporting and messaging methods + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +/* + This file functions as the primary feedback interface for Grbl. Any outgoing data, such + as the protocol status messages, feedback messages, and status reports, are stored here. + For the most part, these functions primarily are called from protocol.c methods. If a + different style feedback is desired (i.e. JSON), then a user can change these following + methods to accomodate their needs. +*/ + +#include "grbl.h" + + +// Handles the primary confirmation protocol response for streaming interfaces and human-feedback. +// For every incoming line, this method responds with an 'ok' for a successful command or an +// 'error:' to indicate some error event with the line or some critical system error during +// operation. Errors events can originate from the g-code parser, settings module, or asynchronously +// from a critical error, such as a triggered hard limit. Interface should always monitor for these +// responses. +// NOTE: In silent mode, all error codes are greater than zero. +// TODO: Install silent mode to return only numeric values, primarily for GUIs. +void report_status_message(uint8_t status_code) +{ + if (status_code == 0) { // STATUS_OK + printPgmString(PSTR("ok\r\n")); + } else { + printPgmString(PSTR("error: ")); + #ifdef REPORT_GUI_MODE + print_uint8_base10(status_code); + #else + switch(status_code) { + case STATUS_EXPECTED_COMMAND_LETTER: + printPgmString(PSTR("Expected command letter")); break; + case STATUS_BAD_NUMBER_FORMAT: + printPgmString(PSTR("Bad number format")); break; + case STATUS_INVALID_STATEMENT: + printPgmString(PSTR("Invalid statement")); break; + case STATUS_NEGATIVE_VALUE: + printPgmString(PSTR("Value < 0")); break; + case STATUS_SETTING_DISABLED: + printPgmString(PSTR("Setting disabled")); break; + case STATUS_SETTING_STEP_PULSE_MIN: + printPgmString(PSTR("Value < 3 usec")); break; + case STATUS_SETTING_READ_FAIL: + printPgmString(PSTR("EEPROM read fail. Using defaults")); break; + case STATUS_IDLE_ERROR: + printPgmString(PSTR("Not idle")); break; + case STATUS_ALARM_LOCK: + printPgmString(PSTR("Alarm lock")); break; + case STATUS_SOFT_LIMIT_ERROR: + printPgmString(PSTR("Homing not enabled")); break; + case STATUS_OVERFLOW: + printString( "E23\n" ); + //printPgmString(PSTR("Line overflow")); + break; + #ifdef MAX_STEP_RATE_HZ + case STATUS_MAX_STEP_RATE_EXCEEDED: + printPgmString(PSTR("Step rate > 30kHz")); break; + #endif + // Common g-code parser errors. + case STATUS_GCODE_MODAL_GROUP_VIOLATION: + printPgmString(PSTR("Modal group violation")); break; + case STATUS_GCODE_UNSUPPORTED_COMMAND: + printString( "E20\n" ); + //printPgmString(PSTR("Unsupported command")); + + break; + case STATUS_GCODE_UNDEFINED_FEED_RATE: + printPgmString(PSTR("Undefined feed rate")); break; + + case STATUS_UARM_ERROR: + printString( "E21\n" ); + break; + case STATUS_ENCODER_ERROR: + printString("E26\n"); + break; + case STATUS_ENABLE_ERROR: + printString("E27\n"); + break; + default: + // Remaining g-code parser errors with error codes + printPgmString(PSTR("Invalid gcode ID:")); + print_uint8_base10(status_code); // Print error code for user reference + } + #endif + printPgmString(PSTR("\r\n")); + + } + +} + +// Prints alarm messages. +void report_alarm_message(int8_t alarm_code) +{ + printPgmString(PSTR("ALARM: ")); + #ifdef REPORT_GUI_MODE + print_uint8_base10(alarm_code); + #else + switch (alarm_code) { + case ALARM_HARD_LIMIT_ERROR: + printPgmString(PSTR("Hard limit")); break; + case ALARM_SOFT_LIMIT_ERROR: + printPgmString(PSTR("Soft limit")); break; + case ALARM_ABORT_CYCLE: + printPgmString(PSTR("Abort during cycle")); break; + case ALARM_PROBE_FAIL: + printPgmString(PSTR("Probe fail")); break; + case ALARM_HOMING_FAIL: + printPgmString(PSTR("Homing fail")); break; + } + #endif + printPgmString(PSTR("\r\n")); + delay_ms(500); // Force delay to ensure message clears serial write buffer. +} + +// Prints feedback messages. This serves as a centralized method to provide additional +// user feedback for things that are not of the status/alarm message protocol. These are +// messages such as setup warnings, switch toggling, and how to exit alarms. +// NOTE: For interfaces, messages are always placed within brackets. And if silent mode +// is installed, the message number codes are less than zero. +// TODO: Install silence feedback messages option in settings +void report_feedback_message(uint8_t message_code) +{ + printPgmString(PSTR("[")); + switch(message_code) { + case MESSAGE_CRITICAL_EVENT: + printPgmString(PSTR("Reset to continue")); break; + case MESSAGE_ALARM_LOCK: + printPgmString(PSTR("'$H'|'$X' to unlock")); break; + case MESSAGE_ALARM_UNLOCK: + printPgmString(PSTR("Caution: Unlocked")); break; + case MESSAGE_ENABLED: + printPgmString(PSTR("Enabled")); break; + case MESSAGE_DISABLED: + printPgmString(PSTR("Disabled")); break; + case MESSAGE_SAFETY_DOOR_AJAR: + printPgmString(PSTR("Check Door")); break; + case MESSAGE_PROGRAM_END: + printPgmString(PSTR("Pgm End")); break; + case MESSAGE_RESTORE_DEFAULTS: + printPgmString(PSTR("Restoring defaults")); break; + } + printPgmString(PSTR("]\r\n")); +} + + +// Welcome message +void report_init_message() +{ + printPgmString(PSTR("\r\nGrbl " GRBL_VERSION " ['$' for help]\r\n")); +} + +// Grbl help message +void report_grbl_help() { + #ifndef REPORT_GUI_MODE + printPgmString(PSTR("$$ (view Grbl settings)\r\n" + "$# (view # parameters)\r\n" + "$G (view parser state)\r\n" + "$I (view build info)\r\n" + "$N (view startup blocks)\r\n" + "$x=value (save Grbl setting)\r\n" + "$Nx=line (save startup block)\r\n" + "$C (check gcode mode)\r\n" + "$X (kill alarm lock)\r\n" + "$H (run homing cycle)\r\n" + "~ (cycle start)\r\n" + "! (feed hold)\r\n" + "? (current status)\r\n" + "ctrl-x (reset Grbl)\r\n")); + #endif +} + + +// Grbl global settings print out. +// NOTE: The numbering scheme here must correlate to storing in settings.c +void report_grbl_settings() { + // Print Grbl settings. + #ifdef REPORT_GUI_MODE + printPgmString(PSTR("$0=")); print_uint8_base10(settings.pulse_microseconds); + printPgmString(PSTR("\r\n$1=")); print_uint8_base10(settings.stepper_idle_lock_time); + printPgmString(PSTR("\r\n$2=")); print_uint8_base10(settings.step_invert_mask); + printPgmString(PSTR("\r\n$3=")); print_uint8_base10(settings.dir_invert_mask); + printPgmString(PSTR("\r\n$4=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_ST_ENABLE)); + printPgmString(PSTR("\r\n$5=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_LIMIT_PINS)); + printPgmString(PSTR("\r\n$6=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_PROBE_PIN)); + printPgmString(PSTR("\r\n$10=")); print_uint8_base10(settings.status_report_mask); + printPgmString(PSTR("\r\n$11=")); printFloat_SettingValue(settings.junction_deviation); + printPgmString(PSTR("\r\n$12=")); printFloat_SettingValue(settings.arc_tolerance); + printPgmString(PSTR("\r\n$13=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_REPORT_INCHES)); + printPgmString(PSTR("\r\n$20=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_SOFT_LIMIT_ENABLE)); + printPgmString(PSTR("\r\n$21=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)); + printPgmString(PSTR("\r\n$22=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_HOMING_ENABLE)); + printPgmString(PSTR("\r\n$23=")); print_uint8_base10(settings.homing_dir_mask); + printPgmString(PSTR("\r\n$24=")); printFloat_SettingValue(settings.homing_feed_rate); + printPgmString(PSTR("\r\n$25=")); printFloat_SettingValue(settings.homing_seek_rate); + printPgmString(PSTR("\r\n$26=")); print_uint8_base10(settings.homing_debounce_delay); + printPgmString(PSTR("\r\n$27=")); printFloat_SettingValue(settings.homing_pulloff); + printPgmString(PSTR("\r\n")); + #else + printPgmString(PSTR("$0=")); print_uint8_base10(settings.pulse_microseconds); + printPgmString(PSTR(" (step pulse, usec)\r\n$1=")); print_uint8_base10(settings.stepper_idle_lock_time); + printPgmString(PSTR(" (step idle delay, msec)\r\n$2=")); print_uint8_base10(settings.step_invert_mask); + printPgmString(PSTR(" (step port invert mask:")); print_uint8_base2(settings.step_invert_mask); + printPgmString(PSTR(")\r\n$3=")); print_uint8_base10(settings.dir_invert_mask); + printPgmString(PSTR(" (dir port invert mask:")); print_uint8_base2(settings.dir_invert_mask); + printPgmString(PSTR(")\r\n$4=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_ST_ENABLE)); + printPgmString(PSTR(" (step enable invert, bool)\r\n$5=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_LIMIT_PINS)); + printPgmString(PSTR(" (limit pins invert, bool)\r\n$6=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_INVERT_PROBE_PIN)); + printPgmString(PSTR(" (probe pin invert, bool)\r\n$10=")); print_uint8_base10(settings.status_report_mask); + printPgmString(PSTR(" (status report mask:")); print_uint8_base2(settings.status_report_mask); + printPgmString(PSTR(")\r\n$11=")); printFloat_SettingValue(settings.junction_deviation); + printPgmString(PSTR(" (junction deviation, mm)\r\n$12=")); printFloat_SettingValue(settings.arc_tolerance); + printPgmString(PSTR(" (arc tolerance, mm)\r\n$13=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_REPORT_INCHES)); + printPgmString(PSTR(" (report inches, bool)\r\n$20=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_SOFT_LIMIT_ENABLE)); + printPgmString(PSTR(" (soft limits, bool)\r\n$21=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)); + printPgmString(PSTR(" (hard limits, bool)\r\n$22=")); print_uint8_base10(bit_istrue(settings.flags,BITFLAG_HOMING_ENABLE)); + printPgmString(PSTR(" (homing cycle, bool)\r\n$23=")); print_uint8_base10(settings.homing_dir_mask); + printPgmString(PSTR(" (homing dir invert mask:")); print_uint8_base2(settings.homing_dir_mask); + printPgmString(PSTR(")\r\n$24=")); printFloat_SettingValue(settings.homing_feed_rate); + printPgmString(PSTR(" (homing feed, mm/min)\r\n$25=")); printFloat_SettingValue(settings.homing_seek_rate); + printPgmString(PSTR(" (homing seek, mm/min)\r\n$26=")); print_uint8_base10(settings.homing_debounce_delay); + printPgmString(PSTR(" (homing debounce, msec)\r\n$27=")); printFloat_SettingValue(settings.homing_pulloff); + printPgmString(PSTR(" (homing pull-off, mm)\r\n")); + #endif + + // Print axis settings + uint8_t idx, set_idx; + uint8_t val = AXIS_SETTINGS_START_VAL; + for (set_idx=0; set_idxline_number; + } + printInteger(ln); + #endif + + #ifdef REPORT_REALTIME_RATE + // Report realtime rate + printPgmString(PSTR(",F:")); + printFloat_RateValue(st_get_realtime_rate()); + #endif + + if (bit_istrue(settings.status_report_mask,BITFLAG_RT_STATUS_LIMIT_PINS)) { + printPgmString(PSTR(",Lim:")); + print_unsigned_int8(limits_get_state(),2,N_AXIS); + } + + #ifdef REPORT_CONTROL_PIN_STATE + printPgmString(PSTR(",Ctl:")); + print_uint8_base2(CONTROL_PIN & CONTROL_MASK); + #endif + + printPgmString(PSTR(">\r\n")); +} diff --git a/src/report.h b/src/report.h new file mode 100755 index 0000000..b832fd9 --- /dev/null +++ b/src/report.h @@ -0,0 +1,117 @@ +/* + report.h - reporting and messaging methods + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ +#ifndef report_h +#define report_h + +// Define Grbl status codes. +#define STATUS_OK 0 +#define STATUS_EXPECTED_COMMAND_LETTER 1 +#define STATUS_BAD_NUMBER_FORMAT 2 +#define STATUS_INVALID_STATEMENT 3 +#define STATUS_NEGATIVE_VALUE 4 +#define STATUS_SETTING_DISABLED 5 +#define STATUS_SETTING_STEP_PULSE_MIN 6 +#define STATUS_SETTING_READ_FAIL 7 +#define STATUS_IDLE_ERROR 8 +#define STATUS_ALARM_LOCK 9 +#define STATUS_SOFT_LIMIT_ERROR 10 +#define STATUS_OVERFLOW 11 +#define STATUS_MAX_STEP_RATE_EXCEEDED 12 + +#define STATUS_GCODE_UNSUPPORTED_COMMAND 20 +#define STATUS_GCODE_MODAL_GROUP_VIOLATION 21 +#define STATUS_GCODE_UNDEFINED_FEED_RATE 22 +#define STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER 23 +#define STATUS_GCODE_AXIS_COMMAND_CONFLICT 24 +#define STATUS_GCODE_WORD_REPEATED 25 +#define STATUS_GCODE_NO_AXIS_WORDS 26 +#define STATUS_GCODE_INVALID_LINE_NUMBER 27 +#define STATUS_GCODE_VALUE_WORD_MISSING 28 +#define STATUS_GCODE_UNSUPPORTED_COORD_SYS 29 +#define STATUS_GCODE_G53_INVALID_MOTION_MODE 30 +#define STATUS_GCODE_AXIS_WORDS_EXIST 31 +#define STATUS_GCODE_NO_AXIS_WORDS_IN_PLANE 32 +#define STATUS_GCODE_INVALID_TARGET 33 +#define STATUS_GCODE_ARC_RADIUS_ERROR 34 +#define STATUS_GCODE_NO_OFFSETS_IN_PLANE 35 +#define STATUS_GCODE_UNUSED_WORDS 36 +#define STATUS_GCODE_G43_DYNAMIC_AXIS_ERROR 37 + +#define STATUS_UARM_ERROR 50 +#define STATUS_ENCODER_ERROR 51 +#define STATUS_ENABLE_ERROR 52 + +// Define Grbl alarm codes. +#define ALARM_HARD_LIMIT_ERROR 1 +#define ALARM_SOFT_LIMIT_ERROR 2 +#define ALARM_ABORT_CYCLE 3 +#define ALARM_PROBE_FAIL 4 +#define ALARM_HOMING_FAIL 5 + +// Define Grbl feedback message codes. +#define MESSAGE_CRITICAL_EVENT 1 +#define MESSAGE_ALARM_LOCK 2 +#define MESSAGE_ALARM_UNLOCK 3 +#define MESSAGE_ENABLED 4 +#define MESSAGE_DISABLED 5 +#define MESSAGE_SAFETY_DOOR_AJAR 6 +#define MESSAGE_PROGRAM_END 7 +#define MESSAGE_RESTORE_DEFAULTS 8 + +// Prints system status messages. +void report_status_message(uint8_t status_code); + +// Prints system alarm messages. +void report_alarm_message(int8_t alarm_code); + +// Prints miscellaneous feedback messages. +void report_feedback_message(uint8_t message_code); + +// Prints welcome message +void report_init_message(); + +// Prints Grbl help and current global settings +void report_grbl_help(); + +// Prints Grbl global settings +void report_grbl_settings(); + +// Prints an echo of the pre-parsed line received right before execution. +void report_echo_line_received(char *line); + +// Prints realtime status report +void report_realtime_status(); + +// Prints recorded probe position +void report_probe_parameters(); + +// Prints Grbl NGC parameters (coordinate offsets, probe) +void report_ngc_parameters(); + +// Prints current g-code parser mode state +void report_gcode_modes(); + +// Prints startup line +void report_startup_line(uint8_t n, char *line); + +// Prints build info and user info +void report_build_info(char *line); + +#endif diff --git a/src/serial.c b/src/serial.c new file mode 100755 index 0000000..b9ce387 --- /dev/null +++ b/src/serial.c @@ -0,0 +1,523 @@ +/* + serial.c - Low level functions for sending and recieving bytes via the serial port + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_debug.h" +#include "uarm_protocol.h" +#include "uarm_common.h" +#include "uarm_peripheral.h" +#include "uarm_coord_convert.h" +#include "uarm_angle.h" +#include "uarm_swift.h" + + +uint8_t serial_rx_buffer[RX_BUFFER_SIZE]; +uint8_t serial_rx_buffer_head = 0; +volatile uint8_t serial_rx_buffer_tail = 0; + +uint8_t serial_tx_buffer[TX_BUFFER_SIZE]; +uint8_t serial_tx_buffer_head = 0; +volatile uint8_t serial_tx_buffer_tail = 0; +extern uint8_t syn_pack_remain; +enum serial_mode_e{ + UART0 = 0, + UART1, + UART2, + UART3, +} current_uart = UART0; +static bool check_flag=false; + +#ifdef ENABLE_XONXOFF + volatile uint8_t flow_ctrl = XON_SENT; // Flow control state variable +#endif + + +// Returns the number of bytes used in the RX serial buffer. +uint8_t serial_get_rx_buffer_count() +{ + uint8_t rtail = serial_rx_buffer_tail; // Copy to limit multiple calls to volatile + if (serial_rx_buffer_head >= rtail) { return(serial_rx_buffer_head-rtail); } + return (RX_BUFFER_SIZE - (rtail-serial_rx_buffer_head)); +} + + +// Returns the number of bytes used in the TX serial buffer. +// NOTE: Not used except for debugging and ensuring no TX bottlenecks. +uint8_t serial_get_tx_buffer_count() +{ + uint8_t ttail = serial_tx_buffer_tail; // Copy to limit multiple calls to volatile + if (serial_tx_buffer_head >= ttail) { return(serial_tx_buffer_head-ttail); } + return (TX_BUFFER_SIZE - (ttail-serial_tx_buffer_head)); +} + + +void serial_init() +{ + /******************** uart0 ********************/ + // Set baud rate + #if BAUD_RATE < 57600 + uint16_t UBRR0_value = ((F_CPU / (8L * BAUD_RATE)) - 1)/2 ; + UCSR0A &= ~(1 << U2X0); // baud doubler off - Only needed on Uno XXX + #else + uint16_t UBRR0_value = ((F_CPU / (4L * BAUD_RATE)) - 1)/2; + UCSR0A |= (1 << U2X0); // baud doubler on for high baud rates, i.e. 115200 + #endif + UBRR0H = UBRR0_value >> 8; + UBRR0L = UBRR0_value; + + // enable rx and tx + UCSR0B |= 1<> 8; + UBRR1L = UBRR1_value; + + // enable rx and tx + UCSR1B |= 1<> 8; + UBRR2L = UBRR2_value; + + // enable rx and tx + UCSR2B |= 1<> 8; + UBRR3L = UBRR3_value; + + // enable rx and tx + UCSR3B |= 1<= RX_BUFFER_FULL) && flow_ctrl == XON_SENT) { + flow_ctrl = SEND_XOFF; + UCSR0B |= (1 << UDRIE0); // Force TX + } + #endif + + } + break; + //TODO: else alarm on overflow? + } +} + +ISR(USART1_RX_vect) +{ + uint8_t data = UDR1; + uint8_t next_head; + current_uart = UART1; + + // Pick off realtime command characters directly from the serial stream. These characters are + // not passed into the buffer, but these set system state flag bits for realtime execution. + switch (data) { + case CMD_STATUS_REPORT: bit_true_atomic(sys_rt_exec_state, EXEC_STATUS_REPORT); break; // Set as true + case CMD_CYCLE_START: bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); break; // Set as true + case CMD_FEED_HOLD: bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); break; // Set as true + case CMD_SAFETY_DOOR: bit_true_atomic(sys_rt_exec_state, EXEC_SAFETY_DOOR); break; // Set as true + case CMD_RESET: mc_reset(); break; // Call motion control reset routine. + default: // Write character to buffer + next_head = serial_rx_buffer_head + 1; + if (next_head == RX_BUFFER_SIZE) { next_head = 0; } + + // Write data to buffer unless it is full. + if (next_head != serial_rx_buffer_tail) { + serial_rx_buffer[serial_rx_buffer_head] = data; + serial_rx_buffer_head = next_head; + + #ifdef ENABLE_XONXOFF + if ((serial_get_rx_buffer_count() >= RX_BUFFER_FULL) && flow_ctrl == XON_SENT) { + flow_ctrl = SEND_XOFF; + UCSR1B |= (1 << UDRIE1); // Force TX + } + #endif + + } + //TODO: else alarm on overflow? + } +} + +ISR(USART2_RX_vect) +{ + uint8_t data = UDR2; + uint8_t next_head; + current_uart = UART2; + + // Pick off realtime command characters directly from the serial stream. These characters are + // not passed into the buffer, but these set system state flag bits for realtime execution. + switch (data) { + case CMD_STATUS_REPORT: bit_true_atomic(sys_rt_exec_state, EXEC_STATUS_REPORT); break; // Set as true + case CMD_CYCLE_START: bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); break; // Set as true + case CMD_FEED_HOLD: bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); break; // Set as true + case CMD_SAFETY_DOOR: bit_true_atomic(sys_rt_exec_state, EXEC_SAFETY_DOOR); break; // Set as true + case CMD_RESET: mc_reset(); break; // Call motion control reset routine. + default: // Write character to buffer + next_head = serial_rx_buffer_head + 1; + if (next_head == RX_BUFFER_SIZE) { next_head = 0; } + + // Write data to buffer unless it is full. + if (next_head != serial_rx_buffer_tail) { + serial_rx_buffer[serial_rx_buffer_head] = data; + serial_rx_buffer_head = next_head; + + #ifdef ENABLE_XONXOFF + if ((serial_get_rx_buffer_count() >= RX_BUFFER_FULL) && flow_ctrl == XON_SENT) { + flow_ctrl = SEND_XOFF; + UCSR2B |= (1 << UDRIE2); // Force TX + } + #endif + + } + //TODO: else alarm on overflow? + } +} + +ISR(USART3_RX_vect) +{ + uint8_t data = UDR3; + uint8_t next_head; + current_uart = UART3; + + // Pick off realtime command characters directly from the serial stream. These characters are + // not passed into the buffer, but these set system state flag bits for realtime execution. + switch (data) { + case CMD_STATUS_REPORT: bit_true_atomic(sys_rt_exec_state, EXEC_STATUS_REPORT); break; // Set as true + case CMD_CYCLE_START: bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); break; // Set as true + case CMD_FEED_HOLD: bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); break; // Set as true + case CMD_SAFETY_DOOR: bit_true_atomic(sys_rt_exec_state, EXEC_SAFETY_DOOR); break; // Set as true + case CMD_RESET: mc_reset(); break; // Call motion control reset routine. + default: // Write character to buffer + next_head = serial_rx_buffer_head + 1; + if (next_head == RX_BUFFER_SIZE) { next_head = 0; } + + // Write data to buffer unless it is full. + if (next_head != serial_rx_buffer_tail) { + serial_rx_buffer[serial_rx_buffer_head] = data; + serial_rx_buffer_head = next_head; + + #ifdef ENABLE_XONXOFF + if ((serial_get_rx_buffer_count() >= RX_BUFFER_FULL) && flow_ctrl == XON_SENT) { + flow_ctrl = SEND_XOFF; + UCSR3B |= (1 << UDRIE3); // Force TX + } + #endif + + } + //TODO: else alarm on overflow? + } +} + + + +void serial_reset_read_buffer() +{ + serial_rx_buffer_tail = serial_rx_buffer_head; + + #ifdef ENABLE_XONXOFF + flow_ctrl = XON_SENT; + #endif +} diff --git a/src/serial.h b/src/serial.h new file mode 100755 index 0000000..4cdbcb0 --- /dev/null +++ b/src/serial.h @@ -0,0 +1,64 @@ +/* + serial.c - Low level functions for sending and recieving bytes via the serial port + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef serial_h +#define serial_h + + +#ifndef RX_BUFFER_SIZE + #define RX_BUFFER_SIZE 128 +#endif +#ifndef TX_BUFFER_SIZE + #define TX_BUFFER_SIZE 128 +#endif + +#define SERIAL_NO_DATA 0xff + +#ifdef ENABLE_XONXOFF + #define RX_BUFFER_FULL 96 // XOFF high watermark + #define RX_BUFFER_LOW 64 // XON low watermark + #define SEND_XOFF 1 + #define SEND_XON 2 + #define XOFF_SENT 3 + #define XON_SENT 4 + #define XOFF_CHAR 0x13 + #define XON_CHAR 0x11 +#endif + +void serial_init(); + +// Writes one byte to the TX serial buffer. Called by main program. +void serial_write(uint8_t data); + +// Fetches the first byte in the serial read buffer. Called by main program. +uint8_t serial_read(); + +// Reset and empty data in read buffer. Used by e-stop and reset. +void serial_reset_read_buffer(); + +// Returns the number of bytes used in the RX serial buffer. +uint8_t serial_get_rx_buffer_count(); + +// Returns the number of bytes used in the TX serial buffer. +// NOTE: Not used except for debugging and ensuring no TX bottlenecks. +uint8_t serial_get_tx_buffer_count(); + +#endif diff --git a/src/settings.c b/src/settings.c new file mode 100755 index 0000000..6369067 --- /dev/null +++ b/src/settings.c @@ -0,0 +1,328 @@ +/* + settings.c - eeprom configuration handling + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + +settings_t settings; + + +// Method to store startup lines into EEPROM +void settings_store_startup_line(uint8_t n, char *line) +{ + uint32_t addr = n*(LINE_BUFFER_SIZE+1)+EEPROM_ADDR_STARTUP_BLOCK; + memcpy_to_eeprom_with_checksum(addr,(char*)line, LINE_BUFFER_SIZE); +} + + +// Method to store build info into EEPROM +void settings_store_build_info(char *line) +{ + memcpy_to_eeprom_with_checksum(EEPROM_ADDR_BUILD_INFO,(char*)line, LINE_BUFFER_SIZE); +} + + +// Method to store coord data parameters into EEPROM +void settings_write_coord_data(uint8_t coord_select, float *coord_data) +{ + uint32_t addr = coord_select*(sizeof(float)*N_AXIS+1) + EEPROM_ADDR_PARAMETERS; + memcpy_to_eeprom_with_checksum(addr,(char*)coord_data, sizeof(float)*N_AXIS); +} + + +// Method to store Grbl global settings struct and version number into EEPROM +void write_global_settings() +{ + eeprom_put_char(0, SETTINGS_VERSION); + memcpy_to_eeprom_with_checksum(EEPROM_ADDR_GLOBAL, (char*)&settings, sizeof(settings_t)); +} + + +// Method to restore EEPROM-saved Grbl global settings back to defaults. +void settings_restore(uint8_t restore_flag) { + if (restore_flag & SETTINGS_RESTORE_DEFAULTS) { + settings.pulse_microseconds = DEFAULT_STEP_PULSE_MICROSECONDS; + settings.stepper_idle_lock_time = DEFAULT_STEPPER_IDLE_LOCK_TIME; + settings.step_invert_mask = DEFAULT_STEPPING_INVERT_MASK; + settings.dir_invert_mask = DEFAULT_DIRECTION_INVERT_MASK; + settings.status_report_mask = DEFAULT_STATUS_REPORT_MASK; + settings.junction_deviation = DEFAULT_JUNCTION_DEVIATION; + settings.arc_tolerance = DEFAULT_ARC_TOLERANCE; + settings.homing_dir_mask = DEFAULT_HOMING_DIR_MASK; + settings.homing_feed_rate = DEFAULT_HOMING_FEED_RATE; + settings.homing_seek_rate = DEFAULT_HOMING_SEEK_RATE; + settings.homing_debounce_delay = DEFAULT_HOMING_DEBOUNCE_DELAY; + settings.homing_pulloff = DEFAULT_HOMING_PULLOFF; + + settings.flags = 0; + if (DEFAULT_REPORT_INCHES) { settings.flags |= BITFLAG_REPORT_INCHES; } + if (DEFAULT_INVERT_ST_ENABLE) { settings.flags |= BITFLAG_INVERT_ST_ENABLE; } + if (DEFAULT_INVERT_LIMIT_PINS) { settings.flags |= BITFLAG_INVERT_LIMIT_PINS; } + if (DEFAULT_SOFT_LIMIT_ENABLE) { settings.flags |= BITFLAG_SOFT_LIMIT_ENABLE; } + if (DEFAULT_HARD_LIMIT_ENABLE) { settings.flags |= BITFLAG_HARD_LIMIT_ENABLE; } + if (DEFAULT_HOMING_ENABLE) { settings.flags |= BITFLAG_HOMING_ENABLE; } + + settings.steps_per_mm[X_AXIS] = DEFAULT_X_STEPS_PER_MM; + settings.steps_per_mm[Y_AXIS] = DEFAULT_Y_STEPS_PER_MM; + settings.steps_per_mm[Z_AXIS] = DEFAULT_Z_STEPS_PER_MM; + settings.max_rate[X_AXIS] = DEFAULT_X_MAX_RATE; + settings.max_rate[Y_AXIS] = DEFAULT_Y_MAX_RATE; + settings.max_rate[Z_AXIS] = DEFAULT_Z_MAX_RATE; + settings.acceleration[X_AXIS] = DEFAULT_X_ACCELERATION; + settings.acceleration[Y_AXIS] = DEFAULT_Y_ACCELERATION; + settings.acceleration[Z_AXIS] = DEFAULT_Z_ACCELERATION; + settings.max_travel[X_AXIS] = (-DEFAULT_X_MAX_TRAVEL); + settings.max_travel[Y_AXIS] = (-DEFAULT_Y_MAX_TRAVEL); + settings.max_travel[Z_AXIS] = (-DEFAULT_Z_MAX_TRAVEL); + + write_global_settings(); + } + + if (restore_flag & SETTINGS_RESTORE_PARAMETERS) { + uint8_t idx; + float coord_data[N_AXIS]; + memset(&coord_data, 0, sizeof(coord_data)); + for (idx=0; idx <= SETTING_INDEX_NCOORD; idx++) { settings_write_coord_data(idx, coord_data); } + } + + if (restore_flag & SETTINGS_RESTORE_STARTUP_LINES) { + #if N_STARTUP_LINE > 0 + eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK, 0); + #endif + #if N_STARTUP_LINE > 1 + eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK+(LINE_BUFFER_SIZE+1), 0); + #endif + } + + if (restore_flag & SETTINGS_RESTORE_BUILD_INFO) { eeprom_put_char(EEPROM_ADDR_BUILD_INFO , 0); } +} + + +// Reads startup line from EEPROM. Updated pointed line string data. +uint8_t settings_read_startup_line(uint8_t n, char *line) +{ + uint32_t addr = n*(LINE_BUFFER_SIZE+1)+EEPROM_ADDR_STARTUP_BLOCK; + if (!(memcpy_from_eeprom_with_checksum((char*)line, addr, LINE_BUFFER_SIZE))) { + // Reset line with default value + line[0] = 0; // Empty line + settings_store_startup_line(n, line); + return(false); + } + return(true); +} + + +// Reads startup line from EEPROM. Updated pointed line string data. +uint8_t settings_read_build_info(char *line) +{ + if (!(memcpy_from_eeprom_with_checksum((char*)line, EEPROM_ADDR_BUILD_INFO, LINE_BUFFER_SIZE))) { + // Reset line with default value + line[0] = 0; // Empty line + settings_store_build_info(line); + return(false); + } + return(true); +} + + +// Read selected coordinate data from EEPROM. Updates pointed coord_data value. +uint8_t settings_read_coord_data(uint8_t coord_select, float *coord_data) +{ + uint32_t addr = coord_select*(sizeof(float)*N_AXIS+1) + EEPROM_ADDR_PARAMETERS; + if (!(memcpy_from_eeprom_with_checksum((char*)coord_data, addr, sizeof(float)*N_AXIS))) { + // Reset with default zero vector + clear_vector_float(coord_data); + settings_write_coord_data(coord_select,coord_data); + return(false); + } + return(true); +} + + +// Reads Grbl global settings struct from EEPROM. +uint8_t read_global_settings() { + // Check version-byte of eeprom + uint8_t version = eeprom_get_char(0); + if (version == SETTINGS_VERSION) { + // Read settings-record and check checksum + if (!(memcpy_from_eeprom_with_checksum((char*)&settings, EEPROM_ADDR_GLOBAL, sizeof(settings_t)))) { + return(false); + } + } else { + return(false); + } + + if( settings.steps_per_mm[X_AXIS]!=DEFAULT_X_STEPS_PER_MM || settings.steps_per_mm[Y_AXIS]!=DEFAULT_Y_STEPS_PER_MM || settings.steps_per_mm[Z_AXIS]!=DEFAULT_Z_STEPS_PER_MM ){ + return(false); + } + + return(true); +} + + +// A helper method to set settings from command line +uint8_t settings_store_global_setting(uint8_t parameter, float value) { + if (value < 0.0) { return(STATUS_NEGATIVE_VALUE); } + if (parameter >= AXIS_SETTINGS_START_VAL) { + // Store axis configuration. Axis numbering sequence set by AXIS_SETTING defines. + // NOTE: Ensure the setting index corresponds to the report.c settings printout. + parameter -= AXIS_SETTINGS_START_VAL; + uint8_t set_idx = 0; + while (set_idx < AXIS_N_SETTINGS) { + if (parameter < N_AXIS) { + // Valid axis setting found. + switch (set_idx) { + case 0: + #ifdef MAX_STEP_RATE_HZ + if (value*settings.max_rate[parameter] > (MAX_STEP_RATE_HZ*60.0)) { return(STATUS_MAX_STEP_RATE_EXCEEDED); } + #endif + settings.steps_per_mm[parameter] = value; + break; + case 1: + #ifdef MAX_STEP_RATE_HZ + if (value*settings.steps_per_mm[parameter] > (MAX_STEP_RATE_HZ*60.0)) { return(STATUS_MAX_STEP_RATE_EXCEEDED); } + #endif + settings.max_rate[parameter] = value; + break; + case 2: settings.acceleration[parameter] = value*60*60; break; // Convert to mm/min^2 for grbl internal use. + case 3: settings.max_travel[parameter] = -value; break; // Store as negative for grbl internal use. + } + break; // Exit while-loop after setting has been configured and proceed to the EEPROM write call. + } else { + set_idx++; + // If axis index greater than N_AXIS or setting index greater than number of axis settings, error out. + if ((parameter < AXIS_SETTINGS_INCREMENT) || (set_idx == AXIS_N_SETTINGS)) { return(STATUS_INVALID_STATEMENT); } + parameter -= AXIS_SETTINGS_INCREMENT; + } + } + } else { + // Store non-axis Grbl settings + uint8_t int_value = trunc(value); + switch(parameter) { + case 0: + if (int_value < 3) { return(STATUS_SETTING_STEP_PULSE_MIN); } + settings.pulse_microseconds = int_value; break; + case 1: settings.stepper_idle_lock_time = int_value; break; + case 2: + settings.step_invert_mask = int_value; + st_generate_step_dir_invert_masks(); // Regenerate step and direction port invert masks. + break; + case 3: + settings.dir_invert_mask = int_value; + st_generate_step_dir_invert_masks(); // Regenerate step and direction port invert masks. + break; + case 4: // Reset to ensure change. Immediate re-init may cause problems. + if (int_value) { settings.flags |= BITFLAG_INVERT_ST_ENABLE; } + else { settings.flags &= ~BITFLAG_INVERT_ST_ENABLE; } + break; + case 5: // Reset to ensure change. Immediate re-init may cause problems. + if (int_value) { settings.flags |= BITFLAG_INVERT_LIMIT_PINS; } + else { settings.flags &= ~BITFLAG_INVERT_LIMIT_PINS; } + break; + case 6: // Reset to ensure change. Immediate re-init may cause problems. + if (int_value) { settings.flags |= BITFLAG_INVERT_PROBE_PIN; } + else { settings.flags &= ~BITFLAG_INVERT_PROBE_PIN; } + break; + case 10: settings.status_report_mask = int_value; break; + case 11: settings.junction_deviation = value; break; + case 12: settings.arc_tolerance = value; break; + case 13: + if (int_value) { settings.flags |= BITFLAG_REPORT_INCHES; } + else { settings.flags &= ~BITFLAG_REPORT_INCHES; } + break; + case 20: + if (int_value) { + if (bit_isfalse(settings.flags, BITFLAG_HOMING_ENABLE)) { return(STATUS_SOFT_LIMIT_ERROR); } + settings.flags |= BITFLAG_SOFT_LIMIT_ENABLE; + } else { settings.flags &= ~BITFLAG_SOFT_LIMIT_ENABLE; } + break; + case 21: + if (int_value) { settings.flags |= BITFLAG_HARD_LIMIT_ENABLE; } + else { settings.flags &= ~BITFLAG_HARD_LIMIT_ENABLE; } + limits_init(); // Re-init to immediately change. NOTE: Nice to have but could be problematic later. + break; + case 22: + if (int_value) { settings.flags |= BITFLAG_HOMING_ENABLE; } + else { + settings.flags &= ~BITFLAG_HOMING_ENABLE; + settings.flags &= ~BITFLAG_SOFT_LIMIT_ENABLE; // Force disable soft-limits. + } + break; + case 23: settings.homing_dir_mask = int_value; break; + case 24: settings.homing_feed_rate = value; break; + case 25: settings.homing_seek_rate = value; break; + case 26: settings.homing_debounce_delay = int_value; break; + case 27: settings.homing_pulloff = value; break; + default: + return(STATUS_INVALID_STATEMENT); + } + } + write_global_settings(); + return(STATUS_OK); +} + + +// Initialize the config subsystem +void settings_init() { + if(!read_global_settings()) { + //report_status_message(STATUS_SETTING_READ_FAIL); + settings_restore(SETTINGS_RESTORE_ALL); // Force restore all EEPROM data. + //report_grbl_settings(); + } + + // NOTE: Checking paramater data, startup lines, and build info string should be done here, + // but it seems fairly redundant. Each of these can be manually checked and reset or restored. + // Check all parameter data into a dummy variable. If error, reset to zero, otherwise do nothing. + float coord_data[N_AXIS]; + uint8_t i; + for (i=0; i<=SETTING_INDEX_NCOORD; i++) { + if (!settings_read_coord_data(i, coord_data)) { + report_status_message(STATUS_SETTING_READ_FAIL); + } + } + // NOTE: Startup lines are checked and executed by protocol_main_loop at the end of initialization. +} + + +// Returns step pin mask according to Grbl internal axis indexing. +uint8_t get_step_pin_mask(uint8_t axis_idx) +{ + if ( axis_idx == X_AXIS ) { return((1<. +*/ + +#ifndef settings_h +#define settings_h + +#include "grbl.h" + + +// Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl +// when firmware is upgraded. Always stored in byte 0 of eeprom +#define SETTINGS_VERSION 9 // NOTE: Check settings_reset() when moving to next version. + +// Define bit flag masks for the boolean settings in settings.flag. +#define BITFLAG_REPORT_INCHES bit(0) +// #define BITFLAG_AUTO_START bit(1) // Obsolete. Don't alter to keep back compatibility. +#define BITFLAG_INVERT_ST_ENABLE bit(2) +#define BITFLAG_HARD_LIMIT_ENABLE bit(3) +#define BITFLAG_HOMING_ENABLE bit(4) +#define BITFLAG_SOFT_LIMIT_ENABLE bit(5) +#define BITFLAG_INVERT_LIMIT_PINS bit(6) +#define BITFLAG_INVERT_PROBE_PIN bit(7) + +// Define status reporting boolean enable bit flags in settings.status_report_mask +#define BITFLAG_RT_STATUS_MACHINE_POSITION bit(0) +#define BITFLAG_RT_STATUS_WORK_POSITION bit(1) +#define BITFLAG_RT_STATUS_PLANNER_BUFFER bit(2) +#define BITFLAG_RT_STATUS_SERIAL_RX bit(3) +#define BITFLAG_RT_STATUS_LIMIT_PINS bit(4) + +// Define settings restore bitflags. +#define SETTINGS_RESTORE_ALL 0xFF // All bitflags +#define SETTINGS_RESTORE_DEFAULTS bit(0) +#define SETTINGS_RESTORE_PARAMETERS bit(1) +#define SETTINGS_RESTORE_STARTUP_LINES bit(2) +#define SETTINGS_RESTORE_BUILD_INFO bit(3) + +// Define EEPROM memory address location values for Grbl settings and parameters +// NOTE: The Atmega328p has 1KB EEPROM. The upper half is reserved for parameters and +// the startup script. The lower half contains the global settings and space for future +// developments. +#define EEPROM_ADDR_GLOBAL 2049U +#define EEPROM_ADDR_PARAMETERS 2560U +#define EEPROM_ADDR_STARTUP_BLOCK 2816U +#define EEPROM_ADDR_BUILD_INFO 2990U + +// Define EEPROM address indexing for coordinate parameters +#define N_COORDINATE_SYSTEM 6 // Number of supported work coordinate systems (from index 1) +#define SETTING_INDEX_NCOORD N_COORDINATE_SYSTEM+1 // Total number of system stored (from index 0) +// NOTE: Work coordinate indices are (0=G54, 1=G55, ... , 6=G59) +#define SETTING_INDEX_G28 N_COORDINATE_SYSTEM // Home position 1 +#define SETTING_INDEX_G30 N_COORDINATE_SYSTEM+1 // Home position 2 +// #define SETTING_INDEX_G92 N_COORDINATE_SYSTEM+2 // Coordinate offset (G92.2,G92.3 not supported) + +// Define Grbl axis settings numbering scheme. Starts at START_VAL, every INCREMENT, over N_SETTINGS. +#define AXIS_N_SETTINGS 4 +#define AXIS_SETTINGS_START_VAL 100 // NOTE: Reserving settings values >= 100 for axis settings. Up to 255. +#define AXIS_SETTINGS_INCREMENT 10 // Must be greater than the number of axis settings + +// Global persistent settings (Stored from byte EEPROM_ADDR_GLOBAL onwards) +typedef struct { + // Axis settings + float steps_per_mm[N_AXIS]; + float max_rate[N_AXIS]; + float acceleration[N_AXIS]; + float max_travel[N_AXIS]; + + // Remaining Grbl settings + uint8_t pulse_microseconds; + uint8_t step_invert_mask; + uint8_t dir_invert_mask; + uint8_t stepper_idle_lock_time; // If max value 255, steppers do not disable. + uint8_t status_report_mask; // Mask to indicate desired report data. + float junction_deviation; + float arc_tolerance; + + uint8_t flags; // Contains default boolean settings + + uint8_t homing_dir_mask; + float homing_feed_rate; + float homing_seek_rate; + uint16_t homing_debounce_delay; + float homing_pulloff; +} settings_t; +extern settings_t settings; + +// Initialize the configuration subsystem (load settings from EEPROM) +void settings_init(); + +// Helper function to clear and restore EEPROM defaults +void settings_restore(uint8_t restore_flag); + +// A helper method to set new settings from command line +uint8_t settings_store_global_setting(uint8_t parameter, float value); + +// Stores the protocol line variable as a startup line in EEPROM +void settings_store_startup_line(uint8_t n, char *line); + +// Reads an EEPROM startup line to the protocol line variable +uint8_t settings_read_startup_line(uint8_t n, char *line); + +// Stores build info user-defined string +void settings_store_build_info(char *line); + +// Reads build info user-defined string +uint8_t settings_read_build_info(char *line); + +// Writes selected coordinate data to EEPROM +void settings_write_coord_data(uint8_t coord_select, float *coord_data); + +// Reads selected coordinate data from EEPROM +uint8_t settings_read_coord_data(uint8_t coord_select, float *coord_data); + +// Returns the step pin mask according to Grbl's internal axis numbering +uint8_t get_step_pin_mask(uint8_t i); + +// Returns the direction pin mask according to Grbl's internal axis numbering +uint8_t get_direction_pin_mask(uint8_t i); + +// Returns the limit pin mask according to Grbl's internal axis numbering +uint8_t get_limit_pin_mask(uint8_t i); + + +#endif diff --git a/src/spindle_control.c b/src/spindle_control.c new file mode 100755 index 0000000..b2b6eca --- /dev/null +++ b/src/spindle_control.c @@ -0,0 +1,141 @@ +/* + spindle_control.c - spindle control methods + Part of Grbl + + Copyright (c) 2012-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" + + +void spindle_init() +{ + // Configure variable spindle PWM and enable pin, if requried. On the Uno, PWM and enable are + // combined unless configured otherwise. + #ifdef VARIABLE_SPINDLE + SPINDLE_PWM_DDR |= (1< SPINDLE_RPM_RANGE ) { rpm = SPINDLE_RPM_RANGE; } // Prevent integer overflow + } + current_pwm = floor( rpm*(PWM_MAX_VALUE/SPINDLE_RPM_RANGE) + 0.5); + #ifdef MINIMUM_SPINDLE_PWM + if (current_pwm < MINIMUM_SPINDLE_PWM) { current_pwm = MINIMUM_SPINDLE_PWM; } + #endif + OCR_REGISTER = current_pwm; // Set PWM pin output + + // On the Uno, spindle enable and PWM are shared, unless otherwise specified. + #if defined(CPU_MAP_ATMEGA2560) || defined(USE_SPINDLE_DIR_AS_ENABLE_PIN) + #ifdef INVERT_SPINDLE_ENABLE_PIN + SPINDLE_ENABLE_PORT &= ~(1<. +*/ + +#ifndef spindle_control_h +#define spindle_control_h + + +// Initializes spindle pins and hardware PWM, if enabled. +void spindle_init(); + +// Sets spindle direction and spindle rpm via PWM, if enabled. +void spindle_run(uint8_t direction, float rpm); + +void spindle_set_state(uint8_t state, float rpm); + +// Kills spindle. +void spindle_stop(); + +#endif diff --git a/src/step_lowlevel.c b/src/step_lowlevel.c new file mode 100755 index 0000000..a4567ac --- /dev/null +++ b/src/step_lowlevel.c @@ -0,0 +1,223 @@ +#include "step_lowlevel.h" + +enum step_state_e { + SPEED_UP = 0, + SPEED_CONSTANT, + SPEED_DOWN, +}; + +enum step_mode_e { + POSITION_MODE = 0, + SPEED_MODE, +}; + +struct step_param_t { + enum step_state_e state; + enum step_mode_e mode; + volatile long remain_counts; + volatile long total_conuts; + volatile long constant_conunts; + volatile long timer_load_val; + volatile long timer_min_val; + volatile long n; + bool is_move_done; + + void(*positon_complete_callback)(void); + void(*speed_complete_callback)(void); +}step_param = {0}; + + +bool step_init_ll(void){ + DIR_OUTPUT; + STEP_OUTPUT; + + DIR_LOW; + STEP_LOW; + + memset( &step_param, 0x00, sizeof(struct step_param_t) ); + + noInterrupts(); + TCCR4A = 0; // 1 ){ // 0){ // 1 ){ delay_us(100); } + } + }else{ + if( step_param.n > 1 ){ // 0){ // =step_param.total_conuts/2 ){ + step_param.n++; + step_param.timer_load_val = step_param.timer_load_val - (2 * step_param.timer_load_val) / (4 * step_param.n + 1 ); // step_param.timer_min_val ){ + step_param.n++; + step_param.timer_load_val = step_param.timer_load_val - (2 * step_param.timer_load_val) / (4 * step_param.n + 1 ); // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +#define STEP_LIB_VERSION 1.2.2 + + +#define DIR_PIN 5 +#define DIR_PORT PORTH +#define DIR_DDR DDRH +#define STEP_PIN 6 +#define STEP_PORT PORTH +#define STEP_DDR DDRH +#define ENABLE_PIN 7 +#define ENABLE_PORT PORTD +#define ENABLE_DDR DDRD + +#define DIR_OUTPUT DIR_DDR |= (1<0 forward,steps<0 backward +* timer_min_val :the timer minimum load count 80 max +* complete_callback :move done callback +* wait :default is wait +*/ +bool set_steps(long steps, long timer_min_val, void(*complete_callback)(void), bool wait); + + + +/* +* direction :direction>0 forward direction<0 backward +* timer_min_val :the timer minimum load count 80 max +* complete_callback :speed reach callback +* wait :default is no wait +*/ + +bool set_speed(int8_t direction, long timer_min_val, void(*complete_callback)(void), bool wait); + + +bool step_terminate(void); + +#endif diff --git a/src/stepper.c b/src/stepper.c new file mode 100755 index 0000000..76f52c0 --- /dev/null +++ b/src/stepper.c @@ -0,0 +1,983 @@ +/* + stepper.c - stepper motor driver: executes motion plans using stepper motors + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_common.h" + +// Some useful constants. +#define DT_SEGMENT (1.0/(ACCELERATION_TICKS_PER_SECOND*60.0)) // min/segment +#define REQ_MM_INCREMENT_SCALAR 1.25 +#define RAMP_ACCEL 0 +#define RAMP_CRUISE 1 +#define RAMP_DECEL 2 + +// Define Adaptive Multi-Axis Step-Smoothing(AMASS) levels and cutoff frequencies. The highest level +// frequency bin starts at 0Hz and ends at its cutoff frequency. The next lower level frequency bin +// starts at the next higher cutoff frequency, and so on. The cutoff frequencies for each level must +// be considered carefully against how much it over-drives the stepper ISR, the accuracy of the 16-bit +// timer, and the CPU overhead. Level 0 (no AMASS, normal operation) frequency bin starts at the +// Level 1 cutoff frequency and up to as fast as the CPU allows (over 30kHz in limited testing). +// NOTE: AMASS cutoff frequency multiplied by ISR overdrive factor must not exceed maximum step frequency. +// NOTE: Current settings are set to overdrive the ISR to no more than 16kHz, balancing CPU overhead +// and timer accuracy. Do not alter these settings unless you know what you are doing. +#define MAX_AMASS_LEVEL 3 +// AMASS_LEVEL0: Normal operation. No AMASS. No upper cutoff frequency. Starts at LEVEL1 cutoff frequency. +#define AMASS_LEVEL1 (F_CPU/8000) // Over-drives ISR (x2). Defined as F_CPU/(Cutoff frequency in Hz) +#define AMASS_LEVEL2 (F_CPU/4000) // Over-drives ISR (x4) +#define AMASS_LEVEL3 (F_CPU/2000) // Over-drives ISR (x8) + + +// Stores the planner block Bresenham algorithm execution data for the segments in the segment +// buffer. Normally, this buffer is partially in-use, but, for the worst case scenario, it will +// never exceed the number of accessible stepper buffer segments (SEGMENT_BUFFER_SIZE-1). +// NOTE: This data is copied from the prepped planner blocks so that the planner blocks may be +// discarded when entirely consumed and completed by the segment buffer. Also, AMASS alters this +// data for its own use. +typedef struct { + uint8_t direction_bits; + uint32_t steps[N_AXIS]; + uint32_t step_event_count; +} st_block_t; +static st_block_t st_block_buffer[SEGMENT_BUFFER_SIZE-1]; + +// Primary stepper segment ring buffer. Contains small, short line segments for the stepper +// algorithm to execute, which are "checked-out" incrementally from the first block in the +// planner buffer. Once "checked-out", the steps in the segments buffer cannot be modified by +// the planner, where the remaining planner block steps still can. +typedef struct { + uint16_t n_step; // Number of step events to be executed for this segment + uint8_t st_block_index; // Stepper block data index. Uses this information to execute this segment. + uint16_t cycles_per_tick; // Step distance traveled per ISR tick, aka step rate. + #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + uint8_t amass_level; // Indicates AMASS level for the ISR to execute this segment + #else + uint8_t prescaler; // Without AMASS, a prescaler is required to adjust for slow timing. + #endif +} segment_t; +static segment_t segment_buffer[SEGMENT_BUFFER_SIZE]; + +// Stepper ISR data struct. Contains the running data for the main stepper ISR. +typedef struct { + // Used by the bresenham line algorithm + uint32_t counter_x, // Counter variables for the bresenham line tracer + counter_y, + counter_z; + #ifdef STEP_PULSE_DELAY + uint8_t step_bits; // Stores out_bits output to complete the step pulse delay + #endif + + uint8_t execute_step; // Flags step execution for each interrupt. + uint8_t step_pulse_time; // Step pulse reset time after step rise + uint8_t step_outbits; // The next stepping-bits to be output + uint8_t dir_outbits; + #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + uint32_t steps[N_AXIS]; + #endif + + uint16_t step_count; // Steps remaining in line segment motion + uint8_t exec_block_index; // Tracks the current st_block index. Change indicates new block. + st_block_t *exec_block; // Pointer to the block data for the segment being executed + segment_t *exec_segment; // Pointer to the segment being executed +} stepper_t; +static stepper_t st; + +// Step segment ring buffer indices +static volatile uint8_t segment_buffer_tail; +static uint8_t segment_buffer_head; +static uint8_t segment_next_head; + +// Step and direction port invert masks. +static uint8_t step_port_invert_mask; +static uint8_t dir_port_invert_mask; + +// Used to avoid ISR nesting of the "Stepper Driver Interrupt". Should never occur though. +static volatile uint8_t busy; + +// Pointers for the step segment being prepped from the planner buffer. Accessed only by the +// main program. Pointers may be planning segments or planner blocks ahead of what being executed. +static plan_block_t *pl_block; // Pointer to the planner block being prepped +static st_block_t *st_prep_block; // Pointer to the stepper block data being prepped + +// Segment preparation data struct. Contains all the necessary information to compute new segments +// based on the current executing planner block. +typedef struct { + uint8_t st_block_index; // Index of stepper common data block being prepped + uint8_t flag_partial_block; // Flag indicating the last block completed. Time to load a new one. + + float steps_remaining; + float step_per_mm; // Current planner block step/millimeter conversion scalar + float req_mm_increment; + float dt_remainder; + + uint8_t ramp_type; // Current segment ramp state + float mm_complete; // End of velocity profile from end of current planner block in (mm). + // NOTE: This value must coincide with a step(no mantissa) when converted. + float current_speed; // Current speed at the end of the segment buffer (mm/min) + float maximum_speed; // Maximum speed of executing block. Not always nominal speed. (mm/min) + float exit_speed; // Exit speed of executing block (mm/min) + float accelerate_until; // Acceleration ramp end measured from end of block (mm) + float decelerate_after; // Deceleration ramp start measured from end of block (mm) +} st_prep_t; +static st_prep_t prep; + + +/* BLOCK VELOCITY PROFILE DEFINITION + __________________________ + /| |\ _________________ ^ + / | | \ /| |\ | + / | | \ / | | \ s + / | | | | | \ p + / | | | | | \ e + +-----+------------------------+---+--+---------------+----+ e + | BLOCK 1 ^ BLOCK 2 | d + | + time -----> EXAMPLE: Block 2 entry speed is at max junction velocity + + The planner block buffer is planned assuming constant acceleration velocity profiles and are + continuously joined at block junctions as shown above. However, the planner only actively computes + the block entry speeds for an optimal velocity plan, but does not compute the block internal + velocity profiles. These velocity profiles are computed ad-hoc as they are executed by the + stepper algorithm and consists of only 7 possible types of profiles: cruise-only, cruise- + deceleration, acceleration-cruise, acceleration-only, deceleration-only, full-trapezoid, and + triangle(no cruise). + + maximum_speed (< nominal_speed) -> + + +--------+ <- maximum_speed (= nominal_speed) /|\ + / \ / | \ + current_speed -> + \ / | + <- exit_speed + | + <- exit_speed / | | + +-------------+ current_speed -> +----+--+ + time --> ^ ^ ^ ^ + | | | | + decelerate_after(in mm) decelerate_after(in mm) + ^ ^ ^ ^ + | | | | + accelerate_until(in mm) accelerate_until(in mm) + + The step segment buffer computes the executing block velocity profile and tracks the critical + parameters for the stepper algorithm to accurately trace the profile. These critical parameters + are shown and defined in the above illustration. +*/ + + +// Stepper state initialization. Cycle should only start if the st.cycle_start flag is +// enabled. Startup init and limits call this function but shouldn't start the cycle. +void st_wake_up() +{ + // Enable stepper drivers. + //if (bit_istrue(settings.flags,BITFLAG_INVERT_ST_ENABLE)) { STEPPERS_DISABLE_PORT |= (1<> 3); + // Set delay between direction pin write and step command. + OCR0A = -(((settings.pulse_microseconds)*TICKS_PER_MICROSECOND) >> 3); + #else // Normal operation + // Set step pulse time. Ad hoc computation from oscilloscope. Uses two's complement. + st.step_pulse_time = -(((settings.pulse_microseconds-2)*TICKS_PER_MICROSECOND) >> 3); + #endif + + // Enable Stepper Driver Interrupt + TIMSK1 |= (1<>1; + // Then pulse the stepping pins + #ifdef STEP_PULSE_DELAY + + //st.step_bits = (STEP_PORT & ~STEP_MASK) | st.step_outbits; // Store out_bits to prevent overwriting. + #else // Normal operation + //STEP_PORT = (STEP_PORT & ~STEP_MASK) | st.step_outbits; + + ARML_STEP_PORT = (ARML_STEP_PORT & ~ARML_STEP_MASK) | (st.step_outbits & (1<>2; + #endif + + // Enable step pulse reset timer so that The Stepper Port Reset Interrupt can reset the signal after + // exactly settings.pulse_microseconds microseconds, independent of the main Timer1 prescaler. + TCNT0 = st.step_pulse_time; // Reload Timer0 counter + TCCR0B = (1<prescaler<cycles_per_tick; + st.step_count = st.exec_segment->n_step; // NOTE: Can sometimes be zero when moving slow. + // If the new segment starts a new planner block, initialize stepper variables and counters. + // NOTE: When the segment data index changes, this indicates a new planner block. + if ( st.exec_block_index != st.exec_segment->st_block_index ) { + st.exec_block_index = st.exec_segment->st_block_index; + st.exec_block = &st_block_buffer[st.exec_block_index]; + + // Initialize Bresenham line and distance counters + st.counter_x = st.counter_y = st.counter_z = (st.exec_block->step_event_count >> 1); + } + st.dir_outbits = st.exec_block->direction_bits ^ dir_port_invert_mask; + + #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + // With AMASS enabled, adjust Bresenham axis increment counters according to AMASS level. + st.steps[X_AXIS] = st.exec_block->steps[X_AXIS] >> st.exec_segment->amass_level; + st.steps[Y_AXIS] = st.exec_block->steps[Y_AXIS] >> st.exec_segment->amass_level; + st.steps[Z_AXIS] = st.exec_block->steps[Z_AXIS] >> st.exec_segment->amass_level; + #endif + + } else { + // Segment buffer empty. Shutdown. + st_go_idle(); + bit_true_atomic(sys_rt_exec_state,EXEC_CYCLE_STOP); // Flag main program for cycle end + return; // Nothing to do but exit. + } + } + + + // Check probing state. + probe_state_monitor(); + + // Reset step out bits. + st.step_outbits = 0; + + // Execute step displacement profile by Bresenham line algorithm + #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + st.counter_x += st.steps[X_AXIS]; + #else + st.counter_x += st.exec_block->steps[X_AXIS]; + #endif + if (st.counter_x > st.exec_block->step_event_count) { + st.step_outbits |= (1<step_event_count; + if (st.exec_block->direction_bits & (1<steps[Y_AXIS]; + #endif + if (st.counter_y > st.exec_block->step_event_count) { + st.step_outbits |= (1<step_event_count; + if (st.exec_block->direction_bits & (1<steps[Z_AXIS]; + #endif + if (st.counter_z > st.exec_block->step_event_count) { + st.step_outbits |= (1<step_event_count; + if (st.exec_block->direction_bits & (1<>2; + + TCCR0B = 0; // Disable Timer0 to prevent re-entering this interrupt when it's not needed. +} +#ifdef STEP_PULSE_DELAY + // This interrupt is used only when STEP_PULSE_DELAY is enabled. Here, the step pulse is + // initiated after the STEP_PULSE_DELAY time period has elapsed. The ISR TIMER2_OVF interrupt + // will then trigger after the appropriate settings.pulse_microseconds, as in normal operation. + // The new timing between direction, step pulse, and step complete events are setup in the + // st_wake_up() routine. + ISR(TIMER0_COMPA_vect) + { + //STEP_PORT = st.step_bits; // Begin step pulse. + // >2; + } +#endif + + +// Generates the step and direction port invert masks used in the Stepper Interrupt Driver. +void st_generate_step_dir_invert_masks() +{ + uint8_t idx; + step_port_invert_mask = 0; + dir_port_invert_mask = 0; + for (idx=0; idx>2; + + ARML_DIRECTION_PORT = (ARML_DIRECTION_PORT & ~ARML_DIRECTION_MASK) | (dir_port_invert_mask & (1<>1; +} + +void st_reset2() +{ + memset(&prep, 0, sizeof(st_prep_t)); + memset(&st, 0, sizeof(stepper_t)); + st.exec_segment = NULL; + pl_block = NULL; // Planner block pointer used by segment buffer + segment_buffer_tail = 0; + segment_buffer_head = 0; // empty = tail + segment_next_head = 1; + busy = false; + +} +// Initialize and start the stepper motor subsystem +void stepper_init() +{ + // Configure step and direction interface pins +// STEP_DDR |= STEP_MASK; +// STEPPERS_DISABLE_DDR |= 1<entry_speed_sqr = prep.current_speed*prep.current_speed; // Update entry speed. + pl_block = NULL; // Flag st_prep_segment() to load new velocity profile. + } +} + + +/* Prepares step segment buffer. Continuously called from main program. + + The segment buffer is an intermediary buffer interface between the execution of steps + by the stepper algorithm and the velocity profiles generated by the planner. The stepper + algorithm only executes steps within the segment buffer and is filled by the main program + when steps are "checked-out" from the first block in the planner buffer. This keeps the + step execution and planning optimization processes atomic and protected from each other. + The number of steps "checked-out" from the planner buffer and the number of segments in + the segment buffer is sized and computed such that no operation in the main program takes + longer than the time it takes the stepper algorithm to empty it before refilling it. + Currently, the segment buffer conservatively holds roughly up to 40-50 msec of steps. + NOTE: Computation units are in steps, millimeters, and minutes. +*/ +void st_prep_buffer() +{ + + if (sys.state & (STATE_HOLD|STATE_MOTION_CANCEL|STATE_SAFETY_DOOR)) { + // Check if we still need to generate more segments for a motion suspend. + if (prep.current_speed == 0.0) { return; } // Nothing to do. Bail. + } + + while (segment_buffer_tail != segment_next_head) { // Check if we need to fill the buffer. + + // Determine if we need to load a new planner block or if the block has been replanned. + if (pl_block == NULL) { + pl_block = plan_get_current_block(); // Query planner for a queued block + if (pl_block == NULL) { return; } // No planner blocks. Exit. + + // Check if the segment buffer completed the last planner block. If so, load the Bresenham + // data for the block. If not, we are still mid-block and the velocity profile was updated. + if (prep.flag_partial_block) { + prep.flag_partial_block = false; // Reset flag + } else { + // Increment stepper common data index to store new planner block data. + if ( ++prep.st_block_index == (SEGMENT_BUFFER_SIZE-1) ) { prep.st_block_index = 0; } + + // Prepare and copy Bresenham algorithm segment data from the new planner block, so that + // when the segment buffer completes the planner block, it may be discarded when the + // segment buffer finishes the prepped block, but the stepper ISR is still executing it. + st_prep_block = &st_block_buffer[prep.st_block_index]; + st_prep_block->direction_bits = pl_block->direction_bits; + #ifndef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + st_prep_block->steps[X_AXIS] = pl_block->steps[X_AXIS]; + st_prep_block->steps[Y_AXIS] = pl_block->steps[Y_AXIS]; + st_prep_block->steps[Z_AXIS] = pl_block->steps[Z_AXIS]; + st_prep_block->step_event_count = pl_block->step_event_count; + #else + // With AMASS enabled, simply bit-shift multiply all Bresenham data by the max AMASS + // level, such that we never divide beyond the original data anywhere in the algorithm. + // If the original data is divided, we can lose a step from integer roundoff. + st_prep_block->steps[X_AXIS] = pl_block->steps[X_AXIS] << MAX_AMASS_LEVEL; + st_prep_block->steps[Y_AXIS] = pl_block->steps[Y_AXIS] << MAX_AMASS_LEVEL; + st_prep_block->steps[Z_AXIS] = pl_block->steps[Z_AXIS] << MAX_AMASS_LEVEL; + st_prep_block->step_event_count = pl_block->step_event_count << MAX_AMASS_LEVEL; + #endif + + // Initialize segment buffer data for generating the segments. + prep.steps_remaining = pl_block->step_event_count; + prep.step_per_mm = prep.steps_remaining/pl_block->millimeters; + prep.req_mm_increment = REQ_MM_INCREMENT_SCALAR/prep.step_per_mm; + + prep.dt_remainder = 0.0; // Reset for new planner block + + if (sys.state & (STATE_HOLD|STATE_MOTION_CANCEL|STATE_SAFETY_DOOR)) { + // Override planner block entry speed and enforce deceleration during feed hold. + prep.current_speed = prep.exit_speed; + pl_block->entry_speed_sqr = prep.exit_speed*prep.exit_speed; + } + else { prep.current_speed = sqrt(pl_block->entry_speed_sqr); } + } + + /* --------------------------------------------------------------------------------- + Compute the velocity profile of a new planner block based on its entry and exit + speeds, or recompute the profile of a partially-completed planner block if the + planner has updated it. For a commanded forced-deceleration, such as from a feed + hold, override the planner velocities and decelerate to the target exit speed. + */ + prep.mm_complete = 0.0; // Default velocity profile complete at 0.0mm from end of block. + float inv_2_accel = 0.5/pl_block->acceleration; + if (sys.state & (STATE_HOLD|STATE_MOTION_CANCEL|STATE_SAFETY_DOOR)) { // [Forced Deceleration to Zero Velocity] + // Compute velocity profile parameters for a feed hold in-progress. This profile overrides + // the planner block profile, enforcing a deceleration to zero speed. + prep.ramp_type = RAMP_DECEL; + // Compute decelerate distance relative to end of block. + float decel_dist = pl_block->millimeters - inv_2_accel*pl_block->entry_speed_sqr; + if (decel_dist < 0.0) { + // Deceleration through entire planner block. End of feed hold is not in this block. + prep.exit_speed = sqrt(pl_block->entry_speed_sqr-2*pl_block->acceleration*pl_block->millimeters); + } else { + prep.mm_complete = decel_dist; // End of feed hold. + prep.exit_speed = 0.0; + } + } else { // [Normal Operation] + // Compute or recompute velocity profile parameters of the prepped planner block. + prep.ramp_type = RAMP_ACCEL; // Initialize as acceleration ramp. + prep.accelerate_until = pl_block->millimeters; + prep.exit_speed = plan_get_exec_block_exit_speed(); + float exit_speed_sqr = prep.exit_speed*prep.exit_speed; + float intersect_distance = + 0.5*(pl_block->millimeters+inv_2_accel*(pl_block->entry_speed_sqr-exit_speed_sqr)); + if (intersect_distance > 0.0) { + if (intersect_distance < pl_block->millimeters) { // Either trapezoid or triangle types + // NOTE: For acceleration-cruise and cruise-only types, following calculation will be 0.0. + prep.decelerate_after = inv_2_accel*(pl_block->nominal_speed_sqr-exit_speed_sqr); + if (prep.decelerate_after < intersect_distance) { // Trapezoid type + prep.maximum_speed = sqrt(pl_block->nominal_speed_sqr); + if (pl_block->entry_speed_sqr == pl_block->nominal_speed_sqr) { + // Cruise-deceleration or cruise-only type. + prep.ramp_type = RAMP_CRUISE; + } else { + // Full-trapezoid or acceleration-cruise types + prep.accelerate_until -= inv_2_accel*(pl_block->nominal_speed_sqr-pl_block->entry_speed_sqr); + } + } else { // Triangle type + prep.accelerate_until = intersect_distance; + prep.decelerate_after = intersect_distance; + prep.maximum_speed = sqrt(2.0*pl_block->acceleration*intersect_distance+exit_speed_sqr); + } + } else { // Deceleration-only type + prep.ramp_type = RAMP_DECEL; + // prep.decelerate_after = pl_block->millimeters; + prep.maximum_speed = prep.current_speed; + } + } else { // Acceleration-only type + prep.accelerate_until = 0.0; + // prep.decelerate_after = 0.0; + prep.maximum_speed = prep.exit_speed; + } + } + } + + // Initialize new segment + segment_t *prep_segment = &segment_buffer[segment_buffer_head]; + + // Set new segment to point to the current segment data block. + prep_segment->st_block_index = prep.st_block_index; + + /*------------------------------------------------------------------------------------ + Compute the average velocity of this new segment by determining the total distance + traveled over the segment time DT_SEGMENT. The following code first attempts to create + a full segment based on the current ramp conditions. If the segment time is incomplete + when terminating at a ramp state change, the code will continue to loop through the + progressing ramp states to fill the remaining segment execution time. However, if + an incomplete segment terminates at the end of the velocity profile, the segment is + considered completed despite having a truncated execution time less than DT_SEGMENT. + The velocity profile is always assumed to progress through the ramp sequence: + acceleration ramp, cruising state, and deceleration ramp. Each ramp's travel distance + may range from zero to the length of the block. Velocity profiles can end either at + the end of planner block (typical) or mid-block at the end of a forced deceleration, + such as from a feed hold. + */ + float dt_max = DT_SEGMENT; // Maximum segment time + float dt = 0.0; // Initialize segment time + float time_var = dt_max; // Time worker variable + float mm_var; // mm-Distance worker variable + float speed_var; // Speed worker variable + float mm_remaining = pl_block->millimeters; // New segment distance from end of block. + float minimum_mm = mm_remaining-prep.req_mm_increment; // Guarantee at least one step. + if (minimum_mm < 0.0) { minimum_mm = 0.0; } + + do { + switch (prep.ramp_type) { + case RAMP_ACCEL: + // NOTE: Acceleration ramp only computes during first do-while loop. + speed_var = pl_block->acceleration*time_var; + mm_remaining -= time_var*(prep.current_speed + 0.5*speed_var); + if (mm_remaining < prep.accelerate_until) { // End of acceleration ramp. + // Acceleration-cruise, acceleration-deceleration ramp junction, or end of block. + mm_remaining = prep.accelerate_until; // NOTE: 0.0 at EOB + time_var = 2.0*(pl_block->millimeters-mm_remaining)/(prep.current_speed+prep.maximum_speed); + if (mm_remaining == prep.decelerate_after) { prep.ramp_type = RAMP_DECEL; } + else { prep.ramp_type = RAMP_CRUISE; } + prep.current_speed = prep.maximum_speed; + } else { // Acceleration only. + prep.current_speed += speed_var; + } + break; + case RAMP_CRUISE: + // NOTE: mm_var used to retain the last mm_remaining for incomplete segment time_var calculations. + // NOTE: If maximum_speed*time_var value is too low, round-off can cause mm_var to not change. To + // prevent this, simply enforce a minimum speed threshold in the planner. + mm_var = mm_remaining - prep.maximum_speed*time_var; + if (mm_var < prep.decelerate_after) { // End of cruise. + // Cruise-deceleration junction or end of block. + time_var = (mm_remaining - prep.decelerate_after)/prep.maximum_speed; + mm_remaining = prep.decelerate_after; // NOTE: 0.0 at EOB + prep.ramp_type = RAMP_DECEL; + } else { // Cruising only. + mm_remaining = mm_var; + } + break; + default: // case RAMP_DECEL: + // NOTE: mm_var used as a misc worker variable to prevent errors when near zero speed. + speed_var = pl_block->acceleration*time_var; // Used as delta speed (mm/min) + if (prep.current_speed > speed_var) { // Check if at or below zero speed. + // Compute distance from end of segment to end of block. + mm_var = mm_remaining - time_var*(prep.current_speed - 0.5*speed_var); // (mm) + if (mm_var > prep.mm_complete) { // Deceleration only. + mm_remaining = mm_var; + prep.current_speed -= speed_var; + break; // Segment complete. Exit switch-case statement. Continue do-while loop. + } + } // End of block or end of forced-deceleration. + time_var = 2.0*(mm_remaining-prep.mm_complete)/(prep.current_speed+prep.exit_speed); + mm_remaining = prep.mm_complete; + } + dt += time_var; // Add computed ramp time to total segment time. + if (dt < dt_max) { time_var = dt_max - dt; } // **Incomplete** At ramp junction. + else { + if (mm_remaining > minimum_mm) { // Check for very slow segments with zero steps. + // Increase segment time to ensure at least one step in segment. Override and loop + // through distance calculations until minimum_mm or mm_complete. + dt_max += DT_SEGMENT; + time_var = dt_max - dt; + } else { + break; // **Complete** Exit loop. Segment execution time maxed. + } + } + } while (mm_remaining > prep.mm_complete); // **Complete** Exit loop. Profile complete. + + + /* ----------------------------------------------------------------------------------- + Compute segment step rate, steps to execute, and apply necessary rate corrections. + NOTE: Steps are computed by direct scalar conversion of the millimeter distance + remaining in the block, rather than incrementally tallying the steps executed per + segment. This helps in removing floating point round-off issues of several additions. + However, since floats have only 7.2 significant digits, long moves with extremely + high step counts can exceed the precision of floats, which can lead to lost steps. + Fortunately, this scenario is highly unlikely and unrealistic in CNC machines + supported by Grbl (i.e. exceeding 10 meters axis travel at 200 step/mm). + */ + float steps_remaining = prep.step_per_mm*mm_remaining; // Convert mm_remaining to steps + float n_steps_remaining = ceil(steps_remaining); // Round-up current steps remaining + float last_n_steps_remaining = ceil(prep.steps_remaining); // Round-up last steps remaining + prep_segment->n_step = last_n_steps_remaining-n_steps_remaining; // Compute number of steps to execute. + + // Bail if we are at the end of a feed hold and don't have a step to execute. + if (prep_segment->n_step == 0) { + if (sys.state & (STATE_HOLD|STATE_MOTION_CANCEL|STATE_SAFETY_DOOR)) { + // Less than one step to decelerate to zero speed, but already very close. AMASS + // requires full steps to execute. So, just bail. + prep.current_speed = 0.0; // NOTE: (=0.0) Used to indicate completed segment calcs for hold. + prep.dt_remainder = 0.0; + prep.steps_remaining = n_steps_remaining; + pl_block->millimeters = prep.steps_remaining/prep.step_per_mm; // Update with full steps. + plan_cycle_reinitialize(); + return; // Segment not generated, but current step data still retained. + } + } + + // Compute segment step rate. Since steps are integers and mm distances traveled are not, + // the end of every segment can have a partial step of varying magnitudes that are not + // executed, because the stepper ISR requires whole steps due to the AMASS algorithm. To + // compensate, we track the time to execute the previous segment's partial step and simply + // apply it with the partial step distance to the current segment, so that it minutely + // adjusts the whole segment rate to keep step output exact. These rate adjustments are + // typically very small and do not adversely effect performance, but ensures that Grbl + // outputs the exact acceleration and velocity profiles as computed by the planner. + dt += prep.dt_remainder; // Apply previous segment partial step execute time + float inv_rate = dt/(last_n_steps_remaining - steps_remaining); // Compute adjusted step rate inverse + prep.dt_remainder = (n_steps_remaining - steps_remaining)*inv_rate; // Update segment partial step time + + // Compute CPU cycles per step for the prepped segment. + uint32_t cycles = ceil( (TICKS_PER_MICROSECOND*1000000*60)*inv_rate ); // (cycles/step) + + #ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING + // Compute step timing and multi-axis smoothing level. + // NOTE: AMASS overdrives the timer with each level, so only one prescalar is required. + if (cycles < AMASS_LEVEL1) { prep_segment->amass_level = 0; } + else { + if (cycles < AMASS_LEVEL2) { prep_segment->amass_level = 1; } + else if (cycles < AMASS_LEVEL3) { prep_segment->amass_level = 2; } + else { prep_segment->amass_level = 3; } + cycles >>= prep_segment->amass_level; + prep_segment->n_step <<= prep_segment->amass_level; + } + if (cycles < (1UL << 16)) { prep_segment->cycles_per_tick = cycles; } // < 65536 (4.1ms @ 16MHz) + else { prep_segment->cycles_per_tick = 0xffff; } // Just set the slowest speed possible. + #else + // Compute step timing and timer prescalar for normal step generation. + if (cycles < (1UL << 16)) { // < 65536 (4.1ms @ 16MHz) + prep_segment->prescaler = 1; // prescaler: 0 + prep_segment->cycles_per_tick = cycles; + } else if (cycles < (1UL << 19)) { // < 524288 (32.8ms@16MHz) + prep_segment->prescaler = 2; // prescaler: 8 + prep_segment->cycles_per_tick = cycles >> 3; + } else { + prep_segment->prescaler = 3; // prescaler: 64 + if (cycles < (1UL << 22)) { // < 4194304 (262ms@16MHz) + prep_segment->cycles_per_tick = cycles >> 6; + } else { // Just set the slowest speed possible. (Around 4 step/sec.) + prep_segment->cycles_per_tick = 0xffff; + } + } + #endif + + // Segment complete! Increment segment buffer indices. + segment_buffer_head = segment_next_head; + if ( ++segment_next_head == SEGMENT_BUFFER_SIZE ) { segment_next_head = 0; } + + // Setup initial conditions for next segment. + if (mm_remaining > prep.mm_complete) { + // Normal operation. Block incomplete. Distance remaining in block to be executed. + pl_block->millimeters = mm_remaining; + prep.steps_remaining = steps_remaining; + } else { + // End of planner block or forced-termination. No more distance to be executed. + if (mm_remaining > 0.0) { // At end of forced-termination. + // Reset prep parameters for resuming and then bail. Allow the stepper ISR to complete + // the segment queue, where realtime protocol will set new state upon receiving the + // cycle stop flag from the ISR. Prep_segment is blocked until then. + prep.current_speed = 0.0; // NOTE: (=0.0) Used to indicate completed segment calcs for hold. + prep.dt_remainder = 0.0; + prep.steps_remaining = ceil(steps_remaining); + pl_block->millimeters = prep.steps_remaining/prep.step_per_mm; // Update with full steps. + plan_cycle_reinitialize(); + return; // Bail! + } else { // End of planner block + // The planner block is complete. All steps are set to be executed in the segment buffer. + pl_block = NULL; // Set pointer to indicate check and load next planner block. + plan_discard_current_block(); + } + } + + } +} + + +// Called by realtime status reporting to fetch the current speed being executed. This value +// however is not exactly the current speed, but the speed computed in the last step segment +// in the segment buffer. It will always be behind by up to the number of segment blocks (-1) +// divided by the ACCELERATION TICKS PER SECOND in seconds. +#ifdef REPORT_REALTIME_RATE + float st_get_realtime_rate() + { + if (sys.state & (STATE_CYCLE | STATE_HOMING | STATE_HOLD | STATE_MOTION_CANCEL | STATE_SAFETY_DOOR)){ + return prep.current_speed; + } + return 0.0f; + } +#endif diff --git a/src/stepper.h b/src/stepper.h new file mode 100755 index 0000000..7a41b43 --- /dev/null +++ b/src/stepper.h @@ -0,0 +1,56 @@ +/* + stepper.h - stepper motor driver: executes motion plans of planner.c using the stepper motors + Part of Grbl + + Copyright (c) 2011-2015 Sungeun K. Jeon + Copyright (c) 2009-2011 Simen Svale Skogsrud + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#ifndef stepper_h +#define stepper_h + +#ifndef SEGMENT_BUFFER_SIZE + #define SEGMENT_BUFFER_SIZE 6 +#endif + +// Initialize and setup the stepper motor subsystem +void stepper_init(); + +// Enable steppers, but cycle does not start unless called by motion control or realtime command. +void st_wake_up(); + +// Immediately disables steppers +void st_go_idle(); +void st_go_idle_2() ; + +// Generate the step and direction port invert masks. +void st_generate_step_dir_invert_masks(); + +// Reset the stepper subsystem variables +void st_reset(); +void st_reset2(); +// Reloads step segment buffer. Called continuously by realtime execution system. +void st_prep_buffer(); + +// Called by planner_recalculate() when the executing block is updated by the new plan. +void st_update_plan_block_parameters(); + +// Called by realtime status reporting if realtime rate reporting is enabled in config.h. +#ifdef REPORT_REALTIME_RATE +float st_get_realtime_rate(); +#endif + +#endif diff --git a/src/system.c b/src/system.c new file mode 100755 index 0000000..17495ce --- /dev/null +++ b/src/system.c @@ -0,0 +1,305 @@ +/* + system.c - Handles system level commands and real-time processes + Part of Grbl + + Copyright (c) 2014-2015 Sungeun K. Jeon + + Grbl is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Grbl is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Grbl. If not, see . +*/ + +#include "grbl.h" +#include "uarm_common.h" + +void system_init() +{ + CONTROL_DDR &= ~(CONTROL_MASK); // Configure as input pins + #ifdef DISABLE_CONTROL_PIN_PULL_UP + CONTROL_PORT &= ~(CONTROL_MASK); // Normal low operation. Requires external pull-down. + #else + CONTROL_PORT |= CONTROL_MASK; // Enable internal pull-up resistors. Normal high operation. + #endif + CONTROL_PCMSK |= CONTROL_MASK; // Enable specific pins of the Pin Change Interrupt + PCICR |= (1 << CONTROL_INT); // Enable Pin Change Interrupt +} + + +// Pin change interrupt for pin-out commands, i.e. cycle start, feed hold, and reset. Sets +// only the realtime command execute variable to have the main program execute these when +// its ready. This works exactly like the character-based realtime commands when picked off +// directly from the incoming serial data stream. +ISR(CONTROL_INT_vect) +{ + uint8_t pin = (CONTROL_PIN & CONTROL_MASK); + #ifndef INVERT_ALL_CONTROL_PINS + pin ^= CONTROL_INVERT_MASK; + #endif + // Enter only if any CONTROL pin is detected as active. + if (pin) { + if (bit_istrue(pin,bit(RESET_BIT))) { + mc_reset(); + } else if (bit_istrue(pin,bit(CYCLE_START_BIT))) { + bit_true(sys_rt_exec_state, EXEC_CYCLE_START); + #ifndef ENABLE_SAFETY_DOOR_INPUT_PIN + } else if (bit_istrue(pin,bit(FEED_HOLD_BIT))) { + bit_true(sys_rt_exec_state, EXEC_FEED_HOLD); + #else + } else if (bit_istrue(pin,bit(SAFETY_DOOR_BIT))) { + bit_true(sys_rt_exec_state, EXEC_SAFETY_DOOR); + #endif + } + } +} + + +// Returns if safety door is ajar(T) or closed(F), based on pin state. +uint8_t system_check_safety_door_ajar() +{ + #ifdef ENABLE_SAFETY_DOOR_INPUT_PIN + #ifdef INVERT_CONTROL_PIN + return(bit_istrue(CONTROL_PIN,bit(SAFETY_DOOR_BIT))); + #else + return(bit_isfalse(CONTROL_PIN,bit(SAFETY_DOOR_BIT))); + #endif + #else + return(false); // Input pin not enabled, so just return that it's closed. + #endif +} + + +// Executes user startup script, if stored. +void system_execute_startup(char *line) +{ + uint8_t n; + for (n=0; n < N_STARTUP_LINE; n++) { + if (!(settings_read_startup_line(n, line))) { + report_status_message(STATUS_SETTING_READ_FAIL); + } else { + if (line[0] != 0) { + printString(line); // Echo startup line to indicate execution. + report_status_message(gc_execute_line(line)); + } + } + } +} + + +// Directs and executes one line of formatted input from protocol_process. While mostly +// incoming streaming g-code blocks, this also executes Grbl internal commands, such as +// settings, initiating the homing cycle, and toggling switch states. This differs from +// the realtime command module by being susceptible to when Grbl is ready to execute the +// next line during a cycle, so for switches like block delete, the switch only effects +// the lines that are processed afterward, not necessarily real-time during a cycle, +// since there are motions already stored in the buffer. However, this 'lag' should not +// be an issue, since these commands are not typically used during a cycle. +uint8_t system_execute_line(char *line) +{ + uint8_t char_counter = 1; + uint8_t helper_var = 0; // Helper variable + float parameter, value; + switch( line[char_counter] ) { + case 0 : report_grbl_help(); break; + case '$': case 'G': case 'C': case 'X': + if ( line[(char_counter+1)] != 0 ) { return(STATUS_INVALID_STATEMENT); } + switch( line[char_counter] ) { + case '$' : // Prints Grbl settings + if ( sys.state & (STATE_CYCLE | STATE_HOLD) ) { return(STATUS_IDLE_ERROR); } // Block during cycle. Takes too long to print. + else { report_grbl_settings(); } + break; + case 'G' : // Prints gcode parser state + // TODO: Move this to realtime commands for GUIs to request this data during suspend-state. + report_gcode_modes(); + break; + case 'C' : // Set check g-code mode [IDLE/CHECK] + // Perform reset when toggling off. Check g-code mode should only work if Grbl + // is idle and ready, regardless of alarm locks. This is mainly to keep things + // simple and consistent. + if ( sys.state == STATE_CHECK_MODE ) { + mc_reset(); + report_feedback_message(MESSAGE_DISABLED); + } else { + if (sys.state) { return(STATUS_IDLE_ERROR); } // Requires no alarm mode. + sys.state = STATE_CHECK_MODE; + report_feedback_message(MESSAGE_ENABLED); + } + break; + case 'X' : // Disable alarm lock [ALARM] + if (sys.state == STATE_ALARM) { + report_feedback_message(MESSAGE_ALARM_UNLOCK); + sys.state = STATE_IDLE; + // Don't run startup script. Prevents stored moves in startup from causing accidents. + if (system_check_safety_door_ajar()) { // Check safety door switch before returning. + bit_true(sys_rt_exec_state, EXEC_SAFETY_DOOR); + protocol_execute_realtime(); // Enter safety door mode. + } + } // Otherwise, no effect. + break; + // case 'J' : break; // Jogging methods + // TODO: Here jogging can be placed for execution as a seperate subprogram. It does not need to be + // susceptible to other realtime commands except for e-stop. The jogging function is intended to + // be a basic toggle on/off with controlled acceleration and deceleration to prevent skipped + // steps. The user would supply the desired feedrate, axis to move, and direction. Toggle on would + // start motion and toggle off would initiate a deceleration to stop. One could 'feather' the + // motion by repeatedly toggling to slow the motion to the desired location. Location data would + // need to be updated real-time and supplied to the user through status queries. + // More controlled exact motions can be taken care of by inputting G0 or G1 commands, which are + // handled by the planner. It would be possible for the jog subprogram to insert blocks into the + // block buffer without having the planner plan them. It would need to manage de/ac-celerations + // on its own carefully. This approach could be effective and possibly size/memory efficient. +// } +// break; + } + break; + default : + // Block any system command that requires the state as IDLE/ALARM. (i.e. EEPROM, homing) + if ( !(sys.state == STATE_IDLE || sys.state == STATE_ALARM) ) { return(STATUS_IDLE_ERROR); } + switch( line[char_counter] ) { + case '#' : // Print Grbl NGC parameters + if ( line[++char_counter] != 0 ) { return(STATUS_INVALID_STATEMENT); } + else { report_ngc_parameters(); } + break; + case 'H' : // Perform homing cycle [IDLE/ALARM] + if (bit_istrue(settings.flags,BITFLAG_HOMING_ENABLE)) { + sys.state = STATE_HOMING; // Set system state variable + // Only perform homing if Grbl is idle or lost. + + // TODO: Likely not required. + if (system_check_safety_door_ajar()) { // Check safety door switch before homing. + bit_true(sys_rt_exec_state, EXEC_SAFETY_DOOR); + protocol_execute_realtime(); // Enter safety door mode. + } + + + mc_homing_cycle(); + if (!sys.abort) { // Execute startup scripts after successful homing. + sys.state = STATE_IDLE; // Set to IDLE when complete. + + + + st_go_idle(); // Set steppers to the settings idle state before returning. + system_execute_startup(line); + } + } else { return(STATUS_SETTING_DISABLED); } + break; + case 'I' : // Print or store build info. [IDLE/ALARM] + if ( line[++char_counter] == 0 ) { + settings_read_build_info(line); + report_build_info(line); + } else { // Store startup line [IDLE/ALARM] + if(line[char_counter++] != '=') { return(STATUS_INVALID_STATEMENT); } + helper_var = char_counter; // Set helper variable as counter to start of user info line. + do { + line[char_counter-helper_var] = line[char_counter]; + } while (line[char_counter++] != 0); + settings_store_build_info(line); + } + break; + case 'R' : // Restore defaults [IDLE/ALARM] + if (line[++char_counter] != 'S') { return(STATUS_INVALID_STATEMENT); } + if (line[++char_counter] != 'T') { return(STATUS_INVALID_STATEMENT); } + if (line[++char_counter] != '=') { return(STATUS_INVALID_STATEMENT); } + if (line[char_counter+2] != 0) { return(STATUS_INVALID_STATEMENT); } + switch (line[++char_counter]) { + case '$': settings_restore(SETTINGS_RESTORE_DEFAULTS); break; + case '#': settings_restore(SETTINGS_RESTORE_PARAMETERS); break; + case '*': settings_restore(SETTINGS_RESTORE_ALL); break; + default: return(STATUS_INVALID_STATEMENT); + } + report_feedback_message(MESSAGE_RESTORE_DEFAULTS); + mc_reset(); // Force reset to ensure settings are initialized correctly. + break; + case 'N' : // Startup lines. [IDLE/ALARM] + if ( line[++char_counter] == 0 ) { // Print startup lines + for (helper_var=0; helper_var < N_STARTUP_LINE; helper_var++) { + if (!(settings_read_startup_line(helper_var, line))) { + report_status_message(STATUS_SETTING_READ_FAIL); + } else { + report_startup_line(helper_var,line); + } + } + break; + } else { // Store startup line [IDLE Only] Prevents motion during ALARM. + if (sys.state != STATE_IDLE) { return(STATUS_IDLE_ERROR); } // Store only when idle. + helper_var = true; // Set helper_var to flag storing method. + // No break. Continues into default: to read remaining command characters. + } + default : // Storing setting methods [IDLE/ALARM] + if(!read_float(line, &char_counter, ¶meter)) { return(STATUS_BAD_NUMBER_FORMAT); } + if(line[char_counter++] != '=') { return(STATUS_INVALID_STATEMENT); } + if (helper_var) { // Store startup line + // Prepare sending gcode block to gcode parser by shifting all characters + helper_var = char_counter; // Set helper variable as counter to start of gcode block + do { + line[char_counter-helper_var] = line[char_counter]; + } while (line[char_counter++] != 0); + // Execute gcode block to ensure block is valid. + helper_var = gc_execute_line(line); // Set helper_var to returned status code. + if (helper_var) { return(helper_var); } + else { + helper_var = trunc(parameter); // Set helper_var to int value of parameter + settings_store_startup_line(helper_var,line); + } + } else { // Store global setting. + if(!read_float(line, &char_counter, &value)) { return(STATUS_BAD_NUMBER_FORMAT); } + if((line[char_counter] != 0) || (parameter > 255)) { return(STATUS_INVALID_STATEMENT); } + return(settings_store_global_setting((uint8_t)parameter, value)); + } + } + } + return(STATUS_OK); // If '$' command makes it to here, then everything's ok. +} + + +// Returns machine position of axis 'idx'. Must be sent a 'step' array. +// NOTE: If motor steps and machine position are not in the same coordinate frame, this function +// serves as a central place to compute the transformation. +float system_convert_axis_steps_to_mpos(int32_t *steps, uint8_t idx) +{ + float pos; + #ifdef COREXY + if (idx==X_AXIS) { + pos = (float)system_convert_corexy_to_x_axis_steps(steps) / settings.steps_per_mm[A_MOTOR]; + } else if (idx==Y_AXIS) { + pos = (float)system_convert_corexy_to_y_axis_steps(steps) / settings.steps_per_mm[B_MOTOR]; + } else { + pos = steps[idx]/settings.steps_per_mm[idx]; + } + #else + pos = steps[idx]/settings.steps_per_mm[idx]; + #endif + return(pos); +} + + +void system_convert_array_steps_to_mpos(float *position, int32_t *steps) +{ + uint8_t idx; + for (idx=0; idx. +*/ + +#ifndef system_h +#define system_h + +#include "grbl.h" + +// Define system executor bit map. Used internally by realtime protocol as realtime command flags, +// which notifies the main program to execute the specified realtime command asynchronously. +// NOTE: The system executor uses an unsigned 8-bit volatile variable (8 flag limit.) The default +// flags are always false, so the realtime protocol only needs to check for a non-zero value to +// know when there is a realtime command to execute. +#define EXEC_STATUS_REPORT bit(0) // bitmask 00000001 +#define EXEC_CYCLE_START bit(1) // bitmask 00000010 +#define EXEC_CYCLE_STOP bit(2) // bitmask 00000100 +#define EXEC_FEED_HOLD bit(3) // bitmask 00001000 +#define EXEC_RESET bit(4) // bitmask 00010000 +#define EXEC_SAFETY_DOOR bit(5) // bitmask 00100000 +#define EXEC_MOTION_CANCEL bit(6) // bitmask 01000000 + +// Alarm executor bit map. +// NOTE: EXEC_CRITICAL_EVENT is an optional flag that must be set with an alarm flag. When enabled, +// this halts Grbl into an infinite loop until the user aknowledges the problem and issues a soft- +// reset command. For example, a hard limit event needs this type of halt and aknowledgement. +#define EXEC_CRITICAL_EVENT bit(0) // bitmask 00000001 (SPECIAL FLAG. See NOTE:) +#define EXEC_ALARM_HARD_LIMIT bit(1) // bitmask 00000010 +#define EXEC_ALARM_SOFT_LIMIT bit(2) // bitmask 00000100 +#define EXEC_ALARM_ABORT_CYCLE bit(3) // bitmask 00001000 +#define EXEC_ALARM_PROBE_FAIL bit(4) // bitmask 00010000 +#define EXEC_ALARM_HOMING_FAIL bit(5) // bitmask 00100000 + +// Define system state bit map. The state variable primarily tracks the individual functions +// of Grbl to manage each without overlapping. It is also used as a messaging flag for +// critical events. +#define STATE_IDLE 0 // Must be zero. No flags. +#define STATE_ALARM bit(0) // In alarm state. Locks out all g-code processes. Allows settings access. +#define STATE_CHECK_MODE bit(1) // G-code check mode. Locks out planner and motion only. +#define STATE_HOMING bit(2) // Performing homing cycle +#define STATE_CYCLE bit(3) // Cycle is running or motions are being executed. +#define STATE_HOLD bit(4) // Active feed hold +#define STATE_SAFETY_DOOR bit(5) // Safety door is ajar. Feed holds and de-energizes system. +#define STATE_MOTION_CANCEL bit(6) // Motion cancel by feed hold and return to idle. + +// Define system suspend states. +#define SUSPEND_DISABLE 0 // Must be zero. +#define SUSPEND_ENABLE_HOLD bit(0) // Enabled. Indicates the cycle is active and currently undergoing a hold. +#define SUSPEND_ENABLE_READY bit(1) // Ready to resume with a cycle start command. +#define SUSPEND_ENERGIZE bit(2) // Re-energizes output before resume. +#define SUSPEND_MOTION_CANCEL bit(3) // Cancels resume motion. Used by probing routine. + + +// Define global system variables +typedef struct { + uint8_t abort; // System abort flag. Forces exit back to main loop for reset. + uint8_t state; // Tracks the current state of Grbl. + uint8_t suspend; // System suspend bitflag variable that manages holds, cancels, and safety door. + uint8_t soft_limit; // Tracks soft limit errors for the state machine. (boolean) + + int32_t position[N_AXIS]; // Real-time machine (aka home) position vector in steps. + // NOTE: This may need to be a volatile variable, if problems arise. + + int32_t probe_position[N_AXIS]; // Last probe position in machine coordinates and steps. + uint8_t probe_succeeded; // Tracks if last probing cycle was successful. + uint8_t homing_axis_lock; // Locks axes when limits engage. Used as an axis motion mask in the stepper ISR. + int check_cnt; //check_motor + bool rest_flag; // + bool print_reset_flag; +} system_t; +extern system_t sys; + +volatile uint8_t sys_probe_state; // Probing state value. Used to coordinate the probing cycle with stepper ISR. +volatile uint8_t sys_rt_exec_state; // Global realtime executor bitflag variable for state management. See EXEC bitmasks. +volatile uint8_t sys_rt_exec_alarm; // Global realtime executor bitflag variable for setting various alarms. + + +// Initialize the serial protocol +void system_init(); + +// Returns if safety door is open or closed, based on pin state. +uint8_t system_check_safety_door_ajar(); + +// Executes an internal system command, defined as a string starting with a '$' +uint8_t system_execute_line(char *line); + +// Execute the startup script lines stored in EEPROM upon initialization +void system_execute_startup(char *line); + +// Returns machine position of axis 'idx'. Must be sent a 'step' array. +float system_convert_axis_steps_to_mpos(int32_t *steps, uint8_t idx); + +// Updates a machine 'position' array based on the 'step' array sent. +void system_convert_array_steps_to_mpos(float *position, int32_t *steps); + +// CoreXY calculation only. Returns x or y-axis "steps" based on CoreXY motor steps. +#ifdef COREXY + int32_t system_convert_corexy_to_x_axis_steps(int32_t *steps); + int32_t system_convert_corexy_to_y_axis_steps(int32_t *steps); +#endif + +#endif diff --git a/src/uarm_angle.c b/src/uarm_angle.c new file mode 100755 index 0000000..3e84d0e --- /dev/null +++ b/src/uarm_angle.c @@ -0,0 +1,457 @@ +#include "uarm_angle.h" +#include "uarm_iic.h" + +//uint16_t reference_param[3] = {0}; + +struct refer_value_t { + uint16_t param_b; + uint16_t param_l; + uint16_t param_r; +} reference = {0}; + +uint16_t reference_param_pointb[3] = {0}; + + +uint16_t base_calibra_angle_map[101] = {0}; // max ){ max = temp_value; } + if( temp_value < min ){ min = temp_value; } + sum_value += temp_value; + } + + aver_value = ((sum_value - max - min)/3); + if( aver_value > 4096 ){ + return 0; + } + + return aver_value; +} + +static uint16_t read_encoder_status_value(enum angle_channel_e channel) +{ + uint16_t temp_value = 0; + temp_value = (iic_read_byte(channel,(0x36<<1),0x0B)) & 0x18; + //temp_value = ((uint16_t)iic_read_byte(channel,(0x36<<1),0x05))<<8 |iic_read_byte(channel,(0x36<<1),0x06); + return temp_value; +} + +bool check_encoder(enum angle_channel_e channel) +{ + uint16_t mang=0; + switch(channel) + { + case CHANNEL_ARML: + mang = read_encoder_status_value(CHANNEL_ARML); + //uart_printf( "left mang : %d\r\n", mang ); + if(mang == 24) + { + return true; + } + else + { + return false; + } + break; + case CHANNEL_ARMR: + mang = read_encoder_status_value(CHANNEL_ARMR); + //uart_printf( "right mang : %d\r\n", mang ); + if(mang == 24) + { + return true; + } + else + { + return false; + } + break; + case CHANNEL_BASE: + mang = read_encoder_status_value(CHANNEL_BASE); + //uart_printf( "base mang : %d\r\n", mang ); + if(mang == 24) + { + return true; + } + else + { + return false; + } + break; + + } +} + +float calculate_current_angle(enum angle_channel_e channel){ + uint16_t angle_reg_value = read_angle_reg_value(channel); + int long offset = 0; + float angle = 0.0; + int i = 0; + uint16_t head_data = 0, tail_data = 0; + int long refer_value = 0; + + switch( channel ){ + case CHANNEL_ARML:; + #if defined(UARM_2500) + for( i=0; i < sizeof(left_calibra_angle_map)/sizeof(uint16_t)-1; i++ ){ + head_data = left_calibra_angle_map[i]; + tail_data = left_calibra_angle_map[i+1]; + if( head_data > tail_data ){ + tail_data += 4095; + } + if( (angle_reg_value<=tail_data) && (angle_reg_value>=head_data) ){ break; } + } + angle = ( ( 115.2 - i*1.8 - (angle_reg_value-head_data)/4096.0*360.0) + (115.2-(i+1)*1.8+(tail_data-angle_reg_value)/4096.0*360.0) ) / 2; + return angle; + #else + refer_value = (int long)reference.param_l; + + if( refer_value-(int long)angle_reg_value > 2048 ){ + refer_value -= 4096; + }else if( refer_value-(int long)angle_reg_value < -2048 ){ + refer_value += 4096; + } + + offset = refer_value - (int long)angle_reg_value; + #endif + break; + case CHANNEL_ARMR: + #if defined(UARM_2500) + for( i=0; i < sizeof(right_calibra_angle_map)/sizeof(uint16_t)-1; i++ ){ + head_data = right_calibra_angle_map[i]; + tail_data = right_calibra_angle_map[i+1]; + if( tail_data > head_data ){ + head_data += 4095; + } + if( (angle_reg_value<=head_data) && (angle_reg_value>=tail_data) ){ break; } + } + angle = ( ((head_data-angle_reg_value)/4096.0*360.0 + i*1.8 - 1.8) + ((i+1)*1.8 - 1.8 - (angle_reg_value-tail_data)/4096.0*360.0) ) / 2; + return angle; + #else + refer_value = (int long)reference.param_r; + + if( refer_value-(int long)angle_reg_value > 2048 ){ + refer_value -= 4096; + }else if( refer_value-(int long)angle_reg_value < -2048 ){ + refer_value += 4096; + } + + offset = refer_value - (int long)angle_reg_value; + #endif + break; + case CHANNEL_BASE:; + #if defined(UARM_2500) + for( i=0; i < sizeof(base_calibra_angle_map)/sizeof(uint16_t)-1; i++ ){ + head_data = base_calibra_angle_map[i]; + tail_data = base_calibra_angle_map[i+1]; + if( tail_data > head_data ){ + head_data += 4095; + } + if( (angle_reg_value<=head_data) && (angle_reg_value>tail_data) ){ break; } + } + angle = ( ((head_data-angle_reg_value)/4096.0*360.0 + i*1.8) + ((i+1)*1.8 - (angle_reg_value-tail_data)/4096.0*360.0) ) / 2; + return angle; + #else + refer_value = (int long)reference.param_b; + + if( refer_value-(int long)angle_reg_value > 2048 ){ + refer_value -= 4096; + }else if( refer_value-(int long)angle_reg_value < -2048 ){ + refer_value += 4096; + } + + offset = refer_value - (int long)angle_reg_value; + #endif + break; + } + + + angle = get_point_b_angle(channel) - offset * 360.0 / 4096; + +// if(angle > 360){ +// angle -= 360; +// } +// if(angle < 0){ +// angle += 360; +// } + + return angle; +} + + +static void read_angle_reference_param(void){ + uint8_t angle_addr_flag = eeprom_get_char(EEPROM_ANGLE_REFER_FLAG); + + int8_t read_size = sizeof(struct refer_value_t); + unsigned int read_addr = 0; + if( angle_addr_flag == 0xBB ){ + read_addr = EEPROM_ADDR_ANGLE_REFER; + }else{ + read_addr = EEPROM_OLD_ADDR_ANGLE_REFER; + } + + char *p = (char *)(&reference); + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + +// DB_PRINT_STR( "refer:B%d L%d R%d\r\n", reference.param_b, reference.param_l, reference.param_r ); + +} + +static void write_angle_reference_param(void){ + int8_t write_size = sizeof(struct refer_value_t); + unsigned int write_addr = EEPROM_ADDR_ANGLE_REFER; + + char *p = (char *)(&reference); + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + eeprom_put_char( EEPROM_ANGLE_REFER_FLAG, 0xBB ); + + read_angle_reference_param(); + uarm.init_arml_angle = calculate_current_angle(CHANNEL_ARML); // 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(left_calibra_angle_map); // 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(right_calibra_angle_map); // 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } +} + +static void write_angle_calibra_map(void){ + char *p = (char *)(base_calibra_angle_map); + unsigned int write_addr = EEPROM_ADDR_ANGLE_CAL_MAP; + int16_t write_size = sizeof(base_calibra_angle_map); + + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + p = (char *)(left_calibra_angle_map); + write_addr = EEPROM_ADDR_ANGLE_CAL_MAP + sizeof(base_calibra_angle_map); + write_size = sizeof(left_calibra_angle_map); + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + p = (char *)(right_calibra_angle_map); + write_addr = EEPROM_ADDR_ANGLE_CAL_MAP + sizeof(base_calibra_angle_map) + sizeof(left_calibra_angle_map); + write_size = sizeof(right_calibra_angle_map); + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + +} + +bool atuo_angle_calibra(void){ + uint16_t calibra_cnt = 0; + uint16_t per_angle_cnt = 0; + + BASE_DIRECTION_PORT &= (~BASE_DIRECTION_MASK); + for( calibra_cnt=0; calibra_cnt < sizeof(base_calibra_angle_map)/sizeof(uint16_t)-1; calibra_cnt++ ){ // +#include + +#include "uarm_debug.h" +#include "uarm_angle.h" +#include "uarm_timer.h" +#include "uarm_peripheral.h" + +// The Atmega2560 has 4KB EEPROM. +//#define EEPROM_ADDR_ANGLE_REFER 3072U + +//#define UARM_MINI +//#define UARM_2500 +#define DATA_TYPE_BYTE 1 +#define DATA_TYPE_INTEGER 2 +#define DATA_TYPE_FLOAT 4 + +#define EXTERNAL_EEPROM_USER_ADDRESS 0xa0 +#define EXTERNAL_EEPROM_SYS_ADDRESS 0xa2 + + +#define EEPROM_ADDR_ANGLE_REFER 820U +#define EEPROM_OLD_ADDR_ANGLE_REFER 800U +#define EEPROM_ANGLE_REFER_FLAG 818U +#define EEPROM_BT_MAC_ADDR 1002U + +#define EEPROM_ADDR_PARAM 3200U // refer to v3.2.0 firmware +#define EEPROM_MODE_ADDR 900U +#define EEPROM_HEIGHT_OFFSET_ADDR 910U +#define EEPROM_FRONT_OFFSET_ADDR 920U +#define EEPROM_USER_HEIGHT_OFFSET_ADDR 930U +#define EEPROM_USER_FRONT_OFFSET_ADDR 940U + +#define EEPROM_EFFECT_ANGLE_OFFSET_ADDR 3202U + +// anglea + ARMB angle -> angleb + BASE angle -> anglec +*/ +bool is_angle_legal(float anglea, float angleb, float anglec){ + + if( isnan(anglea) || isnan(angleb) || isnan(anglec) ){ +// DB_PRINT_STR("value is nan\r\n"); + return false; + } + if( (anglea>ARMA_MAX_ANGLE) || (angleaARMB_MAX_ANGLE) || (angleb ARMA_ARMB_MAX_ANGLE) || (180-anglea-angleb < ARMA_ARMB_MIN_ANGLE) ){ +// DB_PRINT_STR("angle_ab error\r\n"); + return false; + } + if( (anglec>BASE_MAX_ANGLE) || (anglec (ARM_A *sin(*anglea/RAD_TO_DEG)) ){ + *angleb = -*angleb; + } + +// DB_PRINT_FLOAT(fabs(z));DB_PRINT_STR(" "); +// DB_PRINT_FLOAT(ARM_B *sin(*angleb/RAD_TO_DEG));DB_PRINT_STR(" "); +// DB_PRINT_FLOAT(z);DB_PRINT_STR("\r\n"); + + + if( fabs(_height)>(ARM_B *sin(*angleb/RAD_TO_DEG)) && _height<0.0 ){ + *anglea = -*anglea; + } + + + + // get the base rotation angle + + if( x == 0 ){ + if(y > 0){ + *anglec = 90; + }else{ + *anglec = -90; + } + }else if(x <0){ + *anglec = NAN; // 0){ + anglec = 90 / RAD_TO_DEG; + }else{ + anglec = -90 / RAD_TO_DEG; + } + }else if(*x < 0){ + anglec = NAN; // 0){ + anglec = 90 / RAD_TO_DEG; + }else{ + anglec = -90 / RAD_TO_DEG; + } + }else if(*x < 0){ + anglec = NAN; // >8); + if(eeprom_iic_read_ack()) return 1; + eeprom_iic_sendbyte(addr%256); + if(eeprom_iic_read_ack()) return 1; + + while(len != 0) + { + eeprom_iic_sendbyte(*(buf + length_of_data - len)); + len--; + if(eeprom_iic_read_ack()){ eeprom_iic_stop();return 1;} + delay_ms(5); + } + eeprom_iic_stop(); + + return 0; +} + +unsigned char eeprom_iic_readbuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len) +{ + EEPROM_SCL_OUTPUT; + EEPROM_SDA_OUTPUT; + EEPROM_SCK_H; + EEPROM_SDA_H; + + + unsigned char length_of_data=0; + length_of_data = len; + eeprom_iic_start(); + eeprom_iic_sendbyte(device_addr); + if(eeprom_iic_read_ack()) return 1; + eeprom_iic_sendbyte(addr>>8); + if(eeprom_iic_read_ack()) return 1; + eeprom_iic_sendbyte(addr%256); + if(eeprom_iic_read_ack()) return 1; + eeprom_iic_start(); + eeprom_iic_sendbyte(device_addr+1); + if(eeprom_iic_read_ack()) return 1; + + while(len != 0) + { + *(buf + length_of_data - len) = eeprom_iic_readbyte(); + len--; + if(len != 0) { + eeprom_iic_send_ack(); + } + } + eeprom_iic_stop(); + return 0; +} + + +static void arml_iic_start(void) +{ +#ifdef sort_i2c + ARML_SDA_H; + ARML_SCK_H; + delay_us(1); + ARML_SDA_L; + delay_us(1); + + ARML_SCK_L; + delay_us(1); +#else + ARML_SDA_H; + ARML_SCK_H; + delay_us(5); + ARML_SDA_L; + delay_us(5); + ARML_SCK_L; + delay_us(2); + #endif + + +} + +static void arml_iic_stop(void) +{ +#ifdef sort_i2c + ARML_SCK_L; + ARML_SDA_L; + delay_us(1); + + + ARML_SCK_H; + delay_us(1); + + ARML_SDA_H; + delay_us(1); +#else + ARML_SCK_L; + ARML_SDA_L; + delay_us(5); + ARML_SCK_H; + delay_us(5); + ARML_SDA_H; + delay_us(5); +#endif +} + +static uint8_t arml_iic_wait_ack(void) +{ + uint8_t ucErrTime=0; + ARML_SDA_H;delay_us(2); + ARML_SCK_H;delay_us(2); + + + ARML_SDA_INPUT; +#ifdef sort_i2c + while(ARML_READ_SDA) + { + ucErrTime++; + if(ucErrTime>50) + { + arml_iic_stop(); + return 1; + } + } + + #else + while(ARML_READ_SDA) + { + ucErrTime++; + if(ucErrTime>250) + { + arml_iic_stop(); + return 1; + } + } + + #endif + ARML_SCK_L; + delay_us(2); + return 0; +} + +static void arml_iic_ack(void) +{ +#ifdef sort_i2c + ARML_SCK_L; + ARML_SDA_L; + delay_us(1); + ARML_SCK_H; + delay_us(1); + + ARML_SCK_L; + delay_us(1); + ARML_SDA_H; + delay_us(1); +#else + ARML_SCK_L; + ARML_SDA_L; + delay_us(2); + ARML_SCK_H; + delay_us(5); + + ARML_SCK_L; + delay_us(2); + ARML_SDA_H; + delay_us(2); +#endif +} + +static void arml_iic_nack(void) +{ +#ifdef sort_i2c + ARML_SCK_L; + ARML_SDA_H; + delay_us(1); + ARML_SCK_H; + delay_us(1); + + ARML_SCK_L; + delay_us(1); + ARML_SDA_H; + delay_us(1); +#else + ARML_SCK_L; + ARML_SDA_H; + delay_us(2); + ARML_SCK_H; + delay_us(5); + + ARML_SCK_L; + delay_us(2); + ARML_SDA_H; + delay_us(2); + #endif +} + +static void arml_iic_send_byte(uint8_t data) +{ + uint8_t i; + #ifdef sort_i2c + for(i=0;i<8;i++) + { + ARML_SCK_L; + if(data&0x80) + ARML_SDA_H + else + ARML_SDA_L + delay_us(1); + ARML_SCK_H; + delay_us(1); + ARML_SCK_L; + data<<=1; + delay_us(1); + } + + delay_us(1); + ARML_SDA_H; + delay_us(1); + #else +for(i=0;i<8;i++) + { + ARML_SCK_L; + if(data&0x80) + ARML_SDA_H + else + ARML_SDA_L + delay_us(5); + ARML_SCK_H; + delay_us(5); + ARML_SCK_L; + data<<=1; + delay_us(5); + } + + delay_us(2); + ARML_SDA_H; + delay_us(2); + #endif +} + +static uint8_t arml_iic_read_byte(uint8_t ack) +{ + uint8_t i,receive=0; + #ifdef sort_i2c + delay_us(1); + ARML_SDA_H; + delay_us(1); + + for(i=0;i<8;i++) + { + ARML_SCK_L; + delay_us(1); + ARML_SCK_H; + receive<<=1; + delay_us(1); + ARML_SDA_INPUT; + + if(ARML_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(1); + } + if(!ack) + arml_iic_nack(); + else + arml_iic_ack(); + + ARML_SCK_L; + delay_us(1); +#else + delay_us(2); + ARML_SDA_H; + delay_us(2); + + for(i=0;i<8;i++) + { + ARML_SCK_L; + delay_us(5); + ARML_SCK_H; + receive<<=1; + delay_us(5); + ARML_SDA_INPUT; + + if(ARML_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(5); + } + if(!ack) + arml_iic_nack(); + else + arml_iic_ack(); + + ARML_SCK_L; + delay_us(2); + #endif + + return receive; +} + +static void arml_iic_write_onebyte(uint8_t deviceaddr,uint8_t writeaddr,uint8_t writedata) +{ + arml_iic_start(); + arml_iic_send_byte(deviceaddr&0xfe); + arml_iic_wait_ack(); + arml_iic_send_byte(writeaddr); + arml_iic_wait_ack(); + arml_iic_send_byte(writedata); + arml_iic_wait_ack(); + arml_iic_stop(); +#ifdef sort_i2c + delay_us(1); +#else + delay_us(10); +#endif +} + +static uint8_t arml_iic_read_onebyte(uint8_t deviceaddr,uint8_t readaddr) +{ + uint8_t temp; + arml_iic_start(); + arml_iic_send_byte(deviceaddr&0xfe); + arml_iic_wait_ack(); + arml_iic_send_byte(readaddr); + arml_iic_wait_ack(); + + arml_iic_start(); + arml_iic_send_byte(deviceaddr|0x01); + arml_iic_wait_ack(); + temp=arml_iic_read_byte(0); + arml_iic_stop(); + return temp; +} + +static void armr_iic_start(void) +{ +#ifdef sort_i2c + ARMR_SDA_H; + ARMR_SCK_H; + delay_us(1); + ARMR_SDA_L; + delay_us(1); + ARMR_SCK_L; + delay_us(1); + #else + ARMR_SDA_H; + ARMR_SCK_H; + delay_us(5); + ARMR_SDA_L; + delay_us(5); + ARMR_SCK_L; + delay_us(2); + #endif + +} + +static void armr_iic_stop(void) +{ +#ifdef sort_i2c + ARMR_SCK_L; + ARMR_SDA_L; + delay_us(1); + ARMR_SCK_H; + delay_us(1); + ARMR_SDA_H; + delay_us(1); +#else + ARMR_SCK_L; + ARMR_SDA_L; + delay_us(5); + ARMR_SCK_H; + delay_us(5); + ARMR_SDA_H; + delay_us(5); + #endif +} + +static uint8_t armr_iic_wait_ack(void) +{ + uint8_t ucErrTime=0; + ARMR_SDA_H;delay_us(2); + ARMR_SCK_H;delay_us(2); + + + ARMR_SDA_INPUT; +#ifdef sort_i2c + while(ARMR_READ_SDA) + { + ucErrTime++; + if(ucErrTime>50) + { + armr_iic_stop(); + return 1; + } + } + #else + while(ARMR_READ_SDA) + { + ucErrTime++; + if(ucErrTime>250) + { + armr_iic_stop(); + return 1; + } + } + + + #endif + ARMR_SCK_L; + delay_us(2); + return 0; +} + +static void armr_iic_ack(void) +{ +#ifdef sort_i2c + ARMR_SCK_L; + ARMR_SDA_L; + delay_us(1); + ARMR_SCK_H; + delay_us(1); + + ARMR_SCK_L; + delay_us(1); + ARMR_SDA_H; + delay_us(1); + #else + ARMR_SCK_L; + ARMR_SDA_L; + delay_us(2); + ARMR_SCK_H; + delay_us(5); + + ARMR_SCK_L; + delay_us(2); + ARMR_SDA_H; + delay_us(2); + #endif + +} + +static void armr_iic_nack(void) +{ +#ifdef sort_i2c + ARMR_SCK_L; + ARMR_SDA_H; + delay_us(1); + ARMR_SCK_H; + delay_us(1); + + ARMR_SCK_L; + delay_us(1); + ARMR_SDA_H; + delay_us(1); +#else + ARMR_SCK_L; + ARMR_SDA_H; + delay_us(2); + ARMR_SCK_H; + delay_us(5); + + ARMR_SCK_L; + delay_us(2); + ARMR_SDA_H; + delay_us(2); +#endif + +} + +static void armr_iic_send_byte(uint8_t data) +{ + uint8_t i; + #ifdef sort_i2c + for(i=0;i<8;i++) + { + ARMR_SCK_L; + if(data&0x80) + ARMR_SDA_H + else + ARMR_SDA_L + delay_us(1); + ARMR_SCK_H; + delay_us(1); + ARMR_SCK_L; + data<<=1; + delay_us(1); + } + + delay_us(1); + ARMR_SDA_H; + delay_us(1); + #else + for(i=0;i<8;i++) + { + ARMR_SCK_L; + if(data&0x80) + ARMR_SDA_H + else + ARMR_SDA_L + delay_us(5); + ARMR_SCK_H; + delay_us(5); + ARMR_SCK_L; + data<<=1; + delay_us(5); + } + + delay_us(2); + ARMR_SDA_H; + delay_us(2); + #endif +} + +static uint8_t armr_iic_read_byte(uint8_t ack) +{ + uint8_t i,receive=0; + #ifdef sort_i2c + delay_us(1); + ARMR_SDA_H; + delay_us(1); + + for(i=0;i<8;i++) + { + ARMR_SCK_L; + delay_us(1); + ARMR_SCK_H; + receive<<=1; + delay_us(1); + ARMR_SDA_INPUT; + + if(ARMR_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(1); + } + if(!ack) + armr_iic_nack(); + else + armr_iic_ack(); + + ARMR_SCK_L; + delay_us(1); + #else + delay_us(2); + ARMR_SDA_H; + delay_us(2); + + for(i=0;i<8;i++) + { + ARMR_SCK_L; + delay_us(5); + ARMR_SCK_H; + receive<<=1; + delay_us(5); + ARMR_SDA_INPUT; + + if(ARMR_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(5); + } + if(!ack) + armr_iic_nack(); + else + armr_iic_ack(); + + ARMR_SCK_L; + delay_us(2); + #endif + return receive; +} + +static void armr_iic_write_onebyte(uint8_t deviceaddr,uint8_t writeaddr,uint8_t writedata) +{ + armr_iic_start(); + armr_iic_send_byte(deviceaddr&0xfe); + armr_iic_wait_ack(); + armr_iic_send_byte(writeaddr); + armr_iic_wait_ack(); + armr_iic_send_byte(writedata); + armr_iic_wait_ack(); + armr_iic_stop(); +#ifdef sort_i2c + delay_us(1); +#else + delay_us(10); +#endif +} + +static uint8_t armr_iic_read_onebyte(uint8_t deviceaddr,uint8_t readaddr) +{ + uint8_t temp; + armr_iic_start(); + armr_iic_send_byte(deviceaddr&0xfe); + armr_iic_wait_ack(); + armr_iic_send_byte(readaddr); + armr_iic_wait_ack(); + + armr_iic_start(); + armr_iic_send_byte(deviceaddr|0x01); + armr_iic_wait_ack(); + temp=armr_iic_read_byte(0); + armr_iic_stop(); + return temp; +} + +static void base_iic_start(void) +{ +#ifdef sort_i2c + BASE_SDA_H; + BASE_SCK_H; + delay_us(1); + BASE_SDA_L; + delay_us(1); + BASE_SCK_L; + delay_us(1); + #else + BASE_SDA_H; + BASE_SCK_H; + delay_us(5); + BASE_SDA_L; + delay_us(5); + BASE_SCK_L; + delay_us(2); +#endif + +} + +static void base_iic_stop(void) +{ +#ifdef sort_i2c + BASE_SCK_L; + BASE_SDA_L; + delay_us(1); + BASE_SCK_H; + delay_us(1); + BASE_SDA_H; + delay_us(1); +#else + + BASE_SCK_L; + BASE_SDA_L; + delay_us(5); + BASE_SCK_H; + delay_us(5); + BASE_SDA_H; + delay_us(5); + + #endif + +} + +static uint8_t base_iic_wait_ack(void) +{ + uint8_t ucErrTime=0; + #ifdef sort_i2c + BASE_SDA_H;delay_us(1); + BASE_SCK_H;delay_us(1); + + + BASE_SDA_INPUT; + + while(BASE_READ_SDA) + { + ucErrTime++; + if(ucErrTime>50) + { + base_iic_stop(); + return 1; + } + } + + BASE_SCK_L; + delay_us(1); + #else + BASE_SDA_H;delay_us(2); + BASE_SCK_H;delay_us(2); + + + BASE_SDA_INPUT; + + while(BASE_READ_SDA) + { + ucErrTime++; + if(ucErrTime>250) + { + base_iic_stop(); + return 1; + } + } + + BASE_SCK_L; + delay_us(2); + #endif + return 0; +} + +static void base_iic_ack(void) +{ +#ifdef sort_i2c + BASE_SCK_L; + BASE_SDA_L; + delay_us(1); + BASE_SCK_H; + delay_us(1); + + BASE_SCK_L; + delay_us(1); + BASE_SDA_H; + delay_us(1); + #else + BASE_SCK_L; + BASE_SDA_L; + delay_us(2); + BASE_SCK_H; + delay_us(5); + + BASE_SCK_L; + delay_us(2); + BASE_SDA_H; + delay_us(2); + #endif +} + +static void base_iic_nack(void) +{ +#ifdef sort_i2c + BASE_SCK_L; + BASE_SDA_H; + delay_us(1); + BASE_SCK_H; + delay_us(1); + + BASE_SCK_L; + delay_us(1); + BASE_SDA_H; + delay_us(1); +#else + BASE_SCK_L; + BASE_SDA_H; + delay_us(2); + BASE_SCK_H; + delay_us(5); + + BASE_SCK_L; + delay_us(2); + BASE_SDA_H; + delay_us(2); +#endif + +} + +static void base_iic_send_byte(uint8_t data) +{ + uint8_t i; + #ifdef sort_i2c + for(i=0;i<8;i++) + { + BASE_SCK_L; + if(data&0x80) + BASE_SDA_H + else + BASE_SDA_L + delay_us(1); + BASE_SCK_H; + delay_us(1); + BASE_SCK_L; + data<<=1; + delay_us(1); + } + + delay_us(1); + BASE_SDA_H; + delay_us(1); + #else + for(i=0;i<8;i++) + { + BASE_SCK_L; + if(data&0x80) + BASE_SDA_H + else + BASE_SDA_L + delay_us(5); + BASE_SCK_H; + delay_us(5); + BASE_SCK_L; + data<<=1; + delay_us(5); + } + + delay_us(2); + BASE_SDA_H; + delay_us(2); + + + + #endif + +} + +static uint8_t base_iic_read_byte(uint8_t ack) +{ + uint8_t i,receive=0; + #ifdef sort_i2c + delay_us(1); + BASE_SDA_H; + delay_us(1); + + for(i=0;i<8;i++) + { + BASE_SCK_L; + delay_us(1); + BASE_SCK_H; + receive<<=1; + delay_us(1); + BASE_SDA_INPUT; + + if(BASE_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(1); + } + if(!ack) + base_iic_nack(); + else + base_iic_ack(); + + BASE_SCK_L; + delay_us(1); + #else + delay_us(2); + BASE_SDA_H; + delay_us(2); + + for(i=0;i<8;i++) + { + BASE_SCK_L; + delay_us(5); + BASE_SCK_H; + receive<<=1; + delay_us(5); + BASE_SDA_INPUT; + + if(BASE_READ_SDA) + receive|=0x01; + else + receive&=0xfe; + delay_us(5); + } + if(!ack) + base_iic_nack(); + else + base_iic_ack(); + + BASE_SCK_L; + delay_us(2); + #endif + return receive; +} + +static void base_iic_write_onebyte(uint8_t deviceaddr,uint8_t writeaddr,uint8_t writedata) +{ + base_iic_start(); + base_iic_send_byte(deviceaddr&0xfe); + base_iic_wait_ack(); + base_iic_send_byte(writeaddr); + base_iic_wait_ack(); + base_iic_send_byte(writedata); + base_iic_wait_ack(); + base_iic_stop(); +#ifdef sort_i2c + delay_us(1); +#else + delay_us(10); +#endif +} + +static uint8_t base_iic_read_onebyte(uint8_t deviceaddr,uint8_t readaddr) +{ + uint8_t temp; + base_iic_start(); + base_iic_send_byte(deviceaddr&0xfe); + base_iic_wait_ack(); + base_iic_send_byte(readaddr); + base_iic_wait_ack(); + + base_iic_start(); + base_iic_send_byte(deviceaddr|0x01); + base_iic_wait_ack(); + temp=base_iic_read_byte(0); + base_iic_stop(); + return temp; +} + +void angle_iic_init(void){ + ARML_SDA_OUTPUT; + ARML_SCL_OUTPUT; + ARML_SDA_SET; + ARML_SCL_SET; + + ARMR_SDA_OUTPUT; + ARMR_SCL_OUTPUT; + ARMR_SDA_SET; + ARMR_SCL_SET; + + BASE_SDA_OUTPUT; + BASE_SCL_OUTPUT; + BASE_SDA_SET; + BASE_SCL_SET; +} + +void iic_write_byte(uint8_t channel, uint8_t dev_addr, uint8_t write_addr, uint8_t write_data){ + + switch(channel){ + case 0: + arml_iic_write_onebyte(dev_addr, write_addr, write_data); + break; + case 1: + armr_iic_write_onebyte(dev_addr, write_addr, write_data); + break; + case 2: + base_iic_write_onebyte(dev_addr, write_addr, write_data); + break; + } +} + +uint8_t iic_read_byte(uint8_t channel, uint8_t dev_addr, uint8_t read_addr){ + uint8_t read_byte = 0; + switch(channel){ + case 0: + read_byte = arml_iic_read_onebyte(dev_addr, read_addr); + break; + case 1: + read_byte = armr_iic_read_onebyte(dev_addr, read_addr); + break; + case 2: + read_byte = base_iic_read_onebyte(dev_addr, read_addr); + break; + } + return read_byte; +} + + + diff --git a/src/uarm_iic.h b/src/uarm_iic.h new file mode 100755 index 0000000..52ef587 --- /dev/null +++ b/src/uarm_iic.h @@ -0,0 +1,14 @@ +#ifndef _UARM_IIC_H_ +#define _UARM_IIC_H_ + +#include "uarm_common.h" + +void angle_iic_init(void); +void iic_write_byte(uint8_t channel, uint8_t dev_addr, uint8_t write_addr, uint8_t write_data); +uint8_t iic_read_byte(uint8_t channel, uint8_t dev_addr, uint8_t read_addr); + +unsigned char eeprom_iic_writebuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len); +unsigned char eeprom_iic_readbuf(unsigned char *buf,unsigned char device_addr,unsigned int addr,unsigned char len); + +#endif + diff --git a/src/uarm_peripheral.c b/src/uarm_peripheral.c new file mode 100755 index 0000000..14021fe --- /dev/null +++ b/src/uarm_peripheral.c @@ -0,0 +1,1124 @@ +#include "uarm_common.h" +#include "uarm_coord_convert.h" + + +/* end-effector driver + * + */ + +/*************** servo mode ****************/ +float duty_ms = 1.51; +static void servo_init(void){ + time4_pwm_init(20000); + time4_set_duty( 3, (duty_ms/20.0) * 1023 ); +} + +static void servo_set_angle(float angle){ + if( angle > 180 ){ angle = 0; } + if( angle < 0 ){ angle = 180; } + angle = 180 - angle; + + duty_ms = (angle / 180.0) * 2.0 + 0.5; + time4_set_duty( 3, (duty_ms/20.0) * 1023 ); + //delay_ms(500); +} + +static void servo_deinit(void){ + time4_stop(); +} + +static float servo_get_angle(void){ + return 180 - (duty_ms - 0.5) / 2.0 *180; +} + +/************ steper mode ******************/ +int32_t step_count = 0; +float steper_current_angle = 0; + +void step_creater(void){ + static bool status_flag = false; + if( step_count > 0 ){ + if( status_flag ){ + status_flag = false; + step_count--; + PORTH |= (1<<6); + }else{ + status_flag = true; + PORTH &= ~(1<<6); + } + }else{ + time4_stop(); + step_count = 0; + uarm.effect_ldie = true; +// DB_PRINT_STR( "time4 stop\r\n" ); + } +} + +static void steper_init(void){ + DDRH |= (1<<5); // 360 || angle < 0 ){ return; } + + if( uarm.param.work_mode==WORK_MODE_STEPER_FLAT || uarm.param.work_mode==WORK_MODE_STEPER_STANDARD ){ + float offset_angle = angle - steper_current_angle; + if( offset_angle == 0 ){ return; } + + steper_current_angle = angle; + if( offset_angle > 0 ){ + PORTH &= ~(1<<5); // beep_duration ){ + cnt = 0; + time2_stop(); + uarm.beep_ldie = true; + } +} + +void beep_tone(unsigned long duration, double frequency){ + uarm.beep_ldie = false; + DDRL |= 1<<5; + PORTL &= ~(1<<5); + beep_duration = (duration *2*frequency/1000)-1; +// DB_PRINT_STR("beep_duration"); +// DB_PRINT_INT(beep_duration); + time2_set( frequency , beep_creater_callback ); + time2_start(); + +} + + +/* delay time : ms + * + */ +void cycle_report_coord(void){ + float x = 0, y = 0, z = 0, angle_e; + float angle_l = 0, angle_r = 0, angle_b =0; + char l_str[20] = {0}, r_str[20] = {0}, b_str[20] = {0}, e_str[20] = {0}; + + angle_l = calculate_current_angle(CHANNEL_ARML); // = gcode_delay_ms ){ + delay_cnt = 0; + gcode_delay_ms = 0; + uarm.gcode_delay_flag = false; + //DB_PRINT_STR( "delay done\r\n" ); + } + } + + if( cycle_delay_ms ){ // run cycle + + if( cycle_cnt++ >= cycle_delay_ms ){ + cycle_cnt = 0; + uarm.cycle_report_flag = true; + //DB_PRINT_STR( "cycle call\r\n" ); + //cycle_report_coord(); + } + } + + if( (uarm.gcode_delay_flag == false)&&( cycle_tick_flag == false) ){ + time5_stop(); + time_tick_work = false; + gcode_delay_ms = 0; + cycle_delay_ms = 0; + + delay_cnt = 0; + cycle_cnt = 0; + // DB_PRINT_STR( "stop time5\r\n" ); + } + } + + static void time_tick_init(void){ + time5_set( 0.001, tick_callback ); + time5_start(); +// DB_PRINT_STR( "start time5\r\n" ); + } + +void gcode_cmd_delay(int ms){ + gcode_delay_ms = ms; + uarm.gcode_delay_flag = true; + if( !time_tick_work ){ + time_tick_init(); + time_tick_work = true; + } +} + +void cycle_report_start(int ms){ + if( ms <= 0 ){ + cycle_report_stop(); + return; + } + + cycle_delay_ms = ms; + cycle_tick_flag = true; + + if( !time_tick_work ){ + time_tick_init(); + time_tick_work = true; + } + +} + +void cycle_report_stop(void){ + cycle_tick_flag = false; + cycle_delay_ms = 0; +} + + +/* param to eeprom + * + */ + +void read_sys_param(void){ + int8_t read_size = 0; + unsigned int read_addr = 0; + char *p = NULL; + + + p = (char *)(&(uarm.param.work_mode)); + read_size = sizeof(char); + read_addr = EEPROM_MODE_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(&(uarm.param.front_offset)); + read_size = sizeof(uarm.param.front_offset); + read_addr = EEPROM_FRONT_OFFSET_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(&(uarm.param.high_offset)); + read_size = sizeof(uarm.param.high_offset); + read_addr = EEPROM_HEIGHT_OFFSET_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(&(uarm.param.effect_angle_offset)); + read_size = sizeof(uarm.param.effect_angle_offset); + read_addr = EEPROM_EFFECT_ANGLE_OFFSET_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + if( uarm.param.effect_angle_offset > 360 || isnan(uarm.param.effect_angle_offset) ){ + uarm.param.effect_angle_offset = 0; + } + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = bt_mac_addr; + read_size = 12; + read_addr = EEPROM_BT_MAC_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + +// char l_str[20], r_str[20], b_str[20]; +// dtostrf( uarm.param.work_mode, 5, 4, l_str ); +// dtostrf( uarm.param.front_offset, 5, 4, r_str ); +// dtostrf( uarm.param.high_offset, 5, 4, b_str ); +// +// DB_PRINT_STR( "mode:%s, front:%s, high:%s\r\n", l_str, r_str, b_str ); + + char l_str[20], r_str[20], b_str[20]; + dtostrf( uarm.param.effect_angle_offset, 5, 4, b_str ); + DB_PRINT_STR( "angle offset:%s\r\n", b_str ); + +} + +void save_sys_param(void){ + int8_t write_size = 0; + unsigned int write_addr = 0; + char *p = NULL; + + p = (char *)(&(uarm.param.work_mode)); + write_size = sizeof(char); + write_addr = EEPROM_MODE_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + p = (char *)(&(uarm.param.front_offset)); + write_size = sizeof(uarm.param.front_offset); + write_addr = EEPROM_FRONT_OFFSET_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + p = (char *)(&(uarm.param.high_offset)); + write_size = sizeof(uarm.param.high_offset); + write_addr = EEPROM_HEIGHT_OFFSET_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + + p = (char *)(&(uarm.param.effect_angle_offset)); + write_size = sizeof(uarm.param.effect_angle_offset); + write_addr = EEPROM_EFFECT_ANGLE_OFFSET_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } +} + +void save_user_endoffest(void) +{ + int8_t write_size = 0; + unsigned int write_addr = 0; + char *p = NULL; + + p = (char *)(&(uarm.param.front_offset)); + write_size = sizeof(uarm.param.front_offset); + write_addr = EEPROM_USER_FRONT_OFFSET_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } + + p = (char *)(&uarm.param.high_offset); + write_size = sizeof(uarm.param.high_offset); + write_addr = EEPROM_USER_HEIGHT_OFFSET_ADDR; + for(;write_size>0;write_size--){ + eeprom_put_char(write_addr++,*(p++)); + } + +} + +void read_user_endoffest(void) +{ + int8_t read_size = 0; + unsigned int read_addr = 0; + char *p = NULL; + + + p = (char *)(&(uarm.param.front_offset)); + read_size = sizeof(uarm.param.front_offset); + read_addr = EEPROM_USER_FRONT_OFFSET_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } + + p = (char *)(&(uarm.param.high_offset)); + read_size = sizeof(uarm.param.high_offset); + read_addr = EEPROM_USER_HEIGHT_OFFSET_ADDR; + for( ; read_size > 0; read_size-- ){ + *(p++) = eeprom_get_char(read_addr++); + } +} + +void write_sn_num(void){ + int8_t write_size = 0; + unsigned int write_addr = 0; + char *p = NULL; + + p = bt_mac_addr; + write_size = 12; + write_addr = EEPROM_BT_MAC_ADDR; + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, *(p++) ); + } +} + +void setE2PROMData(unsigned char device, unsigned int addr, unsigned char type, float value) +{ + uint8_t deviceAddr; + + union { + float fdata; + uint8_t data[4]; + } FData; + + switch(device) + { + case 1: + deviceAddr = EXTERNAL_EEPROM_USER_ADDRESS; + break; + + case 2: + deviceAddr = EXTERNAL_EEPROM_SYS_ADDRESS; + break; + } + + if (device == 1 || device == 2) + { + int num = 0; + switch(type) + { + case DATA_TYPE_BYTE: + FData.data[0] = (unsigned char)value; + + num = 1; + break; + + case DATA_TYPE_INTEGER: + { + int i_val = 0; + i_val = (int)value; + FData.data[0] = (i_val & 0xff00) >> 8; + FData.data[1] = i_val & 0xff; + num = 2; + + } + break; + + case DATA_TYPE_FLOAT: + FData.fdata = (float)value; + num = 4; + break; + } + + unsigned char i=0; + i = (addr % 128); + // Since the eeprom's sector is 128 byte, if we want to write 5 bytes per cycle we need to care about when there's less than 5 bytes left + if (i >= (129-num)) + { + i = 128 - i; + eeprom_iic_writebuf(FData.data, deviceAddr, addr, i);// write data + delay_ms(5); + eeprom_iic_writebuf(FData.data + i, deviceAddr, addr + i, num - i);// write data + } + //if the left bytes are greater than 5, just do it + else + { + eeprom_iic_writebuf(FData.data, deviceAddr, addr, num);// write data + } + } + +} + +double getE2PROMData(unsigned char device, unsigned int addr, unsigned char type) +{ + double result = 0; + uint8_t deviceAddr; + uint8_t x_str[20]; + union { + float fdata; + uint8_t data[4]; + } FData; + + + switch(device) + { + case 1: + deviceAddr = EXTERNAL_EEPROM_USER_ADDRESS; + break; + case 2: + deviceAddr = EXTERNAL_EEPROM_SYS_ADDRESS; + break; + } + + if (device == 1 || device == 2) + { + unsigned char num = 0; + switch(type) + { + case DATA_TYPE_BYTE: + num = 1; + break; + + case DATA_TYPE_INTEGER: + num = 2; + break; + + case DATA_TYPE_FLOAT: + num = 4; + break; + } + + unsigned char i=0; + i = (addr % 128); + + if (i >= (129-num)) + { + i = 128 - i; + eeprom_iic_readbuf(FData.data, deviceAddr, addr, i); + delay_ms(5); + eeprom_iic_readbuf(FData.data + i, deviceAddr, addr + i, num - i); + } + else + { + + x_str[1]=eeprom_iic_readbuf(FData.data, deviceAddr, addr, num); + + } + + + switch(type) + { + case DATA_TYPE_BYTE: + result = FData.data[0]; + if(FData.data[0]==32) + { + uart_printf( "yes\n" ); + } + + break; + + case DATA_TYPE_INTEGER: + result = (FData.data[0] << 8) + FData.data[1]; + break; + + case DATA_TYPE_FLOAT: + result = FData.fdata; + break; + + } + + + } + return result; + +} + +void read_hardware_version(void){ +#define HARD_MASK ( 1<<6 | 1<<5 | 1<<4 | 1<<3 |1<<2) + DDRJ &= ~HARD_MASK; + if( (PINJ & HARD_MASK) == (1 << 6) ){ + settings_store_global_setting( 4, 1 ); + strcpy( hardware_version, "V3.3.1" ); + settings_store_global_setting( 3, 0 ); + }else if( (PINJ & HARD_MASK) == 0x00 ){ // array[j+1]) + { + temp = array[j]; + array[j] = array[j+1]; + array[j+1] = temp; + } + } + } +} + + +static int adc_read_value(uint8_t pin){ + uint8_t low, high; + if (pin >= 54) pin -= 54; // allow for channel or pin numbers + + ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5); + ADMUX = (1 << 6) | (pin & 0x07); + ADCSRA |= (1<= PUMP_STATE_COUNT) + return; + + pump_state = state; +} +pump_state_t pump_get_state() +{ + return pump_state; +} + + +void pump_on(void){ + DDRG |= 0x10; // PG4 PUMP_D5_N + DDRG |= 0x20; // PG5 PUMP_D5 + DDRF |= 0x08; + + if((PINJ & HARD_MASK) == (1<<4)) + { + PORTG &= (~0x10); + + PORTG |= 0x20; + + } + else + { + PORTG &= (~0x20); + + PORTG |= 0x10; + } + PORTF |= 0x08; + + + + pump_set_state(PUMP_STATE_ON); + +} + + +void pump_suction(void) +{ + + DDRG |= 0x10; // PG4 PUMP_D5_N + DDRG |= 0x20; // PG5 PUMP_D5 + DDRF |= 0x08; // + + if((PINJ & HARD_MASK) == (1<<4)) + { + + PORTG &= (~0x20); + + PORTG |= 0x10; + + } + else + { + PORTG &= (~0x10); + + PORTG |= 0x20; + } + PORTF &= (~0x08); + + pump_set_state(PUMP_STATE_SUCTION); + +} + + +void pump_off(void){ + if ((pump_get_state() == PUMP_STATE_ON)||(pump_get_state() == PUMP_STATE_SUCTION)) + { + + DDRG |= 0x10; // PG4 PUMP_D5_N + DDRG |= 0x20; // PG5 PUMP_D5 + DDRF |= 0x08; // + + + + PORTF &= (~0x08); + PORTG &= (~0x10); + if((PINJ & HARD_MASK) == (1<<4)) + { + if(pump_get_state() == PUMP_STATE_ON) + { + PORTG &= (~0x20); + PORTG |= 0x10; + delay_ms(50); + PORTG &= (~0x10); + } + else + { + + PORTG |= 0x20; + } + } + else + { + PORTG |= 0x20; + } + + pump_set_state(PUMP_STATE_VALVE_ON); + } + +} +void pump_tick(void) +{ + static uint8_t valve_on_times = 0; + #define HARD_MASK ( 1<<6 | 1<<5 | 1<<4 | 1<<3 ) + + + switch (pump_state) + { + case PUMP_STATE_OFF: + valve_on_times = 0; + break; + case PUMP_STATE_SUCTION: + valve_on_times = 0; + break; + case PUMP_STATE_ON: + valve_on_times = 0; + break; + + case PUMP_STATE_VALVE_ON: + valve_on_times++; + + if ( (PINJ & HARD_MASK) >0x00) + { + + valve_on_times = 0; + DDRG |= 0x10; // PG4 PUMP_D5_N + DDRG |= 0x20; // PG5 PUMP_D5 + DDRF |= 0x08; // + + + + PORTG &= (~0x10); + +// PORTG |= 0x20; + PORTF &= (~0x08); + + pump_state = PUMP_STATE_OFF; + + } + else + { + + PORTG |= 0x20; + delay_ms(50); + if (valve_on_times >= VALVE_ON_TIMES_MAX) + { + valve_on_times = 0; + pump_state = PUMP_STATE_OFF; + } + else + { + pump_state = PUMP_STATE_VALVE_OFF; + } + + } + break; + + case PUMP_STATE_VALVE_OFF: + PORTG &= (~0x20); + delay_ms(50); + pump_state = PUMP_STATE_VALVE_ON; + + break; + + + } +} + +uint16_t get_pump_adc() +{ +uint16_t pump_adc=0; + ADCSRA=0; + ADMUX=0x41; + ADCSRB |= 0x08; + ADCSRA = 1 << ADEN // enable ADC + | 1 << ADSC // start conversion + | 1 << ADIF // clear flag + | 7; // divide by 128 + while (!(ADCSRA & 1 << ADIF)) // wait until flag is set + pump_adc =ADC; + ADCSRA |= (1 << ADIF); + return pump_adc; +} +uint8_t get_pump_status(void){ + if( (PORTG & 0x10) == 0x00 ){ return 0; } + uint16_t value = analogRead(A9); + uint16_t value2 = get_pump_adc(); + DB_PRINT_STR("value:"); + DB_PRINT_INT(value); + DB_PRINT_STR(" value2:"); + DB_PRINT_INT(value2); + if( value < 10){ + return 0; + }else if( value <= 70 ){ + return 2; + }else{ + return 1; + } +} + +/* button +* +*/ +void button_init() +{ + PORTE |= 0xC0;//12 8 4 11 + // set button pin as input + DDRE &= 0X3F; + +} + + + + +uint8_t get_button_status(uint8_t button){ + if(button) + { + if(PINE&(1<<6)){ + return 1; + }else{ + return 0; + } + } + else + { + if(PINE&(1<<7)){ + return 1; + }else{ + return 0; + } + } +} + + +/* gripper + * + */ + +void gripper_relesae(void){ + DDRC |= 0x80; // PC7 gripper + PORTC |= 0x80; +} + +void gripper_catch(void){ + DDRC |= 0x80; // PC7 gripper + PORTC &= (~0x80); +} + +uint8_t get_gripper_status(void){ + #define MASK_G (1<<0) + if( PORTC & 0x80 ){ return 0; } + + DDRA &= ~(MASK_G); + if( PINA & MASK_G ){ + return 1; + }else{ + return 2; + } +} + +/* gripper + * + */ +void laser_on(void){ + DDRH |= (1<<5); // 100 ){ + return 1; + }else{ + return 0; + } +} + +void check_motor_positon(void){ +// static int cnt = 0; + + if( sys.state == STATE_IDLE && uarm.motor_state_bits == 0x0F && uarm.power_state ){ + + if( sys.check_cnt++ > 20 ){ + float current_angle_l = 0, current_angle_r = 0, current_angle_b = 0; + + coord_to_angle( uarm.coord_x, uarm.coord_y, uarm.coord_z, ¤t_angle_l, ¤t_angle_r, ¤t_angle_b ); + float reg_angle_l = calculate_current_angle(CHANNEL_ARML); + float reg_angle_r = calculate_current_angle(CHANNEL_ARMR); + float reg_angle_b = calculate_current_angle(CHANNEL_BASE) ; + + + if( fabs(current_angle_l-reg_angle_l)>0.5 || fabs(current_angle_r-reg_angle_r)>0.5 || fabs(current_angle_b-reg_angle_b+90)>0.5 ){ + char l_str[20], r_str[20], b_str[20]; + + memset(&sys, 0, sizeof(system_t)); // Clear all system variables + plan_sync_position(); + gc_sync_position(); + + uarm.init_arml_angle = reg_angle_l; + uarm.init_armr_angle = reg_angle_r; + uarm.init_base_angle = reg_angle_b; + if(uarm.beep_state) + beep_tone(260, 1000); + + uarm.target_step[X_AXIS] = sys.position[X_AXIS]; + uarm.target_step[Y_AXIS] = sys.position[Y_AXIS]; + uarm.target_step[Z_AXIS] = sys.position[Z_AXIS]; + + float target[3] = {0}; + target[X_AXIS] = uarm.coord_x; + target[Y_AXIS] = uarm.coord_y; + target[Z_AXIS] = uarm.coord_z; + coord_arm2effect( &target[X_AXIS], &target[Y_AXIS], &target[Z_AXIS] ); + mc_line( 0, target, 50, false ); + + } + } + }else{ + sys.check_cnt = 0; + } +} + +void update_motor_position(void){ + memset(&sys, 0, sizeof(system_t)); // Clear all system variables + plan_sync_position(); + gc_sync_position(); + + uarm.init_arml_angle = calculate_current_angle(CHANNEL_ARML); + uarm.init_armr_angle = calculate_current_angle(CHANNEL_ARMR); + uarm.init_base_angle = calculate_current_angle(CHANNEL_BASE); + +// char l_str[20], r_str[20], b_str[20]; +// dtostrf( uarm.init_arml_angle, 5, 4, l_str ); +// dtostrf( uarm.init_armr_angle, 5, 4, r_str ); +// dtostrf( uarm.init_base_angle, 5, 4, b_str ); + +// DB_PRINT_STR( "init_angle: B%s L%s R%s\r\n", b_str, l_str, r_str ); + + uarm.target_step[X_AXIS] = sys.position[X_AXIS]; + uarm.target_step[Y_AXIS] = sys.position[Y_AXIS]; + uarm.target_step[Z_AXIS] = sys.position[Z_AXIS]; + + angle_to_coord( uarm.init_arml_angle, uarm.init_armr_angle, uarm.init_base_angle-90, + &(uarm.coord_x), &(uarm.coord_y), &(uarm.coord_z) ); + + +// char x_str[20], y_str[20], z_str[20]; +// dtostrf( gc_state.position[X_AXIS], 5, 4, x_str ); +// dtostrf( gc_state.position[Y_AXIS], 5, 4, y_str ); +// dtostrf( gc_state.position[Z_AXIS], 5, 4, z_str ); +// +// DB_PRINT_STR( "coord: %s, %s, %s\r\n", x_str, y_str, z_str ); + +} + + +void update_motor_position2(void){ + + uarm.init_arml_angle = calculate_current_angle(CHANNEL_ARML); + uarm.init_armr_angle = calculate_current_angle(CHANNEL_ARMR); + uarm.init_base_angle = calculate_current_angle(CHANNEL_BASE); + + angle_to_coord( uarm.init_arml_angle, uarm.init_armr_angle, uarm.init_base_angle-90, + &(uarm.coord_x), &(uarm.coord_y), &(uarm.coord_z) ); + +} + diff --git a/src/uarm_peripheral.h b/src/uarm_peripheral.h new file mode 100755 index 0000000..b3baa1b --- /dev/null +++ b/src/uarm_peripheral.h @@ -0,0 +1,79 @@ +#ifndef _UARM_PERIPHERAL_H_ +#define _UARM_PERIPHERAL_H_ + +#include "uarm_common.h" + +extern char hardware_version[8]; +extern char bt_mac_addr[13]; + +typedef enum _pump_state_t +{ + PUMP_STATE_OFF, + PUMP_STATE_ON, + PUMP_STATE_SUCTION, + PUMP_STATE_VALVE_ON, + PUMP_STATE_VALVE_OFF, + + + PUMP_STATE_COUNT +} pump_state_t; +#define VALVE_EN 4 + +void end_effector_init(void); +void end_effector_set_angle(float angle); +void end_effector_deinit(void); +float end_effector_get_angle(void); +void end_effector_check_limit(void); +void end_effect_adjust_angle(void); + + + +void beep_tone(unsigned long duration, double frequency); + +void gcode_cmd_delay(int ms); +void cycle_report_start(int ms); +void cycle_report_stop(void); + +void read_sys_param(void); +void save_sys_param(void); +void save_user_endoffest(void); +void read_user_endoffest(void); +void write_sn_num(void); + +void cycle_report_coord(void); +void read_hardware_version(void); + +void pump_on(void); +void pump_off(void); +void pump_suction(void); +void pump_tick(void); + +uint8_t get_pump_status(void); + +void gripper_relesae(void); +void gripper_catch(void); +uint8_t get_gripper_status(void); + +void laser_on(void); +void laser_off(void); +uint8_t get_laser_status(void); + + +void button_init(); +uint8_t get_button_status(uint8_t button); + + +uint8_t get_limit_switch_status(void); +uint8_t get_power_status(void); + +void check_motor_positon(void); +void update_motor_position(void); +void update_motor_position2(void); + +unsigned long millis_2(void); +void setE2PROMData(unsigned char device, unsigned int addr, unsigned char type, float value); +double getE2PROMData(unsigned char device, unsigned int addr, unsigned char type); + + +#endif + diff --git a/src/uarm_protocol.c b/src/uarm_protocol.c new file mode 100755 index 0000000..508e6a8 --- /dev/null +++ b/src/uarm_protocol.c @@ -0,0 +1,2790 @@ +#include "grbl.h" +#include "uarm_protocol.h" +#include "uarm_common.h" +#include "uarm_peripheral.h" +#include "uarm_coord_convert.h" +#include "uarm_angle.h" +#include "uarm_swift.h" + + +struct cmd_pack_t { + char line[CMD_BUFFER_SIZE]; + uint8_t parse_result; + bool line_parse_done; + char report_str[CMD_BUFFER_SIZE]; +}; + +struct cmd_pack_t syn_queue[PACK_MAX_SIZE] = {0}; +struct cmd_pack_t asyn_pack = {0}; +uint8_t syn_pack_remain = 0; +char tail_report_str[TAIL_BUFFER_SIZE] = {0}; +char event_report_str[EVENT_BUFFER_SIZE] = {0}; + +void receive_cmd_line(char *line){ + protocol_execute_realtime(); // Runtime command check point. + if (sys.abort) { return; } // Bail to calling function upon system abort + + char *p = line; + char temp_str[10] = {0}; + if( line[0] == '$' ){ // = PACK_MAX_SIZE ){ + uart_printf( "E23 buffer full\r\n" ); + return; + } + strcpy( syn_queue[syn_receive_sp].line, p ); // = PACK_MAX_SIZE-1 ){ syn_receive_sp = 0; } + syn_pack_remain++; + +// DB_PRINT_STR( "rece sp: %d, cnt :%d\r\n", syn_receive_sp, syn_pack_remain ); + } + +} + + +static void add_result_to_report(uint8_t result, char *str){ // = PACK_MAX_SIZE-1 ){ syn_parse_sp = 0; } + syn_pack_remain--; + +// DB_PRINT_STR( "parse sp: %d, cnt :%d\r\n", syn_parse_sp, syn_pack_remain ); + } +} + + +void report_parse_result(void){ + if( asyn_pack.line_parse_done ){ //= PACK_MAX_SIZE-1 ){ syn_report_sp = 0; } + }else{ break; } + } + } + + if( uarm.cycle_report_flag ){ // 0xff ){ + cnt = 0; + //get_power_status(); + uint8_t power_cur_status = get_power_status(); + if( power_cur_status != power_per_status ){ + uart_printf( "@5 V%d\n", power_cur_status ); + power_per_status = power_cur_status; + uarm.power_state = power_cur_status; + } + } + + if( sys.state == STATE_IDLE && uarm.run_done_report_flag ){ // G + * + */ +static bool uarm_cmd_g2004(char *payload){ // x_l) + { + if(abs(x-x_l)>0.7) + { + + } + else + { + + x+=20;//to report error + } + } + else + { + x = x+50; + } + target[X_AXIS] =x; + + break; + + case 3: + + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x_l = x; + z_l = z; + y_l = y; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + angle_ab = ARMA_ARMB_MIN_ANGLE+1; + final_angle_l = (180-angle_ab)/2; + final_angle_l = final_angle_l /RAD_TO_DEG; + length = ARM_A *cos(final_angle_l)*2; + s = sqrt(length*length-h2*h2); + s += length_center_to_origin + uarm.param.front_offset; + final_angle_b = asin(y/s); + x = s*cos(final_angle_b); + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) //CHANGE + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + + final_angle_r =(ARMB_MAX_ANGLE-1)/RAD_TO_DEG; + final_angle_l = asin((ARM_B*sin(final_angle_r)+h2)/ARM_A)*RAD_TO_DEG; + final_angle_l = final_angle_l /RAD_TO_DEG; + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + s += length_center_to_origin+uarm.param.front_offset; + final_angle_b = asin(y/s); + x = s*cos(final_angle_b); + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) //CHANGE + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + final_angle_l = (ARMA_MAX_ANGLE-1)/RAD_TO_DEG; + final_angle_r = asin((ARM_A*sin(final_angle_l)-h2)/ARM_B)*RAD_TO_DEG; + final_angle_r = final_angle_r/RAD_TO_DEG; + s = ARM_A * cos(final_angle_l)+ ARM_B*cos(final_angle_r); + s += length_center_to_origin + uarm.param.front_offset; //doubt + + final_angle_b = asin(y/s); + x = s*cos(final_angle_b); + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + s = ARM_A * cos(final_angle_l)+ ARM_B*cos(final_angle_r); + + s += length_center_to_origin + uarm.param.front_offset; //doubt + final_angle_b = asin(y/s); + final_angle_b = final_angle_b*RAD_TO_DEG; + + final_angle_l = (ARMA_MIN_ANGLE)/RAD_TO_DEG; + final_angle_r = asin((h2)/ARM_B)*RAD_TO_DEG; + final_angle_r = 180+final_angle_r; + + final_angle_r = (int)(final_angle_r); + final_angle_r = final_angle_r/RAD_TO_DEG; + s = ARM_A * cos(final_angle_l)+ ARM_B*cos(final_angle_r); + s += length_center_to_origin + uarm.param.front_offset; //doubt + + final_angle_b = asin(y_l/s); + + x = s*cos(final_angle_b)+2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + x=3; + } + else + { + final_angle_b = asin(y_l/s); + x = s*cos(final_angle_b)+2; + } + } + else + { + final_angle_b = asin(y_l/s); + x = s*cos(final_angle_b); + } + } + else + { + + final_angle_b = asin(y_l/s); + x = s*cos(final_angle_b); + } + } + else + { + final_angle_b = asin(y_l/s); + x = s*cos(final_angle_b); + } + if(x0.7) + {} + else + { + x-=20;//to report error + } + } + else + { + x-=20; + } + target[X_AXIS] =x; + + + break; + + + + + case 1: + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x_l = x; + z_l = z; + y_l = y; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + + angle_ab = ARMA_ARMB_MAX_ANGLE-2; + + final_angle_l = (180-angle_ab)/2; + final_angle_l = final_angle_l /RAD_TO_DEG; + length = ARM_A *cos(final_angle_l)*2; + s = sqrt(length*length-h2*h2); + s += length_center_to_origin+uarm.param.front_offset; + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + //ARM_B + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + + final_angle_r =(ARMB_MIN_ANGLE+1)/RAD_TO_DEG; + final_angle_l = asin((ARM_B*sin(final_angle_r)+h2)/ARM_A)*RAD_TO_DEG; + final_angle_l = final_angle_l /RAD_TO_DEG; + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + s += length_center_to_origin+uarm.param.front_offset; + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + dtostrf( x, 5, 4, l_str ); + dtostrf( y, 5, 4, r_str ); + dtostrf( z, 5, 4, b_str ); + + final_angle_r = abs(final_angle_r); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + + + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + final_angle_l = (26+1)/RAD_TO_DEG; + final_angle_r = asin((ARM_A*sin(final_angle_l)-h2)/ARM_B)*RAD_TO_DEG; + final_angle_r = final_angle_r/RAD_TO_DEG; + s = ARM_A * cos(final_angle_l)+ ARM_B*cos(final_angle_r); + s += length_center_to_origin + uarm.param.front_offset; //doubt + + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + if(y_l>0) + y = y_l; + else + y= -y_l; + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + if(y>y_l) + { + if(abs(y-y_l)>0.7) + { + + } + else + { + y+=20;//report error + } + } + else + { + y+=20; + } + target[Y_AXIS] =y; + + break; + case 4: + +/*************************************************************************************/ + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x_l = x; + z_l = z; + y_l = y; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + + angle_ab = ARMA_ARMB_MAX_ANGLE-2; + + final_angle_l = (180-angle_ab)/2; + final_angle_l = final_angle_l /RAD_TO_DEG; + length = ARM_A *cos(final_angle_l)*2; + s = sqrt(length*length-h2*h2); + s += length_center_to_origin+uarm.param.front_offset; + final_angle_b = acos(x/s); + y= s*sin(final_angle_b); + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + //ARM_B + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + + final_angle_r =(ARMB_MIN_ANGLE+1)/RAD_TO_DEG; + final_angle_l = asin((ARM_B*sin(final_angle_r)+h2)/ARM_A)*RAD_TO_DEG; + final_angle_l = final_angle_l /RAD_TO_DEG; + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + s += length_center_to_origin+uarm.param.front_offset; + final_angle_b = acos(x/s); + y= s*sin(final_angle_b); + + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + + + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A *sin(final_angle_l)- ARM_B*sin(final_angle_r); + final_angle_l = (ARMA_MIN_ANGLE+1)/RAD_TO_DEG; + final_angle_r = asin((ARM_A*sin(final_angle_l)-h2)/ARM_B)*RAD_TO_DEG; + final_angle_r = final_angle_r/RAD_TO_DEG; + s = ARM_A * cos(final_angle_l)+ ARM_B*cos(final_angle_r); + s += length_center_to_origin + uarm.param.front_offset; //doubt + + final_angle_b = acos(x/s); + y= s*sin(final_angle_b); + + coord_effect2arm( &x, &y, &z ); + + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + if(y_l<0) + y = y_l; + else + y= -y_l; + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + + } + else + { + final_angle_b = acos(x_l/s); + y= s*sin(final_angle_b); + + } + y= -y; + if(y0.7) + { + + } + else + { + y-=20;//report error + } + } + else + { + y-=20; + } + target[Y_AXIS] =y; + + break; + + + + break; + case 2: + + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x_l = x; + z_l = z; + y_l = y; + z_z = z; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + final_angle_l = (ARMA_MAX_ANGLE-1)/RAD_TO_DEG; + final_angle_r = (s-ARM_A*cos(final_angle_l))/ARM_B; + final_angle_r = acos(final_angle_r); + h2 -= ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + z -=h2; + + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + final_angle_r = (ARMB_MIN_ANGLE+1)/RAD_TO_DEG; + final_angle_l = acos((s-ARM_B*cos(final_angle_r))/ARM_A); + h2 -= ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + z -=h2; + + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + angle_ab = ARMA_ARMB_MAX_ANGLE-1; + angle_z = ((180-angle_ab)/2)/RAD_TO_DEG; + length = cos(angle_z)*ARM_A +cos(angle_z)*ARM_B; + h2 -= sqrt(abs(length*length-s*s)); + z -=h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + + + + + } + else + { + z_l -=h2; + + } + + } + else + { + z_l -=h2; + } + + } + else + { + z_l -=h2; + } + if(z_l>z_z) + { + if(abs(z_z-z_l)>0.7) + { + } + else + { + z_l +=20; + } + } + else + { + + z_l +=20; + } + target[Z_AXIS] = z_l; + + break; + case 5: + + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x_l = x; + z_l = z; + y_l = y; + z_z = z; + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + s = ARM_A *cos(final_angle_l)+ ARM_B*cos(final_angle_r); + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + + final_angle_r = (ARMB_MAX_ANGLE-2)/RAD_TO_DEG; + final_angle_l = acos((s-ARM_B*cos(final_angle_r))/ARM_A); + h2 -= ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + z -= h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + + final_angle_l = (ARMA_MIN_ANGLE+1)/RAD_TO_DEG; + final_angle_r = acos((s-ARM_A*cos(final_angle_l))/ARM_B); + h2 -= ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + z -=h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + + angle_ab = ARMA_ARMB_MIN_ANGLE+1; + angle_z = ((180-angle_ab)/2)/RAD_TO_DEG; + length = cos(angle_z)*ARM_A +cos(angle_z)*ARM_B; + h2 -= sqrt(abs(length*length-s*s)); + z -=h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + + if((180-angle_l-angle_r)>(ARMA_ARMB_MAX_ANGLE-2)) + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + + h2 -= ARM_A*sin(final_angle_r)-ARM_B*sin(final_angle_l); + z -=h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + } + else + { + if(h2>0) + z_l -=h2; + else + z_l = z_l; + } + } + else + { + final_angle_l = angle_l; + final_angle_r = angle_r; + final_angle_b = angle_b; + x = x_l; + y = y_l; + z = z_l; + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + h2 = ARM_A*sin(final_angle_l)-ARM_B*sin(final_angle_r); + s = ARM_A*cos(final_angle_l)+ARM_B*cos(final_angle_r); + angle_ab = ARMA_ARMB_MAX_ANGLE-1; + angle_z = ((180-angle_ab)/2)/RAD_TO_DEG; + length = cos(angle_z)*ARM_A +cos(angle_z)*ARM_B; + h2 -= sqrt(abs(length*length-s*s)); + z -=h2; + coord_effect2arm( &x, &y, &z ); + coord_to_angle(x,y,z,&final_angle_l,&final_angle_r,&final_angle_b); + + final_angle_l = final_angle_l /RAD_TO_DEG; + final_angle_r = final_angle_r /RAD_TO_DEG; + + h2 += sqrt(abs(length*length-s*s)); + h2 -= ARM_A*sin(final_angle_r)-ARM_B*sin(final_angle_l); + z_l -=h2; + if(is_angle_legal(final_angle_l,final_angle_r,final_angle_b)==false) + { + + } + else + { + z_l -=h2; + } + } + } + else + { + z_l -=h2; + } + } + else + { + z_l -=h2; + } + } + else + { + z_l -=h2; + } + if(z_l0.7) + { + } + else + { + z_l -=20; + } + } + else + { + z_l -=20; + } + target[Z_AXIS] = z_l; + break; + } + return mc_line( 1, target, speed, false ); +} + +static enum uarm_protocol_e uarm_cmd_g2208(char *payload){ + char speed_str[20],direction_str[20]; + float angle_AB; + float speed; + int direction; + uint8_t rtn; + + float final_angle_l=0,final_angle_r=0,final_angle_b=0; + if(rtn = sscanf(payload, "N%d F%[0-9-+.]",&direction,speed_str)<2) + { + DB_PRINT_STR( "sscanf %d\r\n", rtn ); + return UARM_CMD_ERROR; + }else{ + if( !read_float(speed_str, NULL, &speed) ){ return false; } + float angle_l = 0, angle_r = 0, angle_b = 0; + char l_str[20] = {0}, r_str[20] = {0}; + + final_angle_l=angle_l = calculate_current_angle(CHANNEL_ARML); // (ARMA_MAX_ANGLE-1)) + final_angle_l = ARMA_MAX_ANGLE-1; + final_angle_l = (int)final_angle_l; + if(abs(final_angle_l-angle_l)<0.7) + final_angle_l =200; + angle_l = final_angle_l; + break; + + + + case 4: + + angle_AB =ARMA_ARMB_MAX_ANGLE; + final_angle_l = 180-angle_AB-angle_r+0.4; + if(final_angle_l<(ARMB_MIN_ANGLE+1)) + final_angle_l = ARMB_MIN_ANGLE+1; + if(abs(final_angle_l-angle_l)<0.7) + final_angle_l =200; + angle_l = final_angle_l; + + break; + + case 2: + + angle_AB =ARMA_ARMB_MIN_ANGLE; + final_angle_r =180-angle_AB-angle_l; + if(final_angle_r >(ARMB_MAX_ANGLE-1)) + final_angle_r = ARMB_MAX_ANGLE-1; + final_angle_r = (int)final_angle_r; + + if(abs(final_angle_r-angle_r)<0.7) + final_angle_r =200; + angle_r = final_angle_r; + + break; + case 5: + + angle_AB =ARMA_ARMB_MAX_ANGLE; + final_angle_r = 180-angle_AB-angle_l+0.4; + if(final_angle_r <(ARMB_MIN_ANGLE+1)) + final_angle_r = ARMB_MIN_ANGLE+1; + if(abs(final_angle_r-angle_r)<0.7) + final_angle_r =200; + angle_r = final_angle_r; + break; + + } + } + + float target[3] = {0}; + angle_to_coord( angle_l, angle_r, angle_b, &target[X_AXIS], &target[Y_AXIS], &target[Z_AXIS] ); + coord_arm2effect( &target[X_AXIS], &target[Y_AXIS], &target[Z_AXIS] ); + + return mc_line( 0, target, speed, false ); + + } +} + + +static enum uarm_protocol_e uarm_cmd_g2209(char *payload){ + uint8_t rtn; + float speed; + int direction; + char speed_str[20],direction_str[20]; + float final_step[3]; + float final_angle_l=0,final_angle_r=0,final_angle_b=0; + float angle_l = 0, angle_r = 0, angle_b = 0; + int offeset = 2; + + float x = 0, y = 0, z = 0, angle_e; + if(rtn = sscanf(payload, "F%[0-9-+.]",speed_str)<1) + { + DB_PRINT_STR( "sscanf %d\r\n", rtn ); + return UARM_CMD_ERROR; + }else + { + if( !read_float(speed_str, NULL, &speed) ){ return false; } + + final_angle_l=angle_l = calculate_current_angle(CHANNEL_ARML); // (BASE_MAX_ANGLE+90)) + { + + final_angle_b = BASE_MAX_ANGLE+90-offeset; + final_step[Z_AXIS] = (final_angle_b-angle_b)*80/(settings.steps_per_mm[Z_AXIS]); + } + else if(angle_b <(BASE_MIN_ANGLE+90)) + { + final_angle_b = BASE_MIN_ANGLE+90+offeset; + final_step[Z_AXIS] = (final_angle_b-angle_b)*80/(settings.steps_per_mm[Z_AXIS]); + } + else + { + final_step[Z_AXIS] = uarm.target_step[Z_AXIS] ; + final_step[Z_AXIS] = (final_step[Z_AXIS]) / (settings.steps_per_mm[Z_AXIS]); + } + if(angle_l>ARMA_MAX_ANGLE) + { + final_angle_l = ARMA_MAX_ANGLE-offeset; + final_step[X_AXIS] = (final_angle_l-angle_l)*80/(settings.steps_per_mm[X_AXIS]); + + } + else if (angle_lARMB_MAX_ANGLE) + { + final_angle_r = ARMB_MAX_ANGLE-offeset; + final_step[Y_AXIS] = (final_angle_r-angle_r)*80/(settings.steps_per_mm[Y_AXIS]); + + } + else if (angle_r S + * + */ +static void uarm_cmd_s1000(uint8_t param){ + switch( param ){ + case 0: + bit_true_atomic(sys_rt_exec_state, EXEC_FEED_HOLD); + break; + case 1: + bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); + break; + + default: break; + } +} + +static void uarm_cmd_s1100(void){ + mc_reset(); +} + + + +enum uarm_protocol_e uarm_execute_s_cmd(uint16_t cmd, char *line, uint8_t *char_counter){ + switch(cmd){ + case 1000: + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='1') ){ + uarm_cmd_s1000( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + + break; + case 1100: + uarm_cmd_s1100(); + return UARM_CMD_OK; + break; + } + + return UARM_CMD_NOTFIND; +} + + + +/* + * + * CMD -> M + * + */ + +static void uarm_cmd_m17(void){ // 65524) return false; + switch(type) + { + case 1: + + data = getE2PROMData(device,addr,type); + dtostrf(data, 5, 0, x_str ); +// uart_printf("data:%s\r\n",x_str); + sprintf( tail_report_str, " V%d\n",(char)data ); + + break; + + case 2: + + data = getE2PROMData(device,addr,type); + dtostrf(data, 5, 0, x_str ); +// uart_printf("data:%s\r\n",x_str); + sprintf( tail_report_str, " V%d\n",(int)data ); + break; + + case 4: + data = getE2PROMData(device,addr,type); + dtostrf(data, 5, 4, x_str ); +// uart_printf("data:%s\r\n",x_str); + sprintf( tail_report_str, " V%s\n",x_str ); + break; + + default: + return false; + break; + } + return true; + } + + + +} + +static bool uarm_cmd_m2212(char *payload){ + unsigned char device,type; + unsigned int addr; + char value[20]; + float eeprom_value; + int rtn; + if(rtn = sscanf(payload,"N%dA%dT%dV%[0-9.]",&device,&addr,&type,value)<4){ + DB_PRINT_STR("sscanf %d\r\n",rtn); + return false; + }else{ + if(device != 1) return false; + if(addr >65524) return false; + if( !read_float(value, NULL, &eeprom_value) ){ return false; } + switch(type) + { + case 1: + setE2PROMData(device,addr,type,eeprom_value); + break; + + case 2: + setE2PROMData(device,addr,type,eeprom_value); + break; + + case 4: + + setE2PROMData(device,addr,type,eeprom_value); + break; + default: + return false; + break; + } + delay_ms(3); + //uart_printf("N:%d A:%d T%d V:%s",device,addr,type,value); + return true; + } + + + +} + +static void uarm_cmd_m2215(void){ +/* int16_t write_size = 4096; + unsigned int write_addr = 0; + + for( ; write_size > 0; write_size-- ){ + eeprom_put_char( write_addr++, 0x0 ); + }*/ + settings_restore(SETTINGS_RESTORE_ALL); + read_hardware_version(); +} + +static bool uarm_cmd_m2220(char *payload){ // 69 || value<0 || value>1 ){ return false; } + if( value ){ + digitalWrite(pin, HIGH); + }else{ + digitalWrite(pin, LOW); + } + + } + return true; +} + +static bool uarm_cmd_m2241(char *payload){ + uint8_t rtn = 0; + int pin, value; + if( rtn = sscanf(payload, "N%dV%d", &pin, &value) < 2 ){ + DB_PRINT_STR( "sscanf %d\r\n", rtn ); + return false; + }else{ + if( pin<0 || pin>69 || value<0 || value>1 ){ return false; } + if( value ){ + pinMode(pin, OUTPUT); + }else{ + pinMode(pin, INPUT); + } + + } + return true; +} + +static void uarm_cmd_m2400(uint8_t param){ // ='0'&&line[1]<='1') ){ + uarm_cmd_m2122( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + + break; + case 2123: + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='1') ){ + uarm_cmd_m2123( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + + case 2124: + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='1') ){ + uarm_cmd_m2124( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2201: + if( (line[0]=='N') && (line[1]>='0'&&line[1]<='3') ){ + uarm_cmd_m2201( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2202: + if( (line[0]=='N') && (line[1]>='0'&&line[1]<='3') ){ + uarm_cmd_m2202( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2203: + if( (line[0]=='N') && (line[1]>='0'&&line[1]<='3') ){ + uarm_cmd_m2203( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2205: + if( uarm_cmd_m2205(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2210: + if( uarm_cmd_m2210(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2211: + //DB_PRINT_STR( "M2211\r\n" ); + if(uarm_cmd_m2211(line) == true) + { + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2212: + //DB_PRINT_STR( "M2212\r\n" ); + if(uarm_cmd_m2212(line) == true) + { + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2213: + //DB_PRINT_STR( "M2213\r\n" ); + return UARM_CMD_OK; + break; + case 2215: + uarm_cmd_m2215(); + return UARM_CMD_OK; + case 2220: + if( uarm_cmd_m2220(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2221: + if( uarm_cmd_m2221(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2222: + if( uarm_cmd_m2222(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2231: + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='2') ){ + uarm_cmd_m2231( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + + break; + case 2232: + //DB_PRINT_STR( "M2232\r\n" ); + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='1') ){ + uarm_cmd_m2232( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2233: + if( (line[0]=='V') && (line[1]>='0'&&line[1]<='1') ){ + uarm_cmd_m2233( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2234: + //DB_PRINT_STR( "M2234\r\n" ); + return UARM_CMD_OK; + break; + case 2240: + if( uarm_cmd_m2240(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2241: + if( uarm_cmd_m2241(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + + break; + case 2245: + //DB_PRINT_STR( "M2245\r\n" ); + break; + case 2304: + //DB_PRINT_STR( "M2304\r\n" ); + break; + case 2305: + //DB_PRINT_STR( "M2305\r\n" ); + break; + case 2306: + //DB_PRINT_STR( "M2306\r\n" ); + break; + case 2307: + //DB_PRINT_STR( "M2307\r\n" ); + break; + case 2400: + if( (line[0]=='S') && (line[1]>='0'&&line[1]<='11') ){ + uarm_cmd_m2400( line[1]-'0' ); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2401: + uarm_cmd_m2401(); + return UARM_CMD_OK; + break; + case 2410: + uarm_cmd_m2410(); + return UARM_CMD_OK; + + break; + case 2411: + if( uarm_cmd_m2411(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + + case 2412: + if( uarm_cmd_m2412(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2413: + if( uarm_cmd_m2413(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + + case 2500: + if( uarm_cmd_m2500() == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + } + return UARM_CMD_NOTFIND; +} + + + + +/* + * + * CMD -> P + * + */ + +static void uarm_cmd_p2200(void){ // 1) {return false;} + int value = get_button_status(button); + sprintf(tail_report_str, " V%d\n",value); + + } + return true; +} + + +static bool uarm_cmd_p2240(char *payload){ + uint8_t rtn = 0; + int pin; + if( rtn = sscanf(payload, "N%d", &pin) < 1 ){ + DB_PRINT_STR( "sscanf %d\r\n", rtn ); + return false; + }else{ + if( pin<0 || pin>69 ){ return false; } + int value = digitalRead(pin); + sprintf( tail_report_str, " V%d\n", value ); + } + return true; +} + +static bool uarm_cmd_p2241(char *payload){ + uint8_t rtn = 0; + int pin; + if( rtn = sscanf(payload, "N%d", &pin) < 1 ){ + DB_PRINT_STR( "sscanf %d\r\n", rtn ); + return false; + }else{ + if( pin<0 || pin>15 ){ return false; } + int value = analogRead(pin); + sprintf( tail_report_str, " V%d\n", value ); + } + return true; + +} + + +static void uarm_cmd_p2242(void){ + uint16_t refer_value[3] = {0}; + get_refer_value(&refer_value); + sprintf( tail_report_str, " B%d L%d R%d\n", refer_value[2], refer_value[0], refer_value[1] ); +} + +static void uarm_cmd_p2243(void){ + uint16_t angle_reg_value[3] = {0}; + get_angle_reg_value(&angle_reg_value); + sprintf( tail_report_str, " B%d L%d R%d\n", angle_reg_value[2], angle_reg_value[0], angle_reg_value[1] ); +} +bool uarm_cmd_p2244(void) +{ + char encoder_status=7; + encoder_status = check_encoder(CHANNEL_ARML)<<2|check_encoder(CHANNEL_ARMR)<<1|check_encoder(CHANNEL_BASE); + switch(encoder_status) + { + case 0: + sprintf( tail_report_str, " V%d\n", encoder_status); + return true; + break; + case 1: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 2: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 3: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 4: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 5: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 6: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + case 7: + sprintf( tail_report_str, " V%d\n", encoder_status); + return false; + break; + + } +} + +static void uarm_cmd_p2400(void){ + sprintf( tail_report_str, " V%d\n", uarm.param.work_mode ); +} + + +enum uarm_protocol_e uarm_execute_p_cmd(uint16_t cmd, char *line, uint8_t *char_counter){ + + switch(cmd){ + case 2200: + uarm_cmd_p2200(); + return UARM_CMD_OK; + break; + case 2201: + uarm_cmd_p2201(); + return UARM_CMD_OK; + break; + case 2202: + uarm_cmd_p2202(); + return UARM_CMD_OK; + break; + case 2203: + uarm_cmd_p2203(); + return UARM_CMD_OK; + break; + case 2204: + uarm_cmd_p2204(); + return UARM_CMD_OK; + break; + case 2205: + uarm_cmd_p2205(); + return UARM_CMD_OK; + break; + case 2206: + if( (line[0]=='N') && (line[1]>='0'&&line[1]<='3') ){ + uarm_cmd_p2206(line[1]-'0'); + return UARM_CMD_OK; + }else{ return UARM_CMD_ERROR; } + break; + case 2220: + uarm_cmd_p2220(); + return UARM_CMD_OK; + break; + case 2221: + uarm_cmd_p2221(); + return UARM_CMD_OK; + break; + case 2231: + uarm_cmd_p2231(); + return UARM_CMD_OK; + break; + case 2232: + uarm_cmd_p2232(); + return UARM_CMD_OK; + break; + case 2233: + uarm_cmd_p2233(); + return UARM_CMD_OK; + break; + case 2234: + uarm_cmd_p2234(); + return UARM_CMD_OK; + break; + case 2235: + uarm_cmd_p2235(); + return UARM_CMD_OK; + break; + case 2236: + if( uarm_cmd_p2236(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2240: + if( uarm_cmd_p2240(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2241: + if( uarm_cmd_p2241(line) == true ){ + return UARM_CMD_OK; + }else{ + return UARM_CMD_ERROR; + } + break; + case 2242: + uarm_cmd_p2242(); + return UARM_CMD_OK; + break; + case 2243: + uarm_cmd_p2243(); + return UARM_CMD_OK; + break; + case 2244: + if(uarm_cmd_p2244()==true){ + return UARM_CMD_OK; + }else{ + return UARM_ENCODER_ERR0R; + } + break; + case 2400: + uarm_cmd_p2400(); + return UARM_CMD_OK; + break; + } + + return UARM_CMD_NOTFIND; +} + + + + + + diff --git a/src/uarm_protocol.h b/src/uarm_protocol.h new file mode 100755 index 0000000..cbde5dc --- /dev/null +++ b/src/uarm_protocol.h @@ -0,0 +1,39 @@ +#ifndef _UARM_PROTOCOL_H_ +#define _UARM_PROTOCOL_H_ + +#include "uarm_common.h" + +#define TAIL_BUFFER_SIZE (50) +#define EVENT_BUFFER_SIZE (50) +#define CMD_BUFFER_SIZE (50) +#define PACK_MAX_SIZE (20) + +enum uarm_protocol_e { + UARM_CMD_OK = 0, + UARM_CMD_NOTFIND, + UARM_SYS_ABORT, + + UARM_CMD_ERROR = 50, + UARM_COORD_ERROR, + UARM_ENCODER_ERR0R, + UARM_ENABLE_ERROR, +}; + +struct protocol_private_t { +}; + +extern char event_report_str[EVENT_BUFFER_SIZE]; + +enum uarm_protocol_e uarm_execute_g_cmd(uint16_t cmd, char *line, uint8_t *char_counter); +enum uarm_protocol_e uarm_execute_s_cmd(uint16_t cmd, char *line, uint8_t *char_counter); +enum uarm_protocol_e uarm_execute_p_cmd(uint16_t cmd, char *line, uint8_t *char_counter); +enum uarm_protocol_e uarm_execute_m_cmd(uint16_t cmd, char *line, uint8_t *char_counter); + +void receive_cmd_line(char *line); +void parse_cmd_line(void); +void report_parse_result(void); + + + +#endif + diff --git a/src/uarm_swift.c b/src/uarm_swift.c new file mode 100755 index 0000000..4a4cb8a --- /dev/null +++ b/src/uarm_swift.c @@ -0,0 +1,49 @@ +#include "uarm_swift.h" + +struct uarm_state_t uarm = {0}; +char hardware_version[8] = {0}; +char bt_mac_addr[13] = {0}; +enum uarm_device_e uarm_device = UARM_PRO; + +void uarm_swift_init(void){ + //DB_PRINT_STR("uarm init\r\n"); + delay_ms(10); + + read_hardware_version(); + angle_sensor_init(); + button_init(); + + beep_tone(260, 1000); + + read_sys_param(); + pump_off(); + gripper_relesae(); + laser_off(); + end_effector_init(); + + update_motor_position(); + + uarm.reset_flag = false; + ADCSRA |= ( 1<= 1000000UL) && (F_CPU < 16000000UL)) { // prescaler set to 64 +// TCCR2B |= ((1< 16Mhz, prescaler set to 128 +// TCCR2B |= ((1<>= 10; + switch( pin ){ + case 3: + DDRH |= 1<<3; + TCCR4A |= _BV(COM4A1); + OCR4A = dutyCycle; + break; + case 4: + DDRH |= 1<<4; + TCCR4A |= _BV(COM4B1); + OCR4B = dutyCycle; + break; + case 5: + DDRH |= 1<<5; + TCCR4A |= _BV(COM4C1); + OCR4C = dutyCycle; + break; + } + + TCCR4B = _BV(WGM43) | time4.clock_select_bits; + +} + +void time4_pwm_init(unsigned long period_us){ + TCCR4B = _BV(WGM43); // set mode as phase and frequency correct pwm, stop the timer + TCCR4A = 0; // clear control register A + time4_set_period(period_us); +} + +/* resolution = 0.001 1ms interrupt + * + */ + +void time5_set(double resolution, void (*callback)()){ + time5.time_callback = callback; + TCCR5A=0; + TCCR5B=(1<