Skip to content

Commit

Permalink
fix: remove std requirement for signing, fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pv42 committed Aug 11, 2024
1 parent f722a75 commit 64c74dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mavlink-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ sha2 = { version = "0.10", optional = true }
"embedded" = ["dep:embedded-io", "dep:embedded-io-async"]
"embedded-hal-02" = ["dep:nb", "dep:embedded-hal-02"]
"serde" = ["dep:serde", "dep:serde_arrays"]
"signing" = ["dep:sha2", "std"]
"signing" = ["dep:sha2"]
default = ["std", "tcp", "udp", "direct-serial", "serde"]
5 changes: 3 additions & 2 deletions mavlink/tests/tcp_loopback_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod test_tcp_connections {

use crate::test_shared;

/// Test whether we can send a message via TCP and receive it OK. This also test signing as a property of a MavConnection if the signing feature is enabled.
/// Test whether we can send a message via TCP and receive it OK. This also test signing as a property of a MavConnection if the signing feature is enabled.
#[test]
pub fn test_tcp_loopback() {
const RECEIVE_CHECK_COUNT: i32 = 5;
Expand All @@ -21,7 +21,8 @@ mod test_tcp_connections {

let server_thread = thread::spawn(move || {
//TODO consider using get_available_port to use a random port
let mut server = mavlink::connect("tcpin:0.0.0.0:14550").expect("Couldn't create server");
let mut server =
mavlink::connect("tcpin:0.0.0.0:14550").expect("Couldn't create server");

#[cfg(feature = "signing")]
server.setup_signing(Some(singing_cfg_server));
Expand Down
5 changes: 2 additions & 3 deletions mavlink/tests/test_shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ pub const COMMON_MSG_HEADER: mavlink::MavHeader = mavlink::MavHeader {

#[cfg(feature = "signing")]
pub const SECRET_KEY: [u8; 32] = [
0x00, 0x01, 0xf2, 0xe3, 0xd4, 0xc5, 0xb6, 0xa7, 0x98, 0x00, 0x70, 0x76, 0x34, 0x32, 0x00,
0x16, 0x22, 0x42, 0x00, 0xcc, 0xff, 0x7a, 0x00, 0x52, 0x75, 0x73, 0x74, 0x00, 0x4d, 0x41,
0x56, 0xb3,
0x00, 0x01, 0xf2, 0xe3, 0xd4, 0xc5, 0xb6, 0xa7, 0x98, 0x00, 0x70, 0x76, 0x34, 0x32, 0x00, 0x16,
0x22, 0x42, 0x00, 0xcc, 0xff, 0x7a, 0x00, 0x52, 0x75, 0x73, 0x74, 0x00, 0x4d, 0x41, 0x56, 0xb3,
];

#[cfg(feature = "common")]
Expand Down

0 comments on commit 64c74dd

Please sign in to comment.