Exemplo n.º 1
0
Arquivo: planner.c Projeto: ADTL/TinyG
/* 
 * mp_flush_planner() - flush all moves in the planner and all arcs
 *
 *	Does not affect the move currently running in mr.
 *	Does not affect mm or gm model positions
 *	This function is designed to be called during a hold to reset the planner
 *	This function should not generally be called; call cm_flush_planner() instead
 */
void mp_flush_planner()
{
	ar_abort_arc();
	mp_init_buffers();
	cm.motion_state = MOTION_STOP;
//	copy_axis_vector(mm.position, mr.position);
}
Exemplo n.º 2
0
/*
 * planner_init()
 */
void planner_init()
{
// If you know all memory has been zeroed by a hard reset you don't need these next 2 lines
	memset(&mr, 0, sizeof(mr));	// clear all values, pointers and status
	memset(&mm, 0, sizeof(mm));	// clear all values, pointers and status
	planner_init_assertions();
	mp_init_buffers();
}
Exemplo n.º 3
0
Arquivo: planner.c Projeto: ADTL/TinyG
void mp_init()
{
// You can assume all memory has been zeroed by a hard reset. If not, use this code:
//	memset(&mr, 0, sizeof(mr));	// clear all values, pointers and status
//	memset(&mm, 0, sizeof(mm));	// clear all values, pointers and status

	mr.magic_start = MAGICNUM;
	mr.magic_end = MAGICNUM;
	ar.magic_start = MAGICNUM;
	ar.magic_end = MAGICNUM;
	mp_init_buffers();
}
Exemplo n.º 4
0
/*
 * mp_flush_planner() - flush all moves in the planner and all arcs
 *
 *	Does not affect the move currently running in mr.
 *	Does not affect mm or gm model positions
 *	This function is designed to be called during a hold to reset the planner
 *	This function should not generally be called; call cm_queue_flush() instead
 */
void mp_flush_planner()
{
	cm_abort_arc();
	mp_init_buffers();
	cm_set_motion_state(MOTION_STOP);
}