diff --git a/CHANGELOG.md b/CHANGELOG.md index a8944d7..7f7ded4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Cargo.lock b/Cargo.lock index 5a79a69..1b1b5ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,10 +256,10 @@ dependencies = [ [[package]] name = "datis" -version = "0.10.0-beta1" +version = "0.10.0" dependencies = [ "const-cstr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "datis-core 0.9.1", + "datis-core 0.10.0", "hlua51 0.4.1 (git+https://github.com/rkusa/hlua51.git)", "libc 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -270,11 +270,11 @@ dependencies = [ [[package]] name = "datis-cmd" -version = "0.1.0" +version = "0.10.0" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "datis-core 0.9.1", + "datis-core 0.10.0", "dotenv 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -282,7 +282,7 @@ dependencies = [ [[package]] name = "datis-core" -version = "0.9.1" +version = "0.10.0" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/datis-cmd/Cargo.toml b/datis-cmd/Cargo.toml index af234cd..801e099 100644 --- a/datis-cmd/Cargo.toml +++ b/datis-cmd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datis-cmd" -version = "0.1.0" +version = "0.10.0" authors = ["Markus Ast "] edition = "2018" diff --git a/datis-core/Cargo.toml b/datis-core/Cargo.toml index 319f5fb..5322715 100644 --- a/datis-core/Cargo.toml +++ b/datis-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datis-core" -version = "0.9.1" +version = "0.10.0" authors = ["Markus Ast "] edition = "2018" diff --git a/datis-core/src/srs.rs b/datis-core/src/srs.rs index 9f1dda8..a3b15b0 100644 --- a/datis-core/src/srs.rs +++ b/datis-core/src/srs.rs @@ -244,6 +244,7 @@ fn audio_broadcast( let mut interval_start; let mut report_ix = 0; let mut packet_nr: u64 = 1; + loop { interval_start = Instant::now(); @@ -278,23 +279,25 @@ fn audio_broadcast( 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); @@ -302,11 +305,11 @@ fn audio_broadcast( } '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()); @@ -316,7 +319,7 @@ fn audio_broadcast( } } - 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); diff --git a/datis-module/Cargo.toml b/datis-module/Cargo.toml index 8ba9cb2..b2e206e 100644 --- a/datis-module/Cargo.toml +++ b/datis-module/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "datis" -version = "0.10.0-beta1" +version = "0.10.0" authors = ["Markus Ast "] edition = "2018" diff --git a/mod/Mods/tech/DATIS/entry.lua b/mod/Mods/tech/DATIS/entry.lua index 72cca7f..dc2c8c1 100644 --- a/mod/Mods/tech/DATIS/entry.lua +++ b/mod/Mods/tech/DATIS/entry.lua @@ -5,7 +5,7 @@ declare_plugin("DATIS", { "datis.dll", }, - version = "0.9.2", + version = "0.10.0", state = "installed", developerName = "github.com/rkusa",