Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: FLRIG 2.0.04 + TS590SG, Meters Display no SWR or ALC
Mike Black
Hamlib has this logic for the TS480 and TS590 models ? ? retval = sscanf(ackbuf, "RM1%d;RM2%d;RM3%d;", swr, comp, alc);
On Wednesday, August 28, 2024 at 06:27:22 AM CDT, Dave <w1hkj@...> wrote:
Eric, Your code looks fine.? Please be more precise on the three readings at once.? That seems to be an undocumented feature that we should support for the SG David P.S.? My replies are tardy as I am a newlywed trying to merge two houses of "stuff".? I am 85 and the bride is 77.? We have too much stuff.? Alabama only recognizes a civil wedding between consenting parties.? That is in place.? This Saturday there will be a church wedding with family attendance.? Next week will be our honeymoon.? I will try to respond before we depart. On 8/22/24 12:59, Eric Hidle wrote:
I have gotten the SWR meter working and it has a
reasonably-accurate scaling with a lookup table based on the
rig scaling vs the scaling of the meter in flrig. Here's the
code for the get_swr function that goes into TS590SG.cxx
int
RIG_TS590SG::get_swr(void)
{ ? ? ? ? int mtr = 0; ? ? ? ? cmd = "RM;"; ? ? ? ? sendCommand(cmd); ? ? ? ? if (wait_char(';', 8, 100, "get SWR", ASC) < 8) return 0; ? ? ? ? sscanf(replystr.c_str(), "RM1%d", &mtr); ? ? ? ? if (( 1 <= mtr ) && ( mtr <= 6 )) ? ? ? ? { ? ? ? ? ? mtr = (mtr * 12) / 6; ? ? ? ? } ? ? ? ? else if (( 7 <= mtr ) && ( mtr <= 11 )) ? ? ? ? { ? ? ? ? ? mtr = (mtr * 25) / 11; ? ? ? ? } ? ? ? ? else if (( 12 <= mtr ) && ( mtr <= 15 )) ? ? ? ? { ? ? ? ? ? mtr = 25 + ((mtr - 12)*7); ? ? ? ? } ? ? ? ? else if ( mtr >= 16 ) ? ? ? ? { ? ? ? ? ? mtr = (mtr * 100) / 30; ? ? ? ? } ? ? ? ? if (mtr > 100) mtr = 100; ? ? ? ? return mtr; } And the result:
My get_alc doesn't seem to work, and I think it has to do
with the 590SG always returning all three meter readings on a
single response line. SWR is the first of the three, which is
why I think it works with this function. I'm not sure how to
scan for the third response. ? ? ? ? sscanf(replystr.c_str(),
"RM3%d", &alc_val); doesn't seem to pull it out.
Cheers
Eric
On Tue, 20 Aug 2024 at 10:09,
Wayne Carpenter KN2Z @minicowman via <mwcarpe=[email protected]>
wrote:
|
to navigate to use esc to dismiss