Prusa MINI Firmware overview
|
#include "planner.h"
#include "stepper.h"
#include "motion.h"
#include "temperature.h"
#include "../lcd/ultralcd.h"
#include "../core/language.h"
#include "../gcode/parser.h"
#include "../Marlin.h"
#include "../feature/bedlevel/bedlevel.h"
#include "../feature/spindle_laser.h"
Macros | |
#define | BLOCK_DELAY_FOR_1ST_MOVE 100 |
#define | MINIMAL_STEP_RATE 120 |
#define | LIMIT_ACCEL_LONG(AXIS, INDX) |
#define | LIMIT_ACCEL_FLOAT(AXIS, INDX) |
#define | ACCEL_IDX 0 |
#define | CACHED_SQRT(N, V) const float N = SQRT(V) |
#define | AXIS_CONDITION true |
Functions | |
void | limit_and_warn (float &val, const uint8_t axis, PGM_P const setting_name, const xyze_float_t &max_limit) |
Variables | |
Planner | planner |
constexpr xy_pos_t | level_fulcrum |
#define BLOCK_DELAY_FOR_1ST_MOVE 100 |
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.cpp
Buffer movement commands and manage the acceleration profile plan
Derived from Grbl Copyright (c) 2009-2011 Simen Svale Skogsrud
The ring buffer implementation gleaned from the wiring_serial library by David A. Mellis.
Reasoning behind the mathematics in this module (in the key of 'Mathematica'):
s == speed, a == acceleration, t == time, d == distance
Basic definitions: Speed[s_, a_, t_] := s + (a*t) Travel[s_, a_, t_] := Integrate[Speed[s, a, t], t]
Distance to reach a specific speed with a constant acceleration: Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, d, t] d -> (m^2 - s^2)/(2 a) --> estimate_acceleration_distance()
Speed after a given distance of travel with constant acceleration: Solve[{Speed[s, a, t] == m, Travel[s, a, t] == d}, m, t] m -> Sqrt[2 a d + s^2]
DestinationSpeed[s_, a_, d_] := Sqrt[2 a d + s^2]
When to start braking (di) to reach a specified destination speed (s2) after accelerating from initial speed s1 without ever stopping at a plateau: Solve[{DestinationSpeed[s1, a, di] == DestinationSpeed[s2, a, d - di]}, di] di -> (2 a d - s1^2 + s2^2)/(4 a) --> intersection_distance()
IntersectionDistance[s1_, s2_, a_, d_] := (2 a d - s1^2 + s2^2)/(4 a)
The fast inverse function needed for Bézier interpolation for AVR was designed, written and tested by Eduardo José Tagle on April/2018
#define MINIMAL_STEP_RATE 120 |
#define LIMIT_ACCEL_LONG | ( | AXIS, | |
INDX | |||
) |
#define LIMIT_ACCEL_FLOAT | ( | AXIS, | |
INDX | |||
) |
#define ACCEL_IDX 0 |
#define AXIS_CONDITION true |
void limit_and_warn | ( | float & | val, |
const uint8_t | axis, | ||
PGM_P const | setting_name, | ||
const xyze_float_t & | max_limit | ||
) |
Planner planner |
|
constexpr |