Merge /u/thbr/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/106/
This commit is contained in:
commit
15fbf1f9cd
4 changed files with 10 additions and 35 deletions
|
@ -620,6 +620,8 @@ TCAS::ThreatDetector::checkThreat(int mode, const SGPropertyNode* pModel)
|
|||
#ifdef FEATURE_TCAS_DEBUG_THREAT_DETECTOR
|
||||
checkCount++;
|
||||
#endif
|
||||
if (!pModel->getBoolValue("valid"))
|
||||
return ThreatInvisible;
|
||||
|
||||
float velocityKt = pModel->getDoubleValue("velocities/true-airspeed-kt");
|
||||
|
||||
|
|
|
@ -328,6 +328,12 @@ FGIO::parse_port_config( const string& config )
|
|||
|
||||
io->set_io_channel( new SGSocket( hostname, port, style ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
SG_LOG( SG_IO, SG_ALERT, "Unknown transport medium \"" << medium << "\" in \"" << config << "\"");
|
||||
delete io;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return io;
|
||||
}
|
||||
|
|
|
@ -46,28 +46,6 @@ FGAV400::~FGAV400() {
|
|||
}
|
||||
|
||||
|
||||
#if 0
|
||||
// calculate the garmin check sum
|
||||
static char calc_nmea_cksum(char *sentence) {
|
||||
unsigned char sum = 0;
|
||||
int i, len;
|
||||
|
||||
// cout << sentence << endl;
|
||||
|
||||
len = strlen(sentence);
|
||||
sum = sentence[0];
|
||||
for ( i = 1; i < len; i++ ) {
|
||||
// cout << sentence[i];
|
||||
sum ^= sentence[i];
|
||||
}
|
||||
// cout << endl;
|
||||
|
||||
// printf("sum = %02x\n", sum);
|
||||
return sum;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// generate AV400 message
|
||||
bool FGAV400::gen_message() {
|
||||
// cout << "generating garmin message" << endl;
|
||||
|
|
|
@ -56,25 +56,18 @@ static char calc_nmea_cksum(char *sentence) {
|
|||
unsigned char sum = 0;
|
||||
int i, len;
|
||||
|
||||
// cout << sentence << endl;
|
||||
|
||||
len = strlen(sentence);
|
||||
sum = sentence[0];
|
||||
for ( i = 1; i < len; i++ ) {
|
||||
// cout << sentence[i];
|
||||
sum ^= sentence[i];
|
||||
}
|
||||
// cout << endl;
|
||||
|
||||
// printf("sum = %02x\n", sum);
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
// generate Garmin message
|
||||
bool FGGarmin::gen_message() {
|
||||
// cout << "generating garmin message" << endl;
|
||||
|
||||
char rmc[256], rmc_sum[256], rmz[256], rmz_sum[256], gsa[256];
|
||||
char dir;
|
||||
int deg;
|
||||
|
@ -174,8 +167,6 @@ bool FGGarmin::gen_message() {
|
|||
garmin_sentence += gsa;
|
||||
garmin_sentence += "\r\n";
|
||||
|
||||
std::cout << garmin_sentence;
|
||||
|
||||
length = garmin_sentence.length();
|
||||
strncpy( buf, garmin_sentence.c_str(), length );
|
||||
|
||||
|
@ -364,8 +355,6 @@ bool FGGarmin::parse_message() {
|
|||
|
||||
}
|
||||
|
||||
// printf("%.8f %.8f\n", lon, lat);
|
||||
|
||||
begin = begin_line;
|
||||
end_line = msg.find("\n", begin_line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue