diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c0c25ee..3d80ddc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -3,8 +3,6 @@
-
-
@@ -55,8 +53,8 @@
-
-
+
+
@@ -103,6 +101,14 @@
+
+
+ self.pressed.remove(i)
+
+
+ self.pressed.remove(button)
+
+
@@ -123,9 +129,9 @@
-
+
@@ -535,8 +541,8 @@
-
-
+
+
diff --git a/lib/controllib.py b/lib/controllib.py
index 7268a88..e994ec6 100644
--- a/lib/controllib.py
+++ b/lib/controllib.py
@@ -40,9 +40,9 @@ class Joystick():
if i == c['LIGHT'] and button == 1 and button not in self.pressed:
self.light.switch()
- self.pressed.append(i)
+ self.pressed.append(button)
elif i == c['LIGHT'] and button == 0 and button in self.pressed:
- self.pressed.remove(i)
+ self.pressed.remove(button)
elif i == c['MUSIC'] and button == 1 and button not in self.pressed:
if self.splaying:
@@ -51,27 +51,27 @@ class Joystick():
else:
self.sound.play()
self.splaying = True
- self.pressed.append(i)
+ self.pressed.append(button)
elif i == c['MUSIC'] and button == 0 and button in self.pressed:
- self.pressed.remove(i)
+ self.pressed.remove(button)
elif i == c['VOLIN'] and button == 1 and button not in self.pressed:
self.sound.set_volume(self.sound.get_volume() + 0.1)
- self.pressed.append(i)
+ self.pressed.append(button)
elif i == c['VOLIN'] and button == 0 and button in self.pressed:
self.sound.set_volume(self.sound.get_volume() - 0.1)
- self.pressed.remove(i)
+ self.pressed.remove(button)
elif i == c['VOLDE'] and button == 1 and button not in self.pressed:
- self.pressed.append(i)
+ self.pressed.append(button)
elif i == c['VOLDE'] and button == 0 and button in self.pressed:
- self.pressed.remove(i)
+ self.pressed.remove(button)
elif i == c['REC'] and button == 1 and button not in self.pressed:
self._save_camimg()
- self.pressed.append(i)
+ self.pressed.append(button)
elif i == c['REC'] and button == 0 and button in self.pressed:
- self.pressed.remove(i)
+ self.pressed.remove(button)
# hats
for i in range(self.joystick.get_numhats()):