Markus Hitter
5f9ae5b087
Implement M82/M83 and handle relative movements entirely different.
...
Instead of converting them to absolute first, then back to
relative and having all the fuzz with working on the queue's
start vs. working at the queue's end, mark a movement as relative
and use this directly.
2012-05-11 13:50:33 +02:00
Markus Hitter
6864268df8
gcode_process.c: add notes about M82 and M83.
2012-03-03 16:58:41 +01:00
Markus Hitter
4e5f51f01e
Store distances in the TARGET strucure in micrometers for all axes.
...
This extends the previous commit from X to Y, Z and E.
2011-11-17 13:48:36 +01:00
Markus Hitter
c96ea0c773
Store distances in the TARGET structure always in micrometers.
...
This is a intrusive patch and for now, it's done for the X axis only.
To make comparison with the former approach easier ...
The advantages of this change:
- Converting from mm to steps in gcode_parse.c and back in dda.c
wastes cycles and accuracy.
- In dda.c, UM_PER_STEP simply goes away, so distance calculations
work now with STEPS_PER_MM > 500 just fine. 1/16 microstepping
on threaded rods (Z axis) becomes possible.
- Distance calculations (feedrate, acceleration, ...) become much
simpler.
- A wide range of STEPS_PER_M can now be handled at reasonable
(4 decimal digit) accuracy with a simple macro. Formerly,
we were limited to 500 steps/mm, now we can do 4'096 steps/mm
and could easily raise this another digit.
Disadvantages:
- STEPS_PER_MM is gone in config.h, using STEPS_PER_M is required,
because the preprocessor refuses to compare numbers with decimal
points in them.
- The DDA has to store the position in steps anyways to avoid
rounding errors.
2011-11-17 13:48:26 +01:00
Markus Hitter
2f04a9e58c
Update current_position only as needed.
...
This saves almost 200 bytes and 100 runs of
update_current_position() per second.
2011-10-23 19:51:54 +02:00
Markus Hitter
3b4953a631
Remove a bunch of duplicate x_enable() etc..
2011-10-05 14:13:22 +02:00
Markus Hitter
b45969e57a
Introduce stepper_enable() and stepper_disable().
...
This allows to heat up with disables steppers, even if all steppers
share a common enable pin.
2011-10-05 14:13:21 +02:00
Markus Hitter
a6c22eed09
gcode_process.c: turn heaters off for M0/M2
...
This ensures heaters don't spring back to life in case power
is turned back on for something else.
2011-09-01 18:25:04 +02:00
Markus Hitter
24ba72e5d2
gcode_process.c: fix comment typos.
2011-08-22 18:20:08 +02:00
Markus Hitter
a241ef2fa3
gcode_process.c: get rid of duplicate comments and those ===='s
...
These ==== are nasty if you grep a directory for patch conflicts.
2011-08-22 18:15:02 +02:00
Markus Hitter
dcc2255526
gcode_process.c: implement proper M2, comment on M0.
2011-08-22 18:15:00 +02:00
Markus Hitter
ffdfde8d8d
gcode_process.c: re-add comment about G28, remove now obsolete functions.
2011-08-16 15:31:09 +02:00
Michael Moon
8483073380
revert G28 to homing, as no-one uses it properly anyway
2011-07-16 21:01:31 +10:00
Michael Moon
131d7390c0
fix move to zero in next move after homing command, add M84 disable motors
2011-06-26 17:41:33 +10:00
Michael Moon
9bd8a048ea
new option: enforce_order. causes M105 and friends to wait for queue to empty before reporting
2011-06-18 22:47:53 +10:00
Jens Ch. Restemeier
b39a7b8d84
fixed documentation errors
2011-06-03 02:02:47 +10:00
Jens Ch. Restemeier
14afa84aca
Added gcode documentation and extraction tool
2011-06-03 02:02:46 +10:00
Jim McGee
85a9f63dfb
Pretest DEBUG_X constants for non-zero and && the test with all existing
...
& tests of the debug_flags. Currently the compiler is able to eliminate
the block and the & operation when the constant is zero, but since
the debug_flags variable is a volatile the compiler does not eliminate
the load of the variable. By pretesting and shortcutting the load is
eliminated. Saves a small number of bytes when the debug build is
disabled and costs nothing when it is enabled.
2011-05-15 09:56:33 +10:00
Jim McGee
f22e691fee
Convert the clock_flag variable into 3 separate varables.
...
This costs 2 bytes of ram, but saves 60 bytes of flash. Doing so
also eliminates the need to disable interrupts while clearing flags
in the ifclock macro.
Conflicts:
clock.c
timer.c
timer.h
2011-05-15 09:56:32 +10:00
Michael Moon
3e32a8f634
allow M114 to report negative positions correctly
2011-05-01 17:17:56 +10:00
Michael Moon
e2cb6aef72
M109 just waits if no temperature provided
2011-04-29 10:15:49 +10:00
Michael Moon
e108ab2548
M114 returns millimeters instead of steps
2011-04-26 14:44:17 +10:00
Markus Amsler
8856dd9908
Only print queue on every G command if DEBUG_POSITION is set.
2011-04-12 01:37:11 +02:00
Markus Amsler
4b7f8fba48
Fix absolute E positioning.
...
Now also works with M101/M103
2011-04-12 01:36:57 +02:00
Michael Moon
ae33cb7fa2
start implementing absolute E support
2011-04-09 09:16:05 +10:00
Markus Amsler
ad7f7f0e96
Don't set all axis to home on G92 E0
2011-04-07 03:15:47 +02:00
Michael Moon
95e7cda9db
avoid warning: 'SpecialMoveE' defined but not used
2011-04-04 09:16:52 +10:00
Markus Amsler
5656c5050c
Implement M116 - Wait
2011-04-04 09:12:53 +10:00
Michael Moon
0dc7d77885
Massive Doxygen documentation addition
...
'make doc' then point your browser at doc/html/
Needs plenty of cleanup and polishing, but the main bulk is here
even documents your configuration! ;)
2011-03-22 01:34:36 +11:00
Markus Hitter
fe0dc5408b
gcode_process.c, G92: also reset next_target.
...
This costs a whopping 88 bytes.
2011-03-06 23:30:29 +01:00
Markus Hitter
ab80852aec
With G28 "go home" there's also no point to move E.
...
Saves another 96 bytes binary size.
2011-03-06 23:29:46 +01:00
Markus Hitter
d37fee8e82
gcode_process.c: there's no point in setting E on a G92 ...
...
... as E is always relative. Saves 90 bytes binary size.
2011-03-06 23:29:08 +01:00
Michael Moon
718ace8f05
prevent arithmetic overflow for large max feedrates
2011-03-06 09:16:05 +11:00
Ben Jackson
03acd85272
gcode_process.c: When reaching MIN/MAX properly scale clamp value to steps.
2011-03-04 19:42:00 +11:00
Markus Hitter
5c0dde4e14
Changed M110 to match the description in the RepRap Wiki.
2011-03-03 09:40:55 +01:00
Markus Hitter
5c31bc01c1
gcode_process.c: make special moves non-public.
...
This adds some 30 bytes program size for whatever reason.
2011-02-27 11:55:01 +01:00
Stephan Walter
8acb072e0b
Actually set extruder enable pin if defined
2011-02-27 00:55:14 +11:00
Michael Moon
d705f46899
more cleanup after name change
2011-02-24 23:48:15 +11:00
Michael Moon
31634c6a8f
Add M136 (DEBUG) to read back PID values, add heater_print function
2011-02-20 17:30:07 +11:00
Michael Moon
9dc4d54133
fix compile error around new homing logic
2011-02-20 16:35:22 +11:00
Michael Moon
c6122eda74
add G161/G162 commands, upgrade home.c to provide negative/positive homing calls for G161/G162
2011-02-20 14:10:53 +11:00
Michael Moon
18d47056f5
print queue with every G command if debug is enabled
2011-02-20 11:37:13 +11:00
Michael Moon
664337fa25
use proper feedrate for Y
2011-02-15 13:21:45 +11:00
Michael Moon
6c1040c740
typo
2011-02-12 22:20:33 +11:00
Michael Moon
71eafbf96b
keep power on when heaters are active
...
Reported-by: Jacky2K@forums.reprap.org
2011-02-09 08:16:15 +11:00
Markus Amsler
7f32aa80bb
G28: home all axis if no axis is selected
2011-02-09 07:47:55 +11:00
Jacky2k
aec41c59aa
gcode_process and pinio need to include config.h
...
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
2011-02-09 07:46:04 +11:00
Michael Moon
5118f788d2
preliminary support for soft-limits
2011-02-08 17:52:10 +11:00
Michael Moon
e4fc55289b
use constants for conditional compilation since preprocessor can't work out enums and we can't define in macros
2011-02-06 21:34:44 +11:00
Michael Moon
d1b2754aba
sorting out preprocessor interactions
2011-02-06 21:11:39 +11:00