Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
#298: HwVFAT::biasAllVFATs will raise an exception if RPC resp is non…
Browse files Browse the repository at this point in the history
…zero, closes #295

Closes #295
  • Loading branch information
bdorney authored and jsturdy committed Jul 31, 2019
1 parent c69f04a commit bfc6a2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gempython/tools/vfat_user_functions_xhal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from gempython.tools.optohybrid_user_functions_xhal import *
from gempython.tools.hw_constants import gemVariants, vfatsPerGemVariant
from gempython.utils.gemlogger import colormsg
from gempython.utils.gemlogger import colormsg, printRed

import logging

Expand Down Expand Up @@ -86,7 +86,10 @@ def biasAllVFATs(self, mask=0x0, enable=False):
# HW Dependent Configuration
if self.parentOH.parentAMC.fwVersion > 2:
# Baseline config
self.confVFAT3s(self.parentOH.link,mask)
rpcResp = self.confVFAT3s(self.parentOH.link,mask)
if rpcResp != 0:
printRed("RPC response was non-zero, failed to configure VFATs on OH{}".format(self.parentOH.link))
raise Exception("RPC response was non-zero, failed to configure VFATs on OH{}".format(self.parentOH.link))

# Run mode
if(enable):
Expand Down

0 comments on commit bfc6a2b

Please sign in to comment.