Changeset - 7b294a564211
[Not reviewed]
default
0 1 0
ethanzonca@CL-SEC241-08.cedarville.edu - 13 years ago 2012-11-27 19:45:33
ethanzonca@CL-SEC241-08.cedarville.edu
Minor changes to serial debug logging
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
master/master/master.c
Show inline comments
 
@@ -44,6 +44,7 @@ int main(void)
 
	logger_setup(); // this takes a few ms
 
	afsk_setup(); // can take a few ms
 

	
 
	serial0_sendString("\r\n\r\n---------------------------------\r\nHAB Controller 1.0 - Initialized!\r\n---------------------------------\r\n\r\n");
 
	
 
	led_on(POWER);
 
	
 
@@ -62,21 +63,19 @@ int main(void)
 
			led_on(STAT);
 
			sprintf(logbuf, "%lu,%u,%u,%u,%u,%u\r\n", time_millis(),5*ctr1,ctr2, 12*ctr2,43*ctr1,5*ctr2);
 
			logger_log(logbuf);
 
			serial0_sendString("I am serial port 0!\r\n");
 
			serial1_sendString("I am serial port 1!\r\n");
 
			serial0_sendString("SD Logger: ");
 
			serial0_sendString(logbuf);
 
			led_off(STAT);
 
			lastLog = time_millis();
 
		}		
 
		
 
		// Wait for transmission to complete before starting another.
 
		// Hopefully this will never delay because it should issue on a timed schedule. Software timers!
 
		
 
		// 8 second periodic for APRS transmission
 
		// for some reason this seems to lock up and the WDT resets everything when the period exceeds 8 seconds. Which is the WDTimeout. Weird.
 
		// If we want ~8+ seconds, then we'll need to do something fun here. Maybe reset the wdt...
 
		if(time_millis() - lastAprsBroadcast > 10000) {
 
			while(afsk_busy());
 
			aprs_send(); // non-blocking
 
			serial0_sendString("Initiating APRS transmission...\r\n");
 
			lastAprsBroadcast = time_millis();
 
		}			
 
		
0 comments (0 inline, 0 general)