f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.73k stars 421 forks source link

typing a value to relative integer dial takes wrong values #168

Closed beta-tester closed 6 years ago

beta-tester commented 6 years ago

in NFN Demodulator, when i type in a value to the Δf field i get wrong numbers, when the negative sign is selected.

e.g.:

  1. case with no issue, sign is positive (+):
  2. i click to the very left digit and type in 1111111
  3. in the field Δf it shows 1,111,111 Hz

that's ok.

  1. case with the issue, sign is negative (-):
  2. i click to the sign in front of the very left digit and change it from positive to negative.
  3. i click to the very left digit and type in 1111111
  4. in the field Δf it shows me 8,440,505 Hz

that's totally wrong.

nfn delta f issue

texasyojimbo commented 6 years ago

Hi beta-tester,

This is similar to #97 which I filed some time ago.

As I recall, we aren't really intended to do direct frequency entry here; this was originally conceived as something that would be adjusted only using up/down arrows or mouse. It is sort of a happy accident that it even somewhat works at all.

texasyojimbo commented 6 years ago

Also, which version are you using, what platform, etc? Keep in mind that if Eduoard accepts this as a bug, he will probably need to reproduce it first. =D

beta-tester commented 6 years ago

sorry, that i didn't gave any information about my environment i used. OS: Microsoft Windows 10 Pro 64bit (1803) SDRAngel: sdrangel_v3.14.5.7z SDR: RTL-SDR dongle (one with E4000 & one with R820T2 tuner) or PlutoSDR rev. B

i am using the "direct input" by typing in the frequencies relative often, when i have a setup, where i have multiple decoders active to be able to follow different frequencies at the same time of the current bandwidth. e.g. ... NFM Decoder A: with Δf -0,012,500 Hz NFM Decoder B: with Δf 0,000,000 Hz NFM Decoder C: with Δf 0,012,500 Hz ...

the issue is independend to the source device. you even can reproduce that issue by selecting a Decoder, adding it to the channels and there you can already type in values to Δf. first click to the sign-digit to get the underline to be able to change + to -. then you can go to select the number-digits to click on one to get the input-cursor (underline) to there and type the value you need.

EDIT: yes it is the same issue as #97. it doesn't matter what value you type in as lont the sign in front is negative. while you are typing, you get wrong digits. BTW: all kinds of those Δf fields are affected in other decoders as well, where a negative value is possible to chose.

f4exb commented 6 years ago

Hi, indeed there seems to be an issue with typing in negative values in the ValueDialZ (relative integer dial) component.

beta-tester commented 6 years ago

thank you. i could compile branch DEV on ubuntu 18.04 LTS and there it works.

beta-tester commented 6 years ago

a little tiny issue still there. if the current value is +0,000,000 Hz then you can't change the sign by typing in, it stays at (+). you have first to have at least a value different to 0,000,000 to be able to type in a minus sign (-). i think it comes, because when you put in a -0,000,000 it will change automatically to +0,000,000

EDIT: and the sign will evaluate at each typed digit. e.g. current value is -1,000,000Hz and you try to change it to -0,900,000 while you change the very left digit to 0 as soon that happens, the sign flips to +, because at that moment all digit are 0 before you reached the second left digit to type in the 9 for -0,9...

so to workaround this issue, you have to type in the value you want first and afterwards you have to change the sign.

f4exb commented 6 years ago

Too complicated... you will have to live with this.

beta-tester commented 6 years ago

ok... thank you for the typing issue. i can live with the workaround.