Renamed devices to components
This commit is contained in:
parent
6b99873d53
commit
4003e4e65c
11 changed files with 60 additions and 50 deletions
|
|
@ -49,6 +49,14 @@ class BaseStage(metaclass=ABCMeta):
|
|||
"""The current position, as a list"""
|
||||
pass
|
||||
|
||||
@property
|
||||
def position_map(self):
|
||||
return {
|
||||
"x": self.position[0],
|
||||
"y": self.position[1],
|
||||
"z": self.position[2],
|
||||
}
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def backlash(self):
|
||||
|
|
|
|||
|
|
@ -20,13 +20,10 @@ class MockStage(BaseStage):
|
|||
def status(self):
|
||||
"""The general status dictionary of the board."""
|
||||
status = {
|
||||
"position": {
|
||||
"x": self.position[0],
|
||||
"y": self.position[1],
|
||||
"z": self.position[2],
|
||||
},
|
||||
"position": self.position_map,
|
||||
"board": None,
|
||||
"version": "0",
|
||||
"firmware": None,
|
||||
"version": None
|
||||
}
|
||||
return status
|
||||
|
||||
|
|
|
|||
|
|
@ -34,11 +34,7 @@ class SangaStage(BaseStage):
|
|||
def status(self):
|
||||
"""The general status dictionary of the board."""
|
||||
status = {
|
||||
"position": {
|
||||
"x": self.position[0],
|
||||
"y": self.position[1],
|
||||
"z": self.position[2],
|
||||
},
|
||||
"position": self.position_map,
|
||||
"board": self.board.board,
|
||||
"firmware": self.board.firmware,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue