Changeset - 0e02d91dac04
[Not reviewed]
default
0 6 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-02-21 16:58:34
ethanzonca@CL-ENS241-08.cedarville.edu
Fixed compiler warnings
6 files changed with 10 insertions and 9 deletions:
0 comments (0 inline, 0 general)
master/master/lib/gps.c
Show inline comments
 
@@ -16,12 +16,13 @@
 
#include <avr/io.h>
 
#include <avr/interrupt.h>
 
#include "gps.h"
 
#include "serial.h"
 
#include "../config.h"
 
#include "led.h"
 
#include "logger.h"
 
 
// Circular buffer for incoming data
 
uint8_t nmeaBuffer[NMEABUFFER_SIZE];
 
 
// Location of parser in the buffer
 
uint8_t nmeaBufferParsePosition = 0;
master/master/lib/led.h
Show inline comments
 
@@ -29,13 +29,13 @@ enum leds {
 
	LED_ACTIVITY,
 
	LED_CYCLE,
 
	LED_HEAT,
 
	LED_BUZZ,
 
};
 
 
typedef struct {uint8_t* direction; uint8_t* port; uint8_t pin;} led_t;
 
typedef struct {volatile uint8_t* direction; volatile uint8_t* port; uint8_t pin;} led_t;
 
 
// Match order of leds enum
 
static led_t ledList[] = {
 
	{&DDRA, &PORTA, PA1}, // ACT0
 
	{&DDRA, &PORTA, PA2}, // ACT1
 
	{&DDRA, &PORTA, PA3}, // ACT2
master/master/lib/logger.c
Show inline comments
 
@@ -108,14 +108,14 @@ void logger_setup()
 
		error_log(ERROR_SD_FILE, true);
 
		return;
 
	}
 
	
 
		
 
	// we pre-increment logid here because it starts at 255, then wraps to 0
 
	uint8_t logid = eeprom_read_byte(LOGGER_ID_EEPROM_ADDR) + 1;
 
	eeprom_update_byte(LOGGER_ID_EEPROM_ADDR, logid);
 
	uint8_t logid = eeprom_read_byte((uint8_t*)LOGGER_ID_EEPROM_ADDR) + 1;
 
	eeprom_update_byte((uint8_t*)LOGGER_ID_EEPROM_ADDR, logid);
 
	
 
	int32_t errorOffset = 0;
 
	char errorFilename[17];
 
	
 
	
 
	// Form filename
master/master/lib/sdcard/sd_raw.c
Show inline comments
 
@@ -338,28 +338,25 @@ uint8_t sd_raw_init()
 
 * Checks wether a memory card is located in the slot.
 
 *
 
 * \returns 1 if the card is available, 0 if it is not.
 
 */
 
uint8_t sd_raw_available()
 
{
 
	int i;
 
	return 1; // !!TODO: OH GOSH CHANGE ME
 
	return 1; // EMZ: Assume always available
 
    return get_pin_available() == 0x00;
 
}
 

	
 
/**
 
 * \ingroup sd_raw
 
 * Checks whether the memory card is locked for write access.
 
 *
 
 * \returns 1 if the card is locked, 0 if it is not.
 
 */
 
uint8_t sd_raw_locked()
 
{
 
	int i;
 
	// !!TODO oh gosh change me
 
	return 0;
 
	return 0; // EMZ: Assume always unlocked
 
    return get_pin_locked() == 0x00;
 
}
 

	
 
/**
 
 * \ingroup sd_raw
 
 * Sends a raw byte to the memory card.
master/master/lib/slavesensors.c
Show inline comments
 
@@ -483,13 +483,13 @@ void slavesensors_process(uint8_t parseR
 
	{
 
		// Wait for data
 
		if(requesting && time_millis() - beginRequest > TIMEOUT_SLAVEREQUEST) {
 
			// if we're requesting, we have no data, and we're over the timeout, this is bad!
 
			// setParserState(STATE_RESET); - meh, can't do this because it freaking increments the cirbufptr
 
			gotoNextSlaveOrSensor(true);
 
			char* msg[128];
 
			char msg[128];
 
			snprintf(msg, 128, "Slave %u (%s) timeout",currentSlave,slaveNames[currentSlave]);
 
			error_log_msg(ERROR_SLAVETIMEOUT, false, msg); // log error, don't blink LED
 
		}
 
	}
 
	
 
	// Finished reception of a message (one sensor data value). If not finished, send out command to get the next one
master/master/master.c
Show inline comments
 
@@ -141,16 +141,19 @@ int main(void)
 
			serial1_ioff();
 
			aprs_send(); // non-blocking
 
			
 
			lastAprsBroadcast = time_millis();
 
		}			
 
		
 
		
 
		// Parse any serial data in the XBee software buffer
 
		parseResult = serparser_parse();
 
		slavesensors_process(parseResult);
 
		
 
		
 
		// Parse any NMEA messages in the GPS software buffer
 
		parse_gps_transmission();
 
		
 
		
 
		wdt_reset();
 
    }
 
}
 
\ No newline at end of file
0 comments (0 inline, 0 general)