From 56aeee6b3f7c8182f56a2369b83345373306fede Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 13 Apr 2014 03:04:48 +0200 Subject: print location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/interface.py b/src/interface.py index 295d3b6..4dad289 100644 --- a/src/interface.py +++ b/src/interface.py @@ -59,6 +59,9 @@ def ui_print(): brightness = [b * 100 for b in [red_brightness] + list(red_brightnesses)] print('\033[H\033[2J', end = '') if red_running: + lat, lon = red_location + _if = lambda pn, v : pn[0] if v >= 0 else pn[1] + print('Location: %.4f°%s %.4f°%s' % (abs(lat), _if('NS', lat), abs(lon), _if('EW', lon))) print('Temperature: %.0f K (day: %.0f K, night: %.0f K)' % tuple(temperature)) print('Brightness: %.0f %% (day: %.0f %%, night: %.0f %%)' % tuple(brightness)) print('Dayness: %.0f %%' % (red_period * 100)) -- cgit v1.2.3-70-g09d2