aboutsummaryrefslogtreecommitdiff
path: root/client/ur_fuzzy_alarm_clock.py
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2012-01-24 11:48:55 +0100
committerElena ``of Valhalla'' Grandi <elena.valhalla@gmail.com>2012-01-24 11:48:55 +0100
commite16a541a0442f2dd596d23ae6938e28a3a3feaa4 (patch)
tree42f3fe2a73edda1625899c0ca6528a325fb3f3a5 /client/ur_fuzzy_alarm_clock.py
parent2cae6b69818b39f12eb426e71c3e74d51afa2dc5 (diff)
Client: fix management of day-of-week
Diffstat (limited to 'client/ur_fuzzy_alarm_clock.py')
-rwxr-xr-xclient/ur_fuzzy_alarm_clock.py4
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:]: