fix imports

This commit is contained in:
Nikolay Khabarov
2017-05-14 03:21:28 +03:00
parent e5b61527ca
commit fa10a1221c
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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