From c666feb2879313b3ce0159d8762565aa9d98ecac Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 13 May 2024 11:48:05 +0200 Subject: [PATCH] small action tweak --- src/pus/action.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pus/action.rs b/src/pus/action.rs index c208562..b89cb17 100644 --- a/src/pus/action.rs +++ b/src/pus/action.rs @@ -32,7 +32,9 @@ use super::{ TargetedPusService, }; -pub const DATA_REPLY: u8 = 130; +pub enum Subservice { + DataReply = 130, +} pub struct ActionReplyHandler { fail_data_buf: [u8; 128], @@ -275,7 +277,8 @@ pub fn send_data_reply( tm_sender: &TmSender, ) -> Result<(), EcssTmtcError> { let sp_header = SpHeader::new_from_apid(apid_target.apid); - let sec_header = PusTmSecondaryHeader::new(8, DATA_REPLY, 0, 0, stamp_helper.stamp()); + let sec_header = + PusTmSecondaryHeader::new(8, Subservice::DataReply as u8, 0, 0, stamp_helper.stamp()); let mut data = Vec::new(); data.extend(apid_target.apid.to_be_bytes()); data.extend(apid_target.unique_id.to_be_bytes());