From fdb4418f57eda629323fc5726791d66eeedaea11 Mon Sep 17 00:00:00 2001 From: Alden Hart Date: Mon, 2 Jan 2017 14:34:45 -0500 Subject: [PATCH] Eliminate last remaining 201 error (line below minimum length) --- g2core/error.h | 4 ++-- g2core/plan_line.cpp | 3 +-- g2core/plan_zoid.cpp | 11 +++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/g2core/error.h b/g2core/error.h index ff8ec5a0..609c65ee 100644 --- a/g2core/error.h +++ b/g2core/error.h @@ -2,8 +2,8 @@ * error.h - g2core status codes * This file is part of the g2core project * - * Copyright (c) 2010 - 2016 Alden S. Hart, Jr. - * Copyright (c) 2010 - 2016 Robert Giseburt + * Copyright (c) 2010 - 2017 Alden S. Hart, Jr. + * Copyright (c) 2010 - 2017 Robert Giseburt * * This file ("the software") is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2 as published by the diff --git a/g2core/plan_line.cpp b/g2core/plan_line.cpp index 3856dacd..39b602dc 100644 --- a/g2core/plan_line.cpp +++ b/g2core/plan_line.cpp @@ -198,8 +198,7 @@ stat_t mp_aline(GCodeState_t* gm_in) // exit if the move has zero movement. At all. if (fp_ZERO(length)) { sr_request_status_report(SR_REQUEST_TIMED_FULL); // Was SR_REQUEST_IMMEDIATE_FULL - return (STAT_MINIMUM_LENGTH_MOVE); -// return (STAT_OK); //+++++ test this + return (STAT_OK); // preferred over STAT_MINIMUM_LENGTH_MOVE } // get a cleared buffer and copy in the Gcode model state diff --git a/g2core/plan_zoid.cpp b/g2core/plan_zoid.cpp index 236e69d4..4c0a1830 100644 --- a/g2core/plan_zoid.cpp +++ b/g2core/plan_zoid.cpp @@ -34,8 +34,9 @@ //+++++ DIAGNOSTICS +#if IN_DEBUGGER < 1 #define LOG_RETURN(msg) // LOG_RETURN with no action (production) -/* +#else #include "xio.h" static char logbuf[128]; static void _logger(const char *msg, const mpBuf_t *bf) // LOG_RETURN with full state dump @@ -47,16 +48,18 @@ static void _logger(const char *msg, const mpBuf_t *bf) // LOG_RETURN wi xio_writeline(logbuf); } #define LOG_RETURN(msg) { _logger(msg, bf); } -*/ +#endif +#if IN_DEBUGGER < 1 #define TRAP_ZERO(t,m) -/* +#else #define TRAP_ZERO(t, m) \ if (fp_ZERO(t)) { \ rpt_exception(STAT_MINIMUM_LENGTH_MOVE, m); \ _debug_trap(m); \ } -*/ +#endif + //+++++ END DIAGNOSTICS /* local functions */