Commit Graph

438 Commits

Author SHA1 Message Date
Ben Jackson 3543c6f081 mendel.c: ifdefs for hardware features in powerdown code 2011-03-04 19:42:21 +11:00
Ben Jackson ea4fdcf26a mendel.c, pinio.c: Make Z axes optional. 2011-03-04 19:42:00 +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
Ben Jackson 5bb337c1a5 sender.sh: Allow for "ok" to be surrounded by DEBUG output. 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
Michael Moon c6a9f24e24 don't set up SPI pins unless we're using them for a max6675 2011-03-03 11:22:49 +11:00
Markus Hitter 12516be978 dda.c: get rid of duplicate power_on() & friends. 2011-03-02 00:59:48 +01:00
Markus Hitter e688e8b788 Consequences of the stepping extruder now being optional. 2011-03-02 00:43:06 +01:00
Markus Hitter d2bf65822e Make the extruder stepper optional.
Think of DC extruders, milling Mendels, ...
2011-03-02 00:43:03 +01:00
Markus Hitter 475ca7d54a pinio.h: make ?_INVERT_DIR safer. 2011-03-02 00:43:01 +01:00
Markus Hitter c182cc8929 pinio.c: remove duplicate #ifdef wrapping.
In case of no enable pins, these functions resolve to nothing
anyways, see pinio.h.
2011-03-02 00:42:57 +01:00
Markus Hitter d93e6e5d2c Internal pullup resistors: intitialize them in the correct order.
It was brought to my attention, one has to set them as input first,
then to configure them to use the Pullups.
2011-03-01 17:07:27 +01:00
Markus Hitter b7afdda3f7 Make the use of the internal pullup resistors optional.
All other firmwares set them to zero -> no internal pullup resistor,
as they counter-work to the design of the electronic endstops.
However, in conjunction with mechanical endstops, they're very practical.
2011-03-01 16:10:52 +01:00
Michael Moon 815ff7ba19 lots of other files in extruder desynced, needed to wrap an ifdef around heater_print 2011-02-28 09:44:29 +11:00
Markus Amsler 3647c6f1a9 intercom: extruder only replies if talked to 2011-02-27 23:05:33 +01:00
Markus Amsler 7a15fb6df2 homing: delay is in microseconds. 2011-02-27 22:40:03 +01:00
Markus Amsler 994acb58c3 homing: enable axis before moving. 2011-02-27 22:31:27 +01:00
Markus Amsler d85f821872 Disable z stepper after each move.
All z-axis I'm aware off hold their positions with powered down stepper.
2011-02-27 22:15:15 +01:00
Markus Amsler d2c0a84da7 Arduino ide doesn't like definitions in for loops. 2011-02-27 22:11:13 +01:00
Markus Amsler 2b248850ce arduino ide: .pde must have the same name as the folder. 2011-02-27 22:08:41 +01:00
Markus Hitter 7e8c50fa58 pinio.h: make inverting pins actually work.
To INVERT an endstop, #define X_INVERT_MIN etc.
To leave it uninverted, define nothing, i.e. comment the #define out.

Probably, this change should be extended to INVERT_DIR and
INVERT_ENABLE, too.

The problem was, preprocessor flags are usually set with a simple
"#define X_INVERT_MIN", so X_INVERT_MIN is defined, but of
arbitrary value. Applies to other axes and INVERT_MAX also,
of course.

Initially, it was planned to allow "#define X_INVERT_MIN" as well
as "#define X_INVERT_MIN 0" but that turned out to be _really_
complex. See http://www.velocityreviews.com/forums/t720190-test-of-a-preprocessor-symbol-defined-as-nothing-vs-zero.html .

For curiosity, I've ported this to our purposes, debug messages
left in place:

	#ifdef X_INVERT_MAX
		#if CAT(1,X_INVERT_MAX) == 1
			#warning "X enabled, inverted"
			#define x_max()						(READ(X_MAX_PIN)?0:1)
		#elif X_INVERT_MAX
			#warning "X enabled, inverted"
			#define x_max()						(READ(X_MAX_PIN)?0:1)
		#else
			#warning "X enabled, uninverted"
			#define x_max()						(READ(X_MAX_PIN)?1:0)
		#endif
	#else
		#warning "X enabled, uninverted"
		#define x_max()						(READ(X_MAX_PIN)?1:0)
	#endif
	#warning "X disabled"
	#define	x_max()							(0)
