diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..cd72efb10 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.o +applet/ +*~ +*.orig +*.rej +*.bak +*.DS_Store +*.idea diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8a378c787 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,160 @@ +--- +language: c + +before_install: + - pwd + - wget https://bootstrap.pypa.io/get-pip.py + - wget https://bintray.com/artifact/download/olikraus/u8glib/u8glib_arduino_v1.17.zip +install: + - sudo python get-pip.py + - sudo pip install ino + # add ppa for newer version of Arduino than available in ubuntu 12.04 + - sudo add-apt-repository ppa:michael-gruz/elektronik -y + - sudo apt-get update -q + - sudo apt-get install arduino +before_script: + # add U8glib, LiquidCrystal_I2C & LiquidTWI2 libraries + - sudo unzip u8glib_arduino_v1.17.zip -d /usr/share/arduino/libraries/ + - cd /usr/share/arduino/libraries/ + - sudo git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git + - ls -la + - ls -la LiquidCrystal_I2C/ + - sudo git clone https://github.com/lincomatic/LiquidTWI2.git + # remove Robot_Control library to stop compile error! + - sudo rm -rf /usr/share/arduino/libraries/Robot_Control + # change back to home directory for compiling + - cd $TRAVIS_BUILD_DIR + # ino needs files in src directory + - ln -s Marlin src + # remove Marlin.pde as it confuses ino after it finds Marlin.ino + - rm Marlin/Marlin.pde +script: + # build default config + - ino build -m mega2560 + # backup configuration.h + - cp Marlin/Configuration.h Marlin/Configuration.h.backup + - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup + # change extruder numbers from 1 to 2 + # commented out for the moment fails build but compiles fine in Arduino + #- sed -i 's/#define EXTRUDERS 1/#define EXTRUDERS 2/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # change extruder numbers from 2 to 3, needs to be a board with 3 extruders defined in pins.h + #- sed -i 's/#define MOTHERBOARD BOARD_ULTIMAKER/#define MOTHERBOARD BOARD_AZTEEG_X3_PRO/g' Marlin/Configuration.h + #- sed -i 's/#define EXTRUDERS 2/#define EXTRUDERS 3/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # enable PIDTEMPBED + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define PIDTEMPBED/#define PIDTEMPBED/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable THERMAL RUNAWAY PROTECTION for extruders & bed + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_PERIOD/#define THERMAL_RUNAWAY_PROTECTION_PERIOD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS/#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD/#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD/g' Marlin/Configuration.h + - sed -i 's/\/\/#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS/#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable AUTO_BED_LEVELING + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ENABLE_AUTO_BED_LEVELING/#define ENABLE_AUTO_BED_LEVELING/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # enable EEPROM_SETTINGS & EEPROM_CHITCHAT + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define EEPROM_SETTINGS/#define EEPROM_SETTINGS/g' Marlin/Configuration.h + - sed -i 's/\/\/#define EEPROM_CHITCHAT/#define EEPROM_CHITCHAT/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ### LCDS ### + # ULTIMAKERCONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # MAKRPANEL + # Needs to use melzi and sanguino hardware + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define MAKRPANEL/#define MAKRPANEL/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # REPRAP_DISCOUNT_SMART_CONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAP_DISCOUNT_SMART_CONTROLLER/#define REPRAP_DISCOUNT_SMART_CONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # G3D_PANE + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define G3D_PANEL/#define G3D_PANEL/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # REPRAPWORLD_KEYPAD + # Cant find configuration details to get it to compile + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define ULTRA_LCD/#define ULTRA_LCD/g' Marlin/Configuration.h + #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD/#define REPRAPWORLD_KEYPAD/g' Marlin/Configuration.h + #- sed -i 's/\/\/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # RA_CONTROL_PANEL + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define RA_CONTROL_PANEL/#define RA_CONTROL_PANEL/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ### I2C PANELS ### + # LCD_I2C_SAINSMART_YWROBOT + # Failing at the moment needs different library + #- cp Marlin/Configuration.h.backup Marlin/Configuration.h + #- sed -i 's/\/\/#define LCD_I2C_SAINSMART_YWROBOT/#define LCD_I2C_SAINSMART_YWROBOT/g' Marlin/Configuration.h + #- rm -rf .build/ + #- ino build -m mega2560 + # LCD_I2C_PANELOLU2 + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define LCD_I2C_PANELOLU2/#define LCD_I2C_PANELOLU2/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # LCD_I2C_VIKI + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define LCD_I2C_VIKI/#define LCD_I2C_VIKI/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # Enable filament sensor + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + # Enable filament sensor with LCD display + - cp Marlin/Configuration.h.backup Marlin/Configuration.h + - sed -i 's/\/\/#define ULTIMAKERCONTROLLER/#define ULTIMAKERCONTROLLER/g' Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_SENSOR/#define FILAMENT_SENSOR/g' Marlin/Configuration.h + - sed -i 's/\/\/#define FILAMENT_LCD_DISPLAY/#define FILAMENT_LCD_DISPLAY/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m mega2560 + ######## Example Configurations ############## + # Delta Config + - cp Marlin/example_configurations/delta/Configuration* Marlin/ + - rm -rf .build/ + - ino build -m mega2560 + # Makibox Config need to check board type for Teensy++ 2.0 + #- cp Marlin/example_configurations/makibox/Configuration* Marlin/ + #- rm -rf .build/ + #- ino build -m mega2560 + # SCARA Config + - cp Marlin/example_configurations/SCARA/Configuration* Marlin/ + - rm -rf .build/ + - ino build -m mega2560 + # tvrrug Config need to check board type for sanguino atmega644p + #- cp Marlin/example_configurations/tvrrug/Round2/Configuration* Marlin/ + #- rm -rf .build/ + #- ino build -m mega2560 + ######## Board Types ############# + - sed -i 's/#define MOTHERBOARD BOARD_RAMPS_13_EFB/#define MOTHERBOARD BOARD_DUEMILANOVE_328P/g' Marlin/Configuration.h + - rm -rf .build/ + - ino build -m atmega328 \ No newline at end of file diff --git a/COPYING.md b/COPYING.md new file mode 100644 index 000000000..16d89e0a3 --- /dev/null +++ b/COPYING.md @@ -0,0 +1,596 @@ +GNU GENERAL PUBLIC LICENSE +========================== + +Version 3, 29 June 2007 + +Copyright © 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. + + + Copyright (C) + + 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: + + Copyright (C) + 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 +<>. \ No newline at end of file diff --git a/Marlin/COPYING b/Marlin/COPYING deleted file mode 100644 index 2b194fadc..000000000 --- a/Marlin/COPYING +++ /dev/null @@ -1,188 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - -Version 3, 29 June 2007 - -Copyright © 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. - diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 980efc5cd..fe6e371c5 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -392,6 +392,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of // these are the offsets to the probe relative to the extruder tip (Hotend - Probe) + // X and Y offsets must be integers #define X_PROBE_OFFSET_FROM_EXTRUDER -25 #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 20e68d09e..8e4a32805 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -38,15 +38,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) // wrong data being written to the variables. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order. -#define EEPROM_VERSION "V10" -#ifdef DELTA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V11" -#endif -#ifdef SCARA - #undef EEPROM_VERSION - #define EEPROM_VERSION "V12" -#endif +#define EEPROM_VERSION "V13" #ifdef EEPROM_SETTINGS void Config_StoreSettings() @@ -101,6 +93,31 @@ void Config_StoreSettings() #ifdef SCARA EEPROM_WRITE_VAR(i,axis_scaling); // Add scaling for SCARA #endif + #ifdef FWRETRACT + EEPROM_WRITE_VAR(i,autoretract_enabled); + EEPROM_WRITE_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_feedrate); + EEPROM_WRITE_VAR(i,retract_zlift); + EEPROM_WRITE_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i,retract_recover_length_swap); + #endif + EEPROM_WRITE_VAR(i,retract_recover_feedrate); + #endif + + // Save filament sizes + EEPROM_WRITE_VAR(i, volumetric_enabled); + EEPROM_WRITE_VAR(i, filament_size[0]); + #if EXTRUDERS > 1 + EEPROM_WRITE_VAR(i, filament_size[1]); + #if EXTRUDERS > 2 + EEPROM_WRITE_VAR(i, filament_size[2]); + #endif + #endif + char ver2[4]=EEPROM_VERSION; i=EEPROM_OFFSET; EEPROM_WRITE_VAR(i,ver2); // validate data @@ -210,11 +227,45 @@ SERIAL_ECHOLNPGM("Scaling factors:"); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)"); SERIAL_ECHO_START; - SERIAL_ECHOPAIR(" M208 S",retract_recover_length); - SERIAL_ECHOPAIR(" F" ,retract_recover_feedrate*60); - SERIAL_ECHOLN(""); + SERIAL_ECHOPAIR(" M208 S",retract_recover_length); + SERIAL_ECHOPAIR(" F", retract_recover_feedrate*60); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0)); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM("Multi-extruder settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap); + SERIAL_ECHOLN(""); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap); + SERIAL_ECHOLN(""); #endif -} + SERIAL_ECHO_START; + if (volumetric_enabled) { + SERIAL_ECHOLNPGM("Filament settings:"); + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 D", filament_size[0]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 1 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]); + SERIAL_ECHOLN(""); +#if EXTRUDERS > 2 + SERIAL_ECHO_START; + SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]); + SERIAL_ECHOLN(""); +#endif +#endif + } else { + SERIAL_ECHOLNPGM("Filament settings: Disabled"); + } +#endif +} #endif @@ -277,6 +328,30 @@ void Config_RetrieveSettings() EEPROM_READ_VAR(i,axis_scaling); #endif + #ifdef FWRETRACT + EEPROM_READ_VAR(i,autoretract_enabled); + EEPROM_READ_VAR(i,retract_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_length_swap); + #endif + EEPROM_READ_VAR(i,retract_feedrate); + EEPROM_READ_VAR(i,retract_zlift); + EEPROM_READ_VAR(i,retract_recover_length); + #if EXTRUDERS > 1 + EEPROM_READ_VAR(i,retract_recover_length_swap); + #endif + EEPROM_READ_VAR(i,retract_recover_feedrate); + #endif + + EEPROM_READ_VAR(i, volumetric_enabled); + EEPROM_READ_VAR(i, filament_size[0]); +#if EXTRUDERS > 1 + EEPROM_READ_VAR(i, filament_size[1]); +#if EXTRUDERS > 2 + EEPROM_READ_VAR(i, filament_size[2]); +#endif +#endif + calculate_volumetric_multipliers(); // Call updatePID (similar to when we have processed M301) updatePID(); SERIAL_ECHO_START; @@ -353,6 +428,31 @@ void Config_ResetDefault() #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP +#ifdef FWRETRACT + autoretract_enabled = false; + retract_length = RETRACT_LENGTH; +#if EXTRUDERS > 1 + retract_length_swap = RETRACT_LENGTH_SWAP; +#endif + retract_feedrate = 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 = RETRACT_RECOVER_FEEDRATE; +#endif + + volumetric_enabled = false; + filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 1 + filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA; +#if EXTRUDERS > 2 + filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA; +#endif +#endif + calculate_volumetric_multipliers(); + SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 76b348e77..7a1afa351 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -30,7 +30,10 @@ # include "Arduino.h" #else # include "WProgram.h" - //Arduino < 1.0.0 does not define this, so we need to do it ourselves +#endif + +// Arduino < 1.0.0 does not define this, so we need to do it ourselves +#ifndef analogInputToDigitalPin # define analogInputToDigitalPin(p) ((p) + A0) #endif @@ -168,7 +171,7 @@ void manage_inactivity(bool ignore_stepper_queue=false); #endif -enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3}; +enum AxisEnum {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5}; void FlushSerialRequestResend(); @@ -209,7 +212,9 @@ extern float homing_feedrate[]; extern bool axis_relative_modes[]; extern int feedmultiply; extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders +extern bool volumetric_enabled; extern int extruder_multiply[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 float current_position[NUM_AXIS] ; extern float add_homing[3]; @@ -238,9 +243,9 @@ extern unsigned char fanSpeedSoftPwm; #endif #ifdef FILAMENT_SENSOR - extern float filament_width_nominal; //holds the theoretical filament diameter ie., 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 float filament_width_nominal; //holds the theoretical filament diameter ie., 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 signed char measurement_delay[]; //ring buffer to delay measurement extern int delay_index1, delay_index2; //index into ring buffer extern float delay_dist; //delay distance counter @@ -266,3 +271,6 @@ extern void digipot_i2c_init(); #endif #endif + +extern void calculate_volumetric_multipliers(); + diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ef3cda04c..b8ab94fa8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -215,6 +215,15 @@ int extruder_multiply[EXTRUDERS] = {100 #endif #endif }; +bool volumetric_enabled = false; +float filament_size[EXTRUDERS] = { DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 1 + , DEFAULT_NOMINAL_FILAMENT_DIA + #if EXTRUDERS > 2 + , DEFAULT_NOMINAL_FILAMENT_DIA + #endif + #endif +}; float volumetric_multiplier[EXTRUDERS] = {1.0 #if EXTRUDERS > 1 , 1.0 @@ -367,6 +376,7 @@ const int sensitive_pins[] = SENSITIVE_PINS; // Sensitive pin list for M42 //Inactivity shutdown variables static unsigned long previous_millis_cmd = 0; +static unsigned long previous_millis_ok = 0; static unsigned long max_inactive_time = 0; static unsigned long stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME*1000l; @@ -636,6 +646,7 @@ void loop() else { SERIAL_PROTOCOLLNPGM(MSG_OK); + previous_millis_ok = millis(); } } else @@ -2823,21 +2834,7 @@ Sigma_Exit: #endif //BLINKM case 200: // M200 D set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters). { - float area = .0; - float radius = .0; - if(code_seen('D')) { - radius = (float)code_value() * .5; - if(radius == 0) { - area = 1; - } else { - area = M_PI * pow(radius, 2); - } - } else { - //reserved for setting filament diameter via UFID or filament measuring device - break; - - - } + tmp_extruder = active_extruder; if(code_seen('T')) { tmp_extruder = code_value(); @@ -2847,7 +2844,32 @@ Sigma_Exit: break; } } - volumetric_multiplier[tmp_extruder] = 1 / area; + + float area = .0; + if(code_seen('D')) { + float diameter = (float)code_value(); + if (diameter == 0.0) { + // 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 = false; + } else { + filament_size[tmp_extruder] = (float)code_value(); + // make sure all extruders have some sane value for the filament size + filament_size[0] = (filament_size[0] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[0]); + #if EXTRUDERS > 1 + filament_size[1] = (filament_size[1] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[1]); + #if EXTRUDERS > 2 + filament_size[2] = (filament_size[2] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[2]); + #endif + #endif + volumetric_enabled = true; + } + } else { + //reserved for setting filament diameter via UFID or filament measuring device + break; + } + calculate_volumetric_multipliers(); } break; case 201: // M201 @@ -3135,12 +3157,13 @@ Sigma_Exit: } } else if (servo_index >= 0) { - SERIAL_PROTOCOL(MSG_OK); + SERIAL_PROTOCOL(MSG_OK); SERIAL_PROTOCOL(" Servo "); SERIAL_PROTOCOL(servo_index); SERIAL_PROTOCOL(": "); SERIAL_PROTOCOL(servos[servo_index].read()); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } } break; @@ -3215,6 +3238,7 @@ Sigma_Exit: SERIAL_PROTOCOL(" d:"); SERIAL_PROTOCOL(unscalePID_d(bedKd)); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } break; #endif //PIDTEMP @@ -3505,6 +3529,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK); SERIAL_PROTOCOLLN(""); + previous_millis_ok = millis(); } else { @@ -3891,6 +3916,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp ClearToSend(); } + void FlushSerialRequestResend() { //char cmdbuffer[bufindr][100]="Resend:"; @@ -3908,6 +3934,7 @@ void ClearToSend() return; #endif //SDSUPPORT SERIAL_PROTOCOLLNPGM(MSG_OK); + previous_millis_ok = millis(); } void get_coordinates() @@ -4332,6 +4359,14 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s if( (millis() - previous_millis_cmd) > max_inactive_time ) if(max_inactive_time) kill(); + + // If 'OK' is garbled on sending PC won't receive it. Both machines will wait on each other forever. + // This resends OK if nothing is heard from PC for a while to avoid this bad case. + if( (millis() - previous_millis_ok) > max_inactive_time/4 ) { + SERIAL_PROTOCOL(MSG_OK); + previous_millis_ok=millis(); + } + if(stepper_inactive_time) { if( (millis() - previous_millis_cmd) > stepper_inactive_time ) { @@ -4580,3 +4615,29 @@ bool setTargetedHotend(int code){ return false; } + +float calculate_volumetric_multiplier(float diameter) { + float area = .0; + float radius = .0; + + radius = diameter * .5; + if (! volumetric_enabled || radius == 0) { + area = 1; + } + else { + area = M_PI * pow(radius, 2); + } + + return 1.0 / area; +} + +void calculate_volumetric_multipliers() { + volumetric_multiplier[0] = calculate_volumetric_multiplier(filament_size[0]); +#if EXTRUDERS > 1 + volumetric_multiplier[1] = calculate_volumetric_multiplier(filament_size[1]); +#if EXTRUDERS > 2 + volumetric_multiplier[2] = calculate_volumetric_multiplier(filament_size[2]); +#endif +#endif +} + diff --git a/Marlin/createTemperatureLookupMarlin.py b/Marlin/createTemperatureLookupMarlin.py deleted file mode 100755 index 01c602dff..000000000 --- a/Marlin/createTemperatureLookupMarlin.py +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/python -# -# Creates a C code lookup table for doing ADC to temperature conversion -# on a microcontroller -# based on: http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html -"""Thermistor Value Lookup Table Generator - -Generates lookup to temperature values for use in a microcontroller in C format based on: -http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html - -The main use is for Arduino programs that read data from the circuit board described here: -http://make.rrrf.org/ts-1.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 25C) - --t2=ttt:rrr middle temperature temperature:resistance point (around 150C) - --t3=ttt:rrr high temperature temperature:resistance point (around 250C) - --num-temps=... the number of temperature points to calculate (default: 20) -""" - -from math import * -import sys -import getopt - -class Thermistor: - "Class to do the thermistor maths" - def __init__(self, rp, t1, r1, t2, r2, t3, r3): - t1 = t1 + 273.15 # low temperature (25C) - r1 = r1 # resistance at low temperature - t2 = t2 + 273.15 # middle temperature (150C) - r2 = r2 # resistance at middle temperature - t3 = t3 + 273.15 # high temperature (250C) - r3 = r3 # resistance at high temperature - self.rp = rp # pull-up resistance - self.vadc = 5.0 # ADC reference - self.vcc = 5.0 # supply voltage to potential divider - a1 = log(r1) - a2 = log(r2) - a3 = log(r3) - z = a1 - a2 - y = a1 - a3 - x = 1/t1 - 1/t2 - w = 1/t1 - 1/t3 - v = pow(a1,3) - pow(a2,3) - u = pow(a1,3) - pow(a3,3) - c3 = (x-z*w/y)/(v-z*u/y) - c2 = (x-c3*v)/z - c1 = 1/t1-c3*pow(a1,3)-c2*a1 - self.c1 = c1 - self.c2 = c2 - self.c3 = c3 - - def res(self,adc): - "Convert ADC reading into a resolution" - res = self.temp(adc)-self.temp(adc+1) - return res - - def v(self,adc): - "Convert ADC reading into a Voltage" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - return v - - def r(self,adc): - "Convert ADC reading into a resistance in Ohms" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - r = self.rp * v / (self.vcc - v) # resistance of thermistor - return r - - def temp(self,adc): - "Convert ADC reading into a temperature in Celcius" - v = adc * self.vadc / (1024 ) # convert the 10 bit ADC value to a voltage - r = self.rp * v / (self.vcc - v) # resistance of thermistor - lnr = log(r) - Tinv = self.c1 + (self.c2*lnr) + (self.c3*pow(lnr,3)) - return (1/Tinv) - 273.15 # temperature - - def adc(self,temp): - "Convert temperature into a ADC reading" - y = (self.c1 - (1/(temp+273.15))) / (2*self.c3) - x = sqrt(pow(self.c2 / (3*self.c3),3) + pow(y,2)) - r = exp(pow(x-y,1.0/3) - pow(x+y,1.0/3)) # resistance of thermistor - return (r / (self.rp + r)) * (1024) - -def main(argv): - - rp = 4700; - t1 = 25; - r1 = 100000; - t2 = 150; - r2 = 1641.9; - t3 = 250; - r3 = 226.15; - num_temps = int(36); - - 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) - - max_adc = (1024 ) - 1 - min_temp = 0 - max_temp = 350 - increment = int(max_adc/(num_temps-1)); - - t = Thermistor(rp, t1, r1, t2, r2, t3, r3) - tmp = (min_temp - max_temp) / (num_temps-1) - print tmp - temps = range(max_temp, min_temp + tmp, tmp); - - 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: %.15g, %.15g, %.15g " % (t.c1, t.c2, t.c3) - print "//#define NUMTEMPS %s" % (len(temps)) - print "const short temptable[NUMTEMPS][2] PROGMEM = {" - - counter = 0 - for temp in temps: - counter = counter +1 - if counter == len(temps): - print " {(short)(%.2f*OVERSAMPLENR), %s} // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp))) - else: - print " {(short)(%.2f*OVERSAMPLENR), %s}, // v=%s r=%s res=%s C/count" % ((t.adc(temp)), temp, t.v(t.adc(temp)), t.r(t.adc(temp)),t.res(t.adc(temp))) - print "};" - -def usage(): - print __doc__ - -if __name__ == "__main__": - main(sys.argv[1:]) diff --git a/Marlin/LCD Menu Tree.pdf b/Marlin/documentation/LCD Menu Tree.pdf similarity index 100% rename from Marlin/LCD Menu Tree.pdf rename to Marlin/documentation/LCD Menu Tree.pdf diff --git a/Marlin/Menu Plans.xlsx b/Marlin/documentation/Menu Plans.xlsx similarity index 100% rename from Marlin/Menu Plans.xlsx rename to Marlin/documentation/Menu Plans.xlsx diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 9c0a54448..95314f683 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -366,6 +366,8 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) @@ -384,6 +386,8 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 2d9c5ead5..f0b3fa273 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -86,6 +86,11 @@ #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_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast" #define MSG_STORE_EPROM "Alzar Memoria" #define MSG_LOAD_EPROM "Cargar Memoria" diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index c556c027a..ba5d37127 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -86,6 +86,11 @@ #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_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast de LCD" #define MSG_STORE_EPROM "Desar a memoria" #define MSG_LOAD_EPROM "Carregar de mem." diff --git a/Marlin/language_de.h b/Marlin/language_de.h index a05d85d95..e442448af 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Temperatur" #define MSG_MOTION "Bewegung" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "EPROM speichern" #define MSG_LOAD_EPROM "EPROM laden" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index c749e9825..014b42e51 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -86,6 +86,11 @@ #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_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Store memory" #define MSG_LOAD_EPROM "Load memory" diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 50e8bb9c3..064c77060 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "E pasos/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimiento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contraste" #define MSG_STORE_EPROM "Guardar memoria" #define MSG_LOAD_EPROM "Cargar memoria" diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index e85218e18..7e65ca59d 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -86,6 +86,11 @@ #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_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD kontrastea" #define MSG_STORE_EPROM "Gorde memoria" #define MSG_LOAD_EPROM "Kargatu memoria" diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 9117f7787..0b1ac9cad 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Esteps/mm" #define MSG_TEMPERATURE "Lampotila" #define MSG_MOTION "Liike" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Tallenna muistiin" #define MSG_LOAD_EPROM "Lataa muistista" diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index ab5ac818c..59066b126 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epas/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Mouvement" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contraste LCD" #define MSG_STORE_EPROM "Sauver config" #define MSG_LOAD_EPROM "Lire config" diff --git a/Marlin/language_it.h b/Marlin/language_it.h index c42e70b2a..76845e3bc 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epassi/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Salva in EEPROM" #define MSG_LOAD_EPROM "Carica da EEPROM" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 67ddc7e95..e9dc38060 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -86,6 +86,11 @@ #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_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Geheugen opslaan" #define MSG_LOAD_EPROM "Geheugen laden" diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 3de1d2090..55ec20ee3 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "krokiE/mm" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Ruch" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Kontrast LCD" #define MSG_STORE_EPROM "Zapisz w pamieci" #define MSG_LOAD_EPROM "Wczytaj z pamieci" diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index c11191615..09e346748 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -86,6 +86,11 @@ #define MSG_ESTEPS "Epasso/mm:" #define MSG_TEMPERATURE "Temperatura" #define MSG_MOTION "Movimento" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "Contrast" #define MSG_STORE_EPROM "Guardar memoria" #define MSG_LOAD_EPROM "Carregar memoria" diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index ec0285f34..ec666f186 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -88,6 +88,11 @@ #define MSG_ESTEPS "E шаг/mm:" #define MSG_TEMPERATURE "Температура \x7E" #define MSG_MOTION "СкороÑти \x7E" +#define MSG_VOLUMETRIC "Filament" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_CONTRAST "LCD contrast" #define MSG_STORE_EPROM "Сохранить в EPROM" #define MSG_LOAD_EPROM "Загруз. из EPROM" diff --git a/Marlin/pins.h b/Marlin/pins.h index 4d76fa192..3bd6cb385 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -904,9 +904,9 @@ #define SCK_PIN 52 #define MISO_PIN 50 #define MOSI_PIN 51 - #define MAX6675_SS 53 + #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Dsplay/SD card #else - #define MAX6675_SS 49 + #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 #endif // RAMPS_OLD || RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index c8942251e..5d9fba948 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -715,11 +715,21 @@ block->steps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi if(feed_ratesteps_y = labs((target[X_AXIS]-position[X_AXIS]) - (target[Y_AXIS]-positi } else { - block->millimeters = sqrt(square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS])); + #ifndef COREXY + block->millimeters = sqrt(square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS])); + #else + block->millimeters = sqrt(square(delta_mm[X_HEAD]) + square(delta_mm[Y_HEAD]) + square(delta_mm[Z_AXIS])); + #endif } float inverse_millimeters = 1.0/block->millimeters; // Inverse millimeters to remove multiple divides diff --git a/Marlin/create_speed_lookuptable.py b/Marlin/scripts/createSpeedLookupTable.py similarity index 100% rename from Marlin/create_speed_lookuptable.py rename to Marlin/scripts/createSpeedLookupTable.py diff --git a/Marlin/scripts/createTemperatureLookupMarlin.py b/Marlin/scripts/createTemperatureLookupMarlin.py new file mode 100755 index 000000000..4f54c2833 --- /dev/null +++ b/Marlin/scripts/createTemperatureLookupMarlin.py @@ -0,0 +1,156 @@ +#!/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://make.rrrf.org/ts-1.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 = 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/Marlin/temperature.cpp b/Marlin/temperature.cpp index 5b116d914..7acc5ffd8 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -582,9 +582,9 @@ void manage_heater() temp_dState_bed = pid_input; pid_output = pTerm_bed + iTerm_bed - dTerm_bed; - if (pid_output > MAX_BED_PID) { + if (pid_output > MAX_BED_POWER) { if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration - pid_output=PID_MAX; + 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; @@ -1049,7 +1049,7 @@ void thermal_runaway_protection(int *state, unsigned long *timer, float temperat { *timer = millis(); } - else if ( (millis() - *timer) > period_seconds*1000) + else if ( (millis() - *timer) > ((unsigned long) period_seconds) * 1000) { SERIAL_ERROR_START; SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: "); diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 83895e2fd..d790266d9 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -59,6 +59,7 @@ 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(); #ifdef DOGLCD static void lcd_set_contrast(); #endif @@ -82,6 +83,7 @@ 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); @@ -90,6 +92,7 @@ static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float32(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); +static void menu_action_setting_edit_callback_float43(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float5(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc); @@ -742,6 +745,8 @@ static void lcd_control_menu() MENU_ITEM(back, MSG_MAIN, lcd_main_menu); 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); + #ifdef DOGLCD // MENU_ITEM_EDIT(int3, MSG_CONTRAST, &lcd_contrast, 0, 63); MENU_ITEM(submenu, MSG_CONTRAST, lcd_set_contrast); @@ -870,6 +875,26 @@ static void lcd_control_motion_menu() END_MENU(); } +static void lcd_control_volumetric_menu() +{ + START_MENU(); + MENU_ITEM(back, MSG_CONTROL, lcd_control_menu); + + MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &volumetric_enabled, calculate_volumetric_multipliers); + + if (volumetric_enabled) { + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_0, &filament_size[0], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 1 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_1, &filament_size[1], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#if EXTRUDERS > 2 + MENU_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_SIZE_EXTRUDER_2, &filament_size[2], DEFAULT_NOMINAL_FILAMENT_DIA - .5, DEFAULT_NOMINAL_FILAMENT_DIA + .5, calculate_volumetric_multipliers); +#endif +#endif + } + + END_MENU(); +} + #ifdef DOGLCD static void lcd_set_contrast() { @@ -1013,6 +1038,7 @@ void lcd_sdcard_menu() 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, ftostr43, 1000) menu_edit_type(float, float5, ftostr5, 0.01) menu_edit_type(float, float51, ftostr51, 10) menu_edit_type(float, float52, ftostr52, 100) @@ -1088,6 +1114,11 @@ static void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { *ptr = !(*ptr); } +static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback) +{ + menu_action_setting_edit_bool(pstr, ptr); + (*callback)(); +} #endif//ULTIPANEL /** LCD API **/ @@ -1482,7 +1513,24 @@ char *ftostr32(const float &x) return conv; } -// Convert float to string with 1.23 format +// Convert float to string with 1.234 format +char *ftostr43(const float &x) +{ + long xx = x * 1000; + if (xx >= 0) + conv[0] = (xx / 1000) % 10 + '0'; + else + conv[0] = '-'; + xx = abs(xx); + conv[1] = '.'; + conv[2] = (xx / 100) % 10 + '0'; + conv[3] = (xx / 10) % 10 + '0'; + conv[4] = (xx) % 10 + '0'; + conv[5] = 0; + return conv; +} + +//Float to string with 1.23 format char *ftostr12ns(const float &x) { long xx=x*100; diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 351a2654b..a175f4a75 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -118,6 +118,7 @@ char *ftostr3(const float &x); char *ftostr31ns(const float &x); // float to string without sign character char *ftostr31(const float &x); char *ftostr32(const float &x); +char *ftostr43(const float &x); char *ftostr12ns(const float &x); char *ftostr32sp(const float &x); // remove zero-padding from ftostr32 char *ftostr5(const float &x); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 1a93fe3e6..fe0953e56 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -693,6 +693,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) @@ -711,6 +713,8 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) +#define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) diff --git a/README.md b/README.md index b33005b81..f0213b8a0 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ Current Status: Bug Fixing =================== -What bugs are we working on: https://github.com/ErikZalm/Marlin/milestones +What bugs are we working on: https://github.com/MarlinFirmware/Marlin/milestones/Bug%20Fixing%20Round%201 + +IRC channel on freenode: #marlin-firmware + +(baaaah, #marlin was taken) Developer Notes =================== - There are now 2 branches: The __development__ branch is where new features and code changes will be sorted out. This branch may have untested code in it, so please let us know if you find any bugs. When the __development__ branch has reached a state where it is stable, it will be moved to the __stable__ branch. -- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/ErikZalm/Marlin/issues/1209 +- We are doing a kind of cleanup in the list of Issues and Pull Requests, the aim is to get to a state where we can certify the code as stable. To get the code tested as widely as possible we require several volunteers with a wide variety of hardware configurations willing to test the firmware and help us to certify it as stable. If you want to help out testing go to this issue and let us know: https://github.com/MarlinFirmware/Marlin/issues/1209 - Before you submit any pull request, we ask that you _PLEASE_ test your code before submission, even if the change seems innocuous. When creating the pull request, please include the hardware you used for testing and a short synopsis of your testing procedure. Untested pull requests are less likely to be merged, as even slight changes create the risk of breaking the main branch.