summaryrefslogtreecommitdiff
path: root/usrp2/firmware/lib
diff options
context:
space:
mode:
authoreb2008-10-14 04:44:02 +0000
committereb2008-10-14 04:44:02 +0000
commit1a08081354384504aca33a6c303f510dea4d1500 (patch)
tree0b2b9872c76c58cebb1fffc67cc44c7e4b6812e3 /usrp2/firmware/lib
parent7b02f546b0c2f04ef0072fb6ef5659dcc01b1a23 (diff)
downloadgnuradio-1a08081354384504aca33a6c303f510dea4d1500.tar.gz
gnuradio-1a08081354384504aca33a6c303f510dea4d1500.tar.bz2
gnuradio-1a08081354384504aca33a6c303f510dea4d1500.zip
fixed problem with negative offsets in calc_dxc_freq
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9792 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/firmware/lib')
-rw-r--r--usrp2/firmware/lib/db_init.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/usrp2/firmware/lib/db_init.c b/usrp2/firmware/lib/db_init.c
index 919dc4278..20816418b 100644
--- a/usrp2/firmware/lib/db_init.c
+++ b/usrp2/firmware/lib/db_init.c
@@ -290,16 +290,15 @@ calc_dxc_freq(u2_fxpt_freq_t target_freq, u2_fxpt_freq_t baseband_freq,
}
}
else {
- while (delta < -fs){
+ while (delta < -fs)
delta += fs;
- if (delta >= -fs/2){ // non-inverted region
- *dxc_freq = -delta;
- *inverted = false;
- }
- else { // inverted region
- *dxc_freq = delta + fs;
- *inverted = true;
- }
+ if (delta >= -fs/2){ // non-inverted region
+ *dxc_freq = -delta;
+ *inverted = false;
+ }
+ else { // inverted region
+ *dxc_freq = delta + fs;
+ *inverted = true;
}
}
}