Renamed devices to components

This commit is contained in:
Joel Collins 2020-01-13 11:08:05 +00:00
parent 6b99873d53
commit 4003e4e65c
11 changed files with 60 additions and 50 deletions

View file

@ -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):

View file

@ -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

View file

@ -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,
}