]> www.average.org Git - loctrkd.git/blobdiff - gps303/wsgateway.py
do not respond to hibernation; minor cleanup
[loctrkd.git] / gps303 / wsgateway.py
index 2f6811e45225e6b478a9dcf8796ec4c63b9e68d0..d66070e2f57a7781fe76a8249ac176536e3192d4 100644 (file)
@@ -287,28 +287,18 @@ def runserver(conf):
                             zmsg = Bcast(zsub.recv(zmq.NOBLOCK))
                             msg = parse_message(zmsg.packet, zmsg.is_incoming)
                             log.debug("Got %s with %s", zmsg, msg)
-                            if isinstance(msg, GPS_POSITIONING):
-                                tosend.append(
-                                    {
-                                        "imei": zmsg.imei,
-                                        "timestamp": str(msg.devtime),
-                                        "longitude": msg.longitude,
-                                        "latitude": msg.latitude,
-                                    }
-                                )
-                            elif isinstance(msg, WIFI_POSITIONING):
-                                tosend.append(
-                                    {
-                                        "imei": zmsg.imei,
-                                        "timestamp": str(
-                                            datetime.fromtimestamp(
-                                                zmsg.when
-                                            ).astimezone(tz=timezone.utc)
-                                        ),
-                                        "longitude": msg.longitude,
-                                        "latitude": msg.latitude,
-                                    }
-                                )
+                            tosend.append(
+                                {
+                                    "imei": zmsg.imei,
+                                    "timestamp": str(
+                                        datetime.fromtimestamp(
+                                            zmsg.when
+                                        ).astimezone(tz=timezone.utc)
+                                    ),
+                                    "longitude": msg.longitude,
+                                    "latitude": msg.latitude,
+                                }
+                            )
                         except zmq.Again:
                             break
                 elif sk == tcpfd: