Burst Data

4 views
Skip to first unread message

Gil THOMAS

unread,
Jul 13, 2016, 4:51:24 AM7/13/16
to SerialPundit
Hi Rishi,

In my GPS application, it's not NMEA sentences, It's only a log track with a set of positions. I don't need a second thread to extract latitude and longitude simultaneously. When I have the positions list, I format datas and I put it in a text file. After this, the track is displayed on a map.
 
As I have already said, we write on the serial port only one sentence ("$PFMDNL..."). The GPS send all data bytes. Quantity of bytes depends of the track size.

I study the deposit... In the "Read-method-designs", it seems that Burst Data correspond to my application type but unfortunately, code example is empty and the example d1-burst-read-com is empty also.

I tried methods with a single loop like :

 while(exit == false) {
    data  = scm.readString(handle);
    if(data != null) {                                
       ....                                                                   
    }
    else {
        exit = true;
        break;
    }
}

It works perfectly in MacOS, but in Windows, this is random. Sometime, I lost something, sometime, it's OK.

I did not manage to implement a wait/notify instead of thread.sleep with a datalistener. That being said, it's a "good practice" point because with the thread.sleep, it's working on both platforms -:)

Do you have an idea  ?

rishi gupta

unread,
Jul 13, 2016, 4:19:49 PM7/13/16
to Gil THOMAS, SerialPundit

Can you mail me sample track data.

--
You received this message because you are subscribed to the Google Groups "SerialPundit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to SerialPundit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/SerialPundit/0fc8ac20-40fa-41c7-9db2-a9744ba061c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages