示例#1
0
static void _controller_HSM()
{
//----- kernel level ISR handlers ----(flags are set in ISRs)-----------//
											// Order is important:
	DISPATCH(_reset_handler());				// 1. software reset received
	DISPATCH(_bootloader_handler());		// 2. received ESC char to start bootloader
	DISPATCH(_limit_switch_handler());		// 3. limit switch has been thrown
	DISPATCH(_shutdown_idler());			// 4. idle in shutdown state
	DISPATCH(_system_assertions());			// 5. system integrity assertions
	DISPATCH(_feedhold_handler());			// 6. feedhold requested
	DISPATCH(_cycle_start_handler());		// 7. cycle start requested

//----- planner hierarchy for gcode and cycles -------------------------//
	DISPATCH(rpt_status_report_callback());	// conditionally send status report
	DISPATCH(rpt_queue_report_callback());	// conditionally send queue report
	DISPATCH(mp_plan_hold_callback());		// plan a feedhold
	DISPATCH(mp_end_hold_callback());		// end a feedhold
	DISPATCH(ar_arc_callback());			// arc generation runs behind lines
	DISPATCH(cm_homing_callback());			// G28.2 continuation

//----- command readers and parsers ------------------------------------//
	DISPATCH(_sync_to_planner());			// ensure there is at least one free buffer in planning queue
	DISPATCH(_sync_to_tx_buffer());			// sync with TX buffer (pseudo-blocking)
	DISPATCH(cfg_baud_rate_callback());		// perform baud rate update (must be after TX sync)
	DISPATCH(_dispatch());					// read and execute next command
}
示例#2
0
static void _controller_HSM()
{
//----- kernel level ISR handlers ----(flags are set in ISRs)-----------//
	DISPATCH(gpio_switch_handler());		// limit and homing switch handler
	DISPATCH(_abort_handler());				// abort signal
	DISPATCH(_feedhold_handler());			// feedhold signal
	DISPATCH(_cycle_start_handler());		// cycle start signal

//----- planner hierarchy for gcode and cycles -------------------------//
	DISPATCH(rpt_status_report_callback());	// conditionally send status report
	DISPATCH(rpt_queue_report_callback());	// conditionally send queue report
	DISPATCH(mp_plan_hold_callback());		// plan a feedhold
	DISPATCH(mp_end_hold_callback());		// end a feedhold
	DISPATCH(ar_arc_callback());			// arc generation runs behind lines
	DISPATCH(cm_homing_callback());			// G28.1 continuation

//----- command readers and parsers ------------------------------------//
	DISPATCH(_sync_to_tx_buffer());			// sync with TX buffer (pseudo-blocking)
	DISPATCH(_sync_to_planner());			// sync with planning queue
	DISPATCH(_dispatch());					// read and execute next command
}