Commit Graph

68 Commits

Author SHA1 Message Date
Scott Lahteine
7d72ed688c Revert motor_current_setting to constexpr
We should use `constexpr` wherever it makes sense, for its added benefits. See http://stackoverflow.com/questions/13346879/const-vs-constexpr-on-variables
2016-09-22 15:26:18 -05:00
Scott Lahteine
5efb12e889 Simpler report_current_position for SCARA 2016-09-20 18:31:36 -05:00
Scott Lahteine
5cbed13f41 'constexpr' => 'const' for PWM_MOTOR_CURRENT 2016-09-20 15:57:48 -05:00
esenapaj
954563d603 Adjust spacing 2016-09-20 19:35:44 +09:00
esenapaj
7e9576dc5b Extend the e_steps[] from int to long for allowing more than 32,767 E steps
Probably needed for long straight lines when using high microstepping
2016-09-20 19:35:44 +09:00
Scott Lahteine
8ff338c2b9 Patch stepper.h for SCARA 2016-09-13 03:32:59 -05:00
Scott Lahteine
9bf78ef465 Fix capitalization of counter_m 2016-09-02 11:31:45 -05:00
Scott Lahteine
08f717e5f7 Use bit-size typedefs for some stepper vars 2016-08-30 14:19:49 -05:00
Scott Lahteine
2f223b8c79 Use ABC and XYZ for "3" 2016-08-21 00:10:08 -05:00
Scott Lahteine
b73203a0b7 Move some includes around to uncover missing deps 2016-08-02 19:37:46 -07:00
Scott Lahteine
f8b5749235 Replace division in planner with multiplication 2016-07-24 13:27:49 -07:00
Scott Lahteine
05da02f0a2 Implement MIXING_EXTRUDER and SWITCHING_EXTRUDER 2016-07-17 10:53:10 -07:00
Scott Lahteine
117db77c55 make motor_current_setting static and constexpr 2016-06-21 19:50:08 -07:00
Scott Lahteine
8d8180e028 Parse M905 args in Marlin_main.cpp 2016-06-13 19:25:28 -07:00
Scott Lahteine
aad9c0ed8d Apply updated ISR timing code 2016-06-09 21:03:27 -07:00
Scott Lahteine
6d62a4ffc8 Patch LIN_ADVANCE for style and forward-compatibility 2016-06-09 21:03:27 -07:00
Sebastianv650
fb8e880734 Add LIN_ADVANCE 2016-06-09 21:03:27 -07:00
Scott Lahteine
72c6f2923f axis_steps_per_unit => axis_steps_per_mm 2016-06-09 17:04:51 -07:00
Scott Lahteine
e2a8961635 Use e_steps[EXTRUDERS] instead of e_steps[4] 2016-06-05 01:44:53 -07:00
Scott Lahteine
81384dfd36 Apply static to remaining stepper methods 2016-06-02 18:00:31 -07:00
Scott Lahteine
663d2463dc Merge pull request #3922 from thinkyhead/rc_statics_stepper
Apply static to Stepper class
2016-06-02 17:14:24 -07:00
Scott Lahteine
668d50f68e Keep Stepper encapsulation, use static data and methods 2016-05-30 16:24:04 -07:00
Scott Lahteine
ecfdcf7250 Tiny calc_timer speedup 2016-05-30 16:17:02 -07:00
Scott Lahteine
dc22097b3a Fix some of array initializations
- In `stepper.h` init `count_direction` array
- In `ultralcd.cpp` init `autotune_temp` array
2016-05-29 20:55:13 -07:00
Scott Lahteine
6398d497b3 Ultimate followup to Stepper/Planner patch
- Search all symbols and apply prefixes where needed
- Encapsulate some private methods
- Inline some setters
- Make `microstep_mode` a public method
2016-05-03 17:07:37 -07:00
esenapaj
605808fe37 Additional follow-up the PR #3631(Encapsulate S...
Additional follow-up the PR #3631(Encapsulate Stepper, Planner, Endstops in singleton classes)

・Change from abort_on_endstop_hit to stepper.abort_on_endstop_hit in endstop.cpp, Marlin_main.cpp, and ultralcd.cpp
・Add include path to cardreader.h and temperature.h in endstop.cpp(for CardReader class and disable_all_heaters())
It fix compilation error when ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED and SDSUPPORT are enabled.

・Change from digipot_current() to stepper.digipot_current() in Marlin_main.cpp
・Change from digitalPotWrite() to stepper.digitalPotWrite() in Marlin_main.cpp
It fix compilation errors when HAS_DIGIPOTSS is enabled.

