Added full duplex comms parameter to rigCaps. We assume half-duplex

until we receive a reply to rigID.
monitor
Elliott Liggett 2021-06-18 12:41:56 -07:00
rodzic bd1b6fc1de
commit cc92aa1b5c
3 zmienionych plików z 27 dodań i 5 usunięć

Wyświetl plik

@ -2598,6 +2598,7 @@ void rigCommander::determineRigCaps()
rigCaps.spectAmpMax = 0;
rigCaps.spectLenMax = 0;
rigCaps.hasFDcomms = true; // false for older radios
// Clear inputs/preamps/attenuators lists in case we have re-connected.
rigCaps.preamps.clear();
@ -2729,6 +2730,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasDD = false;
rigCaps.hasDV = false;
rigCaps.hasCTCSS = true;
@ -2844,6 +2846,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
@ -2864,6 +2867,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = true;
rigCaps.hasATU = true;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
@ -2884,6 +2888,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
@ -2909,6 +2914,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
@ -2951,6 +2957,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.attenuators.push_back('\x20');
rigCaps.bands = standardHF;
@ -2966,6 +2973,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = false;
rigCaps.attenuators.push_back('\x20');
rigCaps.preamps.push_back('\x01');
@ -2985,6 +2993,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.preamps.push_back('\x01');
rigCaps.preamps.push_back('\x02');
@ -3002,6 +3011,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.preamps.push_back('\x01');
rigCaps.preamps.push_back('\x02');
@ -3019,6 +3029,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasATU = true;
rigCaps.preamps.push_back('\x01');
rigCaps.preamps.push_back('\x02');
@ -3039,6 +3050,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasLan = false;
rigCaps.hasEthernet = false;
rigCaps.hasWiFi = false;
rigCaps.hasFDcomms = false;
rigCaps.hasPreamp = false;
rigCaps.hasAntennaSel = false;
rigCaps.attenuators.push_back('\x10');

Wyświetl plik

@ -81,6 +81,7 @@ struct rigCapabilities {
bool hasLan; // OEM ethernet or wifi connection
bool hasEthernet;
bool hasWiFi;
bool hasFDcomms;
QVector<rigInput> inputs;

Wyświetl plik

@ -2656,6 +2656,8 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
// do all the initial grabs. For now, this hack of adding them here and there:
cmdOutQue.append(cmdGetFreq);
cmdOutQue.append(cmdGetMode);
// recalculate command timing now that we know the rig better:
calculateTimingParameters();
initPeriodicCommands();
}
}
@ -4453,14 +4455,21 @@ void wfmain::calculateTimingParameters()
unsigned int usPerByte = 9600*1000 / prefs.serialPortBaud;
unsigned int msMinTiming=usPerByte * 10*2/1000;
if(msMinTiming < 35)
msMinTiming = 35;
if(msMinTiming < 25)
msMinTiming = 25;
delayedCommand->setInterval( msMinTiming * 2); // 20 byte message
periodicPollingTimer->setInterval( msMinTiming ); // quicker for s-meter poll
qInfo(logSystem()) << "Delay command interval timing: " << msMinTiming * 2 << "ms";
qInfo(logSystem()) << "Periodic polling timer: " << msMinTiming << "ms";
if(haveRigCaps && rigCaps.hasFDcomms)
{
periodicPollingTimer->setInterval( msMinTiming ); // quicker for s-meter poll
} else {
periodicPollingTimer->setInterval( msMinTiming * 5); // slower for s-meter poll
}
qInfo(logSystem()) << "Delay command interval timing: " << delayedCommand->interval() << "ms";
qInfo(logSystem()) << "Periodic polling timer: " << periodicPollingTimer->interval() << "ms";
// Normal:
delayedCmdIntervalLAN_ms = msMinTiming * 2;