tinyG 总共开了4 个定时器
dweel 是G4的G代码: 功能就是暂停功能;
exec 是运行 功能
DDA: dda 算法定时器
load : 加载 功能定时器
enum moveType { // bf->move_type values
MOVE_TYPE_NULL = 0, // null move - does a no-op
MOVE_TYPE_ALINE, // acceleration planned line
MOVE_TYPE_DWELL, // delay with no movement
MOVE_TYPE_COMMAND, // general command
MOVE_TYPE_TOOL, // T command
MOVE_TYPE_SPINDLE_SPEED,// S command
MOVE_TYPE_STOP, // program stop
MOVE_TYPE_END // program end
};
运行模式
stepper 三个重要结构体
st_pre 从planner 传值进来
static stat_t _exec_command(mpBuf_t *bf){
st_prep_command(bf);
return (STAT_OK);
}
st 可能是指 stepper ,prep是准备的数据
在_load把 st _pre 传给 st_run
(st_run.mot[MOTOR_2].substep_increment = st_pre.mot[MOTOR_2].substep_increment
st_cfg 是配置
canonical_machine.c - rs274/ngc canonical machine.
Gcode 的解析和liunxcnc 是相通的,rs274/ngc 的解析器
流程比较难:
理清流程有时间。