From 5adf513cb0211d51e25278258fd2dd9b64d5459a Mon Sep 17 00:00:00 2001 From: skliper <47541139+skliper@users.noreply.github.com> Date: Mon, 29 Jun 2020 16:12:19 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2d50a1..53ed3cc 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ To send telemtry to the "ground" or UDP/IP port, edit the subscription table in - Fix for a clean build with OMIT_DEPRECATED - Minor updates (see ) -### _**OFFICIAL RELEASE: 2.3.0**_ +### _**OFFICIAL RELEASE: 2.3.0 - Aquila**_ - Minor updates (see ) From ee44ea4cb9448764865a0310f12c7590b1722ac6 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 23 Jul 2020 09:28:28 -0400 Subject: [PATCH 2/3] Fix #50, Mark end of valid MsgId subscriptions --- CMakeLists.txt | 3 +++ fsw/src/to_lab_app.c | 9 ++++++++- fsw/tables/to_lab_sub.c | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b83c57d..b73b656 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6.4) project(CFS_TO_LAB C) +# Include source directory for table use +include_directories(fsw/src) + include_directories(fsw/mission_inc) include_directories(fsw/platform_inc) include_directories(${ci_lab_MISSION_DIR}/fsw/platform_inc) diff --git a/fsw/src/to_lab_app.c b/fsw/src/to_lab_app.c index 1a5ec05..c391837 100644 --- a/fsw/src/to_lab_app.c +++ b/fsw/src/to_lab_app.c @@ -227,9 +227,16 @@ int TO_LAB_init(void) /* Subscriptions for TLM pipe*/ for (i = 0; (i < (sizeof(TO_LAB_Subs->Subs) / sizeof(TO_LAB_Subs->Subs[0]))); i++) { - if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) + if (CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream) == TO_UNUSED) + { + /* Only process until MsgId TO_UNUSED is found*/ + break; + } + else if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) + { status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags, TO_LAB_Subs->Subs[i].BufLimit); + } if (status != CFE_SUCCESS) CFE_EVS_SendEvent(TO_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR, diff --git a/fsw/tables/to_lab_sub.c b/fsw/tables/to_lab_sub.c index 868ebd9..4b9b75f 100644 --- a/fsw/tables/to_lab_sub.c +++ b/fsw/tables/to_lab_sub.c @@ -30,6 +30,7 @@ #include "cfe_tbl_filedef.h" /* Required to obtain the CFE_TBL_FILEDEF macro definition */ #include "to_lab_sub_table.h" +#include "to_lab_app.h" /* ** Add the proper include file for the message IDs below @@ -86,7 +87,10 @@ TO_LAB_Subs_t TO_LAB_Subs = #endif {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_APP_TLM_MID), {0, 0}, 4}, - {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_MEMSTATS_TLM_MID), {0, 0}, 4} + {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_MEMSTATS_TLM_MID), {0, 0}, 4}, + + /* TO_UNUSED entry to mark the end of valid MsgIds */ + {TO_UNUSED, {0, 0}, 0} } }; From 79981ffa5d49e1454e17ab06843b5acd327b38c8 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 29 Jul 2020 12:57:42 -0400 Subject: [PATCH 3/3] Fix #50, Use MsgId Equal API to compare --- fsw/src/to_lab_app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsw/src/to_lab_app.c b/fsw/src/to_lab_app.c index c391837..0d25cec 100644 --- a/fsw/src/to_lab_app.c +++ b/fsw/src/to_lab_app.c @@ -227,7 +227,7 @@ int TO_LAB_init(void) /* Subscriptions for TLM pipe*/ for (i = 0; (i < (sizeof(TO_LAB_Subs->Subs) / sizeof(TO_LAB_Subs->Subs[0]))); i++) { - if (CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream) == TO_UNUSED) + if (CFE_SB_MsgId_Equal(TO_LAB_Subs->Subs[i].Stream, TO_UNUSED)) { /* Only process until MsgId TO_UNUSED is found*/ break;