Skip to content

Commit

Permalink
Fixes updating EGU, FAC read_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrn committed Sep 14, 2022
1 parent b1bff02 commit b9d5b96
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ classifiers=[
"Operating System :: OS Independent"
]
description=""
dependencies = [
"matplotlib",
"numpy",
"pyserial==3.5"
]
readme="README.md"
license = {text = "MIT License"}
requires-python=">=3.6"
Expand Down
15 changes: 15 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[metadata]
name = pydrs
version = {attr = "pydrs.__version__"}

[options]
package_dir=
=src
packages=find:
install_requires=
matplotlib==3.3.4
numpy
pyserial==3.5

[options.packages.find]
where=src
16 changes: 8 additions & 8 deletions src/pydrs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,11 +1613,11 @@ def read_vars_common(self, vals: bytes = None) -> dict:
or (vars_dict["status"]["model"] == "FAC_2S_ACDC")
or (vars_dict["status"]["model"] == "FAC_2P4S_ACDC")
):
vars_dict["ps_setpoint"][-1] = "V"
vars_dict["ps_reference"][-1] = "V"
vars_dict["ps_setpoint"] = vars_dict["ps_setpoint"][:-1] + "V"
vars_dict["ps_reference"] = vars_dict["ps_reference"][:-1] + "V"
else:
vars_dict["ps_setpoint"][-1] = "%"
vars_dict["ps_reference"][-1] = "%"
vars_dict["ps_setpoint"] = vars_dict["ps_setpoint"][:-1] + "%"
vars_dict["ps_reference"] = vars_dict["ps_reference"][:-1] + "%"

vars_dict["siggen_type"] = common.sig_gen_types[int(vars_dict["siggen_type"])]
vars_dict["wfmref_sync_mode"] = common.wfmref_sync_modes[
Expand Down Expand Up @@ -1698,7 +1698,7 @@ def _read_vars_generic(
255 + sum([data["size"] for data in template.values()]),
)

# 1 byte for checksum, 246 common variable bytes, 8 header bytes
# 1 byte for checksum, 246 common variable bytes, 8 interlock bytes

vars_dict = self.read_vars_common(vals[4:246])
vals = vals[246:-1]
Expand Down Expand Up @@ -1947,7 +1947,7 @@ def read_vars_fac_2s_dcdc(self, iib=False) -> dict:

return vars_dict

def read_vars_fac_2p4s_acdc(self, iib=0):
def read_vars_fac_2p4s_acdc(self, iib=0) -> dict:
"""Reads FAC 2P4S ACDC power supply variables (alias for `read_vars_fac_2s_acdc`)
Parameters
Expand All @@ -1961,7 +1961,7 @@ def read_vars_fac_2p4s_acdc(self, iib=0):
Dictionary with power supply variables
"""
self.read_vars_fac_2s_acdc(iib)
return self.read_vars_fac_2s_acdc(iib)

def read_vars_fac_2p4s_dcdc(self) -> dict:
"""Reads FAC 2P4S DCDC power supply variables
Expand All @@ -1988,7 +1988,7 @@ def read_vars_fac_2p4s_dcdc(self) -> dict:
vars_dict[f"iib_alarms_{i}_raw"], fac.list_2p4s_dcdc_iib_alarms
)

return
return vars_dict

def read_vars_fap(self, iib=True) -> dict:
"""Reads FAP power supply variables
Expand Down

0 comments on commit b9d5b96

Please sign in to comment.