Add'l PLR options, AVR strstr_P compat (#13880)

This commit is contained in:
Tanguy Pruvot
2019-05-08 03:38:40 +02:00
committed by Scott Lahteine
parent 5dcb25664f
commit 11adcf1ce3
84 changed files with 345 additions and 169 deletions

View File

@ -55,6 +55,13 @@ job_recovery_info_t PrintJobRecovery::info;
PrintJobRecovery recovery;
#ifndef POWER_LOSS_PURGE_LEN
#define POWER_LOSS_PURGE_LEN 0
#endif
#ifndef POWER_LOSS_RETRACT_LEN
#define POWER_LOSS_RETRACT_LEN 0
#endif
/**
* Clear the recovery info
*/
@ -340,8 +347,9 @@ void PrintJobRecovery::resume() {
//gcode.process_subcommands_now(cmd);
gcode.process_subcommands_now_P(PSTR("G1 E" STRINGIFY(POWER_LOSS_PURGE_LEN) " F200"));
#endif
#if POWER_LOSS_RETRACT_LEN
sprintf_P(cmd, PSTR("G1 E%d F3000"), POWER_LOSS_PURGE_LEN - POWER_LOSS_RETRACT_LEN);
sprintf_P(cmd, PSTR("G1 E%d F3000"), POWER_LOSS_PURGE_LEN - (POWER_LOSS_RETRACT_LEN));
gcode.process_subcommands_now(cmd);
#endif

View File

@ -32,11 +32,9 @@
#include "../feature/mixing.h"
#endif
#define SAVE_INFO_INTERVAL_MS 0
//#define SAVE_EACH_CMD_MODE
//#define DEBUG_POWER_LOSS_RECOVERY
#define POWER_LOSS_PURGE_LEN 20
#define POWER_LOSS_RETRACT_LEN 10
//#define SAVE_EACH_CMD_MODE
//#define SAVE_INFO_INTERVAL_MS 0
typedef struct {
uint8_t valid_head;