Skip to content

Commit

Permalink
Supervisor actions (#628)
Browse files Browse the repository at this point in the history
* Add device_emulator reconnect on lost connection

* HWP Supervisor Action system

* docs, misc changes

* Separate "gripper" and "driver" ibootbars

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Makes tcp reconnection optional

* Docs updates

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Addresses Brian's feedback

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and BrianJKoopman committed Apr 23, 2024
1 parent 3cc2e37 commit f3da0d7
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions socs/agents/hwp_supervisor/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,29 +309,6 @@ def update_ups_state(self, op):
self.ups_last_connection_attempt = data['ups_connection']['last_attempt']
self.ups_connected = data['ups_connection']['connected']

def update_iboot_state(self, op):
"""
Updates state values from the IBoot acq operation results.
Args
-----
op : dict
Dict containing the operations (from get_op_data) from the IBoot
``acq`` process
"""
iboot_keymap = {
'iboot_outlet1_state': (f'outletStatus_{self.iboot_outlet1}', 'status'),
'iboot_outlet2_state': (f'outletStatus_{self.iboot_outlet2}', 'status'),
}

if op['status'] != 'ok':
for k in iboot_keymap:
setattr(self, k, None)
return

for k, f in iboot_keymap.items():
setattr(self, k, op['data'][f[0]][f[1]])

@property
def pmx_action(self):
"""
Expand Down Expand Up @@ -1100,7 +1077,6 @@ def monitor(self, session, params):
pmx_op = get_op_data(self.hwp_pmx_id, 'acq', **kw)
pid_op = get_op_data(self.hwp_pid_id, 'main', **kw)
ups_op = get_op_data(self.ups_id, 'acq', **kw)
iboot_op = get_op_data(self.iboot_id, 'acq', **kw)

session.data['monitored_sessions'] = {
'temperature': temp_op,
Expand Down

0 comments on commit f3da0d7

Please sign in to comment.