Changeset - 7a9d49d72a5a
[Not reviewed]
default
0 1 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-01-29 16:58:59
ethanzonca@CL-ENS241-08.cedarville.edu
Implemented logger skipping and removed debug output. Experienced one AT failure, but couldn't reproduce subsequent tests.
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
master/master/lib/slavesensors.c
Show inline comments
 
@@ -33,13 +33,13 @@ bool requesting = false;
 
void slavesensors_setup() 
 
{
 
	
 
}
 

	
 
//#define DEBUG_NETWORKSCAN
 
#define DEBUG_GETSLAVEDATA
 
//#define DEBUG_GETSLAVEDATA
 
 
char* bufPtr = 0x00;
 

	
 
static char slaveAddressLow[MAX_NUM_SLAVES][9];
 
static char slaveAddressHigh[MAX_NUM_SLAVES][9];
 
static char slaveNames[MAX_NUM_SLAVES][20];
 
@@ -298,12 +298,15 @@ void slavesensors_startprocess()
 
	slavesensors_request();		
 
}
 
 
// TODO: inline. static.
 
void slavesensors_request() 
 
{
 
	if(currentSlave == loggerIndex) {
 
		currentSlave++;
 
	}
 
	slavesensors_selectnode(currentSlave);
 
	serial_sendCommand("@"); // Request data!
 
	slavesensors_selectlogger();
 
}
 
 
 
@@ -316,12 +319,13 @@ void slavesensors_process(uint8_t parseR
 
	if(!requesting) {
 
		// we got a command when we didn't request anything. probably skip it.
 
		return;
 
	}
 
	
 
	// TODO: timeout. If we're at NODATA for a long time and we are requesting, that's an issue.
 
	// TODO: If we time out, WE NEED TO RESET THE PARSER. It could be in a bad state.
 
	else if(parseResult == PARSERESULT_NODATA) {
 
		// Wait for data
 
	}
 
	
 
	// Finished reception of a message (one sensor data value). If not finished, send out command to get the next one
 
	else if(parseResult == PARSERESULT_PARSEOK)
0 comments (0 inline, 0 general)