On 25/07/2014 15:23, Thomas Early wrote:
> Hi,
Hi again Tom,

I had a chance to look into this a bit further, comments inline below.
>
> My first post, so be gentle please...
No need for that, you have done well debugging your issue.
>
> I had Debian 7.4 and successfully compiled an earlier version of wsjtx.
> I posted some info on the Yahoo group.
>
> I got tired of "swimming upstream" with Debian and my ham stuff and
> switched to ubuntu 14.04. Now after building the lastest wsjtx I'm
> having trouble with ptt. There seems to be some errors in the code:
>
> in ~/WSJT-X.ini there is a "pttData" variable which is set according to
> the Transmitter Audio Source radio buttons on the Radio configuration
> tab. I have a TS-590s so I set that to "Rear/Data". If I then stop and
> restart and it reverts to "Front/Mic"! Looking at Configuration.cpp, I see:
>
> <code>
>     settings_->setValue ("pttData",
> TransceiverFactory::TX_audio_source_rear == rig_params_.TX_audio_source_);
> </code>
>
> in the write_setting() subroutine. But in the read_settings() subroutine
> there is:
>
> <code>
>     rig_params_.TX_audio_source_ = settings_->value ("TXAudioSource",
> QVariant::fromValue
> (TransceiverFactory::TX_audio_source_front)).value<TransceiverFactory::TXAudioSource>
> ();
> </code>
>
> That is a problem because there is no "TXAudioSource" in WSJT-X.ini.
> So... I changed that line to:
>
> <code>
>     rig_params_.TX_audio_source_ = settings_->value("pttData",
> false).toBool() ? TransceiverFactory::TX_audio_source_rear :
> TransceiverFactory::TX_audio_source_front;
> </code>
That is indeed a defect, the intent was to have the settings file key 
being "TXAudioSource". This was a hang over from when the name was less 
explicit. I have checked in a fix for this; you will probably have to 
set the configuration option again. BTW settings file keys are created 
automatically on first use.
>
> That fixed my the persistence of the Transmitter Audio Source radio
> buttons, but I am still having problems with ptt! The "Test PTT" button
> turns on the 590s transmitter, but the transmitter is taking input from
> the mic and not the Data port.
>
> Now I am stuck. I see in HamlibTransceiver.cpp the do_ppt() subroutine
> with the line:
>
> <code>
>             error_check (rig_set_ptt (rig_.data (), RIG_VFO_CURR,
> back_ptt_port_ ? RIG_PTT_ON_DATA : RIG_PTT_ON), tr ("setting PTT on"));
> </code>
>
> I am unsure of the logic of setting back_ptt_port_, so I hard coded this
> to the data side:
>
> <code>
>             error_check (rig_set_ptt(rig_.data(), RIG_VFO_CURR,
> RIG_PTT_ON_DATA), tr ("setting PTT on"));
> </code>
FYI the logic is:

In the Configuration class a member called rig_params_.TX_audio_source 
is used to store the state of the settings screen audio source radio 
button group. This is also (now) persisted in the settings key 
"TXAudioSource". It is of type TransceiverFactory::TXAudioSource which 
is an enum defined in TransceiverFactory.hpp. The button ids on the 
settings GUI are given the integer value of that enum so it can be 
relatively easily read/written to the GUI data model.

The Configuration class instantiates a concrete object conforming to the 
Transceiver abstract interface using the TransceiverFactory::create() 
factory method. This factory hides the internal details of how the 
Transceiver types are implemented. The 10'th argument of the create() 
factory method passes in the choice of TXAudioSource.

The HamlibTransceiver class implements the Transceiver interface for 
direct Hamlib CAT control. It uses the ptt_use_data_ptt argument to 
TransceiverFactory::create() to decide how to drive CAT PTT commands via 
the Transceiver::ptt() method.

In your case you have TXAudioSource set to TX_Audio_source_rear which 
causes back_ptt_port_ in HamlibTransceiver to be true. So the correct 
command i.e. "TX1" should have been set to the TS590s when PTT is asserted.

Note that you must select "CAT" as a PTT method for any of this to work.
>
> According to the code in hamlib, that should send a "TX1" to my 590s,
> but my mic is still active with the "Text PTT" button.
Although not all necessary, your changes should have worked.

You need to ensure you are using my fork of Hamlib3 for WSJT-X, if you 
are using the CMake build instructions that have been published here on 
this list several time; you should be getting that.

Also you need to ensure that you have the recent firmware (v1.07) for 
the TS590s installed on your rig as Kenwood fixed a number of serious 
CAT defects with that.

If the change I made and this information doesn't get you up and running 
Tom; I can give you some further information on how to debug the CAT 
connection and see what is being sent to the rig.
>
> Any help would be appreciated! 73!
>
> Tom AC2IE
73
Bill
G4WJS.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to