|
|
@@ -62,6 +62,7 @@ class VideoLooper: |
|
|
|
self._gpio_control = self._config.getboolean('video_looper', 'gpio_control') |
|
|
|
self._gpio_control_pin = self._config.get('video_looper', 'gpio_control_pin') |
|
|
|
self._gpio_control_upstate = self._config.get('video_looper', 'gpio_control_upstate') # 1 or 0 |
|
|
|
self._gpio_control_pullUpDnControl = self._config.get('video_looper', 'gpio_control_pullUpDnControl') |
|
|
|
# Parse string of 3 comma separated values like "255, 255, 255" into |
|
|
|
# list of ints for colors. |
|
|
|
self._bgcolor = list(map(int, self._config.get('video_looper', 'bgcolor') |
|
|
@@ -92,8 +93,9 @@ class VideoLooper: |
|
|
|
# Set GPIO Pin to input mode |
|
|
|
if self._gpio_control: |
|
|
|
wiringpi.wiringPiSetup() |
|
|
|
# Set Read mode |
|
|
|
wiringpi.pinMode(int(self._gpio_control_pin), 0) |
|
|
|
|
|
|
|
wiringpi.pullUpDnControl(int(self._gpio_control_pin), int(self._gpio_control_pullUpDnControl)) |
|
|
|
|
|
|
|
def _print(self, message): |
|
|
|
"""Print message to standard output if console output is enabled.""" |
|
|
|