4 Commits

Author SHA1 Message Date
8fddaefab1 Merge pull request 'Another CDS timestamp bugfix' (#8) from another_logic_fix_cds_stamp into main
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
Reviewed-on: #8
2023-01-14 17:50:23 +01:00
6e593e4e27 update changelog
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
Rust/spacepackets/pipeline/pr-main This commit looks good
2023-01-14 17:47:52 +01:00
ef5a4e2924 cargo fmt
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
2023-01-14 17:46:58 +01:00
aa5c206c1c another small bugfix
Some checks are pending
Rust/spacepackets/pipeline/head Build queued...
2023-01-14 17:46:43 +01:00
3 changed files with 13 additions and 2 deletions

View File

@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased]
# [v0.4.2] 14.01.2023
## Fixed
- CDS timestamp: Fixed another small logic error for stamp creation from the current
time with picosecond precision.
PR: https://egit.irs.uni-stuttgart.de/rust/spacepackets/pulls/8
# [v0.4.1] 14.01.2023
## Fixed
@ -15,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- CDS timestamp: The conversion function from the current time were buggy
when specifying picoseconds precision, which could lead to overflow
multiplications and/or incorrect precision fields.
PR: https://egit.irs.uni-stuttgart.de/rust/spacepackets/pulls/7
# [v0.4.0] 10.01.2023

View File

@ -1,6 +1,6 @@
[package]
name = "spacepackets"
version = "0.4.1"
version = "0.4.2"
edition = "2021"
rust-version = "1.60"
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]

View File

@ -170,7 +170,9 @@ impl ConversionFromNow {
));
}
SubmillisPrecision::Picoseconds(_) => {
prec = Some(SubmillisPrecision::Picoseconds(now.subsec_nanos() * 1000));
prec = Some(SubmillisPrecision::Picoseconds(
(now.subsec_nanos() % 10_u32.pow(6)) * 1000,
));
}
_ => (),
}