Skip to content

Commit

Permalink
revert some things
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 20, 2024
1 parent b92d110 commit 5efa744
Show file tree
Hide file tree
Showing 20 changed files with 464 additions and 689 deletions.
313 changes: 152 additions & 161 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

Large diffs are not rendered by default.

158 changes: 75 additions & 83 deletions Marlin/src/gcode/bedlevel/G26.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,82 +21,78 @@
*/

/**
* @brief G26: Mesh Validation Tool
* G26 Mesh Validation Tool
*
* @details G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System
* In order to fully utilize and benefit from the Marlin Unified Bed Leveling System an accurate Mesh must
* be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
* first heat the bed and nozzle. It will then print lines and circles along the Mesh Cell boundaries and
* the intersections of those lines (respectively)
* G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
* In order to fully utilize and benefit from the Marlin Unified Bed Leveling System an accurate Mesh must
* be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
* first heat the bed and nozzle. It will then print lines and circles along the Mesh Cell boundaries and
* the intersections of those lines (respectively).
*
* This action allows the user to immediately see where the Mesh is properly defined and where it needs to
* be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
* the user can specify the X and Y position of interest with command parameters. This allows the user to
* focus on a particular area of the Mesh where attention is needed
* This action allows the user to immediately see where the Mesh is properly defined and where it needs to
* be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
* the user can specify the X and Y position of interest with command parameters. This allows the user to
* focus on a particular area of the Mesh where attention is needed.
*
* Usage:
* G26 [B<temp>] [C<bool>] [D] [F<linear>] [H<linear>] [I<index>] [K<bool>] [L<linear>] [O<linear>] [P<linear>] [Q<float>] [R<int>] [S<float>] [U<linear>] [X<linear>] [Y<linear>]
* B # Bed Set the Bed Temperature. If not specified, a default of 60 C. will be assumed.
*
* Parameters:
* @param B : Bed Set the Bed Temperature. If not specified, a default of 60 C. will be assumed
*
* @param C : Current When searching for Mesh Intersection points to draw, use the current nozzle location
* as the base for any distance comparison
* C Current When searching for Mesh Intersection points to draw, use the current nozzle location
* as the base for any distance comparison.
*
* @param D : Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this
* command to see how well a Mesh as been adjusted to match a print surface. In order to do
* this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
* alters the command's normal behavior and disables the Unified Bed Leveling System even if
* it is on
* D Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this
* command to see how well a Mesh as been adjusted to match a print surface. In order to do
* this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
* alters the command's normal behavior and disables the Unified Bed Leveling System even if
* it is on.
*
* @param H : Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed
* H # Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed.
*
* @param I : Preset Heat the Nozzle and Bed based on a Material Preset (if material presets are defined)
* I # Preset Heat the Nozzle and Bed based on a Material Preset (if material presets are defined).
*
* @param F : Filament Used to specify the diameter of the filament being used. If not specified
* 1.75mm filament is assumed. If you are not getting acceptable results by using the
* 'correct' numbers, you can scale this number up or down a little bit to change the amount
* of filament that is being extruded during the printing of the various lines on the bed
* F # Filament Used to specify the diameter of the filament being used. If not specified
* 1.75mm filament is assumed. If you are not getting acceptable results by using the
* 'correct' numbers, you can scale this number up or down a little bit to change the amount
* of filament that is being extruded during the printing of the various lines on the bed.
*
* @param K : Keep-On Keep the heaters turned on at the end of the command
* K Keep-On Keep the heaters turned on at the end of the command.
*
* @param L : Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
*
* @param O : Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
* is over kill, but using this parameter will let you get the very first 'circle' perfect
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
* Mesh calibrated. If not specified, a filament length of .3mm is assumed
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
* is over kill, but using this parameter will let you get the very first 'circle' perfect
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
* Mesh calibrated. If not specified, a filament length of .3mm is assumed.
*
* @param P : Prime Prime the nozzle with specified length of filament. If this parameter is not
* given, no prime action will take place. If the parameter specifies an amount, that much
* will be purged before continuing. If no amount is specified the command will start
* purging filament until the user provides an LCD Click and then it will continue with
* printing the Mesh. You can carefully remove the spent filament with a needle nose
* pliers while holding the LCD Click wheel in a depressed state. If you do not have
* an LCD, you must specify a value if you use P
* P # Prime Prime the nozzle with specified length of filament. If this parameter is not
* given, no prime action will take place. If the parameter specifies an amount, that much
* will be purged before continuing. If no amount is specified the command will start
* purging filament until the user provides an LCD Click and then it will continue with
* printing the Mesh. You can carefully remove the spent filament with a needle nose
* pliers while holding the LCD Click wheel in a depressed state. If you do not have
* an LCD, you must specify a value if you use P.
*
* @param Q : Multiplier Retraction Multiplier. (Normally not needed.) During G26 retraction will use the length
* specified by this parameter (1mm by default). Recover will be 1.2x the retract distance
* Q # Multiplier Retraction Multiplier. (Normally not needed.) During G26 retraction will use the length
* specified by this parameter (1mm by default). Recover will be 1.2x the retract distance.
*
* @param R : Repeat Prints the number of patterns given as a parameter, starting at the current location
* If a parameter isn't given, every point will be printed unless G26 is interrupted
* This works the same way that the UBL G29 P4 R parameter works
* R # Repeat Prints the number of patterns given as a parameter, starting at the current location.
* If a parameter isn't given, every point will be printed unless G26 is interrupted.
* This works the same way that the UBL G29 P4 R parameter works.
*
* NOTE: If you do not have an LCD, you -must- specify R. This is to ensure that you are
* aware that there's some risk associated with printing without the ability to abort in
* cases where mesh point Z value may be inaccurate. As above, if you do not include a
* parameter, every point will be printed
* NOTE: If you do not have an LCD, you -must- specify R. This is to ensure that you are
* aware that there's some risk associated with printing without the ability to abort in
* cases where mesh point Z value may be inaccurate. As above, if you do not include a
* parameter, every point will be printed.
*
* @param S : Nozzle Used to control the size of nozzle diameter. If not specified, a 0.4mm nozzle is assumed
* S # Nozzle Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
*
* @param U : Random Randomize the order that the circles are drawn on the bed. The search for the closest
* un-drawn circle is still done. But the distance to the location for each circle has a
* random number of the specified size added to it. Specifying S50 will give an interesting
* deviation from the normal behavior on a 10 x 10 Mesh
* U # Random Randomize the order that the circles are drawn on the bed. The search for the closest
* un-drawn circle is still done. But the distance to the location for each circle has a
* random number of the specified size added to it. Specifying S50 will give an interesting
* deviation from the normal behavior on a 10 x 10 Mesh.
*
* @param X : X Coord. Specify the starting location of the drawing activity
* X # X Coord. Specify the starting location of the drawing activity.
*
* @param Y : Y Coord. Specify the starting location of the drawing activity
* Y # Y Coord. Specify the starting location of the drawing activity.
*/

