更新 'src/Network/fgcom.cxx'
This commit is contained in:
parent
c5fb798d74
commit
6508159642
@ -407,7 +407,7 @@ void FGCom::setupCommFrequency(int channel) {
|
|||||||
void FGCom::connectToCommFrequency() {
|
void FGCom::connectToCommFrequency() {
|
||||||
// ensure that the current comm is still in range
|
// ensure that the current comm is still in range
|
||||||
|
|
||||||
SG_LOG(SG_SOUND,SG_INFO,"connectToCommFrequency");
|
SG_LOG(SG_SOUND,SG_INFO,"connectToCommFrequency:" << _currentCallFrequency);
|
||||||
|
|
||||||
if ((_currentCallFrequency > 0.0) && !isInRange(_currentCallFrequency)) {
|
if ((_currentCallFrequency > 0.0) && !isInRange(_currentCallFrequency)) {
|
||||||
SG_LOG(SG_SOUND, SG_WARN, "FGCom: call out of range of: " << _currentCallFrequency);
|
SG_LOG(SG_SOUND, SG_WARN, "FGCom: call out of range of: " << _currentCallFrequency);
|
||||||
@ -446,6 +446,9 @@ void FGCom::connectToCommFrequency() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
SG_LOG(SG_SOUND, SG_WARN, "FGCom: frequency");
|
||||||
|
|
||||||
if (!num.empty()) {
|
if (!num.empty()) {
|
||||||
_currentCallIdent = iaxc_call(num.c_str());
|
_currentCallIdent = iaxc_call(num.c_str());
|
||||||
if (_currentCallIdent == -1)
|
if (_currentCallIdent == -1)
|
||||||
@ -744,6 +747,10 @@ std::string FGCom::computePhoneNumber(const double& freq, const std::string& ica
|
|||||||
|
|
||||||
bool FGCom::isInRange(const double &freq) const
|
bool FGCom::isInRange(const double &freq) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// zhongjin 测试环境,始终返回1
|
||||||
|
return 1;
|
||||||
|
|
||||||
for(size_t i=0; i<sizeof(special_freq)/sizeof(special_freq[0]); i++) { // Check if it's a special freq
|
for(size_t i=0; i<sizeof(special_freq)/sizeof(special_freq[0]); i++) { // Check if it's a special freq
|
||||||
if( (special_freq[i]) == getCurrentFrequencyKhz()) {
|
if( (special_freq[i]) == getCurrentFrequencyKhz()) {
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user