mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
Ref T338, utility functions / parsing
- nthIndexOf - measurement unit can be parsed case insensitive - CSimpleCommandParser::remainingStringAfter from n-th space - improved frequency parsing
This commit is contained in:
@@ -322,12 +322,9 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
bool isNumber;
|
||||
const double frequencyMhz = receiver.toDouble(&isNumber);
|
||||
if (isNumber)
|
||||
CFrequency radioFrequency = CComSystem::parseComFrequency(receiver, CPqString::SeparatorsBestGuess);
|
||||
if (!radioFrequency.isNull())
|
||||
{
|
||||
CFrequency radioFrequency = CFrequency(frequencyMhz, CFrequencyUnit::MHz());
|
||||
CComSystem::roundToChannelSpacing(radioFrequency, CComSystem::ChannelSpacing8_33KHz);
|
||||
if (CComSystem::isValidCivilAviationFrequency(radioFrequency))
|
||||
{
|
||||
tm.setFrequency(radioFrequency);
|
||||
|
||||
Reference in New Issue
Block a user