Index: trunk/code/projects/libdragonfly/dragonfly_lib.c
===================================================================
--- trunk/code/projects/libdragonfly/dragonfly_lib.c	(revision 377)
+++ trunk/code/projects/libdragonfly/dragonfly_lib.c	(revision 378)
@@ -62,50 +62,45 @@
  * @see analog_init, usb_init, xbee_init, buzzer_init,
  * bom_init, orb_init, motors_init, lcd_init
  **/
-void dragonfly_init(int config) 
-{
-		sei();
+void dragonfly_init(int config) {
+  sei();
 
-	// Set directionality of various IO pins
-	DDRG &= ~(_BV(PING0)|_BV(PING1));
-	PORTG |= _BV(PING0)|_BV(PING1);
+  // Set directionality of various IO pins
+  DDRG &= ~(_BV(PING0)|_BV(PING1));
+  PORTG |= _BV(PING0)|_BV(PING1);
 	
-	if(config & ANALOG)
-		analog_init(ADC_START);
+  if(config & ANALOG)
+    analog_init(ADC_START);
 	
-	if(config & COMM)
-	{
-		//Defaults to 115200. Check serial.h for more information.
-		usb_init();
-		xbee_init();
-	}
+  if(config & COMM) {
+    //Defaults to 115200. Check serial.h for more information.
+    usb_init();
+    xbee_init();
+  }
 	
-	if(config & BUZZER)
-	{
-		sei();
-		buzzer_init();
-	}
+  if(config & BUZZER) {
+    sei();
+    buzzer_init();
+  }
 	
-	if(config & ORB)
-	{
-		sei();
-		orb_init();
-	}
+  if(config & ORB) {
+    sei();
+    orb_init();
+  }
 	
-	if(config & MOTORS)
-		motors_init();
+  if(config & MOTORS)
+    motors_init();
 
-	if(config & LCD)
-		lcd_init();
+  if(config & LCD)
+    lcd_init();
 	
-	if(config & ORB)
-	{
-		sei();
-		orb_init();
-	}
+  if(config & ORB) {
+    sei();
+    orb_init();
+  }
 	
-	// delay a bit for stability
-	_delay_ms(1);
+  // delay a bit for stability
+  _delay_ms(1);
 }
 
 
Index: trunk/code/projects/libdragonfly/lcd.c
===================================================================
--- trunk/code/projects/libdragonfly/lcd.c	(revision 377)
+++ trunk/code/projects/libdragonfly/lcd.c	(revision 378)
@@ -54,10 +54,10 @@
 
 //**************************************Old shit below!*****************
 /*
-FontLookup - a lookup table for all characters
+  FontLookup - a lookup table for all characters
 */
 static const unsigned char FontLookup [][5] =
-{
+  {
     { 0x00, 0x00, 0x00, 0x00, 0x00 },  // sp
     { 0x00, 0x00, 0x5f, 0x00, 0x00 },   // !
     { 0x00, 0x07, 0x00, 0x07, 0x00 },   // "
@@ -154,7 +154,7 @@
     { 0x41, 0x41, 0x36, 0x08, 0x00 },   // }
     { 0x02, 0x01, 0x01, 0x02, 0x01 },   // ~
     { 0x55, 0x2A, 0x55, 0x2A, 0x55 },   // del
-};
+  };
 
 
 /**
@@ -170,33 +170,32 @@
  * Initializes the LCD. Must be called before any other
  * LCD functions.
  **/
-void lcd_init(void)
-{
-	LCDDDR |= (SCE | SDI | SCK);
-	LCDRESETDDR |= (RST|D_C);
+void lcd_init(void) {
+  LCDDDR |= (SCE | SDI | SCK);
+  LCDRESETDDR |= (RST|D_C);
 
-	LCDPORT &= ~( SCE | SDI | SCK);
-	LCDRESETPORT &=~(D_C);
+  LCDPORT &= ~( SCE | SDI | SCK);
+  LCDRESETPORT &=~(D_C);
   
-	SPCR |= 0x50;//0b01010000; // no SPI int, SPI en, Master, sample on rising edge, fosc/2
-	SPSR |= 0x01;       // a continuation of the above
+  SPCR |= 0x50;//0b01010000; // no SPI int, SPI en, Master, sample on rising edge, fosc/2
+  SPSR |= 0x01;       // a continuation of the above
 
-	LCDRESETPORT |= RST;
-	delay_ms(10);
-	LCDRESETPORT &= (~RST);
-	delay_ms(100);
-	LCDRESETPORT |= RST;
+  LCDRESETPORT |= RST;
+  delay_ms(10);
+  LCDRESETPORT &= (~RST);
+  delay_ms(100);
+  LCDRESETPORT |= RST;
 	
-	lcd_putbyte( 0x21 );  // LCD Extended Commands.
-	lcd_putbyte( 0xC8 );  // Set LCD Vop (Contrast).
-	lcd_putbyte( 0x06 );  // Set Temp coefficent.
-	lcd_putbyte( 0x13 );  // LCD bias mode 1:48.
-	lcd_putbyte( 0x20 );  // LCD Standard Commands, Horizontal addressing mode.
-	lcd_putbyte( 0x0C );  // LCD in normal mode.
+  lcd_putbyte( 0x21 );  // LCD Extended Commands.
+  lcd_putbyte( 0xC8 );  // Set LCD Vop (Contrast).
+  lcd_putbyte( 0x06 );  // Set Temp coefficent.
+  lcd_putbyte( 0x13 );  // LCD bias mode 1:48.
+  lcd_putbyte( 0x20 );  // LCD Standard Commands, Horizontal addressing mode.
+  lcd_putbyte( 0x0C );  // LCD in normal mode.
 	
-	LCDRESETPORT |= D_C;		//put it in init instead of main
+  LCDRESETPORT |= D_C;		//put it in init instead of main
 	
-	lcd_clear_screen();
+  lcd_clear_screen();
 }
 
 /**
@@ -205,11 +204,11 @@
  * @see lcd_init
  **/
 void lcd_clear_screen( void ) {
-	int i;
-	for (i = 0; i < 504; i++)
-		lcd_putbyte(0x0);
+  int i;
+  for (i = 0; i < 504; i++)
+    lcd_putbyte(0x0);
 	
-	lcd_gotoxy(0,0);
+  lcd_gotoxy(0,0);
 }
 
 /**
@@ -220,36 +219,33 @@
  *
  * @see lcd_init
  **/
-void lcd_putc(char c)
-{
-	int i;
+void lcd_putc(char c) {
+  int i;
 	
-	for (i = 0; i < 5; i++)
-		lcd_putbyte(FontLookup[c-32][i]);
-	lcd_putbyte(0);
+  for (i = 0; i < 5; i++)
+    lcd_putbyte(FontLookup[c-32][i]);
+  lcd_putbyte(0);
 }
 
 /*
-print an entire string to the lcd
+  print an entire string to the lcd
 */
-void lcd_puts(char *s)
-{
-	char *t = s;
-	while (*t != 0)
-	{
-		lcd_putc(*t);
-		t++;
-	}
+void lcd_puts(char *s) {
+  char *t = s;
+  while (*t != 0) {
+    lcd_putc(*t);
+    t++;
+  }
 }
 
 /*
-go to coordinate x, y
-y: vertically - 1 char
-x: horizontally - 1 pixel
+  go to coordinate x, y
+  y: vertically - 1 char
+  x: horizontally - 1 pixel
 
-multiply x by 6 if want to move 1 entire character
+  multiply x by 6 if want to move 1 entire character
 
-origin (0,0) is at top left corner of lcd screen
+  origin (0,0) is at top left corner of lcd screen
 */
 
 /**
@@ -261,18 +257,17 @@
  *
  * @see lcd_init
  **/
-void lcd_gotoxy(int x, int y)
-{
-	LCDRESETPORT &= ~(D_C);
-	lcd_putbyte(0x40 | (y & 0x07));
-	lcd_putbyte(0x80 | (x & 0x7f));
-	LCDRESETPORT |= D_C;
+void lcd_gotoxy(int x, int y) {
+  LCDRESETPORT &= ~(D_C);
+  lcd_putbyte(0x40 | (y & 0x07));
+  lcd_putbyte(0x80 | (x & 0x7f));
+  LCDRESETPORT |= D_C;
 }
 
 /*
-prints an int to the lcd
+  prints an int to the lcd
 
-code adapted from Chris Efstathiou's code (hendrix@otenet.gr)
+  code adapted from Chris Efstathiou's code (hendrix@otenet.gr)
 */
 
 /**
@@ -283,27 +278,31 @@
  *
  * @see lcd_init
  **/
-void lcd_puti(int value )
-{
-	unsigned char lcd_data[6]={'0','0','0','0','0','0' }, position=sizeof(lcd_data), radix=10; 
+void lcd_puti(int value ) {
+  unsigned char lcd_data[6]={'0','0','0','0','0','0' }, position=sizeof(lcd_data), radix=10; 
 
-        /* convert int to ascii  */ 
-        if(value<0) { lcd_putc('-'); value=-value; }    
-        do { position--; *(lcd_data+position)=(value%radix)+'0'; value/=radix;  } while(value); 
+  /* convert int to ascii  */ 
+  if(value<0) { 
+    lcd_putc('-'); 
+    value=-value; 
+  }    
+  do { 
+    position--; 
+    *(lcd_data+position)=(value%radix)+'0'; 
+    value/=radix;  
+  } while(value); 
 
     
-        /* start displaying the number */
-        for(;position<=(sizeof(lcd_data)-1);position++)
-		lcd_putc(lcd_data[position]);
+  /* start displaying the number */
+  for(;position<=(sizeof(lcd_data)-1);position++)
+    lcd_putc(lcd_data[position]);
 
-	return;
+  return;
 }
 
 /** @} **/ //end defgroup
 
-void lcd_putbyte(unsigned char b)
-{
-	SPDR = b;
-	while (!(SPSR & 0x80)); /* Wait until SPI transaction is complete */
+void lcd_putbyte(unsigned char b) {
+  SPDR = b;
+  while (!(SPSR & 0x80)); /* Wait until SPI transaction is complete */
 }
-
Index: trunk/code/projects/libdragonfly/dio.c
===================================================================
--- trunk/code/projects/libdragonfly/dio.c	(revision 377)
+++ trunk/code/projects/libdragonfly/dio.c	(revision 378)
@@ -72,11 +72,11 @@
  *
  * @return 1 or 0, depending on the value of the portpin.
  **/
-int digital_input(int portpin){
+int digital_input(int portpin) {
   int pin = portpin & 0x7;
   int pin_val = 0;
   
-  switch(portpin >> 3){
+  switch(portpin >> 3) {
   case _PORT_A:
     DDRA &= ~_BV(pin);
     pin_val = PINA;
@@ -98,7 +98,7 @@
     pin_val = PINE;
     return (pin_val >> pin) & 1;
   case _PORT_F:
-    if(pin>=4){
+    if(pin>=4) {
       MCUSR|=1<<7;
       MCUSR|=1<<7;
     }
@@ -194,7 +194,7 @@
       PORTG &= (0XFF - _BV(pins));
       break;
     }
-  }else { /* ( val == 1) */ 
+  } else { /* ( val == 1) */ 
     switch(portpin >> 3) {
     case _PORT_A:
       DDRA |= _BV(pins);
@@ -235,14 +235,12 @@
  *
  * @see button1_wait, button1_click
  **/
-int button1_read( void )
-{
-	int pin_val;
-	DDRG &= ~_BV(PING0);
-	PORTG|= _BV(PING0);
-    pin_val = PING;
-	return !((pin_val & _BV(PING0)));
-  
+int button1_read( void ) {
+  int pin_val;
+  DDRG &= ~_BV(PING0);
+  PORTG|= _BV(PING0);
+  pin_val = PING;
+  return !((pin_val & _BV(PING0)));
 }
 
 /**
@@ -250,8 +248,7 @@
  *
  * @see button1_read, button1_click
  **/
-void button1_wait( void )
-{
+void button1_wait( void ) {
   while(!button1_read() ) {
     delay_ms(15);
   }
@@ -265,12 +262,11 @@
  *
  * @see button1_read, button1_wait
  **/
-int button1_click()
-{
-  if(button1_read()){
+int button1_click() {
+  if(button1_read()) {
     while(button1_read());
     return 1;
-  }else{
+  } else {
     return 0;
   }
 }
@@ -282,13 +278,12 @@
  *
  * @see button2_wait, button2_click
  **/
-int button2_read( void )
-{
-	int pin_val;
-	DDRG &= ~_BV(PING1);
-	PORTG|= _BV(PING1);
-    pin_val = PING;
-	return !((pin_val & _BV(PING1)));
+int button2_read( void ) {
+  int pin_val;
+  DDRG &= ~_BV(PING1);
+  PORTG|= _BV(PING1);
+  pin_val = PING;
+  return !((pin_val & _BV(PING1)));
 }
 
 /**
@@ -296,8 +291,7 @@
  *
  * @see button2_read, button2_click
  **/
-void button2_wait( void )
-{
+void button2_wait( void ) {
   while(!button2_read()){
     delay_ms(15);
   }
@@ -311,13 +305,12 @@
  *
  * @see button2_read, button2_wait
  **/
-int button2_click()
-{
-	if(button2_read()){
+int button2_click() {
+  if(button2_read()) {
     while(button2_read());
     return 1;
-  }else{
-		return 0;
+  } else {
+    return 0;
   }
 }
 
