fossasia / pslab-python

Python Library for PSLab Desktop: https://pslab.io
GNU General Public License v3.0
1.62k stars 227 forks source link

Oscilloscope cannot capture three channels #198

Closed bessman closed 2 years ago

bessman commented 3 years ago

Oscilloscope.capture raises the follow exception when asked to capture three channels:

line 183, in _lookup_mininum_timegap
    return min_timegaps[channels_idx[channels]][self.trigger_enabled]

KeyError: 3

Fix the bug and add a test to check this behavior.

Thanks to @kartikaysharma01 for finding this bug.