Markus Hitter
da5c29a7dd
timer.c/.h: make TICK_TIME macros available globally.
2013-10-27 20:01:51 +01:00
Markus Hitter
59599a3552
analog.c: use atomic macros.
2013-10-27 20:01:51 +01:00
Markus Hitter
ccec75d9f8
dda.c: allow protected re-entry for time based stepper calculations.
...
This becomes more important when acceleration is calculated
there, too.
2013-10-27 20:01:51 +01:00
Markus Hitter
c7ee530c62
Add config.sanguish.h.
2013-10-27 20:01:51 +01:00
Markus Hitter
01f7c99881
config.h: introduce PS_MOSFET_PIN for Sanguish support.
2013-10-27 20:01:51 +01:00
Markus Hitter
e7b7e004f4
Silence a false positive warning.
2013-10-27 20:01:51 +01:00
Roland Brochard
af12c7a68a
Faster implementation of integer square root.
...
Implementation by Roland Brochard <zuzuf86@gmail.com>.
Note: If you wonder how code doing multiplications can be faster than
code doing just shifts and increments: I've measured it. One million
square roots in 30 seconds with the new code instead of 220 seconds
with the old code on a Gen7 20 MHz. That's just 30 microseconds or
600 CPU cycles per root.
Code used for the measurement (by a stopwatch) in mendel.c:
...
*include "dda_maths.h"
*include "delay.h"
int main (void)
{
uint32_t i, j;
serial_init();
sei();
serial_writestr_P(PSTR("start\n"));
for (i = 0; i < 1000000; i++) {
j = int_sqrt(i);
}
serial_writestr_P(PSTR("done\n"));
delay_ms(20);
cli();
init();
...
--Traumflug
2013-10-27 20:01:51 +01:00
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