tested cross-compilation
This commit is contained in:
parent
15b32c9444
commit
933230126e
11
Cargo.toml
11
Cargo.toml
@ -12,18 +12,17 @@ categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-sup
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
num = "0.4"
|
||||
serde = { version = "1.0.142", features = ["derive"] }
|
||||
num = { version = "0.4", default-features = false }
|
||||
serde = { version = "1.0.142", default-features = false, features = ["derive"] }
|
||||
zerocopy = "0.6.1"
|
||||
crc = "3.0.0"
|
||||
delegate = "0.7.0"
|
||||
chrono = "0.4.20"
|
||||
chrono = { version = "0.4.20", default-features = false }
|
||||
|
||||
[dev-dependencies.postcard]
|
||||
version = "1.0.1"
|
||||
features = ["use-std"]
|
||||
|
||||
[features]
|
||||
default = ["alloc"]
|
||||
std = ["postcard/use-std"]
|
||||
alloc = ["serde/alloc"]
|
||||
std = ["chrono/std", "chrono/clock", "postcard/use-std"]
|
||||
alloc = ["serde/alloc", "chrono/alloc", "postcard/alloc"]
|
||||
|
@ -512,11 +512,15 @@ pub mod zc {
|
||||
mod tests {
|
||||
use crate::SpHeader;
|
||||
use crate::{
|
||||
packet_type_in_raw_packet_id, zc, CcsdsPacket, CcsdsPrimaryHeader, PacketId,
|
||||
packet_type_in_raw_packet_id, zc, CcsdsPacket, PacketId,
|
||||
PacketSequenceCtrl, PacketType, SequenceFlags,
|
||||
};
|
||||
use alloc::vec;
|
||||
use postcard::{from_bytes, to_stdvec};
|
||||
use postcard::from_bytes;
|
||||
#[cfg(feature = "std")]
|
||||
use postcard::to_stdvec;
|
||||
#[cfg(feature = "std")]
|
||||
use crate::CcsdsPrimaryHeader;
|
||||
|
||||
#[test]
|
||||
fn test_seq_flag_helpers() {
|
||||
@ -599,6 +603,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "std")]
|
||||
fn test_serde_sph() {
|
||||
let sp_header = SpHeader::tc(0x42, 12, 0).expect("Error creating SP header");
|
||||
assert_eq!(sp_header.ccsds_version(), 0b000);
|
||||
|
@ -2,6 +2,10 @@
|
||||
use crate::{PacketError, SizeMissmatch};
|
||||
use chrono::{DateTime, TimeZone, Utc};
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[cfg(not(feature = "std"))]
|
||||
use num::traits::float::FloatCore;
|
||||
|
||||
use crate::time::CcsdsTimeCodes::Cds;
|
||||
#[cfg(feature = "std")]
|
||||
use std::time::{SystemTime, SystemTimeError};
|
||||
|
Loading…
Reference in New Issue
Block a user