mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 07:17:59 +00:00
🎨 Misc. fixes and formatting
This commit is contained in:
parent
7b8a2180ff
commit
179260878f
@ -356,9 +356,7 @@ void startOrResumeJob() {
|
|||||||
TERN_(GCODE_REPEAT_MARKERS, repeat.reset());
|
TERN_(GCODE_REPEAT_MARKERS, repeat.reset());
|
||||||
TERN_(CANCEL_OBJECTS, cancelable.reset());
|
TERN_(CANCEL_OBJECTS, cancelable.reset());
|
||||||
TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator = 0);
|
TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator = 0);
|
||||||
#if ENABLED(SET_REMAINING_TIME)
|
TERN_(SET_REMAINING_TIME, ui.reset_remaining_time());
|
||||||
ui.reset_remaining_time();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
print_job_timer.start();
|
print_job_timer.start();
|
||||||
}
|
}
|
||||||
|
@ -375,6 +375,8 @@
|
|||||||
extern "C++" {
|
extern "C++" {
|
||||||
|
|
||||||
// C++11 solution that is standards compliant. Return type is deduced automatically
|
// C++11 solution that is standards compliant. Return type is deduced automatically
|
||||||
|
template <class N> static constexpr N _MIN(const N val) { return val; }
|
||||||
|
template <class N> static constexpr N _MAX(const N val) { return val; }
|
||||||
template <class L, class R> static constexpr auto _MIN(const L lhs, const R rhs) -> decltype(lhs + rhs) {
|
template <class L, class R> static constexpr auto _MIN(const L lhs, const R rhs) -> decltype(lhs + rhs) {
|
||||||
return lhs < rhs ? lhs : rhs;
|
return lhs < rhs ? lhs : rhs;
|
||||||
}
|
}
|
||||||
|
@ -242,11 +242,14 @@ void serialprint_truefalse(const bool tf);
|
|||||||
void serial_offset(const_float_t v, const uint8_t sp=0); // For v==0 draw space (sp==1) or plus (sp==2)
|
void serial_offset(const_float_t v, const uint8_t sp=0); // For v==0 draw space (sp==1) or plus (sp==2)
|
||||||
|
|
||||||
void print_bin(const uint16_t val);
|
void print_bin(const uint16_t val);
|
||||||
|
|
||||||
void print_pos(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
|
void print_pos(NUM_AXIS_ARGS_(const_float_t) FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
|
||||||
|
|
||||||
inline void print_pos(const xyze_pos_t &xyze, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
|
#if LOGICAL_AXES > 1
|
||||||
|
inline void print_pos(const xyze_pos_t &xyze, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
|
||||||
print_pos(NUM_AXIS_ELEM_(xyze) prefix, suffix);
|
print_pos(NUM_AXIS_ELEM_(xyze) prefix, suffix);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, F(" " STRINGIFY(VAR) "="), F(" : " SUFFIX "\n")); }while(0)
|
#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, F(" " STRINGIFY(VAR) "="), F(" : " SUFFIX "\n")); }while(0)
|
||||||
#define SERIAL_XYZ(PREFIX,V...) do { print_pos(V, F(PREFIX)); }while(0)
|
#define SERIAL_XYZ(PREFIX,V...) do { print_pos(V, F(PREFIX)); }while(0)
|
||||||
|
@ -352,7 +352,9 @@ void GcodeSuite::G28() {
|
|||||||
|
|
||||||
endstops.enable(true); // Enable endstops for next homing move
|
endstops.enable(true); // Enable endstops for next homing move
|
||||||
|
|
||||||
|
#if HAS_Z_AXIS
|
||||||
bool finalRaiseZ = false;
|
bool finalRaiseZ = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
|
|
||||||
@ -622,10 +624,12 @@ void GcodeSuite::G28() {
|
|||||||
// Move to a height where we can use the full xy-area
|
// Move to a height where we can use the full xy-area
|
||||||
TERN_(DELTA_HOME_TO_SAFE_ZONE, do_blocking_move_to_z(delta_clip_start_height));
|
TERN_(DELTA_HOME_TO_SAFE_ZONE, do_blocking_move_to_z(delta_clip_start_height));
|
||||||
|
|
||||||
|
#if HAS_Z_AXIS
|
||||||
// Move to the configured Z only if Z was homed to MIN, because machines that
|
// Move to the configured Z only if Z was homed to MIN, because machines that
|
||||||
// home to MAX historically expect 'G28 Z' to be safe to use at the end of a
|
// home to MAX historically expect 'G28 Z' to be safe to use at the end of a
|
||||||
// print, and do_move_after_z_homing is not very nuanced.
|
// print, and do_move_after_z_homing is not very nuanced.
|
||||||
if (finalRaiseZ) do_move_after_z_homing();
|
if (finalRaiseZ) do_move_after_z_homing();
|
||||||
|
#endif
|
||||||
|
|
||||||
TERN_(CAN_SET_LEVELING_AFTER_G28, if (leveling_restore_state) set_bed_leveling_enabled());
|
TERN_(CAN_SET_LEVELING_AFTER_G28, if (leveling_restore_state) set_bed_leveling_enabled());
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
//
|
//
|
||||||
// Servos
|
// Servos
|
||||||
//
|
//
|
||||||
#define SERVO1_PIN 12 // Digital 12 / Pin 25
|
#define SERVO1_PIN 12
|
||||||
|
|
||||||
//
|
//
|
||||||
// Omitted RAMPS pins
|
// Omitted RAMPS pins
|
||||||
|
@ -320,14 +320,16 @@
|
|||||||
//
|
//
|
||||||
// TMC software SPI
|
// TMC software SPI
|
||||||
//
|
//
|
||||||
#ifndef TMC_SPI_MOSI
|
#if HAS_TMC_SPI
|
||||||
|
#ifndef TMC_SPI_MOSI
|
||||||
#define TMC_SPI_MOSI 66
|
#define TMC_SPI_MOSI 66
|
||||||
#endif
|
#endif
|
||||||
#ifndef TMC_SPI_MISO
|
#ifndef TMC_SPI_MISO
|
||||||
#define TMC_SPI_MISO 44
|
#define TMC_SPI_MISO 44
|
||||||
#endif
|
#endif
|
||||||
#ifndef TMC_SPI_SCK
|
#ifndef TMC_SPI_SCK
|
||||||
#define TMC_SPI_SCK 64
|
#define TMC_SPI_SCK 64
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TMC_UART
|
#if HAS_TMC_UART
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
#define CASE_LIGHT_PIN 65
|
#define CASE_LIGHT_PIN 65
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SERVO1_PIN 12
|
||||||
|
|
||||||
#include "pins_RAMPS.h"
|
#include "pins_RAMPS.h"
|
||||||
|
|
||||||
#ifndef BEEPER_PIN
|
#ifndef BEEPER_PIN
|
||||||
|
Loading…
Reference in New Issue
Block a user