Skip to content

Commit

Permalink
wifi-heatmap - accept either title or filename as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Aug 12, 2020
1 parent a3933ea commit f9a8107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog
* Fix heatmap generation error if ``wifi-survey`` is run with ``-S`` / ``--no-scan`` option to disable ``iwlist scan``.
* Implement ``-b`` / ``--bssid`` option to ensure that scan is against a specified BSSID.
* Implement ``--ding`` option to play a short audio file (i.e. a ding) when measurement is finished.
* ``wifi-heatmap`` - accept either title or filename as argument

0.2.0 (2020-08-09)
------------------
Expand Down
4 changes: 3 additions & 1 deletion wifi_survey_heatmap/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def __init__(self, image_path, title, ignore_ssids=[], aps=None):
}
self._image_path = image_path
self._title = title
if not self._title.endswith('.json'):
self._title += '.json'
self._ignore_ssids = ignore_ssids
logger.debug(
'Initialized HeatMapGenerator; image_path=%s title=%s',
Expand All @@ -152,7 +154,7 @@ def __init__(self, image_path, title, ignore_ssids=[], aps=None):
'Loaded image with width=%d height=%d',
self._image_width, self._image_height
)
with open('%s.json' % self._title, 'r') as fh:
with open(self._title, 'r') as fh:
self._data = json.loads(fh.read())
logger.info('Loaded %d measurement points', len(self._data))

Expand Down

0 comments on commit f9a8107

Please sign in to comment.