moved around structure
This commit is contained in:
parent
ca9406aab8
commit
bbf549c024
@ -2,7 +2,7 @@
|
||||
Module to test the GPIO input on the Raspberry Pi.
|
||||
"""
|
||||
from collections import deque
|
||||
from ..hardware.gpio_handler import Constants, GPIOHandler
|
||||
from pocket_friends.game_files.io_helpers.gpio_handler import Constants, GPIOHandler
|
||||
|
||||
|
||||
def button_test():
|
||||
|
@ -8,13 +8,13 @@ import pygame
|
||||
import time
|
||||
from .button_test import button_test
|
||||
from .menus import Menu
|
||||
from ..hardware.gpio_handler import GPIOHandler, Constants
|
||||
from pocket_friends.game_files.io_helpers.gpio_handler import GPIOHandler, Constants
|
||||
|
||||
try:
|
||||
importlib.util.find_spec('RPi.GPIO')
|
||||
import RPi.GPIO as GPIO
|
||||
except ImportError:
|
||||
import pocket_friends.development.FakeGPIO as GPIO
|
||||
import pocket_friends.game_files.io_helpers.fake_gpio as GPIO
|
||||
|
||||
# Global variable to keep track of the current menu.
|
||||
menu = 'main'
|
||||
|
@ -8,7 +8,7 @@ try:
|
||||
importlib.util.find_spec('RPi.GPIO')
|
||||
import RPi.GPIO as GPIO
|
||||
except ImportError:
|
||||
import pocket_friends.development.FakeGPIO as GPIO
|
||||
import pocket_friends.game_files.io_helpers.fake_gpio as GPIO
|
||||
|
||||
|
||||
class Constants:
|
@ -1,6 +1,6 @@
|
||||
import pygame
|
||||
import importlib.util
|
||||
from pocket_friends.hardware.gpio_handler import Constants, GPIOHandler
|
||||
from pocket_friends.game_files.io_helpers.gpio_handler import Constants, GPIOHandler
|
||||
|
||||
|
||||
class InputHandler:
|
||||
@ -11,7 +11,7 @@ class InputHandler:
|
||||
import RPi.GPIO as GPIO
|
||||
self.on_hardware = True
|
||||
except ImportError:
|
||||
import pocket_friends.development.FakeGPIO as GPIO
|
||||
import pocket_friends.game_files.io_helpers.fake_gpio as GPIO
|
||||
self.on_hardware = False
|
||||
self.last_input_tick = 0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import pygame
|
||||
from . import sprites
|
||||
from pocket_friends.hardware.gpio_handler import Constants
|
||||
from pocket_friends.game_files.io_helpers.gpio_handler import Constants
|
||||
from ..io_helpers.input_handler import InputHandler
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user