Hardware + Controller Classes
This commit is contained in:
parent
836cfbd6a6
commit
2d617fcec9
3 changed files with 30 additions and 1 deletions
|
@ -1,8 +1,8 @@
|
|||
import time
|
||||
from collections import defaultdict
|
||||
from typing import *
|
||||
import numpy as np
|
||||
|
||||
import controller
|
||||
|
||||
Point = NewType("point", List[float, float, float])
|
||||
|
||||
|
@ -296,6 +296,7 @@ class GCodeToMotors:
|
|||
|
||||
case 7:
|
||||
# Not canonical, but ellipses
|
||||
pass
|
||||
|
||||
case 20:
|
||||
self.x_units = self.X_STEPS_PER_INCH
|
||||
|
@ -361,6 +362,7 @@ class GCodeToMotors:
|
|||
return
|
||||
|
||||
|
||||
|
||||
def has_command(key: str, instruction: str) -> bool:
|
||||
return key in instruction
|
||||
|
||||
|
|
16
controller.py
Normal file
16
controller.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from GCode_Interpreterdc import GCodeToMotors
|
||||
|
||||
class Controller:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def __call__(self, gtm, *args, **kwargs):
|
||||
assert isinstance(gtm, GCodeToMotors)
|
||||
return None
|
||||
|
||||
|
||||
class PIDController(Controller):
|
||||
def __call__(self, gtm, *args, **kwargs):
|
||||
return None
|
||||
|
||||
|
11
hardware.py
Normal file
11
hardware.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from GCode_Interpreterdc import GCodeToMotors
|
||||
|
||||
class Hardware:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def probe(self, gtm: GCodeToMotors):
|
||||
return
|
||||
|
||||
def realize(self, gtm: GCodeToMotors):
|
||||
return
|
Loading…
Reference in a new issue