diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2013-03-25 18:03:08 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-26 21:52:41 -0400 |
commit | 5e9b3413f52dda8a11270add934170652fd1fcab (patch) | |
tree | 4f1cc0d64ca7cf277431c7fb490c717b28a664fd /gnuradio-core/src/lib | |
parent | 06949d7800f37b7a520e37105972b14f2b71025c (diff) |
fix for one-long strings being shown/converted incorrectly to char type
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/rpcpmtconverters_ice.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gnuradio-core/src/lib/runtime/rpcpmtconverters_ice.cc b/gnuradio-core/src/lib/runtime/rpcpmtconverters_ice.cc index 5aa7bc7cbd..7c8b6041e9 100644 --- a/gnuradio-core/src/lib/runtime/rpcpmtconverters_ice.cc +++ b/gnuradio-core/src/lib/runtime/rpcpmtconverters_ice.cc @@ -32,14 +32,7 @@ rpcpmtconverter::from_pmt(const pmt::pmt_t& knob, const Ice::Current& c) } else if(pmt::is_symbol(knob)) { std::string stuff = pmt::symbol_to_string(knob); - if(stuff.length() != 1) { - return new GNURadio::KnobS(stuff); - } - else { - return new GNURadio::KnobC(stuff[0]); - } - - //TODO: FLOAT!!! + return new GNURadio::KnobS(stuff); } else if(pmt::is_integer(knob)) { return new GNURadio::KnobI(pmt::to_long(knob)); @@ -108,10 +101,12 @@ rpcpmtconverter::to_pmt(const GNURadio::KnobPtr& knob, const Ice::Current& c) else if(id == "KnobL") { GNURadio::KnobLPtr k(GNURadio::KnobLPtr::dynamicCast(knob)); return pmt::mp((long)k->value); - } else if(id == "KnobVecC") { + } + else if(id == "KnobVecC") { GNURadio::KnobVecCPtr k(GNURadio::KnobVecCPtr::dynamicCast(knob)); return pmt::init_u8vector(k->value.size(), &k->value[0]); - } else if(id == "KnobVecI") { + } + else if(id == "KnobVecI") { GNURadio::KnobVecIPtr k(GNURadio::KnobVecIPtr::dynamicCast(knob)); return pmt::init_s32vector(k->value.size(), &k->value[0]); } |