Commit Graph

81 Commits

Author SHA1 Message Date
Markus Hitter 5d6de1761b Enable internal pullups for endstops on demand, only.
The binary size impact is moderate, like 18 bytes plus
4 bytes per endstop defined.

The story is a follows:

The endstop logic can be used to use a touch probe with PCB
milling. Connect the (conductive) PCB surface to GND, the
spindle/mill bit to the signal line, turn the internal pullups
on and there you go.

However, doing so with pullups always enabled and while milling
under (conductive) water showed polished mill and drill bits to
become matte after a few hours of usage. Obviously, this small
0.5 mA current from the pullup resistors going through the
rotating mill bit is sufficient to get some spark erosion going.
That's bad, as spark erosion happening also means tools become
dull faster than neccessary.

With this patch, pullups are turned on while being used, only,
so this sparc erosion should go away.
2012-12-03 19:48:13 +01:00
Markus Hitter a054d4c6cd Remove all remaining evidence of M109.
M109 went away a few commits ago in favour of only M116.
2012-10-14 22:57:22 +02:00
Markus Hitter b83027def2 gcode_process.c: fix a comment. 2012-10-14 22:56:26 +02:00
Markus Hitter b4d202367c gcode_process.c: fix URL sent on M115. 2012-10-14 22:56:17 +02:00
Markus Hitter 47337f1213 gcode_process.c: join M250 and a stray message into M114.
Also, F is unsigned.
2012-09-29 23:01:42 +02:00
Markus Hitter d169a1fa3e gcode_process.c: remove M253: read arbitrary memory location, too.
Also pretty esoteric.
2012-09-29 23:01:17 +02:00
Markus Hitter 8e3cf55723 gcode_process.c: remove M254: write arbitrary memory location.
Pretty esoteric and I can't imagine how to make meaningful use
of this. And well, we have to make room for eeconfig commands.
2012-09-29 23:01:02 +02:00
Markus Hitter f06b013179 clock.c: introduce clock().
This simplifies calls to clock_10ms() a bit and saves 18 bytes
binary size.
2012-09-29 23:00:24 +02:00
Markus Hitter c75693af38 gcode_process.c: remove support for M109.
This was deprecated in the wiki quite a while ago. Use M104,
followed by a M116, instead.

This saves a whopping 250 bytes binary size.
2012-09-29 22:59:33 +02:00
Markus Hitter 94ac2b11b8 gcode_process.c: remove M107 (fan off).
To turn the fan off, use M106 S0. This aligns with RepRap's
G-code wiki page.
2012-09-29 22:59:08 +02:00
Markus Hitter 06c546959c gcode_process.c: allow controlled fan speed. 2012-09-29 22:58:39 +02:00
Markus Hitter 37933c8a85 Fix temperature printing.
Remove the assumption there's always an extruder temperature
sensor and make reading on single sensors (e.g. M105 P2) more usable.

Apparently works very well, but *sigh* yet another 100 bytes of binary size.
2012-08-04 22:08:17 +02:00
Markus Hitter 9731868418 gcode_process.c: test seen_P before using P, same for seen_S / S.
There were a whole bunch of cases where P and/or S were used without
checking for the validity of the value. This led to all sorts of
confusion, for obvious reasons.
2012-08-04 22:08:01 +02:00
Markus Hitter 3d1ebf1186 Review power supply timeout.
- Move the variable from dda.c to pinio.c.

- Reset the timeout on each power on, to guarantee a minimum PSU on time.
2012-07-16 20:13:12 +02:00
Markus Hitter 1cb40082e4 gcode_process.c: remove more redundant code.
Saves yet another 122 bytes.
2012-07-16 20:13:01 +02:00
Markus Hitter fb5a32d344 Turn the PSU on before asking the endstops. 2012-05-13 20:18:33 +02:00
Markus Hitter 15476fa655 Fix "E ghost moves". 2012-05-11 13:51:11 +02:00
Markus Hitter 88236ba698 gcode_process.c: also reset E on G92 without arguments. 2012-05-11 13:50:55 +02:00
Markus Hitter 9dda3349be Revert the new relative handling for X, Y and Z.
These were commits 9dbfa7217e0de8b140846ab480d6b4a7fc9b6791 and
2b596cb05e621ed822071486f812eb334328267a.

There are several reasons why this new approach didn't work out well:

- The machine coordinate system is lost on relative movements.
  OK, we could keep tracking it, but this would mean even more
  code, so even more chances for bugs.

- With the lost coordinate system, no software endstops are possible.

- Neither of X, Y, Z will ever overflow.

- If a movement planner would appear one day, he'd have to handle
  relative movements as well. Even more code duplication.
2012-05-11 13:50:47 +02:00
Markus Hitter e5cc5ab066 dda.c: Fix a number of minor things, detected by Phord.
These were mistakes introduced with the last commit.
Thanks, Phord!
2012-05-11 13:50:35 +02:00
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