Rename options with swap_ prefix

2.0.x
Scott Lahteine 7 years ago
parent 14482d2f2a
commit 4eff18854b

@ -389,8 +389,8 @@ extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
retract_zlift, // M207 Z - G10 Retract hop size retract_zlift, // M207 Z - G10 Retract hop size
retract_recover_length, // M208 S - G11 Recover length retract_recover_length, // M208 S - G11 Recover length
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
retract_length_swap, // M207 W - G10 Swap Retract length swap_retract_length, // M207 W - G10 Swap Retract length
retract_recover_length_swap, // M208 W - G11 Swap Recover length swap_retract_recover_length, // M208 W - G11 Swap Recover length
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
#endif #endif

@ -565,8 +565,8 @@ static uint8_t target_extruder;
retract_zlift, // M207 Z - G10 Retract hop size retract_zlift, // M207 Z - G10 Retract hop size
retract_recover_length, // M208 S - G11 Recover length retract_recover_length, // M208 S - G11 Recover length
retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate retract_recover_feedrate_mm_s, // M208 F - G11 Recover feedrate
retract_length_swap, // M207 W - G10 Swap Retract length swap_retract_length, // M207 W - G10 Swap Retract length
retract_recover_length_swap, // M208 W - G11 Swap Recover length swap_retract_recover_length, // M208 W - G11 Swap Recover length
swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
#if EXTRUDERS > 1 #if EXTRUDERS > 1
bool retracted_swap[EXTRUDERS] = { false }; // Which extruders are swap-retracted bool retracted_swap[EXTRUDERS] = { false }; // Which extruders are swap-retracted
@ -3165,7 +3165,7 @@ static void homeaxis(const AxisEnum axis) {
// Retract by moving from a faux E position back to the current E position // Retract by moving from a faux E position back to the current E position
feedrate_mm_s = retract_feedrate_mm_s; feedrate_mm_s = retract_feedrate_mm_s;
current_position[E_AXIS] += (swapping ? retract_length_swap : retract_length) / volumetric_multiplier[active_extruder]; current_position[E_AXIS] += (swapping ? swap_retract_length : retract_length) / volumetric_multiplier[active_extruder];
sync_plan_position_e(); sync_plan_position_e();
prepare_move_to_destination(); prepare_move_to_destination();
@ -3189,7 +3189,7 @@ static void homeaxis(const AxisEnum axis) {
// A retract multiplier has been added here to get faster swap recovery // A retract multiplier has been added here to get faster swap recovery
feedrate_mm_s = swapping ? swap_retract_recover_feedrate_mm_s : retract_recover_feedrate_mm_s; feedrate_mm_s = swapping ? swap_retract_recover_feedrate_mm_s : retract_recover_feedrate_mm_s;
const float move_e = swapping ? retract_length_swap + retract_recover_length_swap : retract_length + retract_recover_length; const float move_e = swapping ? swap_retract_length + swap_retract_recover_length : retract_length + retract_recover_length;
current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder]; current_position[E_AXIS] -= move_e / volumetric_multiplier[active_extruder];
sync_plan_position_e(); sync_plan_position_e();
@ -8554,7 +8554,7 @@ inline void gcode_M205() {
* M207: Set firmware retraction values * M207: Set firmware retraction values
* *
* S[+units] retract_length * S[+units] retract_length
* W[+units] retract_length_swap (multi-extruder) * W[+units] swap_retract_length (multi-extruder)
* F[units/min] retract_feedrate_mm_s * F[units/min] retract_feedrate_mm_s
* Z[units] retract_zlift * Z[units] retract_zlift
*/ */
@ -8562,14 +8562,14 @@ inline void gcode_M205() {
if (parser.seen('S')) retract_length = parser.value_axis_units(E_AXIS); if (parser.seen('S')) retract_length = parser.value_axis_units(E_AXIS);
if (parser.seen('F')) retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); if (parser.seen('F')) retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
if (parser.seen('Z')) retract_zlift = parser.value_linear_units(); if (parser.seen('Z')) retract_zlift = parser.value_linear_units();
if (parser.seen('W')) retract_length_swap = parser.value_axis_units(E_AXIS); if (parser.seen('W')) swap_retract_length = parser.value_axis_units(E_AXIS);
} }
/** /**
* M208: Set firmware un-retraction values * M208: Set firmware un-retraction values
* *
* S[+units] retract_recover_length (in addition to M207 S*) * S[+units] retract_recover_length (in addition to M207 S*)
* W[+units] retract_recover_length_swap (multi-extruder) * W[+units] swap_retract_recover_length (multi-extruder)
* F[units/min] retract_recover_feedrate_mm_s * F[units/min] retract_recover_feedrate_mm_s
* R[units/min] swap_retract_recover_feedrate_mm_s * R[units/min] swap_retract_recover_feedrate_mm_s
*/ */
@ -8577,7 +8577,7 @@ inline void gcode_M205() {
if (parser.seen('S')) retract_recover_length = parser.value_axis_units(E_AXIS); if (parser.seen('S')) retract_recover_length = parser.value_axis_units(E_AXIS);
if (parser.seen('F')) retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); if (parser.seen('F')) retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
if (parser.seen('R')) swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); if (parser.seen('R')) swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
if (parser.seen('W')) retract_recover_length_swap = parser.value_axis_units(E_AXIS); if (parser.seen('W')) swap_retract_recover_length = parser.value_axis_units(E_AXIS);
} }
/** /**

@ -132,8 +132,8 @@
* 513 M207 Z retract_zlift (float) * 513 M207 Z retract_zlift (float)
* 517 M208 S retract_recover_length (float) * 517 M208 S retract_recover_length (float)
* 521 M208 F retract_recover_feedrate_mm_s (float) * 521 M208 F retract_recover_feedrate_mm_s (float)
* 525 M207 W retract_length_swap (float) * 525 M207 W swap_retract_length (float)
* 529 M208 W retract_recover_length_swap (float) * 529 M208 W swap_retract_recover_length (float)
* 533 M208 R swap_retract_recover_feedrate_mm_s (float) * 533 M208 R swap_retract_recover_feedrate_mm_s (float)
* *
* Volumetric Extrusion: 21 bytes * Volumetric Extrusion: 21 bytes
@ -528,8 +528,8 @@ void MarlinSettings::postprocess() {
retract_zlift = 0, retract_zlift = 0,
retract_recover_length = 0, retract_recover_length = 0,
retract_recover_feedrate_mm_s = 0, retract_recover_feedrate_mm_s = 0,
retract_length_swap = 13, swap_retract_length = 13,
retract_recover_length_swap = 0, swap_retract_recover_length = 0,
swap_retract_recover_feedrate_mm_s = 8; swap_retract_recover_feedrate_mm_s = 8;
#endif #endif
EEPROM_WRITE(autoretract_enabled); EEPROM_WRITE(autoretract_enabled);
@ -538,8 +538,8 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(retract_zlift); EEPROM_WRITE(retract_zlift);
EEPROM_WRITE(retract_recover_length); EEPROM_WRITE(retract_recover_length);
EEPROM_WRITE(retract_recover_feedrate_mm_s); EEPROM_WRITE(retract_recover_feedrate_mm_s);
EEPROM_WRITE(retract_length_swap); EEPROM_WRITE(swap_retract_length);
EEPROM_WRITE(retract_recover_length_swap); EEPROM_WRITE(swap_retract_recover_length);
EEPROM_WRITE(swap_retract_recover_feedrate_mm_s); EEPROM_WRITE(swap_retract_recover_feedrate_mm_s);
EEPROM_WRITE(volumetric_enabled); EEPROM_WRITE(volumetric_enabled);
@ -920,8 +920,8 @@ void MarlinSettings::postprocess() {
EEPROM_READ(retract_zlift); EEPROM_READ(retract_zlift);
EEPROM_READ(retract_recover_length); EEPROM_READ(retract_recover_length);
EEPROM_READ(retract_recover_feedrate_mm_s); EEPROM_READ(retract_recover_feedrate_mm_s);
EEPROM_READ(retract_length_swap); EEPROM_READ(swap_retract_length);
EEPROM_READ(retract_recover_length_swap); EEPROM_READ(swap_retract_recover_length);
EEPROM_READ(swap_retract_recover_feedrate_mm_s); EEPROM_READ(swap_retract_recover_feedrate_mm_s);
#else #else
EEPROM_READ(dummyb); EEPROM_READ(dummyb);
@ -1292,8 +1292,8 @@ void MarlinSettings::reset() {
retract_zlift = RETRACT_ZLIFT; retract_zlift = RETRACT_ZLIFT;
retract_recover_length = RETRACT_RECOVER_LENGTH; retract_recover_length = RETRACT_RECOVER_LENGTH;
retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE; retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE;
retract_length_swap = RETRACT_LENGTH_SWAP; swap_retract_length = RETRACT_LENGTH_SWAP;
retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP; swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
#endif // FWRETRACT #endif // FWRETRACT
@ -1747,7 +1747,7 @@ void MarlinSettings::reset() {
} }
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M207 S", LINEAR_UNIT(retract_length)); SERIAL_ECHOPAIR(" M207 S", LINEAR_UNIT(retract_length));
SERIAL_ECHOPAIR(" W", LINEAR_UNIT(retract_length_swap)); SERIAL_ECHOPAIR(" W", LINEAR_UNIT(swap_retract_length));
SERIAL_ECHOPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_feedrate_mm_s))); SERIAL_ECHOPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_feedrate_mm_s)));
SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(retract_zlift)); SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(retract_zlift));
@ -1757,7 +1757,7 @@ void MarlinSettings::reset() {
} }
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M208 S", LINEAR_UNIT(retract_recover_length)); SERIAL_ECHOPAIR(" M208 S", LINEAR_UNIT(retract_recover_length));
SERIAL_ECHOPAIR(" W", LINEAR_UNIT(retract_recover_length_swap)); SERIAL_ECHOPAIR(" W", LINEAR_UNIT(swap_retract_recover_length));
SERIAL_ECHOLNPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_recover_feedrate_mm_s))); SERIAL_ECHOLNPAIR(" F", MMS_TO_MMM(LINEAR_UNIT(retract_recover_feedrate_mm_s)));
if (!forReplay) { if (!forReplay) {

@ -134,11 +134,11 @@
#define MSG_KILLED _UxGT("已杀掉") //"KILLED. " #define MSG_KILLED _UxGT("已杀掉") //"KILLED. "
#define MSG_STOPPED _UxGT("已停止") //"STOPPED. " #define MSG_STOPPED _UxGT("已停止") //"STOPPED. "
#define MSG_CONTROL_RETRACT _UxGT("回抽长度mm") //"Retract mm" retract_length, retract length (positive mm) #define MSG_CONTROL_RETRACT _UxGT("回抽长度mm") //"Retract mm" retract_length, retract length (positive mm)
#define MSG_CONTROL_RETRACT_SWAP _UxGT("换手回抽长度mm") //"Swap Re.mm" retract_length_swap, swap retract length (positive mm), for extruder change #define MSG_CONTROL_RETRACT_SWAP _UxGT("换手回抽长度mm") //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change
#define MSG_CONTROL_RETRACTF _UxGT("回抽速率mm/s") //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) #define MSG_CONTROL_RETRACTF _UxGT("回抽速率mm/s") //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s)
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Hop mm") //"Hop mm" retract_zlift, retract Z-lift #define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Hop mm") //"Hop mm" retract_zlift, retract Z-lift
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("回抽恢复长度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering) #define MSG_CONTROL_RETRACT_RECOVER _UxGT("回抽恢复长度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering)
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("换手回抽恢复长度mm") //"S UnRet+mm" retract_recover_length_swap, additional swap recover length (mm, added to retract length when recovering from extruder change) #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("换手回抽恢复长度mm") //"S UnRet+mm" swap_retract_recover_length, additional swap recover length (mm, added to retract length when recovering from extruder change)
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回抽恢复后进料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回抽恢复后进料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s)
#define MSG_AUTORETRACT _UxGT("自动抽回") //"AutoRetr." autoretract_enabled, #define MSG_AUTORETRACT _UxGT("自动抽回") //"AutoRetr." autoretract_enabled,
#define MSG_FILAMENTCHANGE _UxGT("更换丝料") //"Change filament" #define MSG_FILAMENTCHANGE _UxGT("更换丝料") //"Change filament"

@ -134,11 +134,11 @@
#define MSG_KILLED _UxGT("已殺掉") //"KILLED. " #define MSG_KILLED _UxGT("已殺掉") //"KILLED. "
#define MSG_STOPPED _UxGT("已停止") //"STOPPED. " #define MSG_STOPPED _UxGT("已停止") //"STOPPED. "
#define MSG_CONTROL_RETRACT _UxGT("回抽長度mm") //"Retract mm" retract_length, retract length (positive mm) #define MSG_CONTROL_RETRACT _UxGT("回抽長度mm") //"Retract mm" retract_length, retract length (positive mm)
#define MSG_CONTROL_RETRACT_SWAP _UxGT("換手回抽長度mm") //"Swap Re.mm" retract_length_swap, swap retract length (positive mm), for extruder change #define MSG_CONTROL_RETRACT_SWAP _UxGT("換手回抽長度mm") //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change
#define MSG_CONTROL_RETRACTF _UxGT("回抽速率mm/s") //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) #define MSG_CONTROL_RETRACTF _UxGT("回抽速率mm/s") //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s)
#define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Hop mm") //"Hop mm" retract_zlift, retract Z-lift #define MSG_CONTROL_RETRACT_ZLIFT _UxGT("Hop mm") //"Hop mm" retract_zlift, retract Z-lift
#define MSG_CONTROL_RETRACT_RECOVER _UxGT("回抽恢複長度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering) #define MSG_CONTROL_RETRACT_RECOVER _UxGT("回抽恢複長度mm") //"UnRet +mm" retract_recover_length, additional recover length (mm, added to retract length when recovering)
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("換手回抽恢複長度mm") //"S UnRet+mm" retract_recover_length_swap, additional swap recover length (mm, added to retract length when recovering from extruder change) #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("換手回抽恢複長度mm") //"S UnRet+mm" swap_retract_recover_length, additional swap recover length (mm, added to retract length when recovering from extruder change)
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回抽恢複後進料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("回抽恢複後進料速率mm/s") //"UnRet V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s)
#define MSG_AUTORETRACT _UxGT("自動抽回") //"AutoRetr." autoretract_enabled, #define MSG_AUTORETRACT _UxGT("自動抽回") //"AutoRetr." autoretract_enabled,
#define MSG_FILAMENTCHANGE _UxGT("更換絲料") //"Change filament" #define MSG_FILAMENTCHANGE _UxGT("更換絲料") //"Change filament"

@ -3373,13 +3373,13 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled); MENU_ITEM_EDIT(bool, MSG_AUTORETRACT, &autoretract_enabled);
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100); MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT, &retract_length, 0, 100);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &retract_length_swap, 0, 100); MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_SWAP, &swap_retract_length, 0, 100);
#endif #endif
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate_mm_s, 1, 999); MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACTF, &retract_feedrate_mm_s, 1, 999);
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999); MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_ZLIFT, &retract_zlift, 0, 999);
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, -100, 100); MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER, &retract_recover_length, -100, 100);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &retract_recover_length_swap, -100, 100); MENU_ITEM_EDIT(float52, MSG_CONTROL_RETRACT_RECOVER_SWAP, &swap_retract_recover_length, -100, 100);
#endif #endif
MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate_mm_s, 1, 999); MENU_ITEM_EDIT(float3, MSG_CONTROL_RETRACT_RECOVERF, &retract_recover_feedrate_mm_s, 1, 999);
END_MENU(); END_MENU();

Loading…
Cancel
Save