Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Commands bug fix #65

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/hvps/devices/caen/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def stat(self) -> dict:
),
)
# TODO: check_command_output_and_convert returns an int so make string_number_to_bit_array take an int
check_command_output_and_convert(command, None, response, _MON_CHANNEL_COMMANDS)
check_command_output_and_convert(
command.lower(), None, response, _MON_CHANNEL_COMMANDS
)
bit_array = string_number_to_bit_array(response)

return {
Expand Down
6 changes: 4 additions & 2 deletions src/hvps/devices/caen/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ def board_alarm_status(self) -> dict:
Returns:
str: The board alarm status value.
"""
command = _MON_MODULE_COMMANDS[inspect.currentframe().f_code.co_name]
command = _MON_MODULE_COMMANDS[inspect.currentframe().f_code.co_name]["command"]
response = self._write_command_read_response(
bd=self.bd,
command=_get_mon_module_command(bd=self.bd, command=command),
)
check_command_output_and_convert(command, None, response, _MON_MODULE_COMMANDS)
check_command_output_and_convert(
"board_alarm_status", None, response, _MON_MODULE_COMMANDS
)
bit_array = string_number_to_bit_array(response)

return {
Expand Down
Loading