Changeset - d4aef00935d9
[Not reviewed]
default
0 2 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-03-18 20:31:40
ethanzonca@CL-ENS241-08.cedarville.edu
Switched to decent buzzer duration, tweaked slave timeout, removed error for loop still being in request mode
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
master/master/config.h
Show inline comments
 
@@ -30,25 +30,25 @@
 
// Debug Output
 
//#define DEBUG_OUTPUT
 
 
// Blackout (turn off all but power LEDs)
 
#define BLACKOUT_ENABLE
 
#define BLACKOUT_TIMEOUT 300000 // Blackout after 5 minutes (hopefully after fix)
 
 
// Board heater setpoint
 
#define HEATER_THRESHOLD 80
 
 
// Touchdown buzzer
 
#define BUZZER_RATE 3000
 
#define BUZZER_DURATION 1
 
#define BUZZER_DURATION 3000
 
#define BUZZER_FAILSAFE_DURATION 600000
 
#define BUZZER_TRIGGER_MINDURATION 1
 
#define BUZZER_TRIGGER_MAXALTITUDE 1
 
 
// --------------------------------------------------------------------------
 
// Error Codes config (logger.c)
 
// --------------------------------------------------------------------------
 
 
// SD Card
 
#define ERROR_SLAVETIMEOUT 0
 
#define ERROR_SD_INIT 1
 
#define ERROR_SD_PARTITION 2
 
@@ -66,25 +66,25 @@
 
 
// Slave data structure size
 
#define MAX_NUM_SLAVES 5	// 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 250
 
#define TIMEOUT_SLAVEREQUEST 500
 
#define TIMEOUT_NETWORKSCAN 7000
 
#define TIMEOUT_EXITAT 2000
 
#define TIMEOUT_XBEERESPONSE 2000
 
 
// Slave data request max retries (for retry upon corrupt data reception)
 
#define MAX_SLAVEREQUEST_RETRIES 2
 
 
 
// --------------------------------------------------------------------------
 
// Command Parser config (serparser.c)
 
// --------------------------------------------------------------------------
 
master/master/master.c
Show inline comments
 
@@ -125,25 +125,26 @@ int main(void)
 
				_delay_ms(BUZZER_DURATION);
 
				led_off(LED_BUZZ);
 
			}			
 
			lastBuzz = time_millis();
 
		}
 
		
 
		// Periodic: Data Request
 
		if(time_millis() - lastDataReq > DATAREQUEST_RATE)  
 
		{
 
			// Start getting values for next transmission
 
			if(slavesensors_isrequesting())
 
			{
 
				error_log_msg(ERROR_FATAL, false, "Still requesting on following loop");
 
				// This probably is a non-issue
 
				//error_log_msg(ERROR_FATAL, false, "Still requesting on following loop");
 
			}
 
			else
 
			{
 
				slavesensors_startprocess();
 
			}
 
			
 
			lastDataReq = time_millis();
 
		}
 
		
 
		
 
		// Periodic: APRS transmission
 
		if(time_millis() - lastAprsBroadcast > APRS_TRANSMIT_PERIOD) 
0 comments (0 inline, 0 general)