From c0ce686478304f3ac02622f2f94d4ae71d17a87f Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Sat, 5 Dec 2020 14:52:18 +0100 Subject: [PATCH] some changes for P60Dock cookie --- bsp_linux/comIF/cookies/P60DockCookie.cpp | 4 ++-- bsp_linux/comIF/cookies/P60DockCookie.h | 5 ++--- mission/core/GenericFactory.cpp | 3 +-- tmtc | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/bsp_linux/comIF/cookies/P60DockCookie.cpp b/bsp_linux/comIF/cookies/P60DockCookie.cpp index 7ed238f2..ccc6e09b 100644 --- a/bsp_linux/comIF/cookies/P60DockCookie.cpp +++ b/bsp_linux/comIF/cookies/P60DockCookie.cpp @@ -1,8 +1,8 @@ #include "bsp_linux/comIF/cookies/P60DockCookie.h" -P60DockCookie::P60DockCookie(char* canInterface_, uint8_t cspAddress_) : - canInterface(canInterface_), cspAddress(cspAddress_) { +P60DockCookie::P60DockCookie(uint8_t cspAddress_) : + cspAddress(cspAddress_) { } diff --git a/bsp_linux/comIF/cookies/P60DockCookie.h b/bsp_linux/comIF/cookies/P60DockCookie.h index 30d78f7b..eef7b417 100644 --- a/bsp_linux/comIF/cookies/P60DockCookie.h +++ b/bsp_linux/comIF/cookies/P60DockCookie.h @@ -16,10 +16,9 @@ class P60DockCookie: public CookieIF { public: /** * Constructor for the CSP cookie - * @param canInterface_ The CAN interface to use. E.g. "can0" or "can1". * @param cspAddress_ The CSP address of the target device. */ - P60DockCookie(char* canInterface_, uint8_t cspAddress_); + P60DockCookie(uint8_t cspAddress_); virtual ~P60DockCookie(); uint8_t getCspAddress(); @@ -40,7 +39,7 @@ public: private: - char* canInterface; + char canInterface[5] = "can0"; uint8_t cspAddress; int bitrate = 1000; MessageType_t nextMessage = MESSAGE_NONE; diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index db3639d6..b350cbd4 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -85,9 +85,8 @@ void ObjectFactory::produceGenericObjects() { new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_200); - char canInterface[] = "can0"; /* Cookies */ - P60DockCookie* p60DockCookie = new P60DockCookie(canInterface, addresses::P60DOCK); + P60DockCookie* p60DockCookie = new P60DockCookie(addresses::P60DOCK); /* Communication interfaces */ new P60DockComIF(objects::P60_DOCK_COM_IF); diff --git a/tmtc b/tmtc index 3fc71f90..0c0e0595 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 3fc71f9094e8fb670942f0c29a9dea0b6e03d17f +Subproject commit 0c0e0595f177b8fe4100902058a10e8d5ad34663