rossengeorgiev / aprs-python

📡 Python module for working with APRS
http://aprs-python.readthedocs.io/en/latest/
GNU General Public License v2.0
114 stars 37 forks source link

Packets not being returned by parser #50

Closed ivanmartinezmorales closed 2 years ago

ivanmartinezmorales commented 5 years ago

Hi, when attempting to stream packets with a specific callsign, I am unable to stream said packet. The script hangs up at

def callback(packet):
    return packet 

Where it does not exit the loop. I previously had it working, where I could process, parse, and return positioning data from aprslib, but recently it has stopped working. I have tried using the non-blocking feature for the .consumer() method, but also had no success with it.

rossengeorgiev commented 5 years ago

Hi, you cannot just return in the callback as that will go nowhere. See the code that calls the callback https://github.com/rossengeorgiev/aprs-python/blob/94b89a6da47a322129484efcaf1e82f6a9932891/aprslib/inet.py#L182-L185

You will need do something like adding it to a queue, printing, writing to a file, or anything else.

ivanmartinezmorales commented 2 years ago

Hi, sorry to leave this issue open for so long. Thanks for answering my question!