Skip to content

Commit 7da13a2

Browse files
committed
fix stations with dots in their name
Fixes #103
1 parent 47b5ee8 commit 7da13a2

File tree

10 files changed

+48
-14
lines changed

10 files changed

+48
-14
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [3.1.2] - 2021-07-01
10+
11+
### Fixed
12+
13+
- Fixed ATIS stations for airfields that have a dot (`.`) in their name (e.g. Antonio B. Won Pat Intl on Marina) [#103](https://github.com/rkusa/DATIS/issues/103)
14+
915
## [3.1.1] - 2021-06-22
1016

1117
### Fixed

Cargo.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/datis-cmd/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "datis-cmd"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["Markus Ast <m@rkusa.st>"]
55
edition = "2018"
66

crates/datis-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "datis-core"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["Markus Ast <m@rkusa.st>"]
55
edition = "2018"
66

crates/datis-core/src/extract.rs

+29-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn extract_station_config_from_mission_description(
4848
}
4949

5050
pub fn extract_atis_station_config(config: &str) -> Option<StationConfig> {
51-
let re = RegexBuilder::new(r"ATIS ([a-zA-Z0-9- ]+) ([1-3]\d{2}(\.\d{1,3})?)(,(.+))?")
51+
let re = RegexBuilder::new(r"ATIS ([a-zA-Z0-9-\. ]+) ([1-3]\d{2}(\.\d{1,3})?)(,(.+))?")
5252
.case_insensitive(true)
5353
.build()
5454
.unwrap();
@@ -370,6 +370,34 @@ mod test {
370370
);
371371
}
372372

373+
#[test]
374+
fn test_airfield_names_with_dot() {
375+
let freqs = extract_station_config_from_mission_description(
376+
r#"
377+
ATIS Antonio B. Won Pat Intl 251.000
378+
"#,
379+
);
380+
381+
assert_eq!(
382+
freqs,
383+
vec![(
384+
"Antonio B. Won Pat Intl".to_string(),
385+
StationConfig {
386+
name: "Antonio B. Won Pat Intl".to_string(),
387+
atis: 251_000_000,
388+
traffic: None,
389+
tts: None,
390+
info_ltr_override: None,
391+
active_rwy_override: None,
392+
no_hpa: false,
393+
no_qfe: false,
394+
}
395+
),]
396+
.into_iter()
397+
.collect()
398+
);
399+
}
400+
373401
#[test]
374402
fn test_advanced_mission_descriptiopn_extraction() {
375403
let freqs = extract_station_config_from_mission_description(

crates/datis-module/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "datis"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["Markus Ast <m@rkusa.st>"]
55
edition = "2018"
66

crates/radio-station/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dcs-radio-station"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["Markus Ast <m@rkusa.st>"]
55
edition = "2018"
66

crates/srs/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "srs"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["rkusa"]
55
edition = "2018"
66

crates/win-tts/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "win-tts"
3-
version = "3.1.1"
3+
version = "3.1.2"
44
authors = ["Markus Ast <m@rkusa.st>"]
55
edition = "2018"
66

mod/Mods/services/DATIS/entry.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare_plugin("DATIS", {
55
"datis.dll",
66
},
77

8-
version = "3.1.1",
8+
version = "3.1.2",
99
state = "installed",
1010
developerName = "github.com/rkusa",
1111
info = _("DATIS enables a DCS server with an SRS server running on the same machine (TCP=127.0.0.1) to get weather from the mission for stations and frequencies set in the mission editor, and then to report same in a standardized format over SRS using either the Amazon or Google text to speech engines."),

0 commit comments

Comments
 (0)