Skip to content

Commit

Permalink
updated tango
Browse files Browse the repository at this point in the history
  • Loading branch information
arnobaer committed Dec 12, 2022
1 parent 50824e0 commit 21aaa21
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion changelog
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.dev1] - 2022-12-12

## [1.0.dev0] - 2022-09-22

[unreleased]: https://github.com/hephy-dd/comet/releases/tag/1.0.dev0...HEAD
[unreleased]: https://github.com/hephy-dd/comet/releases/tag/1.0.dev1...HEAD
[1.0.dev1]: https://github.com/hephy-dd/comet/compare/1.0.dev0...1.0.dev1
[1.0.dev0]: https://github.com/hephy-dd/comet/releases/tag/1.0.dev0
2 changes: 1 addition & 1 deletion comet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.dev0"
__version__ = "1.0.dev1"
12 changes: 12 additions & 0 deletions comet/emulator/marzhauser/tango.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class TANGOEmulator(Emulator):
def __init__(self):
super().__init__()
self.position = {"x": 0.0, "y": 0.0, "z": 0.0}
self.calst = {"x": 3, "y": 3, "z": 3}
self.statusaxis = {"x": "@", "y": "@", "z": "@"}
self.velocity = {"x": 10.0, "y": 10.0, "z": 10.0}

# Controller informations
Expand Down Expand Up @@ -40,6 +42,16 @@ def set_move_absolute_xyz(self, axis, value):
self.position[axis] = float(value)
return "@@@-."

@message(r'^\?statusaxis (x|y|z)')
def get_statusaxis_xyz(self, axis):
value = self.statusaxis.get(axis, "@")
return f"{value}"

@message(r'^\?calst (x|y|z)')
def get_calst_xyz(self, axis):
value = self.calst.get(axis, 0)
return f"{value:d}"

@message(r'\?vel')
def get_vel(self):
x = self.velocity.get("x")
Expand Down

0 comments on commit 21aaa21

Please sign in to comment.