Changeset - ecf8bc28f289
[Not reviewed]
default
0 1 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-01-29 17:08:39
ethanzonca@CL-ENS241-08.cedarville.edu
Fixed issue from previous commit where logger skipping was improprerly handled, freezing the microcontroller if the logger was the last discovered node.
1 file changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
master/master/lib/slavesensors.c
Show inline comments
 
@@ -386,12 +386,27 @@ void slavesensors_process(uint8_t parseR
 
				serial0_sendString("Finished up one slave, go to another.\r\n");
 
				#endif
 
				
 
				currentSlave++;
 
				currentSlaveSensor = 0;
 
				requesting = true;
 
				
 
				if(currentSlave == loggerIndex) {
 
					if(currentSlave >= (nodeCount-1)) {
 
						// We hit the last one, we're done.
 
						dataReady = true;
 
						currentSlave = 0;
 
						currentSlaveSensor = 0;
 
						requesting = false;
 
						return;
 
					}
 
					else {
 
						currentSlave++; // increment to the next slave after the logger
 
					}
 
				}
 
				
 
				slavesensors_request();
 
			}
 
			// If we haven't finished a slave (or all of them), just get the next sensor of the current slave
 
			else
 
			{
 
				#ifdef DEBUG_GETSLAVEDATA
0 comments (0 inline, 0 general)