🚸 Filament Sensor, M412 changes
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
* S<bool> : Reset and enable/disable the runout sensor
|
||||
* H<bool> : Enable/disable host handling of filament runout
|
||||
* D<linear> : Extra distance to continue after runout is triggered
|
||||
*
|
||||
* With FILAMENT_SWITCH_AND_MOTION:
|
||||
* L<linear> : Missing motion length to consider a jam
|
||||
*/
|
||||
void GcodeSuite::M412() {
|
||||
if (parser.seen("RS"
|
||||
@@ -51,7 +54,7 @@ void GcodeSuite::M412() {
|
||||
if (parser.seenval('D')) runout.set_runout_distance(parser.value_linear_units());
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
if (parser.seenval('M')) runout.set_motion_distance(parser.value_linear_units());
|
||||
if (parser.seenval('L')) runout.set_motion_distance(parser.value_linear_units());
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
@@ -80,7 +83,7 @@ void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
|
||||
, " D", LINEAR_UNIT(runout.runout_distance())
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
, " M", LINEAR_UNIT(runout.motion_distance())
|
||||
, " L", LINEAR_UNIT(runout.motion_distance())
|
||||
#endif
|
||||
, " ; Sensor ", ON_OFF(runout.enabled)
|
||||
);
|
||||
|
||||
@@ -71,8 +71,11 @@
|
||||
#undef HOTEND_OVERSHOOT
|
||||
#undef DISABLE_E
|
||||
#undef PREVENT_LENGTHY_EXTRUDE
|
||||
#undef FILAMENT_SWITCH_AND_MOTION
|
||||
#undef FILAMENT_RUNOUT_SENSOR
|
||||
#undef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#undef FILAMENT_MOTION_SENSOR
|
||||
#undef FILAMENT_MOTION_DISTANCE_MM
|
||||
#undef DISABLE_OTHER_EXTRUDERS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ typedef struct SettingsDataStruct {
|
||||
//
|
||||
bool runout_sensor_enabled; // M412 S
|
||||
float runout_distance_mm; // M412 D
|
||||
float motion_distance_mm; // M412 M
|
||||
float motion_distance_mm; // M412 L
|
||||
|
||||
//
|
||||
// ENABLE_LEVELING_FADE_HEIGHT
|
||||
|
||||
Reference in New Issue
Block a user