ea4k / klog

KLog is a multiplatform free hamradio logger. It runs natively on Linux, macOS and Windows.
https://www.klog.xyz
GNU General Public License v3.0
75 stars 25 forks source link

Frequency setting is sticky on least significant digit #622

Closed ikbenkous closed 11 months ago

ikbenkous commented 1 year ago

When adjusting rig frequency, user has to scroll past frequency for the klog frequency to update.

See here after tuning down from 14.350.000 down to 14.349.000: image The frequency only updated to 14.349 when I tuned 1 Hz down to 14.348.999.

Additionally: when tuning down in frequency, something like 14.347.001 is interpreted as 14.348. image

Behavior is inverse for tuning upwards.

Note: flrig correctly shows what my physical radio says.

ikbenkous commented 1 year ago

Updating Utilities::isSameFreq()'s comparison (if (fabs(fr1 - fr2) < 0.001)) to a precision smaller than 0.001 solves the problem but introduces the following behavior and issues:

  1. Seems to correctly round frequency to nearest whole kHz.
  2. Issues command to snap radio frequency to nearest whole kHz on transition if not in "read-only" mode.
  3. 13.349.500 is rounded upwards.

Further behavior with internal storage and ADIF exports what have you is untested.

Something like 13.349.500 should probably be rounded downwards to 13.349 since copying the leading digits off your radio is the easiest. Or is there some standard to this?

Anyhow, frequency precision is a must here since I have QSOs with a trailing 500 Hz and hear people even use the nearest 100 Hz on 20 meters.

ikbenkous commented 11 months ago

Fixed by #626.