Prusa MINI Firmware overview
planner.h File Reference
#include "../Marlin.h"
#include "motion.h"
#include "../gcode/queue.h"
#include "../libs/vector_3.h"
#include "../feature/spindle_laser.h"

Go to the source code of this file.

Classes

struct  block_t
 
struct  planner_settings_t
 
struct  skew_factor_t
 
class  Planner
 

Macros

#define HAS_POSITION_FLOAT   ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX)
 
#define BLOCK_MOD(n)   ((n)&(BLOCK_BUFFER_SIZE-1))
 
#define PLANNER_XY_FEEDRATE()   (_MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]))
 

Typedefs

typedef struct block_t block_t
 

Enumerations

enum  BlockFlagBit : char { BLOCK_BIT_RECALCULATE, BLOCK_BIT_NOMINAL_LENGTH, BLOCK_BIT_CONTINUED, BLOCK_BIT_SYNC_POSITION }
 
enum  BlockFlag : char { BLOCK_FLAG_RECALCULATE = _BV(BLOCK_BIT_RECALCULATE), BLOCK_FLAG_NOMINAL_LENGTH = _BV(BLOCK_BIT_NOMINAL_LENGTH), BLOCK_FLAG_CONTINUED = _BV(BLOCK_BIT_CONTINUED), BLOCK_FLAG_SYNC_POSITION = _BV(BLOCK_BIT_SYNC_POSITION) }
 

Variables

Planner planner
 

Macro Definition Documentation

◆ HAS_POSITION_FLOAT

#define HAS_POSITION_FLOAT   ANY(LIN_ADVANCE, SCARA_FEEDRATE_SCALING, GRADIENT_MIX)

◆ BLOCK_MOD

#define BLOCK_MOD (   n)    ((n)&(BLOCK_BUFFER_SIZE-1))

◆ PLANNER_XY_FEEDRATE

#define PLANNER_XY_FEEDRATE ( )    (_MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]))

Typedef Documentation

◆ block_t

typedef struct block_t block_t

struct block_t

A single entry in the planner buffer. Tracks linear movement over multiple axes.

The "nominal" values are as-specified by gcode, and may never actually be reached due to acceleration limits.

Enumeration Type Documentation

◆ BlockFlagBit

enum BlockFlagBit : char

Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]

Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. planner.h

Buffer movement commands and manage the acceleration profile plan

Derived from Grbl Copyright (c) 2009-2011 Simen Svale Skogsrud

Enumerator
BLOCK_BIT_RECALCULATE 
BLOCK_BIT_NOMINAL_LENGTH 
BLOCK_BIT_CONTINUED 
BLOCK_BIT_SYNC_POSITION 
63  : char {
64  // Recalculate trapezoids on entry junction. For optimization.
66 
67  // Nominal speed always reached.
68  // i.e., The segment is long enough, so the nominal speed is reachable if accelerating
69  // from a safe speed (in consideration of jerking from zero speed).
71 
72  // The block is segment 2+ of a longer move
74 
75  // Sync the stepper counts from the block
77 };

◆ BlockFlag

enum BlockFlag : char
Enumerator
BLOCK_FLAG_RECALCULATE 
BLOCK_FLAG_NOMINAL_LENGTH 
BLOCK_FLAG_CONTINUED 
BLOCK_FLAG_SYNC_POSITION 

Variable Documentation

◆ planner

Planner planner
BLOCK_BIT_CONTINUED
Definition: planner.h:73
BLOCK_BIT_RECALCULATE
Definition: planner.h:65
BLOCK_BIT_NOMINAL_LENGTH
Definition: planner.h:70
BLOCK_BIT_SYNC_POSITION
Definition: planner.h:76
BLOCK_FLAG_CONTINUED
Definition: planner.h:82
_BV
#define _BV(bit)
Definition: wiring_constants.h:99
BLOCK_FLAG_SYNC_POSITION
Definition: planner.h:83
BLOCK_FLAG_NOMINAL_LENGTH
Definition: planner.h:81
BLOCK_FLAG_RECALCULATE
Definition: planner.h:80