add script: pmslive

This commit is contained in:
Junzi Sun 2018-06-23 01:24:15 +02:00
parent 0ef64be934
commit 70b3af2c8b
4 changed files with 107 additions and 104 deletions

View File

@ -40,7 +40,7 @@ New features in v2.0
---------------------
- New structure of the libraries
- ADS-B and Comm-B data streaming
- Active aircraft viewing (terminal cursor)
- Active aircraft viewing (terminal curses)
- Improved BDS identification
- Optimizing decoding speed

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python
from __future__ import print_function, division
import os
import sys
import argparse
import curses
import numpy as np
import time
from threading import Lock
import pyModeS as pms
from pyModeS.extra.beastclient import BaseClient
@ -88,13 +88,13 @@ try:
LOCK.release()
acs = stream.get_aircraft()
# try:
try:
screen.update_data(acs)
screen.update()
# except KeyboardInterrupt:
# raise
# except:
# continue
except KeyboardInterrupt:
raise
except:
continue
except KeyboardInterrupt:
sys.exit(0)

View File

@ -28,6 +28,7 @@ class Screen(Thread):
Thread.__init__(self)
self.screen = curses.initscr()
curses.noecho()
curses.mousemask(1)
self.screen.keypad(True)
self.y = 3
self.x = 1

View File

@ -117,4 +117,6 @@ setup(
# 'sample=sample:main',
# ],
# },
scripts=['pyModeS/streamer/pmslive'],
)