Skip to content

Commit d4542be

Browse files
committed
Off-by-one
1 parent 3b6cf0b commit d4542be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aspFunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def setAttenuator(self, mode, stand, attenSetting):
485485
if stand < 0 or stand > self.num_stands:
486486
self.currentState['lastLog'] = '%s: %s' % (modeDict[mode], commandExitCodes[0x02])
487487
return False, 0x02
488-
if attenSetting < 0 or attenSetting > self.config['max_atten'][mode]:
488+
if attenSetting < 0 or attenSetting > self.config['max_atten'][mode-1]:
489489
self.currentState['lastLog'] = '%s: %s' % (modeDict[mode], commandExitCodes[0x05])
490490
return False, 0x05
491491

0 commit comments

Comments
 (0)