# HG changeset patch # User Malte Bayer # Date 1387639266 -3600 # Node ID 80be5eb283d306c43c70013c558ed794670429c8 # Parent 8f07a8d15826b240fc685bfa48aa8029558603c2 optimized fuses, rx binary crap filter diff -r 8f07a8d15826 -r 80be5eb283d3 blackbox/Makefile --- a/blackbox/Makefile Sat Dec 21 14:54:21 2013 +0100 +++ b/blackbox/Makefile Sat Dec 21 16:21:06 2013 +0100 @@ -2,7 +2,8 @@ MCU=atmega16 #FUSES=-U lfuse:w:0x3f:m -U hfuse:w:0xd8:m -FUSES=-U lfuse:w:0x2f:m -U hfuse:w:0xc8:m +#FUSES=-U lfuse:w:0x2f:m -U hfuse:w:0xc8:m +FUSES=-U lfuse:w:0x3c:m -U hfuse:w:0xc9:m BOOTFUSES=-U lfuse:w:0xff:m -U hfuse:w:0xce:m #F_CPU=4185600 @@ -95,7 +96,7 @@ $(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i fuse: - $(AVRDUDE) -c $(PROGRAMMER) -p $(MCU) -V $(FUSES) + $(AVRDUDE) $(PROGRAMMER) -p $(MCU) -V $(FUSES) clean: rm -rf *.o *.elf *.elf.src *.s *.i diff -r 8f07a8d15826 -r 80be5eb283d3 blackbox/main.c --- a/blackbox/main.c Sat Dec 21 14:54:21 2013 +0100 +++ b/blackbox/main.c Sat Dec 21 16:21:06 2013 +0100 @@ -260,7 +260,7 @@ slot[tmp].unlimitedfuel = 0; if ((buffer[2]-'0') != 0) slot[tmp].unlimitedfuel = 1; RS232_puts_p(ok); - } RS232_puts_p(error); + } else RS232_puts_p(error); break; case 'L': // Limit maximum speed for a car diff -r 8f07a8d15826 -r 80be5eb283d3 slotUI/freeslot.py --- a/slotUI/freeslot.py Sat Dec 21 14:54:21 2013 +0100 +++ b/slotUI/freeslot.py Sat Dec 21 16:21:06 2013 +0100 @@ -125,7 +125,11 @@ self.com.readline() # clear to next linefeed line = "RW:%i:%i:%i:%i:%x\n" % (slot, track, sender, status, clk) self.log.write(line) - return line + if line.find(chr(0)) == -1: + return line + else: + self.log.write("malformed RX\n") + return "" def query(self, msg): if self.com: