¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: FLRIG 2.0.04 + TS590SG, Meters Display no SWR or ALC


 

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:

image.png


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:

@Philip Rose and @Cliff? Thanks guys. Got the meter(s) turned off. I must have been goofing around with settings at some point and exited with meters showing. All better now.
?
Looking forward to seeing what Dave can do with coding for the sg..?
?
I learned a lot about 'sniffing' serial data back in prep time for Y2K. At least 'something' good came from all that effort. But given that those preps happened almost 25 years ago.. a lot of what I learned back then has gotten away from me. Proof positive, if you don't use it, you lose it.?
?
73 y'all

Join [email protected] to automatically receive all group messages.