Skip to content

Commit 959f730

Browse files
authored
✨ AUTO_REPORT_REAL_POSITION option for M154 (MarlinFirmware#25738)
1 parent 9a7d9e6 commit 959f730

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Marlin/Configuration_adv.h

+3
Original file line numberDiff line numberDiff line change
@@ -3733,6 +3733,9 @@
37333733
* Auto-report position with M154 S<seconds>
37343734
*/
37353735
//#define AUTO_REPORT_POSITION
3736+
#if ENABLED(AUTO_REPORT_POSITION)
3737+
//#define AUTO_REPORT_REAL_POSITION // Auto-report the real position
3738+
#endif
37363739

37373740
/**
37383741
* Include capabilities in M115 output

Marlin/src/module/motion.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ void report_current_position_projected();
259259

260260
#if ENABLED(AUTO_REPORT_POSITION)
261261
#include "../libs/autoreport.h"
262-
struct PositionReport { static void report() { report_current_position_projected(); } };
262+
struct PositionReport { static void report() {
263+
TERN(AUTO_REPORT_REAL_POSITION, report_real_position(), report_current_position_projected());
264+
} };
263265
extern AutoReporter<PositionReport> position_auto_reporter;
264266
#endif
265267

0 commit comments

Comments
 (0)