2011-02-27 16:16:30 +01:00
Markus Hitter 0d37270af1 Config templates: publish INVERT flags.
The corresponding code is in pinio.h already, so let's hope
it actually works.
2011-02-27 12:01:47 +01:00
Markus Hitter 340aea89c8 Config templates: publish ENABLE_PINs in _all_ templates.
No functional change, as the new ones are commented out.
2011-02-27 12:00:45 +01:00
Markus Hitter 7087587f19 Config templates: add MAX_PINS consistently.
No functional changes, since all the new ones are commented out.
2011-02-27 11:55:27 +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
Markus Hitter 1a33cfddf6 gcode_parse.h: grant mantissa full 32 bits.
This saves 280 bytes of binary size and probably quite a bit of
processing time. Cost: 1 byte of RAM.
2011-02-27 11:53:08 +01:00
Markus Hitter bdeb4827fc gcode_parse.c: replace some ints by uints to double the range.
This is without accuracy or other losses and should finally make
decfloat_to_int() free of variable overflow within the decribed
ranges. Surprisingly, this costs 14 bytes program size.
2011-02-27 11:51:19 +01:00
Markus Hitter 694e3c4298 Revert "Config templates: protect config.h against multiple inclusion."
Teacup uses preprocessor magic which actually requires including
config.h twice.

This reverts commit c61191d86d.
2011-02-27 11:11:37 +01:00
Stephan Walter 8acb072e0b Actually set extruder enable pin if defined 2011-02-27 00:55:14 +11:00
Markus Hitter f985de8a54 gcode_parse.c: make decfloat_to_int handle all uints.
This saves 10 bytes of binary size and possible headaches (negative factors).
2011-02-25 11:54:22 +01:00
Markus Hitter c61191d86d Config templates: protect config.h against multiple inclusion.
This is a small compile time saver and also mandatory for
patches later in the queue.
2011-02-25 11:53:21 +01:00
Markus Hitter 758893c275 gcode_parse.c: ditch ASTERISK_IN_CHECKSUM_INCLUDED. 2011-02-25 11:49:51 +01:00
Michael Moon d705f46899 more cleanup after name change 2011-02-24 23:48:15 +11:00
Michael Moon 4aefda6f17 added integer square root algorithm for future use 2011-02-24 18:49:28 +11:00
Markus Hitter 4ca9e470a5 Move timer macros from config.h.dist and derivates to timer.c.
This sould confuse users less and neither value is subject to change
per configuration. Reviewed also by Markus Amsler.
2011-02-23 12:37:15 +01:00
Markus Hitter 2c53dbe2a8 gcode_parse: limit decimal ranges by decfloat_to_int()'s demands.
Formerly, it was limited by variable bit ranges, which allowed
more than decfloat_to_int() can swallow.
2011-02-23 02:52:51 +01:00
Markus Hitter 0dc623d4eb gcode_parse.c: added comments, which show possible variable overflows.
Stay tuned, the fix is just around the corner.
2011-02-23 02:52:27 +01:00
Markus Hitter dfc4674012 dda.h: re-add a check against multiple acceleration types.
This was previously in config.h(.dist), but better belongs
to dda.h.
2011-02-23 02:51:43 +01:00
Michael Moon 780dea1186 avr-libc's math is smaller than gcc's, use it 2011-02-21 19:09:08 +11:00
Michael Moon b8e6400a2d more README updates 2011-02-21 16:47:00 +11:00
Michael Moon af36737e3b update README 2011-02-21 16:24:21 +11:00
Michael Moon 8188ff3593 merge intercom-protocol into master 2011-02-21 16:01:27 +11:00
Markus Amsler bfae6ff97f intercom: Reduce sections with disabled interrupts. 2011-02-21 15:52:17 +11:00
Markus Amsler 52c2788997 intercom: updating the extruder in 250ms intervals should be fast enough. 2011-02-21 15:52:17 +11:00
Markus Amsler fa2a4389fc intercom: Transmit/receive from/to temporary packets.
Fixes that the packet could be changed during transmit. And only values from packets with correct checksum are used.
2011-02-21 15:52:16 +11:00
Markus Amsler 5e56784ac1 extruder: Set/get bed temperature. 2011-02-21 15:52:16 +11:00
Markus Amsler 6d83bdb067 extruder: add fan definitions 2011-02-21 15:52:15 +11:00
Markus Amsler e032cf5dab extruder: Use pull up resistors for step/dir pin to avoid noise. 2011-02-21 15:52:15 +11:00
Markus Amsler d0cbe86a2d extruder: Half-step on every step signal.
No idea why only every 4th step signal would actually step, but this generates a lot of noise for nothing.
2011-02-21 15:52:15 +11:00
Markus Amsler e3672da1cf extruder: Check the step pin directly.
Flag could get out of sync, with undefined results.
2011-02-21 15:52:15 +11:00