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