From dee7373d64d497e97bfc717ddbeff79dc4c6a18b Mon Sep 17 00:00:00 2001 From: abbbbbby Date: Fri, 14 Feb 2020 08:38:01 -0500 Subject: [PATCH 1/3] first commit --- .../fprime/CubeRover/Top/Components.hpp | 8 ++ .../CubeRover/Top/CubeRoverTopologyAppAi.xml | 77 +++++++++++++++++++ .../fprime/CubeRover/Top/Topology.cpp | 16 ++++ .../mk/configs/compiler/defines_common.mk | 4 +- .../fprime/mk/configs/modules/modules.mk | 6 ++ 5 files changed, 109 insertions(+), 2 deletions(-) diff --git a/Apps/FlightSoftware/fprime/CubeRover/Top/Components.hpp b/Apps/FlightSoftware/fprime/CubeRover/Top/Components.hpp index aa956c9d9..702c5b530 100644 --- a/Apps/FlightSoftware/fprime/CubeRover/Top/Components.hpp +++ b/Apps/FlightSoftware/fprime/CubeRover/Top/Components.hpp @@ -17,9 +17,12 @@ #include #include #include +#include #include #include +#include + // Block driver sequencing F-Prime and other sync events extern Drv::BlockDriverImpl blockDriver; @@ -35,6 +38,9 @@ extern Svc::CubeRoverTimeImpl cubeRoverTime; // Telemetric channel component that takes care of channeling all data to a central place extern Svc::TlmChanImpl tlmChan; +// Health component that checks to see if all components are working by pinging them +extern Svc::HealthImpl health; + // Service that handle active logging extern Svc::ActiveLoggerImpl activeLogger; @@ -44,4 +50,6 @@ extern Drv::FreeRtosSerialDriverComponentImpl radioSerialInterface; // command dispatcher extern Svc::CommandDispatcherImpl cmdDispatcher; +extern CubeRover::LedComponentImpl led; + #endif /* F_PRIME_CUBEROVER_TOP_COMPONENTS_HPP_ */ diff --git a/Apps/FlightSoftware/fprime/CubeRover/Top/CubeRoverTopologyAppAi.xml b/Apps/FlightSoftware/fprime/CubeRover/Top/CubeRoverTopologyAppAi.xml index 13bc7da69..210ac4a96 100644 --- a/Apps/FlightSoftware/fprime/CubeRover/Top/CubeRoverTopologyAppAi.xml +++ b/Apps/FlightSoftware/fprime/CubeRover/Top/CubeRoverTopologyAppAi.xml @@ -9,7 +9,9 @@ Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml Svc/Time/TimeComponentAi.xml Svc/TlmChan/TlmChanComponentAi.xml + Svc/Health/HealthComponentAi.xml Svc/CmdDispatcher/CommandDispatcherComponentAi.xml + CubeRover/Led/LedComponentAi.xml @@ -26,9 +28,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Apps/FlightSoftware/fprime/CubeRover/Top/Topology.cpp b/Apps/FlightSoftware/fprime/CubeRover/Top/Topology.cpp index 5e8180330..8ca1af03c 100644 --- a/Apps/FlightSoftware/fprime/CubeRover/Top/Topology.cpp +++ b/Apps/FlightSoftware/fprime/CubeRover/Top/Topology.cpp @@ -70,6 +70,14 @@ Svc::TlmChanImpl tlmChan( #endif ); +// --------------------------------------------------------------------------- +//Health channel component used to check if other components are working +Svc::HealthImpl health( +#if FW_OBJECT_NAMES == 1 + "Health" +#endif + ); + // --------------------------------------------------------------------------- // command dispatcher component used to dispatch commands Svc::CommandDispatcherImpl cmdDispatcher( @@ -78,6 +86,12 @@ Svc::CommandDispatcherImpl cmdDispatcher( #endif ); +CubeRover::LedComponentImpl led( +#if FW_OBJECT_NAMES == 1 + "Led" +#endif +); + /** * @brief Run 1 cycle (debug) */ @@ -106,6 +120,8 @@ void constructApp(void){ // Initialize the telemetric channel component (active) tlmChan.init(TLM_CHAN_QUEUE_DEPTH, TLM_CHAN_ID); + led.init(); + // Construct the application and make all connections between components constructCubeRoverArchitecture(); diff --git a/Apps/FlightSoftware/fprime/mk/configs/compiler/defines_common.mk b/Apps/FlightSoftware/fprime/mk/configs/compiler/defines_common.mk index f00438a88..8fe164191 100644 --- a/Apps/FlightSoftware/fprime/mk/configs/compiler/defines_common.mk +++ b/Apps/FlightSoftware/fprime/mk/configs/compiler/defines_common.mk @@ -1,3 +1,3 @@ COMMON_DEFINES := -DISF -DBUILD_$(BUILD) -CUBEROVER_PACKAGE_TOP_LEVEL=/home/cedric/CubeRoverPackage -FPRIME_ROOT_LOC=/home/cedric/CubeRoverPackage/Apps/FlightSoftware/fprime +CUBEROVER_PACKAGE_TOP_LEVEL=/home/abby/Documents/CubeRoverPackage +FPRIME_ROOT_LOC=/home/abby/Documents/CubeRoverPackage/Apps/FlightSoftware/fprime diff --git a/Apps/FlightSoftware/fprime/mk/configs/modules/modules.mk b/Apps/FlightSoftware/fprime/mk/configs/modules/modules.mk index 67199fc10..c14cb04fb 100644 --- a/Apps/FlightSoftware/fprime/mk/configs/modules/modules.mk +++ b/Apps/FlightSoftware/fprime/mk/configs/modules/modules.mk @@ -90,6 +90,11 @@ CUBEROVER_DRV_MODULES := \ Drv/FreeRtosSerialDriver \ Drv/SerialDriverPorts +CUBEROVER_MODULES := \ + CubeRover/Top \ + CubeRover/CubeRoverPorts \ + CubeRover/Led + REF_MODULES := \ Ref/Top \ Ref/RecvBuffApp \ @@ -204,6 +209,7 @@ acdev_MODULES := \ CubeRover_MODULES := \ CubeRover/Top \ CubeRover/CubeRoverPorts \ + $(CUBEROVER_MODULES) \ $(FW_MODULES) \ $(OS_MODULES) \ $(SVC_MODULES) \ From 37f4e48565611b1009eb77381274c0dfddd33e12 Mon Sep 17 00:00:00 2001 From: abbbbbby Date: Fri, 14 Feb 2020 09:17:28 -0500 Subject: [PATCH 2/3] Fixed errors so health will compile --- .../FlightMCU/.cproject | 2 + Apps/FlightSoftware/fprime/CubeRover/.project | 11 + .../fprime/CubeRover/Led/LedComponentAi.xml | 14 + .../fprime/CubeRover/Led/LedComponentImpl.cpp | 65 ++++ .../fprime/CubeRover/Led/LedComponentImpl.hpp | 68 ++++ .../fprime/CubeRover/Led/Makefile | 15 + .../fprime/CubeRover/Led/docs/Led.md | 5 + .../fprime/CubeRover/Led/mod.mk | 3 + .../fprime/CubeRover/Top/Components.hpp | 2 +- .../fprime/CubeRover/Top/Topology.cpp | 2 +- .../Top/channels/blockDriver_channels.html | 43 +++ .../Top/channels/cmdDispatcher_channels.html | 49 +++ .../Top/channels/health_channels.html | 43 +++ .../channels/rateGroupHiFreq_channels.html | 49 +++ .../channels/rateGroupLowFreq_channels.html | 49 +++ .../channels/rateGroupMedFreq_channels.html | 49 +++ .../Top/commands/cmdDispatcher_commands.html | 97 ++++++ .../Top/commands/health_commands.html | 96 ++++++ .../Top/events/cmdDispatcher_events.html | 192 +++++++++++ .../CubeRover/Top/events/health_events.html | 172 ++++++++++ .../Top/events/rateGroupHiFreq_events.html | 68 ++++ .../Top/events/rateGroupLowFreq_events.html | 68 ++++ .../Top/events/rateGroupMedFreq_events.html | 68 ++++ .../fprime/Svc/Health/HealthComponentImpl.cpp | 310 ++++++------------ .../fprime/Svc/Health/HealthComponentImpl.hpp | 232 +++++-------- Apps/FlightSoftware/fprime/Svc/Makefile | 2 +- 26 files changed, 1417 insertions(+), 357 deletions(-) create mode 100644 Apps/FlightSoftware/fprime/CubeRover/.project create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/LedComponentAi.xml create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/LedComponentImpl.cpp create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/LedComponentImpl.hpp create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/Makefile create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/docs/Led.md create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Led/mod.mk create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/blockDriver_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/cmdDispatcher_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/health_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/rateGroupHiFreq_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/rateGroupLowFreq_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/channels/rateGroupMedFreq_channels.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/commands/cmdDispatcher_commands.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/commands/health_commands.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/events/cmdDispatcher_events.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/events/health_events.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/events/rateGroupHiFreq_events.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/events/rateGroupLowFreq_events.html create mode 100644 Apps/FlightSoftware/fprime/CubeRover/Top/events/rateGroupMedFreq_events.html diff --git a/Apps/FlightSoftware/PrimaryFlightController/FlightMCU/.cproject b/Apps/FlightSoftware/PrimaryFlightController/FlightMCU/.cproject index 19f5ab1e4..c19dffbdc 100644 --- a/Apps/FlightSoftware/PrimaryFlightController/FlightMCU/.cproject +++ b/Apps/FlightSoftware/PrimaryFlightController/FlightMCU/.cproject @@ -115,6 +115,8 @@ + + -