Changeset - c20bdd0c7746
[Not reviewed]
default
0 3 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-03-26 17:03:10
ethanzonca@CL-ENS241-08.cedarville.edu
Enable blackout, change heater thresh to reasonable level, tweak failsafe and minduration triggers for buzzer, add humidity data to APRS message
3 files changed with 14 insertions and 7 deletions:
0 comments (0 inline, 0 general)
master/master/config.h
Show inline comments
 
@@ -31,18 +31,18 @@
 
//#define DEBUG_OUTPUT
 
 
// Blackout (turn off all but power LEDs)
 
//#define BLACKOUT_ENABLE
 
#define BLACKOUT_ENABLE
 
#define BLACKOUT_TIMEOUT 300000 // Blackout after 5 minutes (hopefully after fix)
 
 
// Board heater setpoint
 
#define HEATER_THRESHOLD 80
 
#define HEATER_THRESHOLD 5 // Regulate to 5 degrees celsius
 
 
// Touchdown buzzer
 
#define BUZZER_RATE 5000
 
#define BUZZER_DURATION 1000
 
#define BUZZER_FAILSAFE_DURATION 600000
 
#define BUZZER_TRIGGER_MINDURATION 1
 
#define BUZZER_TRIGGER_MAXALTITUDE 1
 
#define BUZZER_FAILSAFE_DURATION  12600000 // 3.5hr
 
#define BUZZER_TRIGGER_MINDURATION 3600000 // 1 hour
 
#define BUZZER_TRIGGER_MAXALTITUDE 180
 
 
// --------------------------------------------------------------------------
 
// Error Codes config (logger.c)
 
@@ -164,7 +164,7 @@
 
#define WATCHDOG_PROGTIMER_EEPROM_ADDR 0x20
 
 
// Written to the beginning of every log file
 
#define LOGGER_HEADERTEXT "HAB Control Master - 1.0\n"
 
#define LOGGER_HEADERTEXT "HAB Control Master - 1.1\n"
 
 
// Log to SD card every X milliseconds
 
#define LOGGER_RATE 1000 
master/master/lib/sensordata.c
Show inline comments
 
@@ -103,6 +103,13 @@ char* slavesensors_getAPRScomment(char* 
 
				uint16_t len = strlen(commentBuffer);
 
				snprintf(commentBuffer + len, bufferSize-len, "~C%li",val);
 
			}
 
			
 
			// Humidity
 
			val = sensordata_get(i, SENSOR_HUMIDITY);
 
			if(val != -2111111111) {
 
				uint16_t len = strlen(commentBuffer);
 
				snprintf(commentBuffer + len, bufferSize-len, "~H%li",val);
 
			}
 
		
 
			// Altitude
 
			val = sensordata_get(i, SENSOR_ALTITUDE);
master/master/master.c
Show inline comments
 
@@ -130,7 +130,7 @@ int main(void)
 
			}			
 
			lastBuzz = time_millis();
 
		}
 
		>
 
		 
 
		if(buzz && time_millis() - lastBuzzOn > BUZZER_DURATION) {
 
			led_off(LED_BUZZ);
 
			buzz = false;
0 comments (0 inline, 0 general)