Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
splotz90 committed Feb 9, 2017
2 parents 9807808 + 0d3163f commit 0c85e0c
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 167 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/jopohl/urh.svg?branch=master)](https://travis-ci.org/jopohl/urh)
# Universal Radio Hacker [![Build Status](https://travis-ci.org/jopohl/urh.svg?branch=master)](https://travis-ci.org/jopohl/urh)

## What's this?
Universal Radio Hacker is a suite for investigating unknown wireless protocols. Features include
Expand Down Expand Up @@ -38,13 +38,13 @@ sudo pip3 install urh

### Windows
1. Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools).
2. Install [Python 3.5 for Windows](https://www.python.org/downloads/windows/).
2. Install [Python 3 for Windows](https://www.python.org/downloads/windows/).
3. (Optional) Open a terminal (__cmd__) and type: ``` pip install numpy ``` - _This speeds the installation up a bit._
4. In a terminal, type: ``` pip install urh ```.
5. Type ``` urh ``` in a terminal or search for ``` urh ``` in search bar.

### Mac OS X
1. Install [Python for Mac OS X](https://www.python.org/downloads/mac-osx/).
1. Install [Python 3 for Mac OS X](https://www.python.org/downloads/mac-osx/).
2. In a terminal, type: ``` pip3 install urh ```.
3. Type ``` urh ``` in a terminal to get it started.

Expand Down
14 changes: 7 additions & 7 deletions src/urh/SceneManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def __init__(self, parent):
super().__init__(parent)
self.scene = ZoomableScene()
self.plot_data = np.array([0] * 100)
self.line_item = self.scene.addLine(0, 0, 0, 0, QPen(constants.AXISCOLOR, Qt.FlatCap))
self.text_item = self.scene.addText("", QFont("Helvetica", 20))
self.line_item = self.scene.addLine(0, 0, 0, 0, QPen(constants.AXISCOLOR, Qt.FlatCap))
self.text_item = self.scene.addText("", QFont("Helvetica", 20))
self.minimum = float("nan") # NaN = AutoDetect
self.maximum = float("nan") # NaN = AutoDetect

Expand All @@ -38,18 +38,18 @@ def show_scene_section(self, x1: float, x2: float, subpath_ranges=None, colors=N
:return:
"""
paths = path_creator.create_path(self.plot_data, start=self.__limit_value(x1), end=self.__limit_value(x2),
subpath_ranges=subpath_ranges)
subpath_ranges=subpath_ranges)
self.set_path(paths, colors=colors)

def set_path(self, paths: list, colors=None):
self.clear_path()
colors = [constants.LINECOLOR] * len(paths) if colors is None else colors
assert len(paths) == len(colors)
for path, color in zip(paths, colors):
self.scene.addPath(path, QPen(color if color else constants.LINECOLOR, Qt.FlatCap))
self.scene.addPath(path, QPen(color if color else constants.LINECOLOR, Qt.FlatCap))

def __limit_value(self, val: float) -> int:
return 0 if val < 0 else self.num_samples if val > self.num_samples else int(val)
return 0 if val < 0 else self.num_samples if val > self.num_samples else int(val)

def show_full_scene(self):
self.show_scene_section(0, self.num_samples)
Expand All @@ -66,8 +66,8 @@ def init_scene(self):
minimum, maximum = self.minimum, self.maximum

if abs(minimum) > abs(maximum):
minimum = -self.padding*abs(minimum)
maximum = -self.padding*minimum
minimum = -self.padding * abs(minimum)
maximum = -self.padding * minimum
else:
maximum = abs(maximum)
minimum = -maximum
Expand Down
2 changes: 1 addition & 1 deletion src/urh/controller/SignalFrameController.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, proto_analyzer: ProtocolAnalyzer, undo_stack: QUndoStack,

self.redraw_timer = QTimer()
self.redraw_timer.setSingleShot(True)
self.redraw_timer.setInterval(100)
self.redraw_timer.setInterval(10)

self.proto_selection_timer = QTimer() # For Update Proto Selection from ROI
self.proto_selection_timer.setSingleShot(True)
Expand Down
Loading

0 comments on commit 0c85e0c

Please sign in to comment.