From efda55773db949135aa5b341a896eea690067058 Mon Sep 17 00:00:00 2001 From: rjbrown2 Date: Fri, 20 Sep 2024 18:20:11 +0000 Subject: [PATCH] [nasa/cryptolib#314] Remove Magic Numbers, Update Defines --- include/crypto_config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/crypto_config.h b/include/crypto_config.h index 26608804..3ab012d5 100644 --- a/include/crypto_config.h +++ b/include/crypto_config.h @@ -159,6 +159,7 @@ #define TC_SN_SIZE 2 #define TC_SN_WINDOW 10 /* +/- value */ #define TC_FRAME_DATA_SIZE 1019 /* bytes */ // 1024 - 5byte header +#define TC_CADU_BYTES 4 // CCSDS PUS Defines #define TLV_DATA_SIZE 494 /* bytes */ @@ -181,7 +182,7 @@ #define TM_CADU_HAS_ASM 1 // Skip 0x1acffc1d at beginning of each frame // TM CADU based on ASM, currently only holds non-turbo ASM #ifdef TM_CADU_HAS_ASM - #define TM_CADU_SIZE (TM_FRAME_DATA_SIZE + 6) + #define TM_CADU_SIZE (TM_FRAME_DATA_SIZE + TC_CADU_BYTES) #else #define TM_CADU_SIZE TM_FRAME_DATA_SIZE #endif