Commit Graph

1304 Commits

Author SHA1 Message Date
Markus Hitter 55c0be5f41 gcode_process.c: same homing order for all axes.
This is, first towards MIN, then towards MAX. Now also matches order
for homing all, which is defined in home() in home.c. Partially
fixes issue #107.
2014-12-26 19:41:38 +01:00
Markus Hitter f6115688c5 Move Intercom temp sensor initialisation from mendel.c to temp.c. 2014-12-26 19:41:38 +01:00
Markus Hitter a9f1d00865 Move MAX6675 initialisation from mendel.c to temp.c.
Also note a misplaced and misnamed pin.
2014-12-26 19:41:38 +01:00
Markus Hitter b66ba4629a gcode_process.c: sort M112.
Counting to numbers up to 300 is apparently not everyone's
business, he he. :-)
2014-12-26 19:41:38 +01:00
Markus Hitter 9fe9c919a4 dda.c: add some TODOs about duplicate and redundant code. 2014-12-26 19:41:38 +01:00
Markus Hitter 69e0b0d15e dda_lookahead.c: loop up speed factor calculation, too.
This saves 250 bytes over the previous version, totalling to a
savings of 162 bytes.

... and it's easier to extend beyond 4 axes now, of course.
2014-12-26 19:41:38 +01:00
Markus Hitter 4596dffe10 dda_lookahead.c: put MAX_JERK_{XYZE} into an array.
This costs 88 bytes binary size for now, but will us allow to
loop up a nice section of code.
2014-12-26 19:41:38 +01:00
Markus Hitter 87a0706ff9 dda_lookahead.c: loop up currF, too.
Even more savings this time, 146 bytes binary size.
2014-12-26 19:41:38 +01:00
Markus Hitter b3eba1d062 dda_lookahead.c: loop up prevF calculation.
This saves a whopping 98 bytes binary size.
2014-12-26 19:41:38 +01:00
Markus Hitter ab25efbe81 dda.c: abs32() is obsolete now.
It's obsolete, because it's used for signed ints, only.
2014-12-26 19:41:37 +01:00
Markus Hitter 45baa75a5d CoreXY: tell config.h templates about KINEMATICS_COREXY. 2014-12-26 19:41:37 +01:00
Markus Hitter 2651c10404 CoreXY, dda_kinematics.c/.h: introduce KINEMATICS_COREXY.
Implementation isn't that difficult, should be complete and working
fine already.
2014-12-26 19:41:37 +01:00
Markus Hitter be0af71b2e CoreXY: distribute new KINEMATICS definition to all config.h templates. 2014-12-26 19:41:37 +01:00
Markus Hitter 30dd1f4535 CoreXY: separate out bot axes distance calculations.
This also introduces dda_kinematics.c/.h and a KINEMATICS definition,
which allows to do different distance calculations depending on the
bot kinematics in use. So far only KINEMATICS_STRAIGHT, which matches
what we had before, but other kinematics types are present in
comments already.
2014-12-26 19:41:37 +01:00
Markus Hitter 7d2dbaa481 CoreXY, dda.c: use signed delta_steps to simplify dda->delta_um[] calc.
Saves another 8 bytes binary size.
2014-12-26 19:41:37 +01:00
Markus Hitter cca464260b CoreXY, dda.c: use our now signed delta_steps to set direction.
This nicely makes the binary 36 bytes smaller.
2014-12-26 19:41:37 +01:00
Markus Hitter 12f01a783a CoreXY, dda.c: calculate delta steps separately.
This will allow us to use it's sign to set direction.

