[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-users] Flush unconsumed GPS reports in Python
From: |
Alex Railean |
Subject: |
Re: [gpsd-users] Flush unconsumed GPS reports in Python |
Date: |
Sat, 30 Dec 2017 22:45:44 +0100 |
Hello,
I just wanted to follow-up and leave some traces for future archaeologists who
might stumble upon the same problem.
I have inherited a program from someone without any notes about its internal
structure and logic. The way the module was used gave me the impression that you
just call `next` whenever you need a fresh set of coordinates. That's not what
really happens though, and it is this misunderstanding of the model that made
the problem difficult to tackle.
The advice I got on this mailing list helped me understand the logic correctly.
What I ended up doing was creating a separate thread that continuously retrieves
the new readings and stores them in a data structure, while another part of the
program looks into that data structure whenever location information is
required.
Thanks for your help.