From 6c8dd2fec96b976919c4d3c2c9f726d7b4d781e8 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 11:58:01 -0500 Subject: [PATCH 1/6] Update fprime to v4.2.2 --- lib/fprime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fprime b/lib/fprime index f67b68fd..8a62e455 160000 --- a/lib/fprime +++ b/lib/fprime @@ -1 +1 @@ -Subproject commit f67b68fdb611dd900922939b8a0404ab1008f957 +Subproject commit 8a62e455a90b6d4f498c332d45d65a2a819988d8 From bf11751081b3102bf184db2346923861e656842e Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 18:55:39 -0500 Subject: [PATCH 2/6] Building and running, packets rejecting --- Makefile | 11 - .../ReferenceDeployment/Top/CMakeLists.txt | 1 + .../Top/ReferenceDeploymentPackets.fppi | 249 +++++++++--------- .../project/config/CMakeLists.txt | 1 + .../project/config/ComCfg.fpp | 9 +- .../project/config/FpConstants.fpp | 8 +- .../project/config/TlmPacketizerCfg.fpp | 45 ++++ .../project/config/TlmPacketizerCfg.hpp | 21 +- patches/fprime-gds-version.patch | 16 -- 9 files changed, 186 insertions(+), 175 deletions(-) create mode 100644 PROVESFlightControllerReference/project/config/TlmPacketizerCfg.fpp delete mode 100644 patches/fprime-gds-version.patch diff --git a/Makefile b/Makefile index 71b2be3f..00572b7a 100644 --- a/Makefile +++ b/Makefile @@ -10,17 +10,6 @@ help: ## Display this help. .PHONY: submodules submodules: ## Initialize and update git submodules @git submodule update --init --recursive - @echo "Applying fprime-gds version patch..." - @cd lib/fprime && \ - if git apply --check ../../patches/fprime-gds-version.patch 2>/dev/null; then \ - git apply ../../patches/fprime-gds-version.patch && \ - echo "✓ Applied fprime-gds version patch"; \ - elif git apply --reverse --check ../../patches/fprime-gds-version.patch 2>/dev/null; then \ - echo "⚠ Patch already applied"; \ - else \ - echo "❌ Error: Unable to apply patch. Run 'cd lib/fprime && git status' to check."; \ - exit 1; \ - fi export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv .PHONY: fprime-venv diff --git a/PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt b/PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt index d84487ac..e0af332f 100644 --- a/PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt +++ b/PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt @@ -19,4 +19,5 @@ register_fprime_module( "${CMAKE_CURRENT_LIST_DIR}/ReferenceDeploymentTopology.cpp" DEPENDS Fw_Logger + Svc_TlmPacketizer_config_TlmPacketizerConfig ) diff --git a/PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi b/PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi index f107909f..f44fd913 100644 --- a/PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi +++ b/PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi @@ -11,18 +11,18 @@ telemetry packets ReferenceDeploymentPackets { packet Beacon id 1 group 1 { # Satellite Meta Data - ReferenceDeployment.startupManager.BootCount - ReferenceDeployment.modeManager.CurrentMode + startupManager.BootCount + modeManager.CurrentMode # Essential Sensor Data - ReferenceDeployment.detumbleManager.AngularVelocityMagnitude + detumbleManager.AngularVelocityMagnitude # Power Data - ReferenceDeployment.ina219SysManager.Voltage - ReferenceDeployment.ina219SysManager.Power - ReferenceDeployment.ina219SolManager.Power - ReferenceDeployment.powerMonitor.TotalPowerConsumption - ReferenceDeployment.powerMonitor.TotalPowerGenerated + ina219SysManager.Voltage + ina219SysManager.Power + ina219SolManager.Power + powerMonitor.TotalPowerConsumption + powerMonitor.TotalPowerGenerated # Communications Data # ComCcsdsSband.authenticatesband.CurrentSequenceNumber @@ -36,13 +36,13 @@ telemetry packets ReferenceDeploymentPackets { ### Live Satellite Sensor Data Packets ### packet Imu id 7 group 2 { - ReferenceDeployment.imuManager.AxisOrientation - ReferenceDeployment.imuManager.Acceleration - ReferenceDeployment.imuManager.AngularVelocity - ReferenceDeployment.imuManager.MagneticField - ReferenceDeployment.imuManager.AccelerometerSamplingFrequency - ReferenceDeployment.imuManager.GyroscopeSamplingFrequency - ReferenceDeployment.imuManager.MagnetometerSamplingFrequency + imuManager.AxisOrientation + imuManager.Acceleration + imuManager.AngularVelocity + imuManager.MagneticField + imuManager.AccelerometerSamplingFrequency + imuManager.GyroscopeSamplingFrequency + imuManager.MagnetometerSamplingFrequency } packet Radio id 8 group 2 { @@ -54,65 +54,65 @@ telemetry packets ReferenceDeploymentPackets { } packet PowerMonitor id 11 group 2 { - ReferenceDeployment.ina219SysManager.Current - ReferenceDeployment.ina219SysManager.Power - ReferenceDeployment.ina219SolManager.Voltage - ReferenceDeployment.ina219SolManager.Current - ReferenceDeployment.ina219SolManager.Power + ina219SysManager.Current + ina219SysManager.Power + ina219SolManager.Voltage + ina219SolManager.Current + ina219SolManager.Power } packet LightSensor id 13 group 2 { - ReferenceDeployment.veml6031Face0Manager.VisibleLight - ReferenceDeployment.veml6031Face1Manager.VisibleLight - ReferenceDeployment.veml6031Face2Manager.VisibleLight - ReferenceDeployment.veml6031Face3Manager.VisibleLight - ReferenceDeployment.veml6031Face5Manager.VisibleLight - ReferenceDeployment.veml6031Face6Manager.VisibleLight - ReferenceDeployment.veml6031Face7Manager.VisibleLight + veml6031Face0Manager.VisibleLight + veml6031Face1Manager.VisibleLight + veml6031Face2Manager.VisibleLight + veml6031Face3Manager.VisibleLight + veml6031Face5Manager.VisibleLight + veml6031Face6Manager.VisibleLight + veml6031Face7Manager.VisibleLight } ### Satellite Meta Data Packets ### packet LoadSwitches id 10 group 3 { - ReferenceDeployment.face4LoadSwitch.IsOn - ReferenceDeployment.face0LoadSwitch.IsOn - ReferenceDeployment.face1LoadSwitch.IsOn - ReferenceDeployment.face2LoadSwitch.IsOn - ReferenceDeployment.face3LoadSwitch.IsOn - ReferenceDeployment.face5LoadSwitch.IsOn - ReferenceDeployment.payloadPowerLoadSwitch.IsOn - ReferenceDeployment.payloadBatteryLoadSwitch.IsOn - ReferenceDeployment.antennaDeployer.DeployAttemptCount + face4LoadSwitch.IsOn + face0LoadSwitch.IsOn + face1LoadSwitch.IsOn + face2LoadSwitch.IsOn + face3LoadSwitch.IsOn + face5LoadSwitch.IsOn + payloadPowerLoadSwitch.IsOn + payloadBatteryLoadSwitch.IsOn + antennaDeployer.DeployAttemptCount } packet Thermal id 12 group 3 { - ReferenceDeployment.tmp112Face0Manager.Temperature - ReferenceDeployment.tmp112Face1Manager.Temperature - ReferenceDeployment.tmp112Face2Manager.Temperature - ReferenceDeployment.tmp112Face3Manager.Temperature - ReferenceDeployment.tmp112Face5Manager.Temperature - ReferenceDeployment.tmp112BattCell1Manager.Temperature - ReferenceDeployment.tmp112BattCell2Manager.Temperature - ReferenceDeployment.tmp112BattCell3Manager.Temperature - ReferenceDeployment.tmp112BattCell4Manager.Temperature - ReferenceDeployment.picoTempManager.PicoTemperature + tmp112Face0Manager.Temperature + tmp112Face1Manager.Temperature + tmp112Face2Manager.Temperature + tmp112Face3Manager.Temperature + tmp112Face5Manager.Temperature + tmp112BattCell1Manager.Temperature + tmp112BattCell2Manager.Temperature + tmp112BattCell3Manager.Temperature + tmp112BattCell4Manager.Temperature + picoTempManager.PicoTemperature } packet Detumble id 15 group 3 { - ReferenceDeployment.detumbleManager.Mode - ReferenceDeployment.detumbleManager.State - ReferenceDeployment.detumbleManager.DetumbleStrategy + detumbleManager.Mode + detumbleManager.State + detumbleManager.DetumbleStrategy } ### Payload Meta Data Packets ### packet CameraDebug id 14 group 4 { - ReferenceDeployment.cameraHandler.BytesReceived - ReferenceDeployment.cameraHandler.ExpectedSize - ReferenceDeployment.cameraHandler.IsReceiving - ReferenceDeployment.cameraHandler.FileOpen - ReferenceDeployment.cameraHandler.FileErrorCount - ReferenceDeployment.cameraHandler.ImagesSaved + cameraHandler.BytesReceived + cameraHandler.ExpectedSize + cameraHandler.IsReceiving + cameraHandler.FileOpen + cameraHandler.FileErrorCount + cameraHandler.ImagesSaved } ### Health and Status Packets ### @@ -123,13 +123,13 @@ telemetry packets ReferenceDeploymentPackets { # ComCcsdsSband.commsBufferManager.HiBuffs CdhCore.cmdDisp.CommandsDispatched CdhCore.cmdDisp.CommandsDropped - ReferenceDeployment.rateGroup50Hz.RgMaxTime - ReferenceDeployment.rateGroup10Hz.RgMaxTime - ReferenceDeployment.rateGroup1Hz.RgMaxTime - ReferenceDeployment.startupManager.QuiescenceEndTime - ReferenceDeployment.modeManager.CurrentMode - ReferenceDeployment.modeManager.SafeModeEntryCount - ReferenceDeployment.modeManager.CurrentSafeModeReason + rateGroup50Hz.RgMaxTime + rateGroup10Hz.RgMaxTime + rateGroup1Hz.RgMaxTime + startupManager.QuiescenceEndTime + modeManager.CurrentMode + modeManager.SafeModeEntryCount + modeManager.CurrentSafeModeReason } packet HealthWarnings id 3 group 5 { @@ -138,9 +138,9 @@ telemetry packets ReferenceDeploymentPackets { #ComCcsdsSband.commsBufferManager.NoBuffs ComCcsdsUart.commsBufferManager.NoBuffs payloadBufferManager.NoBuffs - ReferenceDeployment.rateGroup50Hz.RgCycleSlips - ReferenceDeployment.rateGroup10Hz.RgCycleSlips - ReferenceDeployment.rateGroup1Hz.RgCycleSlips + rateGroup50Hz.RgCycleSlips + rateGroup10Hz.RgCycleSlips + rateGroup1Hz.RgCycleSlips } @@ -148,7 +148,7 @@ telemetry packets ReferenceDeploymentPackets { ComCcsdsLora.comQueue.buffQueueDepth # ComCcsdsSband.comQueue.buffQueueDepth payloadBufferManager.HiBuffs - CdhCore.tlmSend.SendLevel + CdhCore.tlmSend.SectionEnabled } packet FileSystem id 5 group 5 { @@ -177,75 +177,75 @@ telemetry packets ReferenceDeploymentPackets { ComCcsdsLora.authenticationRouter.FailedRouter ComCcsdsUart.authenticationRouter.FailedRouter - ReferenceDeployment.amateurRadio.count_names + amateurRadio.count_names } packet DetumblePerformance id 16 group 5 { - ReferenceDeployment.detumbleManager.TorqueDuration - ReferenceDeployment.detumbleManager.TimeBetweenMagneticFieldReadings + detumbleManager.TorqueDuration + detumbleManager.TimeBetweenMagneticFieldReadings } packet DetumbleParams id 17 group 6 { - ReferenceDeployment.detumbleManager.GainParam - ReferenceDeployment.detumbleManager.BdotMaxThresholdParam - ReferenceDeployment.detumbleManager.DeadbandUpperThresholdParam - ReferenceDeployment.detumbleManager.DeadbandLowerThresholdParam - ReferenceDeployment.detumbleManager.CooldownDurationParam - ReferenceDeployment.detumbleManager.TorqueDurationParam - ReferenceDeployment.detumbleManager.HysteresisAxisParam + detumbleManager.GainParam + detumbleManager.BdotMaxThresholdParam + detumbleManager.DeadbandUpperThresholdParam + detumbleManager.DeadbandLowerThresholdParam + detumbleManager.CooldownDurationParam + detumbleManager.TorqueDurationParam + detumbleManager.HysteresisAxisParam } packet DetumbleXPlusCoilParams id 18 group 6 { # X+ coil parameters - ReferenceDeployment.detumbleManager.XPlusVoltageParam - ReferenceDeployment.detumbleManager.XPlusResistanceParam - ReferenceDeployment.detumbleManager.XPlusTurnsParam - ReferenceDeployment.detumbleManager.XPlusLengthParam - ReferenceDeployment.detumbleManager.XPlusWidthParam - ReferenceDeployment.detumbleManager.XPlusShapeParam + detumbleManager.XPlusVoltageParam + detumbleManager.XPlusResistanceParam + detumbleManager.XPlusTurnsParam + detumbleManager.XPlusLengthParam + detumbleManager.XPlusWidthParam + detumbleManager.XPlusShapeParam } packet DetumbleXMinusCoilParams id 19 group 6 { # X- coil parameters - ReferenceDeployment.detumbleManager.XMinusVoltageParam - ReferenceDeployment.detumbleManager.XMinusResistanceParam - ReferenceDeployment.detumbleManager.XMinusTurnsParam - ReferenceDeployment.detumbleManager.XMinusLengthParam - ReferenceDeployment.detumbleManager.XMinusWidthParam - ReferenceDeployment.detumbleManager.XMinusShapeParam - ReferenceDeployment.detumbleManager.XTurnsParam + detumbleManager.XMinusVoltageParam + detumbleManager.XMinusResistanceParam + detumbleManager.XMinusTurnsParam + detumbleManager.XMinusLengthParam + detumbleManager.XMinusWidthParam + detumbleManager.XMinusShapeParam + detumbleManager.XTurnsParam } packet DetumbleYPlusCoilParams id 20 group 6 { # Y+ coil parameters - ReferenceDeployment.detumbleManager.YPlusVoltageParam - ReferenceDeployment.detumbleManager.YPlusResistanceParam - ReferenceDeployment.detumbleManager.YPlusTurnsParam - ReferenceDeployment.detumbleManager.YPlusLengthParam - ReferenceDeployment.detumbleManager.YPlusWidthParam - ReferenceDeployment.detumbleManager.YPlusShapeParam + detumbleManager.YPlusVoltageParam + detumbleManager.YPlusResistanceParam + detumbleManager.YPlusTurnsParam + detumbleManager.YPlusLengthParam + detumbleManager.YPlusWidthParam + detumbleManager.YPlusShapeParam } packet DetumbleYMinusCoilParams id 21 group 6 { # Y- coil parameters - ReferenceDeployment.detumbleManager.YMinusVoltageParam - ReferenceDeployment.detumbleManager.YMinusResistanceParam - ReferenceDeployment.detumbleManager.YMinusTurnsParam - ReferenceDeployment.detumbleManager.YMinusLengthParam - ReferenceDeployment.detumbleManager.YMinusWidthParam - ReferenceDeployment.detumbleManager.YMinusShapeParam - ReferenceDeployment.detumbleManager.YTurnsParam + detumbleManager.YMinusVoltageParam + detumbleManager.YMinusResistanceParam + detumbleManager.YMinusTurnsParam + detumbleManager.YMinusLengthParam + detumbleManager.YMinusWidthParam + detumbleManager.YMinusShapeParam + detumbleManager.YTurnsParam } packet DetumbleZMinusCoilParams id 22 group 6 { # Z- coil parameters - ReferenceDeployment.detumbleManager.ZMinusVoltageParam - ReferenceDeployment.detumbleManager.ZMinusResistanceParam - ReferenceDeployment.detumbleManager.ZMinusTurnsParam - ReferenceDeployment.detumbleManager.ZMinusDiameterParam - ReferenceDeployment.detumbleManager.ZMinusShapeParam - ReferenceDeployment.detumbleManager.ZTurnsParam + detumbleManager.ZMinusVoltageParam + detumbleManager.ZMinusResistanceParam + detumbleManager.ZMinusTurnsParam + detumbleManager.ZMinusDiameterParam + detumbleManager.ZMinusShapeParam + detumbleManager.ZTurnsParam } } omit { @@ -270,21 +270,21 @@ telemetry packets ReferenceDeploymentPackets { CdhCore.version.CustomVersion08 CdhCore.version.CustomVersion09 CdhCore.version.CustomVersion10 - ReferenceDeployment.cmdSeq.CS_LoadCommands - ReferenceDeployment.cmdSeq.CS_CancelCommands - ReferenceDeployment.cmdSeq.CS_CommandsExecuted - ReferenceDeployment.cmdSeq.CS_SequencesCompleted - ReferenceDeployment.cmdSeq.CS_Errors - ReferenceDeployment.payloadSeq.CS_LoadCommands - ReferenceDeployment.payloadSeq.CS_CancelCommands - ReferenceDeployment.payloadSeq.CS_CommandsExecuted - ReferenceDeployment.payloadSeq.CS_SequencesCompleted - ReferenceDeployment.payloadSeq.CS_Errors - ReferenceDeployment.safeModeSeq.CS_LoadCommands - ReferenceDeployment.safeModeSeq.CS_CancelCommands - ReferenceDeployment.safeModeSeq.CS_CommandsExecuted - ReferenceDeployment.safeModeSeq.CS_SequencesCompleted - ReferenceDeployment.safeModeSeq.CS_Errors + cmdSeq.CS_LoadCommands + cmdSeq.CS_CancelCommands + cmdSeq.CS_CommandsExecuted + cmdSeq.CS_SequencesCompleted + cmdSeq.CS_Errors + payloadSeq.CS_LoadCommands + payloadSeq.CS_CancelCommands + payloadSeq.CS_CommandsExecuted + payloadSeq.CS_SequencesCompleted + payloadSeq.CS_Errors + safeModeSeq.CS_LoadCommands + safeModeSeq.CS_CancelCommands + safeModeSeq.CS_CommandsExecuted + safeModeSeq.CS_SequencesCompleted + safeModeSeq.CS_Errors FileHandling.fileUplink.FilesReceived FileHandling.fileUplink.PacketsReceived FileHandling.fileDownlink.FilesSent @@ -314,10 +314,11 @@ telemetry packets ReferenceDeploymentPackets { payloadBufferManager.TotalBuffs payloadBufferManager.CurrBuffs + CdhCore.tlmSend.GroupConfigs CdhCore.version.FrameworkVersion CdhCore.version.ProjectVersion CdhCore.version.LibraryVersion01 - ReferenceDeployment.watchdog.WatchdogTransitions + watchdog.WatchdogTransitions } diff --git a/PROVESFlightControllerReference/project/config/CMakeLists.txt b/PROVESFlightControllerReference/project/config/CMakeLists.txt index 13b518c2..e3470b65 100644 --- a/PROVESFlightControllerReference/project/config/CMakeLists.txt +++ b/PROVESFlightControllerReference/project/config/CMakeLists.txt @@ -17,6 +17,7 @@ register_fprime_config( "${CMAKE_CURRENT_LIST_DIR}/FpConstants.fpp" "${CMAKE_CURRENT_LIST_DIR}/LoRaCfg.hpp" "${CMAKE_CURRENT_LIST_DIR}/PlatformCfg.fpp" + "${CMAKE_CURRENT_LIST_DIR}/TlmPacketizerCfg.fpp" "${CMAKE_CURRENT_LIST_DIR}/TlmPacketizerCfg.hpp" "${CMAKE_CURRENT_LIST_DIR}/UpdateConfig.fpp" "${CMAKE_CURRENT_LIST_DIR}/UpdateStatus.fpp" diff --git a/PROVESFlightControllerReference/project/config/ComCfg.fpp b/PROVESFlightControllerReference/project/config/ComCfg.fpp index 727f8219..09eab988 100644 --- a/PROVESFlightControllerReference/project/config/ComCfg.fpp +++ b/PROVESFlightControllerReference/project/config/ComCfg.fpp @@ -12,7 +12,10 @@ module ComCfg { dictionary constant SpacecraftId = 0x0044 @ Fixed size of CCSDS TM frames - dictionary constant TmFrameFixedSize = 248 # Needs to be at least COM_BUFFER_MAX_SIZE + (2 * SpacePacketHeaderSize) + 1 + dictionary constant TmFrameFixedSize = 255 # Needs TmPayloadCapacity (= size-8) >= COM_BUFFER_MAX_SIZE + (2 * SpacePacketHeaderSize[6]) + 1; min = 254 + + @ Upper Bound on Fixed size of CCSDS AOS frames (not used in this project, matches default) + constant AosMaxFrameFixedSize = 1536 @ Aggregation buffer for ComAggregator component constant AggregationSize = TmFrameFixedSize - 6 - 6 - 1 - 2 # 2 header (6) + 1 idle byte + 2 trailer bytes @@ -40,12 +43,14 @@ module ComCfg { apid: Apid @< 11 bits APID in CCSDS sequenceCount: U16 @< 14 bit Sequence count - sequence count is incremented per APID vcId: U8 @< 6 bit Virtual Channel ID - used for TC and TM - authenticated: bool @< Whether the packet has been authenticated + sendNow: bool @< Flag to AOS Framer that the Frame this packet goes into should be sent ASAP + authenticated: bool @< Whether the packet has been authenticated } default { comQueueIndex = 0 apid = Apid.FW_PACKET_UNKNOWN sequenceCount = 0 vcId = 1 + sendNow = false } } diff --git a/PROVESFlightControllerReference/project/config/FpConstants.fpp b/PROVESFlightControllerReference/project/config/FpConstants.fpp index 5b112b61..635d8ab3 100644 --- a/PROVESFlightControllerReference/project/config/FpConstants.fpp +++ b/PROVESFlightControllerReference/project/config/FpConstants.fpp @@ -23,20 +23,20 @@ constant FW_COM_BUFFER_MAX_SIZE = 233 constant FW_SM_SIGNAL_BUFFER_MAX_SIZE = 128 @ Specifies the size of the buffer that contains the serialized command arguments -constant FW_CMD_ARG_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - SIZE_OF_FwOpcodeType - SIZE_OF_FwPacketDescriptorType +constant FW_CMD_ARG_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - sizeof(FwOpcodeType) - sizeof(FwPacketDescriptorType) @ Specifies the maximum size of a string in a command argument constant FW_CMD_STRING_MAX_SIZE = 40 @ Specifies the size of the buffer that contains the serialized log arguments -constant FW_LOG_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - SIZE_OF_FwEventIdType - SIZE_OF_FwPacketDescriptorType +constant FW_LOG_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - sizeof(FwEventIdType) - sizeof(FwPacketDescriptorType) @ Specifies the maximum size of a string in a log event @ Note: This constant truncates file names in assertion failure event reports constant FW_LOG_STRING_MAX_SIZE = 200 @ Specifies the size of the buffer that contains the serialized telemetry value -constant FW_TLM_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - SIZE_OF_FwChanIdType - SIZE_OF_FwPacketDescriptorType +constant FW_TLM_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - sizeof(FwChanIdType) - sizeof(FwPacketDescriptorType) @ Specifies the size of the buffer that contains the serialized telemetry value constant FW_STATEMENT_ARG_BUFFER_MAX_SIZE = FW_CMD_ARG_BUFFER_MAX_SIZE @@ -45,7 +45,7 @@ constant FW_STATEMENT_ARG_BUFFER_MAX_SIZE = FW_CMD_ARG_BUFFER_MAX_SIZE constant FW_TLM_STRING_MAX_SIZE = 40 @ Specifies the size of the buffer that contains the serialized parameter value -constant FW_PARAM_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - SIZE_OF_FwPrmIdType - SIZE_OF_FwPacketDescriptorType +constant FW_PARAM_BUFFER_MAX_SIZE = FW_COM_BUFFER_MAX_SIZE - sizeof(FwPrmIdType) - sizeof(FwPacketDescriptorType) @ Specifies the maximum size of a string in a parameter constant FW_PARAM_STRING_MAX_SIZE = 40 diff --git a/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.fpp b/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.fpp new file mode 100644 index 00000000..c947b4fc --- /dev/null +++ b/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.fpp @@ -0,0 +1,45 @@ +# ====================================================================== +# TlmPacketizerCfg.fpp +# Project-specific TlmPacketizer configuration +# Groups 1-6 are used in ReferenceDeploymentPackets.fppi +# ====================================================================== +module Svc { + @ One output section: REALTIME downlink through communication stack + enum TelemetrySection { + REALTIME, @< Realtime telemetry downlink through communication stack + NUM_SECTIONS, @< REQUIRED: Counter, leave as last element. + } + + @ Max group used in ReferenceDeploymentPackets.fppi is 6 + constant MAX_CONFIGURABLE_TLMPACKETIZER_GROUP = 6 + + constant NUM_CONFIGURABLE_TLMPACKETIZER_GROUPS = MAX_CONFIGURABLE_TLMPACKETIZER_GROUP + 1 + + @ One output port — PktSend[0] is connected to comSplitterTelemetry + constant TELEMETRY_SEND_PORTS = TelemetrySection.NUM_SECTIONS + + @ All sections/groups send on port 0 + constant TELEMETRY_SEND_PORT_MAPPING = [ + [0, 0, 0, 0, 0, 0, 0], + ] + + @ All sections start ENABLED + constant TELEMETRY_SECTION_ENABLED_DEFAULTS = [Fw.Enabled.ENABLED] + + @ Default group config: output on change, no min/max time thresholds + constant DEFAULT_GROUP_CONFIG = { enabled = Fw.Enabled.ENABLED, forceEnabled = Fw.Enabled.DISABLED, rateLogic = RateLogic.ON_CHANGE_MIN, min = 0, max = 0 } + + @ Default configuration for all sections and groups + constant TELEMETRY_SECTION_DEFAULTS = [ + # REALTIME section + [ + DEFAULT_GROUP_CONFIG, # Group 0 + DEFAULT_GROUP_CONFIG, # Group 1 + DEFAULT_GROUP_CONFIG, # Group 2 + DEFAULT_GROUP_CONFIG, # Group 3 + DEFAULT_GROUP_CONFIG, # Group 4 + DEFAULT_GROUP_CONFIG, # Group 5 + DEFAULT_GROUP_CONFIG, # Group 6 + ], + ] +} diff --git a/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.hpp b/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.hpp index e2345b66..ee490aff 100644 --- a/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.hpp +++ b/PROVESFlightControllerReference/project/config/TlmPacketizerCfg.hpp @@ -17,27 +17,12 @@ namespace Svc { static const FwChanIdType MAX_PACKETIZER_PACKETS = 22; -static const FwChanIdType TLMPACKETIZER_NUM_TLM_HASH_SLOTS = - 15; // !< Number of slots in the hash table. - // Works best when set to about twice the number of components producing telemetry -static const FwChanIdType TLMPACKETIZER_HASH_MOD_VALUE = - 999; // !< The modulo value of the hashing function. - // Should be set to a little below the ID gaps to spread the entries around -static const FwChanIdType TLMPACKETIZER_HASH_BUCKETS = - 202; // !< Buckets assignable to a hash slot. - // Buckets must be >= number of telemetry channels in system +static const FwChanIdType MAX_PACKETIZER_CHANNELS = + 202; // !< Must be >= number of non-omitted telemetry channels in system + static const FwChanIdType TLMPACKETIZER_MAX_MISSING_TLM_CHECK = 25; // !< Maximum number of missing telemetry channel checks - -// packet update mode -enum PacketUpdateMode { - PACKET_UPDATE_ALWAYS, // Always send packets, even if no changes to channel data - PACKET_UPDATE_ON_CHANGE, // Only send packets if any of the channels updates - PACKET_UPDATE_AFTER_FIRST_CHANGE, // Always send packets, but only after first channel has been updated -}; - -static const PacketUpdateMode PACKET_UPDATE_MODE = PACKET_UPDATE_ON_CHANGE; } // namespace Svc #endif /* SVC_TLMPACKETIZER_TLMPACKETIZERCOMPONENTIMPLCFG_HPP_ */ diff --git a/patches/fprime-gds-version.patch b/patches/fprime-gds-version.patch deleted file mode 100644 index 8e8cdb48..00000000 --- a/patches/fprime-gds-version.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/requirements.txt b/requirements.txt -index 9ca76918e..5d526affa 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -21,7 +21,10 @@ Flask-RESTful==0.3.10 - fprime-fpl-layout==1.0.3 - fprime-fpl-write-pic==1.0.3 - fprime-fpp==3.1.0 --fprime-gds==4.1.0 -+# Modified from 4.1.0 to 4.1.1a2 for features: -+# - file-uplink-cooldown arg -+# - file-uplink-chunk-size arg -+fprime-gds==4.1.1a2 - fprime-tools==4.1.0 - fprime-visual==1.0.2 - gcovr==8.2 From 2f7038882499af61b2d893943f3a63366b456ee4 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 19:30:55 -0500 Subject: [PATCH 3/6] Update fprime-zephyr to latest --- lib/fprime-zephyr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fprime-zephyr b/lib/fprime-zephyr index 31399714..f7c9cf4b 160000 --- a/lib/fprime-zephyr +++ b/lib/fprime-zephyr @@ -1 +1 @@ -Subproject commit 313997144363ea930af66e86b52d43537cf7f489 +Subproject commit f7c9cf4bd898004856e2198ff73fa670ee69628b From ffac4fd27f5badb910b347d72355cb55c461d242 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 19:40:21 -0500 Subject: [PATCH 4/6] Update fprime-extras --- .gitmodules | 2 +- lib/fprime-extras | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5ea7e8a5..24be4f53 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,4 +12,4 @@ url = https://github.com/jgromes/RadioLib [submodule "lib/fprime-extras"] path = lib/fprime-extras - url = https://github.com/LeStarch/fprime-extras + url = https://github.com/nateinaction/fprime-extras diff --git a/lib/fprime-extras b/lib/fprime-extras index 982139f9..f4d4924f 160000 --- a/lib/fprime-extras +++ b/lib/fprime-extras @@ -1 +1 @@ -Subproject commit 982139f94ed833a5b3b97bab903b97e05f385b26 +Subproject commit f4d4924f0b9bd472b52f310041516dd309f9b26f From 17c742f8d135dbfe67432022cff6c55772413e9a Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 19:45:00 -0500 Subject: [PATCH 5/6] Fix submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 24be4f53..5ea7e8a5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,4 +12,4 @@ url = https://github.com/jgromes/RadioLib [submodule "lib/fprime-extras"] path = lib/fprime-extras - url = https://github.com/nateinaction/fprime-extras + url = https://github.com/LeStarch/fprime-extras From 7d13b3003842f21e7ad4b59e67891bb047886fef Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Sun, 17 May 2026 20:10:27 -0500 Subject: [PATCH 6/6] Update F prime GDS configuration --- Makefile | 11 +++++++++++ fprime-gds.yml | 2 +- patches/fprime-gds-version.patch | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 patches/fprime-gds-version.patch diff --git a/Makefile b/Makefile index 00572b7a..71b2be3f 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,17 @@ help: ## Display this help. .PHONY: submodules submodules: ## Initialize and update git submodules @git submodule update --init --recursive + @echo "Applying fprime-gds version patch..." + @cd lib/fprime && \ + if git apply --check ../../patches/fprime-gds-version.patch 2>/dev/null; then \ + git apply ../../patches/fprime-gds-version.patch && \ + echo "✓ Applied fprime-gds version patch"; \ + elif git apply --reverse --check ../../patches/fprime-gds-version.patch 2>/dev/null; then \ + echo "⚠ Patch already applied"; \ + else \ + echo "❌ Error: Unable to apply patch. Run 'cd lib/fprime && git status' to check."; \ + exit 1; \ + fi export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv .PHONY: fprime-venv diff --git a/fprime-gds.yml b/fprime-gds.yml index 9d086a79..40476de8 100644 --- a/fprime-gds.yml +++ b/fprime-gds.yml @@ -4,7 +4,7 @@ command-line-options: no-app: dictionary: build-artifacts/zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json output-unframed-data: "-" - frame-size: 248 + frame-size: 255 framing-selection: authenticate-space-data-link file-uplink-cooldown: 0.400 file-uplink-chunk-size: 204 diff --git a/patches/fprime-gds-version.patch b/patches/fprime-gds-version.patch new file mode 100644 index 00000000..8e8cdb48 --- /dev/null +++ b/patches/fprime-gds-version.patch @@ -0,0 +1,16 @@ +diff --git a/requirements.txt b/requirements.txt +index 9ca76918e..5d526affa 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -21,7 +21,10 @@ Flask-RESTful==0.3.10 + fprime-fpl-layout==1.0.3 + fprime-fpl-write-pic==1.0.3 + fprime-fpp==3.1.0 +-fprime-gds==4.1.0 ++# Modified from 4.1.0 to 4.1.1a2 for features: ++# - file-uplink-cooldown arg ++# - file-uplink-chunk-size arg ++fprime-gds==4.1.1a2 + fprime-tools==4.1.0 + fprime-visual==1.0.2 + gcovr==8.2