-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathWordclock.diff
126 lines (114 loc) · 4.81 KB
/
Wordclock.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
From 8a96f0b378a1fdc25251ba6ab4987690526d1ea3 Mon Sep 17 00:00:00 2001
From: Bernd <[email protected]>
Date: Sat, 10 Sep 2016 18:03:01 +0200
Subject: [PATCH] Another minimal syntax update
---
doc/doc_troubleshooting.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/doc_troubleshooting.rst b/doc/doc_troubleshooting.rst
index 79110af..2691131 100644
--- a/doc/doc_troubleshooting.rst
+++ b/doc/doc_troubleshooting.rst
@@ -29,8 +29,8 @@ Something is not working?
* Disable the RPis soundcard (since it might interfere with the PMW-channel, sending data to the LEDs. Thanks to ELViTO12 for reporting)::
- sudo sh -c "echo blacklist snd_bcm2835 >> /etc/modprobe.d/alsa-blacklist.conf";
- sudo reboot;
+ sudo sh -c "echo blacklist snd_bcm2835 >> /etc/modprobe.d/alsa-blacklist.conf";
+ sudo reboot;
* When starting the wordclock-script, "Pin 17 pressed" is logged all the time?
--
2.6.2
From f9c1882f51468b279fd5d43c085e6ebfe93aacf1 Mon Sep 17 00:00:00 2001
From: Pascal Henze <[email protected]>
Date: Sun, 2 Oct 2016 12:08:25 +0200
Subject: [PATCH] last fixes
---
wordclock_plugins/merry_xmas/__init__.py | 0
wordclock_plugins/merry_xmas/icons/11x10/logo.png | Bin 150 -> 0 bytes
wordclock_plugins/merry_xmas/plugin.py | 32 ----------------------
wordclock_plugins/rainbow/plugin.py | 2 +-
wordclock_tools/wiring.py | 2 +-
5 files changed, 2 insertions(+), 34 deletions(-)
delete mode 100644 wordclock_plugins/merry_xmas/__init__.py
delete mode 100644 wordclock_plugins/merry_xmas/icons/11x10/logo.png
delete mode 100644 wordclock_plugins/merry_xmas/plugin.py
diff --git a/wordclock_plugins/merry_xmas/__init__.py b/wordclock_plugins/merry_xmas/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/wordclock_plugins/merry_xmas/icons/11x10/logo.png b/wordclock_plugins/merry_xmas/icons/11x10/logo.png
deleted file mode 100644
index bf3097ccb44d77e2f5c5d2b1da117d3af045f23e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 150
zcmeAS@N?(olHy`uVBq!ia0vp^+(695!3HFgJ}hYlQn8*cjv*DdYA1U0F(`64OIt4a
zZhvHr^~cLR3g;Ge+C{mv&J<*re{I>Zs82b+#Zuk}YlZPNy;_!Zly7raWxZ+o&cFlv
z9cJ9T|EKED@kha$0TPREvU4df^gr2nrtLlJ-^<G;r+=2!1zN=5>FVdQ&MBb@0C&+j
A#sB~S
diff --git a/wordclock_plugins/merry_xmas/plugin.py b/wordclock_plugins/merry_xmas/plugin.py
deleted file mode 100644
index a968e95..0000000
--- a/wordclock_plugins/merry_xmas/plugin.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import datetime
-import os
-import wordclock_tools.wordclock_colors as wcc
-
-class plugin:
- '''
- A class displaying the current time on a german WCA as real words...
- '''
-
- def __init__(self, config):
- '''
- Initializations for the startup of the current wordclock plugin
- '''
- # Get plugin name (according to the folder, it is contained in)
- self.name = os.path.dirname(__file__).split('/')[-1]
- self.bg_color_index = 0 # default background color: black
- self.word_color_index = 2 # default word color: warm white
-
- def run(self, wcd, wci):
- '''
- Displays time in words.
- User interaction on pin button_return needs to be implemented on demand.
- '''
- while True:
- # Set background color
- wcd.setColorToAll(wcc.colors[self.bg_color_index], includeMinutes=True)
- # Set current time
- wcd.showText("M E R R Y X - M A S")
- event = wci.waitSecondsForEvent([wci.button_left, wci.button_return, wci.button_right], 5)
- if (event == wci.button_return):
- return
-
diff --git a/wordclock_plugins/rainbow/plugin.py b/wordclock_plugins/rainbow/plugin.py
index ff21d54..5936136 100644
--- a/wordclock_plugins/rainbow/plugin.py
+++ b/wordclock_plugins/rainbow/plugin.py
@@ -29,7 +29,7 @@ class plugin:
for i in range(114):
wcd.setPixelColor(i, self.wheel((i+j) & 255))
wcd.show()
- if not GPIO.input(22):
+ if not GPIO.input(22) or GPIO.input(8):
print('Pin ' + str(22) + ' pressed.')
return
time.sleep(20/1000.0)
diff --git a/wordclock_tools/wiring.py b/wordclock_tools/wiring.py
index 08759b2..85a1e85 100644
--- a/wordclock_tools/wiring.py
+++ b/wordclock_tools/wiring.py
@@ -141,7 +141,7 @@ class christians_wiring:
'''
Access minutes (1,2,3,4)
Needs hardware/wiring dependent implementation
- This implementation assumes the minutes to be wired as first and last two leds of the led-strip
+ This implementation assumes the minutes to be wired as the last four leds of the led-strip
'''
if min == 1:
return self.LED_COUNT-4
--
2.6.2