minor edits

This commit is contained in:
Simen Svale Skogsrud 2010-07-08 14:55:43 +02:00
parent d0f64d8f65
commit 0ac1731488
6 changed files with 19 additions and 17 deletions

View File

@ -25,8 +25,8 @@
// Settings that can only be set at compile-time: // Settings that can only be set at compile-time:
// #define BAUD_RATE 9600 #define BAUD_RATE 9600
#define BAUD_RATE 115200 //#define BAUD_RATE 115200
#define STEPPERS_ENABLE_DDR DDRD #define STEPPERS_ENABLE_DDR DDRD
#define STEPPERS_ENABLE_PORT PORTD #define STEPPERS_ENABLE_PORT PORTD

10
gcode.c
View File

@ -141,11 +141,13 @@ uint8_t gc_execute_line(char *line) {
gc.status_code = GCSTATUS_OK; gc.status_code = GCSTATUS_OK;
/* First: parse all statements */ // Disregard comments and block delete
if (line[0] == '(') { return(gc.status_code); } if (line[0] == '(') { return(gc.status_code); }
if (line[0] == '/') { char_counter++; } // ignore block delete if (line[0] == '/') { char_counter++; } // ignore block delete
if (line[0] == '$') { // This is a parameter line intended to change EEPROM-settings
// If the line starts with an '$' it is a configuration-command
if (line[0] == '$') {
// Parameter lines are on the form '$4=374.3' or '$' to dump current settings // Parameter lines are on the form '$4=374.3' or '$' to dump current settings
char_counter = 1; char_counter = 1;
if(line[char_counter] == 0) { dump_settings(); return(GCSTATUS_OK); } if(line[char_counter] == 0) { dump_settings(); return(GCSTATUS_OK); }
@ -156,6 +158,8 @@ uint8_t gc_execute_line(char *line) {
store_setting(p, value); store_setting(p, value);
} }
/* We'll handle this as g-code. First: parse all statements */
// Pass 1: Commands // Pass 1: Commands
while(next_statement(&letter, &value, line, &char_counter)) { while(next_statement(&letter, &value, line, &char_counter)) {
int_value = trunc(value); int_value = trunc(value);

View File

@ -1,3 +1,4 @@
# socat -d -d READLINE /dev/tty.usbserial-A9007QcR,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1 # socat -d -d READLINE /dev/tty.usbserial-FTE3HK2C,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1
socat -d -d READLINE /dev/tty.FireFly-A964-SPP-1,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1 socat -d -d READLINE /dev/tty.usbserial-A9007QcR,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1
# socat -d -d READLINE /dev/tty.FireFly-A964-SPP-1,clocal=1,nonblock=1,cread=1,cs8,ixon=1,ixoff=1

View File

@ -1,2 +1,2 @@
#!/opt/local/bin/ruby #!/usr/bin/ruby
require 'script/stream' require 'script/stream'

View File

@ -24,7 +24,9 @@ if ARGV.empty?
exit exit
end end
SerialPort.open('/dev/tty.FireFly-A964-SPP-1', 115200) do |sp|
SerialPort.open('/dev/tty.usbserial-A9007QcR', 9600) do |sp|
#SerialPort.open('/dev/tty.usbserial-FTE3HK2C', 9600) do |sp|
sp.write("\r\n\r\n"); sp.write("\r\n\r\n");
sleep 1 sleep 1
ARGV.each do |file| ARGV.each do |file|

View File

@ -1,5 +0,0 @@
* Complete support for using and setting separate seek-rate for G0-commnads
* Implement limit switch support in stepper.c (use port-triggered interrupts?)
* Implement homing cycle in stepper.c
* Path Control Modes
* Spindle speed support