AUTO_REPORT_REAL_POSITION option for M154 (#25738)

This commit is contained in:
TheSnowfield 2023-04-27 20:37:11 +08:00 committed by GitHub
parent 9a7d9e6995
commit 959f7308e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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