diff options
Diffstat (limited to 'usrp')
-rwxr-xr-x | usrp/firmware/src/common/build_eeprom.py | 4 | ||||
-rw-r--r-- | usrp/host/lib/db_wbxng.cc | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usrp/firmware/src/common/build_eeprom.py b/usrp/firmware/src/common/build_eeprom.py index ed9bb56a4..d73cbbc4f 100755 --- a/usrp/firmware/src/common/build_eeprom.py +++ b/usrp/firmware/src/common/build_eeprom.py @@ -146,7 +146,7 @@ def build_shell_script (out, ihx_filename, rev, prefix): out.write ('#!/bin/sh\n') out.write ('usrper -x load_firmware ' + prefix + '/share/usrp/rev%d/std.ihx\n' % rev) - out.write ('sleep 1\n') + out.write ('sleep 2\n') # print "len(image) =", len(image) @@ -161,7 +161,7 @@ def build_shell_script (out, ihx_filename, rev, prefix): (i2c_addr, rom_addr, ''.join (hex_image[0:l]))) hex_image = hex_image[l:] rom_addr = rom_addr + l - out.write ('sleep 1\n') + out.write ('sleep 2\n') if __name__ == '__main__': usage = "usage: %prog -p PREFIX -r REV [options] bootfile.ihx" diff --git a/usrp/host/lib/db_wbxng.cc b/usrp/host/lib/db_wbxng.cc index b35a9cb35..bd836dfe3 100644 --- a/usrp/host/lib/db_wbxng.cc +++ b/usrp/host/lib/db_wbxng.cc @@ -80,7 +80,9 @@ wbxng_base::set_freq(double freq) actual_baseband_freq is the RF frequency that corresponds to DC in the IF. */ - freq_t int_freq = freq_t(freq); + // clamp freq + freq_t int_freq = freq_t(std::max(freq_min(), std::min(freq, freq_max()))); + bool ok = d_common->_set_freq(int_freq*2); double freq_result = (double) d_common->_get_freq()/2.0; struct freq_result_t args = {ok, freq_result}; |