alexlee188 / ghpsdr3-alex

Modifications of John Melton's ghpsdr3
GNU General Public License v3.0
63 stars 38 forks source link

Button Mute of QtRadio #41

Closed vigeruno closed 7 years ago

vigeruno commented 7 years ago

Hello.

Where can I find the mute in dspserver to disable it?

thanks...

alexlee188 commented 7 years ago

What do you mean by disabling the mute?

You mean the MUTE button at the top right corner of QtRadio?

On Wed, Oct 12, 2016 at 3:30 PM, vigeruno notifications@github.com wrote:

Hello.

Where can I find the mute in dspserver to disable it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9bSJi3f9X7eI28i5G22SDugSBhjiks5qzIyEgaJpZM4KUcv1 .

vigeruno commented 7 years ago

Thank you for responding AlexLee188

Is just what because remote there are people who leave muted remote radio preventing the reception to those who use glsdr on android.

Side dspserver I can not find the mute to disable ....

I apologize for the bad English of the google translator.

img_2310

alexlee188 commented 7 years ago

in dspserver, look at client.c

find setrxoutputgain

If you want to disable MUTE, or for that matter any change in RxOutputGain, just set the output to 100% if all conditions.

    } else if(strncmp(cmd,"setrxoutputgain",15)==0) {
        int gain;
        if (tokenize_cmd(&saveptr, tokens, 1) != 1)
            goto badcommand;
        gain=atoi(tokens[0]);
        SetRXOutputGain(0,0,(double)gain/100.0);

you can change gain=atoi(tokens[0]); to gain = 100;

On Thu, Oct 13, 2016 at 8:19 PM, vigeruno notifications@github.com wrote:

Thank you for responding AlexLee188

Is just what because remote there are people who leave muted remote radio preventing the reception to those who use glsdr on android.

Side dspserver I can not find the mute to disable ....

I apologize for the bad English of the google translator.

[image: img_2310] https://cloud.githubusercontent.com/assets/22787199/19348767/c5b5a0c0-914f-11e6-82b6-e37cea3c67f6.JPG

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/41#issuecomment-253497115, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9XlQBsuTVKQJcIp95sWVLuUnanyrks5qziHIgaJpZM4KUcv1 .

vigeruno commented 7 years ago

Thanks...
pollice_alto

I set the value to 70%

    } else if(strncmp(cmd,"setrxoutputgain",15)==0) {
        int gain;
        if (tokenize_cmd(&saveptr, tokens, 1) != 1)
            goto badcommand;
        //gain=atoi(tokens[0]);
        gain=70;
        SetRXOutputGain(0,0,(double)gain/100.0);
    } else if(strncmp(cmd,"setsubrxoutputgain",18)==0) {
        int gain;
        if (tokenize_cmd(&saveptr, tokens, 1) != 1)
            goto badcommand;
        //gain=atoi(tokens[0]);
        gain=70;
vigeruno commented 7 years ago

Hello. In this way, the server is more 'safe for a PUBLIC user. It prevents activating: NR,ANF,NB,MUTE,GAIN FIX 70%,SQUELCH.

ren *.zip for patch Download: Save Target As vigeruno

Apply Patch: git apply --stat name_file.diff

diff --git a/trunk/src/QtRadio/ctl.cpp b/trunk/src/QtRadio/ctl.cpp index 3775a08..130f01e 100644 --- a/trunk/src/QtRadio/ctl.cpp +++ b/trunk/src/QtRadio/ctl.cpp @@ -225,3 +225,4 @@ void Ctl::setAudioMute(bool muted) ui->btnMute->setChecked(muted); ui->audioSlider->setEnabled(!muted); } + diff --git a/trunk/src/dspserver/client.c b/trunk/src/dspserver/client.c index d860dd8..0841839 100644 --- a/trunk/src/dspserver/client.c +++ b/trunk/src/dspserver/client.c @@ -1394,7 +1394,7 @@ void readcb(struct bufferevent bev, void ctx){ if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand; if(strcmp(tokens[0],"true")==0) {

alexlee188 commented 7 years ago

I may be best to have this as a command line option for dspserver. So if a server owner wants to have full At Radio control, he allows mute, set rd volume, NB etc. If he intends for mostly pubic access via glSDR, he disables mute etc:

dspserver -safemode

On Fri, 14 Oct, 2016 4:01 pm vigeruno, notifications@github.com wrote:

Hello. In this way, the server is more 'safe for a PUBLIC user. It prevents activating: NR,ANF,NB,MUTE,GAIN FIX 70%,SQUELCH.

diff --git a/trunk/src/QtRadio/ctl.cpp b/trunk/src/QtRadio/ctl.cpp index 3775a08..130f01e 100644 --- a/trunk/src/QtRadio/ctl.cpp +++ b/trunk/src/QtRadio/ctl.cpp @@ -225,3 +225,4 @@ void Ctl::setAudioMute(bool muted) ui->btnMute->setChecked(muted); ui->audioSlider->setEnabled(!muted); } + diff --git a/trunk/src/dspserver/client.c b/trunk/src/dspserver/client.c index d860dd8..0841839 100644 --- a/trunk/src/dspserver/client.c +++ b/trunk/src/dspserver/client.c @@ -1394,7 +1394,7 @@ void readcb(struct bufferevent bev, void ctx){

if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand;

if(strcmp(tokens[0],"true")==0) {

  • nr=1;
  • nr=0; } SetANR(0,0,nr); SetANR(0,1,nr); @@ -1403,7 +1403,7 @@ void readcb(struct bufferevent bev, void ctx){ if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand; if(strcmp(tokens[0],"true")==0) {
  • nb=1;
  • nb=0; } SetNB(0,0,nb); SetNB(0,1,nb); @@ -1421,7 +1421,7 @@ void readcb(struct bufferevent bev, void ctx){ if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand; if(strcmp(tokens[0],"true")==0) {
  • anf=1;
  • anf=0; } SetANF(0,0,anf); SetANF(0,1,anf); @@ -1429,13 +1429,15 @@ void readcb(struct bufferevent bev, void ctx){ int gain; if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand;
  • gain=atoi(tokens[0]);
  • //gain=atoi(tokens[0]);
  • gain=70; SetRXOutputGain(0,0,(double)gain/100.0); } else if(strncmp(cmd,"setsubrxoutputgain",18)==0) { int gain; if (tokenize_cmd(&saveptr, tokens, 1) != 1) goto badcommand;
  • gain=atoi(tokens[0]);
  • //gain=atoi(tokens[0]);
  • gain=70; SetRXOutputGain(0,1,(double)gain/100.0); } else if(strncmp(cmd,"startaudiostream",16)==0) { int ntok, bufsize, rate, channels, micEncoding; diff --git a/trunk/src/dspserver/ozy.c b/trunk/src/dspserver/ozy.c index cb6ab65..90a6f9a 100644 --- a/trunk/src/dspserver/ozy.c +++ b/trunk/src/dspserver/ozy.c @@ -465,7 +465,7 @@ int ozySetFrequency(long long ddsAFrequency) { sprintf(command,"frequency %lld", (ddsAFrequency - (long long)LO_offset)); send_command(command, response); token=strtok_r(response," ",&saveptr);
  • if(token!=NULL) {
  • if(token!=NULL) { if(strcmp(token,"OK")==0) { result=0; lastFreq = ddsAFrequency;

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/41#issuecomment-253734812, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9aD7fikX0v8Weg7rp_0PX4kvjMA8ks5qzzbOgaJpZM4KUcv1 .