kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			Merge pull request #1810 from srcejon/fix_1805
Distinguish between China and Taiwan aircraft registrations in ADS-B Demodpull/1814/head^2
						commit
						428c4a3c78
					
				| 
						 | 
				
			
			@ -457,8 +457,20 @@ QString AircraftInformation::getFlag() const
 | 
			
		|||
            {
 | 
			
		||||
                // Try letters before '-'
 | 
			
		||||
                prefix = m_registration.left(idx);
 | 
			
		||||
                if (m_prefixMap->contains(prefix)) {
 | 
			
		||||
                    flag = m_prefixMap->value(prefix);
 | 
			
		||||
                // Both China and Taiwan use B prefix. China regs are <= 4 digits, with Taiwan 5
 | 
			
		||||
                if (prefix == "B")
 | 
			
		||||
                {
 | 
			
		||||
                    if (m_registration.size() >= 7) {
 | 
			
		||||
                        flag = "taiwan";
 | 
			
		||||
                    } else {
 | 
			
		||||
                        flag = "china";
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    if (m_prefixMap->contains(prefix)) {
 | 
			
		||||
                        flag = m_prefixMap->value(prefix);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue