Diff: GPSParser.cpp
- Revision:
- 3:d01d7593384d
- Parent:
- 2:6f49c74ab3b9
--- a/GPSParser.cpp Wed Mar 28 21:32:26 2012 +0000 +++ b/GPSParser.cpp Wed Mar 28 23:29:35 2012 +0000 @@ -1,6 +1,6 @@ #include "GPSParser.h" -GPSParser::GPSParser (PinName tx, PinName rx, int baud, int num_sentence, MODSERIAL &pc) +GPSParser::GPSParser (PinName tx, PinName rx, int baud, int num_sentence, MODSERIAL &pc, PwmOut &indicator) : GLL (0), RMC (0), @@ -20,7 +20,8 @@ baudrate (baud), ctr (0), gps (tx, rx), - pc (pc) + pc (pc), + indicator (indicator) { pc.printf ("Initializing GPS...\r\n"); gps.baud (baudrate); @@ -95,6 +96,7 @@ void GPSParser::ready_buffer(MODSERIAL_IRQ_INFO *q) { + indicator = 1; MODSERIAL *serial = q->serial; if (serial->rxGetLastChar() == '\n') @@ -105,4 +107,5 @@ process_readings (); ctr = 0; } + indicator = 0; } \ No newline at end of file