ARM: get dda_maths.c, dda_kinematics.c and dda.c in.
All in one chunk, because it's all hardware-independent and doing them one by one would end up on not more than some typing exercises. Compiles fine. For testing, remove if (DEBUG... for M114 in gcode_process.c. Then one can see how the queue fills up when sending movements and M114 repeatedly. This time with actual coordinates. No stepper movements, yet, because set_timer() is still empty.
This commit is contained in:
parent
692a6daeb2
commit
5a8d51cb19
|
|
@ -99,7 +99,7 @@ TARGET = $(PROGRAM).hex
|
|||
# in #ifdef __AVR__. To avoid this, build only a selection for now:
|
||||
SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c
|
||||
SOURCES += gcode_parse.c gcode_process.c pinio.c timer.c clock.c
|
||||
SOURCES += dda_queue.c
|
||||
SOURCES += dda_queue.c dda_maths.c dda_kinematics.c dda.c
|
||||
ifeq ($(MCU), lpc1114)
|
||||
SOURCES += cmsis-system_lpc11xx.c
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -42,3 +42,7 @@
|
|||
Lookahead disabled.
|
||||
#undef LOOKAHEAD
|
||||
#endif
|
||||
|
||||
#ifdef __ARMEL_NOTYET__
|
||||
#undef LOOKAHEAD
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static const axes_uint32_t PROGMEM maximum_jerk_P = {
|
|||
* exceeding the expected jerk. Worst case this speed is zero, which means a
|
||||
* full stop between both moves. Best case it's the lower of the maximum speeds.
|
||||
*
|
||||
* This function is expected to be called from within dda_start().
|
||||
* This function is expected to be called from within dda_create().
|
||||
*
|
||||
* \param [in] prev is the DDA structure of the move previous to the current one.
|
||||
* \param [in] current is the DDA structure of the move currently created.
|
||||
|
|
|
|||
|
|
@ -90,9 +90,7 @@ void queue_step() {
|
|||
}
|
||||
}
|
||||
else {
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
dda_step(current_movebuffer);
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -126,9 +124,7 @@ void enqueue_home(TARGET *t, uint8_t endstop_check, uint8_t endstop_stop_cond) {
|
|||
// it's a wait for temp
|
||||
new_movebuffer->waitfor_temp = 1;
|
||||
}
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
dda_create(new_movebuffer, t);
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
|
||||
// make certain all writes to global memory
|
||||
// are flushed before modifying mb_head.
|
||||
|
|
@ -173,9 +169,7 @@ void next_move() {
|
|||
timer_set(HEATER_WAIT_TIMEOUT, 0);
|
||||
}
|
||||
else {
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
dda_start(current_movebuffer);
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,14 +46,12 @@ uint8_t next_tool;
|
|||
void process_gcode_command() {
|
||||
uint32_t backup_f;
|
||||
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
// convert relative to absolute
|
||||
if (next_target.option_all_relative) {
|
||||
next_target.target.axis[X] += startpoint.axis[X];
|
||||
next_target.target.axis[Y] += startpoint.axis[Y];
|
||||
next_target.target.axis[Z] += startpoint.axis[Z];
|
||||
}
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
|
||||
// E relative movement.
|
||||
// Matches Sprinter's behaviour as of March 2012.
|
||||
|
|
@ -101,9 +99,8 @@ void process_gcode_command() {
|
|||
}
|
||||
|
||||
if (next_target.seen_G) {
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
uint8_t axisSelected = 0;
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
|
||||
switch (next_target.G) {
|
||||
case 0:
|
||||
//? G0: Rapid Linear Motion
|
||||
|
|
@ -272,7 +269,6 @@ void process_gcode_command() {
|
|||
|
||||
queue_wait();
|
||||
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
if (next_target.seen_X) {
|
||||
startpoint.axis[X] = next_target.target.axis[X];
|
||||
axisSelected = 1;
|
||||
|
|
@ -298,7 +294,6 @@ void process_gcode_command() {
|
|||
}
|
||||
|
||||
dda_new_startpoint();
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
break;
|
||||
|
||||
case 161:
|
||||
|
|
@ -641,13 +636,11 @@ void process_gcode_command() {
|
|||
// wait for all moves to complete
|
||||
queue_wait();
|
||||
#endif
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
update_current_position();
|
||||
sersendf_P(PSTR("X:%lq,Y:%lq,Z:%lq,E:%lq,F:%lu\n"),
|
||||
current_position.axis[X], current_position.axis[Y],
|
||||
current_position.axis[Z], current_position.axis[E],
|
||||
current_position.F);
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
|
||||
if (DEBUG_POSITION && (debug_flags & DEBUG_POSITION)) {
|
||||
sersendf_P(PSTR("Endpoint: X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}\n"),
|
||||
|
|
|
|||
2
mendel.c
2
mendel.c
|
|
@ -100,10 +100,12 @@ void init(void) {
|
|||
#ifndef __ARMEL_NOTYET__
|
||||
// read PID settings from EEPROM
|
||||
heater_init();
|
||||
#endif /* __ARMEL_NOTYET__ */
|
||||
|
||||
// set up dda
|
||||
dda_init();
|
||||
|
||||
#ifndef __ARMEL_NOTYET__
|
||||
// start up analog read interrupt loop,
|
||||
// if any of the temp sensors in your config.h use analog interface
|
||||
analog_init();
|
||||
|
|
|
|||
Loading…
Reference in New Issue