Merge branch 'main' of https://git.nugget.fun/scrape/scrapeboard
This commit is contained in:
commit
66d9eabfe5
10
NS.py
10
NS.py
|
@ -11,6 +11,13 @@
|
||||||
# This is the main file containing all the pygame code.
|
# This is the main file containing all the pygame code.
|
||||||
|
|
||||||
import argparse, pathlib, operator, subprocess, sys, os
|
import argparse, pathlib, operator, subprocess, sys, os
|
||||||
|
|
||||||
|
# Auto-detect GPIO library
|
||||||
|
try:
|
||||||
|
import gpio
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
from random import randint, choice, random
|
from random import randint, choice, random
|
||||||
from math import pi
|
from math import pi
|
||||||
from copy import copy
|
from copy import copy
|
||||||
|
@ -239,8 +246,6 @@ class NS(Game, Animation):
|
||||||
# init Pi
|
# init Pi
|
||||||
if self.pi_enabled():
|
if self.pi_enabled():
|
||||||
|
|
||||||
import gpio
|
|
||||||
|
|
||||||
# Initialize GPIO interface
|
# Initialize GPIO interface
|
||||||
gpio.initialize_gpio()
|
gpio.initialize_gpio()
|
||||||
|
|
||||||
|
@ -249,6 +254,7 @@ class NS(Game, Animation):
|
||||||
self.gpio_kill = False
|
self.gpio_kill = False
|
||||||
self.gpio_thread = Thread(target=self.read_gpio, daemon=True)
|
self.gpio_thread = Thread(target=self.read_gpio, daemon=True)
|
||||||
self.gpio_thread.start()
|
self.gpio_thread.start()
|
||||||
|
self.gpio_data = gpio.activity()
|
||||||
|
|
||||||
# init Arduino
|
# init Arduino
|
||||||
elif self.serial_enabled():
|
elif self.serial_enabled():
|
||||||
|
|
2
config
2
config
|
@ -22,7 +22,7 @@ data-exclude = local/, *.pyc, .git*, README, build/, dist/, *.egg-info, *.py, MA
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
caption = Scrapeboard
|
caption = Scrapeboard
|
||||||
show-framerate = yes
|
show-framerate = no
|
||||||
framerate-position = 600, 0
|
framerate-position = 600, 0
|
||||||
dimensions = 800, 450
|
dimensions = 800, 450
|
||||||
fullscreen = no
|
fullscreen = no
|
||||||
|
|
Loading…
Reference in New Issue