Commit Graph

85 Commits

Author SHA1 Message Date
Yuri D'Elia
aae5cce28f Use the nominal frequency to merge ticks 2019-05-24 17:08:32 +02:00
Yuri D'Elia
c6dbcc494f Typo 2019-05-24 17:08:32 +02:00
Yuri D'Elia
a1be8b6784 Initialize current_adv_steps correctly
Initialize at 0 both on startup and on reset on regular (non-LA)
segments to avoid cumulating errors.
2019-05-24 17:08:32 +02:00
Yuri D'Elia
707849e6c4 Use a define instead of hard-coding a divider 2019-05-24 17:08:32 +02:00
Yuri D'Elia
a2fa8e5313 Rewrite the advance_isr scheduler 2019-05-24 17:08:32 +02:00
Yuri D'Elia
2d3fe3197c Move calc_timer into speed_lookup_table for planner reuse 2019-05-24 17:08:32 +02:00
Yuri D'Elia
520cb491b2 Move speed lookup defs into a separate source 2019-05-24 17:08:32 +02:00
Yuri D'Elia
ebdc5e35e7 Remove two more OCR1A direct manipulations
Use _NEXT_ISR and st_reset_timer to correctly reinitialize and
re-schedule the advance ticks.
2019-05-24 17:08:32 +02:00
Yuri D'Elia
cbf1a85ec3 Switch original LA implementation with LA1.5
This discards several Prusa optimizations for LA1.0.
We'll re-implement those later if needed.

Debugging is turned on.
2019-05-24 17:08:32 +02:00
Yuri D'Elia
bf0c60dd45 Factor-out some repetition into fsensor_step 2019-05-24 17:08:32 +02:00
Ondrej Tuma
b7fe43bf68 Deleted bad cols/rows definitions for translation. 2019-05-07 12:52:23 +02:00
Marek Bel
28f1e309a2 Fix compiler warning: 'old_x_max_endstop' defined but not used
Fix compiler warning: 'old_y_max_endstop' defined but not used
2019-03-05 17:44:47 +01:00
Robert Pelnar
eea755496b Conditional translation for SYSTEM_TIMER_2 because we want to have posibility to switch between old/new implementation.
Timing functions (millis, micros and delay) replaced in whole source, defined in Marlin.h.
This commit enables original implementation (SYSTEM_TIMER_2 undefined)
Verified with passed complete wizard process.
2019-01-27 22:48:51 +01:00
Robert Pelnar
434a723151 Timing functions 'micros' and 'delay' replaced in whole source with 'micros2' and 'delay2' 2019-01-27 17:37:27 +01:00
Robert Pelnar
9f86a334c6 Lang - text "endstops hit: " removed from dictionary 2018-11-22 17:53:51 +01:00
Robert Pelnar
a0e4acead3 lang - removed unused code and some service messages changed to "not translated" 2018-11-01 14:07:16 +01:00
PavelSindler
940f436a5f merge MK3_dev into MK3 2018-10-22 20:25:29 +02:00
Marek Bel
1585dc66b0 Merge remote-tracking branch 'prusa3d/MK3_dev' into simplify_EEPROM_M500
Known limitation: Unable to compile.
2018-10-08 15:58:49 +02:00
Robert Pelnar
c2f535b619 Filament sensor - fix invalid calculation of fsensor_counter in LA stepper.
+decreased additional check sensitivity/sctrictness
2018-09-26 18:59:07 +02:00
Marek Bel
3f28632443 Use cs.axis_steps_per_unit from ConfigurationStore. 2018-09-24 14:54:41 +02:00
PavelSindler
03fffae4c3 finda runout sensor can be turned on/off from menu 2018-08-27 05:20:42 +02:00
Robert Pelnar
c4281b0b36 Status screen redesign - fix of flickering and text wraping on status screen
printf formating, saved flash, reduced code size
2018-08-20 00:27:45 +02:00
Robert Pelnar
71f1a1f6db MMU - communication, check after start, code cleaning 2018-08-07 20:37:59 +02:00
Robert Pelnar
60b4db15e0 FSensor - M600 fix + cond. translation + tunning filter and params 2018-07-22 16:14:13 +02:00
Robert Pelnar
268d2634f0 LCD menu optimalization - lcd and menu
removed unused code and conditional translation
2018-07-16 02:13:52 +02:00
Robert Pelnar
066c044396 fixed tmc2130_wr_CHOPCONF
backlash - initial implementation (disabled by default)
removed menu "W25x20CL init"
splashscreen displayed before entering optiboot
2018-07-11 20:02:46 +02:00
Robert Pelnar
fcfb4cdcae New ML support - menu tunning, startup
+config headers (bool - true/false replaced with 0/1)
+fixed include hierarchy
+removed comments
2018-06-10 16:04:32 +02:00
Robert Pelnar
2cf20c8c99 New ML support - migration - fix_source_1.sh script (replace 'MSG_xx' with '_T(MSG_xx)')
+ output + fixed source
2018-05-23 16:37:08 +02:00
Robert Pelnar
bd587faab9 New ML support - migration - replaced source, removed original ML support files (backup) 2018-05-22 03:20:03 +02:00
MRprusa3d
0b6644915a
Add files via upload 2018-04-25 18:47:19 +00:00
Robert Pelnar
339d2ebdef Z-axis stealth mode
XYZcal fix
2018-04-03 18:26:39 +02:00
Robert Pelnar
baade7db61 Removed unused files (ST7565R-dogm, digipot)
renamed functions digipot_init and digipot_current
fixed cond. trans. (menus)
fixed variant files - MK25, MK3
2018-03-29 23:01:13 +02:00
Robert Pelnar
ac1a56b493 Merge branch 'MK25' into MK3 2018-03-13 20:43:19 +01:00
Robert Pelnar
a6f900fd3c Merge remote-tracking branch 'upstream/MK25' into MK25
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2018-03-06 15:11:50 +01:00
bubnikv
11e7eb27ee Merge remote-tracking branch 'remotes/origin/M221_fix' into MK3_fast_dbg 2018-03-05 19:13:07 +01:00
Robert Pelnar
c5175e97ec Pinout, conditional translation and variant file for MK2 2018-02-21 15:19:34 +01:00
Robert Pelnar
57499dc6a0 M350 for E axis (8, 16, 32, 64, 128 microsteps) 2018-02-15 15:40:49 +01:00
bubnikv
dd2468d306 Avoid the stepper interrupt being missed by extending the tick time
beyond the current time. This is a trick borrwed from upstream Marlin.

