📝 Document planner modifier methods

This commit is contained in:
Scott Lahteine 2025-03-12 17:28:22 -05:00
parent d74ee8ccc4
commit 01990f2bf4
3 changed files with 19 additions and 5 deletions

View file

@ -64,7 +64,7 @@ class TWIBus {
private: private:
/** /**
* @brief Number of bytes on buffer * @brief Number of bytes on buffer
* @description Number of bytes in the buffer waiting to be flushed to the bus * @details Number of bytes in the buffer waiting to be flushed to the bus
*/ */
uint8_t buffer_s = 0; uint8_t buffer_s = 0;
@ -77,7 +77,7 @@ class TWIBus {
public: public:
/** /**
* @brief Target device address * @brief Target device address
* @description The target device address. Persists until changed. * @details The target device address. Persists until changed.
*/ */
uint8_t addr = 0; uint8_t addr = 0;

View file

@ -96,7 +96,7 @@ void probe_offset_wizard_menu() {
/** /**
* @fn prepare_for_probe_offset_wizard * @fn prepare_for_probe_offset_wizard
* @brief Prepare the Probe Offset Wizard to do user interaction. * @brief Prepare the Probe Offset Wizard to do user interaction.
* @description * @details
* 1. Probe a defined point (or the center) for an initial Probe Reference Z (relative to the homed Z0). * 1. Probe a defined point (or the center) for an initial Probe Reference Z (relative to the homed Z0).
* (When homing with the probe, this Z0 is suspect until 'M851 Z' is properly tuned. * (When homing with the probe, this Z0 is suspect until 'M851 Z' is properly tuned.
* When homing with a Z endstop Z0 is suspect until M206 is properly tuned.) * When homing with a Z endstop Z0 is suspect until M206 is properly tuned.)

View file

@ -782,13 +782,27 @@ class Planner {
#endif #endif
#if HAS_POSITION_MODIFIERS #if HAS_POSITION_MODIFIERS
FORCE_INLINE static void apply_modifiers(xyze_pos_t &pos, bool leveling=ENABLED(PLANNER_LEVELING)) { /**
* @brief Apply Skew, Leveling, and Retraction modifiers to the given cartesian position.
* @details By default leveling is only applied if the planner is the leveling handler (i.e., PLANNER_LEVELING).
*
* @param pos The position to modify
* @param leveling Optional bool whether to include the leveling modifier
*/
FORCE_INLINE static void apply_modifiers(xyze_pos_t &pos, const bool leveling=ENABLED(PLANNER_LEVELING)) {
TERN_(SKEW_CORRECTION, skew(pos)); TERN_(SKEW_CORRECTION, skew(pos));
if (leveling) apply_leveling(pos); if (leveling) apply_leveling(pos);
TERN_(FWRETRACT, apply_retract(pos)); TERN_(FWRETRACT, apply_retract(pos));
} }
FORCE_INLINE static void unapply_modifiers(xyze_pos_t &pos, bool leveling=ENABLED(PLANNER_LEVELING)) { /**
* @brief Un-apply Skew, Leveling, and Retraction modifiers to the given cartesian position.
* @details By default leveling is only un-applied if the planner is the leveling handler (i.e., PLANNER_LEVELING).
*
* @param pos The position to un-modify
* @param leveling Optional bool whether to include the leveling modifier
*/
FORCE_INLINE static void unapply_modifiers(xyze_pos_t &pos, const bool leveling=ENABLED(PLANNER_LEVELING)) {
TERN_(FWRETRACT, unapply_retract(pos)); TERN_(FWRETRACT, unapply_retract(pos));
if (leveling) unapply_leveling(pos); if (leveling) unapply_leveling(pos);
TERN_(SKEW_CORRECTION, unskew(pos)); TERN_(SKEW_CORRECTION, unskew(pos));