M154 Position Auto-Report (#18427)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Luu Lac
2021-05-15 15:02:20 -05:00
committed by Scott Lahteine
parent b6e1838fa6
commit e3998dc3df
12 changed files with 73 additions and 2 deletions

View File

@ -230,6 +230,11 @@ void report_current_position_projected() {
stepper.report_a_position(planner.position);
}
#if ENABLED(AUTO_REPORT_POSITION)
//struct PositionReport { void report() { report_current_position_projected(); } };
AutoReporter<PositionReport> position_auto_reporter;
#endif
#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS)
M_StateEnum M_State_grbl = M_INIT;

View File

@ -211,6 +211,12 @@ void report_real_position();
void report_current_position();
void report_current_position_projected();
#if ENABLED(AUTO_REPORT_POSITION)
#include "../libs/autoreport.h"
struct PositionReport { static void report() { report_current_position_projected(); } };
extern AutoReporter<PositionReport> position_auto_reporter;
#endif
#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS)
#define HAS_GRBL_STATE 1
/**