No binary size increase, optimizer can handle this.
2014-12-26 19:41:37 +01:00
Markus Hitter 41bf99c1aa CoreXY, dda.c: separate bot axes from extruder axes. 2014-12-26 19:41:37 +01:00
Markus Hitter a36b96357e CoreXY, dda.c: start by making steps an array.
Goal is to calculate steps in a separate function to allow different
methods of steps calculation, which is neccessary for supporting
different kinematics types. Accordingly we have to calculate steps
for all axes before setting directions and such stuff.
2014-12-26 19:41:37 +01:00
jgrjgr 84affe4cd7 Add config.h template for RUMBA electronics. 2014-12-26 19:41:03 +01:00
Markus Hitter 3696c707cd Add config.h template for the 3Drag controller. 2014-11-15 18:00:16 +01:00
Markus Hitter bb24627242 dda.c: file attempt to use sign of dda->delta_um[] to set direction. 2014-10-18 21:04:07 +02:00
Markus Hitter c7b022fb3e dda.c: some whitespace cleaning. 2014-10-18 21:02:17 +02:00
Markus Hitter 6da02f3112 config_wrapper.h: protect against USB/serial misconfiguration. 2014-10-18 21:00:16 +02:00
Markus Hitter 9f618ee048 Testcases: add nothing.gcode.
This is for running stuff with run_in_simulavr.sh which needs no
G-code.
2014-10-18 20:59:41 +02:00
Markus Hitter 37e2b18f4c config.*.h: distribute changed TEMP_HYSTERESIS description to all templates. 2014-10-18 20:59:00 +02:00
Markus Hitter e0ee76b54e heater.c: add a hysteresis when using BANG_BANG.
Before, the heater would turn off and on at each tiny temperature
fluctuation. Or better: at every tiny analog voltage fluctuation.
2014-10-18 20:58:35 +02:00
Markus Hitter f26623d173 Move clock stuff from timer.c/.h to clock.c/.h.
I guess that's where it belongs.
2014-10-18 20:57:32 +02:00
Markus Hitter fc7365b320 preprocessor_math.h: fix errorneous comment. 2014-08-31 19:32:09 +02:00
Markus Hitter 95b3ea0b30 Canned G-code: distribute new config option to all templates. 2014-08-31 19:32:01 +02:00
Markus Hitter 5cc84a069a Canned G-code: setup right in config.h.
This works with Arduino IDE as well and should be easier to figure
for inexperienced users.
2014-08-31 19:31:39 +02:00
Markus Hitter 7f990a298c Canned G-code: don't miss first character. 2014-08-31 19:22:24 +02:00
Markus Hitter 1e97e51d2a Canned G-code: fix reading flash memory. 2014-08-31 19:20:50 +02:00
Michael Moon aed4bfdb5b Canned G-code: implement continuous replay of G-code stored on flash. 2014-08-31 19:19:21 +02:00
Erik Jonsson 0723b53c44 run-in-simulavr.sh: terminate simulation if stop recieved.
Note by Traumflug: this

  while read -r LINE; do
    some commands
  done << (some other command)

didn't work here (bash 4.3.11 on Ubuntu 14.04), so I had to swap
the sequence of these two commands for using a pipe. Anyways,
excellent idea, shortens some simulator runs drastically!
2014-08-31 19:12:43 +02:00
Erik Jonsson fa0e0d37e7 gcode_process.c: added stop message when M2 is recieved.
This shall help stopping a simulator when G-code is done.
2014-08-31 19:12:36 +02:00
Markus Hitter e4349083b4 Fix config.ramps-v1.3.h.
Finally had to look it up myself. RAMPS users are apparently all
incapable or too stupid to write such fixes into an issue report.

From IRC:

xxx: oh, motors move now, thanks for helping
yyy: please write the changes into a github issue
xxx: will do
...
xxx: have to run now

... and these are the last words the world reads about xxx :-)
Observed three times now.
2014-08-31 19:12:28 +02:00
Markus Hitter 642948acb2 gcode_process.c: review G28 comment. 2014-08-31 19:12:11 +02:00
Markus Hitter 5b3121abc5 arduino_xxx.h: add DIO names next to AIO names.
This is mostly for less confusion, because analog pins can
be used as digital ones, too. It also matches what other firmwares
do, so people can simply copy & paste pin definitions.

Definitions were taken from Sprinter's fastio.h (which was
initially crafted by copying Teacup's arduino*.h files :-) )
2014-08-31 19:11:58 +02:00
Markus Hitter 6c5809f0fa DDA: finally, don't bit-shift dda->c.
This was the goal: to not bit-shift when calling setTimer(). Binary
size another 40 bytes off, about 1.2 % better performance:

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 20136 bytes          141%       66%        32%       16%
    RAM   :  2318 bytes          227%      114%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%

