reduce diffs with dev branch
This commit is contained in:
parent
8c9f3bca65
commit
d3322ccded
@ -47,7 +47,7 @@ void coolant_run(uint8_t mode)
|
|||||||
{
|
{
|
||||||
if (sys.state == STATE_CHECK_MODE) { return; }
|
if (sys.state == STATE_CHECK_MODE) { return; }
|
||||||
|
|
||||||
protocol_auto_cycle_start();
|
protocol_auto_cycle_start(); //temp fix for M8 lockup
|
||||||
protocol_buffer_synchronize(); // Ensure coolant turns on when specified in program.
|
protocol_buffer_synchronize(); // Ensure coolant turns on when specified in program.
|
||||||
if (mode == COOLANT_FLOOD_ENABLE) {
|
if (mode == COOLANT_FLOOD_ENABLE) {
|
||||||
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
|
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
|
||||||
|
2
gcode.c
2
gcode.c
@ -62,7 +62,7 @@ void gc_sync_position()
|
|||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
for (i=0; i<N_AXIS; i++) {
|
for (i=0; i<N_AXIS; i++) {
|
||||||
gc_state.position[i] = sys.position[i]/settings.steps_per_mm[i];
|
gc_state.position[i] = sys.position[i]/settings.steps_per_mm[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
serial.c
2
serial.c
@ -178,7 +178,7 @@ ISR(SERIAL_RX)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
//TODO: some sort of alarm on overflow?
|
//TODO: else alarm on overflow?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
PLATFORM = LINUX
|
PLATFORM = LINUX
|
||||||
|
|
||||||
OBJECTS = main.o simulator.o serial.o ../main.o ../protocol.o ../planner.o ../settings.o ../print.o ../nuts_bolts.o eeprom.o ../serial.o avr/pgmspace.o avr/interrupt.o avr/io.o util/delay.o util/floatunsisf.o ../stepper.o ../gcode.o ../spindle_control.o ../motion_control.o ../limits.o ../report.o ../coolant_control.o ../probe.o ../system.o kbhit.o platform_$(PLATFORM).o
|
OBJECTS = main.o simulator.o serial.o ../main.o ../protocol.o ../planner.o ../settings.o ../print.o ../nuts_bolts.o eeprom.o ../serial.o avr/pgmspace.o avr/interrupt.o avr/io.o util/delay.o util/floatunsisf.o ../stepper.o ../gcode.o ../spindle_control.o ../motion_control.o ../limits.o ../report.o ../coolant_control.o ../probe.o ../system.o platform_$(PLATFORM).o
|
||||||
CLOCK = 16000000
|
CLOCK = 16000000
|
||||||
EXE_NAME = grbl_sim.exe
|
EXE_NAME = grbl_sim.exe
|
||||||
COMPILE = $(CC) -Wall -g -DF_CPU=$(CLOCK) -include config.h -I. -DPLAT_$(PLATFORM)
|
COMPILE = $(CC) -Wall -g -DF_CPU=$(CLOCK) -include config.h -I. -DPLAT_$(PLATFORM)
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
#include <sys/types.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
#include "kbhit.h"
|
|
||||||
|
|
||||||
|
|
@ -26,8 +26,6 @@
|
|||||||
#include "simulator.h"
|
#include "simulator.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "kbhit.h"
|
|
||||||
|
|
||||||
|
|
||||||
//prototypes for overridden functions
|
//prototypes for overridden functions
|
||||||
uint8_t orig_serial_read();
|
uint8_t orig_serial_read();
|
||||||
|
@ -60,7 +60,7 @@ void spindle_run(uint8_t direction, float rpm)
|
|||||||
if (sys.state == STATE_CHECK_MODE) { return; }
|
if (sys.state == STATE_CHECK_MODE) { return; }
|
||||||
|
|
||||||
// Empty planner buffer to ensure spindle is set when programmed.
|
// Empty planner buffer to ensure spindle is set when programmed.
|
||||||
protocol_auto_cycle_start();
|
protocol_auto_cycle_start(); //temp fix for M3 lockup
|
||||||
protocol_buffer_synchronize();
|
protocol_buffer_synchronize();
|
||||||
|
|
||||||
// Halt or set spindle direction and rpm.
|
// Halt or set spindle direction and rpm.
|
||||||
|
14
stepper.c
14
stepper.c
@ -76,9 +76,6 @@ typedef struct {
|
|||||||
#else
|
#else
|
||||||
uint8_t prescaler; // Without AMASS, a prescaler is required to adjust for slow timing.
|
uint8_t prescaler; // Without AMASS, a prescaler is required to adjust for slow timing.
|
||||||
#endif
|
#endif
|
||||||
#ifdef AUTO_REPORT_MOVE_DONE
|
|
||||||
uint8_t block_end; //true for last segment of a block
|
|
||||||
#endif
|
|
||||||
} segment_t;
|
} segment_t;
|
||||||
static segment_t segment_buffer[SEGMENT_BUFFER_SIZE];
|
static segment_t segment_buffer[SEGMENT_BUFFER_SIZE];
|
||||||
|
|
||||||
@ -284,7 +281,7 @@ void st_go_idle()
|
|||||||
// with probing and homing cycles that require true real-time positions.
|
// with probing and homing cycles that require true real-time positions.
|
||||||
ISR(TIMER1_COMPA_vect)
|
ISR(TIMER1_COMPA_vect)
|
||||||
{
|
{
|
||||||
// TIMING_ENABLE_PORT ^= 1<<TIMING_ENABLE_BIT; // Debug: Used to time ISR
|
// SPINDLE_ENABLE_PORT ^= 1<<SPINDLE_ENABLE_BIT; // Debug: Used to time ISR
|
||||||
if (busy) { return; } // The busy-flag is used to avoid reentering this interrupt
|
if (busy) { return; } // The busy-flag is used to avoid reentering this interrupt
|
||||||
|
|
||||||
// Set the direction pins a couple of nanoseconds before we step the steppers
|
// Set the direction pins a couple of nanoseconds before we step the steppers
|
||||||
@ -398,9 +395,6 @@ ISR(TIMER1_COMPA_vect)
|
|||||||
st.step_count--; // Decrement step events count
|
st.step_count--; // Decrement step events count
|
||||||
if (st.step_count == 0) {
|
if (st.step_count == 0) {
|
||||||
// Segment is complete. Discard current segment and advance segment indexing.
|
// Segment is complete. Discard current segment and advance segment indexing.
|
||||||
#ifdef AUTO_REPORT_MOVE_DONE
|
|
||||||
sys.execute |= st.exec_segment->block_end;
|
|
||||||
#endif
|
|
||||||
st.exec_segment = NULL;
|
st.exec_segment = NULL;
|
||||||
if ( ++segment_buffer_tail == SEGMENT_BUFFER_SIZE) { segment_buffer_tail = 0; }
|
if ( ++segment_buffer_tail == SEGMENT_BUFFER_SIZE) { segment_buffer_tail = 0; }
|
||||||
}
|
}
|
||||||
@ -799,14 +793,8 @@ void st_prep_buffer()
|
|||||||
// Normal operation. Block incomplete. Distance remaining in block to be executed.
|
// Normal operation. Block incomplete. Distance remaining in block to be executed.
|
||||||
pl_block->millimeters = mm_remaining;
|
pl_block->millimeters = mm_remaining;
|
||||||
prep.steps_remaining = steps_remaining;
|
prep.steps_remaining = steps_remaining;
|
||||||
#ifdef AUTO_REPORT_MOVE_DONE
|
|
||||||
prep_segment->block_end = 0;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
// End of planner block or forced-termination. No more distance to be executed.
|
// End of planner block or forced-termination. No more distance to be executed.
|
||||||
#ifdef AUTO_REPORT_MOVE_DONE
|
|
||||||
prep_segment->block_end = EXEC_STATUS_REPORT; // force move-done report
|
|
||||||
#endif
|
|
||||||
if (mm_remaining > 0.0) { // At end of forced-termination.
|
if (mm_remaining > 0.0) { // At end of forced-termination.
|
||||||
// Reset prep parameters for resuming and then bail.
|
// Reset prep parameters for resuming and then bail.
|
||||||
// NOTE: Currently only feed holds qualify for this scenario. May change with overrides.
|
// NOTE: Currently only feed holds qualify for this scenario. May change with overrides.
|
||||||
|
Loading…
Reference in New Issue
Block a user