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 - New structure of the libraries
- ADS-B and Comm-B data streaming - ADS-B and Comm-B data streaming
- Active aircraft viewing (terminal cursor) - Active aircraft viewing (terminal curses)
- Improved BDS identification - Improved BDS identification
- Optimizing decoding speed - Optimizing decoding speed

View File

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

View File

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

View File

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