~ubuntu-branches/ubuntu/utopic/fldigi/utopic

« back to all changes in this revision

Viewing changes to src/rigcontrol/rigio.cxx

  • Committer: Package Import Robot
  • Author(s): Kamal Mostafa
  • Date: 2013-02-02 11:52:30 UTC
  • mfrom: (1.1.64)
  • Revision ID: package-import@ubuntu.com-20130202115230-kea12fgypzi0c2uk
Tags: 3.21.67-2
* Debian packaging:
  - debian/fldigi.menu: use absolute path to menu icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
919
919
        LOG_VERBOSE("Retries failed");
920
920
}
921
921
 
922
 
void rigCAT_sendINIT()
923
 
{
 
922
void rigCAT_sendINIT(const string& icmd){
924
923
        XMLIOS modeCmd;
925
924
        list<XMLIOS>::iterator itrCmd;
926
925
        string strCmd;
930
929
 
931
930
        itrCmd = commands.begin();
932
931
        while (itrCmd != commands.end()) {
933
 
                if ((*itrCmd).SYMBOL == "INIT")
 
932
                if ((*itrCmd).SYMBOL == icmd)
934
933
                        break;
935
934
                ++itrCmd;
936
935
        }
980
979
        btnRigCatDTRplus->value(xmlrig.dtr);
981
980
        btnRigCatRTSptt->value(xmlrig.rtsptt);
982
981
        btnRigCatDTRptt->value(xmlrig.dtrptt);
 
982
        chk_restore_tio->value(xmlrig.restore_tio);
983
983
        chkRigCatRTSCTSflow->value(xmlrig.rtscts);
984
984
        cntRigCatRetries->value(xmlrig.retries);
985
985
        cntRigCatTimeout->value(xmlrig.timeout);
998
998
        btnRigCatDTRplus->value(progdefaults.RigCatDTRplus);
999
999
        btnRigCatRTSptt->value(progdefaults.RigCatRTSptt);
1000
1000
        btnRigCatDTRptt->value(progdefaults.RigCatDTRptt);
 
1001
        chk_restore_tio->value(progdefaults.RigCatRestoreTIO);
1001
1002
        chkRigCatRTSCTSflow->value(progdefaults.RigCatRTSCTSflow);
1002
1003
        cntRigCatRetries->value(progdefaults.RigCatRetries);
1003
1004
        cntRigCatTimeout->value(progdefaults.RigCatTimeout);
1020
1021
        progdefaults.RigCatDTRplus = btnRigCatDTRplus->value();
1021
1022
        progdefaults.RigCatRTSptt = btnRigCatRTSptt->value();
1022
1023
        progdefaults.RigCatDTRptt = btnRigCatDTRptt->value();
 
1024
        progdefaults.RigCatRestoreTIO = chk_restore_tio->value();
1023
1025
        progdefaults.RigCatRTSCTSflow = chkRigCatRTSCTSflow->value();
1024
1026
        progdefaults.RigCatRetries = static_cast<int>(cntRigCatRetries->value());
1025
1027
        progdefaults.RigCatTimeout = static_cast<int>(cntRigCatTimeout->value());
1048
1050
                rigio.DTR(progdefaults.RigCatDTRplus);
1049
1051
                rigio.RTSptt(progdefaults.RigCatRTSptt);
1050
1052
                rigio.DTRptt(progdefaults.RigCatDTRptt);
 
1053
                rigio.RestoreTIO(progdefaults.RigCatRestoreTIO);
1051
1054
                rigio.RTSCTS(progdefaults.RigCatRTSCTSflow);
1052
1055
                rigio.Stopbits(progdefaults.RigCatStopbits);
1053
1056
 
1063
1066
use rts ptt: %c\n\
1064
1067
initial dtr: %+d\n\
1065
1068
use dtr ptt: %c\n\
 
1069
restore tio: %c\n\
1066
1070
flowcontrol: %c\n\
1067
1071
echo       : %c\n",
1068
1072
                rigio.Device().c_str(),
1073
1077
                progdefaults.RigCatWait,
1074
1078
                        (rigio.RTS() ? +12 : -12), (rigio.RTSptt() ? 'T' : 'F'),
1075
1079
                        (rigio.DTR() ? +12 : -12), (rigio.DTRptt() ? 'T' : 'F'),
 
1080
                        (rigio.RestoreTIO() ? 'T' : 'F'),
1076
1081
                        (rigio.RTSCTS() ? 'T' : 'F'),
1077
1082
                        progdefaults.RigCatECHO ? 'T' : 'F');
1078
1083
 
1086
1091
                sRigWidth = "";
1087
1092
 
1088
1093
                nonCATrig = false;
 
1094
                rigCAT_sendINIT("INIT");
1089
1095
 
1090
1096
// must be able to get frequency 3 times in sequence or serial port might
1091
1097
// be shared with another application (flrig)
1105
1111
                        return false;
1106
1112
                } else {
1107
1113
                        nonCATrig = false;
1108
 
                        rigCAT_sendINIT();
1109
1114
                        init_Xml_RigDialog();
1110
1115
                }
1111
1116
        } else {
1138
1143
 
1139
1144
        if (rigCAT_thread == 0) return;
1140
1145
 
 
1146
        rigCAT_sendINIT("CLOSE");
 
1147
 
1141
1148
        pthread_mutex_lock(&rigCAT_mutex);
1142
1149
                rigCAT_exit = true;
1143
1150
        pthread_mutex_unlock(&rigCAT_mutex);