#include "../../inc/MarlinConfig.h"
Expand Down Expand Up @@ -251,15 +247,15 @@ typedef struct {
* to the other. But there are really three sets of coordinates involved. The first coordinate
* is the present location of the nozzle. We don't necessarily want to print from this location.
* We first need to move the nozzle to the start of line segment where we want to print. Once
* there, we can use the two coordinates supplied to draw the line
* there, we can use the two coordinates supplied to draw the line.
*
* NOTE: Although we assume the first set of coordinates is the start of the line and the second
* Note: Although we assume the first set of coordinates is the start of the line and the second
* set of coordinates is the end of the line, it does not always work out that way. This function
* optimizes the movement to minimize the travel distance before it can start printing. This saves
* a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does
* cause a lot of very little short retracement of th nozzle when it draws the very first line
* segment of a 'circle'. The time this requires is very short and is easily saved by the other
* cases where the optimization comes into play
* cases where the optimization comes into play.
*/
void print_line_from_here_to_there(const xyz_pos_t &s, const xyz_pos_t &e) {

Expand Down Expand Up @@ -474,33 +470,29 @@ typedef struct {
} g26_helper_t;

/**
* @brief G26: Mesh Validation Pattern generation
*
* @details Used to interactively edit the mesh by placing the
* nozzle in a problem area and doing a G29 P4 R command
* G26: Mesh Validation Pattern generation.
*
* Usage:
* G26 [B<temp>] [C<bool>] [D] [F<linear>] [H<linear>] [I<index>] [K<bool>] [L<linear>]
* [O<linear>] [P<linear>] [Q<float>] [R<int>] [S<float>] [U<linear>] [X<linear>] [Y<linear>]
* Used to interactively edit the mesh by placing the
* nozzle in a problem area and doing a G29 P4 R command.
*
* Parameters:
*
* @param B Bed Temperature
* @param C Continue from the Closest mesh point
* @param D Disable leveling before starting
* @param F Filament diameter
* @param H Hotend Temperature
* @param K Keep heaters on when completed
* @param L Layer Height
* @param O Ooze extrusion length
* @param P Prime length
* @param Q Retraction multiplier
* @param R Repetitions (number of grid points)
* @param S Nozzle Size (diameter) in mm
* @param T Tool index to change to, if included
* @param U Random deviation (50 if no value given)
* @param X X position
* @param Y Y position
* B Bed Temperature
* C Continue from the Closest mesh point
* D Disable leveling before starting
* F Filament diameter
* H Hotend Temperature
* K Keep heaters on when completed
* L Layer Height
* O Ooze extrusion length
* P Prime length
* Q Retraction multiplier
* R Repetitions (number of grid points)
* S Nozzle Size (diameter) in mm
* T Tool index to change to, if included
* U Random deviation (50 if no value given)
* X X position
* Y Y position
*/
void GcodeSuite::G26() {
SERIAL_ECHOLNPGM("G26 starting...");
Expand Down
24 changes: 9 additions & 15 deletions Marlin/src/gcode/bedlevel/G35.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,17 @@
#include "../../feature/tramming.h"

/**
* @brief G35: Read bed corners to help adjust bed screws
* G35: Read bed corners to help adjust bed screws
*
* Usage:
* G35 [S<30|31|40|41|50|51>]
* S<screw_thread>
*
* Parameters:
* @param S<screw_thread>
*
* @details
* Screw thread type:
* - 30 : M3 Clockwise
* - 31 : M3 Counter-Clockwise
* - 40 : M4 Clockwise
* - 41 : M4 Counter-Clockwise
* - 50 : M5 Clockwise
* - 51 : M5 Counter-Clockwise
*/
* Screw thread: 30 - Clockwise M3
* 31 - Counter-Clockwise M3
* 40 - Clockwise M4
* 41 - Counter-Clockwise M4
* 50 - Clockwise M5
* 51 - Counter-Clockwise M5
**/
void GcodeSuite::G35() {

DEBUG_SECTION(log_G35, "G35", DEBUGGING(LEVELING));
Expand Down
11 changes: 6 additions & 5 deletions Marlin/src/gcode/bedlevel/G42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
#include "../../feature/bedlevel/bedlevel.h"

/**
* @brief G42: Move X & Y axes to mesh coordinates (I & J)
* G42: Move X & Y axes to mesh coordinates (I & J)
*
* Usage:
* G42 [F<rate>] [I<pos>] [J<pos>] [P<bool>]
*
* Parameters:
* @param F : Feedrate in mm/min
* @param I : X axis point
* @param J : Y axis point
* @param P : Add Probe offset
* F<feedrate> : Feedrate in mm/min
* I<index> : X axis point index
* J<index> : Y axis point index
* P<bool> : Flag to put the prove at the given point
*/
void GcodeSuite::G42() {
if (MOTION_CONDITIONS) {
Expand Down
22 changes: 10 additions & 12 deletions Marlin/src/gcode/bedlevel/M420.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,23 @@
//#define M420_C_USE_MEAN

/**
* @brief M420: Enable/Disable Bed Leveling and/or set the Z fade height
* M420: Enable/Disable Bed Leveling and/or set the Z fade height.
*
* Usage:
* M420 [C<bool>] [L<int>] [S<bool>] [T<0|1|2|4>] [V<bool>] [Z<linear>]
*
* Parameters:
* @param S : Turns leveling on or off
* @param Z : Sets the Z fade height (0 or none to disable)
* @param V : Verbose - Print the leveling grid
* S[bool] Turns leveling on or off
* Z[height] Sets the Z fade height (0 or none to disable)
* V[bool] Verbose - Print the leveling grid
*
* With AUTO_BED_LEVELING_UBL only:
* @param L : Load UBL mesh from index (0 is default)
* @param T : 0:Human-readable 1:CSV 2:LCD 4:Compact
*
* L[index] Load UBL mesh from index (0 is default)
* T[map] 0:Human-readable 1:CSV 2:"LCD" 4:Compact
*
* With mesh-based leveling only:
* @param C : Center mesh on the mean of the lowest and highest
*
* C Center mesh on the mean of the lowest and highest
*
* With MARLIN_DEV_MODE:
* @param S2 : Create a simple random mesh and enable
* S2 Create a simple random mesh and enable
*/
void GcodeSuite::M420() {
const bool seen_S = parser.seen('S'),
Expand Down

0 comments on commit 5efa744

Please sign in to comment.