diff --git a/master/master/config.h b/master/master/config.h --- a/master/master/config.h +++ b/master/master/config.h @@ -81,7 +81,7 @@ // -------------------------------------------------------------------------- // TX delay in milliseconds -#define TX_DELAY 300 +#define TX_DELAY 500 // Maximum packet delay #define MAX_PACKET_LEN 512 // bytes @@ -118,7 +118,7 @@ #define APRS_COMMENT "CU HAB TEST" // Transmit the APRS sentence every X milliseconds -#define APRS_TRANSMIT_PERIOD 10000 +#define APRS_TRANSMIT_PERIOD 30000 // -------------------------------------------------------------------------- diff --git a/master/master/lib/aprs.c b/master/master/lib/aprs.c --- a/master/master/lib/aprs.c +++ b/master/master/lib/aprs.c @@ -47,7 +47,8 @@ void aprs_send() ax25_send_header(addresses, sizeof(addresses)/sizeof(addresses[0])); ax25_send_byte('/'); // Report w/ timestamp, no APRS messaging. $ = NMEA raw data // ax25_send_string("021709z"); // 021709z = 2nd day of the month, 17:09 zulu (UTC/GMT) - ax25_send_string(get_timestamp()); // 170915 = 17h:09m:15s zulu (not allowed in Status Reports) + ax25_send_string(get_dayofmonth()); ///! Needs to be day hour minute // 170915 = 17h:09m:15s zulu (not allowed in Status Reports) + ax25_send_string(get_timestamp()); ax25_send_byte('z'); // zulu time. h for nonzulu ax25_send_string(get_latitude()); // Lat: 38deg and 22.20 min (.20 are NOT seconds, but 1/100th of minutes) ax25_send_byte('N'); diff --git a/master/master/lib/serial.c b/master/master/lib/serial.c --- a/master/master/lib/serial.c +++ b/master/master/lib/serial.c @@ -39,6 +39,8 @@ void serial0_setup() { + + void serial1_setup() { //PROVEN in test project @@ -54,6 +56,15 @@ void serial1_setup() { UCSR1B |= (1 << RXCIE1); // Enable interrupt } +void serial1_ion() { + UCSR1B |= (1< LEDCYCLE_RATE) { spin(); + + if(!afsk_busy()) + serial1_ion(); lastLedCycle = time_millis(); } @@ -119,6 +125,7 @@ int main(void) { led_on(LED_CYCLE); + // Print out GPS debug snprintf(debugBuf, 128, "GPS> time: %s lat: %s lon: %s speed: %s hdop: %s course: %s\r\n", get_timestamp(),get_latitude(),get_longitude(),get_speedKnots(),get_hdop(), get_course()); @@ -142,6 +149,7 @@ int main(void) if(time_millis() - lastAprsBroadcast > APRS_TRANSMIT_PERIOD) { while(afsk_busy()); + serial1_ioff(); aprs_send(); // non-blocking //serial0_sendString("Initiating APRS transmission...\r\n");