Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.
0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
Expand Down Expand Up @@ -111,7 +111,7 @@ the following:
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ OBJECTS = main.o motion_control.o gcode.o spindle_control.o \
# $(ARDUINO_LIB)/PS2X_lib/PS2X_lib.o \
# ps2_controller.o \
# PS2Y_lib.o \

# FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m
FUSES = -U hfuse:w:0xd2:m -U lfuse:w:0xff:m

# Tune the lines below only if you know what you are doing:

AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10 -F
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10 -F
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I. -I$(ARDUINO) -I$(ARDUINO_LIB)

# symbolic targets:
all: grbl.hex

.c.o:
$(COMPILE) -c $< -o $@
$(COMPILE) -c $< -o $@

.cpp.o:
$(COMPILE) -c $< -o $@
$(COMPILE) -c $< -o $@


.S.o:
Expand Down Expand Up @@ -116,4 +116,4 @@ disasm: main.elf
avr-objdump -d main.elf

cpp:
$(COMPILE) -E main.c
$(COMPILE) -E main.c
16 changes: 8 additions & 8 deletions config.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
config.c - eeprom and compile time configuration handling
config.c - eeprom and compile time configuration handling
Part of Grbl

Copyright (c) 2009 Simen Svale Skogsrud
Expand Down Expand Up @@ -48,18 +48,18 @@ void dump_settings() {
printPgmString(PSTR(" (microseconds step pulse)\r\n$4 = ")); printFloat(settings.default_feed_rate);
printPgmString(PSTR(" (mm/sec default feed rate)\r\n$5 = ")); printFloat(settings.default_seek_rate);
printPgmString(PSTR(" (mm/sec G0 seek rate)\r\n$6 = ")); printFloat(settings.mm_per_arc_segment);
printPgmString(PSTR(" (mm/arc segment)\r\n$7 = ")); printInteger(settings.invert_mask);
printPgmString(PSTR(" (step port invert mask. binary = ")); printIntegerInBase(settings.invert_mask, 2);
printPgmString(PSTR(")\r\n$8 = "));printInteger(settings.backlash_x_count);
printPgmString(PSTR("(counts to compensate for backlash in x)\r\n$9 = "));printInteger(settings.backlash_y_count);
printPgmString(PSTR("(counts to compensate for backlash in x)\r\n$10 = "));printInteger(settings.backlash_z_count);
printPgmString(PSTR(" (mm/arc segment)\r\n$7 = ")); printInteger(settings.invert_mask);
printPgmString(PSTR(" (step port invert mask. binary = ")); printIntegerInBase(settings.invert_mask, 2);
printPgmString(PSTR(")\r\n$8 = "));printInteger(settings.backlash_x_count);
printPgmString(PSTR("(counts to compensate for backlash in x)\r\n$9 = "));printInteger(settings.backlash_y_count);
printPgmString(PSTR("(counts to compensate for backlash in x)\r\n$10 = "));printInteger(settings.backlash_z_count);
printPgmString(PSTR("(counts to compensate for backlash in z)\r\n"));
printPgmString(PSTR("\r\n'$x=value' to set parameter or just '$' to dump current settings\r\n"));
}

int read_settings() {
// Check version-byte of eeprom
uint8_t version = eeprom_get_char(0);
uint8_t version = eeprom_get_char(0);
if (version != SETTINGS_VERSION) { return(FALSE); }
// Read settings-record and check checksum
if (!(memcpy_from_eeprom_with_checksum((char*)&settings, 1, sizeof(struct Settings)))) {
Expand All @@ -86,7 +86,7 @@ void store_setting(int parameter, double value) {
case 8: settings.backlash_x_count= trunc(value); break;
case 9: settings.backlash_y_count= trunc(value); break;
case 10: settings.backlash_z_count= trunc(value); break;
default:
default:
printPgmString(PSTR("Unknown parameter\r\n"));
return;
}
Expand Down
6 changes: 3 additions & 3 deletions config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
config.h - eeprom and compile time configuration handling
config.h - eeprom and compile time configuration handling
Part of Grbl

Copyright (c) 2009 Simen Svale Skogsrud
Expand Down Expand Up @@ -31,10 +31,10 @@

#define STEPPERS_ENABLE_DDR DDRB // pin 13, with LED
#define STEPPERS_ENABLE_PORT PORTB
#define STEPPERS_ENABLE_BIT 5
#define STEPPERS_ENABLE_BIT 5

#define STEPPING_DDR DDRD
#define STEPPING_PORT PORTD
#define STEPPING_PORT PORTD
#define X_STEP_BIT 7
#define Y_STEP_BIT 5
#define Z_STEP_BIT 3
Expand Down
Loading