Commit Graph

777 Commits

Author SHA1 Message Date
Markus Hitter 13ec2d7521 Move endstop handling into a time-based procedure.
Before, endstops were checked on every step, wasting precious time.
Checking them 500 times a second should be more than sufficient.

Additionally, an endstop stop now properly decelerates the movement.
This is one important step towards handling accidental endstop hits
gracefully, as it avoids step losses in such situations.
2013-10-27 20:01:10 +01:00
Markus Hitter da085670f4 dda_lookahead.c: use the new ATOMIC macros here as well. 2013-07-21 23:28:50 +02:00
Markus Hitter 36c07d3423 dda_queue.c: Simplify queue_flush().
No ATOMIC wrapping required and setTimer(0) actually restarts the timer,
which isn't what we want here.
2013-07-21 23:28:42 +02:00
Markus Hitter 47a5252230 Apply ATOMIC macros in a number of other obvious places. 2013-07-21 23:27:33 +02:00
Markus Hitter 69da7c5b15 Introduce ATOMIC_START and ATOMIC_END.
As a sample application, use it in queue_empty().

There's also ATOMIC_BLOCK() coming with avr-libc, but this requires
a C99 compiler while Arduino IDE insists on running avr-gcc in C89 mode.
2013-07-21 23:23:28 +02:00
Markus Hitter 569adeecd1 Move the branch input-float into an attic.
This was a very interesting approach, but for the forseeable
future it's unlikely the code will replace the current one.
2013-07-11 22:33:41 +02:00
Markus Hitter fc4bfca06a Rename M200 to M119 to meet Sprinter & Marlin.
No functional change.
2013-07-11 22:04:03 +02:00
Markus Hitter 23679bbd49 Remove M84.
Teacup handles motor on/off automatically and if your
intention is to stop the printer, M0 is appropriate (and
conforming with the NIST G-code standard).

That said, M84 is kept as a synonym for M2 to enhance compatibility
with slic3rs default end-G-code.
2013-07-11 22:03:51 +02:00
David Forrest 6ac79b288d temp.c: DEBUG_USER code for raw temp readings. 2013-07-11 22:03:21 +02:00
David Forrest aefd4b6596 usb_serial.c: eliminate type punning compiler warnings 2013-07-11 22:03:01 +02:00
Markus Hitter ea59e634a7 Bring LOOKAHEAD into the config templates. 2013-07-11 22:02:23 +02:00
Markus Hitter 1aca61c277 Make lookahead basically working.
This means, modify existing code to let the lookahead algorithms
do their work. It also means to remove some unused code in
dda_lookahead.c and reordering some code to make it work with
LOOKAHEAD undefined.
2013-07-11 22:02:13 +02:00
Markus Hitter e04b69b9c6 Add Cyberwizzards lookahead. Thanks a lot, Cyberwizzard.
For now only the two new files, tweaked a bit in the #ifdef
area to let them compile without LOOKAHEAD being defined.
2013-07-11 22:02:02 +02:00
Markus Hitter b8f32c627c delay.h: re-add falsely removed #include. 2013-03-24 16:19:25 +01:00
Markus Hitter a2ce509bed Eliminate _delay(), delay() and _delay_us().
Doesn't change much, even the binary size stays the same. Much
cleaner code though, now we have only delay_us() and delay_ms().
2013-03-24 16:19:24 +01:00
Markus Hitter 1114761bed Eliminate _delay_ms().
Lots of duplicate stuff in delay.c/.h ...
2013-03-24 16:19:23 +01:00
Markus Hitter 2ebfd44530 Clean up some unused delay related stuff. 2013-03-24 16:19:21 +01:00
Markus Hitter aece36f6a2 Add support for the AT90USB1286.
Contribution by DaveX. Thank you very much, Dave. See
http://forums.reprap.org/read.php?147,33082,182206#msg-182206
2013-03-24 16:17:54 +01:00
Markus Hitter 20a87bf8dd Makefile-AVR: fix ...
... well, I've forgotten what this fixed, but it was neccessary
at some point.
2013-03-24 16:17:43 +01:00
Markus Hitter f065f26aff usb_serial.c: make variables residing in PROGMEM constant.
Newer avr-gccs complain about that and even without this, it's
the right thing to do.

Patch by DaveX, thanks Dave. See also:
http://forums.reprap.org/read.php?147,33082,182021#msg-182021
2013-03-24 16:17:34 +01:00
Markus Hitter d03b754b08 arduino.h: add the AT90USB1286.
Thanks for the patch, DaveX.
2013-03-24 16:17:24 +01:00
Markus Hitter 3c5d9d8950 Replace #define HOST by #define MOTHERBOARD.
Apparently, HOST conflicts with some AVR headers for the
USB-equipped ATmegas.

Patch by DaveX, thank you Dave. See also:
http://forums.reprap.org/read.php?147,33082,182021#msg-182021
2013-03-24 16:17:14 +01:00
Markus Hitter 63d3f012a8 gcode_parse.c: process incoming digits earlier.
Idea and patch from ItsDrone, see
http://forums.reprap.org/read.php?146,174364,174550#msg-174550

