🚸 Filament Sensor, M412 changes

This commit is contained in:
Scott Lahteine
2025-10-01 14:18:39 -05:00
parent 84b22fcc1d
commit c0a544d385
3 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -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)
);
+3
View File
@@ -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
+1 -1
View File
@@ -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