M rpc/hamlib-impl.h +2 -1
@@ 1,5 1,5 @@
/*
- * Copyright (c) 2021-2023 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+ * Copyright (c) 2021-2024 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ 37,6 37,7 @@ struct hrig {
struct {
bool no_txpower;
+ bool skip_get_vfo;
} quirks;
/* cached values */
M rpc/hamlib-quirks.c +6 -0
@@ 54,6 54,7 @@ void hamlib_set_quirks(struct hrig *rig,
{
/* initialize all quirks as disabled */
rig->quirks.no_txpower = false;
+ rig->quirks.skip_get_vfo = false;
if ((model == RIG_MODEL_NETRIGCTL) && (CURRENT <= MKVER(4, 3, 1))) {
rig->quirks.no_txpower = true;
@@ 66,4 67,9 @@ void hamlib_set_quirks(struct hrig *rig,
cmn_err(CE_WARN, "Hamlib 4.5.5 and older has buggy KX2 backend");
cmn_err(CE_WARN, "Disabling power announcements");
}
+
+ if ((model == RIG_MODEL_IC7610) ||
+ (model == RIG_MODEL_IC9700)) {
+ rig->quirks.skip_get_vfo = true;
+ }
}
M rpc/hamlib.c +6 -3
@@ 271,9 271,12 @@ static int hamlib_refresh_cache(struct h
if (!rig->open)
return -ENOTCONN;
- ret = rig_get_vfo(rig->rig, &rig->rx_vfo);
- if (ret)
- goto err;
+ /* TODO: or should we call it and check for the expected RIG_ENAVAIL? */
+ if (!rig->quirks.skip_get_vfo) {
+ ret = rig_get_vfo(rig->rig, &rig->rx_vfo);
+ if (ret)
+ goto err;
+ }
ret = rig_get_split_vfo(rig->rig, rig->rx_vfo, &split, &rig->tx_vfo);
if (ret)