aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/gain_group.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-07-28 10:11:01 -0700
committerNick Foster <nick@nerdnetworks.org>2010-07-28 10:11:01 -0700
commit0c16a2c8372d9471e88ab67db4a2cbe446b73837 (patch)
treeeab2f995eed956c772eb6efc58e961819d98e38a /host/lib/gain_group.cpp
parentfd3a2ac058de6bdd69b9f388658e4189a9c5b32d (diff)
downloaduhd-0c16a2c8372d9471e88ab67db4a2cbe446b73837.tar.gz
uhd-0c16a2c8372d9471e88ab67db4a2cbe446b73837.tar.bz2
uhd-0c16a2c8372d9471e88ab67db4a2cbe446b73837.zip
usrp: gain group should not try to set gain elements if there are none
Diffstat (limited to 'host/lib/gain_group.cpp')
-rw-r--r--host/lib/gain_group.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/host/lib/gain_group.cpp b/host/lib/gain_group.cpp
index 3ae9a285e..5a14fa96f 100644
--- a/host/lib/gain_group.cpp
+++ b/host/lib/gain_group.cpp
@@ -70,6 +70,7 @@ public:
void set_value(float gain){
std::vector<gain_fcns_t> all_fcns = get_all_fcns();
+ if (all_fcns.size() == 0) return; //nothing to set!
//get the max step size among the gains
float max_step = 0;