・Change from microstep_mode() to stepper.microstep_mode() in Marlin_main.cpp
・Change attribute of microstep_mode() from private to public in stepper.h
・Change from microstep_readings() to stepper.microstep_readings() in Marlin_main.cpp
・Change from microstep_ms() to stepper.microstep_ms() in Marlin_main.
It fix compilation errors when HAS_MICROSTEPS is enabled.
2016-05-03 18:28:37 +09:00
Scott Lahteine
96f51f400f Planner singleton class 2016-04-30 17:26:50 -07:00
Scott Lahteine
5e4e535ce8 Stepper and Endstops as singleton objects 2016-04-30 17:26:50 -07:00
Scott Lahteine
e087a99a10 Some cleanup of st_get_pos functions 2016-04-11 15:13:42 -07:00
Scott Lahteine
0da744b7b0 Further cleanup of comments, partial Doxygen-style
Following up on #3231
2016-03-25 00:45:56 -07:00
jbrazio
5e5d250832 Added gplv3 header to all Marlin files 2016-03-24 18:01:20 +00:00
Scott Lahteine
af32a7d5d6 M120/M121 also set endstops non-homing state 2016-03-24 03:24:23 -07:00
Scott Lahteine
5d0570cea0 Make digitalPotWrite depend on HAS_DIGIPOTSS 2016-03-19 19:24:26 -07:00
Scott Lahteine
89838cdb10 Move step macros to stepper_indirection.h 2016-03-10 04:34:55 -08:00
Scott Lahteine
1002eb67c8 Update name of st_get_axis_position_mm in stepper.h 2016-03-06 15:46:39 -08:00
Scott Lahteine
0c7f7ebcfb Styling adjustments (PR#2668 & PR#2670)
Keep "astyled" reformatting
2015-10-03 22:02:45 -05:00
Scott Lahteine
c35fb88094 Overridable Options - Part 8 (PR#2560)
Apply `ENABLED` / `DISABLED` macros to stepper-related files.
2015-07-31 01:05:22 -05:00
Scott Lahteine
ab6f1fdf8b Move & document ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED (PR#2528)
As suggested in #2521
- Move `ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED` because `SDSUPPORT` is
also required.
- Add a note that endstops must be enabled for the feature to have any
effect
2015-07-26 20:36:37 -05:00
Scott Lahteine
87a872e103 Use st_get_position_mm where possible (PR#2411) 2015-07-12 22:15:54 -05:00
Scott Lahteine
c54a2ea042 Adjust spacing in Marlin_main.cpp and stepper.* 2015-05-17 01:47:02 -07:00
alexborro
0ce3576685 New Feature: Z_DUAL_ENDSTOPS
Z_DUAL_ENDSTOPS is a feature to enable the use of 2 endstops for both Z
steppers - Let's call them Z stepper and Z2 stepper.
That way the machine is capable to align the bed during home, since both
Z steppers are homed.
There is also an implementation of M666 (software endstops adjustment)
to this feature.
After Z homing, this adjustment is applied to just one of the steppers
in order to align the bed.
One just need to home the Z axis and measure the distance difference
between both Z axis and apply the math: Z adjust = Z - Z2.
If the Z stepper axis is closer to the bed, the measure Z > Z2 (yes, it
is.. think about it) and the Z adjust would be positive.
Play a little bit with small adjustments (0.5mm) and check the
behaviour.
The M119 (endstops report) will start reporting the Z2 Endstop as well.
2015-03-24 14:06:44 -03:00
Scott Lahteine
c37f7d15c9 - Rename WRITE_E_STEP for consistency
- Add BIT and TEST macros
- Add _APPLY_ macros to stepper.cpp to help with consolidation
- Consolidate code in stepper.cpp using macros
- Apply standards in stepper.cpp
- Use >= 0 instead of > -1 as a better semantic
- Replace DUAL_Y_CARRIAGE with Y_DUAL_STEPPER_DRIVERS
2015-03-14 04:28:22 -07:00
domonoky
5727cb3ed4 Cleanup TMC Stepper a bit. 2015-02-26 12:57:46 +01:00
domonoky
38500165ea First attempt at adding TMC Driver support. May need some cleanup. 2015-02-23 17:45:29 +01:00
domonoky
b55995aae8 Introduce a layer of macro indirection to all stepper pins. This allows other stepper drivers to redefine them, so they can use SPI/I2C instead of direct pin manipulation. 2015-02-23 16:12:35 +01:00
MagoKimbra
986e723eeb Add 4th extruder 2015-01-24 13:37:58 +01:00
Cylindric
d819c55395 Various typo fixes - only in comments, no code changes. 2014-02-25 09:52:58 +00:00
bkubicek
d147a057ac Add the socalled "Babystepping" feature.
It is a realtime control over the head position via the LCD menu system that works _while_ printing.
Using it, one can e.g. tune the z-position in realtime, while printing the first layer.
Also, lost steps can be manually added/removed, but thats not the prime feature.
Stuff is placed into the Tune->Babystep *

It is not possible to have realtime control via gcode sending due to the buffering, so I did not include a gcode yet. However, it could be added, but it movements will not be realtime then.

Historically, a very similar thing was implemented for the "Kaamermaker" project, while Joris was babysitting his offspring, hence the name.

say goodby to fuddling around with the z-axis.
2013-10-06 21:14:51 +02:00
Alex Borro
253dfc4bc1 Bed Auto Leveling feature
Check the Readme for instruction how to enable and configure the feature
2013-09-29 13:20:06 -03:00
Robert F-C
9547fb9dfb Add duplication and auto-park mode for dual x-carriage support. 2013-08-08 00:10:26 +10:00