Skip to content

Commit

Permalink
python print for gain range step
Browse files Browse the repository at this point in the history
  • Loading branch information
guruofquality committed Jan 31, 2017
1 parent 0a40f52 commit d5793c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/SoapySDR.i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2016 Josh Blum
// Copyright (c) 2014-2017 Josh Blum
// Copyright (c) 2016-2016 Bastille Networks
// SPDX-License-Identifier: BSL-1.0

Expand Down Expand Up @@ -75,7 +75,9 @@
%insert("python")
%{
def __str__(self):
return "%s, %s"%(self.minimum(), self.maximum())
fields = [self.minimum(), self.maximum()]
if self.step() != 0.0: fields.append(self.step())
return ', '.join(['%g'%f for f in fields])
%}
};

Expand Down

0 comments on commit d5793c0

Please sign in to comment.