Changeset - e68fbe17cd36
[Not reviewed]
default
0 2 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-01-17 21:59:23
ethanzonca@CL-ENS241-08.cedarville.edu
Added XBEE log destination recognized by node identifier
2 files changed with 20 insertions and 1 deletions:
0 comments (0 inline, 0 general)
master/master/config.h
Show inline comments
 
@@ -54,6 +54,9 @@
 
#define MAX_SLAVES 8
 
#define MAX_SLAVE_SENSORS 8
 
 
// Node identifier of log destination xbee
 
#define XBEE_LOGDEST_NAME "HAB-LOGGER"
 
 
// --------------------------------------------------------------------------
 
// Command Parser config (serparser.c)
 
// --------------------------------------------------------------------------
master/master/lib/slavesensors.c
Show inline comments
 
@@ -67,6 +67,7 @@ char* bufPtr = 0x00;
 
char debugBuf[64];
 
char slaveAddressLow[6][9];
 
char slaveAddressHigh[6][9];
 
uint8_t loggerIndex = 255;
 

	
 
void slavesensors_network_scan() {
 
	serial0_ioff();
 
@@ -164,11 +165,26 @@ void slavesensors_network_scan() {
 
	
 
	// <CR> followed by another <CR> signifies end of scan data
 
	
 
	slavesensors_selectnode(1);
 
	for(int i=0; i<nodeCount; i++) 
 
	{
 
		if(strcmp(slaveNames[i], XBEE_LOGDEST_NAME) == 0) 
 
		{
 
			loggerIndex = i;
 
		}
 
	}
 
	
 
	slavesensors_loggerdest();
 
	
 
	serial0_ion();
 
}
 
 
void slavesensors_loggerdest() 
 
{
 
	if(loggerIndex != 255) {
 
		slavesensors_selectnode(loggerIndex);
 
	}	
 
}
 
 
void slavesensors_exitAT() 
 
{
 
	// Exit AT
0 comments (0 inline, 0 general)