diff options
author | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2012-01-24 11:48:55 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2012-01-24 11:48:55 +0100 |
commit | e16a541a0442f2dd596d23ae6938e28a3a3feaa4 (patch) | |
tree | 42f3fe2a73edda1625899c0ca6528a325fb3f3a5 /client | |
parent | 2cae6b69818b39f12eb426e71c3e74d51afa2dc5 (diff) |
Client: fix management of day-of-week
Diffstat (limited to 'client')
-rwxr-xr-x | client/ur_fuzzy_alarm_clock.py | 4 |
1 files changed, 2 insertions, 2 deletions
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:]: |