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