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