diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d6e482..412758f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). # [unreleased] +## Fixed + +- Remove `Default` derive on CDS time provider. This can lead to uninitialized preamble fields. + ## Changed - `serde` support is now optional and behind the `serde` feature. @@ -19,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). The function now returns the remaining slice as well. - All CDS specific functionality was moved into the `cds` submodule of the `time` module. `CdsShortTimeProvider` was renamed to `TimeProvider`. + PR: https://egit.irs.uni-stuttgart.de/rust/spacepackets/pulls/3 ## Added diff --git a/src/tc.rs b/src/tc.rs index 9db2e86..268e5eb 100644 --- a/src/tc.rs +++ b/src/tc.rs @@ -279,6 +279,10 @@ impl<'slice> PusTc<'slice> { ) } + pub fn sp_header(&self) -> &SpHeader { + &self.sp_header + } + pub fn len_packed(&self) -> usize { let mut length = PUS_TC_MIN_LEN_WITHOUT_APP_DATA; if let Some(app_data) = self.app_data {