Skip to content

Commit 51410ff

Browse files
author
João Martins
committed
Merge branch 'bugfix-1.1.x' into configurations/KosselXL
* bugfix-1.1.x: Add support for Printrbot Neopixel RGBW strip. Bring Infitary i3 config up to date Update Russian translation - Part 1 MKS 1.3+: Add pin mapping for PS_ON Improve FWRETRACT config options and commentary Drop extra initializers for vars initialized by EEPROM code Split G10/G11 into separate functions Add some more requirements to the G-code list BARICUDA valve pressure consistently uint8_t General cleanup Fixing SWITCHING_EXTRUDER feature Bugfix (MarlinFirmware#7310) Allow the sampled point to be added into the Least Squares Best Fit (MarlinFirmware#7289) Fix build by replacing qr_solve by least_squares_fit. (MarlinFirmware#7285) Apply coding standards to recent merges Fix ABL broken by recent change Save 7714 bytes of program memory when doing AUTO_BED_LEVELING_LINEAR (MarlinFirmware#7276) Volatile keyword not needed for parser.seen Stay in User Menu after command. Add feedback. Updates for G33-LCD interface # Conflicts: # Marlin/pins_RAMPS.h
2 parents b1670f9 + 2159135 commit 51410ff

File tree

84 files changed

+1887
-2779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1887
-2779
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ install:
5050
- git clone https://github.com/teemuatlut/TMC2130Stepper.git
5151
- sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
5252
#
53+
# Install: Adafruit Neopixel library
54+
- git clone https://github.com/adafruit/Adafruit_NeoPixel.git
55+
- sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
56+
#
5357
before_script:
5458
#
5559
# Change current working directory to the build dir
@@ -80,6 +84,7 @@ script:
8084
- opt_set TEMP_SENSOR_1 1
8185
- opt_set TEMP_SENSOR_BED 1
8286
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES
87+
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_RGBW_LED
8388
- build_marlin
8489
#
8590
# ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE

Marlin/Conditionals_LCD.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,6 @@
430430

431431
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
432432
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
433-
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632))
433+
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED))
434434

435435
#endif // CONDITIONALS_LCD_H

Marlin/Configuration.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,14 @@
16291629
#define RGB_LED_W_PIN -1
16301630
#endif
16311631

1632+
// Support for Adafruit Neopixel LED driver
1633+
//#define NEOPIXEL_RGBW_LED
1634+
#if ENABLED(NEOPIXEL_RGBW_LED)
1635+
#define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard)
1636+
#define NEOPIXEL_PIXELS 3
1637+
//#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
1638+
#endif
1639+
16321640
/**
16331641
* Printer Event LEDs
16341642
*
@@ -1640,7 +1648,7 @@
16401648
* - Change to green once print has finished
16411649
* - Turn off after the print has finished and the user has pushed a button
16421650
*/
1643-
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
1651+
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)
16441652
#define PRINTER_EVENT_LEDS
16451653
#endif
16461654

Marlin/Configuration_adv.h

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -756,22 +756,32 @@
756756

757757
// @section fwretract
758758

759-
// Firmware based and LCD controlled retract
760-
// M207 and M208 can be used to define parameters for the retraction.
761-
// The retraction can be called by the slicer using G10 and G11
762-
// until then, intended retractions can be detected by moves that only extrude and the direction.
763-
// the moves are than replaced by the firmware controlled ones.
764-
765-
//#define FWRETRACT //ONLY PARTIALLY TESTED
759+
/**
760+
* Firmware-based and LCD-controlled retract
761+
*
762+
* Add G10 / G11 commands for automatic firmware-based retract / recover.
763+
* Use M207 and M208 to define parameters for retract / recover.
764+
*
765+
* Use M209 to enable or disable auto-retract.
766+
* With auto-retract enabled, all G1 E moves over the MIN_RETRACT length
767+
* will be converted to firmware-based retract/recover moves.
768+
*
769+
* Be sure to turn off auto-retract during filament change.
770+
*
771+
* Note that M207 / M208 / M209 settings are saved to EEPROM.
772+
*
773+
*/
774+
//#define FWRETRACT // ONLY PARTIALLY TESTED
766775
#if ENABLED(FWRETRACT)
767-
#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
768-
#define RETRACT_LENGTH 3 //default retract length (positive mm)
769-
#define RETRACT_LENGTH_SWAP 13 //default swap retract length (positive mm), for extruder change
770-
#define RETRACT_FEEDRATE 45 //default feedrate for retracting (mm/s)
771-
#define RETRACT_ZLIFT 0 //default retract Z-lift
772-
#define RETRACT_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
773-
#define RETRACT_RECOVER_LENGTH_SWAP 0 //default additional swap recover length (mm, added to retract length when recovering from extruder change)
774-
#define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
776+
#define MIN_RETRACT 0.1 // A retract/recover of this length or longer can be converted to auto-retract
777+
#define RETRACT_LENGTH 3 // Default retract length (positive mm)
778+
#define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
779+
#define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
780+
#define RETRACT_ZLIFT 0 // Default retract Z-lift
781+
#define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
782+
#define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
783+
#define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
784+
#define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
775785
#endif
776786

