mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-04-20 18:48:11 +00:00
fix imports
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
|
||||
from coordinates import Coordinates
|
||||
from cnc.coordinates import Coordinates
|
||||
|
||||
gpattern = re.compile('([A-Z])([-+]?[0-9.]+)')
|
||||
cleanpattern = re.compile('\s+|\(.*?\)|;.*') # white spaces and comments start with ';' and in '()'
|
||||
|
||||
@@ -3,8 +3,8 @@ import time
|
||||
import logging
|
||||
|
||||
import hal
|
||||
from coordinates import Coordinates
|
||||
from config import *
|
||||
from cnc.coordinates import Coordinates
|
||||
from cnc.config import *
|
||||
|
||||
|
||||
class GMachineException(Exception):
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
|
||||
# check which module to import
|
||||
try:
|
||||
from hal_raspberry.hal import *
|
||||
from cnc.hal_raspberry.hal import *
|
||||
except ImportError:
|
||||
print("----- Hardware not detected, using virtual environment -----")
|
||||
print("----- Use M111 command to enable more detailed debug -----")
|
||||
from hal_virtual import *
|
||||
from cnc.hal_virtual import *
|
||||
|
||||
# check if all methods that is needed is implemented
|
||||
if 'init' not in locals():
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
import time
|
||||
|
||||
import rpgpio
|
||||
from cnc.hal_raspberry import rpgpio
|
||||
|
||||
from cnc.pulses import PulseGeneratorLinear
|
||||
from cnc.coordinates import Coordinates
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from rpgpio_private import *
|
||||
from cnc.hal_raspberry.rpgpio_private import *
|
||||
|
||||
import time
|
||||
import logging
|
||||
|
||||
@@ -2,9 +2,9 @@ from __future__ import division
|
||||
import logging
|
||||
import time
|
||||
|
||||
from pulses import PulseGeneratorLinear
|
||||
from config import *
|
||||
from coordinates import Coordinates
|
||||
from cnc.pulses import PulseGeneratorLinear
|
||||
from cnc.config import *
|
||||
from cnc.coordinates import Coordinates
|
||||
|
||||
""" This is virtual device class which is very useful for debugging.
|
||||
It checks PulseGenerator with some tests.
|
||||
|
||||
@@ -6,8 +6,8 @@ import logging
|
||||
logging.basicConfig(level=logging.CRITICAL,
|
||||
format='[%(levelname)s] %(message)s')
|
||||
|
||||
from gcode import GCode, GCodeException
|
||||
from gmachine import GMachine, GMachineException
|
||||
from cnc.gcode import GCode, GCodeException
|
||||
from cnc.gmachine import GMachine, GMachineException
|
||||
|
||||
try: # python3 compatibility
|
||||
type(raw_input)
|
||||
|
||||
@@ -2,8 +2,8 @@ from __future__ import division
|
||||
import math
|
||||
import logging
|
||||
|
||||
from config import *
|
||||
from coordinates import Coordinates
|
||||
from cnc.config import *
|
||||
from cnc.coordinates import Coordinates
|
||||
|
||||
SECONDS_IN_MINUTE = 60
|
||||
|
||||
|
||||
Reference in New Issue
Block a user