UltraLCD enhancements (lower fan resolution, backlash menu) (#13519)
This commit is contained in:
committed by
Scott Lahteine
parent
de0f35f2d9
commit
5679fae11e
@ -56,7 +56,8 @@
|
||||
#define HAS_Y_CENTER BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK)
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
extern float backlash_distance_mm[], backlash_correction, backlash_smoothing_mm;
|
||||
extern float backlash_distance_mm[], backlash_smoothing_mm;
|
||||
extern uint8_t backlash_correction;
|
||||
#endif
|
||||
|
||||
enum side_t : uint8_t { TOP, RIGHT, FRONT, LEFT, BACK, NUM_SIDES };
|
||||
@ -446,7 +447,7 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) {
|
||||
|
||||
{
|
||||
// New scope for TEMPORARY_BACKLASH_CORRECTION
|
||||
TEMPORARY_BACKLASH_CORRECTION(0.0f);
|
||||
TEMPORARY_BACKLASH_CORRECTION(all_off);
|
||||
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
|
||||
|
||||
probe_sides(m, uncertainty);
|
||||
@ -478,7 +479,7 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) {
|
||||
|
||||
{
|
||||
// New scope for TEMPORARY_BACKLASH_CORRECTION
|
||||
TEMPORARY_BACKLASH_CORRECTION(1.0f);
|
||||
TEMPORARY_BACKLASH_CORRECTION(all_on);
|
||||
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
|
||||
move_to(
|
||||
X_AXIS, current_position[X_AXIS] + 3,
|
||||
@ -513,7 +514,7 @@ inline void update_measurements(measurements_t &m, const AxisEnum axis) {
|
||||
* - Call calibrate_backlash() beforehand for best accuracy
|
||||
*/
|
||||
inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const uint8_t extruder) {
|
||||
TEMPORARY_BACKLASH_CORRECTION(1.0f);
|
||||
TEMPORARY_BACKLASH_CORRECTION(all_on);
|
||||
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
|
||||
|
||||
#if HOTENDS > 1
|
||||
@ -556,7 +557,7 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const
|
||||
* uncertainty in - How far away from the object to begin probing
|
||||
*/
|
||||
inline void calibrate_all_toolheads(measurements_t &m, const float uncertainty) {
|
||||
TEMPORARY_BACKLASH_CORRECTION(1.0f);
|
||||
TEMPORARY_BACKLASH_CORRECTION(all_on);
|
||||
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
|
||||
|
||||
HOTEND_LOOP() calibrate_toolhead(m, uncertainty, e);
|
||||
@ -588,7 +589,7 @@ inline void calibrate_all() {
|
||||
reset_hotend_offsets();
|
||||
#endif
|
||||
|
||||
TEMPORARY_BACKLASH_CORRECTION(1.0f);
|
||||
TEMPORARY_BACKLASH_CORRECTION(all_on);
|
||||
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
|
||||
|
||||
// Do a fast and rough calibration of the toolheads
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
#include "../../module/planner.h"
|
||||
|
||||
float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM,
|
||||
backlash_correction = BACKLASH_CORRECTION;
|
||||
float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM;
|
||||
uint8_t backlash_correction = BACKLASH_CORRECTION * all_on;
|
||||
|
||||
#ifdef BACKLASH_SMOOTHING_MM
|
||||
float backlash_smoothing_mm = BACKLASH_SMOOTHING_MM;
|
||||
@ -74,7 +74,7 @@ void GcodeSuite::M425() {
|
||||
|
||||
if (parser.seen('F')) {
|
||||
planner.synchronize();
|
||||
backlash_correction = MAX(0, MIN(1.0, parser.value_linear_units()));
|
||||
backlash_correction = MAX(0, MIN(1.0, parser.value_float())) * all_on;
|
||||
noArgs = false;
|
||||
}
|
||||
|
||||
@ -90,8 +90,7 @@ void GcodeSuite::M425() {
|
||||
SERIAL_ECHOPGM("Backlash correction is ");
|
||||
if (!backlash_correction) SERIAL_ECHOPGM("in");
|
||||
SERIAL_ECHOLNPGM("active:");
|
||||
SERIAL_ECHOPAIR(" Correction Amount/Fade-out: F", backlash_correction);
|
||||
SERIAL_ECHOLNPGM(" (F1.0 = full, F0.0 = none)");
|
||||
SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", float(ui8_to_percent(backlash_correction)) / 100, " (F1.0 = full, F0.0 = none)");
|
||||
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
|
||||
LOOP_XYZ(a) {
|
||||
SERIAL_CHAR(' ');
|
||||
|
Reference in New Issue
Block a user