mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
Merge pull request #115 from bjackman/fix-get-channels
instrument: Fix get_channels method
This commit is contained in:
commit
f7d1b0fb13
@ -179,7 +179,7 @@ class Instrument(object):
|
|||||||
def get_channels(self, measure):
|
def get_channels(self, measure):
|
||||||
if hasattr(measure, 'name'):
|
if hasattr(measure, 'name'):
|
||||||
measure = measure.name
|
measure = measure.name
|
||||||
return [c for c in self.channels if c.measure.name == measure]
|
return [c for c in self.list_channels() if c.kind == measure]
|
||||||
|
|
||||||
def add_channel(self, site, measure, name=None, **attrs):
|
def add_channel(self, site, measure, name=None, **attrs):
|
||||||
if name is None:
|
if name is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user