If line numbers aren't required, don't bother about their
actual value either. Failing case was RepRap host software, sending N0 T8 *18 N0 G21 *58 on each build start. Also saves a whopping 124 bytes of memory on ignoring line numbers. next_target.N_expected is never used and it's handling should be optimized out.
This commit is contained in:
parent
2004f04d4a
commit
ff25c6847b
|
|
@ -297,11 +297,11 @@ void scan_char(uint8_t c) {
|
|||
// process
|
||||
if (next_target.seen_G || next_target.seen_M) {
|
||||
if (
|
||||
#ifdef REQUIRE_LINENUMBER
|
||||
((next_target.N_expected == next_target.N) && (next_target.seen_N == 1))
|
||||
#else
|
||||
((next_target.N_expected == next_target.N) || (next_target.seen_N == 0))
|
||||
#endif
|
||||
#ifdef REQUIRE_LINENUMBER
|
||||
((next_target.N_expected == next_target.N) && (next_target.seen_N == 1))
|
||||
#else
|
||||
1
|
||||
#endif
|
||||
) {
|
||||
if (
|
||||
#ifdef REQUIRE_CHECKSUM
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "dda.h"
|
||||
|
||||
// wether to insist on N line numbers
|
||||
// if not defined, N's are completely ignored
|
||||
//#define REQUIRE_LINENUMBER
|
||||
|
||||
// wether to insist on a checksum
|
||||
|
|
|
|||
Loading…
Reference in New Issue