777787
/**

Marlin/G26_Mesh_Validation_Tool.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -58,67 +58,67 @@
5858
*
5959
* G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
6060
* In order to fully utilize and benefit from the Marlin Unified Bed Leveling System an accurate Mesh must
61-
* be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
61+
* be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
6262
* first heat the bed and nozzle. It will then print lines and circles along the Mesh Cell boundaries and
6363
* the intersections of those lines (respectively).
6464
*
6565
* This action allows the user to immediately see where the Mesh is properly defined and where it needs to
66-
* be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
67-
* the user can specify the X and Y position of interest with command parameters. This allows the user to
66+
* be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
67+
* the user can specify the X and Y position of interest with command parameters. This allows the user to
6868
* focus on a particular area of the Mesh where attention is needed.
6969
*
70-
* B # Bed Set the Bed Temperature. If not specified, a default of 60 C. will be assumed.
70+
* B # Bed Set the Bed Temperature. If not specified, a default of 60 C. will be assumed.
7171
*
7272
* C Current When searching for Mesh Intersection points to draw, use the current nozzle location
7373
* as the base for any distance comparison.
7474
*
75-
* D Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this
76-
* command to see how well a Mesh as been adjusted to match a print surface. In order to do
77-
* this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
75+
* D Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this
76+
* command to see how well a Mesh as been adjusted to match a print surface. In order to do
77+
* this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
7878
* alters the command's normal behaviour and disables the Unified Bed Leveling System even if
7979
* it is on.
8080
*
81-
* H # Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed.
81+
* H # Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed.
8282
*
83-
* F # Filament Used to specify the diameter of the filament being used. If not specified
84-
* 1.75mm filament is assumed. If you are not getting acceptable results by using the
83+
* F # Filament Used to specify the diameter of the filament being used. If not specified
84+
* 1.75mm filament is assumed. If you are not getting acceptable results by using the
8585
* 'correct' numbers, you can scale this number up or down a little bit to change the amount
8686
* of filament that is being extruded during the printing of the various lines on the bed.
8787
*
8888
* K Keep-On Keep the heaters turned on at the end of the command.
8989
*
90-
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
90+
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
9191
*
92-
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
92+
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
9393
* is over kill, but using this parameter will let you get the very first 'circle' perfect
9494
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
95-
* Mesh calibrated. If not specified, a filament length of .3mm is assumed.
95+
* Mesh calibrated. If not specified, a filament length of .3mm is assumed.
9696
*
97-
* P # Prime Prime the nozzle with specified length of filament. If this parameter is not
98-
* given, no prime action will take place. If the parameter specifies an amount, that much
99-
* will be purged before continuing. If no amount is specified the command will start
97+
* P # Prime Prime the nozzle with specified length of filament. If this parameter is not
98+
* given, no prime action will take place. If the parameter specifies an amount, that much
99+
* will be purged before continuing. If no amount is specified the command will start
100100
* purging filament until the user provides an LCD Click and then it will continue with
101-
* printing the Mesh. You can carefully remove the spent filament with a needle nose
102-
* pliers while holding the LCD Click wheel in a depressed state. If you do not have
101+
* printing the Mesh. You can carefully remove the spent filament with a needle nose
102+
* pliers while holding the LCD Click wheel in a depressed state. If you do not have
103103
* an LCD, you must specify a value if you use P.
104104
*
105-
* Q # Multiplier Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
105+
* Q # Multiplier Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
106106
* un-retraction is at 1.2mm These numbers will be scaled by the specified amount
107107
*
108108
* R # Repeat Prints the number of patterns given as a parameter, starting at the current location.
109109
* If a parameter isn't given, every point will be printed unless G26 is interrupted.
110110
* This works the same way that the UBL G29 P4 R parameter works.
111111
*
112-
* NOTE: If you do not have an LCD, you -must- specify R. This is to ensure that you are
112+
* NOTE: If you do not have an LCD, you -must- specify R. This is to ensure that you are
113113
* aware that there's some risk associated with printing without the ability to abort in
114-
* cases where mesh point Z value may be inaccurate. As above, if you do not include a
114+
* cases where mesh point Z value may be inaccurate. As above, if you do not include a
115115
* parameter, every point will be printed.
116116
*
117-
* S # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
117+
* S # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
118118
*
119-
* U # Random Randomize the order that the circles are drawn on the bed. The search for the closest
120-
* undrawn cicle is still done. But the distance to the location for each circle has a
121-
* random number of the size specified added to it. Specifying S50 will give an interesting
119+
* U # Random Randomize the order that the circles are drawn on the bed. The search for the closest
120+
* undrawn cicle is still done. But the distance to the location for each circle has a
121+
* random number of the size specified added to it. Specifying S50 will give an interesting
122122
* deviation from the normal behaviour on a 10 x 10 Mesh.
123123
*
124124
* X # X Coord. Specify the starting location of the drawing activity.
@@ -218,7 +218,7 @@
218218
* nozzle in a problem area and doing a G29 P4 R command.
219219
*/
220220
void unified_bed_leveling::G26() {
221-
SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
221+
SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
222222
float tmp, start_angle, end_angle;
223223
int i, xi, yi;
224224
mesh_index_pair location;
@@ -264,7 +264,7 @@
264264
//debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
265265

266266
/**
267-
* Declare and generate a sin() & cos() table to be used during the circle drawing. This will lighten
267+
* Declare and generate a sin() & cos() table to be used during the circle drawing. This will lighten
268268
* the CPU load and make the arc drawing faster and more smooth
269269
*/
270270
float sin_table[360 / 30 + 1], cos_table[360 / 30 + 1];
@@ -575,17 +575,17 @@
575575

576576
/**
577577
* print_line_from_here_to_there() takes two cartesian coordinates and draws a line from one
578-
* to the other. But there are really three sets of coordinates involved. The first coordinate
579-
* is the present location of the nozzle. We don't necessarily want to print from this location.
580-
* We first need to move the nozzle to the start of line segment where we want to print. Once
578+
* to the other. But there are really three sets of coordinates involved. The first coordinate
579+
* is the present location of the nozzle. We don't necessarily want to print from this location.
580+
* We first need to move the nozzle to the start of line segment where we want to print. Once
581581
* there, we can use the two coordinates supplied to draw the line.
582582
*
583583
* Note: Although we assume the first set of coordinates is the start of the line and the second
584-
* set of coordinates is the end of the line, it does not always work out that way. This function
585-
* optimizes the movement to minimize the travel distance before it can start printing. This saves
586-
* a lot of time and eleminates a lot of non-sensical movement of the nozzle. However, it does
584+
* set of coordinates is the end of the line, it does not always work out that way. This function
585+
* optimizes the movement to minimize the travel distance before it can start printing. This saves
586+
* a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does
587587
* cause a lot of very little short retracement of th nozzle when it draws the very first line
588-
* segment of a 'circle'. The time this requires is very short and is easily saved by the other
588+
* segment of a 'circle'. The time this requires is very short and is easily saved by the other
589589
* cases where the optimization comes into play.
590590
*/
591591
void unified_bed_leveling::print_line_from_here_to_there(const float &sx, const float &sy, const float &sz, const float &ex, const float &ey, const float &ez) {
@@ -850,7 +850,7 @@
850850

851851
stepper.synchronize(); // Without this synchronize, the purge is more consistent,
852852
// but because the planner has a buffer, we won't be able
853-
// to stop as quickly. So we put up with the less smooth
853+
// to stop as quickly. So we put up with the less smooth
854854
// action to give the user a more responsive 'Stop'.
855855
set_destination_to_current();
856856
idle();
@@ -860,7 +860,7 @@
860860

861861
#if ENABLED(ULTRA_LCD)
862862
strcpy_P(lcd_status_message, PSTR("Done Priming")); // We can't do lcd_setstatusPGM() without having it continue;
863-
// So... We cheat to get a message up.
863+
// So... We cheat to get a message up.
864864
lcd_setstatusPGM(PSTR("Done Priming"), 99);
865865
lcd_quick_feedback();
866866
#endif

Marlin/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ ifeq ($(WIRE), 1)
270270
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
271271
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
272272
endif
273+
ifeq ($(NEOPIXEL), 1)
274+
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel
275+
endif
273276

274277
ifeq ($(HARDWARE_VARIANT), arduino)
275278
HARDWARE_SUB_VARIANT ?= mega
@@ -295,8 +298,11 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
295298
SdFile.cpp SdVolume.cpp planner.cpp stepper.cpp \
296299
temperature.cpp cardreader.cpp configuration_store.cpp \
297300
watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
298-
dac_mcp4728.cpp vector_3.cpp qr_solve.cpp endstops.cpp stopwatch.cpp utility.cpp \
301+
dac_mcp4728.cpp vector_3.cpp least_squares_fit.cpp endstops.cpp stopwatch.cpp utility.cpp \
299302
printcounter.cpp nozzle.cpp serial.cpp
303+
ifeq ($(NEOPIXEL), 1)
304+
CXXSRC += Adafruit_NeoPixel.cpp
305+
endif
300306
ifeq ($(LIQUID_TWI2), 0)
301307
CXXSRC += LiquidCrystal.cpp
302308
else

Marlin/Marlin.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,7 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
362362
#endif
363363

364364
#if ENABLED(BARICUDA)
365-
extern int baricuda_valve_pressure;
366-
extern int baricuda_e_to_p_pressure;
365+
extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
367366
#endif
368367

369368
#if ENABLED(FILAMENT_WIDTH_SENSOR)

0 commit comments

Comments
 (0)