Change frequency setting for the FT-747GX to something more basic

This rig has  25Hz resolution but accepts 10Hz steps  in the frequency
set CAT command. The rig adjusts internally and only reports back 25Hz
steps. The prior implementation ended up incrementing the frequency in
undesirable  unwanted 10Hz  steps, this  simply rounds  to 10Hz  steps
before sending to the rig.
pull/94/head^2
Bill Somerville 2019-02-24 23:14:32 +00:00
rodzic 9d927d3370
commit b8825f6acd
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -401,8 +401,9 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
memcpy(&p->p_cmd,&ft747_ncmd[FT_747_NATIVE_FREQ_SET].nseq,YAESU_CMD_LENGTH);
/* store bcd format in p_cmd (LSB), round to nearest 25th Hz */
to_bcd(p->p_cmd, (freq+12)/10, 8);
/* store bcd format in p_cmd (LSB), round to nearest 10 Hz even
though the rig will internally then round to 25 Hz steps */
to_bcd(p->p_cmd, (freq + 5)/10, 8);
rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq after conversion = %"PRIll" Hz \n", from_bcd(p->p_cmd,8)* 10 );