fix #688

Sun, 02 Dec 2012 18:03:06 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Sun, 02 Dec 2012 18:03:06 +0100
changeset 114
313aad7435a8
parent 113
b2d91fd5d926
child 115
bb150048d329

fix #688

blackbox/Makefile file | annotate | diff | comparison | revisions
blackbox/main.c file | annotate | diff | comparison | revisions
--- a/blackbox/Makefile	Sun Dec 02 13:24:42 2012 +0100
+++ b/blackbox/Makefile	Sun Dec 02 18:03:06 2012 +0100
@@ -18,6 +18,11 @@
 PORT=/dev/ttyS0
 endif
 
+PROGRAMMER=-P $(PORT) -c stk500v2
+ifdef IF
+PROGRAMMER=-c $(IF)
+endif
+
 #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c
 #SRC = main.c driver/rs232.c driver/manchester.c
 SRC = main.c driver/rs232.c driver/adc.c
@@ -79,13 +84,13 @@
 	rm $(PRG).map
 
 program: code
-	$(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i
+	$(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i
 
 backup:
-	$(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i
+	$(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i
 
 fuse:
-	$(AVRDUDE) -P $(PORT) -c stk500v2 -p $(MCU) -V $(FUSES)
+	$(AVRDUDE) -c $(PROGRAMMER) -p $(MCU) -V $(FUSES)
 
 clean:
 	rm -rf *.o *.elf *.elf.src *.s *.i
--- a/blackbox/main.c	Sun Dec 02 13:24:42 2012 +0100
+++ b/blackbox/main.c	Sun Dec 02 18:03:06 2012 +0100
@@ -484,7 +484,7 @@
     uint8_t i;
     for (i=0; i<MAX_SLOTS; i++) {
         slot[i].speedlimit = 15;
-        slot[i].speedminimum = 0;
+        //slot[i].speedminimum = 0; // issue #688
         slot[i].trackswitch = 0;
         slot[i].fuel = FUEL_FULL;
         slot[i].jumpstart_time = 0;

mercurial