Skip to content

Commit

Permalink
misc. cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 27, 2022
1 parent 840e0ed commit 478f7c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 8 additions & 9 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2407,17 +2407,16 @@

/**
* Line Number Error Handler
*
* Add function to delay resend requests for line number
* errors, for Hosts that send N# line number with GCode.
* Prevents resend cycles causing stuttering and failure
* on systems with latency between Host and Printer.
* eg. Octoprint through ESP8266(WIFI) pass-through
*
* Add function to delay resend requests for line number errors, for Hosts that
* send N# line number with G-code. Prevents resend cycles causing stuttering
* and failure on systems with Host <-> Printer latency.
* e.g., Octoprint through ESP8266 (WIFI) pass-through.
*/
#define RESEND_HANDLER
//#define RESEND_HANDLER
#if ENABLED(RESEND_HANDLER)
#define RESEND_HANDLER_DROP_GCODE 1 //Number of GCode lines to drop before resend request sent to Host. Octprint>>ESP3D; Min 5
//#define RESEND_HANDLER_NOTICE //Send additional details to host terminal
#define RESEND_HANDLER_DROP_GCODE 1 // Number of G-code lines to drop before resend request sent to Host. Octprint>>ESP3D; Min 5
//#define RESEND_HANDLER_NOTICE // Send additional details to host terminal
#endif

#if ENABLED(SDSUPPORT)
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/gcode/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ class GCodeQueue {

/**
* Resend handler to deal with Host>>Printer latency
*/
*/
#if ENABLED(RESEND_HANDLER)
struct ResendCtrl {
long last_error_N; //Record the last requested resend line number
long last_error_N; // Record the last requested resend line number
uint8_t ignore_resend_count;
const uint8_t ignore_resend_max; //Number of resends requests deleted //LH this can be constant
const uint8_t ignore_resend_max; // Number of resends requests deleted //LH this can be constant
};

static ResendCtrl resend_ctrl; //resend ctrl variables
static ResendCtrl resend_ctrl; // Resend ctrl variables

static void ln_num_error_notice(const serial_index_t serial_ind, const long host_gcode_N);
#endif
Expand Down

0 comments on commit 478f7c0

Please sign in to comment.