88 * This library is free software; you can redistribute it and/or
99 * modify it under the terms of the GNU Lesser General Public
1010 * License as published by the Free Software Foundation; either
11- * iersion 2.1 of the License, or (at your option) any later version.
11+ * version 2.1 of the License, or (at your option) any later version.
1212 *
1313 * This library is distributed in the hope that it will be useful,
1414 * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -313,7 +313,7 @@ struct rig_caps ft1000mp_caps =
313313 RIG_MODEL (RIG_MODEL_FT1000MP ),
314314 .model_name = "FT-1000MP" ,
315315 .mfg_name = "Yaesu" ,
316- .version = "20240323.1 " ,
316+ .version = "20241105.0 " ,
317317 .copyright = "LGPL" ,
318318 .status = RIG_STATUS_STABLE ,
319319 .rig_type = RIG_TYPE_TRANSCEIVER ,
@@ -456,7 +456,7 @@ struct rig_caps ft1000mpmkv_caps =
456456 RIG_MODEL (RIG_MODEL_FT1000MPMKV ),
457457 .model_name = "MARK-V FT-1000MP" ,
458458 .mfg_name = "Yaesu" ,
459- .version = "20240228 .0" ,
459+ .version = "20241105 .0" ,
460460 .copyright = "LGPL" ,
461461 .status = RIG_STATUS_STABLE ,
462462 .rig_type = RIG_TYPE_TRANSCEIVER ,
@@ -599,7 +599,7 @@ struct rig_caps ft1000mpmkvfld_caps =
599599 RIG_MODEL (RIG_MODEL_FT1000MPMKVFLD ),
600600 .model_name = "MARK-V Field FT-1000MP" ,
601601 .mfg_name = "Yaesu" ,
602- .version = "20240228 .0" ,
602+ .version = "20241105 .0" ,
603603 .copyright = "LGPL" ,
604604 .status = RIG_STATUS_STABLE ,
605605 .rig_type = RIG_TYPE_TRANSCEIVER ,
@@ -923,6 +923,10 @@ static int ft1000mp_get_vfo_data(RIG *rig, vfo_t vfo)
923923
924924static int ft1000mp_get_freq (RIG * rig , vfo_t vfo , freq_t * freq )
925925{
926+ struct ft1000mp_priv_data * priv ;
927+ unsigned char * p ;
928+ freq_t f ;
929+ int retval ;
926930
927931 ENTERFUNC ;
928932
@@ -933,15 +937,34 @@ static int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
933937 vfo = STATE (rig )-> current_vfo ;
934938 }
935939
936- if (vfo == RIG_VFO_A )
940+ retval = ft1000mp_get_vfo_data (rig , vfo );
941+
942+
943+ if (retval < 0 )
944+ {
945+ RETURNFUNC (retval );
946+ }
947+
948+ priv = (struct ft1000mp_priv_data * )rig -> state .priv ;
949+
950+ if (vfo == RIG_VFO_B )
937951 {
938- * freq = CACHE ( rig ) -> freqMainA ;
952+ p = & priv -> update_data [ FT1000MP_SUMO_VFO_B_FREQ ] ;
939953 }
940954 else
941955 {
942- * freq = CACHE ( rig ) -> freqMainB ;
956+ p = & priv -> update_data [ FT1000MP_SUMO_VFO_A_FREQ ]; /* CURR_VFO has VFOA offset */
943957 }
944958
959+ /* big endian integer, kinda */
960+ f = ((((((p [0 ] << 8 ) + p [1 ]) << 8 ) + p [2 ]) << 8 ) + p [3 ]) * 10 / 16 ;
961+
962+ rig_debug (RIG_DEBUG_TRACE , "%s: freq = %" PRIfreq " Hz for VFO [%x]\n" , __func__ ,
963+ f ,
964+ vfo );
965+
966+ * freq = f ; /* return displayed frequency */
967+
945968 RETURNFUNC (RIG_OK );
946969}
947970
0 commit comments