In debug mode, watch for the missed stepper interrupt ticks where the interrupts
are missed by more than 20% of the 10kHz stepper interrupt repeat rate,
and show the statistics (number of missed ticks and by how many micro
seconds was the interrupt missed, and what was the maximum missed
interrupt delay) on the display and send it to the serial line.
2018-02-15 11:44:19 +01:00
PavelSindler
0c98ec5f6b selftest, max endstops undefined, initialization of extruder fan, y offset from extruder 2018-02-06 17:01:09 +01:00
bubnikv
9acd41a942 Reworked the stepper routine:
1) The computational load is spread more evenly along the stepper ISR
ticks by moving some of the timer and linear advance calculation from
the block initialization into the 1st tick of the steady phase
of the trapezoid.

2) Reworked planning of the Linear Advance ISR ticks to fit
the time slot allocated for the main stepper ISR tick. This is achieved
by grouping the Linear Advance extruder ticks by a power of two to tick
the Linear Advance interrupts at a maximum 7kHz. Also some
of the extruder ticks are performed just after the XYZ ticks
and if the remaining time slot for the Linear Advance ticks is too short,
all the Linear Advance steps are ticked inside the main stepper ISR invocation.

3) Added some calls to MSerial.checkRx() if the stepper ISR routine
is delayed for too long by the additional LinearAdvance ticks.

This implementation differs significantly from the original implementation
by @Sebastianv650, as this implementation tries to follow the exact
timing of the XYZ axes with the drawback of possibly ticking the extruder
faster than it could handle, while the original implementation
by @Sebastianv650 ticks the extruder slower with the drawback of possibly
spreading the XYZ ticks, thus introducing jerk in the cartesian movement.
2018-02-02 22:55:50 +01:00
bubnikv
160cdccae1 Merge remote-tracking branch 'remotes/origin/MK3_stepper_blocking' into MK3_fast_dbg 2018-01-20 17:31:26 +01:00
bubnikv
815dfcb14b Implemented a stepper timer reset after a long blocking cli()
or DISABLE_STEPPER_DRIVER_INTERRUPT().
If this is not done, the stepper interrupt would likely overflow,
leading to a maximum 32ms delay before the stepper interrupt wakes up.
In addition, the stepper timer overflow error would be reported
by the debug builds.
2018-01-20 15:39:21 +01:00
bubnikv
17a8e2db01 Documented the interrupt blocking by a main thread by its maximum time.
Added a debug output to serial line on stepper timer overflow.
2018-01-20 14:58:30 +01:00
bubnikv
1eac2b4ccb Fixed a regression error from the last commit regarding Z homing.
Removed unused Z_LATE_ENABLE symbol.
2018-01-15 12:00:28 +01:00
bubnikv
7a972fd9b0 Split the stepper ISR routine into multiple inline functions,
added an optimized DDA routine for moves with less than 32767 ticks.
2018-01-14 22:37:07 +01:00
bubnikv
30b06488ca Redefined the DDA step and accumulator values to unions to support
access to the low / high words of the 32bit values.
This is a prerequisity for an optimized 16bit only DDA
in case the number of step is lower than 32767.
2018-01-14 17:01:04 +01:00
bubnikv
a1fd50ea9a Simlified the extruder ticking code. 2018-01-14 14:45:27 +01:00
bubnikv
135dda1bff Slight optimization of the stepper timer routine.
Use WRITE_NC instead of WRITE for writing into the slow ports.
2018-01-12 21:01:01 +01:00
bubnikv
3e6d853364 Debugging of the stepper timer routine. When enabled through
DEBUG_STEPPER_TIMER_MISSED, the printer is halted on stepper timer overflow
and an error message is displayed.
2018-01-12 20:51:14 +01:00
Robert Pelnar
c6e77f55f6 checkrx in stepper returned back
build 143a
2017-12-30 02:55:22 +01:00