✨ AUTO_REPORT_REAL_POSITION option for M154 (#25738)
This commit is contained in:
parent
9a7d9e6995
commit
959f7308e7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue