Logo Search packages:      
Sourcecode: icomlib version File versions  Download package

bool PCP::PCPSetSquelch ( int  squelch  ) 

Set the current session's squelch.

squelch an integer between 0 and 99
sprintf converts (and combines) the cmd PCRSQL with the argument squelch , such that the argument has a minimum field width of two chars. If the field is < 2 chars (ie: arg=5) then it pads the field with one zero.

true or false based on PCPCheckResponse to indicate success or failure
See also:
PCPSquelch pcrcmd_t pcrdef.h

Definition at line 292 of file pcp.cpp.

References PCPCheckResponse(), PCPComm, PCPRadio, PRadInf::PCPSquelch, PCPTemp, and PComm::PCTell().

    if ((0<=squelch)&&(squelch<=99)) {
        memset(PCPTemp, '\0', sizeof(PCPTemp));
        sprintf(PCPTemp, "%s%0.2d", PCRSQL, squelch);
        if (PCPCheckResponse()) {
            return true;

    return false;

Generated by  Doxygen 1.6.0   Back to index