Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔨M154 Auto-report the real position #25738

Merged
merged 3 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,9 @@
* Auto-report position with M154 S<seconds>
*/
//#define AUTO_REPORT_POSITION
#if ENABLED(AUTO_REPORT_POSITION)
//#define AUTO_REPORT_REAL_POSITION // Auto-report the real position
#endif

/**
* Include capabilities in M115 output
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ void report_current_position_projected();

#if ENABLED(AUTO_REPORT_POSITION)
#include "../libs/autoreport.h"
struct PositionReport { static void report() { report_current_position_projected(); } };
struct PositionReport { static void report() {
TERN(AUTO_REPORT_REAL_POSITION, report_real_position(), report_current_position_projected());
} };
extern AutoReporter<PositionReport> position_auto_reporter;
#endif

Expand Down