-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual Filament Change feature #3601
Manual Filament Change feature #3601
Conversation
You have to clean your code a little bit, the most important aspects are:
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
Marlin 3D Printer Firmware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this file dfif there are a lot of changes unrelated with your functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i saw it two and i'm wordering why, cuz i havent change the comment, maybe by accident but i havent modified these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe was the Arduino IDE identantion. I must change it again?
if (commands_in_queue < BUFSIZE) get_available_commands(); | ||
|
||
|
||
if (filamentRemove) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like to use EEPROM nor having this hook at the mais loop()
..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just using EEPROM because the variable was used in the main loop.
And i have it there because i thugth that there were the right way but i could easily move to ultralcd.cpp file. What you think?
To reset files to their "default" use |
@jbrazio i've done it 😄 |
#define MSG_CHANGE_FILAMENT "Filament" | ||
#define MSG_REMOVE_FILAMENT "Remove" | ||
#define MSG_INSERT_FILAMENT "Insert" | ||
#define MSG_INSERT_FILAMENT_SLOW "Slow Insert" | ||
#endif // LANGUAGE_EN_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have that strange #ifndef
#endif
structures around the definitions in the English language file?
Do you see any warnings about redefined strings?
What language do you see for the new entries on your display if you set the language to pt-br?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these rhetorical questions you are asking? Your sarcasm doesn't necessarily translate. (But the contempt is loud and clear.)
Simple
straightforwardness
is
better.
Even better: just patch it up and submit a PR to his branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blue-Marlin i only have pasted my 4 variables at the end of the file i havent done any ifndef. ALso o see no warnings and i have done this 4 lines in pt-br file also, so i see it at my language.
@thinkyhead it was for me or for @Blue-Marlin? The question about sacarsm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes " rhetorical questions" and "sarcasm" have been addressed to me.
Ehhh, 'variables'?
No warnings?
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:511:0: warning: "MSG_CHANGE_FILAMENT" redefined [enabled by default]
#define MSG_CHANGE_FILAMENT "Filament"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:174:0: note: this is the location of the previous definition
#define MSG_CHANGE_FILAMENT "Filamento"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:512:0: warning: "MSG_REMOVE_FILAMENT" redefined [enabled by default]
#define MSG_REMOVE_FILAMENT "Remove"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:175:0: note: this is the location of the previous definition
#define MSG_REMOVE_FILAMENT "Retirar"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:513:0: warning: "MSG_INSERT_FILAMENT" redefined [enabled by default]
#define MSG_INSERT_FILAMENT "Insert"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:176:0: note: this is the location of the previous definition
#define MSG_INSERT_FILAMENT "Inserir"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:514:0: warning: "MSG_INSERT_FILAMENT_SLOW" redefined [enabled by default]
#define MSG_INSERT_FILAMENT_SLOW "Slow Insert"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\temperature.cpp:46:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:177:0: note: this is the location of the previous definition
#define MSG_INSERT_FILAMENT_SLOW "Lentamente"
^
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -fverbose-asm -save-temps "-IC:\Users\ah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\ah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\mega" "-IC:\Users\ah\Documents\Arduino\libraries\U8glib\src" "C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\twibus.cpp" -o "C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\twibus.cpp.o"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -fverbose-asm -save-temps "-IC:\Users\ah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino" "-IC:\Users\ah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\variants\mega" "-IC:\Users\ah\Documents\Arduino\libraries\U8glib\src" "C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp" -o "C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp.o"
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:511:0: warning: "MSG_CHANGE_FILAMENT" redefined [enabled by default]
#define MSG_CHANGE_FILAMENT "Filament"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:174:0: note: this is the location of the previous definition
#define MSG_CHANGE_FILAMENT "Filamento"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:512:0: warning: "MSG_REMOVE_FILAMENT" redefined [enabled by default]
#define MSG_REMOVE_FILAMENT "Remove"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:175:0: note: this is the location of the previous definition
#define MSG_REMOVE_FILAMENT "Retirar"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:513:0: warning: "MSG_INSERT_FILAMENT" redefined [enabled by default]
#define MSG_INSERT_FILAMENT "Insert"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:176:0: note: this is the location of the previous definition
#define MSG_INSERT_FILAMENT "Inserir"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:251:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_en.h:514:0: warning: "MSG_INSERT_FILAMENT_SLOW" redefined [enabled by default]
#define MSG_INSERT_FILAMENT_SLOW "Slow Insert"
^
In file included from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language.h:250:0,
from C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\ultralcd.cpp:26:
C:\Users\ah\AppData\Local\Temp\build0ca64bc2097fb2df5a6ea132866e93fd.tmp\sketch\language_pt-br.h:177:0: note: this is the location of the previous definition
#define MSG_INSERT_FILAMENT_SLOW "Lentamente"
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to return to my first (rhetorical) question or do you want fotos from your pt-br - en mix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i have to make the "ifndef" in english file, got it.
@codersquirrel está quase.. ;-) Could you check // Add support for experimental filament exchange support M600; requires display
#if ENABLED(ULTIPANEL)
//#define FILAMENTCHANGEENABLE
#if ENABLED(FILAMENTCHANGEENABLE)
#define FILAMENTCHANGE_XPOS 3
#define FILAMENTCHANGE_YPOS 3
#define FILAMENTCHANGE_ZADD 10
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -100
#define AUTO_FILAMENT_CHANGE //This extrude filament until you press the button on LCD
#define AUTO_FILAMENT_CHANGE_LENGTH 0.04 //Extrusion length on automatic extrusion loop
#define AUTO_FILAMENT_CHANGE_FEEDRATE 300 //Extrusion feedrate (mm/min) on automatic extrusion loop
#endif
#endif |
|
||
static void lcd_retract_filament() { | ||
//This value must be setted according the size you have at your printer | ||
current_position[E_AXIS] -= 75.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this number configurable in Configuration.h
– don't hard-code it here.
@jbrazio Obrigada ;-D i also will check this, and try to make this variable configurable, as @thinkyhead said. |
Yeah i know there's a lot to do about this feature. Like proper variable names, proper configuration. But i have done this to my use. For my own use i don't demand such things. But once i have done for me and it was something very handy, that i'm coming here to share and for you guys who have a better though on big projects, or entrepreneur, or i don't know how the hell call this type of thinking, but thinking a little bit more "organized" to help to make this the right way, and improve it for everyone's use. |
#endif | ||
#ifndef MSG_INSERT_FILAMENT_SLOW | ||
#define MSG_INSERT_FILAMENT_SLOW "Slow Insert" | ||
#endif | ||
#endif // LANGUAGE_EN_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
also, the travis check has failed at scara configuration :s
Could u help me?
It's
in only one of the about 20 Configuration.h files, in combination with using this defines without checking there existence.
|
@Blue-Marlin i'm just thinking, i have it set it in configuration where i thougth would be visible for every configuration. SHoud i change it to another file? |
@codersquirrel Each configuration contains the whole, and some of them are used for the Travis tests. So whenever we add new things to the main config, we must also add them to all the other |
@thinkyhead so it was travis problem not mine? cuz i add to the Configuration.h (yeah i'm a confused person, don't take me bad) |
Whenever we add new things to the main config, we must also add them to all the other Configuration.h files in Marlin.
|
WOW not i get sorry xD |
I removed your added config options anyway, so don't worry about it for now. |
@thinkyhead yes i saw it, i just wanted to make the pr with the green mark to "disengage of consciousness" i dont knwo if in english you have this expression, but its like to get this a closure. Anyway i stop working on this and will only work at yours |
In English: "peace of mind." |
So that our two branches are in sync, you should do just one more…
Thanks! |
If all this git voodoo gets tiring, you can also use these helpful scripts: #3567 |
@thinkyhead i'm following both to make this work lol
|
|
Helpful tip: Three backticks for multi-line code quoting.
…gives us…
…or for example…
…gives us… #define THING_IS_GOOD 1
if (THING_IS_GOOD) {
run_away();
} |
@codersquirrel I thought you might get a lot out of this git tutorial. I know I did! |
@thinkyhead yeah i will follow and try to get your branch again, i'm just too busy this week xD |
Due to #3605 this will be closed. |
Add the filament change routine.
States:
The feed rate used on it was but "eye". I made no calc to it, and i think that it also can change according to users need, or change it as you guys think is best.
Sorry but the lack of right words on description.
PS. It is not dealing with heating of the nozzle, it just move the "motor". In fact assumes that its already hot.
I'm looking ahead to implement this late next week.