From e3fe0f1c7fecb233f900628a8b1fd0287729d37a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 21 Mar 2017 15:50:09 +0100 Subject: Fix wind gusts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/compact | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/compact') diff --git a/examples/compact b/examples/compact index d751adf..8f4df79 100644 --- a/examples/compact +++ b/examples/compact @@ -753,7 +753,7 @@ class MyWeather(Entry): self.in_deg_f = button == SCROLL_UP elif index == 2: # wind speed/gusts if button == LEFT_BUTTON: - if self.plusminus is None or col < self.plusminus: + if self.towards is None or col < self.towards: self.show_wind_speed = False else: self.show_wind_gusts = False @@ -909,7 +909,7 @@ class MyWeather(Entry): if beaufort >= 7: colour = '33' if beaufort >= 10: colour = '31' if beaufort >= 12: colour = '39;41' - wind += '±\033[%sm%.0f\033[0m' % (colour, value) + wind += '→\033[%sm%.0f\033[0m' % (colour, value) wind += unit text.append(wind) else: @@ -1045,13 +1045,13 @@ class MyWeather(Entry): else: segments.append(None) x -= 1 - self.plusminus = None + self.towards = None for i, segment in enumerate(text): if segment is None: segments.append(None) else: - if i == 1 and '±' in segment: - self.plusminus = x + Bar.coloured_length(segment.split('±')[0]) + if i == 1 and '→' in segment: + self.towards = x + Bar.coloured_length(segment.split('→')[0]) w = Bar.coloured_length(segment) x += 1 segments.append((x, w)) -- cgit v1.2.3-70-g09d2