Merge branches 'torsten/warn-atc' and 'tortsen/warn-morse'
This commit is contained in:
commit
ffb6b95782
4 changed files with 6 additions and 6 deletions
|
@ -164,8 +164,8 @@ void FGAILocalTraffic::GetRwyDetails(const string& id) {
|
|||
|
||||
// move to the +l end/center of the runway
|
||||
//cout << "Runway center is at " << runway._lon << ", " << runway._lat << '\n';
|
||||
double tshlon, tshlat, tshr;
|
||||
double tolon, tolat, tor;
|
||||
double tshlon = 0.0, tshlat = 0.0, tshr;
|
||||
double tolon = 0.0, tolat = 0.0, tor;
|
||||
rwy.length = runway->lengthM();
|
||||
rwy.width = runway->widthM();
|
||||
geo_direct_wgs_84 ( aptElev, runway->latitude(), runway->longitude(), other_way,
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
|
||||
|
||||
FGATC::FGATC() :
|
||||
_voiceOK(false),
|
||||
_playing(false),
|
||||
_voiceOK(false),
|
||||
_sgr(NULL),
|
||||
freqClear(true),
|
||||
receiving(false),
|
||||
|
|
|
@ -86,7 +86,7 @@ string ConvertNumToSpokenDigits(const int& n) {
|
|||
// Anything else is not guaranteed to be handled correctly!
|
||||
string ConvertRwyNumToSpokenString(const string &rwy) {
|
||||
string rslt;
|
||||
for (int ii = 0; ii < rwy.length(); ii++){
|
||||
for (size_t ii = 0; ii < rwy.length(); ii++){
|
||||
if (rslt.length()) rslt += " ";
|
||||
string ch = rwy.substr(ii,1);
|
||||
if (isdigit(ch[0])) rslt += ConvertNumToSpokenDigits(atoi(ch.c_str()));
|
||||
|
|
|
@ -193,7 +193,7 @@ SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
|
|||
for ( i = 0; i < (int)id.length(); ++i ) {
|
||||
if ( idptr[i] >= 'A' && idptr[i] <= 'Z' ) {
|
||||
int c = (int)(idptr[i] - 'A');
|
||||
for ( j = 0; j < 4 || alphabet[c][j] == end; ++j ) {
|
||||
for ( j = 0; j < 4 && alphabet[c][j] != end; ++j ) {
|
||||
if ( alphabet[c][j] == DIT ) {
|
||||
length += DIT_SIZE;
|
||||
} else if ( alphabet[c][j] == DAH ) {
|
||||
|
@ -227,7 +227,7 @@ SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
|
|||
for ( i = 0; i < (int)id.length(); ++i ) {
|
||||
if ( idptr[i] >= 'A' && idptr[i] <= 'Z' ) {
|
||||
int c = (int)(idptr[i] - 'A');
|
||||
for ( j = 0; j < 4 || alphabet[c][j] == end; ++j ) {
|
||||
for ( j = 0; j < 4 && alphabet[c][j] != end; ++j ) {
|
||||
if ( alphabet[c][j] == DIT ) {
|
||||
memcpy( buf_ptr, dit_ptr, DIT_SIZE );
|
||||
buf_ptr += DIT_SIZE;
|
||||
|
|
Loading…
Add table
Reference in a new issue