Changeset - 7214de94743d
[Not reviewed]
default
0 2 0
ethanzonca@CL-ENS241-08.cedarville.edu - 12 years ago 2013-02-22 16:22:20
ethanzonca@CL-ENS241-08.cedarville.edu
Added additional sensor readings to APRS message
2 files changed with 27 insertions and 2 deletions:
0 comments (0 inline, 0 general)
master/master/lib/gps.c
Show inline comments
 
@@ -128,10 +128,10 @@ bool gps_hasfix()
 
	bool hasFix = get_latitudeTrimmed()[0] != 0x00;
 
	
 
	if(hasFix && !gps_hadfix) {
 
		info_log_msg("Lost GPS fix");
 
		info_log_msg("Acquired GPS fix");
 
	}
 
	else if(!hasFix && gps_hadfix) {
 
		info_log_msg("Acquired GPS fix");
 
		info_log_msg("Lost GPS fix");
 
	}
 
	
 
	gps_hadfix = hasFix;
master/master/lib/sensordata.c
Show inline comments
 
@@ -70,23 +70,48 @@ char* slavesensors_getAPRScomment()
 
	// Find slave sensors to include in this log
 
	for(int i=0; i<MAX_NUM_SLAVES; i++)
 
	{
 
		// Board temperature sensors (all slaves)
 
		uint32_t val = sensordata_get(i, SENSOR_BOARDTEMP);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " t%u%li",i,val);
 
		}
 
		
 
		// Battery voltages (all slaves)
 
		val = sensordata_get(i, SENSOR_BATTERYLEVEL);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " l%u%li",i,val);
 
		}
 
		
 
		// Pressure
 
		val = sensordata_get(i, SENSOR_PRESSURE);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " P%li",val);
 
		}
 
		
 
		// Air Temperature
 
		val = sensordata_get(i, SENSOR_AIRTEMP);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " C%li",val);
 
		}
 
		
 
		// Altitude
 
		val = sensordata_get(i, SENSOR_ALTITUDE);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " A%li",val);
 
		}
 
		
 
		// Radiation
 
		val = sensordata_get(i, SENSOR_CPM_RADIATION);
 
		if(val != -2111111111) {
 
			uint16_t len = strlen(commentBuffer);
 
			snprintf(commentBuffer + len, COMMENTBUFFER_SIZE-len, " R%li",val);
 
		}
 
		
 
	}
 
	
 
	if(logger_aprsInfoTextAvailable())
0 comments (0 inline, 0 general)