short-moves.gcode statistics:
LED on occurences: 888.
LED on time minimum: 302 clock cycles.
LED on time maximum: 718 clock cycles.
LED on time average: 311.258 clock cycles.

smooth-curves.gcode statistics:
LED on occurences: 9124.
LED on time minimum: 307 clock cycles.
LED on time maximum: 708 clock cycles.
LED on time average: 357.417 clock cycles.

triangle-odd.gcode statistics:
LED on occurences: 1636.
LED on time minimum: 302 clock cycles.
LED on time maximum: 708 clock cycles.
LED on time average: 330.322 clock cycles.
2014-08-31 19:11:49 +02:00
Markus Hitter e098a96bac DDA: don't bit-shift move_c.
Next babystep, tiny enhancement: 8 bytes less binary size.
2014-08-31 19:11:30 +02:00
Markus Hitter b9c38051cc DDA: don't bit-shift dda->c_min.
Another babystep. First results: binary 4 bytes smaller. Yikes!
Ha ha.
2014-08-31 19:11:19 +02:00
Markus Hitter 6880f05f7e DDA: don't bit-shift dda->end_c either.
Next babystep. All changes in ACCELERATION_REPRAP, which isn't
part of current test procedures, so let's cross fingers it was
done right.
2014-08-31 19:11:12 +02:00
Markus Hitter 2541eaf335 DDA: don't bit-shift c_limit, c_limit_calc either.
Admittedly it looks like advancing in babysteps, but really
catching every bit shifting instance isn't trivial, sometimes
these shifts are already embedded in other calculations.

Still no binary size or performance change.
2014-08-31 19:11:04 +02:00
Markus Hitter 4fa755daef dda.c: don't bit-shift c0.
While this shifting meant to increase accuracy, there's no actual
use of it, other than that this value gets shifted back and forth.
Let's start to get rid of it.

Performance stays exactly the same:

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 20188 bytes          141%       66%        32%       16%
    RAM   :  2318 bytes          227%      114%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%

short-moves.gcode statistics:
LED on occurences: 888.
LED on time minimum: 306 clock cycles.
LED on time maximum: 722 clock cycles.
LED on time average: 315.253 clock cycles.

smooth-curves.gcode statistics:
LED on occurences: 9124.
LED on time minimum: 311 clock cycles.
LED on time maximum: 712 clock cycles.
LED on time average: 361.416 clock cycles.

triangle-odd.gcode statistics:
LED on occurences: 1636.
LED on time minimum: 306 clock cycles.
LED on time maximum: 712 clock cycles.
LED on time average: 334.319 clock cycles.
2014-08-31 19:10:56 +02:00
Markus Hitter ec937adde2 run-in-simulavr.sh: move statistics to the end.
This is more convenient for obvious reasons, you no longer have
to search all the output for these few lines.
2014-08-31 19:10:48 +02:00
Markus Hitter 157a5a966b run-in-simulavr.sh: clean up tracein file after being done. 2014-08-31 19:10:39 +02:00
Markus Hitter 4f0a00c1a6 DDA: calculate acceleration for the actual fast axis.
This finally brings Z axis up to speed.

So far we always assumed the fastest axis to have the same steps/mm
as the X axis. In cases where this wasn't true, the movement
wouldn't do sufficient acceleration steps and, accordingly,
not reach the expected maximum speed. This was particularly visible
on a typical Mendel printer, where the Z axis would reach only a
6th of the commanded speed in some configurations.
2014-08-31 19:10:31 +02:00
Markus Hitter 5ee2aebbed DDA: remember number of the fast axis. 2014-08-31 19:10:23 +02:00
Markus Hitter 294f0eda26 DDA: have an acceleration constant for each axis individually.
For now, keep behaviour identical, like still use STEPS_PER_M_X.
This is about to change soon.
2014-08-31 19:10:14 +02:00