Skip to content

Commit

Permalink
release 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rkusa committed Nov 2, 2019
1 parent bd7c987 commit 04f2727
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.10.0] - 2019-11-02
### Changed
- Upgraded to the SRS 1.7.0.0 network changes. DATIS now acts as a 1.7.0.0 SRS client.

### Fixed
- In some cases stations stopped transmitting every ~0.5 secs should be fixed
- Restore consistent ~3sec pause between reports

## [0.9.2] - 2019-10-28
### Fixed
- In some cases stations stopped transmitting every ~0.5 secs should be fixed
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datis-cmd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datis-cmd"
version = "0.1.0"
version = "0.10.0"
authors = ["Markus Ast <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion datis-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datis-core"
version = "0.9.1"
version = "0.10.0"
authors = ["Markus Ast <[email protected]>"]
edition = "2018"

Expand Down
15 changes: 9 additions & 6 deletions datis-core/src/srs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ fn audio_broadcast<W: Weather + Clone>(
let mut interval_start;
let mut report_ix = 0;
let mut packet_nr: u64 = 1;

loop {
interval_start = Instant::now();

Expand Down Expand Up @@ -278,35 +279,37 @@ fn audio_broadcast<W: Weather + Clone>(

data.set_position(0);
let start = Instant::now();
let mut frame_id = 0;
let mut audio = PacketReader::new(data);

while let Some(pck) = audio.read_packet()? {
if pck.data.len() == 0 {
continue;
}
let frame = pack_frame(&sguid, id, station.atis_freq, &pck.data)?;
let frame = pack_frame(&sguid, packet_nr, station.atis_freq, &pck.data)?;
socket.send_to(&frame, srs_addr)?;
packet_nr = packet_nr.wrapping_add(1);

// wait for the current ~playtime before sending the next package
let playtime = Duration::from_millis(id * 20);
let playtime = Duration::from_millis(frame_id * 20);
let elapsed = start.elapsed();
if playtime > elapsed {
thread::sleep(playtime - elapsed);
}

id += 1;
frame_id += 1;

if ctx.should_stop() {
return Ok(false);
}
}

'recv: loop {
// read and discard pending datagrams
// read and discard pending datagrams
match socket.recv_from(&mut sink) {
Err(err) => match err.kind() {
io::ErrorKind::TimedOut => {
break 'recv;
break 'recv;
}
_ => {
return Err(err.into());
Expand All @@ -316,7 +319,7 @@ fn audio_broadcast<W: Weather + Clone>(
}
}

let playtime = Duration::from_millis(id * 20);
let playtime = Duration::from_millis(frame_id * 20);
let elapsed = Instant::now() - start;
if playtime > elapsed {
thread::sleep(playtime - elapsed);
Expand Down
2 changes: 1 addition & 1 deletion datis-module/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "datis"
version = "0.10.0-beta1"
version = "0.10.0"
authors = ["Markus Ast <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion mod/Mods/tech/DATIS/entry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare_plugin("DATIS", {
"datis.dll",
},

version = "0.9.2",
version = "0.10.0",
state = "installed",
developerName = "github.com/rkusa",

Expand Down

0 comments on commit 04f2727

Please sign in to comment.