Skip to content

Commit 2f53c0f

Browse files
Merge branch 'develop' into hotfix-clippy
2 parents e1e7820 + 8cc4257 commit 2f53c0f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ pub mod device;
3838

3939
type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
4040

41+
#[derive(Debug)]
4142
enum Protocols {
4243
V1(V1),
4344
V2(V2),
4445
}
4546

47+
#[derive(Debug)]
4648
/// Raw dynamixel communication messages controller (protocol v1 or v2)
4749
pub struct DynamixelSerialIO {
4850
protocol: Protocols,

src/protocol/v1.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use super::{CommunicationErrorKind, Packet};
88
const BROADCAST_ID: u8 = 254;
99
const BROADCAST_RESPONSE_ID: u8 = 253;
1010

11+
#[derive(Debug)]
1112
pub struct PacketV1;
1213
impl Packet for PacketV1 {
1314
const HEADER_SIZE: usize = 4;
@@ -94,6 +95,7 @@ impl Packet for PacketV1 {
9495
}
9596
}
9697

98+
#[derive(Debug)]
9799
struct InstructionPacketV1 {
98100
id: u8,
99101
instruction: InstructionKindV1,
@@ -126,6 +128,7 @@ impl InstructionPacket<PacketV1> for InstructionPacketV1 {
126128
}
127129
}
128130

131+
#[derive(Debug)]
129132
struct StatusPacketV1 {
130133
id: u8,
131134
#[allow(dead_code)]
@@ -234,6 +237,7 @@ impl InstructionKindV1 {
234237
}
235238
}
236239

240+
#[derive(Debug)]
237241
pub struct V1;
238242
impl Protocol<PacketV1> for V1 {
239243
fn new() -> Self {

src/protocol/v2.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::{
55

66
use super::{CommunicationErrorKind, Protocol};
77

8+
#[derive(Debug)]
89
pub struct V2;
910
impl Protocol<PacketV2> for V2 {
1011
fn new() -> Self
@@ -35,6 +36,7 @@ impl Protocol<PacketV2> for V2 {
3536
}
3637
}
3738

39+
#[derive(Debug)]
3840
pub struct PacketV2;
3941
impl Packet for PacketV2 {
4042
const HEADER_SIZE: usize = 7;
@@ -132,6 +134,7 @@ impl Packet for PacketV2 {
132134
}
133135
}
134136

137+
#[derive(Debug)]
135138
struct InstructionPacketV2 {
136139
id: u8,
137140
instruction: InstructionKindV2,
@@ -169,6 +172,7 @@ impl InstructionPacket<PacketV2> for InstructionPacketV2 {
169172
}
170173
}
171174

175+
#[derive(Debug)]
172176
struct StatusPacketV2 {
173177
id: u8,
174178
errors: Vec<DynamixelErrorV2>,

0 commit comments

Comments
 (0)