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
Ben Jackson
f8d8b2a471
gcode_parse.c: Send newline as char rather than PSTR
2011-05-08 00:37:03 +10:00
Markus Hitter
ee481864fa
gcode_parse.c: get rid of the denominator variable in decfloat_to_int().
...
This allows for better optimisation and saves 100 bytes binary size
accordingly. For denominator = 1, the algorithm is also significantly
simpler.
2011-04-15 02:12:13 +02:00
Markus Hitter
6896aa5236
gcode_parse.c: join the upper and the lower formula in decfloat_to_int().
...
This also makes rounding more accurate with exponent > 0.
Saves another 40 bytes binary size.
2011-04-15 02:12:10 +02:00
Markus Hitter
8cf8a8a44a
gcode_parse.c: get rid of rounding[].
...
This saves 8 bytes of flash and, more important, 16 bytes of RAM.
2011-04-15 02:12:07 +02:00
Markus Hitter
f41dd9c098
gcode_parse.c: make all usages of decfloat_to_int()...
...
... to divide either by 1 or 1000. Accordingly, a flag
can be used instead of the actual value, shrinking code
size by 70 bytes.
2011-04-15 02:12:02 +02:00
Michael Moon
ae33cb7fa2
start implementing absolute E support
2011-04-09 09:16:05 +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
03b52e0340
gcode_parse.c: don't double-initialize last_field or read_digit.
...
Saves 64 bytes binary size.
2011-03-06 23:30:15 +01:00
Michael Moon
c177756913
don't mess up return data stream if numbers have too much precision
2011-03-05 15:54:36 +11:00
Markus Hitter
5c0dde4e14
Changed M110 to match the description in the RepRap Wiki.
2011-03-03 09:40:55 +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
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
758893c275
gcode_parse.c: ditch ASTERISK_IN_CHECKSUM_INCLUDED.
2011-02-25 11:49:51 +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
Michael Moon
72adba5a58
apparently repg expects N preceding line numbers in resend requests
2011-02-19 13:09:21 +11:00
Michael Moon
d06a365f54
G4 uses millisecond units now apparently, instead of seconds
2011-02-17 14:05:13 +11:00
Markus Amsler
3aa7fc83e4
M140: S value is a temperature
2011-02-15 13:21:45 +11:00
Michael Moon
79674da51b
try to make E behave
2011-02-12 22:20:18 +11:00
Stephan Walter
4febbea2f8
fix decfloat_to_int, Less divisions in decfloat_to_int.
...
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
2011-01-11 19:20:17 +11:00
Michael Moon
1fa0036008
fix arithmetic error
2011-01-10 10:15:42 +11:00
Markus Hitter
719a9d32b5
gcode_parse.c: Limit the digits right of the decimal.
...
Previously, variables in decfloat_to_int() could overflow due to
excess precision, like Z2.0000000.
2011-01-08 12:15:13 +11:00
Michael Moon
56ce863024
fix typo
2011-01-07 23:13:00 +11:00
Michael Moon
096d7dfdf3
Merge release-candidate-triffid branch
2011-01-07 23:09:13 +11:00
Michael Moon
209dfe66bd
prepare for protocol changes ie responses after ok instead of separate line
2010-10-21 21:44:28 +11:00
Michael Moon
56c355c5bd
split gcode parse/process into separate files for readability
2010-10-20 17:51:49 +11:00