Changeset - 0c7d961b3ebc
[Not reviewed]
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-04-22 08:57:44
ethanzonca@CL-ENS241-08.cedarville.edu
Last fixes for final launch of the year
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
master/master/config.h
Show inline comments
 
@@ -74,25 +74,25 @@
 
#define ERROR_FATAL 6
 
#define ERROR_ATFAIL 7
 
#define ERROR_EXITAT 8
 
#define ERROR_INFOTEXT 9
 
#define ERROR_WATCHDOG 10
 
// !!! Please specify/update detailed messages for these error codes in logger.c
 

	
 
// --------------------------------------------------------------------------
 
// Slave Sensors config (slavesensors.c)
 
// --------------------------------------------------------------------------
 

	
 
// Slave data structure size
 
#define MAX_NUM_SLAVES 5	// Maximum number of nodes in the system
 
#define MAX_NUM_SLAVES 4	// Maximum number of nodes in the system
 
#define MAX_NUM_SENSORS 10	// Maximum number of unique types of sensors in the system
 

	
 
// Node identifier of log destination xbee
 
#define XBEE_LOGDEST_NAME "HAB-LOGGER"
 

	
 
// Rate to request data from slaves. Must be greater than AT delay * number slaves
 
#define DATAREQUEST_RATE 3000
 

	
 
// Timeouts
 
#define TIMEOUT_SLAVEREQUEST 500
 
#define TIMEOUT_NETWORKSCAN 7000
 
#define TIMEOUT_EXITAT 2000
master/master/lib/slavesensors.c
Show inline comments
 
@@ -37,47 +37,47 @@
 
#include "slavesensors.h"
 
#include "sensordata.h"
 
#include "led.h"
 
#include "looptime.h"
 
#include "logger.h"
 

	
 

	
 
// !!! Remember to update the ENUM in slavesensors.h when changing things here
 

	
 
// Label lookup table
 
// Make sure there are never more labels than there are MAX_NUM_SENSORS! 
 
const char label_0[] PROGMEM = "BoardTemp";
 
const char label_1[] PROGMEM = "HeaterStatus";
 
const char label_2[] PROGMEM = "BatteryLevel";
 
const char label_1[] PROGMEM = "Heater";
 
const char label_2[] PROGMEM = "VBatt";
 
const char label_3[] PROGMEM = "AirTemp";
 
const char label_4[] PROGMEM = "AmbientLight";
 
const char label_4[] PROGMEM = "Light";
 
const char label_5[] PROGMEM = "Humidity";
 
const char label_6[] PROGMEM = "Pressure";
 
const char label_7[] PROGMEM = "Altitude";
 
const char label_8[] PROGMEM = "CPM-Radiation";
 
const char label_8[] PROGMEM = "Radiation";
 

	
 
const char *const labelLookup[] PROGMEM =
 
{
 
	label_0,
 
	label_1,
 
	label_2,
 
	label_3,
 
	label_4,
 
	label_5,
 
	label_6,
 
	label_7,
 
	label_8,
 
	label_8
 
};
 

	
 
char labelBuffer[32]; // Size to length of label
 
char labelBuffer[15]; // Size to length of label
 
char* slavesensors_getLabel(uint8_t sensorID) 
 
{
 
	if(sensorID < 9)
 
	{
 
		strncpy_P(labelBuffer,(char*)pgm_read_word(&(labelLookup[sensorID])),15);
 
		
 
		return labelBuffer;
 
	}
 
	else 
 
	{
 
		return NULL;
 
	}
0 comments (0 inline, 0 general)