maybe this fixes the issue?

This commit is contained in:
Robin Müller 2023-09-18 17:34:04 +02:00
parent a4b14250c2
commit 2a0db6b21c
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -190,7 +190,7 @@ impl TryFrom<u8> for SequenceFlags {
/// Abstraction for the CCSDS Packet ID, which forms the last thirteen bits
/// of the first two bytes in the CCSDS primary header.
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[derive(Debug, Eq, Copy, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct PacketId {
pub ptype: PacketType,
@ -198,6 +198,12 @@ pub struct PacketId {
apid: u16,
}
impl PartialEq for PacketId {
fn eq(&self, other: &Self) -> bool {
self.raw().eq(&other.raw())
}
}
impl PartialOrd for PacketId {
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
self.raw().partial_cmp(&other.raw())