Skip to content

Commit

Permalink
Provide a better error message for bad time bases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazen Babcock committed Oct 22, 2019
1 parent a3107aa commit 748ebb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storm_control/sc_hardware/nationalInstruments/nidaqModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ def filmTiming(self, message):

# Get frames per second from the timing functionality. This is
# a property of the camera that drives the timing functionality.
fps = message.getData()["properties"]["functionality"].getFPS()
timing_fn = message.getData()["properties"]["functionality"]
fps = timing_fn.getFPS()
if (fps <= 0.0):
raise NidaqModuleException("FPS is <= 0.0 for time base '" + timing_fn.getTimeBase() + "'")

# Calculate frequency. This is set slightly higher than the camere
# frequency so that we are ready at the start of the next frame.
Expand Down

0 comments on commit 748ebb2

Please sign in to comment.