Thanks, ItsDrone.
2013-03-24 16:17:02 +01:00
Markus Hitter 03d49a1a87 Makefiles can have various names now. 2013-02-05 14:11:17 +01:00
Markus Hitter 64560eda45 config templates: bring in EECONFIG.
Recently EEPROM storage was wrapped in #ifdefs, so, to get it back
by default, we have to enable it.
2013-02-05 14:11:04 +01:00
Markus Hitter 73658afc33 Makefiles: build into a dedicated directory.
This makes finding source files for editing quite a bit simpler.
2013-02-05 14:11:03 +01:00
Markus Hitter 64072dfd03 README: shorten drastically to avoid documentation duplication. 2013-02-05 14:10:55 +01:00
Markus Hitter 19066069a5 Rewrite upper half of the Makefile.
We have now Makefile-AVR - AVR specific stuff - and
Makefile-common - common build instructions.

This effort is the begin of preparing Teacup for ARM targets.
To build the target, copy or link Makefile-AVR or Makefile-ARM
(depending on your target) to Makefile.
2013-02-05 14:10:39 +01:00
Markus Hitter b10b3db4f8 Wrap EEPROM storage related stuff in #ifdef EECONFIG.
Saves a whopping 600 bytes. Let's cross fingers stuff still works.
It should, using the hardcoded default values.
2013-02-05 14:10:31 +01:00
Markus Hitter d51ec02cdf dda_queue: optimize enqueue().
Suggestion by ItsDrone, see
http://forums.reprap.org/read.php?146,174364,174364#msg-174364
2013-02-05 14:10:27 +01:00
Markus Hitter f3e502c1ef Fix auto-idle.
Powering on even with a heater set to zero doesn't work, as
temperature driven heaters are set to zero all the time. So,
the PSU was running all the time.

The bug was introduced with 569e3d504aafd1ffc8b279b5d7092970cef72287
2013-01-03 15:35:06 +01:00
Markus Hitter faf737bbf5 gcode_process.c: remove commented M113. 2013-01-03 15:34:56 +01:00
Markus Hitter 49b76d6e25 gcode_process.c: make the extruder optional and ...
... default to the first available device if the intended
device isn't available.
2013-01-03 15:34:50 +01:00
Markus Hitter a0997fcee1 gcode_process.c: remove M190 and M191.
These were pointless anyways, the power supply is handled fully
automatic in Teacup.
2013-01-03 15:34:49 +01:00
Markus Hitter 7f903fe0e2 gcode_process.c: remove the now obsolete M135.
The replacement is the now generalised M106.
2013-01-03 15:34:48 +01:00
Markus Hitter 042d9ddfc2 Move temp_all_zero() to heaters_all_zero().
We need the power supply for the heaters, after all, not for
the temperature sensors. Some heaters (e.g. fans) don't even have
a temp sensor.
2013-01-03 15:34:47 +01:00
Markus Hitter 28a366fc48 Handle power_on() for heaters in heater.c.
This removes some instances in gcode_process.c and saves 26 bytes.
2013-01-03 15:34:45 +01:00
Markus Hitter 6f2ec09837 Make temperature sensor type TT_NONE obsolete.
The requirement was simply neither obvious nor intuitive. Drawback
is, the indices of temperature sensors can now differ from these
of the heaters. That's easier to recognize for newbies, though.
2013-01-03 15:34:41 +01:00
Markus Hitter ba05d6a0cd Give up on REPRAP_HOST_COMPATIBILITY.
Was never really accepted and these days, hosts usually adjust
to the firmware instead of the other way around.
2012-12-03 19:50:14 +01:00
Markus Hitter 9b018b7433 Make USB_SERIAL fit for the Arduino IDE.
This also includes renaming of USE_USB to USB_SERIAL for more
consistency.
2012-12-03 19:49:58 +01:00
David Forrest ef6036c724 createTemperatureLookup.py: add --table option.
This option is for multiple table chunks of ThermistorTable.h.
2012-12-03 19:49:39 +01:00
David Forrest e65526f9da heater.c: increase timer4 slow PWM from 15 Hz to 61 Hz. 2012-12-03 19:49:26 +01:00
David Forrest 244d8b6654 Makefile: add autodependencies for header files. 2012-12-03 19:49:11 +01:00
Markus Hitter fd24987a9f Remove LUFA.
It was replaced a few weeks ago by usb_serial, which is a single
file solution, so no submodules are required. Also, a recent
Teensy user reported usb_serial to work much better.
2012-12-03 19:48:54 +01:00
Markus Hitter be560aaa01 Allow slow PWM on 10 bit timers.
Another contribution by DaveX, thank you.
http://forums.reprap.org/read.php?147,33082,165415#msg-165415
2012-12-03 19:48:45 +01:00
Markus Hitter fd019f350f More features for createTemperatureLookup.py.
Contribution by DaveX, see
http://forums.reprap.org/read.php?147,33082,165159#msg-165159
2012-12-03 19:48:37 +01:00
Markus Hitter 33b550e227 Makefile: add better optimisation flags.
Fetched from V-USB's Readme.txt. Saves almost 200 bytes and thus
likely makes the binary faster.
2012-12-03 19:48:24 +01:00
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 53049ac56e Add research for dda-split.
Files for trying splitting up paths into sub-paths:
acceleration - constant speed move - deceleration

This could allow to calculate acceleration/deceleration with only
16 bit integers, greatly speeding up the step interrupt.

It should also make look-ahead more simple and allow to round out
corners with curves. Rounding corners is mandatory when keeping
movement speed at corners.

For trying, run ./alg2.make, it'll run on the host computer and
should show a graph.
2012-11-08 16:39:45 +01:00
Michael Moon 6669afb35e more stuffing around with the algorithm, looks like we have to use floats during setup for this to work 2012-11-08 16:38:51 +01:00