Skip to content

Commit ced08d4

Browse files
committed
merge
2 parents 0eb0a9d + 04eb690 commit ced08d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1489
-257
lines changed

.clang-format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ BasedOnStyle: Chromium
33
IndentWidth: 4
44
ColumnLimit: 120
55
AccessModifierOffset: -2
6+
SortIncludes: true
7+
IncludeBlocks: Regroup
8+
IncludeCategories:
9+
# Zephyr headers come last
10+
- Regex: '^<zephyr/.*>'
11+
Priority: 3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ settings.ini
2424
**/*.egg-info/
2525

2626
bin/
27+
_codeql_detected_source_root

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,5 @@ fprime_setup_included_code()
3434

3535
# This includes project-wide objects
3636
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FprimeZephyrReference")
37-
if (FPRIME_USE_POSIX)
38-
set_target_properties(Drv_Ip PROPERTIES EXCLUDE_FROM_ALL TRUE)
39-
set_target_properties(Drv_TcpServer PROPERTIES EXCLUDE_FROM_ALL TRUE)
40-
set_target_properties(Drv_TcpClient PROPERTIES EXCLUDE_FROM_ALL TRUE)
41-
set_target_properties(Drv_Udp PROPERTIES EXCLUDE_FROM_ALL TRUE)
42-
endif()
4337
set_target_properties(Svc_FatalHandler PROPERTIES EXCLUDE_FROM_ALL TRUE)
4438
set_target_properties(fprime-zephyr_Drv_ZephyrSpiDriver PROPERTIES EXCLUDE_FROM_ALL TRUE)

FprimeZephyrReference/ComCcsdsUart/SubtopologyTopologyDefs.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <Fw/Types/MallocAllocator.hpp>
55
#include <Svc/BufferManager/BufferManager.hpp>
66
#include <Svc/FrameAccumulator/FrameDetector/CcsdsTcFrameDetector.hpp>
7+
78
#include "ComCcsdsConfig/ComCcsdsSubtopologyConfig.hpp"
89
#include "Svc/Subtopologies/ComCcsds/ComCcsdsConfig/FppConstantsAc.hpp"
910

FprimeZephyrReference/Components/AntennaDeployer/AntennaDeployer.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ void AntennaDeployer ::startNextAttempt() {
115115

116116
this->m_totalAttempts++;
117117
this->tlmWrite_DeployAttemptCount(this->m_totalAttempts);
118+
this->m_burnTicksThisAttempt = 0;
118119

119120
if (this->isConnected_burnStart_OutputPort(0)) {
120121
this->burnStart_out(0);
@@ -140,6 +141,7 @@ void AntennaDeployer ::handleQuietWaitTick() {
140141

141142
void AntennaDeployer ::handleBurningTick() {
142143
this->m_ticksInState++;
144+
this->m_burnTicksThisAttempt = this->m_ticksInState;
143145

144146
if (this->m_stopRequested) {
145147
this->finishDeployment(Components::DeployResult::DEPLOY_RESULT_ABORT);
@@ -154,6 +156,7 @@ void AntennaDeployer ::handleBurningTick() {
154156
const U32 burnDuration = this->paramGet_BURN_DURATION_SEC(valid);
155157
if (this->m_ticksInState >= burnDuration) {
156158
this->ensureBurnwireStopped();
159+
this->logBurnSignalCount();
157160

158161
if (this->m_successDetected) {
159162
this->finishDeployment(Components::DeployResult::DEPLOY_RESULT_SUCCESS);
@@ -205,6 +208,7 @@ void AntennaDeployer ::finishDeployment(Components::DeployResult result) {
205208
}
206209

207210
this->ensureBurnwireStopped();
211+
this->logBurnSignalCount();
208212

209213
if (result == Components::DeployResult::DEPLOY_RESULT_SUCCESS) {
210214
this->log_ACTIVITY_HI_DeploySuccess(this->m_currentAttempt);
@@ -222,6 +226,7 @@ void AntennaDeployer ::resetDeploymentState() {
222226
this->m_stopRequested = false;
223227
this->m_successDetected = false;
224228
this->m_lastDistanceValid = false;
229+
this->m_burnTicksThisAttempt = 0;
225230
}
226231

227232
bool AntennaDeployer ::isDistanceWithinValidRange(F32 distance) {
@@ -240,6 +245,7 @@ bool AntennaDeployer ::isDistanceDeployed(F32 distance) {
240245

241246
if (distance <= threshold) {
242247
this->m_successDetected = true;
248+
this->logBurnSignalCount();
243249
return true;
244250
}
245251

@@ -252,4 +258,11 @@ void AntennaDeployer ::ensureBurnwireStopped() {
252258
}
253259
}
254260

261+
void AntennaDeployer ::logBurnSignalCount() {
262+
if (this->m_burnTicksThisAttempt > 0U) {
263+
this->log_ACTIVITY_LO_AntennaBurnSignalCount(this->m_burnTicksThisAttempt);
264+
this->m_burnTicksThisAttempt = 0;
265+
}
266+
}
267+
255268
} // namespace Components

FprimeZephyrReference/Components/AntennaDeployer/AntennaDeployer.fpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module Components {
2828
######################################################################
2929
# Telemetry
3030
######################################################################
31-
@ Counts the number of deployment attempts across boots
31+
@ Counts the number of deployment attempts
3232
telemetry DeployAttemptCount: U32
3333

3434
@ Tracks the last observed distance reading
@@ -68,6 +68,12 @@ module Components {
6868
) severity activity high \
6969
format "Quiet time expired after {} seconds, starting deployment attempt"
7070

71+
@ Reports how many scheduler ticks the burn signal was held active for the latest attempt
72+
event AntennaBurnSignalCount(
73+
ticks: U32 @< Number of scheduler ticks spent in the burn state
74+
) severity activity low \
75+
format "Burn signal active for {} scheduler ticks"
76+
7177
######################################################################
7278
# Ports
7379
######################################################################

FprimeZephyrReference/Components/AntennaDeployer/AntennaDeployer.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class AntennaDeployer final : public AntennaDeployerComponentBase {
5252
bool isDistanceWithinValidRange(F32 distance);
5353
bool isDistanceDeployed(F32 distance);
5454
void ensureBurnwireStopped();
55+
void logBurnSignalCount();
5556

5657
DeploymentState m_state = DeploymentState::IDLE;
5758
U32 m_currentAttempt = 0;
@@ -61,6 +62,7 @@ class AntennaDeployer final : public AntennaDeployerComponentBase {
6162
bool m_successDetected = false;
6263
bool m_lastDistanceValid = false;
6364
F32 m_lastDistance = 0.0F;
65+
U32 m_burnTicksThisAttempt = 0;
6466
};
6567

6668
} // namespace Components

FprimeZephyrReference/Components/Burnwire/Burnwire.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define Components_Burnwire_HPP
88

99
#include <atomic>
10+
1011
#include "FprimeZephyrReference/Components/Burnwire/BurnwireComponentAc.hpp"
1112

1213
namespace Components {

FprimeZephyrReference/Components/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ImuManager/")
1111
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/NullPrmDb/")
1212
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PowerMonitor/")
1313
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Watchdog")
14+
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/StartupManager/")
15+
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LoadSwitch/")

FprimeZephyrReference/Components/ComDelay/ComDelay.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// ======================================================================
66

77
#include "FprimeZephyrReference/Components/ComDelay/ComDelay.hpp"
8+
89
#include "FprimeZephyrReference/Components/ComDelay/FppConstantsAc.hpp"
910

1011
namespace Components {

0 commit comments

Comments
 (0)