From e16a541a0442f2dd596d23ae6938e28a3a3feaa4 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 24 Jan 2012 11:48:55 +0100 Subject: Client: fix management of day-of-week --- client/ur_fuzzy_alarm_clock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/ur_fuzzy_alarm_clock.py') diff --git a/client/ur_fuzzy_alarm_clock.py b/client/ur_fuzzy_alarm_clock.py index e86d6fd..1f0775d 100755 --- a/client/ur_fuzzy_alarm_clock.py +++ b/client/ur_fuzzy_alarm_clock.py @@ -39,14 +39,14 @@ class FuzzyAlarmClock: days = [] for j in xrange(8): days.append(bool(int(data[i][0]) & 2**j)) - days.reverse() + days = days[7:8] + days[:7] data[i] = days+data[i][1:] return data def set_alarm(self,alarm,values): s = 'a'+str(alarm) b0 = 0 - for i,bit in enumerate(values[:8][::-1]): + for i,bit in enumerate(values[1:8] + values[0:1]): b0 += bit << i s += "%02x"%(b0) for val in values[8:]: -- cgit v1.2.3