X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee-avr.git;a=blobdiff_plain;f=main.c;h=0d5cad65d3558c8456c7eab9d8bb35128a094730;hp=8e2aa0ef58618dc97c5a9276bee584ab8373bde5;hb=f74db5fd03bcd38af3ca533e7531dd70454dfaaf;hpb=9a43add2f0ed382ce1f180bba65fdc077d03b6fb diff --git a/main.c b/main.c index 8e2aa0e..0d5cad6 100644 --- a/main.c +++ b/main.c @@ -26,7 +26,7 @@ */ /* fuses: - * avrdude -p atmega1284p -P usb -c avrispmkii -U lfuse:w:0xff:m -U hfuse:w:0x99:m -U efuse:w:0xff:m + * avrdude -p atmega1284p -P usb -c avrispmkii -U lfuse:w:0xff:m -U hfuse:w:0x91:m -U efuse:w:0xff:m */ #include @@ -52,6 +52,7 @@ #include #include +#include "eeprom_config.h" #include "beep.h" #include "main.h" @@ -247,7 +248,7 @@ int xbee_recv_data(struct xbee_recv_hdr *recvframe, unsigned len) val += 512; spi_servo_set(0, val); break; - } + } case RC_PROTO_TYPE_RANGE: { struct rc_proto_range *rcr = (struct rc_proto_range *) recvframe->data; @@ -660,9 +661,9 @@ int main(void) fprintf(stderr, "cannot register default channel\n"); return -1; } - sei(); + eeprom_load_config(); xbee_mainloop(); return 0; }