Skip to content

Commit

Permalink
Addresses cms-gem-daq-project#295, HwVFAT::biasAllVFATs will raise an…
Browse files Browse the repository at this point in the history
… exception if RPC resp is nonzero
  • Loading branch information
Brian Dorney committed Jul 10, 2019
1 parent f0a8ddd commit fb306af
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 fb306af

Please sign in to comment.