From: John Melton g0orx/n6lyt Date: Sat, 11 Jun 2016 13:52:41 +0000 (+0000) Subject: fixed tuning direction bug introduced with LimeSDR changes X-Git-Url: https://git.rkrishnan.org/pf/vdrive/readonly?a=commitdiff_plain;h=656b39f14b66412ac77e9cc3d61e1a87ee21fb61;p=pihpsdr.git fixed tuning direction bug introduced with LimeSDR changes --- diff --git a/gpio.c b/gpio.c index c2060a8..6c2b9b1 100644 --- a/gpio.c +++ b/gpio.c @@ -766,7 +766,7 @@ static int vfo_encoder_changed(void *data) { static int af_encoder_changed(void *data) { int pos=*(int*)data; if(pos!=0) { - if(function) { + if(function || isTransmitting()) { // mic gain double gain=mic_gain; gain+=(double)pos/100.0; diff --git a/pihpsdr b/pihpsdr index 9f371c3..8bc9b14 100755 Binary files a/pihpsdr and b/pihpsdr differ diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar index eade2e5..638dc2e 100644 Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr index 9f371c3..8bc9b14 100755 Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ diff --git a/vfo.c b/vfo.c index 0cf2fc2..76ecf4c 100644 --- a/vfo.c +++ b/vfo.c @@ -69,8 +69,13 @@ void vfo_move(int hz) { BANDSTACK_ENTRY* entry=bandstack_entry_get_current(); //entry->frequencyA=(entry->frequencyA+hz)/step*step; //setFrequency(entry->frequencyA); - //setFrequency((entry->frequencyA+ddsOffset+hz)/step*step); - setFrequency((entry->frequencyA+ddsOffset-hz)/step*step); + +#ifdef LIMESDR + if(protocol==LIMESDR_PROTOCOL) + setFrequency((entry->frequencyA+ddsOffset-hz)/step*step); + else +#endif + setFrequency((entry->frequencyA+ddsOffset+hz)/step*step); vfo_update(NULL); } } @@ -79,7 +84,12 @@ void vfo_move_to(int hz) { BANDSTACK_ENTRY* entry=bandstack_entry_get_current(); //entry->frequencyA=(entry->frequencyA+hz)/step*step; //setFrequency(entry->frequencyA); - setFrequency((entry->frequencyA+hz)/step*step); +#ifdef LIMESDR + if(protocol==LIMESDR_PROTOCOL) + setFrequency((entry->frequencyA+ddsOffset-hz)/step*step); + else +#endif + setFrequency((entry->frequencyA+ddsOffset+hz)/step*step); vfo_update(NULL); } }